@tsparticles/engine 4.0.5 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/browser/Core/CanvasManager.js +72 -72
  2. package/browser/Core/Container.js +85 -85
  3. package/browser/Core/Engine.js +11 -11
  4. package/browser/Core/Particle.js +142 -63
  5. package/browser/Core/ParticlesManager.js +138 -138
  6. package/browser/Core/RenderManager.js +110 -110
  7. package/browser/Core/Retina.js +3 -4
  8. package/browser/Core/Utils/EventListeners.js +31 -31
  9. package/browser/Core/Utils/PluginManager.js +26 -26
  10. package/browser/Core/Utils/SpatialHashGrid.js +36 -36
  11. package/browser/Core/Utils/Vectors.js +3 -3
  12. package/browser/Options/Classes/Options.js +13 -13
  13. package/browser/Options/Classes/Particles/ParticlesOptions.js +11 -19
  14. package/browser/Utils/EventDispatcher.js +10 -10
  15. package/browser/exports.js +0 -4
  16. package/cjs/Core/CanvasManager.js +72 -72
  17. package/cjs/Core/Container.js +85 -85
  18. package/cjs/Core/Engine.js +11 -11
  19. package/cjs/Core/Particle.js +142 -63
  20. package/cjs/Core/ParticlesManager.js +138 -138
  21. package/cjs/Core/RenderManager.js +110 -110
  22. package/cjs/Core/Retina.js +3 -4
  23. package/cjs/Core/Utils/EventListeners.js +31 -31
  24. package/cjs/Core/Utils/PluginManager.js +26 -26
  25. package/cjs/Core/Utils/SpatialHashGrid.js +36 -36
  26. package/cjs/Core/Utils/Vectors.js +3 -3
  27. package/cjs/Options/Classes/Options.js +13 -13
  28. package/cjs/Options/Classes/Particles/ParticlesOptions.js +11 -19
  29. package/cjs/Utils/EventDispatcher.js +10 -10
  30. package/cjs/exports.js +0 -4
  31. package/esm/Core/CanvasManager.js +72 -72
  32. package/esm/Core/Container.js +85 -85
  33. package/esm/Core/Engine.js +11 -11
  34. package/esm/Core/Particle.js +142 -63
  35. package/esm/Core/ParticlesManager.js +138 -138
  36. package/esm/Core/RenderManager.js +110 -110
  37. package/esm/Core/Retina.js +3 -4
  38. package/esm/Core/Utils/EventListeners.js +31 -31
  39. package/esm/Core/Utils/PluginManager.js +26 -26
  40. package/esm/Core/Utils/SpatialHashGrid.js +36 -36
  41. package/esm/Core/Utils/Vectors.js +3 -3
  42. package/esm/Options/Classes/Options.js +13 -13
  43. package/esm/Options/Classes/Particles/ParticlesOptions.js +11 -19
  44. package/esm/Utils/EventDispatcher.js +10 -10
  45. package/esm/exports.js +0 -4
  46. package/package.json +1 -1
  47. package/report.html +1 -1
  48. package/tsparticles.engine.js +690 -697
  49. package/tsparticles.engine.min.js +1 -1
  50. package/types/Core/CanvasManager.d.ts +1 -16
  51. package/types/Core/Container.d.ts +1 -18
  52. package/types/Core/Engine.d.ts +1 -3
  53. package/types/Core/Interfaces/IEffectDrawer.d.ts +2 -0
  54. package/types/Core/Interfaces/IParticleCanvasBounds.d.ts +16 -0
  55. package/types/Core/Interfaces/IParticleUpdater.d.ts +1 -0
  56. package/types/Core/Interfaces/IShapeDrawer.d.ts +2 -0
  57. package/types/Core/Particle.d.ts +5 -13
  58. package/types/Core/ParticlesManager.d.ts +1 -28
  59. package/types/Core/RenderManager.d.ts +1 -23
  60. package/types/Core/Retina.d.ts +1 -1
  61. package/types/Core/Utils/EventListeners.d.ts +1 -8
  62. package/types/Core/Utils/PluginManager.d.ts +1 -8
  63. package/types/Core/Utils/SpatialHashGrid.d.ts +1 -12
  64. package/types/Core/Utils/Vectors.d.ts +1 -1
  65. package/types/Options/Classes/Options.d.ts +1 -4
  66. package/types/Options/Classes/Particles/ParticlesOptions.d.ts +1 -7
  67. package/types/Options/Interfaces/Particles/IParticlesOptions.d.ts +0 -4
  68. package/types/Utils/EventDispatcher.d.ts +1 -1
  69. package/types/export-types.d.ts +1 -4
  70. package/types/exports.d.ts +0 -4
  71. package/browser/Options/Classes/Particles/Opacity/Opacity.js +0 -21
  72. package/browser/Options/Classes/Particles/Opacity/OpacityAnimation.js +0 -20
  73. package/browser/Options/Classes/Particles/Size/Size.js +0 -21
  74. package/browser/Options/Classes/Particles/Size/SizeAnimation.js +0 -20
  75. package/browser/Options/Interfaces/Particles/Size/ISizeAnimation.js +0 -1
  76. package/cjs/Options/Classes/Particles/Opacity/Opacity.js +0 -21
  77. package/cjs/Options/Classes/Particles/Opacity/OpacityAnimation.js +0 -20
  78. package/cjs/Options/Classes/Particles/Size/Size.js +0 -21
  79. package/cjs/Options/Classes/Particles/Size/SizeAnimation.js +0 -20
  80. package/cjs/Options/Interfaces/Particles/Opacity/IOpacity.js +0 -1
  81. package/cjs/Options/Interfaces/Particles/Opacity/IOpacityAnimation.js +0 -1
  82. package/cjs/Options/Interfaces/Particles/Size/ISize.js +0 -1
  83. package/cjs/Options/Interfaces/Particles/Size/ISizeAnimation.js +0 -1
  84. package/esm/Options/Classes/Particles/Opacity/Opacity.js +0 -21
  85. package/esm/Options/Classes/Particles/Opacity/OpacityAnimation.js +0 -20
  86. package/esm/Options/Classes/Particles/Size/Size.js +0 -21
  87. package/esm/Options/Classes/Particles/Size/SizeAnimation.js +0 -20
  88. package/esm/Options/Interfaces/Particles/Opacity/IOpacity.js +0 -1
  89. package/esm/Options/Interfaces/Particles/Opacity/IOpacityAnimation.js +0 -1
  90. package/esm/Options/Interfaces/Particles/Size/ISize.js +0 -1
  91. package/esm/Options/Interfaces/Particles/Size/ISizeAnimation.js +0 -1
  92. package/types/Options/Classes/Particles/Opacity/Opacity.d.ts +0 -10
  93. package/types/Options/Classes/Particles/Opacity/OpacityAnimation.d.ts +0 -10
  94. package/types/Options/Classes/Particles/Size/Size.d.ts +0 -10
  95. package/types/Options/Classes/Particles/Size/SizeAnimation.d.ts +0 -10
  96. package/types/Options/Interfaces/Particles/Opacity/IOpacity.d.ts +0 -5
  97. package/types/Options/Interfaces/Particles/Opacity/IOpacityAnimation.d.ts +0 -5
  98. package/types/Options/Interfaces/Particles/Size/ISize.d.ts +0 -5
  99. package/types/Options/Interfaces/Particles/Size/ISizeAnimation.d.ts +0 -5
  100. /package/browser/{Options/Interfaces/Particles/Opacity/IOpacity.js → Core/Interfaces/IParticleCanvasBounds.js} +0 -0
  101. /package/{browser/Options/Interfaces/Particles/Opacity/IOpacityAnimation.js → cjs/Core/Interfaces/IParticleCanvasBounds.js} +0 -0
  102. /package/{browser/Options/Interfaces/Particles/Size/ISize.js → esm/Core/Interfaces/IParticleCanvasBounds.js} +0 -0
@@ -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.engine=t.__tsParticlesInternals.engine||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",a=100,o=.5,r=1e3,l={x:0,y:0,z:0},c={a:1,b:0,c:0,d:1},h="random",u="mid",d=2*Math.PI,p="true",f="false",g="canvas",_=255,m=360,y=100,v=100,P=.25,w=.75;var b;function x(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(b=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",b.bottomLeft="bottom-left",b.bottomRight="bottom-right",b.left="left",b.none="none",b.right="right",b.top="top",b.topLeft="top-left",b.topRight="top-right",b.outside="outside",b.inside="inside";class M{x;y;z;constructor(t=l.x,e=l.y,i=l.z){this.x=t,this.y=e,this.z=i}static get origin(){return M.create(l.x,l.y,l.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this._updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this._updateFromAngle(this.angle,t)}static clone(t){return M.create(t.x,t.y,x(t))}static create(t,e,i){return"number"==typeof t?new M(t,e??l.y,i??l.z):new M(t.x,t.y,x(t))}add(t){return M.create(this.x+t.x,this.y+t.y,this.z+x(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=x(t)}copy(){return M.clone(this)}div(t){return M.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**2+this.y**2}mult(t){return M.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return M.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),l.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=x(t)}sub(t){return M.create(this.x-t.x,this.y-t.y,this.z-x(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=x(t)}_updateFromAngle(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class z extends M{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return z.create(l.x,l.y)}static clone(t){return z.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new z(t,e??l.y):new z(t.x,t.y)}}function S(t){return"boolean"==typeof t}function I(t){return"string"==typeof t}function O(t){return"number"==typeof t}function D(t){return"object"==typeof t&&null!==t}function C(t){return Array.isArray(t)}function k(t){return null==t}const R=Math.PI/180;let T=Math.random;const E={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return U(T(),0,1-Number.EPSILON)}function L(t,e){return A()*(e-t)+t}function F(t){return E.nextFrame(t)}function B(t){E.cancel(t)}function U(t,e,i){return Math.min(Math.max(t,e),i)}function V(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function $(t){const e=W(t);let i=H(t);return e===i&&(i=0),L(i,e)}function q(t){return O(t)?t:$(t)}function H(t){return O(t)?t:t.min}function W(t){return O(t)?t:t.max}function N(t,e){if(t===e||void 0===e&&O(t))return t;const i=H(t),s=W(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:N(i,s)}function Q(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function j(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function G(t,e,i){return j(t,e)<=i*i}function X(t){return t*R}function Y(e,i,s){if(O(e))return X(e);switch(e){case t.MoveDirection.top:return-Math.PI*o;case t.MoveDirection.topRight:return-Math.PI*P;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*P;case t.MoveDirection.bottom:return Math.PI*o;case t.MoveDirection.bottomLeft:return Math.PI*w;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*w;case t.MoveDirection.inside:return Math.atan2(s.y-i.y,s.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-s.y,i.x-s.x);default:return A()*d}}function Z(t){const e=z.origin;return e.length=1,e.angle=t,e}function J(t,e,i,s){return z.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function K(t){return{x:(t.position?.x??A()*a)*t.size.width/a,y:(t.position?.y??A()*a)*t.size.height/a}}function tt(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}var et,it,st,nt,at,ot;t.AnimationMode=void 0,(et=t.AnimationMode||(t.AnimationMode={})).auto="auto",et.increase="increase",et.decrease="decrease",et.random="random",t.AnimationStatus=void 0,(it=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",it.decreasing="decreasing",t.DestroyType=void 0,(st=t.DestroyType||(t.DestroyType={})).none="none",st.max="max",st.min="min",t.OutModeDirection=void 0,(nt=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",nt.left="left",nt.right="right",nt.top="top",t.PixelMode=void 0,(at=t.PixelMode||(t.PixelMode={})).precise="precise",at.percent="percent",t.StartValueType=void 0,(ot=t.StartValueType||(t.StartValueType={})).max="max",ot.min="min",ot.random="random";function rt(t,e){const i=new Map,s=e?.maxSize,n=e?.ttlMs,a=e?.keyFn,o=(t,e=new WeakSet)=>{if(null===t)return"null";const i=typeof t;if("undefined"===i)return"undefined";if("number"===i||"boolean"===i||"string"===i)return JSON.stringify(t);if("function"===i)try{return t.toString()}catch{return'"[Function]"'}if("symbol"===i)try{return t.toString()}catch{return'"[Symbol]"'}if(Array.isArray(t))return`[${t.map(t=>o(t,e)).join(",")}]`;if(e.has(t))return'"[Circular]"';e.add(t);return`{${Object.keys(t).sort().map(i=>`${JSON.stringify(i)}:${o(t[i],e)}`).join(",")}}`},r=t=>a?a(t):(t=>o(t))(t);return(...e)=>{const a=r(e),o=Date.now(),l=i.get(a);if(void 0!==l){if(!(n&&o-l.ts>n))return i.delete(a),i.set(a,{value:l.value,ts:l.ts}),l.value;i.delete(a)}const c=t(...e);return i.set(a,{value:c,ts:o}),(()=>{if("number"==typeof s&&s>=0)for(;i.size>s;){const t=i.keys().next().value;if(void 0===t)break;i.delete(t)}})(),c}}function lt(){return"undefined"!=typeof matchMedia}function ct(){return globalThis.document}function ht(t){if(lt())return matchMedia(t)}function ut(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function dt(t,e){return t===e||C(e)&&e.includes(t)}function pt(t){return Math.floor(A()*t.length)}function ft(t,e,i=!0){return t[void 0!==e&&i?e%t.length:pt(t)]}function gt(e,i,s,n){let a=!0;return n&&n!==t.OutModeDirection.bottom||(a=e.top<i.height+s.x),!a||n&&n!==t.OutModeDirection.left||(a=e.right>s.x),!a||n&&n!==t.OutModeDirection.right||(a=e.left<i.width+s.y),!a||n&&n!==t.OutModeDirection.top||(a=e.bottom>s.y),a}function _t(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function mt(t,...e){for(const i of e){if(k(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=>mt(void 0,t)):mt(e[n],a)}}return t}function yt(t,e){return C(t)?t.map((t,i)=>e(t,i)):e(t,0)}function vt(t,e,i){return C(t)?ft(t,e,i):t}function Pt(e,i){const s=e.value,n=e.animation,a={delayTime:q(n.delay)*r,enable:n.enable,value:q(e.value)*i,max:W(s)*i,min:H(s)*i,loops:0,maxLoops:q(n.count),time:0};if(n.enable){switch(a.decay=1-q(n.decay),n.mode){case t.AnimationMode.increase:a.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:a.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:a.value=a.min,e&&(a.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:a.value=a.max,e&&(a.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:a.value=$(a),e&&(a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function wt(e,i){if(!(e.mode===t.PixelMode.percent)){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/a*i.width,y:e.y/a*i.height}:{width:e.width/a*i.width,height:e.height/a*i.height}}function bt(t,e){return wt(t,e)}function xt(t){const e=ct().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||k(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}const Mt=rt(function(t){const e=ct().createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0","pointer-events":"none"};for(const t in i){const s=i[t];void 0!==s&&e.setProperty(t,s)}return e});function zt(t,e,i,s,n){if(s){let s={passive:!0};S(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 St(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,n)),n}async function It(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 Ot{_listeners;constructor(){this._listeners=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this._listeners.get(t);i||(i=[],this._listeners.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this._listeners.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this._listeners.get(t)}removeAllEventListeners(t){t?this._listeners.delete(t):this._listeners=new Map}removeEventListener(t,e){const i=this._listeners.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this._listeners.delete(t):i.splice(n,1))}}var Dt;t.EventType=void 0,(Dt=t.EventType||(t.EventType={})).configAdded="configAdded",Dt.containerInit="containerInit",Dt.particlesSetup="particlesSetup",Dt.containerStarted="containerStarted",Dt.containerStopped="containerStopped",Dt.containerDestroyed="containerDestroyed",Dt.containerPaused="containerPaused",Dt.containerPlay="containerPlay",Dt.containerBuilt="containerBuilt",Dt.particleAdded="particleAdded",Dt.particleDestroyed="particleDestroyed",Dt.particleRemoved="particleRemoved";class Ct{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;_allLoadersSet=new Set;_configs=new Map;_engine;_executedSet=new Set;_initialized=!1;_isRunningLoaders=!1;_loadPromises=new Set;constructor(t){this._engine=t}get configs(){const t={};for(const[e,i]of this._configs)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this._configs.set(i,e),this._engine.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}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 It(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 It(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return St(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this._initialized&&!this._isRunningLoaders){this._isRunningLoaders=!0,this._executedSet=new Set,this._allLoadersSet=new Set(this._loadPromises);try{for(const t of this._allLoadersSet)await this._runLoader(t,this._executedSet,this._allLoadersSet)}finally{this._loadPromises.clear(),this._isRunningLoaders=!1,this._initialized=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this._initialized)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this._isRunningLoaders?await this._runLoader(e,this._executedSet,this._allLoadersSet):this._loadPromises.add(e)}async _runLoader(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this._engine))}}const kt=t=>(...e)=>{t(...e)},Rt={debug:kt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:kt(console.info),log:kt(console.log),trace:kt(console.trace),verbose:kt(console.log),warning:kt(console.warn)};function Tt(){return Rt}const Et="100%";class At{pluginManager=new Ct(this);_domArray=[];_eventDispatcher=new Ot;_initialized=!1;get items(){return this._domArray}get version(){return"4.0.5"}addEventListener(t,e){this._eventDispatcher.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this._eventDispatcher.dispatchEvent(t,e)}async init(){this._initialized||(await this.pluginManager.init(),this._initialized=!0)}item(t){const{items:e}=this,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){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:o}=t,r=o?await async function(t){const e=vt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Tt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=vt(r,a),{items:c}=this,h=c.findIndex(t=>t.id.description===n),u=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(u);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,u)}else c.push(u);const d="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=ct();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=Et,s.style.height||=Et,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(g).item(0);n?(s=n,s.dataset[e]=f):(s=i.createElement(g),s.dataset[e]=p,t.appendChild(s)),s.style.width||=Et,s.style.height||=Et,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=ct();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return u.canvas.loadCanvas(d),await u.start(),u}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this._eventDispatcher.removeEventListener(t,e)}}var Lt,Ft,Bt,Ut,Vt,$t,qt,Ht;!function(t){t.circle="circle",t.rectangle="rectangle"}(Lt||(Lt={}));class Wt{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 Nt extends Wt{radius;constructor(t,e,i){super(t,e,Lt.circle),this.radius=i}contains(t){return G(t,this.position,this.radius)}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 Nt||t.type===Lt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Qt||t.type===Lt.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(n-i,2)+Math.pow(a-o,2)<=s**2||n<=s+i&&a<=s+o||n<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Qt extends Wt{size;constructor(t,e,i,s){super(t,e,Lt.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 Nt)return t.intersects(this);if(!(t instanceof Qt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,o=a.width,r=a.height;return n.x<s.x+e&&n.x+o>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}t.RotateDirection=void 0,(Ft=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Ft.counterClockwise="counter-clockwise",Ft.random="random",t.LimitMode=void 0,(Bt=t.LimitMode||(t.LimitMode={})).delete="delete",Bt.wait="wait",t.OutMode=void 0,(Ut=t.OutMode||(t.OutMode={})).bounce="bounce",Ut.none="none",Ut.out="out",Ut.destroy="destroy",Ut.split="split",t.AlterType=void 0,(Vt=t.AlterType||(t.AlterType={})).darken="darken",Vt.enlighten="enlighten",t.GradientType=void 0,($t=t.GradientType||(t.GradientType={})).linear="linear",$t.radial="radial",$t.random="random",t.ParticleOutType=void 0,(qt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",qt.inside="inside",qt.outside="outside",t.EasingType=void 0,(Ht=t.EasingType||(t.EasingType={})).easeInBack="ease-in-back",Ht.easeInBounce="ease-in-bounce",Ht.easeInCirc="ease-in-circ",Ht.easeInCubic="ease-in-cubic",Ht.easeInElastic="ease-in-elastic",Ht.easeInExpo="ease-in-expo",Ht.easeInGaussian="ease-in-gaussian",Ht.easeInLinear="ease-in-linear",Ht.easeInQuad="ease-in-quad",Ht.easeInQuart="ease-in-quart",Ht.easeInQuint="ease-in-quint",Ht.easeInSigmoid="ease-in-sigmoid",Ht.easeInSine="ease-in-sine",Ht.easeInSmoothstep="ease-in-smoothstep",Ht.easeOutBack="ease-out-back",Ht.easeOutBounce="ease-out-bounce",Ht.easeOutCirc="ease-out-circ",Ht.easeOutCubic="ease-out-cubic",Ht.easeOutElastic="ease-out-elastic",Ht.easeOutExpo="ease-out-expo",Ht.easeOutGaussian="ease-out-gaussian",Ht.easeOutLinear="ease-out-linear",Ht.easeOutQuad="ease-out-quad",Ht.easeOutQuart="ease-out-quart",Ht.easeOutQuint="ease-out-quint",Ht.easeOutSigmoid="ease-out-sigmoid",Ht.easeOutSine="ease-out-sine",Ht.easeOutSmoothstep="ease-out-smoothstep",Ht.easeInOutBack="ease-in-out-back",Ht.easeInOutBounce="ease-in-out-bounce",Ht.easeInOutCirc="ease-in-out-circ",Ht.easeInOutCubic="ease-in-out-cubic",Ht.easeInOutElastic="ease-in-out-elastic",Ht.easeInOutExpo="ease-in-out-expo",Ht.easeInOutGaussian="ease-in-out-gaussian",Ht.easeInOutLinear="ease-in-out-linear",Ht.easeInOutQuad="ease-in-out-quad",Ht.easeInOutQuart="ease-in-out-quart",Ht.easeInOutQuint="ease-in-out-quint",Ht.easeInOutSigmoid="ease-in-out-sigmoid",Ht.easeInOutSine="ease-in-out-sine",Ht.easeInOutSmoothstep="ease-in-out-smoothstep";class jt{count;decay;delay;enable;speed;sync;constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){k(t)||(void 0!==t.count&&(this.count=N(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=N(t.speed)),void 0!==t.decay&&(this.decay=N(t.decay)),void 0!==t.delay&&(this.delay=N(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class Gt extends jt{mode;startValue;constructor(){super(),this.mode=t.AnimationMode.auto,this.startValue=t.StartValueType.random}load(t){super.load(t),k(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Xt extends jt{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),k(t)||(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.offset&&(this.offset=N(t.offset)))}}class Yt{h=new Xt(0,m);l=new Xt(0,v);s=new Xt(0,y);load(t){k(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class Zt{value;constructor(){this.value=""}static create(t,e){const i=new Zt;return i.load(t),void 0!==e&&(I(e)||C(e)?i.load({value:e}):i.load(e)),i}load(t){k(t)||k(t.value)||(this.value=t.value)}}class Jt extends Zt{animation;constructor(){super(),this.animation=new Yt}static create(t,e){const i=new Jt;return i.load(t),void 0!==e&&(I(e)||C(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),k(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class Kt{color;image;opacity;position;repeat;size;constructor(){this.color=new Zt,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){k(t)||(void 0!==t.color&&(this.color=Zt.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class te{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){k(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class ee{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(t){k(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class ie{close;options;type;constructor(){this.close=!0,this.options={},this.type=[]}load(t){if(k(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=mt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class se{color;enable;opacity;constructor(){this.enable=!0,this.opacity=1}load(t){k(t)||(void 0!==t.color&&(this.color=Jt.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=N(t.opacity)))}}class ne{offset;value;constructor(){this.offset=0,this.value=90}load(t){k(t)||(void 0!==t.offset&&(this.offset=N(t.offset)),void 0!==t.value&&(this.value=N(t.value)))}}class ae{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=t.PixelMode.percent,this.radius=0}load(t){k(t)||(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class oe{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){k(t)||(void 0!==t.acceleration&&(this.acceleration=N(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=N(t.maxSpeed)))}}class re{value;constructor(){this.value=0}load(t){k(t)||k(t.value)||(this.value=N(t.value))}}class le extends re{animation=new jt;load(t){if(super.load(t),k(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class ce extends le{animation;constructor(){super(),this.animation=new Gt}load(t){super.load(t)}}class he{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new re,this.enable=!1,this.options={}}load(t){k(t)||(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=mt(this.options,t.options)))}}class ue{bottom;default;left;right;top;constructor(){this.default=t.OutMode.out}load(t){k(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 de{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){k(t)||(void 0!==t.acceleration&&(this.acceleration=N(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=mt({},t.position)))}}class pe{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new ne,this.center=new ae,this.decay=0,this.distance={},this.direction=t.MoveDirection.none,this.drift=0,this.enable=!1,this.gravity=new oe,this.path=new he,this.outModes=new ue,this.random=!1,this.size=!1,this.speed=2,this.spin=new de,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(k(t))return;this.angle.load(O(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),void 0!==t.decay&&(this.decay=N(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=O(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=N(t.drift)),void 0!==t.enable&&(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),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=N(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class fe extends Gt{destroy;constructor(){super(),this.destroy=t.DestroyType.none,this.speed=2}load(t){super.load(t),k(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class ge extends ce{animation;constructor(){super(),this.animation=new fe,this.value=1}load(t){if(k(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class _e{color;opacity;width;constructor(){this.width=0}load(t){k(t)||(void 0!==t.color&&(this.color=Jt.create(this.color,t.color)),void 0!==t.width&&(this.width=N(t.width)),void 0!==t.opacity&&(this.opacity=N(t.opacity)))}}class me{color;fill;stroke;load(t){k(t)||(void 0!==t.color&&(this.color=Jt.create(this.color,t.color)),void 0!==t.fill&&(this.fill??=new se,this.fill.load(t.fill)),void 0!==t.stroke&&(this.stroke??=new _e,this.stroke.load(t.stroke)))}}class ye extends re{constructor(){super(),this.value=1}}class ve{horizontal;vertical;constructor(){this.horizontal=new ye,this.vertical=new ye}load(t){k(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class Pe{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(k(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.width;void 0!==e&&(this.width=e);const i=t.height;void 0!==i&&(this.height=i)}}class we{mode;value;constructor(){this.mode=t.LimitMode.delete,this.value=0}load(t){k(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class be{density;limit;value;constructor(){this.density=new Pe,this.limit=new we,this.value=0}load(t){k(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class xe{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(k(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=mt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class Me extends Gt{destroy;constructor(){super(),this.destroy=t.DestroyType.none,this.speed=5}load(t){super.load(t),k(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class ze extends ce{animation;constructor(){super(),this.animation=new Me,this.value=3}load(t){if(super.load(t),k(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Se extends re{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),k(t)||(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class Ie{bounce;effect;groups;move;number;opacity;paint;palette;reduceDuplicates;shape;size;zIndex;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.bounce=new ve,this.effect=new ie,this.groups={},this.move=new pe,this.number=new be,this.opacity=new ge,this.paint=new me,this.paint.color=new Jt,this.paint.color.value="#fff",this.paint.fill=new se,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new xe,this.size=new ze,this.zIndex=new Se}load(t){if(k(t))return;if(t.palette&&(this.palette=t.palette,this._importPalette(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=mt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number),this.opacity.load(t.opacity);const e=t.paint;if(e&&(C(e)?this.paint=yt(e,t=>{const e=new me;return e.load(t),e}):C(this.paint)?(this.paint=new me,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.size.load(t.size),this.zIndex.load(t.zIndex),this._container){for(const e of this._pluginManager.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this._container,this,t);const e=this._pluginManager.updaters.get(this._container);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}_importPalette=t=>{const e=this._pluginManager.getPalette(t);if(!e)return;const i=e.colors,s=(C(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 Oe(t,...e){for(const i of e)t.load(i)}function De(t,e,...i){const s=new Ie(t,e);return Oe(s,...i),s}class Ce{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.autoPlay=!0,this.background=new Kt,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new te,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=De(this._pluginManager,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new ee,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(k(t))return;void 0!==t.preset&&(this.preset=t.preset,yt(this.preset,t=>{this._importPreset(t)})),void 0!==t.palette&&(this.palette=t.palette,this._importPalette(this.palette)),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.clear&&(this.clear=t.clear),void 0!==t.key&&(this.key=t.key),void 0!==t.name&&(this.name=t.name),void 0!==t.delay&&(this.delay=N(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=N(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.hdr&&(this.hdr=t.hdr),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const s=t.fullScreen;S(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=mt(this.style,t.style),void 0!==t.smooth&&(this.smooth=t.smooth),this._pluginManager.plugins.forEach(e=>{e.loadOptions(this._container,this,t)})}_importPalette=t=>{const e=this._pluginManager.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})};_importPreset=t=>{this.load(this._pluginManager.getPreset(t))}}function ke(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(l.x,l.y,e.width,e.height)}function Re(t,e,i,s){if(!i)return;const n=t.globalAlpha;t.globalAlpha=s,t.drawImage(i,l.x,l.y,e.width,e.height),t.globalAlpha=n}function Te(t,e){t.clearRect(l.x,l.y,e.width,e.height)}function Ee(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,u=s.getPosition(),d=s.getTransformData(l),p={x:u.x,y:u.y};i.setTransform(d.a,d.b,d.c,d.d,u.x,u.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 _={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:f,stroke:g>0,transformData:d,position:{...u},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(_);const m=s.effect?c.get(s.effect):void 0,y=s.shape?h.get(s.shape):void 0;Le(m,_),Ue(y,_),Fe(y,_),Be(y,_),Ae(m,_),i.resetTransform()}function Ae(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}function Le(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}function Fe(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())}function Be(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}function Ue(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}function Ve(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const $e=new Map;function qe(t,e){let i=$e.get(t);if(!i){if(i=e(),$e.size>=1e3){[...$e.keys()].slice(0,500).forEach(t=>$e.delete(t))}$e.set(t,i)}return i}function He(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function We(t,e,i,s=!0){if(!e)return;const n=I(e)?{value:e}:e;if(I(n.value))return Ne(t,n.value,i,s);if(C(n.value)){const e=ft(n.value,i,s);if(!e)return;return We(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Ne(t,e,i,s=!0){if(!e)return;const n=I(e)?{value:e}:e;if(I(n.value))return n.value===h?Ye():Ge(t,n.value);if(C(n.value)){const e=ft(n.value,i,s);if(!e)return;return Ne(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Qe(t,e,i,s=!0){const n=We(t,e,i,s);return n?je(n):void 0}function je(t){const e=t.r/_,i=t.g/_,s=t.b/_,n=Math.max(e,i,s),a=Math.min(e,i,s),r={h:0,l:(n+a)*o,s:0};return n!==a&&(r.s=r.l<o?(n-a)/(n+a):(n-a)/(2-n-a),r.h=e===n?(i-s)/(n-a):i===n?2+(s-e)/(n-a):4+(e-i)/(n-a)),r.l*=v,r.s*=y,r.h*=60,r.h<0&&(r.h+=m),r.h>=m&&(r.h-=m),r}function Ge(t,e){return He(t,e)}function Xe(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(y,t.s)),s=Math.max(0,Math.min(v,t.l)),n=e/m,a=i/y,r=s/v;if(0===i){const t=Math.round(r*_);return{r:t,g:t,b:t}}const l=(t,e,i)=>{if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t},c=r<o?r*(1+a):r+a-r*a,h=2*r-c,u=1/3,d=Math.min(_,_*l(h,c,n+u)),p=Math.min(_,_*l(h,c,n)),f=Math.min(_,_*l(h,c,n-u));return{r:Math.round(d),g:Math.round(p),b:Math.round(f)}}function Ye(t){const e=t??0,i=()=>Math.floor(L(e,256));return{b:i(),g:i(),r:i()}}function Ze(t,e,i){const s=i??1;return qe(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?Je(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Je(t,e){return`color(display-p3 ${(t.r/_).toString()} ${(t.g/_).toString()} ${(t.b/_).toString()} / ${(e??1).toString()})`}function Ke(t,e,i){const s=i??1;return qe(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e){return Je(Xe(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function ti(t,e,i,s){let n=t,a=e;return"r"in n||(n=Xe(t)),"r"in a||(a=Xe(e)),{b:V(n.b,a.b,i,s),g:V(n.g,a.g,i,s),r:V(n.r,a.r,i,s)}}function ei(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function ii(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=q(i.speed)/a*s,e.decay=1-q(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=q(i.count),e.time=0,e.delayTime=q(i.delay)*r,i.sync||(e.velocity*=A(),e.value*=A()),e.initialValue=e.value,e.offset=N(i.offset)):e.velocity=0}function si(e,i,s){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const n=e.offset?$(e.offset):0,a=(e.velocity??0)*s.factor+3.6*n,o=e.decay??1,r=e.max,l=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=a,e.value<l&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=a,e.value>r&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=r)),e.velocity&&1!==o&&(e.velocity*=o),e.value=U(e.value,l,r)}function ni(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const ai=new At,oi=globalThis;oi.__tsParticlesInternals=oi.__tsParticlesInternals??{},oi.tsParticles=ai;function ri(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class li{_canvasClearPlugins;_canvasManager;_canvasPaintPlugins;_clearDrawPlugins;_colorPlugins;_container;_context;_contextSettings;_drawParticlePlugins;_drawParticlesCleanupPlugins;_drawParticlesSetupPlugins;_drawPlugins;_drawSettingsCleanupPlugins;_drawSettingsSetupPlugins;_pluginManager;_postDrawUpdaters;_preDrawUpdaters;_reusableColorStyles={};_reusablePluginColors=[void 0,void 0];_reusableTransform={};constructor(t,e,i){this._pluginManager=t,this._container=e,this._canvasManager=i,this._context=null,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesCleanupPlugins=[],this._drawParticlesSetupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[]}get settings(){return this._contextSettings}canvasClear(){this._container.actualOptions.clear&&this.draw(t=>{Te(t,this._canvasManager.size)})}clear(){let t=!1;for(const e of this._canvasClearPlugins)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesCleanupPlugins=[],this._drawParticlesSetupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[]}draw(t){const e=this._context;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[a,o]=this._getPluginParticleColors(t);if(a??=s,o??=n,!a&&!o)return;const r=this._container,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:u,strokeOpacity:d}=t.getOpacity(),p=this._reusableTransform,f=this._reusableColorStyles,g=a?Ke(a,r.hdr,h*u):void 0,_=o?Ke(o,r.hdr,d*u):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=_,this.draw(s=>{for(const i of this._drawParticlesSetupPlugins)i.drawParticleSetup?.(s,t,e);this._applyPreDrawUpdaters(s,t,i,u,f,p),Ee({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:u,transform:p}),this._applyPostDrawUpdaters(t);for(const i of this._drawParticlesCleanupPlugins)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this._drawParticlePlugins)Ve(i,s,t,e)})}drawParticles(t){const{particles:e}=this._container;this.clear(),e.update(t),this.draw(i=>{for(const e of this._drawSettingsSetupPlugins)e.drawSettingsSetup?.(i,t);for(const e of this._drawPlugins)e.draw?.(i,t);e.drawParticles(t);for(const e of this._clearDrawPlugins)e.clearDraw?.(i,t);for(const e of this._drawSettingsCleanupPlugins)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesSetupPlugins=[],this._drawParticlesCleanupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[];for(const t of this._container.plugins)(t.particleFillColor??t.particleStrokeColor)&&this._colorPlugins.push(t),t.canvasClear&&this._canvasClearPlugins.push(t),t.canvasPaint&&this._canvasPaintPlugins.push(t),t.drawParticle&&this._drawParticlePlugins.push(t),t.drawParticleSetup&&this._drawParticlesSetupPlugins.push(t),t.drawParticleCleanup&&this._drawParticlesCleanupPlugins.push(t),t.draw&&this._drawPlugins.push(t),t.drawSettingsSetup&&this._drawSettingsSetupPlugins.push(t),t.drawSettingsCleanup&&this._drawSettingsCleanupPlugins.push(t),t.clearDraw&&this._clearDrawPlugins.push(t)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this._container.particleUpdaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this._preDrawUpdaters.push(t)}paint(){let t=!1;for(const e of this._canvasPaintPlugins)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{ke(e,this._canvasManager.size,t)})}paintImage(t,e){this.draw(i=>{Re(i,this._canvasManager.size,t,e)})}setContext(t){this._context=t,this._context&&(this._context.globalCompositeOperation=i)}setContextSettings(t){this._contextSettings=t}stop(){this.draw(t=>{Te(t,this._canvasManager.size)})}_applyPostDrawUpdaters=t=>{for(const e of this._postDrawUpdaters)e.afterDraw?.(t)};_applyPreDrawUpdaters=(t,e,i,s,n,a)=>{for(const o of this._preDrawUpdaters){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,s);a&&(n.fill=a),r&&(n.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)ri(a,t,e)}o.beforeDraw?.(e)}};_getPluginParticleColors=t=>{let e,i;for(const s of this._colorPlugins)if(!e&&s.particleFillColor&&(e=Qe(this._pluginManager,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Qe(this._pluginManager,s.particleStrokeColor(t))),e&&i)break;return this._reusablePluginColors[0]=e,this._reusablePluginColors[1]=i,this._reusablePluginColors}}const ci=new WeakMap;function hi(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 ui{domElement;render;renderCanvas;size;zoom=1;_container;_generated;_mutationObserver;_originalStyle;_pluginManager;_pointerEvents;_resizePlugins;_standardSize;_zoomCenter;constructor(t,e){this._pluginManager=t,this._container=e,this.render=new li(t,e,this),this._standardSize={height:0,width:0};const i=e.retina.pixelRatio,s=this._standardSize;this.size={height:s.height*i,width:s.width*i},this._generated=!1,this._resizePlugins=[],this._pointerEvents="none"}get _fullScreen(){return this._container.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this._generated){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this._resetOriginalStyle();this.render.destroy(),this._resizePlugins=[]}getZoomCenter(){const t=this._container.retina.pixelRatio,{width:e,height:i}=this.size;return this._zoomCenter?this._zoomCenter:{x:e*o/t,y:i*o/t}}init(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=ut(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this._repairStyle()}),this.resize(),this._initStyle(),this.initBackground(),this._safeMutationObserver(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.render.init()}initBackground(){const{_container:t}=this,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=We(this._pluginManager,e.color);s.backgroundColor=n?Ze(n,t.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this._resizePlugins=[];for(const t of this._container.plugins)t.resize&&this._resizePlugins.push(t)}loadCanvas(t){this._generated&&this.domElement&&this.domElement.remove();const i=this._container,s=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=s,this._generated=!!s&&"true"===s.dataset[e],this.renderCanvas=s?(t=>{const e=ci.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 ci.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(s):t;const n=this.domElement;n&&(n.ariaHidden="true",this._originalStyle=xt(n.style));const a=this._standardSize,o=this.renderCanvas;n?(a.height=n.offsetHeight,a.width=n.offsetWidth):(a.height=o.height,a.width=o.width);const r=this._container.retina.pixelRatio,l=this.size;o.height=l.height=a.height*r,o.width=l.width=a.width*r;const c=ht("(color-gamut: p3)");this.render.setContextSettings({alpha:!0,colorSpace:c?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this.render.setContext(o.getContext("2d",this.render.settings)),this._safeMutationObserver(t=>{t.disconnect()}),i.retina.init(),this.initBackground(),this._safeMutationObserver(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})})}resize(){const t=this.domElement;if(!t)return!1;const e=this._container,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas._standardSize,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=o.width,i.height=l.height=o.height,this._container.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this._pointerEvents=t,this._repairStyle())}setZoom(t,e){this.zoom=t,this._zoomCenter=e}stop(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this._container,e=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),e&&await t.refresh()}_applyResizePlugins=()=>{for(const t of this._resizePlugins)t.resize?.()};_initStyle=()=>{const t=this.domElement,e=this._container.actualOptions;if(t){this._fullScreen?this._setFullScreenStyle():this._resetOriginalStyle();for(const i in e.style){if(!i||!(i in e.style))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}};_repairStyle=()=>{const t=this.domElement;if(!t)return;this._safeMutationObserver(t=>{t.disconnect()}),this._initStyle(),this.initBackground();const e=this._pointerEvents;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this._safeMutationObserver(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})};_resetOriginalStyle=()=>{const t=this.domElement,e=this._originalStyle;t&&e&&hi(t,e,!0)};_safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)};_setFullScreenStyle=()=>{const t=this.domElement;t&&hi(t,Mt(this._container.actualOptions.fullScreen.zIndex),!0)}}class di{container;_handlers;_resizeObserver;_resizeTimeout;constructor(t){this.container=t,this._handlers={visibilityChange:()=>{this._handleVisibilityChange()},resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}_handleVisibilityChange=()=>{const t=this.container;t.actualOptions.pauseOnBlur&&(ct().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))};_handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);const t=async()=>{const t=this.container.canvas;await t.windowResize()};this._resizeTimeout=setTimeout(()=>{t()},this.container.actualOptions.resize.delay*r)};_manageListeners=t=>{const e=this._handlers;this._manageResize(t),zt(document,n,e.visibilityChange,t,!1)};_manageResize=t=>{const e=this._handlers,i=this.container;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void zt(globalThis,s,e.resize,t);const n=i.canvas.domElement;this._resizeObserver&&!t?(n&&this._resizeObserver.unobserve(n),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&n&&(this._resizeObserver=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this._handleWindowResize()}),this._resizeObserver.observe(n))}}function pi(t){if(!dt(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}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;_cachedOpacityData={fillOpacity:1,opacity:1,strokeOpacity:1};_cachedPosition=M.origin;_cachedRotateData={sin:0,cos:0};_cachedTransform={a:1,b:0,c:0,d:1};_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const i=this._container,s=this.shape?i.shapeDrawers.get(this.shape):void 0;s?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this._container.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this._container.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this._getRollColor(this.bubble.color??ei(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*o}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??q(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this._cachedOpacityData.fillOpacity=i*s*e,this._cachedOpacityData.opacity=i*e,this._cachedOpacityData.strokeOpacity=i*n*e,this._cachedOpacityData}getPosition(){return this._cachedPosition.x=this.position.x+this.offset.x,this._cachedPosition.y=this.position.y+this.offset.y,this._cachedPosition.z=this.position.z,this._cachedPosition}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this._cachedRotateData.sin=Math.sin(t),this._cachedRotateData.cos=Math.cos(t),this._cachedRotateData}getStrokeColor(){return this._getRollColor(this.bubble.color??ei(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this._cachedTransform.a=e.cos*(t.a??c.a),this._cachedTransform.b=i?e.sin*(t.b??1):t.b??c.b,this._cachedTransform.c=i?-e.sin*(t.c??1):t.c??c.c,this._cachedTransform.d=e.cos*(t.d??c.d),this._cachedTransform}init(e,i,s,n){const a=this._container;this.id=e,this.group=n,this.justWarped=!1,this.effectClose=!0,this.shapeClose=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},this.outType=t.ParticleOutType.normal,this.ignoresResizeRatio=!0;const o=a.retina.pixelRatio,r=a.actualOptions,l=De(this._pluginManager,a,r.particles),c=l.reduceDuplicates,u=l.effect.type,d=l.shape.type;this.effect=vt(u,this.id,c),this.shape=vt(d,this.id,c);const p=l.effect,f=l.shape;if(s){if(s.effect?.type){const t=vt(s.effect.type,this.id,c);t&&(this.effect=t,p.load(s.effect))}if(s.shape?.type){const t=vt(s.shape.type,this.id,c);t&&(this.shape=t,f.load(s.shape))}}if(this.effect===h){const t=[...this._container.effectDrawers.keys()];this.effect=t[Math.floor(A()*t.length)]}if(this.shape===h){const t=[...this._container.shapeDrawers.keys()];this.shape=t[Math.floor(A()*t.length)]}this.effectData=this.effect?function(t,e,i,s){const n=e.options[t];return mt({close:e.close},vt(n,i,s))}(this.effect,p,this.id,c):void 0,this.shapeData=this.shape?function(t,e,i,s){const n=e.options[t];return mt({close:e.close},vt(n,i,s))}(this.shape,f,this.id,c):void 0,l.load(s);const g=this.effectData;g&&l.load(g.particles);const _=this.shapeData;let m,y;_&&l.load(_.particles),this.effectClose=g?.close??l.effect.close,this.shapeClose=_?.close??l.shape.close,this.options=l,a.retina.initParticle(this),this.size=Pt(this.options.size,o),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(i),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,this.effect&&(m=a.effectDrawers.get(this.effect)),m?.loadEffect&&m.loadEffect(this),this.shape&&(y=a.shapeDrawers.get(this.shape)),y?.loadShape&&y.loadShape(this);const v=y?.getSidesCount;v&&(this.sides=v(this)),this.spawning=!1;for(const t of a.particleUpdaters)t.init(this);m?.particleInit?.(a,this),y?.particleInit?.(a,this);for(const t of a.particleCreatedPlugins)t.particleCreated?.(this)}isInsideCanvas(){const t=this.getRadius(),e=this._container.canvas.size,i=this.position;return i.x>=-t&&i.y>=-t&&i.y<=e.height+t&&i.x<=e.width+t}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=t%d,i=e<0?e+d:e;return i>=Math.PI*o&&i<3*Math.PI*o}if(this.roll.horizontal){const e=(t+Math.PI*o)%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}if(this.roll.vertical){const e=t%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this._container.particleUpdaters)t.reset?.(this)}_calcPosition=(t,e)=>{let i=0,s=t?M.create(t.x,t.y,e):void 0;const n=this._container,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size,c=new AbortController,{signal:h}=c;for(;!h.aborted;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return M.create(i.x,i.y,e)}const t=tt({size:l,position:s}),c=M.create(t.x,t.y,e);this._fixHorizontal(c,r,o.left??o.default),this._fixHorizontal(c,r,o.right??o.default),this._fixVertical(c,r,o.top??o.default),this._fixVertical(c,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}return s};_calculateVelocity=()=>{const e=Z(this.direction).copy(),i=this.options.move;if(i.direction===t.MoveDirection.inside||i.direction===t.MoveDirection.outside)return e;const s=X(q(i.angle.value)),n=X(q(i.angle.offset)),a={left:n-s*o,right:n+s*o};return i.straight||(e.angle+=$(N(a.left,a.right))),i.random&&"number"==typeof i.speed&&(e.length*=A()),e};_fixHorizontal=(e,i,s)=>{pi({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this._container.canvas.size.width,setCb:t=>e.x+=t,radius:i})};_fixVertical=(e,i,s)=>{pi({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this._container.canvas.size.height,setCb:t=>e.y+=t,radius:i})};_getRollColor=t=>t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?ni(t,this.roll.alter.type,this.roll.alter.value):t:t;_initPosition=e=>{const i=this._container,s=Math.floor(q(this.options.zIndex.value)),n=this._calcPosition(e,U(s,0,i.zLayers));if(!n)throw new Error("a valid position cannot be found for particle");this.position=n,this.initialPosition=this.position.copy();const a=i.canvas.size;switch(this.moveCenter={...bt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=Y(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case t.MoveDirection.inside:this.outType=t.ParticleOutType.inside;break;case t.MoveDirection.outside:this.outType=t.ParticleOutType.outside}this.offset=z.origin}}class gi{_cellSize;_cells=new Map;_circlePool=[];_circlePoolIdx;_pendingCellSize;_rectanglePool=[];_rectanglePoolIdx;constructor(t){this._cellSize=t,this._circlePoolIdx=0,this._rectanglePoolIdx=0}clear(){this._cells.clear();const t=this._pendingCellSize;t&&(this._cellSize=t),this._pendingCellSize=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this._cellKeyFromCoords(e,i);this._cells.has(s)||this._cells.set(s,[]),this._cells.get(s)?.push(t)}query(t,e,i=[]){const s=this._getRangeBounds(t);if(!s)return i;const n=Math.floor(s.minX/this._cellSize),a=Math.floor(s.maxX/this._cellSize),o=Math.floor(s.minY/this._cellSize),r=Math.floor(s.maxY/this._cellSize);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this._cells.get(a);if(o)for(const s of o)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this._acquireCircle(t.x,t.y,e),a=this.query(n,i,s);return this._releaseShapes(),a}queryRectangle(t,e,i,s=[]){const n=this._acquireRectangle(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this._releaseShapes(),a}setCellSize(t){this._pendingCellSize=t}_acquireCircle(t,e,i){return(this._circlePool[this._circlePoolIdx++]??=new Nt(t,e,i)).reset(t,e,i)}_acquireRectangle(t,e,i,s){return(this._rectanglePool[this._rectanglePoolIdx++]??=new Qt(t,e,i,s)).reset(t,e,i,s)}_cellKeyFromCoords(t,e){return`${Math.floor(t/this._cellSize)}_${Math.floor(e/this._cellSize)}`}_getRangeBounds(t){if(t instanceof Nt){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 Qt){const{x:e,y:i}=t.position,{width:s,height:n}=t.size;return{minX:e,maxX:e+s,minY:i,maxY:i+n}}return null}_releaseShapes(){this._circlePoolIdx=0,this._rectanglePoolIdx=0}}class _i{checkParticlePositionPlugins;grid;_array;_container;_groupLimits;_limit;_nextId;_particleBuckets;_particleResetPlugins;_particleUpdatePlugins;_pluginManager;_pool;_postParticleUpdatePlugins;_postUpdatePlugins;_resizeFactor;_updatePlugins;_zBuckets;constructor(t,e){this._pluginManager=t,this._container=e,this._nextId=0,this._array=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._particleBuckets=new Map,this._zBuckets=this._createBuckets(this._container.zLayers),this.grid=new gi(100),this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}get count(){return this._array.length}addParticle(e,i,s,n){const a=this._container.actualOptions.particles.number.limit.mode,o=void 0===s?this._limit:this._groupLimits.get(s)??this._limit,r=this.count;if(o>0)switch(a){case t.LimitMode.delete:{const t=r+1-o;t>0&&this.removeQuantity(t);break}case t.LimitMode.wait:if(r>=o)return}try{const a=this._pool.pop()??new fi(this._pluginManager,this._container);a.init(this._nextId,e,i,s);let o=!0;return n&&(o=n(a)),o?(this._array.push(a),this._insertParticleIntoBucket(a),this._nextId++,this._container.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this._pool.push(a)}catch(t){Tt().warning(`error adding particle: ${t}`)}}clear(){this._array=[],this._particleBuckets.clear(),this._resetBuckets(this._container.zLayers)}destroy(){this._array=[],this._pool.length=0,this._particleBuckets.clear(),this._zBuckets=[],this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}drawParticles(t){for(let e=this._zBuckets.length-1;e>=0;e--){const i=this._zBuckets[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this._array.filter(t)}find(t){return this._array.find(t)}get(t){return this._array[t]}async init(){const t=this._container,e=t.actualOptions;this.checkParticlePositionPlugins=[],this._updatePlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._particleResetPlugins=[],this._postParticleUpdatePlugins=[],this._particleBuckets.clear(),this._resetBuckets(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._updatePlugins.push(e),e.particleUpdate&&this._particleUpdatePlugins.push(e),e.postUpdate&&this._postUpdatePlugins.push(e),e.particleReset&&this._particleResetPlugins.push(e),e.postParticleUpdate&&this._postParticleUpdatePlugins.push(e);await this._container.initDrawersAndUpdaters();for(const e of this._container.effectDrawers.values())await(e.init?.(t));for(const e of this._container.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this._container.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this._array.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let a=t;n<e&&a<this.count;a++)this._removeParticle(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this._container.actualOptions,e=t.particles.groups;let i=0;for(const t of this._container.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=De(this._pluginManager,this._container,s);this._applyDensity(n,i,t)}this._applyDensity(t.particles,i)}setResizeFactor(t){this._resizeFactor=t}update(t){this.grid.clear();for(const e of this._updatePlugins)e.update?.(t);const e=this._updateParticlesPhase1(t);for(const e of this._postUpdatePlugins)e.postUpdate?.(t);if(this._updateParticlesPhase2(t,e),e.size)for(const t of e)this.remove(t);delete this._resizeFactor}_addToPool=(...t)=>{this._pool.push(...t)};_applyDensity=(t,e,i,s)=>{const n=t.number;if(!n.density.enable)return void(void 0===i?this._limit=n.limit.value:(s?.number.limit.value??n.limit.value)&&this._groupLimits.set(i,s?.number.limit.value??n.limit.value));const a=this._initDensityFactor(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,l=Math.min(o,r)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this._limit=n.limit.value*a:this._groupLimits.set(i,n.limit.value*a),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)};_createBuckets=t=>{const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])};_getBucketIndex=t=>{const e=this._zBuckets.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)};_getParticleInsertIndex=(t,e)=>{let i=0,s=t.length;for(;i<s;){const n=Math.floor((i+s)/2),a=t[n];a?a.id<e?i=n+1:s=n:s=n}return i};_initDensityFactor=t=>{const e=this._container;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};_insertParticleIntoBucket=t=>{const e=this._getBucketIndex(t.position.z),i=this._zBuckets[e];i&&(i.splice(this._getParticleInsertIndex(i,t.id),0,t),this._particleBuckets.set(t.id,e))};_removeParticle=(e,i,s)=>{const n=this._array[e];return!!n&&(n.group===i&&(this._array.splice(e,1),this._removeParticleFromBucket(n),n.destroy(s),this._container.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this._addToPool(n),!0))};_removeParticleFromBucket=t=>{const e=this._particleBuckets.get(t.id)??this._getBucketIndex(t.position.z),i=this._zBuckets[e];if(!i)return void this._particleBuckets.delete(t.id);const s=this._getParticleInsertIndex(i,t.id);i[s]?.id===t.id?(i.splice(s,1),this._particleBuckets.delete(t.id)):this._particleBuckets.delete(t.id)};_resetBuckets=t=>{const e=Math.max(Math.floor(t),1);if(this._zBuckets.length===e)for(const t of this._zBuckets)t.length=0;else this._zBuckets=this._createBuckets(e)};_updateParticleBucket=t=>{const e=this._getBucketIndex(t.position.z),i=this._particleBuckets.get(t.id);if(void 0===i)return void this._insertParticleIntoBucket(t);if(i===e)return;const s=this._zBuckets[i];if(s){const e=this._getParticleInsertIndex(s,t.id);s[e]?.id===t.id&&s.splice(e,1)}const n=this._zBuckets[e];n?(n.splice(this._getParticleInsertIndex(n,t.id),0,t),this._particleBuckets.set(t.id,e)):this._particleBuckets.set(t.id,e)};_updateParticlesPhase1=t=>{const e=new Set,i=this._resizeFactor;for(const s of this._array){i&&!s.ignoresResizeRatio&&(s.position.x*=i.width,s.position.y*=i.height,s.initialPosition.x*=i.width,s.initialPosition.y*=i.height),s.ignoresResizeRatio=!1;for(const t of this._particleResetPlugins)t.particleReset?.(s);for(const e of this._particleUpdatePlugins){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e};_updateParticlesPhase2=(t,e)=>{for(const i of this._array)if(i.destroyed)e.add(i);else{for(const e of this._container.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this._postParticleUpdatePlugins)e.postParticleUpdate?.(i,t);this._updateParticleBucket(i)}}}class mi{container;pixelRatio;reduceFactor;constructor(t){this.container=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.container,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,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=q(s.gravity.maxSpeed)*i,a.moveDrift=q(s.drift)*i,a.moveSpeed=q(s.speed)*i,a.sizeAnimationSpeed=q(e.size.animation.speed)*i;const o=a.maxDistance;o.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,o.vertical=void 0===n.vertical?void 0:n.vertical*i}}function yi(t){return!t.destroyed}function vi(t,e,...i){const s=new Ce(t,e);return Oe(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;_delay;_delayTimeout;_delta={value:0,factor:0};_dispatchCallback;_drawAnimationFrame;_duration;_eventListeners;_firstStart;_initialSourceOptions;_lastFrameTime;_lifeTime;_onDestroy;_options;_paused;_pluginManager;_smooth;_sourceOptions;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this._pluginManager=s,this._dispatchCallback=i,this._onDestroy=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this._smooth=!1,this._delay=0,this._duration=0,this._lifeTime=0,this._firstStart=!0,this.started=!1,this.destroyed=!1,this._paused=!0,this._lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._sourceOptions=o,this._initialSourceOptions=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new mi(this),this.canvas=new ui(this._pluginManager,this),this.particles=new _i(this._pluginManager,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this._options=vi(this._pluginManager,this),this.actualOptions=vi(this._pluginManager,this),this._eventListeners=new di(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this._paused&&!this.pageHidden&&yi(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addLifeTime(t){this._lifeTime+=t}alive(){return!this._duration||this._lifeTime<=this._duration}destroy(e=!0){if(yi(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this._pluginManager.clearPlugins(this),this.destroyed=!0,this._onDestroy(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this._dispatchCallback(t,{container:this,data:e})}draw(t){if(!yi(this))return;let e=t;this._drawAnimationFrame=F(t=>{e&&(this._lastFrameTime=void 0,e=!1),this._nextFrame(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}Tt().error(`Export plugin with type ${t} not found`)}async init(){if(!yi(this))return;const e=new Map;for(const t of this._pluginManager.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this._options=vi(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=vi(this._pluginManager,this,this._options),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[t,i]of e)t.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:i,duration:s,fpsLimit:n,hdr:a,smooth:o,zLayers:l}=this.actualOptions;this.hdr=a,this.zLayers=l,this._duration=q(s)*r,this._delay=q(i)*r,this._lifeTime=0,this.fpsLimit=n>0?n:120,this._smooth=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(t.EventType.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(t.EventType.particlesSetup)}async initDrawersAndUpdaters(){const t=this._pluginManager;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){if(yi(this)&&(void 0!==this._drawAnimationFrame&&(B(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this._paused=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!yi(this))return;const i=this._paused||e;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this._firstStart=!1}async refresh(){if(yi(this))return this.stop(),this.start()}async reset(t){if(yi(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=vi(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=vi(this._pluginManager,this,this._options),this.refresh()}async start(){yi(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this._eventListeners.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this._delayTimeout=setTimeout(()=>{i()},this._delay)}))}stop(){if(yi(this)&&this.started){this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this._sourceOptions=this._options,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}_nextFrame=t=>{try{if(!this._smooth&&void 0!==this._lastFrameTime&&t<this._lastFrameTime+r/this.fpsLimit)return void this.draw(!1);if(this._lastFrameTime??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this._delta,t-this._lastFrameTime,this.fpsLimit,this._smooth),this.addLifeTime(this._delta.value),this._lastFrameTime=t,this._delta.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this._delta),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Tt().error("error in animation loop",t)}}}});t.AnimatableColor=Jt,t.AnimationOptions=jt,t.AnimationValueWithRandom=le,t.Background=Kt,t.BaseRange=Wt,t.Circle=Nt,t.ColorAnimation=Xt,t.Fill=se,t.FullScreen=te,t.HslAnimation=Yt,t.Move=pe,t.MoveAngle=ne,t.MoveCenter=ae,t.MoveGravity=oe,t.MovePath=he,t.Opacity=ge,t.OpacityAnimation=fe,t.Options=Ce,t.OptionsColor=Zt,t.OutModes=ue,t.Paint=me,t.ParticlesBounce=ve,t.ParticlesBounceFactor=ye,t.ParticlesDensity=Pe,t.ParticlesNumber=be,t.ParticlesNumberLimit=we,t.ParticlesOptions=Ie,t.RangedAnimationOptions=Gt,t.RangedAnimationValueWithRandom=ce,t.Rectangle=Qt,t.ResizeEvent=ee,t.Shape=xe,t.Size=ze,t.SizeAnimation=Me,t.Spin=de,t.Stroke=_e,t.ValueWithRandom=re,t.Vector=z,t.Vector3d=M,t.ZIndex=Se,t.alterHsl=ni,t.animate=F,t.areBoundsInside=gt,t.arrayRandomIndex=pt,t.calcExactPositionOrRandomFromSize=tt,t.calcExactPositionOrRandomFromSizeRanged=function(t){const e={x:void 0!==t.position?.x?q(t.position.x):void 0,y:void 0!==t.position?.y?q(t.position.y):void 0};return tt({size:t.size,position:e})},t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/a,y:t.position.y*t.size.height/a}:void 0},t.calcPositionOrRandomFromSize=K,t.calcPositionOrRandomFromSizeRanged=function(t){const e={x:void 0!==t.position?.x?q(t.position.x):void 0,y:void 0!==t.position?.y?q(t.position.y):void 0};return K({size:t.size,position:e})},t.calculateBounds=_t,t.cancelAnimation=B,t.canvasFirstIndex=0,t.canvasTag=g,t.checkDistance=G,t.circleBounce=function(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=Q(a,n);if(i*o+s*r<0)return;const l=-Math.atan2(r,o),c=t.mass,h=e.mass,u=t.velocity.rotate(l),d=e.velocity.rotate(l),p=J(u,d,c,h),f=J(d,u,c,h),g=p.rotate(-l),_=f.rotate(-l);t.velocity.x=g.x*t.factor.x,t.velocity.y=g.y*t.factor.y,e.velocity.x=_.x*e.factor.x,e.velocity.y=_.y*e.factor.y},t.circleBounceDataFromParticle=function(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:z.create(q(t.options.bounce.horizontal.value),q(t.options.bounce.vertical.value))}},t.clamp=U,t.clear=Te,t.cloneStyle=xt,t.collisionVelocity=J,t.colorMix=ti,t.colorToHsl=function(t,e,i,s=!0){const n=Ne(t,e,i,s);return n?je(n):void 0},t.colorToRgb=Ne,t.countOffset=1,t.decayOffset=1,t.deepExtend=mt,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=i,t.defaultDensityFactor=1,t.defaultFps=60,t.defaultFpsLimit=120,t.defaultLoops=0,t.defaultOpacity=1,t.defaultRatio=1,t.defaultReduceFactor=1,t.defaultRemoveQuantity=1,t.defaultRetryCount=0,t.defaultRgbMin=0,t.defaultTime=0,t.defaultTransform=c,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=X,t.deleteCount=1,t.double=2,t.doublePI=d,t.drawAfterEffect=Ae,t.drawBeforeEffect=Le,t.drawParticle=Ee,t.drawParticlePlugin=Ve,t.drawShape=Fe,t.drawShapeAfterDraw=Be,t.drawShapeBeforeDraw=Ue,t.empty=0,t.executeOnSingleOrMultiple=yt,t.findItemFromSingleOrMultiple=function(t,e){return C(t)?t.find((t,i)=>e(t,i)):e(t,0)?t:void 0},t.generatedAttribute=e,t.generatedFalse=f,t.generatedTrue=p,t.getDistance=function(t,e){return Math.sqrt(j(t,e))},t.getDistanceSq=j,t.getDistances=Q,t.getFullScreenStyle=Mt,t.getHslAnimationFromHsl=function(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:m},s:{enable:!1,value:t.s,min:0,max:y},l:{enable:!1,value:t.l,min:0,max:v}};return e&&(ii(s.h,e.h,i),ii(s.s,e.s,i),ii(s.l,e.l,i)),s},t.getHslFromAnimation=ei,t.getItemMapFromInitializer=It,t.getItemsFromInitializer=St,t.getLinkColor=function(t,e,i){if(i===h)return Ye();if(i!==u)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return ti(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return Xe(t)}}},t.getLinkRandomColor=function(t,e,i,s){const n=I(e)?e:e.value;return n===h?s?We(t,{value:n}):i?h:u:n===u?u:We(t,{value:n})},t.getLogger=Tt,t.getParticleBaseVelocity=Z,t.getParticleDirectionAngle=Y,t.getPosition=bt,t.getRandom=A,t.getRandomInRange=L,t.getRandomRgbColor=Ye,t.getRangeMax=W,t.getRangeMin=H,t.getRangeValue=q,t.getSize=function(t,e){return wt(t,e)},t.getStyleFromHsl=Ke,t.getStyleFromRgb=Ze,t.hMax=m,t.hMin=0,t.hPhase=60,t.half=o,t.hasMatchMedia=lt,t.hslToRgb=Xe,t.hslaToRgba=function(t){const e=Xe(t);return{a:t.a,b:e.b,g:e.g,r:e.r}},t.identity=1,t.initParticleNumericAnimationValue=Pt,t.inverseFactorNumerator=1,t.isArray=C,t.isBoolean=S,t.isFunction=function(t){return"function"==typeof t},t.isInArray=dt,t.isNull=k,t.isNumber=O,t.isObject=D,t.isPointInside=function(t,e,i,s,n){return gt(_t(t,s??0),e,i,n)},t.isString=I,t.itemFromArray=ft,t.itemFromSingleOrMultiple=vt,t.lFactor=1,t.lMax=v,t.lMin=0,t.lengthOffset=1,t.loadMinIndex=0,t.loadOptions=Oe,t.loadParticlesOptions=De,t.loadRandomFactor=1e4,t.manageListener=zt,t.memoize=rt,t.midColorValue=u,t.millisecondsToSeconds=r,t.minCount=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=V,t.none=0,t.one=1,t.originPoint=l,t.paintBase=ke,t.paintImage=Re,t.parseAlpha=function(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1},t.percentDenominator=a,t.phaseNumerator=1,t.quarter=P,t.randomColorValue=h,t.randomInRangeValue=$,t.rangeColorToHsl=Qe,t.rangeColorToRgb=We,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=_,t.rgbToHsl=je,t.sMax=y,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=ct,t.safeIntersectionObserver=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)},t.safeMatchMedia=ht,t.safeMutationObserver=ut,t.setAnimationFunctions=function(t,e){E.nextFrame=t,E.cancel=e},t.setLogger=function(t){t.debug&&(Rt.debug=kt(t.debug)),t.error&&(Rt.error=kt(t.error)),t.info&&(Rt.info=kt(t.info)),t.log&&(Rt.log=kt(t.log)),t.trace&&(Rt.trace=kt(t.trace)),t.verbose&&(Rt.verbose=kt(t.verbose)),t.warning&&(Rt.warning=kt(t.warning))},t.setRandom=function(t=Math.random){T=t},t.setRangeValue=N,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return He(t,e)?.a},t.stringToRgb=Ge,t.threeQuarter=w,t.triple=3,t.tryCountIncrement=1,t.tsParticles=ai,t.updateAnimation=function(e,i,s,n,a){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const o=(i.velocity??0)*a.factor,r=i.min,l=i.max,c=i.decay??1;if(i.time??=0,(i.delayTime??0)>0&&i.time<(i.delayTime??0)&&(i.time+=a.value),!((i.delayTime??0)>0&&i.time<(i.delayTime??0))){switch(i.status){case t.AnimationStatus.increasing:i.value+=o;break;case t.AnimationStatus.decreasing:i.value-=o}switch(i.velocity&&1!==c&&(i.velocity*=c),i.status){case t.AnimationStatus.increasing:i.value>=l&&(s?i.status=t.AnimationStatus.decreasing:i.value-=l,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(s?i.status=t.AnimationStatus.increasing:i.value+=l,i.loops??=0,i.loops++)}!function(e,i,s,n,a){switch(i){case t.DestroyType.max:s>=a&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,l),e.destroyed||(i.value=U(i.value,r,l))}},t.updateColor=function(t,e){if(!t)return;const{h:i,s:s,l:n}=t;si(i,!1,e),si(s,!0,e),si(n,!0,e)},t.updateColorValue=si,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{tsParticles:(globalThis.__tsParticlesInternals.engine||{}).tsParticles}),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.engine=t.__tsParticlesInternals.engine||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",a=100,o=.5,r=1e3,l={x:0,y:0,z:0},c={a:1,b:0,c:0,d:1},h="random",u="mid",d=2*Math.PI,p="true",f="false",g="canvas",m=255,y=360,v=100,P=100,w=.25,b=.75;var x;function M(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(x=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",x.bottomLeft="bottom-left",x.bottomRight="bottom-right",x.left="left",x.none="none",x.right="right",x.top="top",x.topLeft="top-left",x.topRight="top-right",x.outside="outside",x.inside="inside";class z{x;y;z;constructor(t=l.x,e=l.y,i=l.z){this.x=t,this.y=e,this.z=i}static get origin(){return z.create(l.x,l.y,l.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return z.create(t.x,t.y,M(t))}static create(t,e,i){return"number"==typeof t?new z(t,e??l.y,i??l.z):new z(t.x,t.y,M(t))}add(t){return z.create(this.x+t.x,this.y+t.y,this.z+M(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=M(t)}copy(){return z.clone(this)}div(t){return z.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**2+this.y**2}mult(t){return z.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return z.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),l.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=M(t)}sub(t){return z.create(this.x-t.x,this.y-t.y,this.z-M(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=M(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class S extends z{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return S.create(l.x,l.y)}static clone(t){return S.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new S(t,e??l.y):new S(t.x,t.y)}}function I(t){return"boolean"==typeof t}function O(t){return"string"==typeof t}function C(t){return"number"==typeof t}function D(t){return"object"==typeof t&&null!==t}function k(t){return Array.isArray(t)}function R(t){return null==t}const _=Math.PI/180;let T=Math.random;const E={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return U(T(),0,1-Number.EPSILON)}function L(t,e){return A()*(e-t)+t}function F(t){return E.nextFrame(t)}function B(t){E.cancel(t)}function U(t,e,i){return Math.min(Math.max(t,e),i)}function V(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function $(t){const e=W(t);let i=H(t);return e===i&&(i=0),L(i,e)}function q(t){return C(t)?t:$(t)}function H(t){return C(t)?t:t.min}function W(t){return C(t)?t:t.max}function N(t,e){if(t===e||void 0===e&&C(t))return t;const i=H(t),s=W(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:N(i,s)}function Q(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function j(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function G(t,e,i){return j(t,e)<=i*i}function X(t){return t*_}function Y(e,i,s){if(C(e))return X(e);switch(e){case t.MoveDirection.top:return-Math.PI*o;case t.MoveDirection.topRight:return-Math.PI*w;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*w;case t.MoveDirection.bottom:return Math.PI*o;case t.MoveDirection.bottomLeft:return Math.PI*b;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*b;case t.MoveDirection.inside:return Math.atan2(s.y-i.y,s.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-s.y,i.x-s.x);default:return A()*d}}function Z(t){const e=S.origin;return e.length=1,e.angle=t,e}function J(t,e,i,s){return S.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function K(t){return{x:(t.position?.x??A()*a)*t.size.width/a,y:(t.position?.y??A()*a)*t.size.height/a}}function tt(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}var et,it,st,nt,at,ot;t.AnimationMode=void 0,(et=t.AnimationMode||(t.AnimationMode={})).auto="auto",et.increase="increase",et.decrease="decrease",et.random="random",t.AnimationStatus=void 0,(it=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",it.decreasing="decreasing",t.DestroyType=void 0,(st=t.DestroyType||(t.DestroyType={})).none="none",st.max="max",st.min="min",t.OutModeDirection=void 0,(nt=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",nt.left="left",nt.right="right",nt.top="top",t.PixelMode=void 0,(at=t.PixelMode||(t.PixelMode={})).precise="precise",at.percent="percent",t.StartValueType=void 0,(ot=t.StartValueType||(t.StartValueType={})).max="max",ot.min="min",ot.random="random";function rt(t,e){const i=new Map,s=e?.maxSize,n=e?.ttlMs,a=e?.keyFn,o=(t,e=new WeakSet)=>{if(null===t)return"null";const i=typeof t;if("undefined"===i)return"undefined";if("number"===i||"boolean"===i||"string"===i)return JSON.stringify(t);if("function"===i)try{return t.toString()}catch{return'"[Function]"'}if("symbol"===i)try{return t.toString()}catch{return'"[Symbol]"'}if(Array.isArray(t))return`[${t.map(t=>o(t,e)).join(",")}]`;if(e.has(t))return'"[Circular]"';e.add(t);return`{${Object.keys(t).sort().map(i=>`${JSON.stringify(i)}:${o(t[i],e)}`).join(",")}}`},r=t=>a?a(t):(t=>o(t))(t);return(...e)=>{const a=r(e),o=Date.now(),l=i.get(a);if(void 0!==l){if(!(n&&o-l.ts>n))return i.delete(a),i.set(a,{value:l.value,ts:l.ts}),l.value;i.delete(a)}const c=t(...e);return i.set(a,{value:c,ts:o}),(()=>{if("number"==typeof s&&s>=0)for(;i.size>s;){const t=i.keys().next().value;if(void 0===t)break;i.delete(t)}})(),c}}function lt(){return"undefined"!=typeof matchMedia}function ct(){return globalThis.document}function ht(t){if(lt())return matchMedia(t)}function ut(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function dt(t,e){return t===e||k(e)&&e.includes(t)}function pt(t){return Math.floor(A()*t.length)}function ft(t,e,i=!0){return t[void 0!==e&&i?e%t.length:pt(t)]}function gt(e,i,s,n){let a=!0;return n&&n!==t.OutModeDirection.bottom||(a=e.top<i.height+s.x),!a||n&&n!==t.OutModeDirection.left||(a=e.right>s.x),!a||n&&n!==t.OutModeDirection.right||(a=e.left<i.width+s.y),!a||n&&n!==t.OutModeDirection.top||(a=e.bottom>s.y),a}function mt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function yt(t,...e){for(const i of e){if(R(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=>yt(void 0,t)):yt(e[n],a)}}return t}function vt(t,e){return k(t)?t.map((t,i)=>e(t,i)):e(t,0)}function Pt(t,e,i){return k(t)?ft(t,e,i):t}function wt(e,i){if(!(e.mode===t.PixelMode.percent)){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/a*i.width,y:e.y/a*i.height}:{width:e.width/a*i.width,height:e.height/a*i.height}}function bt(t,e){return wt(t,e)}function xt(t){const e=ct().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||R(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}const Mt=rt(function(t){const e=ct().createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0","pointer-events":"none"};for(const t in i){const s=i[t];void 0!==s&&e.setProperty(t,s)}return e});function zt(t,e,i,s,n){if(s){let s={passive:!0};I(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function St(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,n)),n}async function It(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 Ot{#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 Ct;t.EventType=void 0,(Ct=t.EventType||(t.EventType={})).configAdded="configAdded",Ct.containerInit="containerInit",Ct.particlesSetup="particlesSetup",Ct.containerStarted="containerStarted",Ct.containerStopped="containerStopped",Ct.containerDestroyed="containerDestroyed",Ct.containerPaused="containerPaused",Ct.containerPlay="containerPlay",Ct.containerBuilt="containerBuilt",Ct.particleAdded="particleAdded",Ct.particleDestroyed="particleDestroyed",Ct.particleRemoved="particleRemoved";class Dt{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#s.set(i,e),this.#n.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}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 It(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 It(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return St(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#a,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#a,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const kt=t=>(...e)=>{t(...e)},Rt={debug:kt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:kt(console.info),log:kt(console.log),trace:kt(console.trace),verbose:kt(console.log),warning:kt(console.warn)};function _t(){return Rt}const Tt="100%";class Et{pluginManager=new Dt(this);#h=[];#u=new Ot;#o=!1;get items(){return this.#h}get version(){return"4.1.1"}addEventListener(t,e){this.#u.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.#u.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return fi}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=Pt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(_t().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=Pt(r,a),{items:c}=this,h=c.findIndex(t=>t.id.description===n),u=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(u);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,u)}else c.push(u);const d="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=ct();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=Tt,s.style.height||=Tt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(g).item(0);n?(s=n,s.dataset[e]=f):(s=i.createElement(g),s.dataset[e]=p,t.appendChild(s)),s.style.width||=Tt,s.style.height||=Tt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=ct();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return u.canvas.loadCanvas(d),await u.start(),u}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#u.removeEventListener(t,e)}}var At,Lt,Ft,Bt,Ut,Vt,$t,qt;!function(t){t.circle="circle",t.rectangle="rectangle"}(At||(At={}));class Ht{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 Wt extends Ht{radius;constructor(t,e,i){super(t,e,At.circle),this.radius=i}contains(t){return G(t,this.position,this.radius)}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 Wt||t.type===At.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Nt||t.type===At.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(n-i,2)+Math.pow(a-o,2)<=s**2||n<=s+i&&a<=s+o||n<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Nt extends Ht{size;constructor(t,e,i,s){super(t,e,At.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 Wt)return t.intersects(this);if(!(t instanceof Nt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,o=a.width,r=a.height;return n.x<s.x+e&&n.x+o>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}t.RotateDirection=void 0,(Lt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Lt.counterClockwise="counter-clockwise",Lt.random="random",t.LimitMode=void 0,(Ft=t.LimitMode||(t.LimitMode={})).delete="delete",Ft.wait="wait",t.OutMode=void 0,(Bt=t.OutMode||(t.OutMode={})).bounce="bounce",Bt.none="none",Bt.out="out",Bt.destroy="destroy",Bt.split="split",t.AlterType=void 0,(Ut=t.AlterType||(t.AlterType={})).darken="darken",Ut.enlighten="enlighten",t.GradientType=void 0,(Vt=t.GradientType||(t.GradientType={})).linear="linear",Vt.radial="radial",Vt.random="random",t.ParticleOutType=void 0,($t=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",$t.inside="inside",$t.outside="outside",t.EasingType=void 0,(qt=t.EasingType||(t.EasingType={})).easeInBack="ease-in-back",qt.easeInBounce="ease-in-bounce",qt.easeInCirc="ease-in-circ",qt.easeInCubic="ease-in-cubic",qt.easeInElastic="ease-in-elastic",qt.easeInExpo="ease-in-expo",qt.easeInGaussian="ease-in-gaussian",qt.easeInLinear="ease-in-linear",qt.easeInQuad="ease-in-quad",qt.easeInQuart="ease-in-quart",qt.easeInQuint="ease-in-quint",qt.easeInSigmoid="ease-in-sigmoid",qt.easeInSine="ease-in-sine",qt.easeInSmoothstep="ease-in-smoothstep",qt.easeOutBack="ease-out-back",qt.easeOutBounce="ease-out-bounce",qt.easeOutCirc="ease-out-circ",qt.easeOutCubic="ease-out-cubic",qt.easeOutElastic="ease-out-elastic",qt.easeOutExpo="ease-out-expo",qt.easeOutGaussian="ease-out-gaussian",qt.easeOutLinear="ease-out-linear",qt.easeOutQuad="ease-out-quad",qt.easeOutQuart="ease-out-quart",qt.easeOutQuint="ease-out-quint",qt.easeOutSigmoid="ease-out-sigmoid",qt.easeOutSine="ease-out-sine",qt.easeOutSmoothstep="ease-out-smoothstep",qt.easeInOutBack="ease-in-out-back",qt.easeInOutBounce="ease-in-out-bounce",qt.easeInOutCirc="ease-in-out-circ",qt.easeInOutCubic="ease-in-out-cubic",qt.easeInOutElastic="ease-in-out-elastic",qt.easeInOutExpo="ease-in-out-expo",qt.easeInOutGaussian="ease-in-out-gaussian",qt.easeInOutLinear="ease-in-out-linear",qt.easeInOutQuad="ease-in-out-quad",qt.easeInOutQuart="ease-in-out-quart",qt.easeInOutQuint="ease-in-out-quint",qt.easeInOutSigmoid="ease-in-out-sigmoid",qt.easeInOutSine="ease-in-out-sine",qt.easeInOutSmoothstep="ease-in-out-smoothstep";class Qt{count;decay;delay;enable;speed;sync;constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){R(t)||(void 0!==t.count&&(this.count=N(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=N(t.speed)),void 0!==t.decay&&(this.decay=N(t.decay)),void 0!==t.delay&&(this.delay=N(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class jt extends Qt{mode;startValue;constructor(){super(),this.mode=t.AnimationMode.auto,this.startValue=t.StartValueType.random}load(t){super.load(t),R(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Gt extends Qt{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),R(t)||(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.offset&&(this.offset=N(t.offset)))}}class Xt{h=new Gt(0,y);l=new Gt(0,P);s=new Gt(0,v);load(t){R(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class Yt{value;constructor(){this.value=""}static create(t,e){const i=new Yt;return i.load(t),void 0!==e&&(O(e)||k(e)?i.load({value:e}):i.load(e)),i}load(t){R(t)||R(t.value)||(this.value=t.value)}}class Zt extends Yt{animation;constructor(){super(),this.animation=new Xt}static create(t,e){const i=new Zt;return i.load(t),void 0!==e&&(O(e)||k(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),R(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class Jt{color;image;opacity;position;repeat;size;constructor(){this.color=new Yt,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){R(t)||(void 0!==t.color&&(this.color=Yt.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Kt{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){R(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class te{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(t){R(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class ee{close;options;type;constructor(){this.close=!0,this.options={},this.type=[]}load(t){if(R(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=yt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class ie{color;enable;opacity;constructor(){this.enable=!0,this.opacity=1}load(t){R(t)||(void 0!==t.color&&(this.color=Zt.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=N(t.opacity)))}}class se{offset;value;constructor(){this.offset=0,this.value=90}load(t){R(t)||(void 0!==t.offset&&(this.offset=N(t.offset)),void 0!==t.value&&(this.value=N(t.value)))}}class ne{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=t.PixelMode.percent,this.radius=0}load(t){R(t)||(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class ae{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){R(t)||(void 0!==t.acceleration&&(this.acceleration=N(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=N(t.maxSpeed)))}}class oe{value;constructor(){this.value=0}load(t){R(t)||R(t.value)||(this.value=N(t.value))}}class re extends oe{animation=new Qt;load(t){if(super.load(t),R(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class le{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new oe,this.enable=!1,this.options={}}load(t){R(t)||(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=yt(this.options,t.options)))}}class ce{bottom;default;left;right;top;constructor(){this.default=t.OutMode.out}load(t){R(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 he{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){R(t)||(void 0!==t.acceleration&&(this.acceleration=N(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=yt({},t.position)))}}class ue{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new se,this.center=new ne,this.decay=0,this.distance={},this.direction=t.MoveDirection.none,this.drift=0,this.enable=!1,this.gravity=new ae,this.path=new le,this.outModes=new ce,this.random=!1,this.size=!1,this.speed=2,this.spin=new he,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(R(t))return;this.angle.load(C(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),void 0!==t.decay&&(this.decay=N(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=C(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=N(t.drift)),void 0!==t.enable&&(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),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=N(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class de{color;opacity;width;constructor(){this.width=0}load(t){R(t)||(void 0!==t.color&&(this.color=Zt.create(this.color,t.color)),void 0!==t.width&&(this.width=N(t.width)),void 0!==t.opacity&&(this.opacity=N(t.opacity)))}}class pe{color;fill;stroke;load(t){R(t)||(void 0!==t.color&&(this.color=Zt.create(this.color,t.color)),void 0!==t.fill&&(this.fill??=new ie,this.fill.load(t.fill)),void 0!==t.stroke&&(this.stroke??=new de,this.stroke.load(t.stroke)))}}class fe extends oe{constructor(){super(),this.value=1}}class ge{horizontal;vertical;constructor(){this.horizontal=new fe,this.vertical=new fe}load(t){R(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class me{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(R(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.width;void 0!==e&&(this.width=e);const i=t.height;void 0!==i&&(this.height=i)}}class ye{mode;value;constructor(){this.mode=t.LimitMode.delete,this.value=0}load(t){R(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class ve{density;limit;value;constructor(){this.density=new me,this.limit=new ye,this.value=0}load(t){R(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class Pe{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(R(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=yt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class we extends oe{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),R(t)||(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class be{bounce;effect;groups;move;number;paint;palette;reduceDuplicates;shape;zIndex;#d;#p;constructor(t,e){this.#p=t,this.#d=e,this.bounce=new ge,this.effect=new ee,this.groups={},this.move=new ue,this.number=new ve,this.paint=new pe,this.paint.color=new Zt,this.paint.color.value="#fff",this.paint.fill=new ie,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new Pe,this.zIndex=new we}load(t){if(R(t))return;if(t.palette&&(this.palette=t.palette,this.#f(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=yt(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&&(k(e)?this.paint=vt(e,t=>{const e=new pe;return e.load(t),e}):k(this.paint)?(this.paint=new pe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#d){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#d,this,t);const e=this.#p.updaters.get(this.#d);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=(k(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 xe(t,...e){for(const i of e)t.load(i)}function Me(t,e,...i){const s=new be(t,e);return xe(s,...i),s}class ze{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;#d;#p;constructor(t,e){this.#p=t,this.#d=e,this.autoPlay=!0,this.background=new Jt,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new Kt,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=Me(this.#p,this.#d),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new te,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(R(t))return;void 0!==t.preset&&(this.preset=t.preset,vt(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.clear&&(this.clear=t.clear),void 0!==t.key&&(this.key=t.key),void 0!==t.name&&(this.name=t.name),void 0!==t.delay&&(this.delay=N(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=N(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.hdr&&(this.hdr=t.hdr),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const s=t.fullScreen;I(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=yt(this.style,t.style),void 0!==t.smooth&&(this.smooth=t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#d,this,t)})}#f=t=>{const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})};#g=t=>{this.load(this.#p.getPreset(t))}}function Se(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(l.x,l.y,e.width,e.height)}function Ie(t,e,i,s){if(!i)return;const n=t.globalAlpha;t.globalAlpha=s,t.drawImage(i,l.x,l.y,e.width,e.height),t.globalAlpha=n}function Oe(t,e){t.clearRect(l.x,l.y,e.width,e.height)}function Ce(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,u=s.getPosition(),d=s.getTransformData(l),p={x:u.x,y:u.y};i.setTransform(d.a,d.b,d.c,d.d,u.x,u.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:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:f,stroke:g>0,transformData:d,position:{...u},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;ke(y,m),Te(v,m),Re(v,m),_e(v,m),De(y,m),i.resetTransform()}function De(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}function ke(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}function Re(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())}function _e(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}function Te(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}function Ee(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const Ae=new Map;function Le(t,e){let i=Ae.get(t);if(!i){if(i=e(),Ae.size>=1e3){[...Ae.keys()].slice(0,500).forEach(t=>Ae.delete(t))}Ae.set(t,i)}return i}function Fe(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Be(t,e,i,s=!0){if(!e)return;const n=O(e)?{value:e}:e;if(O(n.value))return Ue(t,n.value,i,s);if(k(n.value)){const e=ft(n.value,i,s);if(!e)return;return Be(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Ue(t,e,i,s=!0){if(!e)return;const n=O(e)?{value:e}:e;if(O(n.value))return n.value===h?We():qe(t,n.value);if(k(n.value)){const e=ft(n.value,i,s);if(!e)return;return Ue(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ve(t,e,i,s=!0){const n=Be(t,e,i,s);return n?$e(n):void 0}function $e(t){const e=t.r/m,i=t.g/m,s=t.b/m,n=Math.max(e,i,s),a=Math.min(e,i,s),r={h:0,l:(n+a)*o,s:0};return n!==a&&(r.s=r.l<o?(n-a)/(n+a):(n-a)/(2-n-a),r.h=e===n?(i-s)/(n-a):i===n?2+(s-e)/(n-a):4+(e-i)/(n-a)),r.l*=P,r.s*=v,r.h*=60,r.h<0&&(r.h+=y),r.h>=y&&(r.h-=y),r}function qe(t,e){return Fe(t,e)}function He(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(P,t.l)),n=e/y,a=i/v,r=s/P;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const l=(t,e,i)=>{if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t},c=r<o?r*(1+a):r+a-r*a,h=2*r-c,u=1/3,d=Math.min(m,m*l(h,c,n+u)),p=Math.min(m,m*l(h,c,n)),f=Math.min(m,m*l(h,c,n-u));return{r:Math.round(d),g:Math.round(p),b:Math.round(f)}}function We(t){const e=t??0,i=()=>Math.floor(L(e,256));return{b:i(),g:i(),r:i()}}function Ne(t,e,i){const s=i??1;return Le(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?Qe(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Qe(t,e){return`color(display-p3 ${(t.r/m).toString()} ${(t.g/m).toString()} ${(t.b/m).toString()} / ${(e??1).toString()})`}function je(t,e,i){const s=i??1;return Le(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e){return Qe(He(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function Ge(t,e,i,s){let n=t,a=e;return"r"in n||(n=He(t)),"r"in a||(a=He(e)),{b:V(n.b,a.b,i,s),g:V(n.g,a.g,i,s),r:V(n.r,a.r,i,s)}}function Xe(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Ye(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=q(i.speed)/a*s,e.decay=1-q(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=q(i.count),e.time=0,e.delayTime=q(i.delay)*r,i.sync||(e.velocity*=A(),e.value*=A()),e.initialValue=e.value,e.offset=N(i.offset)):e.velocity=0}function Ze(e,i,s){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const n=e.offset?$(e.offset):0,a=(e.velocity??0)*s.factor+3.6*n,o=e.decay??1,r=e.max,l=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=a,e.value<l&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=a,e.value>r&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=r)),e.velocity&&1!==o&&(e.velocity*=o),e.value=U(e.value,l,r)}function Je(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const Ke=new Et,ti=globalThis;ti.__tsParticlesInternals=ti.__tsParticlesInternals??{},ti.tsParticles=Ke;function ei(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class ii{#m;#y;#v;#P;#w;#d;#b;#x;#M;#z;#S;#I;#O;#C;#p;#D;#k;#R={};#_=[void 0,void 0];#T={};constructor(t,e,i){this.#p=t,this.#d=e,this.#y=i,this.#b=null,this.#k=[],this.#D=[],this.#w=[],this.#m=[],this.#v=[],this.#P=[],this.#M=[],this.#z=[],this.#S=[],this.#I=[],this.#C=[],this.#O=[]}get settings(){return this.#x}canvasClear(){this.#d.actualOptions.clear&&this.draw(t=>{Oe(t,this.#y.size)})}clear(){let t=!1;for(const e of this.#m)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this.#k=[],this.#D=[],this.#w=[],this.#m=[],this.#v=[],this.#P=[],this.#M=[],this.#z=[],this.#S=[],this.#I=[],this.#C=[],this.#O=[]}draw(t){const e=this.#b;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[a,o]=this.#E(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#d,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:u,strokeOpacity:d}=t.getOpacity(),p=this.#T,f=this.#R,g=a?je(a,r.hdr,h*u):void 0,m=o?je(o,r.hdr,d*u):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.#S)i.drawParticleSetup?.(s,t,e);this.#A(s,t,i,u,f,p),Ce({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:u,transform:p}),this.#L(t);for(const i of this.#z)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#M)Ee(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#d;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#C)e.drawSettingsSetup?.(i,t);for(const e of this.#I)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#P)e.clearDraw?.(i,t);for(const e of this.#O)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#w=[],this.#m=[],this.#v=[],this.#P=[],this.#M=[],this.#S=[],this.#z=[],this.#I=[],this.#C=[],this.#O=[];for(const t of this.#d.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#w.push(t),t.canvasClear&&this.#m.push(t),t.canvasPaint&&this.#v.push(t),t.drawParticle&&this.#M.push(t),t.drawParticleSetup&&this.#S.push(t),t.drawParticleCleanup&&this.#z.push(t),t.draw&&this.#I.push(t),t.drawSettingsSetup&&this.#C.push(t),t.drawSettingsCleanup&&this.#O.push(t),t.clearDraw&&this.#P.push(t)}initUpdaters(){this.#k=[],this.#D=[];for(const t of this.#d.particleUpdaters)t.afterDraw&&this.#D.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#k.push(t)}paint(){let t=!1;for(const e of this.#v)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{Se(e,this.#y.size,t)})}paintImage(t,e){this.draw(i=>{Ie(i,this.#y.size,t,e)})}setContext(t){this.#b=t,this.#b&&(this.#b.globalCompositeOperation=i)}setContextSettings(t){this.#x=t}stop(){this.draw(t=>{Oe(t,this.#y.size)})}#L=t=>{for(const e of this.#D)e.afterDraw?.(t)};#A=(t,e,i,s,n,a)=>{for(const o of this.#k){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,s);a&&(n.fill=a),r&&(n.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)ei(a,t,e)}o.beforeDraw?.(e)}};#E=t=>{let e,i;for(const s of this.#w)if(!e&&s.particleFillColor&&(e=Ve(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ve(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#_[0]=e,this.#_[1]=i,this.#_}}const si=new WeakMap;function ni(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 ai{domElement;render;renderCanvas;size;zoom=1;#d;#F;#B;#U;#p;#V;#$;#q;#H;constructor(t,e){this.#p=t,this.#d=e,this.render=new ii(t,e,this),this.#q={height:0,width:0};const i=e.retina.pixelRatio,s=this.#q;this.size={height:s.height*i,width:s.width*i},this.#F=!1,this.#$=[],this.#V="none"}get#W(){return this.#d.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#F){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#N();this.render.destroy(),this.#$=[]}getZoomCenter(){const t=this.#d.retina.pixelRatio,{width:e,height:i}=this.size;return this.#H?this.#H:{x:e*o/t,y:i*o/t}}init(){this.#Q(t=>{t.disconnect()}),this.#B=ut(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#j()}),this.resize(),this.#G(),this.initBackground(),this.#Q(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.render.init()}initBackground(){const t=this.#d,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Be(this.#p,e.color);s.backgroundColor=n?Ne(n,t.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#$=[];for(const t of this.#d.plugins)t.resize&&this.#$.push(t)}loadCanvas(t){this.#F&&this.domElement&&this.domElement.remove();const i=this.#d,s=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=s,this.#F=!!s&&"true"===s.dataset[e],this.renderCanvas=s?(t=>{const e=si.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 si.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(s):t;const n=this.domElement;n&&(n.ariaHidden="true",this.#U=xt(n.style));const a=this.#q,o=this.renderCanvas;n?(a.height=n.offsetHeight,a.width=n.offsetWidth):(a.height=o.height,a.width=o.width);const r=this.#d.retina.pixelRatio,l=this.size;o.height=l.height=a.height*r,o.width=l.width=a.width*r;const c=ht("(color-gamut: p3)");this.render.setContextSettings({alpha:!0,colorSpace:c?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this.render.setContext(o.getContext("2d",this.render.settings)),this.#Q(t=>{t.disconnect()}),i.retina.init(),this.initBackground(),this.#Q(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})})}resize(){const t=this.domElement;if(!t)return!1;const e=this.#d,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#q,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=o.width,i.height=l.height=o.height,this.#d.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#V=t,this.#j())}setZoom(t,e){this.zoom=t,this.#H=e}stop(){this.#Q(t=>{t.disconnect()}),this.#B=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#d,e=t.updateActualOptions();t.particles.setDensity(),this.#X(),e&&await t.refresh()}#X=()=>{for(const t of this.#$)t.resize?.()};#G=()=>{const t=this.domElement,e=this.#d.actualOptions;if(t){this.#W?this.#Y():this.#N();for(const i in e.style){if(!i||!(i in e.style))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}};#j=()=>{const t=this.domElement;if(!t)return;this.#Q(t=>{t.disconnect()}),this.#G(),this.initBackground();const e=this.#V;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#Q(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})};#N=()=>{const t=this.domElement,e=this.#U;t&&e&&ni(t,e,!0)};#Q=t=>{this.#B&&t(this.#B)};#Y=()=>{const t=this.domElement;t&&ni(t,Mt(this.#d.actualOptions.fullScreen.zIndex),!0)}}class oi{#d;#Z;#J;#K;constructor(t){this.#d=t,this.#Z={visibilityChange:()=>{this.#tt()},resize:()=>{this.#et()}}}addListeners(){this.#it(!0)}removeListeners(){this.#it(!1)}#tt=()=>{const t=this.#d;t.actualOptions.pauseOnBlur&&(ct().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))};#et=()=>{this.#K&&(clearTimeout(this.#K),this.#K=void 0);const t=async()=>{const t=this.#d.canvas;await t.windowResize()};this.#K=setTimeout(()=>{t()},this.#d.actualOptions.resize.delay*r)};#it=t=>{const e=this.#Z;this.#st(t),zt(document,n,e.visibilityChange,t,!1)};#st=t=>{const e=this.#Z,i=this.#d;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void zt(globalThis,s,e.resize,t);const n=i.canvas.domElement;this.#J&&!t?(n&&this.#J.unobserve(n),this.#J.disconnect(),this.#J=void 0):!this.#J&&t&&n&&(this.#J=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this.#et()}),this.#J.observe(n))}}function ri(t){if(!dt(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}class li{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;#nt={fillOpacity:1,opacity:1,strokeOpacity:1};#at=z.origin;#ot={sin:0,cos:0};#rt={a:1,b:0,c:0,d:1};#d;#p;constructor(t,e){this.#p=t,this.#d=e}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const i=this.#d,s=this.shape?i.shapeDrawers.get(this.shape):void 0;s?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this.#d.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#d.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#lt(this.bubble.color??Xe(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*o}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??q(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this.#nt.fillOpacity=i*s*e,this.#nt.opacity=i*e,this.#nt.strokeOpacity=i*n*e,this.#nt}getPosition(){return this.#at.x=this.position.x+this.offset.x,this.#at.y=this.position.y+this.offset.y,this.#at.z=this.position.z,this.#at}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#ot.sin=Math.sin(t),this.#ot.cos=Math.cos(t),this.#ot}getStrokeColor(){return this.#lt(this.bubble.color??Xe(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#rt.a=e.cos*(t.a??c.a),this.#rt.b=i?e.sin*(t.b??1):t.b??c.b,this.#rt.c=i?-e.sin*(t.c??1):t.c??c.c,this.#rt.d=e.cos*(t.d??c.d),this.#rt}init(e,i,s,n){const a=this.#d;this.id=e,this.group=n,this.justWarped=!1,this.effectClose=!0,this.shapeClose=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},this.size={value:1,max:1,min:1,enable:!1},this.outType=t.ParticleOutType.normal,this.ignoresResizeRatio=!0;const o=a.actualOptions,r=Me(this.#p,a,o.particles),l=r.reduceDuplicates,c=r.effect.type,u=r.shape.type;this.effect=Pt(c,this.id,l),this.shape=Pt(u,this.id,l);const d=r.effect,p=r.shape;if(s){if(s.effect?.type&&s.effect.type!==this.effect){const t=Pt(s.effect.type,this.id,l);t&&(this.effect=t,d.load(s.effect))}if(s.shape?.type&&s.shape.type!==this.shape){const t=Pt(s.shape.type,this.id,l);t&&(this.shape=t,p.load(s.shape))}}if(this.effect===h){const t=[...this.#d.effectDrawers.keys()];this.effect=t[Math.floor(A()*t.length)]}if(this.shape===h){const t=[...this.#d.shapeDrawers.keys()];this.shape=t[Math.floor(A()*t.length)]}this.effectData=this.effect?function(t,e,i,s){const n=e.options[t];return yt({close:e.close},Pt(n,i,s))}(this.effect,d,this.id,l):void 0,this.shapeData=this.shape?function(t,e,i,s){const n=e.options[t];return yt({close:e.close},Pt(n,i,s))}(this.shape,p,this.id,l):void 0,r.load(s);const f=this.effectData,g=this.shapeData;f&&r.load(f.particles),g&&r.load(g.particles),this.effectClose=f?.close??r.effect.close,this.shapeClose=g?.close??r.shape.close,this.options=r,a.retina.initParticle(this);for(const t of a.particleUpdaters)t.preInit?.(this);let m,y;this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#ct(i),this.initialVelocity=this.#ht(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,this.effect&&(m=a.effectDrawers.get(this.effect)),m?.loadEffect&&m.loadEffect(this),this.shape&&(y=a.shapeDrawers.get(this.shape)),y?.loadShape&&y.loadShape(this);const v=y?.getSidesCount;v&&(this.sides=v(this)),this.spawning=!1;for(const t of a.particleUpdaters)t.init(this);m?.particleInit?.(a,this),y?.particleInit?.(a,this);for(const t of a.particleCreatedPlugins)t.particleCreated?.(this)}isInsideCanvas(t){return this.#ut({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#ut({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=t%d,i=e<0?e+d:e;return i>=Math.PI*o&&i<3*Math.PI*o}if(this.roll.horizontal){const e=(t+Math.PI*o)%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}if(this.roll.vertical){const e=t%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.#d.particleUpdaters)t.reset?.(this)}#dt=(t,e)=>{let i=0,s=t?z.create(t.x,t.y,e):void 0;const n=this.#d,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size,c=new AbortController,{signal:h}=c;for(;!h.aborted;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return z.create(i.x,i.y,e)}const t=tt({size:l,position:s}),c=z.create(t.x,t.y,e);this.#pt(c,r,o.left??o.default),this.#pt(c,r,o.right??o.default),this.#ft(c,r,o.top??o.default),this.#ft(c,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}return s};#ht=()=>{const e=this.options.move,i=Z(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=X(q(e.angle.value)),n=X(q(e.angle.offset)),a={left:n-s*o,right:n+s*o};return e.straight||(i.angle+=$(N(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=A()),i};#pt=(e,i,s)=>{ri({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#d.canvas.size.width,setCb:t=>e.x+=t,radius:i})};#ft=(e,i,s)=>{ri({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#d.canvas.size.height,setCb:t=>e.y+=t,radius:i})};#gt=(e,i)=>{const s=this.getRadius(),n=this.#d.canvas.size,a=this.position,o=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:o?a.y+s<n.height:a.y-s<n.height,reason:"default"}:e===t.OutModeDirection.left?{inside:o?a.x-s>0:a.x+s>0,reason:"default"}:e===t.OutModeDirection.right?{inside:o?a.x+s<n.width:a.x-s<n.width,reason:"default"}:e===t.OutModeDirection.top?{inside:o?a.y-s>0:a.y+s>0,reason:"default"}:{inside:a.x>=-s&&a.y>=-s&&a.y<=n.height+s&&a.x<=n.width+s,reason:"default"}};#mt=(t,e)=>({canvasSize:this.#d.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()});#ut=t=>{const e=this.#gt(t.direction,t.outMode),i=this.#d,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#mt(t.direction,t.outMode),l=a?this.#yt(a(r),"shape"):void 0,c=o?this.#yt(o(r),"effect"):void 0;if(l&&c){const t=Math.max(l.margin??0,c.margin??0);return{inside:l.inside&&c.inside,margin:t>0?t:void 0,reason:"combined"}}return l??c??e};#lt=t=>t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?Je(t,this.roll.alter.type,this.roll.alter.value):t:t;#ct=e=>{const i=this.#d,s=Math.floor(q(this.options.zIndex.value)),n=this.#dt(e,U(s,0,i.zLayers));if(!n)throw new Error("a valid position cannot be found for particle");this.position=n,this.initialPosition=this.position.copy();const a=i.canvas.size;switch(this.moveCenter={...bt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=Y(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case t.MoveDirection.inside:this.outType=t.ParticleOutType.inside;break;case t.MoveDirection.outside:this.outType=t.ParticleOutType.outside}this.offset=S.origin};#yt=(t,e)=>"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}class ci{#vt;#Pt=new Map;#wt=[];#bt;#xt;#Mt=[];#zt;constructor(t){this.#vt=t,this.#bt=0,this.#zt=0}clear(){this.#Pt.clear();const t=this.#xt;t&&(this.#vt=t),this.#xt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#St(e,i);this.#Pt.has(s)||this.#Pt.set(s,[]),this.#Pt.get(s)?.push(t)}query(t,e,i=[]){const s=this.#It(t);if(!s)return i;const n=Math.floor(s.minX/this.#vt),a=Math.floor(s.maxX/this.#vt),o=Math.floor(s.minY/this.#vt),r=Math.floor(s.maxY/this.#vt);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#Pt.get(a);if(o)for(const s of o)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this.#Ot(t.x,t.y,e),a=this.query(n,i,s);return this.#Ct(),a}queryRectangle(t,e,i,s=[]){const n=this.#Dt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Ct(),a}setCellSize(t){this.#xt=t}#Ot(t,e,i){return(this.#wt[this.#bt++]??=new Wt(t,e,i)).reset(t,e,i)}#Dt(t,e,i,s){return(this.#Mt[this.#zt++]??=new Nt(t,e,i,s)).reset(t,e,i,s)}#St(t,e){return`${Math.floor(t/this.#vt)}_${Math.floor(e/this.#vt)}`}#It(t){if(t instanceof Wt){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 Nt){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}#Ct(){this.#bt=0,this.#zt=0}}class hi{checkParticlePositionPlugins;grid;#kt;#d;#Rt;#_t;#Tt;#Et;#At;#Lt;#p;#Ft;#Bt;#Ut;#Vt;#$t;#qt;constructor(t,e){this.#p=t,this.#d=e,this.#Tt=0,this.#kt=[],this.#Ft=[],this.#_t=0,this.#Rt=new Map,this.#Et=new Map,this.#qt=this.#Ht(this.#d.zLayers),this.grid=new ci(100),this.checkParticlePositionPlugins=[],this.#At=[],this.#Lt=[],this.#Ut=[],this.#Bt=[],this.#$t=[]}get count(){return this.#kt.length}addParticle(e,i,s,n){const a=this.#d.actualOptions.particles.number.limit.mode,o=void 0===s?this.#_t:this.#Rt.get(s)??this.#_t,r=this.count;if(o>0)switch(a){case t.LimitMode.delete:{const t=r+1-o;t>0&&this.removeQuantity(t);break}case t.LimitMode.wait:if(r>=o)return}try{const a=this.#Ft.pop()??new li(this.#p,this.#d);a.init(this.#Tt,e,i,s);let o=!0;return n&&(o=n(a)),o?(this.#kt.push(a),this.#Wt(a),this.#Tt++,this.#d.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this.#Ft.push(a)}catch(t){_t().warning(`error adding particle: ${t}`)}}clear(){this.#kt=[],this.#Et.clear(),this.#Nt(this.#d.zLayers)}destroy(){this.#kt=[],this.#Ft.length=0,this.#Et.clear(),this.#qt=[],this.checkParticlePositionPlugins=[],this.#At=[],this.#Lt=[],this.#Ut=[],this.#Bt=[],this.#$t=[]}drawParticles(t){for(let e=this.#qt.length-1;e>=0;e--){const i=this.#qt[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#kt.filter(t)}find(t){return this.#kt.find(t)}get(t){return this.#kt[t]}async init(){const t=this.#d,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#$t=[],this.#Lt=[],this.#Ut=[],this.#At=[],this.#Bt=[],this.#Et.clear(),this.#Nt(t.zLayers),this.grid=new ci(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#$t.push(e),e.particleUpdate&&this.#Lt.push(e),e.postUpdate&&this.#Ut.push(e),e.particleReset&&this.#At.push(e),e.postParticleUpdate&&this.#Bt.push(e);await this.#d.initDrawersAndUpdaters();for(const e of this.#d.effectDrawers.values())await(e.init?.(t));for(const e of this.#d.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.#d.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#kt.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.#Qt(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#d.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#d.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Me(this.#p,this.#d,s);this.#jt(n,i,t)}this.#jt(t.particles,i)}setResizeFactor(t){this.#Vt=t}update(t){this.grid.clear();for(const e of this.#$t)e.update?.(t);const e=this.#Gt(t);for(const e of this.#Ut)e.postUpdate?.(t);if(this.#Xt(t,e),e.size)for(const t of e)this.remove(t);this.#Vt=void 0}#Yt=(...t)=>{this.#Ft.push(...t)};#jt=(t,e,i,s)=>{const n=t.number;if(!n.density.enable)return void(void 0===i?this.#_t=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Rt.set(i,s?.number.limit.value??n.limit.value));const a=this.#Zt(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,l=Math.min(o,r)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#_t=n.limit.value*a:this.#Rt.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)};#Ht=t=>{const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])};#Jt=t=>{const e=this.#qt.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)};#Kt=(t,e)=>{let i=0,s=t.length;for(;i<s;){const n=Math.floor((i+s)/2),a=t[n];a?a.id<e?i=n+1:s=n:s=n}return i};#Zt=t=>{const e=this.#d;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};#Wt=t=>{const e=this.#Jt(t.position.z),i=this.#qt[e];i&&(i.splice(this.#Kt(i,t.id),0,t),this.#Et.set(t.id,e))};#Qt=(e,i,s)=>{const n=this.#kt[e];return!!n&&(n.group===i&&(this.#kt.splice(e,1),this.#te(n),n.destroy(s),this.#d.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this.#Yt(n),!0))};#te=t=>{const e=this.#Et.get(t.id)??this.#Jt(t.position.z),i=this.#qt[e];if(!i)return void this.#Et.delete(t.id);const s=this.#Kt(i,t.id);i[s]?.id===t.id?(i.splice(s,1),this.#Et.delete(t.id)):this.#Et.delete(t.id)};#Nt=t=>{const e=Math.max(Math.floor(t),1);if(this.#qt.length===e)for(const t of this.#qt)t.length=0;else this.#qt=this.#Ht(e)};#ee=t=>{const e=this.#Jt(t.position.z),i=this.#Et.get(t.id);if(void 0===i)return void this.#Wt(t);if(i===e)return;const s=this.#qt[i];if(s){const e=this.#Kt(s,t.id);s[e]?.id===t.id&&s.splice(e,1)}const n=this.#qt[e];n?(n.splice(this.#Kt(n,t.id),0,t),this.#Et.set(t.id,e)):this.#Et.set(t.id,e)};#Gt=t=>{const e=new Set,i=this.#Vt;for(const s of this.#kt){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.#At)t.particleReset?.(s);for(const e of this.#Lt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e};#Xt=(t,e)=>{for(const i of this.#kt)if(i.destroyed)e.add(i);else{for(const e of this.#d.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#Bt)e.postParticleUpdate?.(i,t);this.#ee(i)}}}class ui{pixelRatio;reduceFactor;#d;constructor(t){this.#d=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#d,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=q(s.gravity.maxSpeed)*i,a.moveDrift=q(s.drift)*i,a.moveSpeed=q(s.speed)*i;const o=a.maxDistance;o.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,o.vertical=void 0===n.vertical?void 0:n.vertical*i}}function di(t){return!t.destroyed}function pi(t,e,...i){const s=new ze(t,e);return xe(s,...i),s}var fi=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#ie;#se;#ne={value:0,factor:0};#ae;#oe;#re;#le;#ce;#he;#ue;#de;#pe;#fe;#ge;#p;#me;#ye;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this.#p=s,this.#ae=i,this.#pe=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.#me=!1,this.#ie=0,this.#re=0,this.#de=0,this.#ce=!0,this.started=!1,this.destroyed=!1,this.#ge=!0,this.#ue=0,this.zLayers=100,this.pageHidden=!1,this.#ye=o,this.#he=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new ui(this),this.canvas=new ai(this.#p,this),this.particles=new hi(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#fe=pi(this.#p,this),this.actualOptions=pi(this.#p,this),this.#le=new oi(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#ge&&!this.pageHidden&&di(this)}get options(){return this.#fe}get sourceOptions(){return this.#ye}addLifeTime(t){this.#de+=t}alive(){return!this.#re||this.#de<=this.#re}destroy(e=!0){if(di(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.#pe(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#ae(t,{container:this,data:e})}draw(t){if(!di(this))return;let e=t;this.#oe=F(t=>{e&&(this.#ue=void 0,e=!1),this.#ve(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}_t().error(`Export plugin with type ${t} not found`)}async init(){if(!di(this))return;const e=new Map;for(const t of this.#p.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this.#fe=pi(this.#p,this,this.#he,this.sourceOptions),this.actualOptions=pi(this.#p,this,this.#fe),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[t,i]of e)t.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:i,duration:s,fpsLimit:n,hdr:a,smooth:o,zLayers:l}=this.actualOptions;this.hdr=a,this.zLayers=l,this.#re=q(s)*r,this.#ie=q(i)*r,this.#de=0,this.fpsLimit=n>0?n:120,this.#me=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(t.EventType.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(t.EventType.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(){if(di(this)&&(void 0!==this.#oe&&(B(this.#oe),this.#oe=void 0),!this.#ge)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#ge=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!di(this))return;const i=this.#ge||e;if(!this.#ce||this.actualOptions.autoPlay){if(this.#ge&&(this.#ge=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#ce=!1}async refresh(){if(di(this))return this.stop(),this.start()}async reset(t){if(di(this))return this.#he=t,this.#ye=t,this.#fe=pi(this.#p,this,this.#he,this.sourceOptions),this.actualOptions=pi(this.#p,this,this.#fe),this.refresh()}async start(){di(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#le.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#se=setTimeout(()=>{i()},this.#ie)}))}stop(){if(di(this)&&this.started){this.#se&&(clearTimeout(this.#se),this.#se=void 0),this.#ce=!0,this.started=!1,this.#le.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.#ye=this.#fe,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#ve=t=>{try{if(!this.#me&&void 0!==this.#ue&&t<this.#ue+r/this.fpsLimit)return void this.draw(!1);if(this.#ue??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this.#ne,t-this.#ue,this.fpsLimit,this.#me),this.addLifeTime(this.#ne.value),this.#ue=t,this.#ne.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#ne),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){_t().error("error in animation loop",t)}}}});t.AnimatableColor=Zt,t.AnimationOptions=Qt,t.AnimationValueWithRandom=re,t.Background=Jt,t.BaseRange=Ht,t.Circle=Wt,t.ColorAnimation=Gt,t.Fill=ie,t.FullScreen=Kt,t.HslAnimation=Xt,t.Move=ue,t.MoveAngle=se,t.MoveCenter=ne,t.MoveGravity=ae,t.MovePath=le,t.Options=ze,t.OptionsColor=Yt,t.OutModes=ce,t.Paint=pe,t.ParticlesBounce=ge,t.ParticlesBounceFactor=fe,t.ParticlesDensity=me,t.ParticlesNumber=ve,t.ParticlesNumberLimit=ye,t.ParticlesOptions=be,t.RangedAnimationOptions=jt,t.RangedAnimationValueWithRandom=class extends re{animation;constructor(){super(),this.animation=new jt}load(t){super.load(t)}},t.Rectangle=Nt,t.ResizeEvent=te,t.Shape=Pe,t.Spin=he,t.Stroke=de,t.ValueWithRandom=oe,t.Vector=S,t.Vector3d=z,t.ZIndex=we,t.alterHsl=Je,t.animate=F,t.areBoundsInside=gt,t.arrayRandomIndex=pt,t.calcExactPositionOrRandomFromSize=tt,t.calcExactPositionOrRandomFromSizeRanged=function(t){const e={x:void 0!==t.position?.x?q(t.position.x):void 0,y:void 0!==t.position?.y?q(t.position.y):void 0};return tt({size:t.size,position:e})},t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/a,y:t.position.y*t.size.height/a}:void 0},t.calcPositionOrRandomFromSize=K,t.calcPositionOrRandomFromSizeRanged=function(t){const e={x:void 0!==t.position?.x?q(t.position.x):void 0,y:void 0!==t.position?.y?q(t.position.y):void 0};return K({size:t.size,position:e})},t.calculateBounds=mt,t.cancelAnimation=B,t.canvasFirstIndex=0,t.canvasTag=g,t.checkDistance=G,t.circleBounce=function(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=Q(a,n);if(i*o+s*r<0)return;const l=-Math.atan2(r,o),c=t.mass,h=e.mass,u=t.velocity.rotate(l),d=e.velocity.rotate(l),p=J(u,d,c,h),f=J(d,u,c,h),g=p.rotate(-l),m=f.rotate(-l);t.velocity.x=g.x*t.factor.x,t.velocity.y=g.y*t.factor.y,e.velocity.x=m.x*e.factor.x,e.velocity.y=m.y*e.factor.y},t.circleBounceDataFromParticle=function(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:S.create(q(t.options.bounce.horizontal.value),q(t.options.bounce.vertical.value))}},t.clamp=U,t.clear=Oe,t.cloneStyle=xt,t.collisionVelocity=J,t.colorMix=Ge,t.colorToHsl=function(t,e,i,s=!0){const n=Ue(t,e,i,s);return n?$e(n):void 0},t.colorToRgb=Ue,t.countOffset=1,t.decayOffset=1,t.deepExtend=yt,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=i,t.defaultDensityFactor=1,t.defaultFps=60,t.defaultFpsLimit=120,t.defaultLoops=0,t.defaultOpacity=1,t.defaultRatio=1,t.defaultReduceFactor=1,t.defaultRemoveQuantity=1,t.defaultRetryCount=0,t.defaultRgbMin=0,t.defaultTime=0,t.defaultTransform=c,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=X,t.deleteCount=1,t.double=2,t.doublePI=d,t.drawAfterEffect=De,t.drawBeforeEffect=ke,t.drawParticle=Ce,t.drawParticlePlugin=Ee,t.drawShape=Re,t.drawShapeAfterDraw=_e,t.drawShapeBeforeDraw=Te,t.empty=0,t.executeOnSingleOrMultiple=vt,t.findItemFromSingleOrMultiple=function(t,e){return k(t)?t.find((t,i)=>e(t,i)):e(t,0)?t:void 0},t.generatedAttribute=e,t.generatedFalse=f,t.generatedTrue=p,t.getDistance=function(t,e){return Math.sqrt(j(t,e))},t.getDistanceSq=j,t.getDistances=Q,t.getFullScreenStyle=Mt,t.getHslAnimationFromHsl=function(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:y},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:P}};return e&&(Ye(s.h,e.h,i),Ye(s.s,e.s,i),Ye(s.l,e.l,i)),s},t.getHslFromAnimation=Xe,t.getItemMapFromInitializer=It,t.getItemsFromInitializer=St,t.getLinkColor=function(t,e,i){if(i===h)return We();if(i!==u)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return Ge(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return He(t)}}},t.getLinkRandomColor=function(t,e,i,s){const n=O(e)?e:e.value;return n===h?s?Be(t,{value:n}):i?h:u:n===u?u:Be(t,{value:n})},t.getLogger=_t,t.getParticleBaseVelocity=Z,t.getParticleDirectionAngle=Y,t.getPosition=bt,t.getRandom=A,t.getRandomInRange=L,t.getRandomRgbColor=We,t.getRangeMax=W,t.getRangeMin=H,t.getRangeValue=q,t.getSize=function(t,e){return wt(t,e)},t.getStyleFromHsl=je,t.getStyleFromRgb=Ne,t.hMax=y,t.hMin=0,t.hPhase=60,t.half=o,t.hasMatchMedia=lt,t.hslToRgb=He,t.hslaToRgba=function(t){const e=He(t);return{a:t.a,b:e.b,g:e.g,r:e.r}},t.identity=1,t.initParticleNumericAnimationValue=function(e,i){const s=e.value,n=e.animation,a={delayTime:q(n.delay)*r,enable:n.enable,value:q(e.value)*i,max:W(s)*i,min:H(s)*i,loops:0,maxLoops:q(n.count),time:0};if(n.enable){switch(a.decay=1-q(n.decay),n.mode){case t.AnimationMode.increase:a.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:a.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:a.value=a.min,e&&(a.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:a.value=a.max,e&&(a.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:a.value=$(a),e&&(a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a},t.inverseFactorNumerator=1,t.isArray=k,t.isBoolean=I,t.isFunction=function(t){return"function"==typeof t},t.isInArray=dt,t.isNull=R,t.isNumber=C,t.isObject=D,t.isPointInside=function(t,e,i,s,n){return gt(mt(t,s??0),e,i,n)},t.isString=O,t.itemFromArray=ft,t.itemFromSingleOrMultiple=Pt,t.lFactor=1,t.lMax=P,t.lMin=0,t.lengthOffset=1,t.loadMinIndex=0,t.loadOptions=xe,t.loadParticlesOptions=Me,t.loadRandomFactor=1e4,t.manageListener=zt,t.memoize=rt,t.midColorValue=u,t.millisecondsToSeconds=r,t.minCount=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=V,t.none=0,t.one=1,t.originPoint=l,t.paintBase=Se,t.paintImage=Ie,t.parseAlpha=function(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1},t.percentDenominator=a,t.phaseNumerator=1,t.quarter=w,t.randomColorValue=h,t.randomInRangeValue=$,t.rangeColorToHsl=Ve,t.rangeColorToRgb=Be,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=m,t.rgbToHsl=$e,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=ct,t.safeIntersectionObserver=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)},t.safeMatchMedia=ht,t.safeMutationObserver=ut,t.setAnimationFunctions=function(t,e){E.nextFrame=t,E.cancel=e},t.setLogger=function(t){t.debug&&(Rt.debug=kt(t.debug)),t.error&&(Rt.error=kt(t.error)),t.info&&(Rt.info=kt(t.info)),t.log&&(Rt.log=kt(t.log)),t.trace&&(Rt.trace=kt(t.trace)),t.verbose&&(Rt.verbose=kt(t.verbose)),t.warning&&(Rt.warning=kt(t.warning))},t.setRandom=function(t=Math.random){T=t},t.setRangeValue=N,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Fe(t,e)?.a},t.stringToRgb=qe,t.threeQuarter=b,t.triple=3,t.tryCountIncrement=1,t.tsParticles=Ke,t.updateAnimation=function(e,i,s,n,a){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const o=(i.velocity??0)*a.factor,r=i.min,l=i.max,c=i.decay??1;if(i.time??=0,(i.delayTime??0)>0&&i.time<(i.delayTime??0)&&(i.time+=a.value),!((i.delayTime??0)>0&&i.time<(i.delayTime??0))){switch(i.status){case t.AnimationStatus.increasing:i.value+=o;break;case t.AnimationStatus.decreasing:i.value-=o}switch(i.velocity&&1!==c&&(i.velocity*=c),i.status){case t.AnimationStatus.increasing:i.value>=l&&(s?i.status=t.AnimationStatus.decreasing:i.value-=l,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(s?i.status=t.AnimationStatus.increasing:i.value+=l,i.loops??=0,i.loops++)}!function(e,i,s,n,a){switch(i){case t.DestroyType.max:s>=a&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,l),e.destroyed||(i.value=U(i.value,r,l))}},t.updateColor=function(t,e){if(!t)return;const{h:i,s:s,l:n}=t;Ze(i,!1,e),Ze(s,!0,e),Ze(n,!0,e)},t.updateColorValue=Ze,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{tsParticles:(globalThis.__tsParticlesInternals.engine||{}).tsParticles}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
@@ -4,22 +4,13 @@ import type { IDimension } from "./Interfaces/IDimension.js";
4
4
  import type { PluginManager } from "./Utils/PluginManager.js";
5
5
  import { RenderManager } from "./RenderManager.js";
6
6
  export declare class CanvasManager {
7
+ #private;
7
8
  domElement?: HTMLCanvasElement;
8
9
  readonly render: RenderManager;
9
10
  renderCanvas?: OffscreenCanvas;
10
11
  readonly size: IDimension;
11
12
  zoom: number;
12
- private readonly _container;
13
- private _generated;
14
- private _mutationObserver?;
15
- private _originalStyle?;
16
- private readonly _pluginManager;
17
- private _pointerEvents;
18
- private _resizePlugins;
19
- private readonly _standardSize;
20
- private _zoomCenter?;
21
13
  constructor(pluginManager: PluginManager, container: Container);
22
- private get _fullScreen();
23
14
  destroy(): void;
24
15
  getZoomCenter(): ICoordinates;
25
16
  init(): void;
@@ -31,10 +22,4 @@ export declare class CanvasManager {
31
22
  setZoom(zoomLevel: number, center?: ICoordinates): void;
32
23
  stop(): void;
33
24
  windowResize(): Promise<void>;
34
- private readonly _applyResizePlugins;
35
- private readonly _initStyle;
36
- private readonly _repairStyle;
37
- private readonly _resetOriginalStyle;
38
- private readonly _safeMutationObserver;
39
- private readonly _setFullScreenStyle;
40
25
  }
@@ -17,6 +17,7 @@ export interface ContainerParams {
17
17
  sourceOptions?: ISourceOptions;
18
18
  }
19
19
  export declare class Container {
20
+ #private;
20
21
  actualOptions: Options;
21
22
  readonly canvas: CanvasManager;
22
23
  destroyed: boolean;
@@ -35,23 +36,6 @@ export declare class Container {
35
36
  shapeDrawers: Map<string, IShapeDrawer>;
36
37
  started: boolean;
37
38
  zLayers: number;
38
- private _delay;
39
- private _delayTimeout?;
40
- private readonly _delta;
41
- private readonly _dispatchCallback;
42
- private _drawAnimationFrame?;
43
- private _duration;
44
- private readonly _eventListeners;
45
- private _firstStart;
46
- private _initialSourceOptions;
47
- private _lastFrameTime?;
48
- private _lifeTime;
49
- private readonly _onDestroy;
50
- private _options;
51
- private _paused;
52
- private readonly _pluginManager;
53
- private _smooth;
54
- private _sourceOptions;
55
39
  constructor(params: ContainerParams);
56
40
  get animationStatus(): boolean;
57
41
  get options(): Options;
@@ -71,5 +55,4 @@ export declare class Container {
71
55
  start(): Promise<void>;
72
56
  stop(): void;
73
57
  updateActualOptions(): boolean;
74
- private readonly _nextFrame;
75
58
  }
@@ -7,10 +7,8 @@ declare global {
7
7
  var tsParticles: Engine;
8
8
  }
9
9
  export declare class Engine {
10
+ #private;
10
11
  readonly pluginManager: PluginManager;
11
- private readonly _domArray;
12
- private readonly _eventDispatcher;
13
- private _initialized;
14
12
  get items(): Container[];
15
13
  get version(): string;
16
14
  addEventListener(type: string, listener: CustomEventListener): void;
@@ -1,3 +1,4 @@
1
+ import type { IParticleCanvasBoundsData, IParticleCanvasBoundsResult } from "./IParticleCanvasBounds.js";
1
2
  import type { Container } from "../Container.js";
2
3
  import type { IShapeDrawData } from "./IShapeDrawData.js";
3
4
  import type { Particle } from "../Particle.js";
@@ -6,6 +7,7 @@ export interface IEffectDrawer<TParticle extends Particle = Particle> {
6
7
  drawAfter?: (data: IShapeDrawData<TParticle>) => void;
7
8
  drawBefore?: (data: IShapeDrawData<TParticle>) => void;
8
9
  init?: (container: Container) => Promise<void>;
10
+ isInsideCanvas?: (data: IParticleCanvasBoundsData<TParticle>) => boolean | IParticleCanvasBoundsResult;
9
11
  loadEffect?: (particle: TParticle) => void;
10
12
  particleInit?: (container: Container, particle: TParticle) => void;
11
13
  }
@@ -0,0 +1,16 @@
1
+ import type { IDimension } from "./IDimension.js";
2
+ import type { OutMode } from "../../Enums/Modes/OutMode.js";
3
+ import type { OutModeDirection } from "../../Enums/Directions/OutModeDirection.js";
4
+ import type { Particle } from "../Particle.js";
5
+ export interface IParticleCanvasBoundsData<TParticle extends Particle = Particle> {
6
+ canvasSize: IDimension;
7
+ direction?: OutModeDirection;
8
+ outMode?: OutMode | keyof typeof OutMode;
9
+ particle: TParticle;
10
+ radius: number;
11
+ }
12
+ export interface IParticleCanvasBoundsResult {
13
+ inside: boolean;
14
+ margin?: number;
15
+ reason?: "combined" | "default" | "effect" | "shape";
16
+ }
@@ -12,6 +12,7 @@ export interface IParticleUpdater {
12
12
  getTransformValues?: (particle: Particle) => Partial<IParticleTransformValues>;
13
13
  loadOptions?: (options: ParticlesOptions, ...sources: (RecursivePartial<IParticlesOptions> | undefined)[]) => void;
14
14
  particleDestroyed?: (particle: Particle, override?: boolean) => void;
15
+ preInit?: (particle: Particle) => void;
15
16
  reset?: (particle: Particle) => void;
16
17
  init(particle: Particle): void;
17
18
  isEnabled(particle: Particle): boolean;
@@ -1,3 +1,4 @@
1
+ import type { IParticleCanvasBoundsData, IParticleCanvasBoundsResult } from "./IParticleCanvasBounds.js";
1
2
  import type { Container } from "../Container.js";
2
3
  import type { IShapeDrawData } from "./IShapeDrawData.js";
3
4
  import type { Particle } from "../Particle.js";
@@ -8,6 +9,7 @@ export interface IShapeDrawer<TParticle extends Particle = Particle> {
8
9
  draw: (data: IShapeDrawData<TParticle>) => void;
9
10
  getSidesCount?: (particle: TParticle) => number;
10
11
  init?: (container: Container) => Promise<void>;
12
+ isInsideCanvas?: (data: IParticleCanvasBoundsData<TParticle>) => boolean | IParticleCanvasBoundsResult;
11
13
  loadShape?: (particle: TParticle) => void;
12
14
  particleDestroy?: (particle: TParticle) => void;
13
15
  particleInit?: (container: Container, particle: TParticle) => void;
@@ -14,11 +14,14 @@ import type { IParticleTransformValues } from "../export-types.js";
14
14
  import type { IParticlesOptions } from "../Options/Interfaces/Particles/IParticlesOptions.js";
15
15
  import type { IShapeValues } from "./Interfaces/IShapeValues.js";
16
16
  import type { ISlowParticleData } from "./Interfaces/ISlowParticleData.js";
17
+ import { OutMode } from "../Enums/Modes/OutMode.js";
18
+ import { OutModeDirection } from "../Enums/Directions/OutModeDirection.js";
17
19
  import { ParticleOutType } from "../Enums/Types/ParticleOutType.js";
18
20
  import type { ParticlesOptions } from "../Options/Classes/Particles/ParticlesOptions.js";
19
21
  import type { PluginManager } from "./Utils/PluginManager.js";
20
22
  import type { RecursivePartial } from "../Types/RecursivePartial.js";
21
23
  export declare class Particle {
24
+ #private;
22
25
  backColor?: IHsl;
23
26
  bubble: IBubbleParticleData;
24
27
  destroyed: boolean;
@@ -62,12 +65,6 @@ export declare class Particle {
62
65
  unbreakable: boolean;
63
66
  velocity: Vector;
64
67
  zIndexFactor: number;
65
- private readonly _cachedOpacityData;
66
- private readonly _cachedPosition;
67
- private readonly _cachedRotateData;
68
- private readonly _cachedTransform;
69
- private readonly _container;
70
- private readonly _pluginManager;
71
68
  constructor(pluginManager: PluginManager, container: Container);
72
69
  destroy(override?: boolean): void;
73
70
  draw(delta: IDelta): void;
@@ -81,14 +78,9 @@ export declare class Particle {
81
78
  getStrokeColor(): IHsl | undefined;
82
79
  getTransformData(externalTransform: Partial<IParticleTransformValues>): IParticleTransformValues;
83
80
  init(id: number, position?: ICoordinates, overrideOptions?: RecursivePartial<IParticlesOptions>, group?: string): void;
84
- isInsideCanvas(): boolean;
81
+ isInsideCanvas(direction?: OutModeDirection): boolean;
82
+ isInsideCanvasForOutMode(outMode: OutMode | keyof typeof OutMode, direction?: OutModeDirection): boolean;
85
83
  isShowingBack(): boolean;
86
84
  isVisible(): boolean;
87
85
  reset(): void;
88
- private readonly _calcPosition;
89
- private readonly _calculateVelocity;
90
- private readonly _fixHorizontal;
91
- private readonly _fixVertical;
92
- private readonly _getRollColor;
93
- private readonly _initPosition;
94
86
  }
@@ -9,23 +9,9 @@ import type { PluginManager } from "./Utils/PluginManager.js";
9
9
  import type { RecursivePartial } from "../Types/RecursivePartial.js";
10
10
  import { SpatialHashGrid } from "./Utils/SpatialHashGrid.js";
11
11
  export declare class ParticlesManager {
12
+ #private;
12
13
  checkParticlePositionPlugins: IContainerPlugin[];
13
14
  grid: SpatialHashGrid;
14
- private _array;
15
- private readonly _container;
16
- private readonly _groupLimits;
17
- private _limit;
18
- private _nextId;
19
- private readonly _particleBuckets;
20
- private _particleResetPlugins;
21
- private _particleUpdatePlugins;
22
- private readonly _pluginManager;
23
- private readonly _pool;
24
- private _postParticleUpdatePlugins;
25
- private _postUpdatePlugins;
26
- private _resizeFactor?;
27
- private _updatePlugins;
28
- private _zBuckets;
29
15
  constructor(pluginManager: PluginManager, container: Container);
30
16
  get count(): number;
31
17
  addParticle(position?: ICoordinates, overrideOptions?: RecursivePartial<IParticlesOptions>, group?: string, initializer?: (particle: Particle) => boolean): Particle | undefined;
@@ -44,17 +30,4 @@ export declare class ParticlesManager {
44
30
  setDensity(): void;
45
31
  setResizeFactor(factor: IDimension): void;
46
32
  update(delta: IDelta): void;
47
- private readonly _addToPool;
48
- private readonly _applyDensity;
49
- private readonly _createBuckets;
50
- private readonly _getBucketIndex;
51
- private readonly _getParticleInsertIndex;
52
- private readonly _initDensityFactor;
53
- private readonly _insertParticleIntoBucket;
54
- private readonly _removeParticle;
55
- private readonly _removeParticleFromBucket;
56
- private readonly _resetBuckets;
57
- private readonly _updateParticleBucket;
58
- private readonly _updateParticlesPhase1;
59
- private readonly _updateParticlesPhase2;
60
33
  }