@tsparticles/particles 4.2.1 → 4.3.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.
@@ -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.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.particles=t.__tsParticlesInternals.bundles.particles||{}))}(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",d="mid",u=2*Math.PI,p="true",g="false",f="canvas",y=255,m=360,v=100,P=100,w=.25,b=.75;var M;function x(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(M=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",M.bottomLeft="bottom-left",M.bottomRight="bottom-right",M.left="left",M.none="none",M.right="right",M.top="top",M.topLeft="top-left",M.topRight="top-right",M.outside="outside",M.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,x(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,x(t))}add(t){return z.create(this.x+t.x,this.y+t.y,this.z+x(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=x(t)}copy(){return z.clone(this)}div(t){return z.create(this.x/t,this.y/t,this.z/t)}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=x(t)}sub(t){return z.create(this.x-t.x,this.y-t.y,this.z-x(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=x(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class k extends z{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return k.create(l.x,l.y)}static clone(t){return k.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new k(t,e??l.y):new k(t.x,t.y)}}function C(t){return"boolean"==typeof t}function O(t){return"string"==typeof t}function S(t){return"number"==typeof t}function D(t){return"object"==typeof t&&null!==t}function I(t){return Array.isArray(t)}function T(t){return null==t}const _=Math.PI/180;let R=Math.random;const L={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function E(){return V(R(),0,1-Number.EPSILON)}function A(t,e){return E()*(e-t)+t}function F(t){return L.nextFrame(t)}function B(t){L.cancel(t)}function V(t,e,i){return Math.min(Math.max(t,e),i)}function U(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function H(t){const e=$(t);let i=W(t);return e===i&&(i=0),A(i,e)}function q(t){return S(t)?t:H(t)}function W(t){return S(t)?t:t.min}function $(t){return S(t)?t:t.max}function G(t,e){if(t===e||void 0===e&&S(t))return t;const i=W(t),s=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:G(i,s)}function N(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 X(t,e){return Math.sqrt(j(t,e))}function Y(t,e,i){return j(t,e)<=i*i}function Q(t){return t*_}function Z(e,i,s){if(S(e))return Q(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 E()*u}}function K(t){const e=k.origin;return e.length=1,e.angle=t,e}function J(t,e,i,s){return k.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function tt(t){return{x:(t.position?.x??E()*a)*t.size.width/a,y:(t.position?.y??E()*a)*t.size.height/a}}function et(t){const{position:e,size:i}=t;return{x:e?.x??E()*i.width,y:e?.y??E()*i.height}}function it(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1}var st,nt;t.OutModeDirection=void 0,(st=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",st.left="left",st.right="right",st.top="top",t.PixelMode=void 0,(nt=t.PixelMode||(t.PixelMode={})).precise="precise",nt.percent="percent";function at(){return globalThis.document}function ot(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function rt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function lt(t,e){return t===e||I(e)&&e.includes(t)}function ct(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(E()*t.length)]}function ht(t,e,i,s,n){return dt(ut(t,s??0),e,i,n)}function dt(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 ut(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function pt(t,...e){for(const i of e){if(T(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=>pt(void 0,t)):pt(e[n],a)}}return t}function gt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:k.create(q(t.options.bounce.horizontal.value),q(t.options.bounce.vertical.value))}}function ft(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=N(a,n);if(i*o+s*r<0)return;const l=-Math.atan2(r,o),c=t.mass,h=e.mass,d=t.velocity.rotate(l),u=e.velocity.rotate(l),p=J(d,u,c,h),g=J(u,d,c,h),f=p.rotate(-l),y=g.rotate(-l);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=y.x*e.factor.x,e.velocity.y=y.y*e.factor.y}function yt(t,e){return I(t)?t.map((t,i)=>e(t,i)):e(t,0)}function mt(t,e,i){return I(t)?ct(t,e,i):t}function vt(e,i){return function(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}}(e,i)}function Pt(t){const e=at().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||T(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}let wt,bt;function Mt(t){if(wt!==t||!bt){wt=t;const e=at().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}bt=e}return bt}function xt(t,e,i,s,n){if(s){let s={passive:!0};C(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function zt(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 kt(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 Ct{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var Ot;t.EventType=void 0,(Ot=t.EventType||(t.EventType={})).configAdded="configAdded",Ot.containerInit="containerInit",Ot.particlesSetup="particlesSetup",Ot.containerStarted="containerStarted",Ot.containerStopped="containerStopped",Ot.containerDestroyed="containerDestroyed",Ot.containerPaused="containerPaused",Ot.containerPlay="containerPlay",Ot.containerBuilt="containerBuilt",Ot.particleAdded="particleAdded",Ot.particleDestroyed="particleDestroyed",Ot.particleRemoved="particleRemoved";class St{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 kt(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 kt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return zt(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 Dt=t=>(...e)=>{t(...e)},It={debug:Dt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:Dt(console.info),log:Dt(console.log),trace:Dt(console.trace),verbose:Dt(console.log),warning:Dt(console.warn)};function Tt(){return It}const _t="100%";class Rt{pluginManager=new St(this);#h=[];#d=new Ct;#o=!1;get items(){return this.#h}get version(){return"4.2.1"}addEventListener(t,e){this.#d.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#d.dispatchEvent(t,e)}async init(){this.#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 Zs}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*E()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=mt(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=mt(r,a),{items:c}=this,h=c.findIndex(t=>t.id.description===n),d=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,d)}else c.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=at();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)s=t,s.dataset[e]??=g,s.dataset[e]===p&&(s.style.width||=_t,s.style.height||=_t,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(f).item(0);n?(s=n,s.dataset[e]=g):(s=i.createElement(f),s.dataset[e]=p,t.appendChild(s)),s.style.width||=_t,s.style.height||=_t,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=at();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}var Lt,Et,At,Ft,Bt,Vt,Ut,Ht,qt,Wt,$t;!function(t){t.circle="circle",t.rectangle="rectangle"}(Lt||(Lt={}));class Gt{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 Gt{radius;constructor(t,e,i){super(t,e,Lt.circle),this.radius=i}contains(t){return Y(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 jt||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 jt extends Gt{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 jt))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,(Et=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Et.counterClockwise="counter-clockwise",Et.random="random",t.AnimationMode=void 0,(At=t.AnimationMode||(t.AnimationMode={})).auto="auto",At.increase="increase",At.decrease="decrease",At.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,(Vt=t.AlterType||(t.AlterType={})).darken="darken",Vt.enlighten="enlighten",t.DestroyType=void 0,(Ut=t.DestroyType||(t.DestroyType={})).none="none",Ut.max="max",Ut.min="min",t.GradientType=void 0,(Ht=t.GradientType||(t.GradientType={})).linear="linear",Ht.radial="radial",Ht.random="random",t.ParticleOutType=void 0,(qt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",qt.inside="inside",qt.outside="outside",t.StartValueType=void 0,(Wt=t.StartValueType||(t.StartValueType={})).max="max",Wt.min="min",Wt.random="random",t.AnimationStatus=void 0,($t=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",$t.decreasing="decreasing";class Xt{load(t){T(t)||this.doLoad(t)}}function Yt(t,...e){for(const i of e)t.load(i)}function Qt(t,e,i){void 0!==i&&(t[e]=i)}function Zt(t,e,i){void 0!==i&&(t[e]=G(i))}function Kt(t,e,i){void 0!==i&&t[e].load(i)}function Jt(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function te(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class ee extends Xt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Zt(this,"count",t.count),Qt(this,"enable",t.enable),Zt(this,"speed",t.speed),Zt(this,"decay",t.decay),Zt(this,"delay",t.delay),Qt(this,"sync",t.sync)}}class ie extends ee{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),Qt(this,"mode",t.mode),Qt(this,"startValue",t.startValue)}}class se extends ee{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Qt(this,"max",t.max),Qt(this,"min",t.min),Zt(this,"offset",t.offset)}}class ne extends Xt{h=new se(0,m);l=new se(0,P);s=new se(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class ae extends Xt{value="";static create(t,e){const i=new ae;return i.load(t),void 0!==e&&(O(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){T(t.value)||(this.value=t.value)}}class oe extends ae{animation=new ne;static create(t,e){const i=new oe;return i.load(t),void 0!==e&&(O(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class re extends Xt{color;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new ae,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=ae.create(this.color,t.color)),Qt(this,"image",t.image),Qt(this,"position",t.position),Qt(this,"repeat",t.repeat),Qt(this,"size",t.size),Qt(this,"opacity",t.opacity)}}class le extends Xt{enable=!0;zIndex=0;doLoad(t){Qt(this,"enable",t.enable),Qt(this,"zIndex",t.zIndex)}}class ce extends Xt{delay=.5;enable=!0;doLoad(t){Qt(this,"delay",t.delay),Qt(this,"enable",t.enable)}}class he extends Xt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=pt(this.options[t]??{},i))}Qt(this,"close",t.close),Qt(this,"type",t.type)}}class de extends Xt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=oe.create(this.color,t.color)),Qt(this,"enable",t.enable),Zt(this,"opacity",t.opacity)}}class ue extends Xt{offset=0;value=90;doLoad(t){Zt(this,"offset",t.offset),Zt(this,"value",t.value)}}class pe extends Xt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){Qt(this,"x",t.x),Qt(this,"y",t.y),Qt(this,"mode",t.mode),Qt(this,"radius",t.radius)}}class ge extends Xt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Zt(this,"acceleration",t.acceleration),Qt(this,"enable",t.enable),Qt(this,"inverse",t.inverse),Zt(this,"maxSpeed",t.maxSpeed)}}class fe extends Xt{value=0;doLoad(t){T(t.value)||(this.value=G(t.value))}}class ye extends fe{animation=new ee;doLoad(t){super.doLoad(t),Kt(this,"animation",t.animation)}}class me extends ye{animation=new ie}class ve extends Xt{clamp=!0;delay=new fe;enable=!1;generator;options={};doLoad(t){Qt(this,"clamp",t.clamp),this.delay.load(t.delay),Qt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=pt(this.options,t.options))}}class Pe extends Xt{bottom;default=t.OutMode.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class we extends Xt{acceleration=0;enable=!1;position;doLoad(t){Zt(this,"acceleration",t.acceleration),Qt(this,"enable",t.enable),t.position&&(this.position=pt({},t.position))}}class be extends Xt{angle=new ue;center=new pe;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new ge;outModes=new Pe;path=new ve;random=!1;size=!1;speed=2;spin=new we;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Zt(this,"decay",t.decay),Qt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Zt(this,"drift",t.drift),Qt(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),Qt(this,"random",t.random),Qt(this,"size",t.size),Zt(this,"speed",t.speed),this.spin.load(t.spin),Qt(this,"straight",t.straight),Qt(this,"vibrate",t.vibrate),Qt(this,"warp",t.warp)}}class Me extends Xt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=oe.create(this.color,t.color)),Zt(this,"width",t.width),Zt(this,"opacity",t.opacity)}}class xe extends Xt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=oe.create(this.color,t.color)),Jt(this,"fill",t.fill,()=>new de),Jt(this,"stroke",t.stroke,()=>new Me)}}class ze extends fe{value=1}class ke extends Xt{horizontal=new ze;vertical=new ze;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Ce extends Xt{enable=!1;height=1080;width=1920;doLoad(t){Qt(this,"enable",t.enable),Qt(this,"width",t.width),Qt(this,"height",t.height)}}class Oe extends Xt{mode=t.LimitMode.delete;value=0;doLoad(t){Qt(this,"mode",t.mode),Qt(this,"value",t.value)}}class Se extends Xt{density=new Ce;limit=new Oe;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Qt(this,"value",t.value)}}class De extends Xt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=pt(this.options[t]??{},i))}Qt(this,"close",t.close),Qt(this,"type",t.type)}}class Ie extends fe{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Qt(this,"opacityRate",t.opacityRate),Qt(this,"sizeRate",t.sizeRate),Qt(this,"velocityRate",t.velocityRate)}}class Te extends Xt{bounce=new ke;effect=new he;groups={};move=new be;number=new Se;paint;palette;reduceDuplicates=!1;shape=new De;zIndex=new Ie;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new xe,this.paint.color=new oe,this.paint.color.value="#fff",this.paint.fill=new de,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#g(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]=pt(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&&(I(e)?this.paint=yt(e,t=>{const e=new xe;return e.load(t),e}):I(this.paint)?(this.paint=new xe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#g(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(I(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 _e(t,e,...i){const s=new Te(t,e);return Yt(s,...i),s}class Re extends Xt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new re,this.fullScreen=new le,this.particles=_e(this.#p,this.#u),this.resize=new ce}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,yt(this.preset,t=>{this.#f(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#g(this.palette)),Qt(this,"autoPlay",t.autoPlay),Qt(this,"clear",t.clear),Qt(this,"key",t.key),Qt(this,"name",t.name),Zt(this,"delay",t.delay),Qt(this,"detectRetina",t.detectRetina),Zt(this,"duration",t.duration),Qt(this,"fpsLimit",t.fpsLimit),Qt(this,"hdr",t.hdr),Qt(this,"pauseOnBlur",t.pauseOnBlur),Qt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Qt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;C(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=pt(this.style,t.style),Qt(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#g(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#f(t){this.load(this.#p.getPreset(t))}}const Le=new Map;function Ee(t,e){let i=Le.get(t);return i||(i=e(),Le.size>2e3&&Le.clear(),Le.set(t,i)),i}function Ae(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Fe(t,e,i,s=!0){if(!e)return;const n=O(e)?{value:e}:e;if(O(n.value))return Be(t,n.value,i,s);if(I(n.value)){const e=ct(n.value,i,s);if(!e)return;return Fe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Be(t,e,i,s=!0){if(!e)return;const n=O(e)?{value:e}:e;if(O(n.value))return n.value===h?Ge():He(t,n.value);if(I(n.value)){const e=ct(n.value,i,s);if(!e)return;return Be(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=Fe(t,e,i,s);return n?Ue(n):void 0}function Ue(t){const e=t.r/y,i=t.g/y,s=t.b/y,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+=m),r.h>=m&&(r.h-=m),r}function He(t,e){return Ae(t,e)}function qe(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function We(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(P,t.l)),n=e/m,a=i/v,r=s/P;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const l=r<o?r*(1+a):r+a-r*a,c=2*r-l,h=1/3,d=Math.min(y,y*qe(c,l,n+h)),u=Math.min(y,y*qe(c,l,n)),p=Math.min(y,y*qe(c,l,n-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function $e(t){const e=We(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Ge(t){const e=t??0,i=()=>Math.floor(A(e,256));return{b:i(),g:i(),r:i()}}function Ne(t,e,i){const s=i??1;return Ee(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/y*s).toString()} ${(t.g/y*s).toString()} ${(t.b/y*s).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function je(t,e,i){const s=i??1;return Ee(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?Ne(We(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${s.toString()})`)}function Xe(t,e,i,s){let n=t,a=e;return"r"in n||(n=We(t)),"r"in a||(a=We(e)),{b:U(n.b,a.b,i,s),g:U(n.g,a.g,i,s),r:U(n.r,a.r,i,s)}}function Ye(t,e,i){if(i===h)return Ge();if(i!==d)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return Xe(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return We(t)}}}function Qe(t,e,i,s){const n=O(e)?e:e.value;return n===h?s?Fe(t,{value:n}):i?h:d:n===d?d:Fe(t,{value:n})}function Ze(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Ke(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:m},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:P}};return e&&(Je(s.h,e.h,i),Je(s.s,e.s,i),Je(s.l,e.l,i)),s}function Je(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*=E(),e.value*=E()),e.initialValue=e.value,e.offset=G(i.offset)):e.velocity=0}function ti(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?H(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=V(e.value,l,r)}function ei(t,e){if(!t)return;const{h:i,s:s,l:n}=t;ti(i,!1,e),ti(s,!0,e),ti(n,!0,e)}function ii(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const si=new Rt,ni=new Map;async function ai(t,e,i,s){const n=ni.get(e);if(n instanceof Promise)return n;if(n){if(!n.destroyed)return n;ni.delete(e)}const a=(async()=>{const n=function(t,e){return{fullScreen:{enable:!e},particles:{number:{value:t.count??80},color:{value:t.color??"#fff"},links:{enable:t.links??!1,color:t.linksColor??"#fff",distance:t.linksLength??100},collisions:{enable:t.collisions??!1},move:{enable:!0,speed:t.speed??3},opacity:{value:t.opacity??1},shape:{type:t.shape??"circle"},size:{value:t.radius??3}}}}(i,s),a=await t.load({id:e,element:s,options:n});if(!a)return void ni.delete(e);const{ParticlesInstance:o}=await Promise.resolve().then(function(){return Ks}),r=new o(a,e);return ni.set(e,r),r})();return ni.set(e,a),a}class oi{enable=!1;mode="destination-out";load(t){T(t)||(Qt(this,"mode",t.mode),Qt(this,"enable",t.enable))}}class ri{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Js});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new oi),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new oi,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function li(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new ri)})}class ci{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(l.x,l.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=D(s)?{min:Q(s.min),max:Q(s.max)}:{min:0,max:Q(s)}}}async function hi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new ci))})}var di;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(di||(di={}));const ui=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,pi=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class gi{accepts(t){return t.startsWith("#")}handleColor(t){return this.#y(t.value)}handleRangeColor(t){return this.#y(t.value)}parseString(t){return this.#y(t)}#y(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(ui,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=pi.exec(e);return i?{a:i[di.a]?Number.parseInt(i[di.a],16)/255:1,b:Number.parseInt(i[di.b]??"0",16),g:Number.parseInt(i[di.g]??"0",16),r:Number.parseInt(i[di.r]??"0",16)}:void 0}}async function fi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new gi)})}var yi;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(yi||(yi={}));const mi=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class vi{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return We(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return We({h:q(e.h),l:q(e.l),s:q(e.s)})}parseString(t){if(!this.accepts(t))return;const e=mi.exec(t);return e?$e({a:e.length>4?it(e[yi.a]):1,h:Number.parseInt(e[yi.h]??"0",10),l:Number.parseInt(e[yi.l]??"0",10),s:Number.parseInt(e[yi.s]??"0",10)}):void 0}}async function Pi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new vi)})}class wi{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return en});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function bi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,kt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new wi(t.pluginManager))})}function Mi(e,i){const s=e.value,n=e.animation,a={delayTime:q(n.delay)*r,enable:n.enable,value:q(e.value)*i,max:$(s)*i,min:W(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=E()>=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=H(a),e&&(a.status=E()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function xi(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;i.time??=0;const h=i.delayTime??0;if(!(h>0&&i.time<h&&(i.time+=a.value,i.time<h))){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&&(i.status=t.AnimationStatus.decreasing,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(i.status=t.AnimationStatus.increasing,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=V(i.value,r,l))}}class zi extends ie{destroy=t.DestroyType.none;load(t){super.load(t),T(t)||Qt(this,"destroy",t.destroy)}}class ki extends me{animation=new zi;value=1;load(t){if(T(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Ci{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Mi(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=q(i.speed)/a*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=E()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){te(t,"opacity",ki,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&xi(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function Oi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Ci(t)))})}class Si{modes;#u;#m;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#m=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;let o=!1;for(const t of this.#m)if(o=t.particleBounce?.(e,s,i)??!1,o)break;if(o)return;const r=e.getPosition(),l=e.offset,c=e.getRadius(),h=ut(r,c),d=a.canvas.size,u=!e.isInsideCanvasForOutMode(n,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.left&&e.direction!==t.OutModeDirection.right)return;e.bounds.right<0&&e.direction===t.OutModeDirection.left?e.particle.position.x=e.size+e.offset.x:e.bounds.left>e.canvasSize.width&&e.direction===t.OutModeDirection.right&&(e.particle.position.x=e.canvasSize.width-e.size-e.offset.x);const i=e.particle.velocity.x;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.right&&i>0||e.direction===t.OutModeDirection.left&&i<0)){const t=q(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,s=!0}if(!s)return;const n=e.offset.x+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-n:e.outOfCanvas&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:d,offset:l,outOfCanvas:u,size:c}),function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.bottom&&e.direction!==t.OutModeDirection.top)return;e.bounds.bottom<0&&e.direction===t.OutModeDirection.top?e.particle.position.y=e.size+e.offset.y:e.bounds.top>e.canvasSize.height&&e.direction===t.OutModeDirection.bottom&&(e.particle.position.y=e.canvasSize.height-e.size-e.offset.y);const i=e.particle.velocity.y;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.bottom&&i>0||e.direction===t.OutModeDirection.top&&i<0)){const t=q(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,s=!0}if(!s)return;const n=e.offset.y+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-n:e.outOfCanvas&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:d,offset:l,outOfCanvas:u,size:c})}}class Di{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(this.modes.includes(n)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(n,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=N(e.position,e.moveCenter),{x:s,y:n}=e.velocity;if(s<0&&t>e.moveCenter.radius||n<0&&i>e.moveCenter.radius||s>=0&&t<-e.moveCenter.radius||n>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class Ii{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,s,n){if(!this.modes.includes(n))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const a=e.options.move.gravity,o=this.#u,r=o.canvas.size,c=e.getRadius();if(a.enable){const s=e.position;(!a.inverse&&s.y>r.height+c&&i===t.OutModeDirection.bottom||a.inverse&&s.y<-c&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+c||e.velocity.y<0&&e.position.y>=-c||e.velocity.x>0&&e.position.x<=r.width+c||e.velocity.x<0&&e.position.x>=-c)return;ht(e.position,o.canvas.size,l,c,i)||e.destroy()}}}const Ti=k.origin;class _i{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;Ti.setTo(l),Ti.length=e.moveCenter.radius,Ti.angle=e.velocity.angle+Math.PI,Ti.addTo(e.moveCenter);const{dx:s,dy:n}=N(e.position,Ti);if(t<=0&&s>=0||i<=0&&n>=0||t>=0&&s<=0||i>=0&&n<=0)return;e.position.x=Math.floor(H({min:0,max:a.canvas.size.width})),e.position.y=Math.floor(H({min:0,max:a.canvas.size.height}));const{dx:o,dy:r}=N(e.position,e.moveCenter);e.direction=Math.atan2(-r,-o),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(e.isInsideCanvasForOutMode(n,i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor(H({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(H({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=N(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction),e.justWarped=!0;break}case t.ParticleOutType.normal:{const s=e.options.move.warp,n=a.canvas.size,o={bottom:n.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:n.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),l=ut(e.position,r);i===t.OutModeDirection.right&&l.left>n.width+e.offset.x?(e.position.x=o.left,e.initialPosition.x=e.position.x,s||(e.position.y=E()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0):i===t.OutModeDirection.left&&l.right<-e.offset.x&&(e.position.x=o.right,e.initialPosition.x=e.position.x,s||(e.position.y=E()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0),i===t.OutModeDirection.bottom&&l.top>n.height+e.offset.y?(s||(e.position.x=E()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.top,e.initialPosition.y=e.position.y,e.justWarped=!0):i===t.OutModeDirection.top&&l.bottom<-e.offset.y&&(s||(e.position.x=E()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0);break}}}}}class Ri{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#v(e,t.OutMode.bounce,t=>new Si(t)),this.#v(e,t.OutMode.out,t=>new _i(t)),this.#v(e,t.OutMode.destroy,t=>new Di(t)),this.#v(e,t.OutMode.none,t=>new Ii(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#P(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#P(e,i,s.left??s.default,t.OutModeDirection.left),this.#P(e,i,s.right??s.default,t.OutModeDirection.right),this.#P(e,i,s.top??s.default,t.OutModeDirection.top)}#v(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#P(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function Li(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Ri(t)))})}class Ei{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=mt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=oe.create(void 0===a?void 0:oe.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=q(o.opacity),t.fillAnimation=i.animation;const s=Ve(this.#p,i);s&&(t.fillColor=Ke(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=oe.create(void 0===a?void 0:oe.create(void 0,a),r.color);t.strokeWidth=q(r.width)*e.retina.pixelRatio,t.strokeOpacity=q(r.opacity??1),t.strokeAnimation=i.animation;const s=Ve(this.#p,i)??t.getFillColor();s&&(t.strokeColor=Ke(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(ei(t.fillColor,e),ei(t.strokeColor,e))}}async function Ai(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Ei(t.pluginManager,e)))})}var Fi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Fi||(Fi={}));const Bi=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Vi{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:q(e.r),g:q(e.g),b:q(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Bi.exec(t);return e?{a:e.length>4?it(e[Fi.a]):1,b:parseInt(e[Fi.b]??"0",10),g:parseInt(e[Fi.g]??"0",10),r:parseInt(e[Fi.r]??"0",10)}:void 0}}async function Ui(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Vi)})}class Hi extends ie{destroy=t.DestroyType.none;load(t){super.load(t),T(t)||Qt(this,"destroy",t.destroy)}}class qi extends me{animation=new Hi;value=3;load(t){if(super.load(t),T(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Wi{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/a*e.retina.reduceFactor,s.sync||(t.size.velocity*=E()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){te(t,"size",qi,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Mi(i,e),t.retina.sizeAnimationSpeed=q(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&xi(t,t.size,0,t.options.size.animation.destroy,e)}}async function $i(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Wi(t)))})}async function Gi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{await Promise.all([li(t),fi(t),Pi(t),Ui(t),bi(t),hi(t),Ai(t),Oi(t),Li(t),$i(t)])})}class Ni{enable=!1;mode=[];load(t){T(t)||(Qt(this,"enable",t.enable),Qt(this,"mode",t.mode))}}var ji,Xi,Yi;!function(t){t.circle="circle",t.rectangle="rectangle"}(ji||(ji={}));class Qi{enable=!1;mode=[];selectors=[];type=ji.circle;load(t){T(t)||(Qt(this,"selectors",t.selectors),Qt(this,"enable",t.enable),Qt(this,"mode",t.mode),Qt(this,"type",t.type))}}class Zi{enable=!1;mode=[];load(t){T(t)||(Qt(this,"enable",t.enable),Qt(this,"mode",t.mode))}}class Ki{onClick=new Ni;onDiv=new Qi;onHover=new Zi;load(t){if(T(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=yt(e,t=>{const e=new Qi;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(Xi||(Xi={}));class Ji{#u;#p;constructor(t,e){this.#p=t,this.#u=e}load(t){if(T(t))return;if(!this.#u)return;const e=this.#p.interactors?.get(this.#u);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class ts{detectsOn=Xi.window;events=new Ki;modes;constructor(t,e){this.modes=new Ji(t,e)}load(t){if(T(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class es{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return an});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new ts(this.#p,t)),s.load(i?.interactivity);const n=this.#p.interactors?.get(t);if(n)for(const t of n)t.loadOptions&&t.loadOptions(e,i)}loadParticlesOptions(t,e,i){i?.interactivity&&(e.interactivity=pt({},i.interactivity));const s=this.#p.interactors?.get(t);if(s)for(const t of s)t.loadParticlesOptions?.(e,i)}needsPlugin(){return!0}}!function(t){t.external="external",t.particles="particles"}(Yi||(Yi={}));class is{type=Yi.particles;container;constructor(t){this.container=t}}const ss="pointerdown",ns="pointerup",as="pointerleave",os="pointermove",rs="touchstart",ls="touchend",cs="touchmove",hs="touchcancel";function ds(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}var us;!function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy"}(us||(us={}));class ps{speed=2;load(t){T(t)||Qt(this,"speed",t.speed)}}class gs{enable=!0;retries=0;load(t){T(t)||(Qt(this,"enable",t.enable),Qt(this,"retries",t.retries))}}class fs{absorb=new ps;bounce=new ke;enable=!1;maxSpeed=50;mode=us.bounce;overlap=new gs;load(t){T(t)||(this.absorb.load(t.absorb),this.bounce.load(t.bounce),Qt(this,"enable",t.enable),Zt(this,"maxSpeed",t.maxSpeed),Qt(this,"mode",t.mode),this.overlap.load(t.overlap))}}function ys(t,e,i,s,n,a){if(!t.options.collisions||!i.options.collisions)return;const o=V(t.options.collisions.absorb.speed*n.factor,0,s);t.size.value=Math.sqrt(e*e+o*o),i.size.value-=o,i.size.value<=a&&(i.size.value=0,i.destroy())}const ms=t=>{t.options.collisions&&(t.collisionMaxSpeed??=q(t.options.collisions.maxSpeed),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed))};function vs(t,e){const i=t.getMass(),s=e.getMass(),n=t.velocity.length,a=e.velocity.length,o=i*n*n+s*a*a;ft(gt(t),gt(e));const r=t.velocity.length,l=e.velocity.length,c=i*r*r+s*l*l;if(c>1e-6*o){const i=Math.sqrt(o/c);Math.abs(i-1)>1e-4&&(t.velocity.length=r*i,e.velocity.length=l*i)}ms(t),ms(e)}function Ps(t,e,i,s){if(t.options.collisions&&e.options.collisions)switch(t.options.collisions.mode){case us.absorb:!function(t,e,i,s){const n=t.getRadius(),a=e.getRadius();!n&&a?t.destroy():n&&!a?e.destroy():n&&a&&(n>=a?ys(t,n,e,a,i,s):ys(e,a,t,n,i,s))}(t,e,i,s);break;case us.bounce:vs(t,e);break;case us.destroy:!function(t,e){t.unbreakable||e.unbreakable||vs(t,e);const i=t.getRadius(),s=e.getRadius();!i&&s?t.destroy():i&&!s?e.destroy():i&&s&&(t.getRadius()>=e.getRadius()?e:t).destroy()}(t,e)}}class ws extends is{maxDistance;constructor(t){super(t),this.maxDistance=0}clear(){}init(){}interact(t,e,i){if(t.destroyed||t.spawning)return;const s=this.container,n=t.getPosition(),a=t.getRadius(),o=s.particles.grid.queryCircle(n,2*a);for(const e of o){if(t===e||t.id>=e.id||!t.options.collisions?.enable||!e.options.collisions?.enable||t.options.collisions.mode!==e.options.collisions.mode||e.destroyed||e.spawning)continue;const o=e.getPosition(),r=e.getRadius();if(Math.abs(Math.round(n.z)-Math.round(o.z))>a+r)continue;X(n,o)>a+r||Ps(t,e,i,s.retina.pixelRatio)}}isEnabled(t){return!!t.options.collisions?.enable}loadParticlesOptions(t,...e){te(t,"collisions",fs,...e)}reset(){}}class bs{id="overlap";async getPlugin(t){const{OverlapPluginInstance:e}=await Promise.resolve().then(function(){return on});return new e(t)}loadOptions(){}needsPlugin(){return!0}}async function Ms(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{ds(t),t.pluginManager.addPlugin(new bs),t.pluginManager.addInteractor?.("particlesCollisions",t=>Promise.resolve(new ws(t)))})}class xs extends Nt{#w;constructor(t,e,i,s){super(t,e,i),this.#w=s}contains(t){if(super.contains(t))return!0;const{width:e,height:i}=this.#w,{x:s,y:n}=t;return super.contains({x:s-e,y:n})||super.contains({x:s+e,y:n})||super.contains({x:s,y:n-i})||super.contains({x:s,y:n+i})||super.contains({x:s-e,y:n-i})||super.contains({x:s+e,y:n+i})||super.contains({x:s-e,y:n+i})||super.contains({x:s+e,y:n-i})}intersects(t){if(super.intersects(t))return!0;const{width:e,height:i}=this.#w,s=t.position,n=[{x:-e,y:0},{x:e,y:0},{x:0,y:-i},{x:0,y:i},{x:-e,y:-i},{x:e,y:i},{x:-e,y:i},{x:e,y:-i}];for(const e of n){const i={x:s.x+e.x,y:s.y+e.y};let n;if(t instanceof Nt)n=new Nt(i.x,i.y,t.radius);else{const e=t;n=new jt(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(n))return!0}return!1}}class zs{blur=5;color=new ae;enable=!1;constructor(){this.color.value="#000"}load(t){T(t)||(Qt(this,"blur",t.blur),this.color=ae.create(this.color,t.color),Qt(this,"enable",t.enable))}}class ks{color;enable=!1;frequency=1;opacity;load(t){T(t)||(void 0!==t.color&&(this.color=ae.create(this.color,t.color)),Qt(this,"enable",t.enable),Qt(this,"frequency",t.frequency),Qt(this,"opacity",t.opacity))}}class Cs{blink=!1;color=new ae;consent=!1;distance=100;enable=!1;frequency=1;id;opacity=1;shadow=new zs;triangles=new ks;warp=!1;width=1;constructor(){this.color.value="#fff"}load(t){T(t)||(Qt(this,"id",t.id),Qt(this,"blink",t.blink),this.color=ae.create(this.color,t.color),Qt(this,"consent",t.consent),Qt(this,"distance",t.distance),Qt(this,"enable",t.enable),Qt(this,"frequency",t.frequency),Qt(this,"opacity",t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),Qt(this,"width",t.width),Qt(this,"warp",t.warp))}}function Os(t,e,i){const{dx:s,dy:n}=N(t,e),a={x:Math.abs(s),y:Math.abs(n)},o={x:Math.min(a.x,i.width-a.x),y:Math.min(a.y,i.height-a.y)};return Math.hypot(o.x,o.y)}class Ss extends is{#b;#p;constructor(t,e){super(e),this.#p=t,this.#b=0}get maxDistance(){return this.#b}clear(){}init(){this.container.particles.linksColor=void 0,this.container.particles.linksColors=new Map}interact(t){if(!t.options.links)return;t.links=[],t.linksDistance&&t.linksDistance>this.#b&&(this.#b=t.linksDistance);const e=t.getPosition(),i=this.container,s=i.canvas.size;if(e.x<l.x||e.y<l.y||e.x>s.width||e.y>s.height)return;const n=t.options.links,a=n.opacity,o=t.retina.linksDistance??0,r=n.warp,c=r?new xs(e.x,e.y,o,s):new Nt(e.x,e.y,o),h=i.particles.grid.query(c);for(const i of h){const c=i.options.links;if(t===i||!c?.enable||n.id!==c.id||i.spawning||i.destroyed||!i.links||t.links.some(t=>t.destination===i)||i.links.some(e=>e.destination===t))continue;const h=i.getPosition();if(h.x<l.x||h.y<l.y||h.x>s.width||h.y>s.height)continue;const d=N(e,h).distance,u=r&&c.warp?Os(e,h,s):d,p=Math.min(d,u);if(p>o)continue;const g=(1-p/o)*a;this.#M(t),t.links.push({destination:i,opacity:g,color:this.#x(t,i),isWarped:u<d})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){te(t,"links",Cs,...e)}reset(){}#x(t,e){const i=this.container,s=t.options.links;if(!s)return;return Ye(t,e,void 0!==s.id?i.particles.linksColors.get(s.id):i.particles.linksColor)}#M(t){if(!t.options.links)return;const e=this.container,i=t.options.links;let s=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);s||(s=Qe(this.#p,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s))}}class Ds{id="links";#p;constructor(t){this.#p=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return ln});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Is(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{const e=t.pluginManager;ds(t),e.addPlugin(new Ds(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new Ss(e,t)))})}let Ts=null;async function _s(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{await Promise.all([Gi(t),(async t=>{await async function(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new es(i)),i.initializers.interactors??=new Map,i.interactors??=new Map,i.addInteractor=(t,e)=>{i.initializers.interactors??=new Map,i.initializers.interactors.set(t,e)},i.getInteractors=async(t,e=!1)=>(i.interactors??=new Map,i.initializers.interactors??=new Map,zt(t,i.interactors,i.initializers.interactors,e)),i.setOnClickHandler=t=>{const{items:i}=e;if(!i.length)throw new Error("Click handlers can only be set after calling tsParticles.load()");i.forEach(e=>{const i=e;i.addClickHandler?.(t)})}})}(t),await Promise.all([Ms(t),Is(t)])})(t)])})}async function Rs(t){return Ts||(Ts=_s(t),Ts)}async function Ls(t,e){let i,s;return await Rs(si),O(t)?(i=t,s=e??{}):(i="particles",s=t??{}),ai(si,i,s)}Ls.create=async(t,e)=>{await Rs(si);return ai(si,t?.id??"particles",e??{},t??void 0)},Ls.init=async()=>{await Rs(si)},Ls.version="4.2.1",globalThis.particles=Ls;const Es=globalThis;Es.particles=Ls,Es.tsParticles=si;function As(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Fs{#z;#k;#C;#O;#S;#u;#D;#I;#T;#_;#R;#L;#E;#A;#p;#F;#B;#V={};#U=[void 0,void 0];#H={};constructor(t,e,i){this.#p=t,this.#u=e,this.#k=i,this.#D=null,this.#B=[],this.#F=[],this.#S=[],this.#z=[],this.#C=[],this.#O=[],this.#T=[],this.#_=[],this.#R=[],this.#L=[],this.#A=[],this.#E=[]}get settings(){return this.#I}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(l.x,l.y,this.#k.size.width,this.#k.size.height)})}clear(){let t=!1;for(const e of this.#z)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this.#B=[],this.#F=[],this.#S=[],this.#z=[],this.#C=[],this.#O=[],this.#T=[],this.#_=[],this.#R=[],this.#L=[],this.#A=[],this.#E=[]}draw(t){const e=this.#D;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.#q(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#H,g=this.#V,f=a?je(a,r.hdr,h*d):void 0,y=o?je(o,r.hdr,u*d):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=y,this.draw(s=>{for(const i of this.#R)i.drawParticleSetup?.(s,t,e);this.#W(s,t,i,d,g,p),this.#$({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#G(t);for(const i of this.#_)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#T)this.#N(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#u;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#A)e.drawSettingsSetup?.(i,t);for(const e of this.#L)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#O)e.clearDraw?.(i,t);for(const e of this.#E)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#S=[],this.#z=[],this.#C=[],this.#O=[],this.#T=[],this.#R=[],this.#_=[],this.#L=[],this.#A=[],this.#E=[];for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#S.push(t),t.canvasClear&&this.#z.push(t),t.canvasPaint&&this.#C.push(t),t.drawParticle&&this.#T.push(t),t.drawParticleSetup&&this.#R.push(t),t.drawParticleCleanup&&this.#_.push(t),t.draw&&this.#L.push(t),t.drawSettingsSetup&&this.#A.push(t),t.drawSettingsCleanup&&this.#E.push(t),t.clearDraw&&this.#O.push(t)}initUpdaters(){this.#B=[],this.#F=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#F.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#B.push(t)}paint(){let t=!1;for(const e of this.#C)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(l.x,l.y,this.#k.size.width,this.#k.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,l.x,l.y,this.#k.size.width,this.#k.size.height),i.globalAlpha=s})}setContext(t){this.#D=t,this.#D&&(this.#D.globalCompositeOperation=i)}setContextSettings(t){this.#I=t}stop(){this.draw(t=>{t.clearRect(l.x,l.y,this.#k.size.width,this.#k.size.height)})}#G(t){for(const e of this.#F)e.afterDraw?.(t)}#W(t,e,i,s,n,a){for(const o of this.#B){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)As(a,t,e)}o.beforeDraw?.(e)}}#j(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#X(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#$(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(l),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.y),a.fill&&(i.fillStyle=a.fill);const g=!!s.fillEnabled,f=s.strokeWidth??0;i.lineWidth=f,a.stroke&&(i.strokeStyle=a.stroke);const y={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:g,stroke:f>0,transformData:u,position:{...d},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(y);const m=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;this.#X(m,y),this.#Y(v,y),this.#Q(v,y),this.#Z(v,y),this.#j(m,y),i.resetTransform()}#N(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#Q(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())}#Z(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#Y(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#q(t){let e,i;for(const s of this.#S)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.#U[0]=e,this.#U[1]=i,this.#U}}const Bs=new WeakMap;function Vs(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 Us{domElement;render;renderCanvas;size;zoom=1;#u;#K;#J;#tt;#p;#et;#it;#st;#nt;constructor(t,e){this.#p=t,this.#u=e,this.render=new Fs(t,e,this),this.#st={height:0,width:0};const i=e.retina.pixelRatio,s=this.#st;this.size={height:s.height*i,width:s.width*i},this.#K=!1,this.#it=[],this.#et="none"}get#at(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#K){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#ot();this.render.destroy(),this.#it=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#nt?this.#nt:{x:e*o/t,y:i*o/t}}init(){this.#rt(t=>{t.disconnect()}),this.#J=rt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#lt()}),this.resize(),this.#ct(),this.initBackground(),this.#rt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#ht(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Fe(this.#p,e.color);s.backgroundColor=n?Ne(n,t.actualOptions.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#it=[];for(const t of this.#u.plugins)t.resize&&this.#it.push(t)}loadCanvas(t){this.#K&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#K=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=Bs.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 Bs.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#tt=Pt(s.style));const n=this.#st,a=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=a.height,n.width=a.width);const o=this.#u.retina.pixelRatio,r=this.size;a.height=r.height=n.height*o,a.width=r.width=n.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#st,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=o.width,i.height=l.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#et=t,this.#lt())}setZoom(t,e){this.zoom=t,this.#nt=e}stop(){this.#rt(t=>{t.disconnect()}),this.#J=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#dt(),e&&await t.refresh()}#dt(){for(const t of this.#it)t.resize?.()}#ht(){const t=this.#u.actualOptions.hdr&&ot("(color-gamut: p3)")?.matches&&ot("(dynamic-range: high)")?.matches;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...t?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});const e=this.renderCanvas;e&&this.render.setContext(e.getContext("2d",this.render.settings))}#ct(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#at?this.#ut():this.#ot();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")}}}#lt(){const t=this.domElement;if(!t)return;this.#rt(t=>{t.disconnect()}),this.#ct(),this.initBackground();const e=this.#et;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#rt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#ot(){const t=this.domElement,e=this.#tt;t&&e&&Vs(t,e,!0)}#rt(t){this.#J&&t(this.#J)}#ut(){const t=this.domElement;t&&Vs(t,Mt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Hs{#u;#pt;#gt;#ft;constructor(t){this.#u=t,this.#pt={visibilityChange:()=>{this.#yt()},resize:()=>{this.#mt()}}}addListeners(){this.#vt(!0)}removeListeners(){this.#vt(!1)}#yt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(at().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#mt(){this.#ft&&(clearTimeout(this.#ft),this.#ft=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#ft=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*r)}#vt(t){const e=this.#pt;this.#Pt(t),xt(document,n,e.visibilityChange,t,!1)}#Pt(t){const e=this.#pt,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void xt(globalThis,s,e.resize,t);const n=i.canvas.domElement;this.#gt&&!t?(n&&this.#gt.unobserve(n),this.#gt.disconnect(),this.#gt=void 0):!this.#gt&&t&&n&&(this.#gt=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this.#mt()}),this.#gt.observe(n))}}function qs(t){if(!lt(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)}function Ws(t,e){const i=t%e;return i<0?i+e:i}function $s(t,e,i,s){const n=_e(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=mt(n.effect.type,t.id,a),t.shape=mt(n.shape.type,t.id,a);const o=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=mt(e,t.id,a);i&&(t.effect=i)}o.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=mt(e,t.id,a);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===h){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(E()*i.length)]}if(t.shape===h){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(E()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return pt({close:e.close},mt(n,i,s))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return pt({close:e.close},mt(n,i,s))}(t.shape,r,t.id,a):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class Gs{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;#wt={fillOpacity:1,opacity:1,strokeOpacity:1};#bt=z.origin;#Mt={sin:0,cos:0};#xt={a:1,b:0,c:0,d:1};#u;#p;constructor(t,e){this.#p=t,this.#u=e}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const i=this.#u,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.#u.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#zt(this.bubble.color??Ze(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.#wt.fillOpacity=i*s*e,this.#wt.opacity=i*e,this.#wt.strokeOpacity=i*n*e,this.#wt}getPosition(){return this.#bt.x=this.position.x+this.offset.x,this.#bt.y=this.position.y+this.offset.y,this.#bt.z=this.position.z,this.#bt}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#Mt.sin=Math.sin(t),this.#Mt.cos=Math.cos(t),this.#Mt}getStrokeColor(){return this.#zt(this.bubble.color??Ze(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#xt.a=e.cos*(t.a??c.a),this.#xt.b=i?e.sin*(t.b??1):t.b??c.b,this.#xt.c=i?-e.sin*(t.c??1):t.c??c.c,this.#xt.d=e.cos*(t.d??c.d),this.#xt}init(e,i,s,n){const a=this.#u;!function(e,i,s){e.id=i,e.group=s,e.justWarped=!1,e.effectClose=!0,e.shapeClose=!0,e.pathRotation=!1,e.lastPathTime=0,e.destroyed=!1,e.unbreakable=!1,e.isRotating=!1,e.rotation=0,e.misplaced=!1,e.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},e.size={value:1,max:1,min:1,enable:!1},e.outType=t.ParticleOutType.normal,e.ignoresResizeRatio=!0}(this,e,n),this.options=$s(this,a,this.#p,s),a.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(a.particleUpdaters,this),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#kt(i),this.initialVelocity=this.#Ct(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,a),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(a.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(a,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(a,this)}isInsideCanvas(t){return this.#Ot({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#Ot({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=Ws(t,u);return e>=Math.PI*o&&e<3*Math.PI*o}if(this.roll.horizontal){const e=Ws(t+Math.PI*o,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Ws(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#St(t,e){let i=0,s=t?z.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return z.create(i.x,i.y,e)}const t=et({size:l,position:s}),c=z.create(t.x,t.y,e);this.#Dt(c,r,o.left??o.default),this.#Dt(c,r,o.right??o.default),this.#It(c,r,o.top??o.default),this.#It(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}}#Ct(){const e=this.options.move,i=K(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=Q(q(e.angle.value)),n=Q(q(e.angle.offset)),a={left:n-s*o,right:n+s*o};return e.straight||(i.angle+=H(G(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=E()),i}#Dt(e,i,s){qs({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#It(e,i,s){qs({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#Tt(e,i){const s=this.getRadius(),n=this.#u.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"}}#_t(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Ot(t){const e=this.#Tt(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#_t(t.direction,t.outMode),l=a?this.#Rt(a(r),"shape"):void 0,c=o?this.#Rt(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}#zt(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?ii(t,this.roll.alter.type,this.roll.alter.value):t:t}#kt(e){const i=this.#u,s=Math.floor(q(this.options.zIndex.value)),n=this.#St(e,V(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={...vt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=Z(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=k.origin}#Rt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Ns{#Lt;#Et=new Map;#At=[];#Ft;#Bt;#Vt=[];#Ut;constructor(t){this.#Lt=t,this.#Ft=0,this.#Ut=0}clear(){this.#Et.clear();const t=this.#Bt;t&&(this.#Lt=t),this.#Bt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Ht(e,i);this.#Et.has(s)||this.#Et.set(s,[]),this.#Et.get(s)?.push(t)}query(t,e,i=[]){const s=this.#qt(t);if(!s)return i;const n=Math.floor(s.minX/this.#Lt),a=Math.floor(s.maxX/this.#Lt),o=Math.floor(s.minY/this.#Lt),r=Math.floor(s.maxY/this.#Lt);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#Et.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.#Wt(t.x,t.y,e),a=this.query(n,i,s);return this.#$t(),a}queryRectangle(t,e,i,s=[]){const n=this.#Gt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#$t(),a}setCellSize(t){this.#Bt=t}#Wt(t,e,i){return(this.#At[this.#Ft++]??=new Nt(t,e,i)).reset(t,e,i)}#Gt(t,e,i,s){return(this.#Vt[this.#Ut++]??=new jt(t,e,i,s)).reset(t,e,i,s)}#Ht(t,e){return`${Math.floor(t/this.#Lt)}_${Math.floor(e/this.#Lt)}`}#qt(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 jt){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}#$t(){this.#Ft=0,this.#Ut=0}}class js{checkParticlePositionPlugins;grid;#Nt;#u;#jt;#Xt;#Yt;#Qt;#Zt;#Kt;#p;#Jt;#te;#ee;#ie;#se;#ne;constructor(t,e){this.#p=t,this.#u=e,this.#Yt=0,this.#Nt=[],this.#Jt=[],this.#Xt=0,this.#jt=new Map,this.#Qt=new Map,this.#ne=this.#ae(this.#u.zLayers),this.grid=new Ns(100),this.checkParticlePositionPlugins=[],this.#Zt=[],this.#Kt=[],this.#ee=[],this.#te=[],this.#se=[]}get count(){return this.#Nt.length}addParticle(e,i,s,n){const a=this.#u.actualOptions.particles.number.limit.mode,o=void 0===s?this.#Xt:this.#jt.get(s)??this.#Xt,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.#Jt.pop()??new Gs(this.#p,this.#u);a.init(this.#Yt,e,i,s);let o=!0;return n&&(o=n(a)),o?(this.#Nt.push(a),this.#oe(a),this.#Yt++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this.#Jt.push(a)}catch(t){Tt().warning(`error adding particle: ${t}`)}}clear(){this.#Nt=[],this.#Qt.clear(),this.#re(this.#u.zLayers)}destroy(){this.#Nt=[],this.#Jt.length=0,this.#Qt.clear(),this.#ne=[],this.checkParticlePositionPlugins=[],this.#Zt=[],this.#Kt=[],this.#ee=[],this.#te=[],this.#se=[]}drawParticles(t){for(let e=this.#ne.length-1;e>=0;e--){const i=this.#ne[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Nt.filter(t)}find(t){return this.#Nt.find(t)}get(t){return this.#Nt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#se=[],this.#Kt=[],this.#ee=[],this.#Zt=[],this.#te=[],this.#Qt.clear(),this.#re(t.zLayers),this.grid=new Ns(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#se.push(e),e.particleUpdate&&this.#Kt.push(e),e.postUpdate&&this.#ee.push(e),e.particleReset&&this.#Zt.push(e),e.postParticleUpdate&&this.#te.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#Nt.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.#le(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=_e(this.#p,this.#u,s);this.#ce(n,i,t)}this.#ce(t.particles,i)}setResizeFactor(t){this.#ie=t}update(t){this.grid.clear();for(const e of this.#se)e.update?.(t);const e=this.#he(t);for(const e of this.#ee)e.postUpdate?.(t);if(this.#de(t,e),e.size)for(const t of e)this.remove(t);this.#ie=void 0}#ue(...t){this.#Jt.push(...t)}#ce(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Xt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#jt.set(i,s?.number.limit.value??n.limit.value));const a=this.#pe(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.#Xt=n.limit.value*a:this.#jt.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)}#ae(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#ge(t){const e=this.#ne.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#pe(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1}#oe(t){const e=this.#ge(t.position.z),i=this.#ne[e];i&&(i.push(t),this.#Qt.set(t.id,e))}#le(e,i,s){const n=this.#Nt[e];return!!n&&(n.group===i&&(this.#Nt.splice(e,1),this.#fe(n),n.destroy(s),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this.#ue(n),!0))}#fe(t){const e=this.#Qt.get(t.id)??this.#ge(t.position.z),i=this.#ne[e];if(!i)return void this.#Qt.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Qt.delete(t.id)}#re(t){const e=Math.max(Math.floor(t),1);if(this.#ne.length===e)for(const t of this.#ne)t.length=0;else this.#ne=this.#ae(e)}#ye(t){const e=this.#ge(t.position.z),i=this.#Qt.get(t.id);if(void 0===i)return void this.#oe(t);if(i===e)return;const s=this.#ne[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#ne[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#Qt.set(t.id,e)}else this.#Qt.set(t.id,e)}#he(t){const e=new Set,i=this.#ie;for(const s of this.#Nt){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.#Zt)t.particleReset?.(s);for(const e of this.#Kt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#de(t,e){for(const i of this.#Nt)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#te)e.postParticleUpdate?.(i,t);this.#ye(i)}}}class Xs{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=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 Ys(t){return!t.destroyed}function Qs(t,e,...i){const s=new Re(t,e);return Yt(s,...i),s}var Zs=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#me;#ve;#Pe={value:0,factor:0};#we;#be;#Me;#xe;#ze;#ke;#Ce;#Oe;#Se;#De;#Ie;#p;#Te;#_e;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this.#p=s,this.#we=i,this.#Se=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.#Te=!1,this.#me=0,this.#Me=0,this.#Oe=0,this.#ze=!0,this.started=!1,this.destroyed=!1,this.#Ie=!0,this.#Ce=0,this.zLayers=100,this.pageHidden=!1,this.#_e=o,this.#ke=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Xs(this),this.canvas=new Us(this.#p,this),this.particles=new js(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#De=Qs(this.#p,this),this.actualOptions=Qs(this.#p,this),this.#xe=new Hs(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#Ie&&!this.pageHidden&&Ys(this)}get options(){return this.#De}get sourceOptions(){return this.#_e}addLifeTime(t){this.#Oe+=t}alive(){return!this.#Me||this.#Oe<=this.#Me}destroy(e=!0){if(Ys(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.#Se(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#we(t,{container:this,data:e})}draw(t){if(!Ys(this))return;let e=t;this.#be=F(t=>{e&&(this.#Ce=void 0,e=!1),this.#Re(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(!Ys(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.#De=Qs(this.#p,this,this.#ke,this.sourceOptions),this.actualOptions=Qs(this.#p,this,this.#De),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.#Me=q(s)*r,this.#me=q(i)*r,this.#Oe=0,this.fpsLimit=n>0?n:120,this.#Te=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(Ys(this)&&(void 0!==this.#be&&(B(this.#be),this.#be=void 0),!this.#Ie)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Ie=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!Ys(this))return;const i=this.#Ie||e;if(!this.#ze||this.actualOptions.autoPlay){if(this.#Ie&&(this.#Ie=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#ze=!1}async refresh(){if(Ys(this))return this.stop(),this.start()}async reset(t){if(Ys(this))return this.#ke=t,this.#_e=t,this.#De=Qs(this.#p,this,this.#ke,this.sourceOptions),this.actualOptions=Qs(this.#p,this,this.#De),this.refresh()}async start(){Ys(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#xe.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#ve=setTimeout(()=>{i()},this.#me)}))}stop(){if(Ys(this)&&this.started){this.#ve&&(clearTimeout(this.#ve),this.#ve=void 0),this.#ze=!0,this.started=!1,this.#xe.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.#_e=this.#De,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Re(t){try{if(!this.#Te&&void 0!==this.#Ce&&t<this.#Ce+r/this.fpsLimit)return void this.draw(!1);if(this.#Ce??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this.#Pe,t-this.#Ce,this.fpsLimit,this.#Te),this.addLifeTime(this.#Pe.value),this.#Ce=t,this.#Pe.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#Pe),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Tt().error("error in animation loop",t)}}}});var Ks=Object.freeze({__proto__:null,ParticlesInstance:class{#u;#Le;constructor(t,e){this.#u=t,this.#Le=e}get destroyed(){return this.#u.destroyed}destroy(){var t;this.#u.destroy(),t=this.#Le,ni.delete(t)}pause(){this.#u.pause()}play(){this.#u.play()}stop(){this.#u.stop()}}});var Js=Object.freeze({__proto__:null,BlendPluginInstance:class{#u;#Ee;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#Ee&&(t.globalCompositeOperation=this.#Ee)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Ee=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function tn(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=V(t.velocity.x,-1,1),t.velocity.y=V(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=l*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(a);const{position:p}=t;p.addTo(h),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}var en=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(e){const i=e.options.move,s=i.gravity,n=i.path;if(e.moveDecay=1-q(i.decay),e.pathDelay=q(n.delay.value)*r,n.generator){let t=this.pathGenerators.get(n.generator);t||(t=this.availablePathGenerators.get(n.generator),t&&(this.pathGenerators.set(n.generator,t),t.init())),e.pathGenerator=t}e.gravity={enable:s.enable,acceleration:q(s.acceleration),inverse:s.inverse},function(e,i){const s=i.options.move.spin;if(!s.enable)return;const n=s.position??{x:50,y:50},a={x:.01*n.x*e.canvas.size.width,y:.01*n.y*e.canvas.size.height},o=X(i.getPosition(),a),r=q(s.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:a,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:E()*u,radius:o,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options.move;if(!s.enable)return;const n=this.#u,a=function(t){return t.slow.inRange?t.slow.factor:1}(e),r=n.retina.reduceFactor,l=e.retina.moveSpeed,c=e.retina.moveDrift,h=e.size.max,d=l*(s.size?e.getRadius()/h:1)*a*(i.factor||1)*o,u=e.retina.maxSpeed;s.spin.enable?function(e,i,s,n){if(!i.spin)return;const a=i.spin.direction===t.RotateDirection.clockwise,r={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*r.x(i.spin.angle)*n,i.position.y=i.spin.center.y+i.spin.radius*r.y(i.spin.angle)*n,i.spin.radius+=i.spin.acceleration*n;const l=Math.max(e.canvas.size.width,e.canvas.size.height),c=l*o;i.spin.radius>c?(i.spin.radius=c,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*s*(1-i.spin.radius/l)}(n,e,d,r):tn(e,s,d,u,c,r,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=N(e,t.position),n=Math.abs(i),a=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&n>=l||c&&a>=c)&&!t.misplaced)t.misplaced=!!l&&n>l||!!c&&a>c,l&&(t.velocity.x=t.velocity.y*o-t.velocity.x),c&&(t.velocity.y=t.velocity.x*o-t.velocity.y);else if((!l||n<l)&&(!c||a<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-E()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-E())}}(e)}preInit(){return this.#Ae()}redrawInit(){return this.#Ae()}update(){for(const t of this.pathGenerators.values())t.update()}async#Ae(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});class sn{#Fe=!0;#Be;#u;#pt;#Ve;#Ue;constructor(t,e){this.#u=t,this.#Be=[],this.#Ve=e,this.#Ue=new Map,this.#pt={mouseDown:()=>{this.#He()},mouseLeave:()=>{this.#qe()},mouseMove:t=>{this.#We(t)},mouseUp:t=>{this.#$e(t)},touchStart:t=>{this.#Ge(t)},touchMove:t=>{this.#We(t)},touchEnd:t=>{this.#Ne(t)},touchCancel:t=>{this.#Ne(t)},touchEndClick:t=>{this.#je(t)},visibilityChange:()=>{this.#yt()}}}addListeners(){this.#vt(!0)}init(){this.#Be.length=0;for(const t of this.#u.plugins.filter(t=>!!t.clickPositionValid))this.#Be.push(t)}removeListeners(){this.#vt(!1)}#Xe(t){const e=this.#u,i=this.#Ve,s=e.actualOptions;if(this.#Fe){const t=i.interactivityData.mouse,e=t.position;if(!e)return;t.clickPosition={...e},t.clickTime=performance.now();const n=s.interactivity?.events.onClick;if(!n?.mode)return;yt(n.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this.#qe()},500)}#yt(){this.#qe()}#Ye(t){const e=this.#pt,i=this.#u,s=this.#Ve,n=i.actualOptions,a=s.interactivityData.element;if(!a)return;const o=a,r=i.canvas;r.setPointerEvents(o===r.domElement?"initial":"none"),(!t||n.interactivity?.events.onHover.enable||n.interactivity?.events.onClick.enable)&&(xt(a,os,e.mouseMove,t),xt(a,rs,e.touchStart,t),xt(a,cs,e.touchMove,t),t?n.interactivity?.events.onClick.enable?(xt(a,ls,e.touchEndClick,t),xt(a,ns,e.mouseUp,t),xt(a,ss,e.mouseDown,t)):xt(a,ls,e.touchEnd,t):(xt(a,ls,e.touchEndClick,t),xt(a,ns,e.mouseUp,t),xt(a,ss,e.mouseDown,t),xt(a,ls,e.touchEnd,t)),xt(a,as,e.mouseLeave,t),xt(a,hs,e.touchCancel,t))}#vt(t){const e=this.#pt,i=this.#u,s=this.#Ve,a=i.actualOptions,o=a.interactivity?.detectsOn,r=i.canvas.domElement;o===Xi.window?s.interactivityData.element=at():o===Xi.parent&&r?s.interactivityData.element=r.parentElement??r.parentNode:s.interactivityData.element=r,this.#Ye(t),xt(document,n,e.visibilityChange,t,!1)}#He(){const{interactivityData:t}=this.#Ve,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position}#$e(t){const e=this.#u,i=this.#Ve,s=e.actualOptions,{mouse:n}=i.interactivityData;n.inside=!0;let a=!1;const o=n.position;if(o&&s.interactivity?.events.onClick.enable){for(const t of this.#Be)if(a=t.clickPositionValid?.(o)??!1,a)break;a||this.#Xe(t),n.clicking=!1}}#qe(){const{interactivityData:t}=this.#Ve,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=as,e.inside=!1,e.clicking=!1}#We(t){const e=this.#u,i=this.#Ve,s=e.actualOptions,n=i.interactivityData,a=e.canvas.domElement;if(!n.element)return;let o;if(n.mouse.inside=!0,t.type.startsWith("pointer")){this.#Fe=!0;const e=t;if(n.element===at()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(s.interactivity?.detectsOn===Xi.parent){const t=e.target,i=e.currentTarget;if(a){const s=t.getBoundingClientRect(),n=i.getBoundingClientRect(),r=a.getBoundingClientRect();o={x:e.offsetX+2*s.left-(n.left+r.left),y:e.offsetY+2*s.top-(n.top+r.top)}}else o={x:e.offsetX,y:e.offsetY}}else e.target===a&&(o={x:e.offsetX,y:e.offsetY})}else if(this.#Fe="touchmove"!==t.type,a){const e=t,i=e.touches[e.touches.length-1],s=a.getBoundingClientRect();if(!i)return;o={x:i.clientX-s.left,y:i.clientY-s.top}}const r=e.retina.pixelRatio;o&&(o.x*=r,o.y*=r),n.mouse.position=o,n.status=os}#Ne(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Ue.delete(t.identifier);this.#qe()}#je(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Ue.delete(t.identifier);this.#$e(t)}#Ge(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Ue.set(t.identifier,performance.now());this.#We(t)}}class nn{interactivityData;#Qe;#u;#xe;#Ze;#Ke;#Je;#ti;#p;constructor(t,e){this.#u=e,this.#p=t,this.#Ke=[],this.#Ze=[],this.#ti=[],this.#Qe=new Map,this.#xe=new sn(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this.#Je=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(t=>{this.#ei(t)})}addClickHandler(t){const e=this.#u,i=this.interactivityData;if(e.destroyed)return;const s=i.element;if(!s)return;const n=(i,s,n)=>{if(e.destroyed)return;const a=e.retina.pixelRatio,o={x:s.x*a,y:s.y*a},r=e.particles.grid.queryCircle(o,n*a);t(i,r)};let a=!1,o=!1;this.#Qe.set("click",t=>{if(e.destroyed)return;const i=t,s={x:i.offsetX,y:i.offsetY};n(t,s,1)}),this.#Qe.set(rs,()=>{e.destroyed||(a=!0,o=!1)}),this.#Qe.set(cs,()=>{e.destroyed||(o=!0)}),this.#Qe.set(ls,t=>{if(!e.destroyed){if(a&&!o){const i=t,s=i.touches[i.touches.length-1];if(!s)return;const a=e.canvas.domElement,o=a?a.getBoundingClientRect():void 0,r={x:s.clientX-(o?o.left:0),y:s.clientY-(o?o.top:0)};n(t,r,Math.max(s.radiusX,s.radiusY))}a=!1,o=!1}}),this.#Qe.set(hs,()=>{e.destroyed||(a=!1,o=!1)});for(const[t,e]of this.#Qe)s.addEventListener(t,e)}addListeners(){this.#xe.addListeners()}clearClickHandlers(){const t=this.#u,e=this.interactivityData;if(!t.destroyed){for(const[t,i]of this.#Qe)e.element?.removeEventListener(t,i);this.#Qe.clear()}}externalInteract(t){for(const e of this.#Ze){const i=this.interactivityData;e.isEnabled(i)&&e.interact(i,t)}}handleClickMode(t){if(this.#u.destroyed)return;const e=this.interactivityData;for(const i of this.#Ze)i.handleClickMode?.(t,e)}init(){this.#xe.init();for(const t of this.#Ke){switch(t.type){case Yi.external:this.#Ze.push(t);break;case Yi.particles:this.#ti.push(t)}t.init()}}async initInteractors(){const t=await(this.#p.getInteractors?.(this.#u,!0));t&&(this.#Ke=t,this.#Ze=[],this.#ti=[])}particlesInteract(t,e){const i=this.interactivityData;for(const i of this.#Ze)i.clear(t,e);for(const s of this.#ti)s.isEnabled(t,i)&&s.interact(t,i,e)}removeListeners(){this.#xe.removeListeners()}reset(t){const e=this.interactivityData;for(const i of this.#Ze)i.isEnabled(e)&&i.reset(e,t);for(const i of this.#ti)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Je&&this.#Je.observe(t.element)}stopObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Je&&this.#Je.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this.#Ke)e.maxDistance>t&&(t=e.maxDistance);const e=this.#u;e.particles.grid.setCellSize(t*e.retina.pixelRatio)}#ei(t){const e=this.#u;if(!e.destroyed&&e.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivityData.element&&(i.isIntersecting?e.play():e.pause())}}var an=Object.freeze({__proto__:null,InteractivityPluginInstance:class{interactionManager;#u;#p;constructor(t,e){this.#u=e,this.#p=t,this.interactionManager=new nn(t,e),this.#u.addClickHandler=t=>{this.interactionManager.addClickHandler(t)}}addClickHandler(t){this.interactionManager.addClickHandler(t)}clearClickHandlers(){this.interactionManager.clearClickHandlers()}destroy(){this.clearClickHandlers(),this.#p.interactors?.delete(this.#u)}particleCreated(t){const e=t,i=new ts(this.#p,this.#u);i.load(this.#u.actualOptions.interactivity),i.load(e.options.interactivity),e.interactivity=i}particleReset(t){this.interactionManager.reset(t)}postParticleUpdate(t,e){this.interactionManager.particlesInteract(t,e)}postUpdate(t){this.interactionManager.externalInteract(t),this.interactionManager.updateMaxDistance()}async preInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}async redrawInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}start(){return this.interactionManager.addListeners(),this.interactionManager.startObserving(),Promise.resolve()}stop(){this.interactionManager.removeListeners(),this.interactionManager.stopObserving()}}});var on=Object.freeze({__proto__:null,OverlapPluginInstance:class{#u;constructor(t){this.#u=t}checkParticlePosition(t,e,i){return!this.#ii(t,e,i)}#ii(t,e,i){const s=t.options.collisions;if(!s?.enable)return!1;const n=s.overlap;if(n.enable)return!1;const a=n.retries;if(a>=0&&i>a)throw new Error("Particle is overlapping and can't be placed");return!!this.#u.particles.find(i=>X(e,i.position)<t.getRadius()+i.getRadius())}}});function rn(t,e){const i=(s=t.map(t=>t.id),[...s].sort((t,e)=>t-e).join("_"));var s;let n=e.get(i);return void 0===n&&(n=E(),e.set(i,n)),n}var ln=Object.freeze({__proto__:null,LinkInstance:class{#si=new Map;#u;#ni;#p;constructor(t,e){this.#p=t,this.#u=e,this.#ni={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:s}=e;if(!i?.length||!s.links)return;const n=s.links,a=e.retina.linksWidth??0,r=e.getPosition(),c=e.options.twinkle?.links,h=n.triangles.enable,d=h?new Set(i.map(t=>t.destination.id)):null,u=t.globalAlpha;let p="",g=-1,f=-1,y=!1;const m=()=>{y&&(t.stroke(),y=!1)};for(const u of i){if(n.frequency<1&&this.#ai(e,u.destination)>n.frequency)continue;const i=u.destination.getPosition();if(h&&!u.isWarped&&d&&(m(),this.#oi(s,e,u,d,r,i,t)),u.opacity<=0||a<=0)continue;if(!n.enable)continue;let v=u.opacity,P=u.color;const w=c?.enable&&E()<c.frequency?Fe(this.#p,c.color):void 0;if(c&&w&&(P=w,v=q(c.opacity)),!P){const t=void 0!==n.id?this.#u.particles.linksColors.get(n.id):this.#u.particles.linksColor;P=Ye(e,u.destination,t)}if(!P)continue;const b=this.#ri(P);if(b===p&&a===g&&v===f||(m(),t.strokeStyle=b,t.lineWidth=a,t.globalAlpha=v,p=b,g=a,f=v,t.beginPath(),y=!0),u.isWarped){const e=this.#u.canvas.size,s=i.x-r.x,n=i.y-r.y;let a=l.x,c=l.y;Math.abs(s)>e.width*o&&(a=s>0?-e.width:e.width),Math.abs(n)>e.height*o&&(c=n>0?-e.height:e.height),t.moveTo(r.x,r.y),t.lineTo(i.x+a,i.y+c),t.moveTo(r.x-a,r.y-c),t.lineTo(i.x,i.y)}else t.moveTo(r.x,r.y),t.lineTo(i.x,i.y)}m(),t.globalAlpha=u}init(){return this.#ni.links.clear(),this.#ni.triangles.clear(),this.#si.clear(),Promise.resolve()}particleCreated(t){if(t.links=[],!t.options.links)return;t.linksDistance=t.options.links.distance,t.linksWidth=t.options.links.width;const e=this.#u.retina.pixelRatio;t.retina.linksDistance=t.linksDistance*e,t.retina.linksWidth=t.linksWidth*e}particleDestroyed(t){t.links=[]}#oi(t,e,i,s,n,a,r){const l=i.destination,c=t.links?.triangles;if(!c?.enable||!l.options.links?.triangles.enable)return;const h=l.links;if(h?.length)for(const d of h){if(d.isWarped||this.#ai(l,d.destination)>l.options.links.frequency||!s.has(d.destination.id))continue;const h=d.destination;if(this.#li(e,l,h)>(t.links?.triangles.frequency??0))continue;const u=c.opacity??(i.opacity+d.opacity)*o,p=Fe(this.#p,c.color)??i.color;if(!p||u<=0)continue;const g=h.getPosition();r.save(),r.fillStyle=this.#ri(p),r.globalAlpha=u,r.beginPath(),r.moveTo(n.x,n.y),r.lineTo(a.x,a.y),r.lineTo(g.x,g.y),r.closePath(),r.fill(),r.restore()}}#ri(t){const e=`${t.r},${t.g},${t.b}`;let i=this.#si.get(e);return i||(i=Ne(t,this.#u.hdr),this.#si.set(e,i)),i}#ai(t,e){return rn([t,e],this.#ni.links)}#li(t,e,i){return rn([t,e,i],this.#ni.triangles)}}});t.AnimatableColor=oe,t.AnimationOptions=ee,t.AnimationValueWithRandom=ye,t.Background=re,t.BaseRange=Gt,t.Circle=Nt,t.ColorAnimation=se,t.Fill=de,t.FullScreen=le,t.HslAnimation=ne,t.Move=be,t.MoveAngle=ue,t.MoveCenter=pe,t.MoveGravity=ge,t.MovePath=ve,t.OptionLoader=Xt,t.Options=Re,t.OptionsColor=ae,t.OutModes=Pe,t.Paint=xe,t.ParticlesBounce=ke,t.ParticlesBounceFactor=ze,t.ParticlesDensity=Ce,t.ParticlesNumber=Se,t.ParticlesNumberLimit=Oe,t.ParticlesOptions=Te,t.RangedAnimationOptions=ie,t.RangedAnimationValueWithRandom=me,t.Rectangle=jt,t.ResizeEvent=ce,t.Shape=De,t.Spin=we,t.Stroke=Me,t.ValueWithRandom=fe,t.Vector=k,t.Vector3d=z,t.ZIndex=Ie,t.alterHsl=ii,t.animate=F,t.areBoundsInside=dt,t.calcExactPositionOrRandomFromSize=et,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=tt,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 tt({size:t.size,position:e})},t.calculateBounds=ut,t.cancelAnimation=B,t.canvasFirstIndex=0,t.canvasTag=f,t.checkDistance=Y,t.circleBounce=ft,t.circleBounceDataFromParticle=gt,t.clamp=V,t.cloneStyle=Pt,t.collisionVelocity=J,t.colorMix=Xe,t.colorToRgb=Be,t.countOffset=1,t.decayOffset=1,t.deepExtend=pt,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=Q,t.deleteCount=1,t.double=2,t.doublePI=u,t.empty=0,t.executeOnSingleOrMultiple=yt,t.generatedAttribute=e,t.generatedFalse=g,t.generatedTrue=p,t.getDistance=X,t.getDistanceSq=j,t.getDistances=N,t.getFullScreenStyle=Mt,t.getHslAnimationFromHsl=Ke,t.getHslFromAnimation=Ze,t.getItemMapFromInitializer=kt,t.getItemsFromInitializer=zt,t.getLinkColor=Ye,t.getLinkRandomColor=Qe,t.getLogger=Tt,t.getParticleBaseVelocity=K,t.getParticleDirectionAngle=Z,t.getPosition=vt,t.getRandom=E,t.getRandomFn=function(){return R},t.getRandomInRange=A,t.getRandomRgbColor=Ge,t.getRangeMax=$,t.getRangeMin=W,t.getRangeValue=q,t.getStyleFromHsl=je,t.getStyleFromRgb=Ne,t.hMax=m,t.hMin=0,t.hPhase=60,t.half=o,t.hslToRgb=We,t.hslaToRgba=$e,t.identity=1,t.inverseFactorNumerator=1,t.isArray=I,t.isBoolean=C,t.isFunction=function(t){return"function"==typeof t},t.isInArray=lt,t.isNull=T,t.isNumber=S,t.isObject=D,t.isPointInside=ht,t.isString=O,t.itemFromArray=ct,t.itemFromSingleOrMultiple=mt,t.lFactor=1,t.lMax=P,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){void 0!==i&&(t[e]=pt(t[e]??{},i))},t.loadLazyProperty=Jt,t.loadMinIndex=0,t.loadNestedProperty=Kt,t.loadOptionProperty=te,t.loadOptions=Yt,t.loadParticlesOptions=_e,t.loadProperty=Qt,t.loadRandomFactor=1e4,t.loadRangeProperty=Zt,t.manageListener=xt,t.maxNits=400,t.midColorValue=d,t.millisecondsToSeconds=r,t.minCount=0,t.minDistance=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minRadius=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=U,t.none=0,t.one=1,t.originPoint=l,t.parseAlpha=it,t.particles=Ls,t.percentDenominator=a,t.phaseNumerator=1,t.quarter=w,t.randomColorValue=h,t.randomInRangeValue=H,t.rangeColorToHsl=Ve,t.rangeColorToRgb=Fe,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=y,t.rgbToHsl=Ue,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=at,t.safeMatchMedia=ot,t.safeMutationObserver=rt,t.setAnimationFunctions=function(t,e){L.nextFrame=t,L.cancel=e},t.setLogger=function(t){t.debug&&(It.debug=Dt(t.debug)),t.error&&(It.error=Dt(t.error)),t.info&&(It.info=Dt(t.info)),t.log&&(It.log=Dt(t.log)),t.trace&&(It.trace=Dt(t.trace)),t.verbose&&(It.verbose=Dt(t.verbose)),t.warning&&(It.warning=Dt(t.warning))},t.setRandom=function(t=Math.random){R=t},t.setRangeValue=G,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Ae(t,e)?.a},t.stringToRgb=He,t.threeQuarter=b,t.triple=3,t.tryCountIncrement=1,t.tsParticles=si,t.updateColor=ei,t.updateColorValue=ti,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{loadExtendProperty:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadExtendProperty,loadLazyProperty:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadLazyProperty,loadMinIndex:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadMinIndex,loadNestedProperty:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadNestedProperty,loadOptionProperty:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadOptionProperty,loadOptions:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadOptions,loadParticlesOptions:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadParticlesOptions,loadProperty:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadProperty,loadRandomFactor:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadRandomFactor,loadRangeProperty:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadRangeProperty,tsParticles:(globalThis.__tsParticlesInternals.bundles.particles||{}).tsParticles}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.particles||{}),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.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.particles=t.__tsParticlesInternals.bundles.particles||{}))}(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},d="random",h="mid",u=2*Math.PI,p="true",g="false",f="canvas",y=255,m=360,v=100,w=100,P=.25,b=.75,M=400;var x;function k(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,k(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,k(t))}add(t){return z.create(this.x+t.x,this.y+t.y,this.z+k(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=k(t)}copy(){return z.clone(this)}div(t){return z.create(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=k(t)}sub(t){return z.create(this.x-t.x,this.y-t.y,this.z-k(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=k(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class C extends z{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return C.create(l.x,l.y)}static clone(t){return C.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new C(t,e??l.y):new C(t.x,t.y)}}function O(t){return"boolean"==typeof t}function D(t){return"string"==typeof t}function S(t){return"number"==typeof t}function I(t){return"object"==typeof t&&null!==t}function T(t){return Array.isArray(t)}function _(t){return null==t}const L=Math.PI/180;let R=Math.random;const E={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return U(R(),0,1-Number.EPSILON)}function F(t,e){return A()*(e-t)+t}function B(t){return E.nextFrame(t)}function V(t){E.cancel(t)}function U(t,e,i){return Math.min(Math.max(t,e),i)}function H(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function q(t){const e=G(t);let i=$(t);return e===i&&(i=0),F(i,e)}function W(t){return S(t)?t:q(t)}function $(t){return S(t)?t:t.min}function G(t){return S(t)?t:t.max}function j(t,e){if(t===e||void 0===e&&S(t))return t;const i=$(t),s=G(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:j(i,s)}function N(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function X(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function Y(t,e){return Math.sqrt(X(t,e))}function Q(t,e,i){return X(t,e)<=i*i}function Z(t){return t*L}function K(e,i,s){if(S(e))return Z(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*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()*u}}function J(t){const e=C.origin;return e.length=1,e.angle=t,e}function tt(t,e,i,s){return C.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function et(t){return{x:(t.position?.x??A()*a)*t.size.width/a,y:(t.position?.y??A()*a)*t.size.height/a}}function it(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}function st(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1}var nt,at;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";function ot(){return globalThis.document}function rt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function lt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function ct(t,e){return t===e||T(e)&&e.includes(t)}function dt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(A()*t.length)]}function ht(t,e,i,s,n){return ut(pt(t,s??0),e,i,n)}function ut(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 pt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function gt(t,...e){for(const i of e){if(_(i))continue;if(!I(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):I(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return I(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if("__proto__"===t||"constructor"===t||"prototype"===t)continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if("__proto__"===s||"constructor"===s||"prototype"===s)continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>gt(void 0,t)):gt(e[s],n)}}return t}function ft(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:C.create(W(t.options.bounce.horizontal.value),W(t.options.bounce.vertical.value))}}function yt(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=N(a,n);if(i*o+s*r<0)return;const l=-Math.atan2(r,o),c=t.mass,d=e.mass,h=t.velocity.rotate(l),u=e.velocity.rotate(l),p=tt(h,u,c,d),g=tt(u,h,c,d),f=p.rotate(-l),y=g.rotate(-l);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=y.x*e.factor.x,e.velocity.y=y.y*e.factor.y}function mt(t,e){return T(t)?t.map((t,i)=>e(t,i)):e(t,0)}function vt(t,e,i){return T(t)?dt(t,e,i):t}function wt(e,i){return function(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}}(e,i)}function Pt(t){const e=ot().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||_(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}let bt,Mt;function xt(t){if(bt!==t||!Mt){bt=t;const e=ot().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}Mt=e}return Mt}function kt(t,e,i,s,n){if(s){let s={passive:!0};O(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 zt(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 Ct(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 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 St{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 Ct(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 Ct(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return zt(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 It=t=>(...e)=>{t(...e)},Tt={debug:It(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:It(console.info),log:It(console.log),trace:It(console.trace),verbose:It(console.log),warning:It(console.warn)};function _t(){return Tt}const Lt="100%";class Rt{pluginManager=new St(this);#d=[];#h=new Ot;#o=!1;get items(){return this.#d}get version(){return"4.3.1"}addEventListener(t,e){this.#h.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.#h.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 tn}),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():(_t().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,d=c.findIndex(t=>t.id.description===n),h=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(h);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(d>=0){const t=this.item(d),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(d,e,h)}else c.push(h);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=ot();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)s=t,s.dataset[e]??=g,s.dataset[e]===p&&(s.style.width||=Lt,s.style.height||=Lt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(f).item(0);n?(s=n,s.dataset[e]=g):(s=i.createElement(f),s.dataset[e]=p,t.appendChild(s)),s.style.width||=Lt,s.style.height||=Lt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=ot();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 h.canvas.loadCanvas(u),await h.start(),h}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#h.removeEventListener(t,e)}}var Et,At,Ft,Bt,Vt,Ut,Ht,qt,Wt,$t,Gt,jt;!function(t){t.circle="circle",t.rectangle="rectangle"}(Et||(Et={}));class Nt{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 Xt extends Nt{radius;constructor(t,e,i){super(t,e,Et.circle),this.radius=i}contains(t){return Q(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 Xt||t.type===Et.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Yt||t.type===Et.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 Yt extends Nt{size;constructor(t,e,i,s){super(t,e,Et.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 Xt)return t.intersects(this);if(!(t instanceof Yt))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,(At=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",At.counterClockwise="counter-clockwise",At.random="random",t.AnimationMode=void 0,(Ft=t.AnimationMode||(t.AnimationMode={})).auto="auto",Ft.increase="increase",Ft.decrease="decrease",Ft.random="random",t.LimitMode=void 0,(Bt=t.LimitMode||(t.LimitMode={})).delete="delete",Bt.wait="wait",t.OutMode=void 0,(Vt=t.OutMode||(t.OutMode={})).bounce="bounce",Vt.none="none",Vt.out="out",Vt.destroy="destroy",Vt.split="split",t.AlterType=void 0,(Ut=t.AlterType||(t.AlterType={})).darken="darken",Ut.enlighten="enlighten",t.DestroyType=void 0,(Ht=t.DestroyType||(t.DestroyType={})).none="none",Ht.max="max",Ht.min="min",t.GradientType=void 0,(qt=t.GradientType||(t.GradientType={})).linear="linear",qt.radial="radial",qt.random="random",t.ParticleOutType=void 0,(Wt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Wt.inside="inside",Wt.outside="outside",t.StartValueType=void 0,($t=t.StartValueType||(t.StartValueType={})).max="max",$t.min="min",$t.random="random",t.AnimationStatus=void 0,(Gt=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",Gt.decreasing="decreasing",t.DrawLayer=void 0,(jt=t.DrawLayer||(t.DrawLayer={}))[jt.BackgroundElement=0]="BackgroundElement",jt[jt.BackgroundDraw=1]="BackgroundDraw",jt[jt.BackgroundMask=2]="BackgroundMask",jt[jt.CanvasSetup=3]="CanvasSetup",jt[jt.PluginContent=4]="PluginContent",jt[jt.Particles=5]="Particles",jt[jt.CanvasCleanup=6]="CanvasCleanup",jt[jt.Foreground=7]="Foreground";class Qt{load(t){_(t)||this.doLoad(t)}}function Zt(t,...e){for(const i of e)t.load(i)}function Kt(t,e,i){void 0!==i&&(t[e]=i)}function Jt(t,e,i){void 0!==i&&(t[e]=j(i))}function te(t,e,i){void 0!==i&&t[e].load(i)}function ee(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function ie(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class se extends Qt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Jt(this,"count",t.count),Kt(this,"enable",t.enable),Jt(this,"speed",t.speed),Jt(this,"decay",t.decay),Jt(this,"delay",t.delay),Kt(this,"sync",t.sync)}}class ne extends se{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),Kt(this,"mode",t.mode),Kt(this,"startValue",t.startValue)}}class ae extends se{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Kt(this,"max",t.max),Kt(this,"min",t.min),Jt(this,"offset",t.offset)}}class oe extends Qt{h=new ae(0,m);l=new ae(0,w);s=new ae(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class re extends Qt{value="";static create(t,e){const i=new re;return i.load(t),void 0!==e&&(D(e)||T(e)?i.load({value:e}):i.load(e)),i}doLoad(t){_(t.value)||(this.value=t.value)}}class le extends re{animation=new oe;static create(t,e){const i=new le;return i.load(t),void 0!==e&&(D(e)||T(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class ce extends Qt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new re,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=re.create(this.color,t.color)),Kt(this,"element",t.element),Kt(this,"draw",t.draw),Kt(this,"image",t.image),Kt(this,"position",t.position),Kt(this,"repeat",t.repeat),Kt(this,"size",t.size),Kt(this,"opacity",t.opacity)}}class de extends Qt{enable=!0;zIndex=0;doLoad(t){Kt(this,"enable",t.enable),Kt(this,"zIndex",t.zIndex)}}class he extends Qt{delay=.5;enable=!0;doLoad(t){Kt(this,"delay",t.delay),Kt(this,"enable",t.enable)}}class ue extends Qt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=gt(this.options[t]??{},i))}Kt(this,"close",t.close),Kt(this,"type",t.type)}}class pe extends Qt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=le.create(this.color,t.color)),Kt(this,"enable",t.enable),Jt(this,"opacity",t.opacity)}}class ge extends Qt{offset=0;value=90;doLoad(t){Jt(this,"offset",t.offset),Jt(this,"value",t.value)}}class fe extends Qt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){Kt(this,"x",t.x),Kt(this,"y",t.y),Kt(this,"mode",t.mode),Kt(this,"radius",t.radius)}}class ye extends Qt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Jt(this,"acceleration",t.acceleration),Kt(this,"enable",t.enable),Kt(this,"inverse",t.inverse),Jt(this,"maxSpeed",t.maxSpeed)}}class me extends Qt{value=0;doLoad(t){_(t.value)||(this.value=j(t.value))}}class ve extends me{animation=new se;doLoad(t){super.doLoad(t),te(this,"animation",t.animation)}}class we extends ve{animation=new ne}class Pe extends Qt{clamp=!0;delay=new me;enable=!1;generator;options={};doLoad(t){Kt(this,"clamp",t.clamp),this.delay.load(t.delay),Kt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=gt(this.options,t.options))}}class be extends Qt{bottom;default=t.OutMode.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class Me extends Qt{acceleration=0;enable=!1;position;doLoad(t){Jt(this,"acceleration",t.acceleration),Kt(this,"enable",t.enable),t.position&&(this.position=gt({},t.position))}}class xe extends Qt{angle=new ge;center=new fe;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new ye;outModes=new be;path=new Pe;random=!1;size=!1;speed=2;spin=new Me;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Jt(this,"decay",t.decay),Kt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Jt(this,"drift",t.drift),Kt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(I(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Kt(this,"random",t.random),Kt(this,"size",t.size),Jt(this,"speed",t.speed),this.spin.load(t.spin),Kt(this,"straight",t.straight),Kt(this,"vibrate",t.vibrate),Kt(this,"warp",t.warp)}}class ke extends Qt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=le.create(this.color,t.color)),Jt(this,"width",t.width),Jt(this,"opacity",t.opacity)}}class ze extends Qt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=le.create(this.color,t.color)),ee(this,"fill",t.fill,()=>new pe),ee(this,"stroke",t.stroke,()=>new ke)}}class Ce extends me{value=1}class Oe extends Qt{horizontal=new Ce;vertical=new Ce;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class De extends Qt{enable=!1;height=1080;width=1920;doLoad(t){Kt(this,"enable",t.enable),Kt(this,"width",t.width),Kt(this,"height",t.height)}}class Se extends Qt{mode=t.LimitMode.delete;value=0;doLoad(t){Kt(this,"mode",t.mode),Kt(this,"value",t.value)}}class Ie extends Qt{density=new De;limit=new Se;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Kt(this,"value",t.value)}}class Te extends Qt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=gt(this.options[t]??{},i))}Kt(this,"close",t.close),Kt(this,"type",t.type)}}class _e extends me{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Kt(this,"opacityRate",t.opacityRate),Kt(this,"sizeRate",t.sizeRate),Kt(this,"velocityRate",t.velocityRate)}}class Le extends Qt{bounce=new Oe;effect=new ue;groups={};move=new xe;number=new Ie;paint;palette;reduceDuplicates=!1;shape=new Te;zIndex=new _e;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new ze,this.paint.color=new le,this.paint.color.value="#fff",this.paint.fill=new pe,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#g(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]=gt(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&&(T(e)?this.paint=mt(e,t=>{const e=new ze;return e.load(t),e}):T(this.paint)?(this.paint=new ze,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#g(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(T(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 Re(t,e,...i){const s=new Le(t,e);return Zt(s,...i),s}class Ee extends Qt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new ce,this.fullScreen=new de,this.particles=Re(this.#p,this.#u),this.resize=new he}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,mt(this.preset,t=>{this.#f(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#g(this.palette)),Kt(this,"autoPlay",t.autoPlay),Kt(this,"clear",t.clear),Kt(this,"key",t.key),Kt(this,"name",t.name),Jt(this,"delay",t.delay),Kt(this,"detectRetina",t.detectRetina),Jt(this,"duration",t.duration),Kt(this,"fpsLimit",t.fpsLimit),Kt(this,"hdr",t.hdr),Kt(this,"pauseOnBlur",t.pauseOnBlur),Kt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Kt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;O(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=gt(this.style,t.style),Kt(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#g(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#f(t){this.load(this.#p.getPreset(t))}}const Ae=new Map;function Fe(t,e){let i=Ae.get(t);return i||(i=e(),Ae.size>2e3&&Ae.clear(),Ae.set(t,i)),i}function Be(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Ve(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return Ue(t,n.value,i,s);if(T(n.value)){const e=dt(n.value,i,s);if(!e)return;return Ve(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Ue(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return n.value===d?Xe():We(t,n.value);if(T(n.value)){const e=dt(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 He(t,e,i,s=!0){const n=Ve(t,e,i,s);return n?qe(n):void 0}function qe(t){const e=t.r/y,i=t.g/y,s=t.b/y,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*=w,r.s*=v,r.h*=60,r.h<0&&(r.h+=m),r.h>=m&&(r.h-=m),r}function We(t,e){return Be(t,e)}function $e(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function Ge(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),n=e/m,a=i/v,r=s/w;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const l=r<o?r*(1+a):r+a-r*a,c=2*r-l,d=1/3,h=Math.min(y,y*$e(c,l,n+d)),u=Math.min(y,y*$e(c,l,n)),p=Math.min(y,y*$e(c,l,n-d));return{r:Math.round(h),g:Math.round(u),b:Math.round(p)}}function je(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),n=e/m,a=i/v,r=s/w;if(0===i){const t=r*y;return{r:t,g:t,b:t}}const l=r<o?r*(1+a):r+a-r*a,c=2*r-l,d=1/3;return{r:Math.min(y,y*$e(c,l,n+d)),g:Math.min(y,y*$e(c,l,n)),b:Math.min(y,y*$e(c,l,n-d))}}function Ne(t){const e=Ge(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Xe(t,e){const i=t??0;if(e)return{r:F(i,y),g:F(i,y),b:F(i,y)};const s=()=>Math.floor(F(i,256));return{b:s(),g:s(),r:s()}}function Ye(t,e,i){const s=e?4:2,n=i??1;return Fe(`rgb-${t.r.toFixed(s)}-${t.g.toFixed(s)}-${t.b.toFixed(s)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/y*s).toString()} ${(t.g/y*s).toString()} ${(t.b/y*s).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Qe(t,e,i){const s=e?4:2,n=i??1;return Fe(`hsl-${t.h.toFixed(s)}-${t.s.toFixed(s)}-${t.l.toFixed(s)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?Ye(je(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${n.toString()})`)}function Ze(t,e,i,s){let n=t,a=e;return"r"in n||(n=Ge(t)),"r"in a||(a=Ge(e)),{b:H(n.b,a.b,i,s),g:H(n.g,a.g,i,s),r:H(n.r,a.r,i,s)}}function Ke(t,e,i){if(i===d)return Xe();if(i!==h)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return Ze(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return Ge(t)}}}function Je(t,e,i,s){const n=D(e)?e:e.value;return n===d?s?Ve(t,{value:n}):i?d:h:n===h?h:Ve(t,{value:n})}function ti(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function ei(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:m},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:w}};return e&&(ii(s.h,e.h,i),ii(s.s,e.s,i),ii(s.l,e.l,i)),s}function ii(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=W(i.speed)/a*s,e.decay=1-W(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=W(i.count),e.time=0,e.delayTime=W(i.delay)*r,i.sync||(e.velocity*=A(),e.value*=A()),e.initialValue=e.value,e.offset=j(i.offset)):e.velocity=0}function si(e,i,s,n){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 a=e.offset?q(e.offset):0,o=((e.velocity??0)*s.factor+3.6*a)*(n?.5075:1),r=e.decay??1,l=e.max,c=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=o,e.value<c&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=o,e.value>l&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=l)),e.velocity&&1!==r&&(e.velocity*=r),e.value=U(e.value,c,l)}function ni(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;si(s,!1,e,i),si(n,!0,e,i),si(a,!0,e,i)}function ai(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const oi=new Rt,ri=new Map;async function li(t,e,i,s){const n=ri.get(e);if(n instanceof Promise)return n;if(n){if(!n.destroyed)return n;ri.delete(e)}const a=(async()=>{const n=function(t,e){return{fullScreen:{enable:!e},particles:{number:{value:t.count??80},color:{value:t.color??"#fff"},links:{enable:t.links??!1,color:t.linksColor??"#fff",distance:t.linksLength??100},collisions:{enable:t.collisions??!1},move:{enable:!0,speed:t.speed??3},opacity:{value:t.opacity??1},shape:{type:t.shape??"circle"},size:{value:t.radius??3}}}}(i,s),a=await t.load({id:e,element:s,options:n});if(!a)return void ri.delete(e);const{ParticlesInstance:o}=await Promise.resolve().then(function(){return en}),r=new o(a,e);return ri.set(e,r),r})();return ri.set(e,a),a}class ci{enable=!1;mode="destination-out";load(t){_(t)||(Kt(this,"mode",t.mode),Kt(this,"enable",t.enable))}}class di{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return sn});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new ci),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new ci,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function hi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new di)})}class ui{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(l.x,l.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=I(s)?{min:Z(s.min),max:Z(s.max)}:{min:0,max:Z(s)}}}async function pi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new ui))})}var gi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(gi||(gi={}));const fi=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,yi=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class mi{accepts(t){return t.startsWith("#")}handleColor(t){return this.#y(t.value)}handleRangeColor(t){return this.#y(t.value)}parseString(t){return this.#y(t)}#y(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(fi,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=yi.exec(e);return i?{a:i[gi.a]?Number.parseInt(i[gi.a],16)/255:1,b:Number.parseInt(i[gi.b]??"0",16),g:Number.parseInt(i[gi.g]??"0",16),r:Number.parseInt(i[gi.r]??"0",16)}:void 0}}async function vi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new mi)})}var wi;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(wi||(wi={}));const Pi=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class bi{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Ge(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Ge({h:W(e.h),l:W(e.l),s:W(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Pi.exec(t);return e?Ne({a:e.length>4?st(e[wi.a]):1,h:Number.parseInt(e[wi.h]??"0",10),l:Number.parseInt(e[wi.l]??"0",10),s:Number.parseInt(e[wi.s]??"0",10)}):void 0}}async function Mi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new bi)})}class xi{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return an});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function ki(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,Ct(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new xi(t.pluginManager))})}function zi(e,i){const s=e.value,n=e.animation,a={delayTime:W(n.delay)*r,enable:n.enable,value:W(e.value)*i,max:G(s)*i,min:$(s)*i,loops:0,maxLoops:W(n.count),time:0};if(n.enable){switch(a.decay=1-W(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=q(a),e&&(a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function Ci(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;i.time??=0;const d=i.delayTime??0;if(!(d>0&&i.time<d&&(i.time+=a.value,i.time<d))){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&&(i.status=t.AnimationStatus.decreasing,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(i.status=t.AnimationStatus.increasing,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))}}class Oi extends ne{destroy=t.DestroyType.none;load(t){super.load(t),_(t)||Kt(this,"destroy",t.destroy)}}class Di extends we{animation=new Oi;value=1;load(t){if(_(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Si{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=zi(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=W(i.speed)/a*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=A()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){ie(t,"opacity",Di,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&Ci(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function Ii(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Si(t)))})}class Ti{modes;#u;#m;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#m=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;let o=!1;for(const t of this.#m)if(o=t.particleBounce?.(e,s,i)??!1,o)break;if(o)return;const r=e.getPosition(),l=e.offset,c=e.getRadius(),d=pt(r,c),h=a.canvas.size,u=!e.isInsideCanvasForOutMode(n,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.left&&e.direction!==t.OutModeDirection.right)return;e.bounds.right<0&&e.direction===t.OutModeDirection.left?e.particle.position.x=e.size+e.offset.x:e.bounds.left>e.canvasSize.width&&e.direction===t.OutModeDirection.right&&(e.particle.position.x=e.canvasSize.width-e.size-e.offset.x);const i=e.particle.velocity.x;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.right&&i>0||e.direction===t.OutModeDirection.left&&i<0)){const t=W(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,s=!0}if(!s)return;const n=e.offset.x+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-n:e.outOfCanvas&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:d,canvasSize:h,offset:l,outOfCanvas:u,size:c}),function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.bottom&&e.direction!==t.OutModeDirection.top)return;e.bounds.bottom<0&&e.direction===t.OutModeDirection.top?e.particle.position.y=e.size+e.offset.y:e.bounds.top>e.canvasSize.height&&e.direction===t.OutModeDirection.bottom&&(e.particle.position.y=e.canvasSize.height-e.size-e.offset.y);const i=e.particle.velocity.y;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.bottom&&i>0||e.direction===t.OutModeDirection.top&&i<0)){const t=W(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,s=!0}if(!s)return;const n=e.offset.y+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-n:e.outOfCanvas&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:d,canvasSize:h,offset:l,outOfCanvas:u,size:c})}}class _i{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(this.modes.includes(n)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(n,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=N(e.position,e.moveCenter),{x:s,y:n}=e.velocity;if(s<0&&t>e.moveCenter.radius||n<0&&i>e.moveCenter.radius||s>=0&&t<-e.moveCenter.radius||n>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class Li{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,s,n){if(!this.modes.includes(n))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const a=e.options.move.gravity,o=this.#u,r=o.canvas.size,c=e.getRadius();if(a.enable){const s=e.position;(!a.inverse&&s.y>r.height+c&&i===t.OutModeDirection.bottom||a.inverse&&s.y<-c&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+c||e.velocity.y<0&&e.position.y>=-c||e.velocity.x>0&&e.position.x<=r.width+c||e.velocity.x<0&&e.position.x>=-c)return;ht(e.position,o.canvas.size,l,c,i)||e.destroy()}}}const Ri=C.origin;class Ei{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;Ri.setTo(l),Ri.length=e.moveCenter.radius,Ri.angle=e.velocity.angle+Math.PI,Ri.addTo(e.moveCenter);const{dx:s,dy:n}=N(e.position,Ri);if(t<=0&&s>=0||i<=0&&n>=0||t>=0&&s<=0||i>=0&&n<=0)return;e.position.x=Math.floor(q({min:0,max:a.canvas.size.width})),e.position.y=Math.floor(q({min:0,max:a.canvas.size.height}));const{dx:o,dy:r}=N(e.position,e.moveCenter);e.direction=Math.atan2(-r,-o),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(e.isInsideCanvasForOutMode(n,i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor(q({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(q({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=N(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction),e.justWarped=!0;break}case t.ParticleOutType.normal:{const s=e.options.move.warp,n=a.canvas.size,o={bottom:n.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:n.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),l=pt(e.position,r);i===t.OutModeDirection.right&&l.left>n.width+e.offset.x?(e.position.x=o.left,e.initialPosition.x=e.position.x,s||(e.position.y=A()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0):i===t.OutModeDirection.left&&l.right<-e.offset.x&&(e.position.x=o.right,e.initialPosition.x=e.position.x,s||(e.position.y=A()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0),i===t.OutModeDirection.bottom&&l.top>n.height+e.offset.y?(s||(e.position.x=A()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.top,e.initialPosition.y=e.position.y,e.justWarped=!0):i===t.OutModeDirection.top&&l.bottom<-e.offset.y&&(s||(e.position.x=A()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0);break}}}}}class Ai{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#v(e,t.OutMode.bounce,t=>new Ti(t)),this.#v(e,t.OutMode.out,t=>new Ei(t)),this.#v(e,t.OutMode.destroy,t=>new _i(t)),this.#v(e,t.OutMode.none,t=>new Li(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#w(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#w(e,i,s.left??s.default,t.OutModeDirection.left),this.#w(e,i,s.right??s.default,t.OutModeDirection.right),this.#w(e,i,s.top??s.default,t.OutModeDirection.top)}#v(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#w(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function Fi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Ai(t)))})}class Bi{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=vt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=le.create(void 0===a?void 0:le.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=W(o.opacity),t.fillAnimation=i.animation;const s=He(this.#p,i);s&&(t.fillColor=ei(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=le.create(void 0===a?void 0:le.create(void 0,a),r.color);t.strokeWidth=W(r.width)*e.retina.pixelRatio,t.strokeOpacity=W(r.opacity??1),t.strokeAnimation=i.animation;const s=He(this.#p,i)??t.getFillColor();s&&(t.strokeColor=ei(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(ni(t.fillColor,e,this.#u.hdr),ni(t.strokeColor,e,this.#u.hdr))}}async function Vi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Bi(t.pluginManager,e)))})}var Ui;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Ui||(Ui={}));const Hi=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class qi{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:W(e.r),g:W(e.g),b:W(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Hi.exec(t);return e?{a:e.length>4?st(e[Ui.a]):1,b:parseInt(e[Ui.b]??"0",10),g:parseInt(e[Ui.g]??"0",10),r:parseInt(e[Ui.r]??"0",10)}:void 0}}async function Wi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new qi)})}class $i extends ne{destroy=t.DestroyType.none;load(t){super.load(t),_(t)||Kt(this,"destroy",t.destroy)}}class Gi extends we{animation=new $i;value=3;load(t){if(super.load(t),_(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class ji{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/a*e.retina.reduceFactor,s.sync||(t.size.velocity*=A()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){ie(t,"size",Gi,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=zi(i,e),t.retina.sizeAnimationSpeed=W(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&Ci(t,t.size,0,t.options.size.animation.destroy,e)}}async function Ni(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new ji(t)))})}async function Xi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(async t=>{await Promise.all([hi(t),vi(t),Mi(t),Wi(t),ki(t),pi(t),Vi(t),Ii(t),Fi(t),Ni(t)])})}class Yi{enable=!1;mode=[];load(t){_(t)||(Kt(this,"enable",t.enable),Kt(this,"mode",t.mode))}}var Qi,Zi,Ki;!function(t){t.circle="circle",t.rectangle="rectangle"}(Qi||(Qi={}));class Ji{enable=!1;mode=[];selectors=[];type=Qi.circle;load(t){_(t)||(Kt(this,"selectors",t.selectors),Kt(this,"enable",t.enable),Kt(this,"mode",t.mode),Kt(this,"type",t.type))}}class ts{enable=!1;mode=[];load(t){_(t)||(Kt(this,"enable",t.enable),Kt(this,"mode",t.mode))}}class es{onClick=new Yi;onDiv=new Ji;onHover=new ts;load(t){if(_(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=mt(e,t=>{const e=new Ji;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(Zi||(Zi={}));class is{#u;#p;constructor(t,e){this.#p=t,this.#u=e}load(t){if(_(t))return;if(!this.#u)return;const e=this.#p.interactors?.get(this.#u);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class ss{detectsOn=Zi.window;events=new es;modes;constructor(t,e){this.modes=new is(t,e)}load(t){if(_(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class ns{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return ln});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new ss(this.#p,t)),s.load(i?.interactivity);const n=this.#p.interactors?.get(t);if(n)for(const t of n)t.loadOptions&&t.loadOptions(e,i)}loadParticlesOptions(t,e,i){i?.interactivity&&(e.interactivity=gt({},i.interactivity));const s=this.#p.interactors?.get(t);if(s)for(const t of s)t.loadParticlesOptions?.(e,i)}needsPlugin(){return!0}}!function(t){t.external="external",t.particles="particles"}(Ki||(Ki={}));class as{type=Ki.particles;container;constructor(t){this.container=t}}const os="pointerdown",rs="pointerup",ls="pointerleave",cs="pointermove",ds="touchstart",hs="touchend",us="touchmove",ps="touchcancel";function gs(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}var fs;!function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy"}(fs||(fs={}));class ys{speed=2;load(t){_(t)||Kt(this,"speed",t.speed)}}class ms{enable=!0;retries=0;load(t){_(t)||(Kt(this,"enable",t.enable),Kt(this,"retries",t.retries))}}class vs{absorb=new ys;bounce=new Oe;enable=!1;maxSpeed=50;mode=fs.bounce;overlap=new ms;load(t){_(t)||(this.absorb.load(t.absorb),this.bounce.load(t.bounce),Kt(this,"enable",t.enable),Jt(this,"maxSpeed",t.maxSpeed),Kt(this,"mode",t.mode),this.overlap.load(t.overlap))}}function ws(t,e,i,s,n,a){if(!t.options.collisions||!i.options.collisions)return;const o=U(t.options.collisions.absorb.speed*n.factor,0,s);t.size.value=Math.sqrt(e*e+o*o),i.size.value-=o,i.size.value<=a&&(i.size.value=0,i.destroy())}const Ps=t=>{t.options.collisions&&(t.collisionMaxSpeed??=W(t.options.collisions.maxSpeed),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed))};function bs(t,e){const i=t.getMass(),s=e.getMass(),n=t.velocity.length,a=e.velocity.length,o=i*n*n+s*a*a;yt(ft(t),ft(e));const r=t.velocity.length,l=e.velocity.length,c=i*r*r+s*l*l;if(c>1e-6*o){const i=Math.sqrt(o/c);Math.abs(i-1)>1e-4&&(t.velocity.length=r*i,e.velocity.length=l*i)}Ps(t),Ps(e)}function Ms(t,e,i,s){if(t.options.collisions&&e.options.collisions)switch(t.options.collisions.mode){case fs.absorb:!function(t,e,i,s){const n=t.getRadius(),a=e.getRadius();!n&&a?t.destroy():n&&!a?e.destroy():n&&a&&(n>=a?ws(t,n,e,a,i,s):ws(e,a,t,n,i,s))}(t,e,i,s);break;case fs.bounce:bs(t,e);break;case fs.destroy:!function(t,e){t.unbreakable||e.unbreakable||bs(t,e);const i=t.getRadius(),s=e.getRadius();!i&&s?t.destroy():i&&!s?e.destroy():i&&s&&(t.getRadius()>=e.getRadius()?e:t).destroy()}(t,e)}}class xs extends as{maxDistance;constructor(t){super(t),this.maxDistance=0}clear(){}init(){}interact(t,e,i){if(t.destroyed||t.spawning)return;const s=this.container,n=t.getPosition(),a=t.getRadius(),o=s.particles.grid.queryCircle(n,2*a);for(const e of o){if(t===e||t.id>=e.id||!t.options.collisions?.enable||!e.options.collisions?.enable||t.options.collisions.mode!==e.options.collisions.mode||e.destroyed||e.spawning)continue;const o=e.getPosition(),r=e.getRadius();if(Math.abs(Math.round(n.z)-Math.round(o.z))>a+r)continue;Y(n,o)>a+r||Ms(t,e,i,s.retina.pixelRatio)}}isEnabled(t){return!!t.options.collisions?.enable}loadParticlesOptions(t,...e){ie(t,"collisions",vs,...e)}reset(){}}class ks{id="overlap";async getPlugin(t){const{OverlapPluginInstance:e}=await Promise.resolve().then(function(){return cn});return new e(t)}loadOptions(){}needsPlugin(){return!0}}async function zs(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{gs(t),t.pluginManager.addPlugin(new ks),t.pluginManager.addInteractor?.("particlesCollisions",t=>Promise.resolve(new xs(t)))})}class Cs extends Xt{#P;constructor(t,e,i,s){super(t,e,i),this.#P=s}contains(t){if(super.contains(t))return!0;const{width:e,height:i}=this.#P,{x:s,y:n}=t;return super.contains({x:s-e,y:n})||super.contains({x:s+e,y:n})||super.contains({x:s,y:n-i})||super.contains({x:s,y:n+i})||super.contains({x:s-e,y:n-i})||super.contains({x:s+e,y:n+i})||super.contains({x:s-e,y:n+i})||super.contains({x:s+e,y:n-i})}intersects(t){if(super.intersects(t))return!0;const{width:e,height:i}=this.#P,s=t.position,n=[{x:-e,y:0},{x:e,y:0},{x:0,y:-i},{x:0,y:i},{x:-e,y:-i},{x:e,y:i},{x:-e,y:i},{x:e,y:-i}];for(const e of n){const i={x:s.x+e.x,y:s.y+e.y};let n;if(t instanceof Xt)n=new Xt(i.x,i.y,t.radius);else{const e=t;n=new Yt(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(n))return!0}return!1}}class Os{blur=5;color=new re;enable=!1;constructor(){this.color.value="#000"}load(t){_(t)||(Kt(this,"blur",t.blur),this.color=re.create(this.color,t.color),Kt(this,"enable",t.enable))}}class Ds{color;enable=!1;frequency=1;opacity;load(t){_(t)||(void 0!==t.color&&(this.color=re.create(this.color,t.color)),Kt(this,"enable",t.enable),Kt(this,"frequency",t.frequency),Kt(this,"opacity",t.opacity))}}class Ss{blink=!1;color=new re;consent=!1;distance=100;enable=!1;frequency=1;id;opacity=1;shadow=new Os;triangles=new Ds;warp=!1;width=1;constructor(){this.color.value="#fff"}load(t){_(t)||(Kt(this,"id",t.id),Kt(this,"blink",t.blink),this.color=re.create(this.color,t.color),Kt(this,"consent",t.consent),Kt(this,"distance",t.distance),Kt(this,"enable",t.enable),Kt(this,"frequency",t.frequency),Kt(this,"opacity",t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),Kt(this,"width",t.width),Kt(this,"warp",t.warp))}}function Is(t,e,i){const{dx:s,dy:n}=N(t,e),a={x:Math.abs(s),y:Math.abs(n)},o={x:Math.min(a.x,i.width-a.x),y:Math.min(a.y,i.height-a.y)};return Math.hypot(o.x,o.y)}class Ts extends as{#b;#p;constructor(t,e){super(e),this.#p=t,this.#b=0}get maxDistance(){return this.#b}clear(){}init(){this.container.particles.linksColor=void 0,this.container.particles.linksColors=new Map}interact(t){if(!t.options.links)return;t.links=[],t.linksDistance&&t.linksDistance>this.#b&&(this.#b=t.linksDistance);const e=t.getPosition(),i=this.container,s=i.canvas.size;if(e.x<l.x||e.y<l.y||e.x>s.width||e.y>s.height)return;const n=t.options.links,a=n.opacity,o=t.retina.linksDistance??0,r=n.warp,c=r?new Cs(e.x,e.y,o,s):new Xt(e.x,e.y,o),d=i.particles.grid.query(c);for(const i of d){const c=i.options.links;if(t===i||!c?.enable||n.id!==c.id||i.spawning||i.destroyed||!i.links||t.links.some(t=>t.destination===i)||i.links.some(e=>e.destination===t))continue;const d=i.getPosition();if(d.x<l.x||d.y<l.y||d.x>s.width||d.y>s.height)continue;const h=N(e,d).distance,u=r&&c.warp?Is(e,d,s):h,p=Math.min(h,u);if(p>o)continue;const g=(1-p/o)*a;this.#M(t),t.links.push({destination:i,opacity:g,color:this.#x(t,i),isWarped:u<h})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){ie(t,"links",Ss,...e)}reset(){}#x(t,e){const i=this.container,s=t.options.links;if(!s)return;return Ke(t,e,void 0!==s.id?i.particles.linksColors.get(s.id):i.particles.linksColor)}#M(t){if(!t.options.links)return;const e=this.container,i=t.options.links;let s=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);s||(s=Je(this.#p,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s))}}class _s{id="links";#p;constructor(t){this.#p=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return hn});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Ls(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{const e=t.pluginManager;gs(t),e.addPlugin(new _s(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new Ts(e,t)))})}let Rs=null;async function Es(t){t.checkVersion("4.3.1"),await t.pluginManager.register(async t=>{await Promise.all([Xi(t),(async t=>{await async function(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new ns(i)),i.initializers.interactors??=new Map,i.interactors??=new Map,i.addInteractor=(t,e)=>{i.initializers.interactors??=new Map,i.initializers.interactors.set(t,e)},i.getInteractors=async(t,e=!1)=>(i.interactors??=new Map,i.initializers.interactors??=new Map,zt(t,i.interactors,i.initializers.interactors,e)),i.setOnClickHandler=t=>{const{items:i}=e;if(!i.length)throw new Error("Click handlers can only be set after calling tsParticles.load()");i.forEach(e=>{const i=e;i.addClickHandler?.(t)})}})}(t),await Promise.all([zs(t),Ls(t)])})(t)])})}async function As(t){return Rs||(Rs=Es(t),Rs)}async function Fs(t,e){let i,s;return await As(oi),D(t)?(i=t,s=e??{}):(i="particles",s=t??{}),li(oi,i,s)}Fs.create=async(t,e)=>{await As(oi);return li(oi,t?.id??"particles",e??{},t??void 0)},Fs.init=async()=>{await As(oi)},Fs.version="4.3.1",globalThis.particles=Fs;const Bs=globalThis;Bs.particles=Fs,Bs.tsParticles=oi;function Vs(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Us{#k;#z;#C;#O;#D;#u;#S;#I;#T;#_;#L;#R;#p;#E;#A;#F={};#B=[void 0,void 0];#V={};constructor(t,e,i){this.#p=t,this.#u=e,this.#O=i,this.#S=null,this.#k=null,this.#z=new Set,this.#A=[],this.#E=[],this.#C=[],this.#D=[],this.#T=[],this.#_=[],this.#L=[],this.#R={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#I}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(l.x,l.y,this.#O.size.width,this.#O.size.height)})}clear(){for(const t of this.#C)if(t.canvasClear?.())return;for(const e of Object.values(t.DrawLayer))if("number"==typeof e)for(const t of this.#U(e))if(t.canvasClear?.())return;this.canvasClear()}destroy(){this.stop(),this.#k=null,this.#z.clear(),this.#A=[],this.#E=[],this.#C=[],this.#D=[],this.#T=[],this.#_=[],this.#L=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#R[e]=[])}draw(t){const e=this.#S;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.#H(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:d,opacity:h,strokeOpacity:u}=t.getOpacity(),p=this.#V,g=this.#F,f=a?Qe(a,r.hdr,d*h):void 0,y=o?Qe(o,r.hdr,u*h):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=y,this.draw(s=>{for(const i of this.#L)i.drawParticleSetup?.(s,t,e);this.#q(s,t,i,h,g,p),this.#W({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*c**l.sizeRate,opacity:h,transform:p}),this.#$(t);for(const i of this.#_)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#T)this.#G(i,s,t,e)})}drawParticles(e){const{particles:i,actualOptions:s}=this.#u;this.clear(),i.update(e),this.draw(n=>{const a=this.#O.size.width,o=this.#O.size.height;if(this.#k)try{n.drawImage(this.#k,l.x,l.y,a,o)}catch{this.#j("background-element-draw-error","Error drawing background element onto canvas")}const r=s.background;if(r.draw)try{r.draw(n,e)}catch{this.#j("background-draw-error","Error in background.draw callback")}for(const e of this.#U(t.DrawLayer.BackgroundMask))e.canvasPaint?.();for(const i of this.#U(t.DrawLayer.CanvasSetup))i.drawSettingsSetup?.(n,e);for(const i of this.#U(t.DrawLayer.PluginContent))i.draw?.(n,e);i.drawParticles(e);for(const i of this.#U(t.DrawLayer.CanvasCleanup))i.clearDraw?.(n,e),i.drawSettingsCleanup?.(n,e)})}init(){this.initUpdaters(),this.initPlugins(),this.#N(),this.paint()}initPlugins(){this.#C=[],this.#D=[],this.#T=[],this.#L=[],this.#_=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#R[e]=[]);for(const e of this.#u.plugins)(e.particleFillColor??e.particleStrokeColor)&&this.#D.push(e),e.drawParticle&&this.#T.push(e),e.drawParticleSetup&&this.#L.push(e),e.drawParticleCleanup&&this.#_.push(e),e.canvasClear&&this.#C.push(e),e.canvasPaint&&this.#U(t.DrawLayer.BackgroundMask).push(e),e.drawSettingsSetup&&this.#U(t.DrawLayer.CanvasSetup).push(e),e.draw&&this.#U(t.DrawLayer.PluginContent).push(e),(e.clearDraw??e.drawSettingsCleanup)&&this.#U(t.DrawLayer.CanvasCleanup).push(e)}initUpdaters(){this.#A=[],this.#E=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#E.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#A.push(t)}paint(){let e=!1;for(const i of this.#U(t.DrawLayer.BackgroundMask))if(e=i.canvasPaint?.()??!1,e)break;e||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(l.x,l.y,this.#O.size.width,this.#O.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,l.x,l.y,this.#O.size.width,this.#O.size.height),i.globalAlpha=s})}setContext(t){this.#S=t,this.#S&&(this.#S.globalCompositeOperation=i)}setContextSettings(t){this.#I=t}stop(){this.draw(t=>{t.clearRect(l.x,l.y,this.#O.size.width,this.#O.size.height)})}#$(t){for(const e of this.#E)e.afterDraw?.(t)}#q(t,e,i,s,n,a){for(const o of this.#A){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)Vs(a,t,e)}o.beforeDraw?.(e)}}#X(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#Y(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#W(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:d}=e,h=s.getPosition(),u=s.getTransformData(l),p={x:h.x,y:h.y};i.setTransform(u.a,u.b,u.c,u.d,h.x,h.y),a.fill&&(i.fillStyle=a.fill);const g=!!s.fillEnabled,f=s.strokeWidth??0;i.lineWidth=f,a.stroke&&(i.strokeStyle=a.stroke);const y={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:g,stroke:f>0,transformData:u,position:{...h},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(y);const m=s.effect?c.get(s.effect):void 0,v=s.shape?d.get(s.shape):void 0;this.#Y(m,y),this.#Q(v,y),this.#Z(v,y),this.#K(v,y),this.#X(m,y),i.resetTransform()}#G(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#Z(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())}#K(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#Q(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#U(t){return this.#R[t]}#H(t){let e,i;for(const s of this.#D)if(!e&&s.particleFillColor&&(e=He(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=He(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#B[0]=e,this.#B[1]=i,this.#B}#N(){const t=this.#u.actualOptions.background;if(this.#k=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof HTMLImageElement?this.#k=e:e?this.#j("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#j("background-element-not-found",`Background element selector "${t.element}" not found`)}}else(t.element instanceof HTMLCanvasElement||t.element instanceof OffscreenCanvas||t.element instanceof HTMLVideoElement||t.element instanceof HTMLImageElement)&&(this.#k=t.element)}#j(t,e){this.#z.has(t)||(this.#z.add(t),_t().warning(e))}}const Hs=new WeakMap;function qs(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 Ws{domElement;render;renderCanvas;size;zoom=1;#u;#J;#tt;#et;#p;#it;#st;#nt;#at;constructor(t,e){this.#p=t,this.#u=e,this.render=new Us(t,e,this),this.#nt={height:0,width:0};const i=e.retina.pixelRatio,s=this.#nt;this.size={height:s.height*i,width:s.width*i},this.#J=!1,this.#st=[],this.#it="none"}get#ot(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#J){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#rt();this.render.destroy(),this.#st=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#at?this.#at:{x:e*o/t,y:i*o/t}}init(){this.#lt(t=>{t.disconnect()}),this.#tt=lt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#ct()}),this.resize(),this.#dt(),this.initBackground(),this.#lt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#ht(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Ve(this.#p,e.color);s.backgroundColor=n?Ye(n,t.actualOptions.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#st=[];for(const t of this.#u.plugins)t.resize&&this.#st.push(t)}loadCanvas(t){this.#J&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#J=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=Hs.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 Hs.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#et=Pt(s.style));const n=this.#nt,a=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=a.height,n.width=a.width);const o=this.#u.retina.pixelRatio,r=this.size;a.height=r.height=n.height*o,a.width=r.width=n.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#nt,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=o.width,i.height=l.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#it=t,this.#ct())}setZoom(t,e){this.zoom=t,this.#at=e}stop(){this.#lt(t=>{t.disconnect()}),this.#tt=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#ut(),e&&await t.refresh()}#ut(){for(const t of this.#st)t.resize?.()}#ht(){const t=this.#u.actualOptions.hdr&&rt("(color-gamut: p3)")?.matches&&rt("(dynamic-range: high)")?.matches;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...t?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});const e=this.renderCanvas;e&&this.render.setContext(e.getContext("2d",this.render.settings))}#dt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#ot?this.#pt():this.#rt();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")}}}#ct(){const t=this.domElement;if(!t)return;this.#lt(t=>{t.disconnect()}),this.#dt(),this.initBackground();const e=this.#it;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#lt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#rt(){const t=this.domElement,e=this.#et;t&&e&&qs(t,e,!0)}#lt(t){this.#tt&&t(this.#tt)}#pt(){const t=this.domElement;t&&qs(t,xt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class $s{#u;#gt;#ft;#yt;constructor(t){this.#u=t,this.#gt={visibilityChange:()=>{this.#mt()},resize:()=>{this.#vt()}}}addListeners(){this.#wt(!0)}removeListeners(){this.#wt(!1)}#mt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(ot().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#vt(){this.#yt&&(clearTimeout(this.#yt),this.#yt=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#yt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*r)}#wt(t){const e=this.#gt;this.#Pt(t),kt(document,n,e.visibilityChange,t,!1)}#Pt(t){const e=this.#gt,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void kt(globalThis,s,e.resize,t);const n=i.canvas.domElement;this.#ft&&!t?(n&&this.#ft.unobserve(n),this.#ft.disconnect(),this.#ft=void 0):!this.#ft&&t&&n&&(this.#ft=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this.#vt()}),this.#ft.observe(n))}}function Gs(t){if(!ct(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)}function js(t,e){const i=t%e;return i<0?i+e:i}function Ns(t,e,i,s){const n=Re(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=vt(n.effect.type,t.id,a),t.shape=vt(n.shape.type,t.id,a);const o=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=vt(e,t.id,a);i&&(t.effect=i)}o.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=vt(e,t.id,a);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===d){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(A()*i.length)]}if(t.shape===d){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(A()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return gt({close:e.close},vt(n,i,s))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return gt({close:e.close},vt(n,i,s))}(t.shape,r,t.id,a):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class Xs{backColor;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;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;#bt={fillOpacity:1,opacity:1,strokeOpacity:1};#Mt=z.origin;#xt={sin:0,cos:0};#kt={a:1,b:0,c:0,d:1};#u;#zt=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#zt.push(t),this.#zt.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#zt.length=0}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const i=this.#u,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.#u.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#Ct(this.#Ot(ti(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*o}getModifier(t){return this.#zt.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=W(this.opacity?.value??1),s=this.#Ot(void 0,t=>t.opacity)??i,n=this.fillOpacity??1,a=this.strokeOpacity??1;return this.#bt.fillOpacity=s*n*e,this.#bt.opacity=s*e,this.#bt.strokeOpacity=s*a*e,this.#bt}getPosition(){return this.#Mt.x=this.position.x+this.offset.x,this.#Mt.y=this.position.y+this.offset.y,this.#Mt.z=this.position.z,this.#Mt}getRadius(){return this.#Ot(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#xt.sin=Math.sin(t),this.#xt.cos=Math.cos(t),this.#xt}getStrokeColor(){return this.#Ct(this.#Ot(ti(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#kt.a=e.cos*(t.a??c.a),this.#kt.b=i?e.sin*(t.b??1):t.b??c.b,this.#kt.c=i?-e.sin*(t.c??1):t.c??c.c,this.#kt.d=e.cos*(t.d??c.d),this.#kt}init(e,i,s,n){const a=this.#u;!function(e,i,s){e.id=i,e.group=s,e.justWarped=!1,e.effectClose=!0,e.shapeClose=!0,e.pathRotation=!1,e.lastPathTime=0,e.destroyed=!1,e.unbreakable=!1,e.isRotating=!1,e.rotation=0,e.misplaced=!1,e.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},e.size={value:1,max:1,min:1,enable:!1},e.outType=t.ParticleOutType.normal,e.ignoresResizeRatio=!0}(this,e,n),this.options=Ns(this,a,this.#p,s),a.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(a.particleUpdaters,this),this.#Dt(i),this.initialVelocity=this.#St(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,a),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(a.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(a,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(a,this)}isInsideCanvas(t){return this.#It({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#It({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=js(t,u);return e>=Math.PI*o&&e<3*Math.PI*o}if(this.roll.horizontal){const e=js(t+Math.PI*o,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=js(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}removeModifier(t){const e=this.#zt.findIndex(e=>e.id===t);e>=0&&this.#zt.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Ot(t,e){let i=t;for(const t of this.#zt)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#Tt(t,e){let i=0,s=t?z.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return z.create(i.x,i.y,e)}const t=it({size:l,position:s}),c=z.create(t.x,t.y,e);this.#_t(c,r,o.left??o.default),this.#_t(c,r,o.right??o.default),this.#Lt(c,r,o.top??o.default),this.#Lt(c,r,o.bottom??o.default);let d=!0;for(const t of n.particles.checkParticlePositionPlugins)if(d=t.checkParticlePosition?.(this,c,i)??!0,!d)break;if(d)return c;i+=1,s=void 0}}#St(){const e=this.options.move,i=J(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=Z(W(e.angle.value)),n=Z(W(e.angle.offset)),a={left:n-s*o,right:n+s*o};return e.straight||(i.angle+=q(j(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=A()),i}#_t(e,i,s){Gs({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#Lt(e,i,s){Gs({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#Rt(e,i){const s=this.getRadius(),n=this.#u.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"}}#Et(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#It(t){const e=this.#Rt(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#Et(t.direction,t.outMode),l=a?this.#At(a(r),"shape"):void 0,c=o?this.#At(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}#Ct(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?ai(t,this.roll.alter.type,this.roll.alter.value):t:t}#Dt(e){const i=this.#u,s=Math.floor(W(this.options.zIndex.value)),n=this.#Tt(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={...wt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=K(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=C.origin}#At(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Ys{#Ft;#Bt=new Map;#Vt=[];#Ut;#Ht;#qt=[];#Wt;constructor(t){this.#Ft=t,this.#Ut=0,this.#Wt=0}clear(){this.#Bt.clear();const t=this.#Ht;t&&(this.#Ft=t),this.#Ht=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#$t(e,i);this.#Bt.has(s)||this.#Bt.set(s,[]),this.#Bt.get(s)?.push(t)}query(t,e,i=[]){const s=this.#Gt(t);if(!s)return i;const n=Math.floor(s.minX/this.#Ft),a=Math.floor(s.maxX/this.#Ft),o=Math.floor(s.minY/this.#Ft),r=Math.floor(s.maxY/this.#Ft);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#Bt.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.#jt(t.x,t.y,e),a=this.query(n,i,s);return this.#Nt(),a}queryRectangle(t,e,i,s=[]){const n=this.#Xt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Nt(),a}setCellSize(t){this.#Ht=t}#jt(t,e,i){return(this.#Vt[this.#Ut++]??=new Xt(t,e,i)).reset(t,e,i)}#Xt(t,e,i,s){return(this.#qt[this.#Wt++]??=new Yt(t,e,i,s)).reset(t,e,i,s)}#$t(t,e){return`${Math.floor(t/this.#Ft)}_${Math.floor(e/this.#Ft)}`}#Gt(t){if(t instanceof Xt){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 Yt){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}#Nt(){this.#Ut=0,this.#Wt=0}}class Qs{checkParticlePositionPlugins;grid;#Yt;#u;#Qt;#Zt;#Kt;#Jt;#te;#ee;#p;#ie;#se;#ne;#ae;#oe;#re;constructor(t,e){this.#p=t,this.#u=e,this.#Kt=0,this.#Yt=[],this.#ie=[],this.#Zt=0,this.#Qt=new Map,this.#Jt=new Map,this.#re=this.#le(this.#u.zLayers),this.grid=new Ys(100),this.checkParticlePositionPlugins=[],this.#te=[],this.#ee=[],this.#ne=[],this.#se=[],this.#oe=[]}get count(){return this.#Yt.length}addParticle(e,i,s,n){const a=this.#u.actualOptions.particles.number.limit.mode,o=void 0===s?this.#Zt:this.#Qt.get(s)??this.#Zt,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.#ie.pop()??new Xs(this.#p,this.#u);a.init(this.#Kt,e,i,s);let o=!0;return n&&(o=n(a)),o?(this.#Yt.push(a),this.#ce(a),this.#Kt++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this.#ie.push(a)}catch(t){_t().warning(`error adding particle: ${t}`)}}clear(){this.#Yt=[],this.#Jt.clear(),this.#de(this.#u.zLayers)}destroy(){this.#Yt=[],this.#ie.length=0,this.#Jt.clear(),this.#re=[],this.checkParticlePositionPlugins=[],this.#te=[],this.#ee=[],this.#ne=[],this.#se=[],this.#oe=[]}drawParticles(t){for(let e=this.#re.length-1;e>=0;e--){const i=this.#re[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Yt.filter(t)}find(t){return this.#Yt.find(t)}get(t){return this.#Yt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#oe=[],this.#ee=[],this.#ne=[],this.#te=[],this.#se=[],this.#Jt.clear(),this.#de(t.zLayers),this.grid=new Ys(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#oe.push(e),e.particleUpdate&&this.#ee.push(e),e.postUpdate&&this.#ne.push(e),e.particleReset&&this.#te.push(e),e.postParticleUpdate&&this.#se.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#Yt.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.#he(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Re(this.#p,this.#u,s);this.#ue(n,i,t)}this.#ue(t.particles,i)}setResizeFactor(t){this.#ae=t}update(t){this.grid.clear();for(const e of this.#oe)e.update?.(t);const e=this.#pe(t);for(const e of this.#ne)e.postUpdate?.(t);if(this.#ge(t,e),e.size)for(const t of e)this.remove(t);this.#ae=void 0}#fe(...t){this.#ie.push(...t)}#ue(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Zt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Qt.set(i,s?.number.limit.value??n.limit.value));const a=this.#ye(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.#Zt=n.limit.value*a:this.#Qt.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)}#le(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#me(t){const e=this.#re.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#ye(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1}#ce(t){const e=this.#me(t.position.z),i=this.#re[e];i&&(i.push(t),this.#Jt.set(t.id,e))}#he(e,i,s){const n=this.#Yt[e];return!!n&&(n.group===i&&(this.#Yt.splice(e,1),this.#ve(n),n.destroy(s),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this.#fe(n),!0))}#ve(t){const e=this.#Jt.get(t.id)??this.#me(t.position.z),i=this.#re[e];if(!i)return void this.#Jt.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Jt.delete(t.id)}#de(t){const e=Math.max(Math.floor(t),1);if(this.#re.length===e)for(const t of this.#re)t.length=0;else this.#re=this.#le(e)}#we(t){const e=this.#me(t.position.z),i=this.#Jt.get(t.id);if(void 0===i)return void this.#ce(t);if(i===e)return;const s=this.#re[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#re[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#Jt.set(t.id,e)}else this.#Jt.set(t.id,e)}#pe(t){const e=new Set,i=this.#ae;for(const s of this.#Yt){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.#te)t.particleReset?.(s);for(const e of this.#ee){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#ge(t,e){for(const i of this.#Yt)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#se)e.postParticleUpdate?.(i,t);this.#we(i)}}}class Zs{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=W(s.gravity.maxSpeed)*i,a.moveDrift=W(s.drift)*i,a.moveSpeed=W(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 Ks(t){return!t.destroyed}function Js(t,e,...i){const s=new Ee(t,e);return Zt(s,...i),s}var tn=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#Pe;#be;#Me={value:0,factor:0};#xe;#ke;#ze;#Ce;#Oe;#De;#Se;#Ie;#Te;#_e;#Le;#p;#Re;#Ee;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this.#p=s,this.#xe=i,this.#Te=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.#Re=!1,this.#Pe=0,this.#ze=0,this.#Ie=0,this.#Oe=!0,this.started=!1,this.destroyed=!1,this.#Le=!0,this.#Se=0,this.zLayers=100,this.pageHidden=!1,this.#Ee=o,this.#De=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Zs(this),this.canvas=new Ws(this.#p,this),this.particles=new Qs(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#_e=Js(this.#p,this),this.actualOptions=Js(this.#p,this),this.#Ce=new $s(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#Le&&!this.pageHidden&&Ks(this)}get options(){return this.#_e}get sourceOptions(){return this.#Ee}addLifeTime(t){this.#Ie+=t}alive(){return!this.#ze||this.#Ie<=this.#ze}destroy(e=!0){if(Ks(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.#Te(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#xe(t,{container:this,data:e})}draw(t){if(!Ks(this))return;let e=t;this.#ke=B(t=>{e&&(this.#Se=void 0,e=!1),this.#Ae(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(!Ks(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.#_e=Js(this.#p,this,this.#De,this.sourceOptions),this.actualOptions=Js(this.#p,this,this.#_e),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.#ze=W(s)*r,this.#Pe=W(i)*r,this.#Ie=0,this.fpsLimit=n>0?n:120,this.#Re=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(Ks(this)&&(void 0!==this.#ke&&(V(this.#ke),this.#ke=void 0),!this.#Le)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Le=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!Ks(this))return;const i=this.#Le||e;if(!this.#Oe||this.actualOptions.autoPlay){if(this.#Le&&(this.#Le=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#Oe=!1}async refresh(){if(Ks(this))return this.stop(),this.start()}async reset(t){if(Ks(this))return this.#De=t,this.#Ee=t,this.#_e=Js(this.#p,this,this.#De,this.sourceOptions),this.actualOptions=Js(this.#p,this,this.#_e),this.refresh()}async start(){Ks(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#Ce.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#be=setTimeout(()=>{i()},this.#Pe)}))}stop(){if(Ks(this)&&this.started){this.#be&&(clearTimeout(this.#be),this.#be=void 0),this.#Oe=!0,this.started=!1,this.#Ce.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.#Ee=this.#_e,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Ae(t){try{if(!this.#Re&&void 0!==this.#Se&&t<this.#Se+r/this.fpsLimit)return void this.draw(!1);if(this.#Se??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this.#Me,t-this.#Se,this.fpsLimit,this.#Re),this.addLifeTime(this.#Me.value),this.#Se=t,this.#Me.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#Me),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){_t().error("error in animation loop",t)}}}});var en=Object.freeze({__proto__:null,ParticlesInstance:class{#u;#Fe;constructor(t,e){this.#u=t,this.#Fe=e}get destroyed(){return this.#u.destroyed}destroy(){var t;this.#u.destroy(),t=this.#Fe,ri.delete(t)}pause(){this.#u.pause()}play(){this.#u.play()}stop(){this.#u.stop()}}});var sn=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=t.DrawLayer.CanvasSetup;#u;#Be;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#Be&&(t.globalCompositeOperation=this.#Be)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Be=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function nn(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=U(t.velocity.x,-1,1),t.velocity.y=U(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const d=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&d.y>=0&&d.y>=s||r.inverse&&d.y<=0&&d.y<=-s)&&(d.y=l*s,i&&(t.velocity.y=d.y/i));const h=t.options.zIndex,u=(1-t.zIndexFactor)**h.velocityRate;d.multTo(u),d.multTo(a);const{position:p}=t;p.addTo(d),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}var an=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(e){const i=e.options.move,s=i.gravity,n=i.path;if(e.moveDecay=1-W(i.decay),e.pathDelay=W(n.delay.value)*r,n.generator){let t=this.pathGenerators.get(n.generator);t||(t=this.availablePathGenerators.get(n.generator),t&&(this.pathGenerators.set(n.generator,t),t.init())),e.pathGenerator=t}e.gravity={enable:s.enable,acceleration:W(s.acceleration),inverse:s.inverse},function(e,i){const s=i.options.move.spin;if(!s.enable)return;const n=s.position??{x:50,y:50},a={x:.01*n.x*e.canvas.size.width,y:.01*n.y*e.canvas.size.height},o=Y(i.getPosition(),a),r=W(s.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:a,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:A()*u,radius:o,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options.move;if(!s.enable)return;const n=this.#u,a=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(e),r=n.retina.reduceFactor,l=e.retina.moveSpeed,c=e.retina.moveDrift,d=e.size.max,h=l*(s.size?e.getRadius()/d:1)*a*(i.factor||1)*o,u=e.retina.maxSpeed;s.spin.enable?function(e,i,s,n){if(!i.spin)return;const a=i.spin.direction===t.RotateDirection.clockwise,r={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*r.x(i.spin.angle)*n,i.position.y=i.spin.center.y+i.spin.radius*r.y(i.spin.angle)*n,i.spin.radius+=i.spin.acceleration*n;const l=Math.max(e.canvas.size.width,e.canvas.size.height),c=l*o;i.spin.radius>c?(i.spin.radius=c,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*s*(1-i.spin.radius/l)}(n,e,h,r):nn(e,s,h,u,c,r,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=N(e,t.position),n=Math.abs(i),a=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&n>=l||c&&a>=c)&&!t.misplaced)t.misplaced=!!l&&n>l||!!c&&a>c,l&&(t.velocity.x=t.velocity.y*o-t.velocity.x),c&&(t.velocity.y=t.velocity.x*o-t.velocity.y);else if((!l||n<l)&&(!c||a<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-A()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-A())}}(e)}preInit(){return this.#Ve()}redrawInit(){return this.#Ve()}update(){for(const t of this.pathGenerators.values())t.update()}async#Ve(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});class on{#Ue=!0;#He;#u;#gt;#qe;#We;constructor(t,e){this.#u=t,this.#He=[],this.#qe=e,this.#We=new Map,this.#gt={mouseDown:()=>{this.#$e()},mouseLeave:()=>{this.#Ge()},mouseMove:t=>{this.#je(t)},mouseUp:t=>{this.#Ne(t)},touchStart:t=>{this.#Xe(t)},touchMove:t=>{this.#je(t)},touchEnd:t=>{this.#Ye(t)},touchCancel:t=>{this.#Ye(t)},touchEndClick:t=>{this.#Qe(t)},visibilityChange:()=>{this.#mt()}}}addListeners(){this.#wt(!0)}init(){this.#He.length=0;for(const t of this.#u.plugins.filter(t=>!!t.clickPositionValid))this.#He.push(t)}removeListeners(){this.#wt(!1)}#Ze(t){const e=this.#u,i=this.#qe,s=e.actualOptions;if(this.#Ue){const t=i.interactivityData.mouse,e=t.position;if(!e)return;t.clickPosition={...e},t.clickTime=performance.now();const n=s.interactivity?.events.onClick;if(!n?.mode)return;mt(n.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this.#Ge()},500)}#mt(){this.#Ge()}#Ke(t){const e=this.#gt,i=this.#u,s=this.#qe,n=i.actualOptions,a=s.interactivityData.element;if(!a)return;const o=a,r=i.canvas;r.setPointerEvents(o===r.domElement?"initial":"none"),(!t||n.interactivity?.events.onHover.enable||n.interactivity?.events.onClick.enable)&&(kt(a,cs,e.mouseMove,t),kt(a,ds,e.touchStart,t),kt(a,us,e.touchMove,t),t?n.interactivity?.events.onClick.enable?(kt(a,hs,e.touchEndClick,t),kt(a,rs,e.mouseUp,t),kt(a,os,e.mouseDown,t)):kt(a,hs,e.touchEnd,t):(kt(a,hs,e.touchEndClick,t),kt(a,rs,e.mouseUp,t),kt(a,os,e.mouseDown,t),kt(a,hs,e.touchEnd,t)),kt(a,ls,e.mouseLeave,t),kt(a,ps,e.touchCancel,t))}#wt(t){const e=this.#gt,i=this.#u,s=this.#qe,a=i.actualOptions,o=a.interactivity?.detectsOn,r=i.canvas.domElement;o===Zi.window?s.interactivityData.element=ot():o===Zi.parent&&r?s.interactivityData.element=r.parentElement??r.parentNode:s.interactivityData.element=r,this.#Ke(t),kt(document,n,e.visibilityChange,t,!1)}#$e(){const{interactivityData:t}=this.#qe,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position}#Ne(t){const e=this.#u,i=this.#qe,s=e.actualOptions,{mouse:n}=i.interactivityData;n.inside=!0;let a=!1;const o=n.position;if(o&&s.interactivity?.events.onClick.enable){for(const t of this.#He)if(a=t.clickPositionValid?.(o)??!1,a)break;a||this.#Ze(t),n.clicking=!1}}#Ge(){const{interactivityData:t}=this.#qe,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=ls,e.inside=!1,e.clicking=!1}#je(t){const e=this.#u,i=this.#qe,s=e.actualOptions,n=i.interactivityData,a=e.canvas.domElement;if(!n.element)return;let o;if(n.mouse.inside=!0,t.type.startsWith("pointer")){this.#Ue=!0;const e=t;if(n.element===ot()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(s.interactivity?.detectsOn===Zi.parent){const t=e.target,i=e.currentTarget;if(a){const s=t.getBoundingClientRect(),n=i.getBoundingClientRect(),r=a.getBoundingClientRect();o={x:e.offsetX+2*s.left-(n.left+r.left),y:e.offsetY+2*s.top-(n.top+r.top)}}else o={x:e.offsetX,y:e.offsetY}}else e.target===a&&(o={x:e.offsetX,y:e.offsetY})}else if(this.#Ue="touchmove"!==t.type,a){const e=t,i=e.touches[e.touches.length-1],s=a.getBoundingClientRect();if(!i)return;o={x:i.clientX-s.left,y:i.clientY-s.top}}const r=e.retina.pixelRatio;o&&(o.x*=r,o.y*=r),n.mouse.position=o,n.status=cs}#Ye(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#We.delete(t.identifier);this.#Ge()}#Qe(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#We.delete(t.identifier);this.#Ne(t)}#Xe(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#We.set(t.identifier,performance.now());this.#je(t)}}class rn{interactivityData;#Je;#u;#Ce;#ti;#ei;#ii;#si;#p;constructor(t,e){this.#u=e,this.#p=t,this.#ei=[],this.#ti=[],this.#si=[],this.#Je=new Map,this.#Ce=new on(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this.#ii=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(t=>{this.#ni(t)})}addClickHandler(t){const e=this.#u,i=this.interactivityData;if(e.destroyed)return;const s=i.element;if(!s)return;const n=(i,s,n)=>{if(e.destroyed)return;const a=e.retina.pixelRatio,o={x:s.x*a,y:s.y*a},r=e.particles.grid.queryCircle(o,n*a);t(i,r)};let a=!1,o=!1;this.#Je.set("click",t=>{if(e.destroyed)return;const i=t,s={x:i.offsetX,y:i.offsetY};n(t,s,1)}),this.#Je.set(ds,()=>{e.destroyed||(a=!0,o=!1)}),this.#Je.set(us,()=>{e.destroyed||(o=!0)}),this.#Je.set(hs,t=>{if(!e.destroyed){if(a&&!o){const i=t,s=i.touches[i.touches.length-1];if(!s)return;const a=e.canvas.domElement,o=a?a.getBoundingClientRect():void 0,r={x:s.clientX-(o?o.left:0),y:s.clientY-(o?o.top:0)};n(t,r,Math.max(s.radiusX,s.radiusY))}a=!1,o=!1}}),this.#Je.set(ps,()=>{e.destroyed||(a=!1,o=!1)});for(const[t,e]of this.#Je)s.addEventListener(t,e)}addListeners(){this.#Ce.addListeners()}clearClickHandlers(){const t=this.#u,e=this.interactivityData;if(!t.destroyed){for(const[t,i]of this.#Je)e.element?.removeEventListener(t,i);this.#Je.clear()}}externalInteract(t){for(const e of this.#ti){const i=this.interactivityData;e.isEnabled(i)&&e.interact(i,t)}}handleClickMode(t){if(this.#u.destroyed)return;const e=this.interactivityData;for(const i of this.#ti)i.handleClickMode?.(t,e)}init(){this.#Ce.init();for(const t of this.#ei){switch(t.type){case Ki.external:this.#ti.push(t);break;case Ki.particles:this.#si.push(t)}t.init()}}async initInteractors(){const t=await(this.#p.getInteractors?.(this.#u,!0));t&&(this.#ei=t,this.#ti=[],this.#si=[])}particlesInteract(t,e){const i=this.interactivityData;for(const i of this.#ti)i.clear(t,e);for(const s of this.#si)s.isEnabled(t,i)&&s.interact(t,i,e)}removeListeners(){this.#Ce.removeListeners()}reset(t){const e=this.interactivityData;for(const i of this.#ti)i.isEnabled(e)&&i.reset(e,t);for(const i of this.#si)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#ii&&this.#ii.observe(t.element)}stopObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#ii&&this.#ii.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this.#ei)e.maxDistance>t&&(t=e.maxDistance);const e=this.#u;e.particles.grid.setCellSize(t*e.retina.pixelRatio)}#ni(t){const e=this.#u;if(!e.destroyed&&e.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivityData.element&&(i.isIntersecting?e.play():e.pause())}}var ln=Object.freeze({__proto__:null,InteractivityPluginInstance:class{interactionManager;#u;#p;constructor(t,e){this.#u=e,this.#p=t,this.interactionManager=new rn(t,e),this.#u.addClickHandler=t=>{this.interactionManager.addClickHandler(t)}}addClickHandler(t){this.interactionManager.addClickHandler(t)}clearClickHandlers(){this.interactionManager.clearClickHandlers()}destroy(){this.clearClickHandlers(),this.#p.interactors?.delete(this.#u)}particleCreated(t){const e=t,i=new ss(this.#p,this.#u);i.load(this.#u.actualOptions.interactivity),i.load(e.options.interactivity),e.interactivity=i}particleReset(t){this.interactionManager.reset(t)}postParticleUpdate(t,e){this.interactionManager.particlesInteract(t,e)}postUpdate(t){this.interactionManager.externalInteract(t),this.interactionManager.updateMaxDistance()}async preInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}async redrawInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}start(){return this.interactionManager.addListeners(),this.interactionManager.startObserving(),Promise.resolve()}stop(){this.interactionManager.removeListeners(),this.interactionManager.stopObserving()}}});var cn=Object.freeze({__proto__:null,OverlapPluginInstance:class{#u;constructor(t){this.#u=t}checkParticlePosition(t,e,i){return!this.#ai(t,e,i)}#ai(t,e,i){const s=t.options.collisions;if(!s?.enable)return!1;const n=s.overlap;if(n.enable)return!1;const a=n.retries;if(a>=0&&i>a)throw new Error("Particle is overlapping and can't be placed");return!!this.#u.particles.find(i=>Y(e,i.position)<t.getRadius()+i.getRadius())}}});function dn(t,e){const i=(s=t.map(t=>t.id),[...s].sort((t,e)=>t-e).join("_"));var s;let n=e.get(i);return void 0===n&&(n=A(),e.set(i,n)),n}var hn=Object.freeze({__proto__:null,LinkInstance:class{#oi=new Map;#u;#ri;#p;constructor(t,e){this.#p=t,this.#u=e,this.#ri={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:s}=e;if(!i?.length||!s.links)return;const n=s.links,a=e.retina.linksWidth??0,r=e.getPosition(),c=e.options.twinkle?.links,d=n.triangles.enable,h=d?new Set(i.map(t=>t.destination.id)):null,u=t.globalAlpha;let p="",g=-1,f=-1,y=!1;const m=()=>{y&&(t.stroke(),y=!1)};for(const u of i){if(n.frequency<1&&this.#li(e,u.destination)>n.frequency)continue;const i=u.destination.getPosition();if(d&&!u.isWarped&&h&&(m(),this.#ci(s,e,u,h,r,i,t)),u.opacity<=0||a<=0)continue;if(!n.enable)continue;let v=u.opacity,w=u.color;const P=c?.enable&&A()<c.frequency?Ve(this.#p,c.color):void 0;if(c&&P&&(w=P,v=W(c.opacity)),!w){const t=void 0!==n.id?this.#u.particles.linksColors.get(n.id):this.#u.particles.linksColor;w=Ke(e,u.destination,t)}if(!w)continue;const b=this.#di(w);if(b===p&&a===g&&v===f||(m(),t.strokeStyle=b,t.lineWidth=a,t.globalAlpha=v,p=b,g=a,f=v,t.beginPath(),y=!0),u.isWarped){const e=this.#u.canvas.size,s=i.x-r.x,n=i.y-r.y;let a=l.x,c=l.y;Math.abs(s)>e.width*o&&(a=s>0?-e.width:e.width),Math.abs(n)>e.height*o&&(c=n>0?-e.height:e.height),t.moveTo(r.x,r.y),t.lineTo(i.x+a,i.y+c),t.moveTo(r.x-a,r.y-c),t.lineTo(i.x,i.y)}else t.moveTo(r.x,r.y),t.lineTo(i.x,i.y)}m(),t.globalAlpha=u}init(){return this.#ri.links.clear(),this.#ri.triangles.clear(),this.#oi.clear(),Promise.resolve()}particleCreated(t){if(t.links=[],!t.options.links)return;t.linksDistance=t.options.links.distance,t.linksWidth=t.options.links.width;const e=this.#u.retina.pixelRatio;t.retina.linksDistance=t.linksDistance*e,t.retina.linksWidth=t.linksWidth*e}particleDestroyed(t){t.links=[]}#ci(t,e,i,s,n,a,r){const l=i.destination,c=t.links?.triangles;if(!c?.enable||!l.options.links?.triangles.enable)return;const d=l.links;if(d?.length)for(const h of d){if(h.isWarped||this.#li(l,h.destination)>l.options.links.frequency||!s.has(h.destination.id))continue;const d=h.destination;if(this.#hi(e,l,d)>(t.links?.triangles.frequency??0))continue;const u=c.opacity??(i.opacity+h.opacity)*o,p=Ve(this.#p,c.color)??i.color;if(!p||u<=0)continue;const g=d.getPosition();r.save(),r.fillStyle=this.#di(p),r.globalAlpha=u,r.beginPath(),r.moveTo(n.x,n.y),r.lineTo(a.x,a.y),r.lineTo(g.x,g.y),r.closePath(),r.fill(),r.restore()}}#di(t){const e=`${t.r},${t.g},${t.b}`;let i=this.#oi.get(e);return i||(i=Ye(t,this.#u.hdr),this.#oi.set(e,i)),i}#li(t,e){return dn([t,e],this.#ri.links)}#hi(t,e,i){return dn([t,e,i],this.#ri.triangles)}}});t.AnimatableColor=le,t.AnimationOptions=se,t.AnimationValueWithRandom=ve,t.Background=ce,t.BaseRange=Nt,t.Circle=Xt,t.ColorAnimation=ae,t.Fill=pe,t.FullScreen=de,t.HslAnimation=oe,t.Move=xe,t.MoveAngle=ge,t.MoveCenter=fe,t.MoveGravity=ye,t.MovePath=Pe,t.OptionLoader=Qt,t.Options=Ee,t.OptionsColor=re,t.OutModes=be,t.Paint=ze,t.ParticlesBounce=Oe,t.ParticlesBounceFactor=Ce,t.ParticlesDensity=De,t.ParticlesNumber=Ie,t.ParticlesNumberLimit=Se,t.ParticlesOptions=Le,t.RangedAnimationOptions=ne,t.RangedAnimationValueWithRandom=we,t.Rectangle=Yt,t.ResizeEvent=he,t.Shape=Te,t.Spin=Me,t.Stroke=ke,t.ValueWithRandom=me,t.Vector=C,t.Vector3d=z,t.ZIndex=_e,t.alterHsl=ai,t.animate=B,t.areBoundsInside=ut,t.calcExactPositionOrRandomFromSize=it,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=et,t.calcPositionOrRandomFromSizeRanged=function(t){const e={x:void 0!==t.position?.x?W(t.position.x):void 0,y:void 0!==t.position?.y?W(t.position.y):void 0};return et({size:t.size,position:e})},t.calculateBounds=pt,t.cancelAnimation=V,t.canvasFirstIndex=0,t.canvasTag=f,t.checkDistance=Q,t.circleBounce=yt,t.circleBounceDataFromParticle=ft,t.clamp=U,t.cloneStyle=Pt,t.collisionVelocity=tt,t.colorMix=Ze,t.colorToRgb=Ue,t.countOffset=1,t.decayOffset=1,t.deepExtend=gt,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=Z,t.deleteCount=1,t.double=2,t.doublePI=u,t.empty=0,t.executeOnSingleOrMultiple=mt,t.generatedAttribute=e,t.generatedFalse=g,t.generatedTrue=p,t.getDistance=Y,t.getDistanceSq=X,t.getDistances=N,t.getFullScreenStyle=xt,t.getHslAnimationFromHsl=ei,t.getHslFromAnimation=ti,t.getItemMapFromInitializer=Ct,t.getItemsFromInitializer=zt,t.getLinkColor=Ke,t.getLinkRandomColor=Je,t.getLogger=_t,t.getParticleBaseVelocity=J,t.getParticleDirectionAngle=K,t.getPosition=wt,t.getRandom=A,t.getRandomFn=function(){return R},t.getRandomInRange=F,t.getRandomRgbColor=Xe,t.getRangeMax=G,t.getRangeMin=$,t.getRangeValue=W,t.getStyleFromHsl=Qe,t.getStyleFromRgb=Ye,t.hMax=m,t.hMin=0,t.hPhase=60,t.half=o,t.hslToRgb=Ge,t.hslToRgbFloat=je,t.hslaToRgba=Ne,t.identity=1,t.inverseFactorNumerator=1,t.isArray=T,t.isBoolean=O,t.isFunction=function(t){return"function"==typeof t},t.isInArray=ct,t.isNull=_,t.isNumber=S,t.isObject=I,t.isPointInside=ht,t.isString=D,t.itemFromArray=dt,t.itemFromSingleOrMultiple=vt,t.lFactor=1,t.lMax=w,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){void 0!==i&&(t[e]=gt(t[e]??{},i))},t.loadLazyProperty=ee,t.loadMinIndex=0,t.loadNestedProperty=te,t.loadOptionProperty=ie,t.loadOptions=Zt,t.loadParticlesOptions=Re,t.loadProperty=Kt,t.loadRandomFactor=1e4,t.loadRangeProperty=Jt,t.manageListener=kt,t.maxNits=M,t.midColorValue=h,t.millisecondsToSeconds=r,t.minCount=0,t.minDistance=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minRadius=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=H,t.none=0,t.one=1,t.originPoint=l,t.parseAlpha=st,t.particles=Fs,t.percentDenominator=a,t.phaseNumerator=1,t.quarter=P,t.randomColorValue=d,t.randomInRangeValue=q,t.rangeColorToHsl=He,t.rangeColorToRgb=Ve,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=y,t.rgbToHsl=qe,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=ot,t.safeMatchMedia=rt,t.safeMutationObserver=lt,t.setAnimationFunctions=function(t,e){E.nextFrame=t,E.cancel=e},t.setLogger=function(t){t.debug&&(Tt.debug=It(t.debug)),t.error&&(Tt.error=It(t.error)),t.info&&(Tt.info=It(t.info)),t.log&&(Tt.log=It(t.log)),t.trace&&(Tt.trace=It(t.trace)),t.verbose&&(Tt.verbose=It(t.verbose)),t.warning&&(Tt.warning=It(t.warning))},t.setRandom=function(t=Math.random){R=t},t.setRangeValue=j,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Be(t,e)?.a},t.stringToRgb=We,t.threeQuarter=b,t.triple=3,t.tryCountIncrement=1,t.tsParticles=oi,t.updateColor=ni,t.updateColorValue=si,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{loadExtendProperty:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadExtendProperty,loadLazyProperty:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadLazyProperty,loadMinIndex:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadMinIndex,loadNestedProperty:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadNestedProperty,loadOptionProperty:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadOptionProperty,loadOptions:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadOptions,loadParticlesOptions:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadParticlesOptions,loadProperty:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadProperty,loadRandomFactor:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadRandomFactor,loadRangeProperty:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadRangeProperty,tsParticles:(globalThis.__tsParticlesInternals.bundles.particles||{}).tsParticles}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.particles||{}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
@@ -1,5 +1,5 @@
1
1
  (function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
2
- /* tsParticles v4.2.1 */
2
+ /* tsParticles v4.3.1 */
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/engine'), require('@tsparticles/basic'), require('@tsparticles/plugin-interactivity'), require('@tsparticles/interaction-particles-collisions'), require('@tsparticles/interaction-particles-links')) :
5
5
  typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/engine', '@tsparticles/basic', '@tsparticles/plugin-interactivity', '@tsparticles/interaction-particles-collisions', '@tsparticles/interaction-particles-links'], factory) :
@@ -74,7 +74,7 @@
74
74
 
75
75
  let initPromise = null;
76
76
  async function doInitPlugins(engine) {
77
- engine.checkVersion("4.2.1");
77
+ engine.checkVersion("4.3.1");
78
78
  await engine.pluginManager.register(async (e) => {
79
79
  const loadParticlesInteractivity = async (e) => {
80
80
  await pluginInteractivity.loadInteractivityPlugin(e);
@@ -117,7 +117,7 @@
117
117
  particles.init = async () => {
118
118
  await initPlugins(engine.tsParticles);
119
119
  };
120
- particles.version = "4.2.1";
120
+ particles.version = "4.3.1";
121
121
  globalThis.particles = particles;
122
122
 
123
123
  const globalObject = globalThis;