@tsparticles/pjs 4.3.2 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/index.js +1 -1
- package/browser/index.lazy.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.lazy.js +1 -1
- package/esm/index.js +1 -1
- package/esm/index.lazy.js +1 -1
- package/package.json +4 -4
- package/report.html +1 -1
- package/tsparticles.pjs.bundle.js +317 -117
- package/tsparticles.pjs.bundle.min.js +1 -1
- package/tsparticles.pjs.js +2 -2
- package/tsparticles.pjs.min.js +1 -1
|
@@ -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.pjs=t.__tsParticlesInternals.bundles.pjs||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",a=100,o=.5,r=1e3,c={x:0,y:0,z:0},l={a:1,b:0,c:0,d:1},d="random",h="mid",u=2*Math.PI,p="true",g="false",f="canvas",m=255,y=360,v=100,b=100,w=.25,x=.75,M=400;var P;function k(t){return"z"in t?t.z:c.z}t.MoveDirection=void 0,(P=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",P.bottomLeft="bottom-left",P.bottomRight="bottom-right",P.left="left",P.none="none",P.right="right",P.top="top",P.topLeft="top-left",P.topRight="top-right",P.outside="outside",P.inside="inside";class C{x;y;z;constructor(t=c.x,e=c.y,i=c.z){this.x=t,this.y=e,this.z=i}static get origin(){return C.create(c.x,c.y,c.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 C.create(t.x,t.y,k(t))}static create(t,e,i){return"number"==typeof t?new C(t,e??c.y,i??c.z):new C(t.x,t.y,k(t))}add(t){return C.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 C.clone(this)}div(t){return C.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return C.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 C.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),c.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=k(t)}sub(t){return C.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 O extends C{constructor(t=c.x,e=c.y){super(t,e,c.z)}static get origin(){return O.create(c.x,c.y)}static clone(t){return O.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new O(t,e??c.y):new O(t.x,t.y)}}function z(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 E(t){return null==t}const R=Math.PI/180;let L=Math.random;const _={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return H(L(),0,1-Number.EPSILON)}function F(t,e){return A()*(e-t)+t}function V(t){return _.nextFrame(t)}function B(t){_.cancel(t)}function H(t,e,i){return Math.min(Math.max(t,e),i)}function q(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function U(t){const e=$(t);let i=j(t);return e===i&&(i=0),F(i,e)}function W(t){return S(t)?t:U(t)}function j(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=j(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 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 J(t,e,i){return X(t,e)<=i*i}function K(t){return t*R}function Q(e,i,s){if(S(e))return K(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*x;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*x;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 Z(t){const e=O.origin;return e.length=1,e.angle=t,e}function tt(t,e,i,s){return O.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 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})}function st(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}function nt(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1}var at,ot;t.OutModeDirection=void 0,(at=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",at.left="left",at.right="right",at.top="top",t.PixelMode=void 0,(ot=t.PixelMode||(t.PixelMode={})).precise="precise",ot.percent="percent";function rt(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function ct(){return globalThis.document}function lt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function dt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function ht(t,e){return t===e||T(e)&&e.includes(t)}function ut(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(A()*t.length)]}function pt(t,e,i,s,n){return gt(ft(t,s??0),e,i,n)}function gt(e,i,s,n){let a=!0;return n&&n!==t.OutModeDirection.bottom||(a=e.top<i.height+s.x),!a||n&&n!==t.OutModeDirection.left||(a=e.right>s.x),!a||n&&n!==t.OutModeDirection.right||(a=e.left<i.width+s.y),!a||n&&n!==t.OutModeDirection.top||(a=e.bottom>s.y),a}function ft(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function mt(t,...e){for(const i of e){if(E(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(rt(t))continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if(rt(s))continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>mt(void 0,t)):mt(e[s],n)}}return t}function yt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:O.create(W(t.options.bounce.horizontal.value),W(t.options.bounce.vertical.value))}}function vt(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 c=-Math.atan2(r,o),l=t.mass,d=e.mass,h=t.velocity.rotate(c),u=e.velocity.rotate(c),p=tt(h,u,l,d),g=tt(u,h,l,d),f=p.rotate(-c),m=g.rotate(-c);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=m.x*e.factor.x,e.velocity.y=m.y*e.factor.y}function bt(t,e){return T(t)?t.map((t,i)=>e(t,i)):e(t,0)}function wt(t,e,i){return T(t)?ut(t,e,i):t}function xt(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 Mt(t){const e=ct().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||E(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 Pt,kt;function Ct(t){if(Pt!==t||!kt){Pt=t;const e=ct().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)}kt=e}return kt}function Ot(t,e,i,s,n){if(s){let s={passive:!0};z(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 Dt(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 St{#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 It;t.EventType=void 0,(It=t.EventType||(t.EventType={})).configAdded="configAdded",It.containerInit="containerInit",It.particlesSetup="particlesSetup",It.containerStarted="containerStarted",It.containerStopped="containerStopped",It.containerDestroyed="containerDestroyed",It.containerPaused="containerPaused",It.containerPlay="containerPlay",It.containerBuilt="containerBuilt",It.particleAdded="particleAdded",It.particleDestroyed="particleDestroyed",It.particleRemoved="particleRemoved";class Tt{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;#c=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 Dt(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 Dt(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.#c);try{for(const t of this.#i)await this.#l(t,this.#a,this.#i)}finally{this.#c.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.#l(e,this.#a,this.#i):this.#c.add(e)}async#l(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const Et=t=>(...e)=>{t(...e)},Rt={debug:Et(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:Et(console.info),log:Et(console.log),trace:Et(console.trace),verbose:Et(console.log),warning:Et(console.warn)};function Lt(){return Rt}const _t="100%";class At{pluginManager=new Tt(this);#d=[];#h=new St;#o=!1;get items(){return this.#d}get version(){return"4.3.2"}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 Ur}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=wt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Lt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,c=wt(r,a),{items:l}=this,d=l.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:c});if(d>=0){const t=this.item(d),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),l.splice(d,e,h)}else l.push(h);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=ct();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=ct();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return 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 Ft,Vt,Bt,Ht,qt,Ut,Wt,jt,$t,Gt,Nt,Xt;!function(t){t.circle="circle",t.rectangle="rectangle"}(Ft||(Ft={}));class Yt{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 Jt extends Yt{radius;constructor(t,e,i){super(t,e,Ft.circle),this.radius=i}contains(t){return J(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 Jt||t.type===Ft.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Kt||t.type===Ft.rectangle){const e=t,{width:i,height: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 Kt extends Yt{size;constructor(t,e,i,s){super(t,e,Ft.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof Jt)return t.intersects(this);if(!(t instanceof Kt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,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,(Vt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Vt.counterClockwise="counter-clockwise",Vt.random="random",t.AnimationMode=void 0,(Bt=t.AnimationMode||(t.AnimationMode={})).auto="auto",Bt.increase="increase",Bt.decrease="decrease",Bt.random="random",t.LimitMode=void 0,(Ht=t.LimitMode||(t.LimitMode={})).delete="delete",Ht.wait="wait",t.OutMode=void 0,(qt=t.OutMode||(t.OutMode={})).bounce="bounce",qt.none="none",qt.out="out",qt.destroy="destroy",qt.split="split",t.AlterType=void 0,(Ut=t.AlterType||(t.AlterType={})).darken="darken",Ut.enlighten="enlighten",t.DestroyType=void 0,(Wt=t.DestroyType||(t.DestroyType={})).none="none",Wt.max="max",Wt.min="min",t.GradientType=void 0,(jt=t.GradientType||(t.GradientType={})).linear="linear",jt.radial="radial",jt.random="random",t.ParticleOutType=void 0,($t=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",$t.inside="inside",$t.outside="outside",t.StartValueType=void 0,(Gt=t.StartValueType||(t.StartValueType={})).max="max",Gt.min="min",Gt.random="random",t.AnimationStatus=void 0,(Nt=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",Nt.decreasing="decreasing",t.DrawLayer=void 0,(Xt=t.DrawLayer||(t.DrawLayer={}))[Xt.BackgroundElement=0]="BackgroundElement",Xt[Xt.BackgroundDraw=1]="BackgroundDraw",Xt[Xt.BackgroundMask=2]="BackgroundMask",Xt[Xt.CanvasSetup=3]="CanvasSetup",Xt[Xt.PluginContent=4]="PluginContent",Xt[Xt.Particles=5]="Particles",Xt[Xt.CanvasCleanup=6]="CanvasCleanup",Xt[Xt.Foreground=7]="Foreground";class Qt{load(t){E(t)||this.doLoad(t)}}function Zt(t,...e){for(const i of e)t.load(i)}function te(t,e,i){void 0!==i&&(t[e]=i)}function ee(t,e,i){void 0!==i&&(t[e]=G(i))}function ie(t,e,i){void 0!==i&&t[e].load(i)}function se(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function ne(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 ae extends Qt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){ee(this,"count",t.count),te(this,"enable",t.enable),ee(this,"speed",t.speed),ee(this,"decay",t.decay),ee(this,"delay",t.delay),te(this,"sync",t.sync)}}class oe extends ae{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),te(this,"mode",t.mode),te(this,"startValue",t.startValue)}}class re extends ae{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),te(this,"max",t.max),te(this,"min",t.min),ee(this,"offset",t.offset)}}class ce extends Qt{h=new re(0,y);l=new re(0,b);s=new re(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class le extends Qt{value="";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){E(t.value)||(this.value=t.value)}}class de extends le{animation=new ce;static create(t,e){const i=new de;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 he extends Qt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new le,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=le.create(this.color,t.color)),te(this,"element",t.element),te(this,"draw",t.draw),te(this,"image",t.image),te(this,"position",t.position),te(this,"repeat",t.repeat),te(this,"size",t.size),te(this,"opacity",t.opacity)}}class ue extends Qt{enable=!0;zIndex=0;doLoad(t){te(this,"enable",t.enable),te(this,"zIndex",t.zIndex)}}class pe extends Qt{delay=.5;enable=!0;doLoad(t){te(this,"delay",t.delay),te(this,"enable",t.enable)}}class ge 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]=mt(this.options[t]??{},i))}te(this,"close",t.close),te(this,"type",t.type)}}class fe extends Qt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=de.create(this.color,t.color)),te(this,"enable",t.enable),ee(this,"opacity",t.opacity)}}class me extends Qt{offset=0;value=90;doLoad(t){ee(this,"offset",t.offset),ee(this,"value",t.value)}}class ye extends Qt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){te(this,"x",t.x),te(this,"y",t.y),te(this,"mode",t.mode),te(this,"radius",t.radius)}}class ve extends Qt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){ee(this,"acceleration",t.acceleration),te(this,"enable",t.enable),te(this,"inverse",t.inverse),ee(this,"maxSpeed",t.maxSpeed)}}class be extends Qt{value=0;doLoad(t){E(t.value)||(this.value=G(t.value))}}class we extends be{animation=new ae;doLoad(t){super.doLoad(t),ie(this,"animation",t.animation)}}class xe extends we{animation=new oe}class Me extends Qt{clamp=!0;delay=new be;enable=!1;generator;options={};doLoad(t){te(this,"clamp",t.clamp),this.delay.load(t.delay),te(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=mt(this.options,t.options))}}class Pe 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 ke extends Qt{acceleration=0;enable=!1;position;doLoad(t){ee(this,"acceleration",t.acceleration),te(this,"enable",t.enable),t.position&&(this.position=mt({},t.position))}}class Ce extends Qt{angle=new me;center=new ye;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new ve;outModes=new Pe;path=new Me;random=!1;size=!1;speed=2;spin=new ke;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),ee(this,"decay",t.decay),te(this,"direction",t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),ee(this,"drift",t.drift),te(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),te(this,"random",t.random),te(this,"size",t.size),ee(this,"speed",t.speed),this.spin.load(t.spin),te(this,"straight",t.straight),te(this,"vibrate",t.vibrate),te(this,"warp",t.warp)}}class Oe extends Qt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=de.create(this.color,t.color)),ee(this,"width",t.width),ee(this,"opacity",t.opacity)}}class ze extends Qt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=de.create(this.color,t.color)),se(this,"fill",t.fill,()=>new fe),se(this,"stroke",t.stroke,()=>new Oe)}}class De extends be{value=1}class Se extends Qt{horizontal=new De;vertical=new De;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Ie extends Qt{enable=!1;height=1080;width=1920;doLoad(t){te(this,"enable",t.enable),te(this,"width",t.width),te(this,"height",t.height)}}class Te extends Qt{mode=t.LimitMode.delete;value=0;doLoad(t){te(this,"mode",t.mode),te(this,"value",t.value)}}class Ee extends Qt{density=new Ie;limit=new Te;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),te(this,"value",t.value)}}class Re 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]=mt(this.options[t]??{},i))}te(this,"close",t.close),te(this,"type",t.type)}}class Le extends be{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),te(this,"opacityRate",t.opacityRate),te(this,"sizeRate",t.sizeRate),te(this,"velocityRate",t.velocityRate)}}class _e extends Qt{bounce=new Se;effect=new ge;groups={};move=new Ce;number=new Ee;paint;palette;reduceDuplicates=!1;shape=new Re;zIndex=new Le;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new ze,this.paint.color=new de,this.paint.color.value="#fff",this.paint.fill=new fe,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]=mt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(T(e)?this.paint=bt(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 Ae(t,e,...i){const s=new _e(t,e);return Zt(s,...i),s}class Fe 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 he,this.fullScreen=new ue,this.particles=Ae(this.#p,this.#u),this.resize=new pe}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,bt(this.preset,t=>{this.#f(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#g(this.palette)),te(this,"autoPlay",t.autoPlay),te(this,"clear",t.clear),te(this,"key",t.key),te(this,"name",t.name),ee(this,"delay",t.delay),te(this,"detectRetina",t.detectRetina),ee(this,"duration",t.duration),te(this,"fpsLimit",t.fpsLimit),te(this,"hdr",t.hdr),te(this,"pauseOnBlur",t.pauseOnBlur),te(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),te(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;z(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=mt(this.style,t.style),te(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 Ve=new Map;function Be(t,e){let i=Ve.get(t);return i||(i=e(),Ve.size>2e3&&Ve.clear(),Ve.set(t,i)),i}function He(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function qe(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=ut(n.value,i,s);if(!e)return;return qe(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?Je():$e(t,n.value);if(T(n.value)){const e=ut(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 We(t,e,i,s=!0){const n=qe(t,e,i,s);return n?je(n):void 0}function je(t){const e=t.r/m,i=t.g/m,s=t.b/m,n=Math.max(e,i,s),a=Math.min(e,i,s),r={h:0,l:(n+a)*o,s:0};return n!==a&&(r.s=r.l<o?(n-a)/(n+a):(n-a)/(2-n-a),r.h=e===n?(i-s)/(n-a):i===n?2+(s-e)/(n-a):4+(e-i)/(n-a)),r.l*=b,r.s*=v,r.h*=60,r.h<0&&(r.h+=y),r.h>=y&&(r.h-=y),r}function $e(t,e){return He(t,e)}function Ge(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 Ne(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/y,a=i/v,r=s/b;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const c=r<o?r*(1+a):r+a-r*a,l=2*r-c,d=1/3,h=Math.min(m,m*Ge(l,c,n+d)),u=Math.min(m,m*Ge(l,c,n)),p=Math.min(m,m*Ge(l,c,n-d));return{r:Math.round(h),g:Math.round(u),b:Math.round(p)}}function Xe(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/y,a=i/v,r=s/b;if(0===i){const t=r*m;return{r:t,g:t,b:t}}const c=r<o?r*(1+a):r+a-r*a,l=2*r-c,d=1/3;return{r:Math.min(m,m*Ge(l,c,n+d)),g:Math.min(m,m*Ge(l,c,n)),b:Math.min(m,m*Ge(l,c,n-d))}}function Ye(t){const e=Ne(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Je(t,e){const i=t??0;if(e)return{r:F(i,m),g:F(i,m),b:F(i,m)};const s=()=>Math.floor(F(i,256));return{b:s(),g:s(),r:s()}}function Ke(t,e,i){const s=e?4:2,n=i??1;return Be(`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/m*s).toString()} ${(t.g/m*s).toString()} ${(t.b/m*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 Be(`hsl-${t.h.toFixed(s)}-${t.s.toFixed(s)}-${t.l.toFixed(s)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?Ke(Xe(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=Ne(t)),"r"in a||(a=Ne(e)),{b:q(n.b,a.b,i,s),g:q(n.g,a.g,i,s),r:q(n.r,a.r,i,s)}}function ti(t,e,i){if(i===d)return Je();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 Ne(t)}}}function ei(t,e,i,s){const n=D(e)?e:e.value;return n===d?s?qe(t,{value:n}):i?d:h:n===h?h:qe(t,{value:n})}function ii(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function si(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:y},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:b}};return e&&(ni(s.h,e.h,i),ni(s.s,e.s,i),ni(s.l,e.l,i)),s}function ni(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=G(i.offset)):e.velocity=0}function ai(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?U(e.offset):0,o=((e.velocity??0)*s.factor+3.6*a)*(n?.5075:1),r=e.decay??1,c=e.max,l=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=o,e.value<l&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=o,e.value>c&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=c)),e.velocity&&1!==r&&(e.velocity*=r),e.value=H(e.value,l,c)}function oi(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;ai(s,!1,e,i),ai(n,!0,e,i),ai(a,!0,e,i)}function ri(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const ci=new At;class li{#u;static init(t){const e=new li,i=t.selector;if(!i)throw new Error("No selector provided");const s=ct().querySelector(i);if(!s)throw new Error("No element found for selector");return(async n=>{await n.load({element:s,id:i.replace(".","").replace("!",""),options:{fullScreen:{enable:!1},particles:{color:{value:t.color??"!000000"},links:{color:"random",distance:t.minDistance??120,enable:t.connectParticles??!1},move:{enable:!0,speed:t.speed??.5},number:{value:t.maxParticles??100},size:{value:{min:1,max:t.sizeVariations??3}}},responsive:t.responsive?.map(e=>({maxWidth:e.breakpoint,options:{particles:{color:{value:e.options?.color},links:{distance:e.options?.minDistance,enable:e.options?.connectParticles},number:{value:t.maxParticles},move:{enable:!0,speed:e.options?.speed},size:{value:e.options?.sizeVariations}}}}))}}).then(t=>{e.#u=t})})(ci),e}destroy(){const t=this.#u;t?.destroy()}pauseAnimation(){const t=this.#u;t?.pause()}resumeAnimation(){const t=this.#u;t?.play()}}const di={particles:{number:{value:400,density:{enable:!0,value_area:800}},color:{value:"#fff"},shape:{type:"circle",stroke:{width:0,color:"#ff0000"},polygon:{nb_sides:5},image:{src:"",width:100,height:100}},opacity:{value:1,random:!1,anim:{enable:!1,speed:2,opacity_min:0,sync:!1}},size:{value:20,random:!1,anim:{enable:!1,speed:20,size_min:0,sync:!1}},line_linked:{enable:!0,distance:100,color:"#fff",opacity:1,width:1},move:{enable:!0,speed:2,direction:"none",random:!1,straight:!1,out_mode:"out",bounce:!1,attract:{enable:!1,rotateX:3e3,rotateY:3e3}}},interactivity:{detect_on:"canvas",events:{onhover:{enable:!0,mode:"grab"},onclick:{enable:!0,mode:"push"},resize:!0},modes:{grab:{distance:100,line_linked:{opacity:1}},bubble:{distance:200,size:80,duration:.4,opacity:1,speed:3},repulse:{distance:200,duration:.4},push:{particles_nb:4},remove:{particles_nb:2}}},retina_detect:!1};class hi{enable=!1;mode=[];load(t){E(t)||(te(this,"enable",t.enable),te(this,"mode",t.mode))}}var ui,pi,gi;!function(t){t.circle="circle",t.rectangle="rectangle"}(ui||(ui={}));class fi{enable=!1;mode=[];selectors=[];type=ui.circle;load(t){E(t)||(te(this,"selectors",t.selectors),te(this,"enable",t.enable),te(this,"mode",t.mode),te(this,"type",t.type))}}class mi{enable=!1;mode=[];load(t){E(t)||(te(this,"enable",t.enable),te(this,"mode",t.mode))}}class yi{onClick=new hi;onDiv=new fi;onHover=new mi;load(t){if(E(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=bt(e,t=>{const e=new fi;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(pi||(pi={}));class vi{#u;#p;constructor(t,e){this.#p=t,this.#u=e}load(t){if(E(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 bi{detectsOn=pi.window;events=new yi;modes;constructor(t,e){this.modes=new vi(t,e)}load(t){if(E(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class wi{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return $r});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new bi(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=mt({},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"}(gi||(gi={}));class xi{type=gi.external;container;constructor(t){this.container=t}}class Mi{type=gi.particles;container;constructor(t){this.container=t}}const Pi="pointerdown",ki="pointerup",Ci="pointerleave",Oi="pointermove",zi="touchstart",Di="touchend",Si="touchmove",Ii="touchcancel";function Ti(t,e){if(T(t))return t.find((t,i)=>e(t,i));return e(t,0)?t:void 0}function Ei(t,e){return!!Ti(e,e=>e.enable&&ht(t,e.mode))}function Ri(t,e,i){bt(e,e=>{const s=e.mode;e.enable&&ht(t,s)&&function(t,e){const i=t.selectors;bt(i,i=>{e(i,t)})}(e,i)})}function Li(t,e){if(e&&t)return Ti(t,t=>function(t,e){const i=bt(e,e=>t.matches(e));return T(i)?i.some(t=>t):i}(e,t.selectors))}function _i(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}class Ai{count;delay;duration;wait=!1;load(t){E(t)||(te(this,"count",t.count),ee(this,"delay",t.delay),ee(this,"duration",t.duration),te(this,"wait",t.wait))}}class Fi{mass=0;radius=0;load(t){E(t)||(te(this,"mass",t.mass),te(this,"radius",t.radius))}}class Vi extends be{density=5;limit=new Fi;value=50;load(t){E(t)||(super.load(t),te(this,"density",t.density),S(t.limit)?this.limit.radius=t.limit:this.limit.load(t.limit))}}class Bi{color;destroy;draggable;life;name;opacity;orbits;position;size;constructor(){this.color=new le,this.color.value="#000000",this.draggable=!1,this.opacity=1,this.destroy=!0,this.orbits=!1,this.life=new Ai,this.size=new Vi}load(t){E(t)||(void 0!==t.color&&(this.color=le.create(this.color,t.color)),te(this,"draggable",t.draggable),void 0!==t.life&&this.life.load(t.life),this.name=t.name,te(this,"opacity",t.opacity),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=G(t.position.x)),void 0!==t.position.y&&(this.position.y=G(t.position.y))),void 0!==t.size&&this.size.load(t.size),te(this,"destroy",t.destroy),te(this,"orbits",t.orbits))}}const Hi="absorbers";class qi extends xi{handleClickMode;maxDistance;#m=!1;#y;#v;constructor(t,e){super(t),this.maxDistance=0,this.#v=e,this.#v.initContainer(t),this.handleClickMode=(t,i)=>{const s=this.container,n=s.actualOptions.interactivity.modes.absorbers;if(!n||t!==Hi)return;const{clickPosition:a}=i.mouse;if(a){if(e.getArray(this.container).some(t=>Y(t.position,a)<t.size))return}const o=ut(n)??new Bi;this.#v.addAbsorber(s,o,a)}}clear(){}init(){}interact(t,e){for(const i of this.container.particles.filter(e=>this.isEnabled(t,e)))for(const s of this.#v.getArray(this.container)){if(s.options.draggable){const e=t.mouse;if(e.clicking&&e.downPosition){Y(s.position,e.downPosition)<=s.size&&(this.#m=!0,this.#y=s)}else this.#m=!1,this.#y=void 0;this.#m&&this.#y==s&&e.position&&(s.position.x=e.position.x,s.position.y=e.position.y)}if(s.attract(i,e),i.destroyed)break}}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity).events;return!(!s.clickPosition||!n.onClick.enable)&&ht(Hi,n.onClick.mode)}loadModeOptions(t,...e){t.absorbers??=[];for(const i of e)if(i)if(T(i.absorbers))for(const e of i.absorbers){const i=new Bi;i.load(e),t.absorbers.push(i)}else{const e=new Bi;e.load(i.absorbers),t.absorbers.push(e)}}reset(){}}const Ui=new WeakMap;function Wi(t){const e=t.pluginManager;let i=Ui.get(e);return i||(i=Promise.resolve().then(function(){return Gr}).then(({AbsorbersInstancesManager:t})=>new t(e)).catch(t=>{throw Ui.delete(e),t}),Ui.set(e,i)),i}class ji{id="absorbers";#v;constructor(t){this.#v=t}async getPlugin(t){const{AbsorbersPluginInstance:e}=await Promise.resolve().then(function(){return Nr});return new e(t,this.#v)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.absorbers&&(e.absorbers=bt(i.absorbers,t=>{const e=new Bi;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.absorbers;return T(e)?!!e.length:!!e}}async function $i(t){await async function(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{const e=t.pluginManager,i=await Wi(t);e.addPlugin(new ji(i))})}(t),await async function(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{const e=t.pluginManager,i=await Wi(t);_i(t),e.addInteractor?.("externalAbsorbers",t=>Promise.resolve(new qi(t,i)))})}(t)}class Gi{bottom;left;right;top;load(t){E(t)||(ee(this,"bottom",t.bottom),ee(this,"left",t.left),ee(this,"right",t.right),ee(this,"top",t.top))}}var Ni;!function(t){t.explode="explode",t.none="none",t.split="split"}(Ni||(Ni={}));class Xi{maxSizeFactor=3;speed=2;load(t){E(t)||(te(this,"maxSizeFactor",t.maxSizeFactor),te(this,"speed",t.speed))}}class Yi extends be{value=3}class Ji extends be{value={min:4,max:9}}class Ki{count=1;factor=new Yi;fillColor;fillColorOffset;particles;rate=new Ji;sizeOffset=!0;strokeColor;strokeColorOffset;load(t){E(t)||(void 0!==t.fillColor&&(this.fillColor=le.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=le.create(this.strokeColor,t.strokeColor)),te(this,"count",t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=bt(t.particles,t=>mt({},t)),te(this,"sizeOffset",t.sizeOffset),t.fillColorOffset&&(this.fillColorOffset=this.fillColorOffset??{},void 0!==t.fillColorOffset.h&&(this.fillColorOffset.h=t.fillColorOffset.h),void 0!==t.fillColorOffset.s&&(this.fillColorOffset.s=t.fillColorOffset.s),void 0!==t.fillColorOffset.l&&(this.fillColorOffset.l=t.fillColorOffset.l)),t.strokeColorOffset&&(this.strokeColorOffset=this.strokeColorOffset??{},void 0!==t.strokeColorOffset.h&&(this.strokeColorOffset.h=t.strokeColorOffset.h),void 0!==t.strokeColorOffset.s&&(this.strokeColorOffset.s=t.strokeColorOffset.s),void 0!==t.strokeColorOffset.l&&(this.strokeColorOffset.l=t.strokeColorOffset.l)))}}let Qi=class{bounds=new Gi;explode=new Xi;mode=Ni.none;split=new Ki;load(t){E(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.explode.load(t.explode),this.split.load(t.split))}};function Zi(t,e,i,s){return t&&s?function(t,e){const i=W(e.h??0),s=W(e.s??0),n=W(e.l??0),a=(t.h+i)%360,o=Math.max(0,Math.min(100,t.s+s)),r=Math.max(0,Math.min(100,t.l+n));return de.create(void 0,{value:{hsl:{h:a<0?a+360:a,s:o,l:r}}})}(s,t):e?de.create(void 0,e):i?de.create(void 0,i):s?function(t){return de.create(void 0,{value:{hsl:t}})}(s):void 0}function ts(e,i,s,n){const a=s.options.destroy;if(!a)return;const o=a.split,r=Ae(e,i,s.options),c=wt(o.fillColor),l=wt(o.strokeColor),d=s.getFillColor(),h=s.getStrokeColor();r.move.load({center:{x:s.position.x,y:s.position.y,mode:t.PixelMode.precise}});const u=1/W(o.factor.value),p=r.size;p&&(S(p.value)?p.value*=u:(p.value.min*=u,p.value.max*=u)),r.load(n);const g=wt(r.paint),f=g?.fill,m=g?.stroke,y=Zi(o.fillColorOffset,c,f?.color,d),v=Zi(o.strokeColorOffset,l,m?.color,h);y&&f&&(f.color=y),v&&m&&(m.color=v);const b=o.sizeOffset?G(-s.size.value,s.size.value):0,w={x:s.position.x+U(b),y:s.position.y+U(b)};return i.particles.addParticle(w,r,s.group,t=>!(t.size.value<.5)&&(t.velocity.length=U(G(s.velocity.length,t.velocity.length)),t.splitCount=(s.splitCount??0)+1,t.unbreakable=!0,t.unbreakableUntil=performance.now()+500,!0))}class es{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options.destroy;if(!i)return;t.exploding=void 0,t.splitCount=0;const s=i.bounds;t.destroyBounds??={};const{bottom:n,left:o,right:r,top:c}=s,{destroyBounds:l}=t,d=e.canvas.size;n&&(l.bottom=W(n)*d.height/a),o&&(l.left=W(o)*d.width/a),r&&(l.right=W(r)*d.width/a),c&&(l.top=W(c)*d.height/a)}isEnabled(t){const e=t;return!e.destroyed||!!e.exploding}loadOptions(t,...e){ne(t,"destroy",Qi,...e)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;switch(i?.mode){case Ni.split:!function(t,e,i){const s=i.options.destroy;if(!s)return;const n=s.split;if(n.count>=0){if(void 0===i.splitCount||i.splitCount>n.count)return;i.splitCount++}const a=W(n.rate.value),o=wt(n.particles);for(let s=0;s<a;s++)ts(t,e,i,o)}(this.#p,this.#u,t);break;case Ni.explode:{if(t.exploding){t.destroyed=!1;break}const{explode:e}=i,s=t.size.value,n=s*e.maxSizeFactor,a=t.getOpacity();t.exploding={initialFillOpacity:a.fillOpacity,initialSize:s,initialStrokeOpacity:a.strokeOpacity,maxSize:n,progress:0,speed:Math.max(e.speed,.01)},t.fillOpacity=a.fillOpacity,t.strokeOpacity=a.strokeOpacity,t.destroyed=!1;break}}}update(t,e){if(t.exploding){const i=t.exploding,s=e.factor||1;i.progress=Math.min(1,i.progress+i.speed*s/60);const n=i.progress;return t.size.value=i.initialSize+(i.maxSize-i.initialSize)*n,t.fillOpacity=i.initialFillOpacity*(1-n),t.strokeOpacity=i.initialStrokeOpacity*(1-n),void(n>=1&&(t.exploding=void 0,t.destroy(!0)))}void 0!==t.unbreakableUntil&&performance.now()>=t.unbreakableUntil&&(t.unbreakable=!1,t.unbreakableUntil=void 0);const i=t.getPosition(),s=t.destroyBounds;s&&(void 0!==s.bottom&&i.y>=s.bottom||void 0!==s.left&&i.x<=s.left||void 0!==s.right&&i.x>=s.right||void 0!==s.top&&i.y<=s.top)&&t.destroy()}}async function is(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("destroy",e=>Promise.resolve(new es(t.pluginManager,e)))})}class ss{count;delay;duration;wait=!1;load(t){E(t)||(te(this,"count",t.count),ee(this,"delay",t.delay),ee(this,"duration",t.duration),te(this,"wait",t.wait))}}class ns{delay=.1;quantity=1;load(t){E(t)||(ee(this,"quantity",t.quantity),ee(this,"delay",t.delay))}}class as{color=!1;opacity=!1;load(t){E(t)||(te(this,"color",t.color),te(this,"opacity",t.opacity))}}class os{options={};replace=new as;type="square";load(t){E(t)||(void 0!==t.options&&(this.options=mt({},t.options??{})),this.replace.load(t.replace),te(this,"type",t.type))}}class rs{height=0;mode=t.PixelMode.percent;width=0;load(t){E(t)||(te(this,"mode",t.mode),te(this,"height",t.height),te(this,"width",t.width))}}class cs{fill;stroke;load(t){E(t)||(t.fill&&(this.fill??=new fe,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new Oe,this.stroke.load(t.stroke)))}}class ls{autoPlay=!0;direction;domId;fill=!0;life=new ss;name;particles;position;rate=new ns;shape=new os;size;spawn=new cs;spawnFillColor;spawnStrokeColor;startCount=0;load(t){E(t)||(te(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new rs,this.size.load(t.size)),te(this,"direction",t.direction),te(this,"domId",t.domId),te(this,"fill",t.fill),this.life.load(t.life),te(this,"name",t.name),this.particles=bt(t.particles,t=>mt({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=G(t.position.x)),void 0!==t.position.y&&(this.position.y=G(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new de,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new de,this.spawnStrokeColor.load(t.spawnStrokeColor)),te(this,"startCount",t.startCount))}}const ds={count:1,enable:!0},hs="emitters";class us extends xi{handleClickMode;maxDistance;#v;constructor(t,e){super(e),this.#v=t,this.maxDistance=0,this.handleClickMode=(t,e)=>{const i=this.container.actualOptions.interactivity.modes.emitters;if(!i||t!==hs)return;let s;if(T(i.value)){const t=0,e=i.value.length;if(e>t&&i.random.enable){s=[];const t=new Set;for(let n=0;n<i.random.count;n++){const a=Math.floor(A()*i.value.length);if(t.has(a)&&t.size<e){n--;continue}t.add(a);const o=ut(i.value,a);o&&s.push(o)}}else s=i.value}else s=i.value;const n=s,a=e.mouse.clickPosition;bt(n,async t=>{await this.#v.addEmitter(this.container,t,a)})}}clear(){}init(){}interact(t,e){for(const t of this.#v.getArray(this.container))t.update(e)}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity).events;return!(!s.clickPosition||!n.onClick.enable)&&ht(hs,n.onClick.mode)}loadModeOptions(t,...e){t.emitters={random:ds,value:[]};for(const i of e)if(i?.emitters)if(T(i.emitters))for(const e of i.emitters){const i=new ls;i.load(e),t.emitters.value.push(i)}else if("value"in i.emitters){const e=i.emitters;if(t.emitters.random.enable=e.random?.enable??t.emitters.random.enable,t.emitters.random.count=e.random?.count??t.emitters.random.count,T(e.value))for(const i of e.value){const e=new ls;e.load(i),t.emitters.value.push(e)}else{const i=new ls;i.load(e.value),t.emitters.value.push(i)}}else{const e=new ls;e.load(i.emitters),t.emitters.value.push(e)}}removeEmitter(t){const e=this.#v.getArray(this.container).indexOf(t);e>=0&&this.#v.getArray(this.container).splice(e,1)}reset(){}}async function ps(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return Yr}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}const gs=new WeakMap;function fs(t){const e=t.pluginManager;let i=gs.get(e);return i||(i=Promise.resolve().then(function(){return Jr}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw gs.delete(e),t}),gs.set(e,i)),i}class ms{fill;options;position;size;constructor(t,e,i,s){this.position=t,this.size=e,this.fill=i,this.options=s}resize(t,e){this.position=t,this.size=e}}var ys;!function(t){t.emitter="emitter"}(ys||(ys={}));class vs{id="emitters";#v;constructor(t){this.#v=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return Kr});return new e(this.#v,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=bt(i.emitters,t=>{const e=new ls;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return T(e)&&!!e.length||void 0!==e}}function bs(t){if(!t.pluginManager.addEmitterShapeGenerator)throw new Error("tsParticles Emitters Plugin is not loaded")}async function ws(t){await async function(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{const e=await fs(t);await ps(t),t.pluginManager.addPlugin(new vs(e))})}(t),await async function(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{const e=await fs(t);_i(t),await ps(t),t.pluginManager.addInteractor?.("externalEmitters",t=>Promise.resolve(new us(e,t)))})}(t)}class xs extends ms{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.size,e=this.fill,i=this.position,[s,n]=[t.width*o,t.height*o],a=((t,e)=>{const i=A()*w,s=Math.atan(e/t*Math.tan(u*i)),n=A();return n<w?s:n<.5?Math.PI-s:n<.75?Math.PI+s:-s})(s,n),r=(h=a,(l=s)*(d=n)/Math.sqrt((d*Math.cos(h))**2+(l*Math.sin(h))**2)),c=e?r*Math.sqrt(A()):r;var l,d,h;return{position:{x:i.x+c*Math.cos(a),y:i.y+c*Math.sin(a)}}}}class Ms{generate(t,e,i,s,n){return new xs(e,i,s,n)}}async function Ps(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{bs(t),t.pluginManager.addEmitterShapeGenerator?.("circle",new Ms)})}var ks;function Cs(t,e){return t+e*(A()-o)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}(ks||(ks={}));class Os extends ms{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:Cs(e.x,i.width),y:Cs(e.y,i.height)}};{const t=i.width*o,s=i.height*o,n=function(t){return Math.floor(A()*t)}(4),a=2*(A()-o);switch(n){case ks.TopLeft:return{position:{x:e.x+a*t,y:e.y-s}};case ks.TopRight:return{position:{x:e.x-t,y:e.y+a*s}};case ks.BottomRight:return{position:{x:e.x+a*t,y:e.y+s}};case ks.BottomLeft:default:return{position:{x:e.x+t,y:e.y+a*s}}}}}}class zs{generate(t,e,i,s,n){return new Os(e,i,s,n)}}async function Ds(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{bs(t),t.pluginManager.addEmitterShapeGenerator?.("square",new zs)})}class Ss{momentumFactor=.03;preserveMomentum=false;load(t){E(t)||(te(this,"momentumFactor",t.momentumFactor),te(this,"preserveMomentum",t.preserveMomentum))}}const Is=16.666666666666668;class Ts extends xi{maxDistance=0;#b;#w;#x;#M;#P;#k=[];#C=!1;#O;constructor(t){super(t)}clear(t,e){}init(){}interact(t,e){const i=t.mouse,s=i.position;if(s&&(this.#P=s),this.#x){const t=performance.now();i.clicking?this.#w=void 0:this.#w??=t;const e=void 0===this.#b&&void 0!==this.#w&&t-this.#w>=50;if(!i.inside||this.#z(i)||e)return this.#D(),void(this.#C=!1);const n=s??this.#P;if(!n)return;this.#k.push({x:n.x,y:n.y,t:t}),this.#k.length>5&&this.#k.shift();const a=n.x+(this.#M?.x??0),o=n.y+(this.#M?.y??0);return this.#x.position.x=a-this.#x.offset.x,this.#x.position.y=o-this.#x.offset.y,this.#x.velocity.x=0,this.#x.velocity.y=0,this.#x.initialPosition.x=this.#x.position.x,this.#x.initialPosition.y=this.#x.position.y,void(this.#x.misplaced=!1)}if(!i.clicking)return this.#D(),void(this.#C=!1);if(this.#C)return;this.#C=!0;const n=i.downPosition??s??this.#P,a=this.#S(t,n);if(!a||!s)return void(a||(this.#C=!1));const o=a.getPosition();this.#x=a,this.#b=i.clickTime,this.#M={x:o.x-s.x,y:o.y-s.y},this.#O={x:a.velocity.x,y:a.velocity.y},this.#w=void 0,this.#k=[{x:s.x,y:s.y,t:performance.now()}],a.velocity.x=0,a.velocity.y=0,a.position.x=o.x-a.offset.x,a.position.y=o.y-a.offset.y,a.initialPosition.x=a.position.x,a.initialPosition.y=a.position.y,a.misplaced=!1}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!(!this.#x&&!this.#C)||!!n?.onClick.enable&&s.clicking&&!!s.position&&ht("drag",n.onClick.mode)}loadModeOptions(t,...e){ne(t,"drag",Ss,...e)}reset(t,e){}#S(t,e){if(!e)return;const i=this.container.particles.filter(e=>this.isEnabled(t,e));let s,n=1/0;for(const t of i){const i=Y(t.getPosition(),e),a=t.getRadius();!Number.isFinite(i)||!Number.isFinite(a)||i>a||i>=n||(s=t,n=i)}return s}#z(t){return void 0!==this.#b&&void 0!==t.clickTime&&t.clickTime!==this.#b}#D(){if(this.#x){const t=this.container.actualOptions.interactivity?.modes.drag;if((t?.preserveMomentum??!1)&&this.#k.length>=2){const e=this.#k[0],i=this.#k[this.#k.length-1];if(e&&i){const s=i.t-e.t;if(s>0){const n=t?.momentumFactor??.03;this.#x.velocity.x=(i.x-e.x)/s*Is*n,this.#x.velocity.y=(i.y-e.y)/s*Is*n}else this.#O&&(this.#x.velocity.x=this.#O.x,this.#x.velocity.y=this.#O.y)}else this.#O&&(this.#x.velocity.x=this.#O.x,this.#x.velocity.y=this.#O.y)}else this.#O&&(this.#x.velocity.x=this.#O.x,this.#x.velocity.y=this.#O.y)}this.#x=void 0,this.#b=void 0,this.#w=void 0,this.#M=void 0,this.#P=void 0,this.#k=[],this.#O=void 0}}async function Es(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{_i(t),t.pluginManager.addInteractor?.("externalDrag",t=>Promise.resolve(new Ts(t)))})}class Rs{x=0;y=0;load(t){t&&(te(this,"x",t.x),te(this,"y",t.y))}}class Ls{value;weights=new Rs;load(t){t&&(t.weights&&(this.weights??=new Rs,this.weights.load(t.weights)),E(t.value)||(this.value=G(t.value)))}}class _s{h=new Ls;l=new Ls;s=new Ls;load(t){t&&(t.h&&(this.h??=new Ls,this.h.load(t.h)),t.s&&(this.s??=new Ls,this.s.load(t.s)),t.l&&(this.l??=new Ls,this.l.load(t.l)))}}class As{colorCoords=new _s;delay=1;particles;pauseOnStop=!1;quantity=1;load(t){E(t)||(te(this,"delay",t.delay),te(this,"quantity",t.quantity),te(this,"pauseOnStop",t.pauseOnStop),void 0!==t.particles&&(this.particles=mt({},t.particles)),t.colorCoords&&(this.colorCoords??=new _s,this.colorCoords.load(t.colorCoords)))}}const Fs="trail";class Vs extends xi{maxDistance=0;#I;#T;#p;constructor(t,e){super(e),this.#p=t,this.#I=0}clear(){}init(){}interact(t,e){const i=this.container;if(!i.retina.reduceFactor)return;const s=i.actualOptions,n=s.interactivity?.modes.trail;if(!n)return;const a=n.delay*r/this.container.retina.reduceFactor;if(this.#I<a&&(this.#I+=e.value),this.#I<a)return;const o=t.mouse.position,c=!(n.pauseOnStop&&(o===this.#T||o?.x===this.#T?.x&&o?.y===this.#T?.y));if(this.#T=o?{...o}:void 0,c&&o){let t=n.particles;const e=n.colorCoords;if(e){const{width:s,height:a}=i.canvas.size,r={x:o.x/s,y:o.y/a},c=t=>!!(t?.weights?.x??t?.weights?.y),l=(t,e,i)=>{if(!c(t))return;const s=t?.weights,n=r.x*(s?.x??0)+r.y*(s?.y??0),a=t?.value??e,o=j(a??0),l=$(a??i),d=o+n*(l-o);return Math.min(l,Math.max(o,d))},d=n.particles?.paint?wt(n.particles.paint):void 0,h=d?.fill,u=h?We(this.#p,de.create(void 0,h.color)):void 0,p=l(e.h,u?.h,y),g=l(e.s,u?.s,v),f=l(e.l,u?.l,b);void 0===p&&void 0===g&&void 0===f||(t=mt({},n.particles,{paint:{fill:{color:{value:{h:p??u?.h,s:g??u?.s,l:f??u?.l}}}}}))}i.particles.push(n.quantity,o,t)}this.#I-=a}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;return!!n&&(s.clicking&&s.inside&&!!s.position&&ht(Fs,n.onClick.mode)||s.inside&&!!s.position&&ht(Fs,n.onHover.mode))}loadModeOptions(t,...e){ne(t,"trail",As,...e)}reset(){}}async function Bs(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{_i(t),t.pluginManager.addInteractor?.("externalTrail",e=>Promise.resolve(new Vs(t.pluginManager,e)))})}var Hs;!function(t){t.both="both",t.horizontal="horizontal",t.vertical="vertical"}(Hs||(Hs={}));class qs{enable=!1;value=0;load(t){E(t)||(te(this,"enable",t.enable),ee(this,"value",t.value))}}class Us{backColor;darken=new qs;enable=!1;enlighten=new qs;mode=Hs.vertical;speed=25;load(t){E(t)||(void 0!==t.backColor&&(this.backColor=le.create(this.backColor,t.backColor)),this.darken.load(t.darken),te(this,"enable",t.enable),this.enlighten.load(t.enlighten),te(this,"mode",t.mode),ee(this,"speed",t.speed))}}class Ws{#p;constructor(t){this.#p=t}getTransformValues(t){const e=t.roll?.enable&&t.roll,i=e&&e.horizontal,s=e&&e.vertical;return{a:i?Math.cos(e.angle):void 0,d:s?Math.sin(e.angle):void 0}}init(e){!function(e,i){const s=i.options.roll;if(s?.enable)if(i.roll={enable:s.enable,horizontal:s.mode===Hs.horizontal||s.mode===Hs.both,vertical:s.mode===Hs.vertical||s.mode===Hs.both,angle:A()*u,speed:W(s.speed)/360},s.backColor)i.backColor=We(e,s.backColor);else if(s.darken.enable&&s.enlighten.enable){const e=A()>=o?t.AlterType.darken:t.AlterType.enlighten;i.roll.alter={type:e,value:W(e===t.AlterType.darken?s.darken.value:s.enlighten.value)}}else s.darken.enable?i.roll.alter={type:t.AlterType.darken,value:W(s.darken.value)}:s.enlighten.enable&&(i.roll.alter={type:t.AlterType.enlighten,value:W(s.enlighten.value)});else i.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this.#p,e)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){ne(t,"roll",Us,...e)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.options.roll,s=t.roll;if(!s||!i?.enable)return;const n=s.speed*e.factor,a=u;s.angle+=n,s.angle>a&&(s.angle-=a)}(t,e)}}async function js(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("roll",()=>Promise.resolve(new Ws(t.pluginManager)))})}class $s{enable=!1;mode="destination-out";load(t){E(t)||(te(this,"mode",t.mode),te(this,"enable",t.enable))}}class Gs{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Qr});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 $s),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new $s,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Ns(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Gs)})}class Xs{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(c.x,c.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:K(s.min),max:K(s.max)}:{min:0,max:K(s)}}}async function Ys(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Xs))})}var Js;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Js||(Js={}));const Ks=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Qs=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Zs{accepts(t){return t.startsWith("#")}handleColor(t){return this.#E(t.value)}handleRangeColor(t){return this.#E(t.value)}parseString(t){return this.#E(t)}#E(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Ks,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Qs.exec(e);return i?{a:i[Js.a]?Number.parseInt(i[Js.a],16)/255:1,b:Number.parseInt(i[Js.b]??"0",16),g:Number.parseInt(i[Js.g]??"0",16),r:Number.parseInt(i[Js.r]??"0",16)}:void 0}}async function tn(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Zs)})}var en;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(en||(en={}));const sn=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class nn{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 Ne(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Ne({h:W(e.h),l:W(e.l),s:W(e.s)})}parseString(t){if(!this.accepts(t))return;const e=sn.exec(t);return e?Ye({a:e.length>4?nt(e[en.a]):1,h:Number.parseInt(e[en.h]??"0",10),l:Number.parseInt(e[en.l]??"0",10),s:Number.parseInt(e[en.s]??"0",10)}):void 0}}async function an(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new nn)})}class on{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return tc});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function rn(t){t.checkVersion("4.3.2"),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,Dt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new on(t.pluginManager))})}function cn(e,i){const s=e.value,n=e.animation,a={delayTime:W(n.delay)*r,enable:n.enable,value:W(e.value)*i,max:$(s)*i,min:j(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=U(a),e&&(a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function ln(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,c=i.max,l=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!==l&&(i.velocity*=l),i.status){case t.AnimationStatus.increasing:i.value>=c&&(s?i.status=t.AnimationStatus.decreasing:i.value-=c,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(s?i.status=t.AnimationStatus.increasing:i.value+=c,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,c),e.destroyed||(i.value=H(i.value,r,c))}}class dn extends oe{destroy=t.DestroyType.none;load(t){super.load(t),E(t)||te(this,"destroy",t.destroy)}}class hn extends xe{animation=new dn;value=1;load(t){if(E(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class un{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=cn(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){ne(t,"opacity",hn,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&ln(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function pn(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new un(t)))})}class gn{modes;#u;#R;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#R=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.#R)if(o=t.particleBounce?.(e,s,i)??!1,o)break;if(o)return;const r=e.getPosition(),c=e.offset,l=e.getRadius(),d=ft(r,l),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:c,outOfCanvas:u,size:l}),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:c,outOfCanvas:u,size:l})}}class fn{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 mn{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,l=e.getRadius();if(a.enable){const s=e.position;(!a.inverse&&s.y>r.height+l&&i===t.OutModeDirection.bottom||a.inverse&&s.y<-l&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+l||e.velocity.y<0&&e.position.y>=-l||e.velocity.x>0&&e.position.x<=r.width+l||e.velocity.x<0&&e.position.x>=-l)return;pt(e.position,o.canvas.size,c,l,i)||e.destroy()}}}const yn=O.origin;class vn{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;yn.setTo(c),yn.length=e.moveCenter.radius,yn.angle=e.velocity.angle+Math.PI,yn.addTo(e.moveCenter);const{dx:s,dy:n}=N(e.position,yn);if(t<=0&&s>=0||i<=0&&n>=0||t>=0&&s<=0||i>=0&&n<=0)return;e.position.x=Math.floor(U({min:0,max:a.canvas.size.width})),e.position.y=Math.floor(U({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(U({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(U({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(),c=ft(e.position,r);i===t.OutModeDirection.right&&c.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&&c.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&&c.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&&c.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 bn{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#L(e,t.OutMode.bounce,t=>new gn(t)),this.#L(e,t.OutMode.out,t=>new vn(t)),this.#L(e,t.OutMode.destroy,t=>new fn(t)),this.#L(e,t.OutMode.none,t=>new mn(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#_(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#_(e,i,s.left??s.default,t.OutModeDirection.left),this.#_(e,i,s.right??s.default,t.OutModeDirection.right),this.#_(e,i,s.top??s.default,t.OutModeDirection.top)}#L(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))}#_(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function wn(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new bn(t)))})}class xn{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=wt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=de.create(void 0===a?void 0:de.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=W(o.opacity),t.fillAnimation=i.animation;const s=We(this.#p,i);s&&(t.fillColor=si(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=de.create(void 0===a?void 0:de.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=We(this.#p,i)??t.getFillColor();s&&(t.strokeColor=si(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)&&(oi(t.fillColor,e,this.#u.hdr),oi(t.strokeColor,e,this.#u.hdr))}}async function Mn(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new xn(t.pluginManager,e)))})}var Pn;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Pn||(Pn={}));const kn=/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 Cn{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=kn.exec(t);return e?{a:e.length>4?nt(e[Pn.a]):1,b:parseInt(e[Pn.b]??"0",10),g:parseInt(e[Pn.g]??"0",10),r:parseInt(e[Pn.r]??"0",10)}:void 0}}async function On(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Cn)})}class zn extends oe{destroy=t.DestroyType.none;load(t){super.load(t),E(t)||te(this,"destroy",t.destroy)}}class Dn extends xe{animation=new zn;value=3;load(t){if(super.load(t),E(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Sn{#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){ne(t,"size",Dn,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=cn(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&&ln(t,t.size,!0,t.options.size.animation.destroy,e)}}async function In(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Sn(t)))})}async function Tn(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{await Promise.all([Ns(t),tn(t),an(t),On(t),rn(t),Ys(t),Mn(t),pn(t),wn(t),In(t)])})}const En=new Map;async function Rn(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{for(const[e,i]of En)t.pluginManager.addEasing(e,i)})}En.set("ease-in-quad",t=>t**2),En.set("ease-out-quad",t=>1-(1-t)**2),En.set("ease-in-out-quad",t=>t<.5?2*t**2:1-(-2*t+2)**2/2);const Ln=["emoji"];function _n(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}async function An(t,e){try{await ct().fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}const Fn='"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';class Vn{#A=new Map;destroy(){for(const[t,e]of this.#A)e instanceof ImageBitmap&&e.close(),this.#A.delete(t)}draw(t){const e=t.particle.emojiDataKey;if(!e)return;const i=this.#A.get(e);i&&function(t,e){const{context:i,opacity:s}=t,n=i.globalAlpha,a=e.width,r=a*o;i.globalAlpha=s,i.drawImage(e,-r,-r,a,a),i.globalAlpha=n}(t,i)}async init(t){const e=t.actualOptions.particles.shape;if(!Ln.some(t=>ht(t,e.type)))return;const i=[An(Fn)];bt(Ln.map(t=>e.options[t])[0],t=>{t.font&&i.push(An(t.font))}),await Promise.all(i)}particleDestroy(t){t.emojiDataKey=void 0}particleInit(t,e){const i=e.shapeData;if(!i.value)return;const s=wt(i.value,e.randomIndexData);if(!s)return;const n="string"==typeof s?{font:i.font??Fn,padding:i.padding??0,value:s}:{font:Fn,padding:0,...i,...s},a=n.font,o=n.value,r=`${o}_${a}`;if(this.#A.has(r))return void(e.emojiDataKey=r);const c=2*n.padding,l=$(e.size.value),d=l+c,h=2*d,u=new OffscreenCanvas(h,h),p=u.getContext("2d",t.canvas.render.settings);if(!p)return;p.font=`400 ${(2*l).toString()}px ${a}`,p.textBaseline="middle",p.textAlign="center",p.fillText(o,d,d);const g=u instanceof HTMLCanvasElement?u:u.transferToImageBitmap();this.#A.set(r,g),e.emojiDataKey=r}}async function Bn(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(Ln,()=>Promise.resolve(new Vn))})}const Hn=O.origin;function qn(t,e,i,s,n,a,o){const r=e.actualOptions.interactivity?.modes.attract;if(!r)return;const c=e.particles.grid.query(n,a);for(const e of c){const{dx:n,dy:a,distance:c}=N(e.position,i),l=r.speed*r.factor,d=H(t.getEasing(r.easing)(1-c/s)*l,1,r.maxSpeed);Hn.x=c?n/c*d:l,Hn.y=c?a/c*d:l,o?.(e),e.position.subFrom(Hn)}}let Un=class{distance=200;duration=.4;easing="ease-out-quad";factor=1;maxSpeed=50;restore;speed=1;constructor(){this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){E(t)||(te(this,"distance",t.distance),te(this,"duration",t.duration),void 0!==t.easing&&(this.easing=t.easing),te(this,"factor",t.factor),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed),te(this,"speed",t.speed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}};const Wn="attract";let jn=class extends xi{handleClickMode;#F;#V;#p;#B;constructor(t,e){super(e),this.#p=t,this.#V=0,this.#F=new Set,this.#B=new Map,e.attract??={particles:[]},this.handleClickMode=(t,i)=>{const s=this.container.actualOptions,n=s.interactivity?.modes.attract;if(n&&t===Wn){e.attract??={particles:[]},e.attract.clicking=!0,e.attract.count=0;for(const t of e.attract.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);e.attract.particles=[],e.attract.finish=!1,setTimeout(()=>{e.destroyed||(e.attract??={particles:[]},e.attract.clicking=!1)},n.duration*r)}}}get maxDistance(){return this.#V}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.attract;e&&(this.#V=e.distance,t.retina.attractModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#F.clear();const e=this.container.actualOptions,i=t.status===Oi,s=e.interactivity?.events;if(!s)return;const{enable:n,mode:a}=s.onHover,{enable:o,mode:r}=s.onClick;i&&n&&ht(Wn,a)?function(t,e,i,s,n){const a=i.mouse.position,o=e.retina.attractModeDistance;!o||o<0||!a||qn(t,e,a,o,new Jt(a.x,a.y,o),t=>s(t),n)}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#H(t)}):o&&ht(Wn,r)&&function(t,e,i,s,n){e.attract??={particles:[]};const{attract:a}=e;if(a.finish||(a.count??=0,a.count++,a.count===e.particles.count&&(a.finish=!0)),a.clicking){const a=i.mouse.clickPosition,o=e.retina.attractModeDistance;if(!o||o<0||!a)return;qn(t,e,a,o,new Jt(a.x,a.y,o),t=>s(t),n)}else!1===a.clicking&&(a.particles=[])}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#H(t)}),this.#q()}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!(s.position&&n?.onHover.enable||s.clickPosition&&n?.onClick.enable))return!1;const a=n.onHover.mode,o=n.onClick.mode;return ht(Wn,a)||ht(Wn,o)}loadModeOptions(t,...e){ne(t,"attract",Un,...e)}reset(){}#q(){const t=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!t?.enable||!this.#B.size)return;const e=Date.now(),i=t.delay*r,s=Math.max(.001,Math.min(1,t.speed));for(const[n,a]of this.#B){if(this.#F.has(n))continue;if(n.destroyed){this.#B.delete(n);continue}const o=a.target;if(e-a.lastInteractionTime<i)continue;let r=o.x-n.position.x,c=o.y-n.position.y,l=o.z-n.position.z;if(t.follow&&n.options.move.enable){const{x:t,y:e,z:i}=n.velocity,s=t*t+e*e+i*i;if(s>0){const n=(r*t+c*e+l*i)/s;r-=t*n,c-=e*n,l-=i*n}}n.position.x+=r*s,n.position.y+=c*s,n.position.z+=l*s,Math.abs(r)<=.5&&Math.abs(c)<=.5&&(n.position.x=o.x,n.position.y=o.y,n.position.z=o.z,this.#B.delete(n))}}#H(t){this.#F.add(t);const e=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!e?.enable)return;const i=Date.now();let s=this.#B.get(t);s||(s={target:t.position.copy(),lastInteractionTime:i},this.#B.set(t,s)),s.lastInteractionTime=i}};async function $n(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{_i(t),t.pluginManager.addInteractor?.("externalAttract",e=>Promise.resolve(new jn(t.pluginManager,e)))})}const Gn=Math.PI*o;function Nn(t,e,i,s,n){const a=t.particles.grid.query(s,n);for(const t of a)s instanceof Jt?vt(yt(t),{position:e,mass:i**2*Gn,velocity:O.origin,factor:O.origin}):s instanceof Kt&&Jn(t,ft(e,i))}function Xn(t,e,i,s){Ri(i,e,(e,i)=>{!function(t,e,i,s){const n=ct().querySelectorAll(e);n.length&&n.forEach(e=>{const n=e,a=t.retina.pixelRatio,r={x:(n.offsetLeft+n.offsetWidth*o)*a,y:(n.offsetTop+n.offsetHeight*o)*a},c=n.offsetWidth*o*a,l=10*a,d=i.type===ui.circle?new Jt(r.x,r.y,c+l):new Kt(n.offsetLeft*a-l,n.offsetTop*a-l,n.offsetWidth*a+2*l,n.offsetHeight*a+2*l);s(r,c,d)})}(t,e,i,(e,i,n)=>{Nn(t,e,i,n,s)})})}function Yn(t){const e={bounced:!1},{pSide:i,pOtherSide:s,rectSide:n,rectOtherSide:a,velocity:r,factor:c}=t;return s.min<a.min||s.min>a.max||s.max<a.min||s.max>a.max||(i.max>=n.min&&i.max<=(n.max+n.min)*o&&r>0||i.min<=n.max&&i.min>(n.max+n.min)*o&&r<0)&&(e.velocity=r*-c,e.bounced=!0),e}function Jn(t,e){const i=ft(t.getPosition(),t.getRadius()),s=t.options.bounce,n=Yn({pSide:{min:i.left,max:i.right},pOtherSide:{min:i.top,max:i.bottom},rectSide:{min:e.left,max:e.right},rectOtherSide:{min:e.top,max:e.bottom},velocity:t.velocity.x,factor:W(s.horizontal.value)});n.bounced&&(void 0!==n.velocity&&(t.velocity.x=n.velocity),void 0!==n.position&&(t.position.x=n.position));const a=Yn({pSide:{min:i.top,max:i.bottom},pOtherSide:{min:i.left,max:i.right},rectSide:{min:e.top,max:e.bottom},rectOtherSide:{min:e.left,max:e.right},velocity:t.velocity.y,factor:W(s.vertical.value)});a.bounced&&(void 0!==a.velocity&&(t.velocity.y=a.velocity),void 0!==a.position&&(t.position.y=a.position))}class Kn{distance=200;load(t){E(t)||te(this,"distance",t.distance)}}const Qn="bounce";class Zn extends xi{#V;constructor(t){super(t),this.#V=0}get maxDistance(){return this.#V}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bounce;e&&(this.#V=e.distance,t.retina.bounceModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,s=t.status===Oi;if(!i)return;const n=i.onHover.enable,a=i.onHover.mode,o=i.onDiv;s&&n&&ht(Qn,a)?function(t,e,i){const s=10*t.retina.pixelRatio,n=e.mouse.position,a=t.retina.bounceModeDistance;!a||a<0||!n||Nn(t,n,a,new Jt(n.x,n.y,a+s),i)}(this.container,t,e=>this.isEnabled(t,e)):Xn(this.container,o,Qn,e=>this.isEnabled(t,e))}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const a=n.onDiv;return!!s.position&&n.onHover.enable&&ht(Qn,n.onHover.mode)||Ei(Qn,a)}loadModeOptions(t,...e){ne(t,"bounce",Kn,...e)}reset(){}}async function ta(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{_i(t),t.pluginManager.addInteractor?.("externalBounce",t=>Promise.resolve(new Zn(t)))})}class ea{color;distance=200;duration=.4;mix=!1;opacity;size;load(t){if(!E(t)){if(te(this,"distance",t.distance),te(this,"duration",t.duration),te(this,"mix",t.mix),ee(this,"opacity",t.opacity),void 0!==t.color){const e=T(this.color)?void 0:this.color;this.color=bt(t.color,t=>le.create(e,t))}te(this,"size",t.size)}}}class ia extends ea{selectors=[];load(t){super.load(t),E(t)||te(this,"selectors",t.selectors)}}class sa extends ea{divs;load(t){super.load(t),E(t)||(this.divs=bt(t.divs,t=>{const e=new ia;return e.load(t),e}))}}class na{div;enabled=!1;fillColor;finalColor;id="bubble";inRange=!1;opacity;priority=100;radius;strokeColor}var aa;function oa(t,e,i,s){if(e>=i){return H(t+(e-i)*s,t,e)}if(e<i){return H(t-(i-e)*s,e,t)}}!function(t){t.color="color",t.opacity="opacity",t.size="size"}(aa||(aa={}));const ra="bubble";class ca extends xi{handleClickMode;#V;#U=new WeakMap;#p;constructor(t,e){super(e),this.#p=t,this.#V=0,e.bubble??={},this.handleClickMode=t=>{t===ra&&(e.bubble??={},e.bubble.clicking=!0)}}get maxDistance(){return this.#V}clear(t,e,i){const s=this.#U.get(t);s?.inRange&&!i||(t.removeModifier(ra),this.#U.delete(t))}getOrCreateModifier(t){let e=this.#U.get(t);return e||(e=new na,this.#U.set(t,e),t.addModifier(e)),e}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bubble;e&&(this.#V=e.distance,t.retina.bubbleModeDistance=e.distance*t.retina.pixelRatio,void 0!==e.size&&(t.retina.bubbleModeSize=e.size*t.retina.pixelRatio))}interact(t,e){const i=this.container.actualOptions,s=i.interactivity?.events;if(!s)return;const n=s.onHover,a=s.onClick,o=n.enable,r=n.mode,c=a.enable,l=a.mode,d=s.onDiv;o&&ht(ra,r)?this.#W(t):c&&ht(ra,l)?this.#j(t):Ri(ra,d,(i,s)=>{this.#$(t,e,i,s)})}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const{onClick:a,onDiv:o,onHover:r}=n,c=Ei(ra,o);return!!(c||r.enable&&s.position||a.enable&&s.clickPosition)&&(ht(ra,r.mode)||ht(ra,a.mode)||c)}loadModeOptions(t,...e){ne(t,"bubble",sa,...e)}reset(t,e){const i=this.#U.get(e);i&&(i.enabled=!1,i.inRange=!1)}#j(t){const e=this.container,i=e.actualOptions,s=t.mouse.clickPosition,n=i.interactivity?.modes.bubble;if(!n||!s)return;e.bubble??={};const a=e.retina.bubbleModeDistance;if(!a||a<0)return;const o=e.particles.grid.queryCircle(s,a,e=>this.isEnabled(t,e)),{bubble:c}=e;for(const i of o){if(!c.clicking)continue;const o=this.getOrCreateModifier(i);o.enabled=!c.durationEnd,o.inRange=!c.durationEnd;const l=Y(i.getPosition(),s),d=(performance.now()-(t.mouse.clickTime??0))/r;d>n.duration&&(c.durationEnd=!0),d>2*n.duration&&(c.clicking=!1,c.durationEnd=!1);const h={bubbleObj:{optValue:e.retina.bubbleModeSize,value:o.radius},particlesObj:{optValue:i.size.max,value:i.size.value},type:aa.size};this.#G(i,l,d,h);const u={bubbleObj:{optValue:n.opacity,value:o.opacity},particlesObj:{optValue:i.opacity?.max??1,value:i.opacity?.value??1},type:aa.opacity};this.#G(i,l,d,u),!c.durationEnd&&l<=a?this.#N(i,l):(o.fillColor=void 0,o.strokeColor=void 0)}}#W(t){const e=this.container,i=t.mouse.position,s=e.retina.bubbleModeDistance;if(!s||s<0||!i)return;const n=e.particles.grid.queryCircle(i,s,e=>this.isEnabled(t,e));for(const e of n){const n=this.getOrCreateModifier(e);n.enabled=!0,n.inRange=!0;const a=Y(e.getPosition(),i),o=1-a/s;a<=s?o>=0&&t.status===Oi&&(this.#X(e,o),this.#Y(e,o),this.#N(e,o)):this.reset(t,e),t.status===Ci&&this.reset(t,e)}}#N(t,e,i){const s=this.container.actualOptions,n=i??s.interactivity?.modes.bubble,a=this.getOrCreateModifier(t);if(n){if(!a.finalColor){const t=n.color;if(!t)return;const e=wt(t);a.finalColor=We(this.#p,e)}if(a.finalColor)if(n.mix){a.fillColor=void 0,a.strokeColor=void 0;const i=t.getFillColor();if(i){const t=je(Ze(i,a.finalColor,1-e,e));a.fillColor=t,a.strokeColor=t}else a.fillColor=a.finalColor,a.strokeColor=a.finalColor}else a.fillColor=a.finalColor,a.strokeColor=a.finalColor}}#Y(t,e,i){const s=this.container.actualOptions,n=i?.opacity??s.interactivity?.modes.bubble?.opacity;if(!n)return;const a=oa(t.opacity?.value??1,n,t.opacity?.max??1,e);if(void 0!==a){this.getOrCreateModifier(t).opacity=a}}#X(t,e,i){const s=this.container,n=i?.size?i.size*s.retina.pixelRatio:s.retina.bubbleModeSize;if(void 0===n)return;const a=oa(t.size.value,n,t.size.max,e);if(void 0!==a){this.getOrCreateModifier(t).radius=a}}#G(t,e,i,s){const n=this.container,a=s.bubbleObj.optValue,o=n.actualOptions,r=o.interactivity?.modes.bubble;if(!r||void 0===a)return;const c=r.duration,l=n.retina.bubbleModeDistance,d=s.particlesObj.optValue,h=s.bubbleObj.value,u=s.particlesObj.value??0,p=s.type;if(!l||l<0||a===d)return;n.bubble??={};const g=this.getOrCreateModifier(t);if(n.bubble.durationEnd)h&&(p===aa.size&&(g.radius=void 0),p===aa.opacity&&(g.opacity=void 0));else if(e<=l){if((h??u)!==a){const t=u-i*(u-a)/c;p===aa.size&&(g.radius=t),p===aa.opacity&&(g.opacity=t)}}else p===aa.size&&(g.radius=void 0),p===aa.opacity&&(g.opacity=void 0)}#$(t,e,i,s){const n=this.container,a=ct().querySelectorAll(i),r=n.actualOptions.interactivity?.modes.bubble;r&&a.length&&a.forEach(i=>{const a=i,c=n.retina.pixelRatio,l={x:(a.offsetLeft+a.offsetWidth*o)*c,y:(a.offsetTop+a.offsetHeight*o)*c},d=a.offsetWidth*o*c,h=s.type===ui.circle?new Jt(l.x,l.y,d):new Kt(a.offsetLeft*c,a.offsetTop*c,a.offsetWidth*c,a.offsetHeight*c),u=n.particles.grid.query(h,e=>this.isEnabled(t,e));for(const t of u){if(!h.contains(t.getPosition()))continue;const i=this.getOrCreateModifier(t);i.enabled=!0,i.inRange=!0;const s=Li(r.divs,a);i.div&&i.div===a||(this.clear(t,e,!0),i.div=a),this.#X(t,1,s),this.#Y(t,1,s),this.#N(t,1,s)}})}}async function la(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{_i(t),t.pluginManager.addInteractor?.("externalBubble",e=>Promise.resolve(new ca(t.pluginManager,e)))})}class da{opacity=.5;load(t){E(t)||ee(this,"opacity",t.opacity)}}class ha{distance=80;links=new da;radius=60;load(t){E(t)||(te(this,"distance",t.distance),this.links.load(t.links),te(this,"radius",t.radius))}}function ua(t,e,i,s){const n=t.actualOptions,a=n.interactivity?.modes.connect;if(a)return function(t,e,i,s,n){const a=Math.floor(s.getRadius()/i.getRadius()),o=i.getFillColor(),r=s.getFillColor();if(!o||!r)return;const c=i.getPosition(),l=s.getPosition(),d=Ze(o,r,i.getRadius(),s.getRadius()),h=e.createLinearGradient(c.x,c.y,l.x,l.y);return h.addColorStop(0,Qe(o,t.hdr,n)),h.addColorStop(H(a,0,1),Ke(d,t.hdr,n)),h.addColorStop(1,Qe(r,t.hdr,n)),h}(t,e,i,s,a.links.opacity)}function pa(t,e,i){t.canvas.render.draw(s=>{const n=ua(t,s,e,i);if(!n)return;const a=e.getPosition(),o=i.getPosition();!function(t,e,i,s,n){_n(t,s,n),t.lineWidth=e,t.strokeStyle=i,t.stroke()}(s,e.retina.linksWidth??0,n,a,o)})}class ga extends xi{#V;constructor(t){super(t),this.#V=0}get maxDistance(){return this.#V}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.connect;e&&(this.#V=e.distance,t.retina.connectModeDistance=e.distance*t.retina.pixelRatio,t.retina.connectModeRadius=e.radius*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions;if(i.interactivity?.events.onHover.enable&&"pointermove"===t.status){const i=t.mouse.position,{connectModeDistance:s,connectModeRadius:n}=e.retina;if(!s||s<0||!n||n<0||!i)return;const a=Math.abs(n),o=e.particles.grid.queryCircle(i,a,e=>this.isEnabled(t,e));o.forEach((t,i)=>{const n=t.getPosition();for(const a of o.slice(i+1)){const i=a.getPosition(),o=Math.abs(s),r=Math.abs(n.x-i.x),c=Math.abs(n.y-i.y);r<o&&c<o&&pa(e,t,a)}})}}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!(!n?.onHover.enable||!s.position)&&ht("connect",n.onHover.mode)}loadModeOptions(t,...e){ne(t,"connect",ha,...e)}reset(){}}async function fa(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{_i(t),t.pluginManager.addInteractor?.("externalConnect",t=>Promise.resolve(new ga(t)))})}function ma(t,e){const i=t.particles.grid.query(e);for(const t of i)t.destroy()}function ya(t,e,i){Ri(i,e,(e,i)=>{!function(t,e,i){const s=ct().querySelectorAll(e);s.length&&s.forEach(e=>{const s=e,n=t.retina.pixelRatio,a={x:(s.offsetLeft+s.offsetWidth*o)*n,y:(s.offsetTop+s.offsetHeight*o)*n},r=s.offsetWidth*o*n,c=10*n,l=i.type===ui.circle?new Jt(a.x,a.y,r+c):new Kt(s.offsetLeft*n-c,s.offsetTop*n-c,s.offsetWidth*n+2*c,s.offsetHeight*n+2*c);ma(t,l)})}(t,e,i)})}class va{distance=200;load(t){E(t)||te(this,"distance",t.distance)}}const ba="destroy";class wa extends xi{#V;constructor(t){super(t),this.#V=0}get maxDistance(){return this.#V}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.destroy;e&&(this.#V=e.distance,t.retina.destroyModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,s=t.status===Oi;if(!i)return;const n=i.onHover.enable,a=i.onHover.mode,o=i.onDiv;s&&n&&ht(ba,a)?function(t,e){const i=10*t.retina.pixelRatio,s=e.mouse.position,n=t.retina.destroyModeDistance;!n||n<0||!s||ma(t,new Jt(s.x,s.y,n+i))}(this.container,t):ya(this.container,o,ba)}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const a=n.onDiv;return!!s.position&&n.onHover.enable&&ht(ba,n.onHover.mode)||Ei(ba,a)}loadModeOptions(t,...e){ne(t,"destroy",va,...e)}reset(){}}async function xa(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{_i(t),t.pluginManager.addInteractor?.("externalDestroy",async t=>Promise.resolve(new wa(t)))})}class Ma{blink=!1;color;consent=!1;opacity=1;load(t){E(t)||(te(this,"blink",t.blink),void 0!==t.color&&(this.color=le.create(this.color,t.color)),te(this,"consent",t.consent),ee(this,"opacity",t.opacity))}}class Pa{distance=100;links=new Ma;load(t){E(t)||(te(this,"distance",t.distance),this.links.load(t.links))}}function ka(t,e,i,s,n){t.canvas.render.draw(a=>{const o=e.getPosition();!function(t,e,i,s,n,a,o=!1){_n(t,i,s),t.strokeStyle=Ke(n,o,a),t.lineWidth=e,t.stroke()}(a,e.retina.linksWidth??0,o,n,i,s,t.hdr)})}class Ca extends xi{#V;#p;constructor(t,e){super(e),this.#p=t,this.#V=0}get maxDistance(){return this.#V}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.grab;e&&(this.#V=e.distance,t.retina.grabModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions.interactivity;if(!i?.modes.grab||!i.events.onHover.enable||t.status!==Oi)return;const s=t.mouse.position;if(!s)return;const n=e.retina.grabModeDistance;if(!n||n<0)return;const a=e.particles.grid.queryCircle(s,n,e=>this.isEnabled(t,e));for(const t of a){const a=Y(t.getPosition(),s);if(a>n)continue;const o=i.modes.grab.links,r=o.opacity,c=r-a*r/n;if(c<=0)continue;const l=o.color??t.options.links?.color;if(!e.particles.grabLineColor&&l){const t=i.modes.grab.links;e.particles.grabLineColor=ei(this.#p,l,t.blink,t.consent)}const d=ti(t,void 0,e.particles.grabLineColor);d&&ka(e,t,d,c,s)}}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&ht("grab",n.onHover.mode)}loadModeOptions(t,...e){ne(t,"grab",Pa,...e)}reset(){}}async function Oa(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{_i(t),t.pluginManager.addInteractor?.("externalGrab",e=>Promise.resolve(new Ca(t.pluginManager,e)))})}class za{force=2;smooth=10;load(t){E(t)||(te(this,"force",t.force),te(this,"smooth",t.smooth))}}class Da extends xi{maxDistance=0;constructor(t){super(t)}clear(){}init(){}interact(t){for(const e of this.container.particles.filter(e=>this.isEnabled(t,e)))this.#J(t,e)}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&ht("parallax",n.onHover.mode)}loadModeOptions(t,...e){ne(t,"parallax",za,...e)}reset(){}#J(t,e){if(!this.isEnabled(t,e))return;const i=this.container,s=i.actualOptions,n=s.interactivity?.modes.parallax;if(!n)return;const a=n.force,r=t.mouse.position;if(!r)return;const c=i.canvas.size,l=c.width*o,d=c.height*o,h=n.smooth,u=e.getRadius()/a,p=(r.x-l)*u,g=(r.y-d)*u,{offset:f}=e;f.x+=(p-f.x)/h,f.y+=(g-f.y)/h}}async function Sa(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{_i(t),t.pluginManager.addInteractor?.("externalParallax",t=>Promise.resolve(new Da(t)))})}const Ia="pause";class Ta extends xi{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{if(t!==Ia)return;const e=this.container;e.animationStatus?e.pause():e.play()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,s=(e?.interactivity??i.interactivity)?.events;return!!s&&ht(Ia,s.onClick.mode)}reset(){}}async function Ea(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{_i(t),t.pluginManager.addInteractor?.("externalPause",t=>Promise.resolve(new Ta(t)))})}class Ra{default=!0;groups=[];particles;quantity=4;load(t){E(t)||(te(this,"default",t.default),void 0!==t.groups&&(this.groups=t.groups.map(t=>t)),this.groups.length||(this.default=!0),ee(this,"quantity",t.quantity),this.particles=bt(t.particles,t=>mt({},t)))}}const La="push";class _a extends xi{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=(t,e)=>{if(t!==La)return;const i=this.container,s=i.actualOptions,n=s.interactivity?.modes.push;if(!n)return;const a=W(n.quantity);if(a<=0)return;const o=ut([void 0,...n.groups]),r=mt(void 0!==o?i.actualOptions.particles.groups[o]:void 0,wt(n.particles));i.particles.push(a,e.mouse.position,r,o)}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;return!!n&&s.clicking&&s.inside&&!!s.position&&ht(La,n.onClick.mode)}loadModeOptions(t,...e){ne(t,"push",Ra,...e)}reset(){}}async function Aa(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{_i(t),t.pluginManager.addInteractor?.("externalPush",t=>Promise.resolve(new _a(t)))})}class Fa{quantity=2;load(t){E(t)||ee(this,"quantity",t.quantity)}}const Va="remove";class Ba extends xi{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{const e=this.container,i=e.actualOptions;if(!i.interactivity?.modes.remove||t!==Va)return;const s=W(i.interactivity.modes.remove.quantity);for(let t=0;t<s;t++)e.particles.get(t)?.destroy()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;return!!n&&s.clicking&&s.inside&&!!s.position&&ht(Va,n.onClick.mode)}loadModeOptions(t,...e){ne(t,"remove",Fa,...e)}reset(){}}async function Ha(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{_i(t),t.pluginManager.addInteractor?.("externalRemove",t=>Promise.resolve(new Ba(t)))})}class qa{distance=200;duration=.4;easing="ease-out-quad";factor=100;maxSpeed=50;restore;speed=1;constructor(){this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){E(t)||(te(this,"distance",t.distance),te(this,"duration",t.duration),te(this,"easing",t.easing),te(this,"factor",t.factor),te(this,"speed",t.speed),te(this,"maxSpeed",t.maxSpeed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}}class Ua extends qa{selectors=[];load(t){super.load(t),E(t)||te(this,"selectors",t.selectors)}}class Wa extends qa{divs;load(t){super.load(t),E(t)||(this.divs=bt(t.divs,t=>{const e=new Ua;return e.load(t),e}))}}const ja="repulse";class $a extends xi{handleClickMode;#K;#F;#V;#Q;#p;#B;constructor(t,e){super(e),this.#p=t,this.#V=0,this.#Q=O.origin,this.#F=new Set,this.#K=O.origin,this.#B=new Map,e.repulse??={particles:[]},this.handleClickMode=(t,i)=>{const s=this.container.actualOptions,n=s.interactivity?.modes.repulse;if(!n||t!==ja)return;e.repulse??={particles:[]};const a=e.repulse;a.clicking=!0,a.count=0;for(const t of e.repulse.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);a.particles=[],a.finish=!1,setTimeout(()=>{e.destroyed||(a.clicking=!1)},n.duration*r)}}get maxDistance(){return this.#V}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.repulse;e&&(this.#V=e.distance,t.retina.repulseModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#F.clear();const e=this.container.actualOptions,i=t.status===Oi,s=e.interactivity?.events;if(!s)return;const n=s.onHover,a=n.enable,o=n.mode,r=s.onClick,c=r.enable,l=r.mode,d=s.onDiv;i&&a&&ht(ja,o)?this.#Z(t):c&&ht(ja,l)?this.#tt(t):Ri(ja,d,(e,i)=>{this.#et(t,e,i)}),this.#q()}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const a=n.onDiv,o=n.onHover,r=n.onClick,c=Ei(ja,a);if(!(c||o.enable&&s.position||r.enable&&s.clickPosition))return!1;const l=o.mode,d=r.mode;return ht(ja,l)||ht(ja,d)||c}loadModeOptions(t,...e){ne(t,"repulse",Wa,...e)}reset(){}#tt(t){const e=this.container,i=e.actualOptions.interactivity?.modes.repulse;if(!i)return;const s=e.repulse??{particles:[]};if(s.finish||(s.count??=0,s.count++,s.count===e.particles.count&&(s.finish=!0)),s.clicking){const n=e.retina.repulseModeDistance;if(!n||n<0)return;const a=Math.pow(n/6,3),o=t.mouse.clickPosition;if(void 0===o)return;const r=new Jt(o.x,o.y,a),c=e.particles.grid.query(r,e=>this.isEnabled(t,e));for(const t of c){const{dx:e,dy:n,distance:r}=N(o,t.position),c=r**2,l=-a*i.speed/c;c<=a&&(this.#H(t),s.particles.push(t),this.#K.x=e,this.#K.y=n,this.#K.length=l,t.velocity.setTo(this.#K))}}else if(!1===s.clicking){for(const t of s.particles)t.velocity.setTo(t.initialVelocity);s.particles=[]}}#Z(t){const e=this.container,i=t.mouse.position,s=e.retina.repulseModeDistance;!s||s<0||!i||this.#it(t,i,s,new Jt(i.x,i.y,s))}#it(t,e,i,s,n){const a=this.container,o=a.particles.grid.query(s,e=>this.isEnabled(t,e)),r=a.actualOptions.interactivity?.modes.repulse;if(!r)return;const{easing:c,speed:l,factor:d,maxSpeed:h}=r,u=this.#p.getEasing(c),p=(n?.speed??l)*d;for(const t of o){const{dx:s,dy:n,distance:a}=N(t.position,e),o=H(u(1-a/i)*p,0,h);this.#Q.x=a?s/a*o:p,this.#Q.y=a?n/a*o:p,this.#H(t),t.position.addTo(this.#Q)}}#q(){const t=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!t?.enable||!this.#B.size)return;const e=Date.now(),i=t.delay*r,s=Math.max(.001,Math.min(1,t.speed));for(const[n,a]of this.#B){if(this.#F.has(n))continue;if(n.destroyed){this.#B.delete(n);continue}const o=a.target;if(e-a.lastInteractionTime<i)continue;t.follow&&n.options.move.enable&&(o.x+=n.velocity.x,o.y+=n.velocity.y,o.z+=n.velocity.z);const r=o.x-n.position.x,c=o.y-n.position.y,l=o.z-n.position.z;n.position.x+=r*s,n.position.y+=c*s,n.position.z+=l*s,Math.abs(r)<=.5&&Math.abs(c)<=.5&&(n.position.x=o.x,n.position.y=o.y,n.position.z=o.z,this.#B.delete(n))}}#et(t,e,i){const s=this.container,n=s.actualOptions.interactivity?.modes.repulse;if(!n)return;const a=ct().querySelectorAll(e);a.length&&a.forEach(e=>{const a=e,r=s.retina.pixelRatio,c={x:(a.offsetLeft+a.offsetWidth*o)*r,y:(a.offsetTop+a.offsetHeight*o)*r},l=a.offsetWidth*o*r,d=i.type===ui.circle?new Jt(c.x,c.y,l):new Kt(a.offsetLeft*r,a.offsetTop*r,a.offsetWidth*r,a.offsetHeight*r),h=Li(n.divs,a);this.#it(t,c,l,d,h)})}#H(t){this.#F.add(t);const e=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!e?.enable)return;const i=Date.now();let s=this.#B.get(t);s||(s={target:t.position.copy(),lastInteractionTime:i},this.#B.set(t,s)),s.lastInteractionTime=i,e.follow&&t.options.move.enable&&(s.target.x+=t.velocity.x,s.target.y+=t.velocity.y,s.target.z+=t.velocity.z)}}async function Ga(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{_i(t);const e=t.pluginManager;e.addInteractor?.("externalRepulse",t=>Promise.resolve(new $a(e,t)))})}class Na{factor=3;radius=200;load(t){E(t)||(te(this,"factor",t.factor),te(this,"radius",t.radius))}}class Xa{enabled=!1;id="slow";priority=100;speedFactor=1}const Ya="slow";class Ja extends xi{#V;#U=new WeakMap;constructor(t){super(t),this.#V=0}get maxDistance(){return this.#V}clear(t,e,i){const s=this.#U.get(t);s?.enabled&&!i||(t.removeModifier(Ya),this.#U.delete(t))}getOrCreateModifier(t){let e=this.#U.get(t);return e||(e=new Xa,this.#U.set(t,e),t.addModifier(e)),e}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.slow;e&&(this.#V=e.radius,t.retina.slowModeRadius=e.radius*t.retina.pixelRatio)}interact(){}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&ht(Ya,n.onHover.mode)}loadModeOptions(t,...e){ne(t,"slow",Na,...e)}reset(t,e){const i=this.#U.get(e);i&&(i.enabled=!1);const s=this.container,n=s.actualOptions,a=t.mouse.position,o=s.retina.slowModeRadius,r=n.interactivity?.modes.slow;if(!r||!o||o<0||!a)return;const c=Y(a,e.getPosition()),l=c/o,d=r.factor;if(c>o)return;const h=this.getOrCreateModifier(e);h.enabled=!0,h.speedFactor=l/d}}async function Ka(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{_i(t),t.pluginManager.addInteractor?.("externalSlow",t=>Promise.resolve(new Ja(t)))})}const Qa=["image","images"],Za=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function to(t){return new Promise(e=>{t.loading=!0;const i=new Image;t.element=i,i.addEventListener("load",()=>{t.loading=!1,e()}),i.addEventListener("error",()=>{t.element=void 0,t.error=!0,t.loading=!1,Lt().error(`Error loading image: ${t.source}`),e()}),i.src=t.source})}async function eo(t){if("svg"!==t.type)return void await to(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(Lt().error("Image not found"),t.error=!0),t.loading=!1}function io(t,e,i,s,n=!1){const a=function(t,e,i,s=!1){const{svgData:n}=t;if(!n)return"";const a=Qe(e,s,i);if(n.includes("fill"))return n.replaceAll(Za,()=>a);const o=n.indexOf(">");return`${n.substring(0,o)} fill="${a}"${n.substring(o)}`}(t,i,s.opacity?.value??1,n),o={color:i,data:{...t,svgData:a},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise(e=>{const i=new Blob([a],{type:"image/svg+xml"}),s=URL.createObjectURL(i),n=new Image;n.addEventListener("load",()=>{o.loaded=!0,o.element=n,e(o),URL.revokeObjectURL(s)});n.addEventListener("error",()=>{(async()=>{URL.revokeObjectURL(s);const i={...t,error:!1,loading:!0};await to(i),o.loaded=!0,o.element=i.element,e(o)})()}),n.src=s})}class so{#u;#n;constructor(t,e){this.#n=t,this.#u=e}draw(t){const{context:e,radius:i,particle:s,opacity:n}=t,a=s.image,o=a?.element;if(a){if(e.globalAlpha=n,o){const t=a.ratio,s={x:-i,y:-i},n=2*i;e.drawImage(o,s.x,s.y,n,n/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(!e.preload||!this.#n.loadImage)return;const i=[];for(const s of e.preload)i.push(this.#n.loadImage(t,s));await Promise.all(i)}loadShape(t){const e=this.#u;if(!t.shape||!Qa.includes(t.shape))return;const i=t.shapeData;if(!i)return;const s=this.#n.getImages?.(e),n=s?.find(t=>t.name===i.name||t.source===i.src);n||this.#st(e,i).then(()=>{this.loadShape(t)})}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;const i=this.#n.getImages?.(t),s=e.shapeData;if(!s)return;const n=e.getFillColor(),a=i?.find(t=>t.name===s.name||t.source===s.src);if(!a)return;const o=s.replaceColor;a.loading?setTimeout(()=>{this.particleInit(t,e)}):(async()=>{let i;i=a.svgData&&n?await io(a,s,n,e,t.hdr):{color:n,data:a,element:a.element,loaded:!0,ratio:s.width&&s.height?s.width/s.height:a.ratio??1,replaceColor:o,source:s.src},i.ratio||(i.ratio=1);const r={image:i,close:s.close??e.shapeClose};e.image=r.image,e.shapeClose=r.close})()}#st=async(t,e)=>{if(!this.#n.loadImage)throw new Error("Image shape not initialized");await this.#n.loadImage(t,{name:e.name,replaceColor:e.replaceColor,src:e.src})}}class no{height;name;replaceColor;src="";width;load(t){E(t)||(te(this,"height",t.height),te(this,"name",t.name),te(this,"replaceColor",t.replaceColor),te(this,"src",t.src),te(this,"width",t.width))}}class ao{id="image-preloader";#n;constructor(t){this.#n=t}async getPlugin(t){const{ImagePreloaderInstance:e}=await Promise.resolve().then(function(){return ec});return new e(this.#n,t)}loadOptions(t,e,i){if(!i?.preload)return;e.preload??=[];const s=e.preload;for(const t of i.preload){const e=s.find(e=>e.name===t.name||e.src===t.src);if(e)e.load(t);else{const e=new no;e.load(t),s.push(e)}}}needsPlugin(){return!0}}async function oo(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{!function(t){t.getImages??=e=>{t.images??=new Map;let i=t.images.get(e);return i||(i=[],t.images.set(e,i)),i},t.loadImage??=async(e,i)=>{if(!t.getImages)throw new Error("No images collection found");if(!i.name&&!i.src)throw new Error("No image source provided");t.images??=new Map;const s=t.getImages(e);if(!s.some(t=>t.name===i.name||t.source===i.src))try{const n={name:i.name??i.src,source:i.src,type:i.src.substring(i.src.length-3),error:!1,loading:!0,replaceColor:i.replaceColor,ratio:i.width&&i.height?i.width/i.height:void 0};let a;s.push(n),t.images.set(e,s),a=i.replaceColor?eo:to,await a(n)}catch{throw new Error(`${i.name??i.src} not found`)}}}(t),t.pluginManager.addPlugin(new ao(t)),t.pluginManager.addShape(Qa,e=>Promise.resolve(new so(t,e)))})}class ro extends be{sync=!1;load(t){E(t)||(super.load(t),te(this,"sync",t.sync))}}class co extends be{sync=!1;load(t){E(t)||(super.load(t),te(this,"sync",t.sync))}}class lo{count=0;delay=new ro;duration=new co;load(t){E(t)||(te(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class ho{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const s=i.delay.sync?1:A(),n=i.duration.sync?1:A();t.life={delay:e.retina.reduceFactor?W(i.delay.value)*s/e.retina.reduceFactor*r:0,delayTime:0,duration:e.retina.reduceFactor?W(i.duration.value)*n/e.retina.reduceFactor*r:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){ne(t,"life",lo,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const a=G(0,i.width),o=G(0,i.width);t.position.x=U(a),t.position.y=U(o),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const c=t.options.life;c&&(s.delay=W(c.delay.value)*r,s.duration=W(c.duration.value)*r)}(t,e,this.#u.canvas.size)}}async function uo(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new ho(t)))})}class po{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.shapeData;e.moveTo(-s,0),e.lineTo(s,0),e.lineCap=n?.cap??"butt"}(t)}getSidesCount(){return 1}}async function go(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["line"],()=>Promise.resolve(new po))})}class fo{distance=200;enable=!1;rotate;constructor(){this.rotate={x:3e3,y:3e3}}load(t){if(!E(t)&&(ee(this,"distance",t.distance),te(this,"enable",t.enable),t.rotate)){const e=t.rotate.x;void 0!==e&&(this.rotate.x=e);const i=t.rotate.y;void 0!==i&&(this.rotate.y=i)}}}class mo extends Mi{#V;constructor(t){super(t),this.#V=0}get maxDistance(){return this.#V}clear(){}init(){}interact(t){if(!t.options.attract?.enable)return;const e=this.container;if(E(t.attractDistance)){const i=W(t.options.attract.distance);i>this.#V&&(this.#V=i),t.attractDistance=i*e.retina.pixelRatio}const i=t.attractDistance,s=t.getPosition(),n=e.particles.grid.queryCircle(s,i);for(const e of n){if(t===e||!e.options.attract?.enable||e.destroyed||e.spawning)continue;const i=e.getPosition(),{dx:n,dy:a}=N(s,i),o=t.options.attract.rotate,r=n/(1e3*o.x),c=a/(1e3*o.y),l=e.size.value/t.size.value,d=1/l;t.velocity.x-=r*l,t.velocity.y-=c*l,e.velocity.x+=r*d,e.velocity.y+=c*d}}isEnabled(t){return t.options.attract?.enable??!1}loadParticlesOptions(t,...e){ne(t,"attract",fo,...e)}reset(){}}async function yo(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{_i(t),t.pluginManager.addInteractor?.("particlesAttract",t=>Promise.resolve(new mo(t)))})}var vo;!function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy"}(vo||(vo={}));class bo{speed=2;load(t){E(t)||te(this,"speed",t.speed)}}class wo{enable=!0;retries=0;load(t){E(t)||(te(this,"enable",t.enable),te(this,"retries",t.retries))}}class xo{absorb=new bo;bounce=new Se;enable=!1;maxSpeed=50;mode=vo.bounce;overlap=new wo;load(t){E(t)||(this.absorb.load(t.absorb),this.bounce.load(t.bounce),te(this,"enable",t.enable),ee(this,"maxSpeed",t.maxSpeed),te(this,"mode",t.mode),this.overlap.load(t.overlap))}}function Mo(t,e,i,s,n,a){if(!t.options.collisions||!i.options.collisions)return;const o=H(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 Po=t=>{t.options.collisions&&(t.collisionMaxSpeed??=W(t.options.collisions.maxSpeed),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed))};function ko(t,e){const i=t.getMass(),s=e.getMass(),n=t.velocity.length,a=e.velocity.length,o=i*n*n+s*a*a;vt(yt(t),yt(e));const r=t.velocity.length,c=e.velocity.length,l=i*r*r+s*c*c;if(l>1e-6*o){const i=Math.sqrt(o/l);Math.abs(i-1)>1e-4&&(t.velocity.length=r*i,e.velocity.length=c*i)}Po(t),Po(e)}function Co(t,e,i,s){if(t.options.collisions&&e.options.collisions)switch(t.options.collisions.mode){case vo.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?Mo(t,n,e,a,i,s):Mo(e,a,t,n,i,s))}(t,e,i,s);break;case vo.bounce:ko(t,e);break;case vo.destroy:!function(t,e){t.unbreakable||e.unbreakable||ko(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 Oo extends Mi{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||Co(t,e,i,s.retina.pixelRatio)}}isEnabled(t){return!!t.options.collisions?.enable}loadParticlesOptions(t,...e){ne(t,"collisions",xo,...e)}reset(){}}class zo{id="overlap";async getPlugin(t){const{OverlapPluginInstance:e}=await Promise.resolve().then(function(){return ic});return new e(t)}loadOptions(){}needsPlugin(){return!0}}async function Do(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{_i(t),t.pluginManager.addPlugin(new zo),t.pluginManager.addInteractor?.("particlesCollisions",t=>Promise.resolve(new Oo(t)))})}class So extends Jt{#nt;constructor(t,e,i,s){super(t,e,i),this.#nt=s}contains(t){if(super.contains(t))return!0;const{width:e,height:i}=this.#nt,{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.#nt,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 Jt)n=new Jt(i.x,i.y,t.radius);else{const e=t;n=new Kt(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(n))return!0}return!1}}class Io{blur=5;color=new le;enable=!1;constructor(){this.color.value="#000"}load(t){E(t)||(te(this,"blur",t.blur),this.color=le.create(this.color,t.color),te(this,"enable",t.enable))}}class To{color;enable=!1;frequency=1;opacity;load(t){E(t)||(void 0!==t.color&&(this.color=le.create(this.color,t.color)),te(this,"enable",t.enable),te(this,"frequency",t.frequency),te(this,"opacity",t.opacity))}}class Eo{blink=!1;color=new le;consent=!1;distance=100;enable=!1;frequency=1;id;opacity=1;shadow=new Io;triangles=new To;warp=!1;width=1;constructor(){this.color.value="#fff"}load(t){E(t)||(te(this,"id",t.id),te(this,"blink",t.blink),this.color=le.create(this.color,t.color),te(this,"consent",t.consent),te(this,"distance",t.distance),te(this,"enable",t.enable),te(this,"frequency",t.frequency),te(this,"opacity",t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),te(this,"width",t.width),te(this,"warp",t.warp))}}function Ro(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 Lo extends Mi{#V;#p;constructor(t,e){super(e),this.#p=t,this.#V=0}get maxDistance(){return this.#V}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.#V&&(this.#V=t.linksDistance);const e=t.getPosition(),i=this.container,s=i.canvas.size;if(e.x<c.x||e.y<c.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,l=r?new So(e.x,e.y,o,s):new Jt(e.x,e.y,o),d=i.particles.grid.query(l);for(const i of d){const l=i.options.links;if(t===i||!l?.enable||n.id!==l.id||i.spawning||i.destroyed||!i.links||t.links.some(t=>t.destination===i)||i.links.some(e=>e.destination===t))continue;const d=i.getPosition();if(d.x<c.x||d.y<c.y||d.x>s.width||d.y>s.height)continue;const h=N(e,d).distance,u=r&&l.warp?Ro(e,d,s):h,p=Math.min(h,u);if(p>o)continue;const g=(1-p/o)*a;this.#at(t),t.links.push({destination:i,opacity:g,color:this.#ot(t,i),isWarped:u<h})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){ne(t,"links",Eo,...e)}reset(){}#ot(t,e){const i=this.container,s=t.options.links;if(!s)return;return ti(t,e,void 0!==s.id?i.particles.linksColors.get(s.id):i.particles.linksColor)}#at(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=ei(this.#p,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s))}}class _o{id="links";#p;constructor(t){this.#p=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return nc});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Ao(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{const e=t.pluginManager;_i(t),e.addPlugin(new _o(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new Lo(e,t)))})}const Fo=new Map;function Vo(t,e){const{context:i,radius:s}=t,n=function(t){const e=Fo.get(t);if(e)return e;const i=u/t,s=!!(t%2),n=(-Math.PI+(s?0:i))*o,a=[];for(let e=0;e<t;e++){const t=n+e*i;a[e]={x:Math.cos(t),y:Math.sin(t)}}return Fo.set(t,a),a}(e.count.numerator/e.count.denominator);i.beginPath();for(let t=0;t<n.length;t++){const e=n[t];if(!e)continue;const a=e.x*s,o=e.y*s;t?i.lineTo(a,o):i.moveTo(a,o)}i.closePath()}class Bo{draw(t){const{particle:e,radius:i}=t;Vo(t,this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round(W(e?.sides??5))}}class Ho extends Bo{getSidesData(t,e){const{sides:i}=t;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class qo extends Bo{getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:1,numerator:3},length:2.66*e/1}}}async function Uo(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["polygon"],()=>Promise.resolve(new Ho))})}async function Wo(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["triangle"],()=>Promise.resolve(new qo))})}async function jo(t){t.checkVersion("4.3.2"),await Promise.all([Uo(t),Wo(t)])}class $o{decay=0;enable=!1;speed=0;sync=!1;load(t){E(t)||(te(this,"enable",t.enable),ee(this,"speed",t.speed),ee(this,"decay",t.decay),te(this,"sync",t.sync))}}class Go extends be{animation=new $o;direction=t.RotateDirection.clockwise;path=!1;load(t){E(t)||(super.load(t),te(this,"direction",t.direction),this.animation.load(t.animation),te(this,"path",t.path))}}class No{#u;constructor(t){this.#u=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:K(W(i.value)),min:0,max:u},e.pathRotation=i.path;let s=i.direction;if(s===t.RotateDirection.random){s=Math.floor(2*A())>0?t.RotateDirection.counterClockwise:t.RotateDirection.clockwise}switch(s){case t.RotateDirection.counterClockwise:case"counterClockwise":e.rotate.status=t.AnimationStatus.decreasing;break;case t.RotateDirection.clockwise:e.rotate.status=t.AnimationStatus.increasing}const n=i.animation;n.enable&&(e.rotate.decay=1-W(n.decay),e.rotate.velocity=W(n.speed)/360*this.#u.retina.reduceFactor,n.sync||(e.rotate.velocity*=A())),e.rotation=e.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){ne(t,"rotate",Go,...e)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(ln(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function Xo(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new No(t)))})}class Yo{draw(t){!function(t){const{context:e,radius:i}=t,s=i*Math.SQRT1_2,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}async function Jo(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new Yo))})}const Ko=0,Qo=0;class Zo{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.sides,a=i.starInset??2;e.moveTo(Ko,Qo-s);for(let t=0;t<n;t++)e.rotate(Math.PI/n),e.lineTo(Ko,Qo-s*a),e.rotate(Math.PI/n),e.lineTo(Ko,Qo-s)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round(W(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=W(i?.inset??2)}}async function tr(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["star"],()=>Promise.resolve(new Zo))})}async function er(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{await Promise.all([Tn(t),(async t=>{await async function(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new wi(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([Sa(t),$n(t),ta(t),la(t),fa(t),xa(t),Oa(t),Ea(t),Aa(t),Ha(t),Ga(t),Ka(t),yo(t),Do(t),Ao(t)])})(t),Rn(t),Bn(t),oo(t),go(t),jo(t),Jo(t),tr(t),uo(t),Mn(t),Xo(t)])})}const ir=["text","character","char","multiline-text"];function sr(t,e,i,s,n,a){const r={x:-e.length*i*o,y:i*o+s*i};n&&t.fillText(e,r.x,r.y),a&&t.strokeText(e,r.x,r.y)}class nr{draw(t){!function(t){const{context:e,particle:i,fill:s,stroke:n,radius:a,opacity:o}=t,r=i.shapeData;if(!r)return;const c=r.value;if(i.textLines??=wt(c,i.randomIndexData)?.split("\n")??[],i.maxTextLength??=i.textLines.length?Math.max(...i.textLines.map(t=>t.length)):i.textLines[0]?.length??0,!i.textLines.length||!i.maxTextLength)return;const l=i.textLines,d=r.style??"",h=r.weight??"400",u=r.font??"Verdana",p=2*Math.round(a)/(l.length*i.maxTextLength);e.font=`${d} ${h} ${p.toString()}px "${u}"`;const g=e.globalAlpha;e.globalAlpha=o;for(let t=0;t<l.length;t++){const i=l[t];i&&sr(e,i,p,t,s,n)}e.globalAlpha=g}(t)}async init(t){const e=t.actualOptions;if(ir.find(t=>ht(t,e.particles.shape.type))){const t=ir.map(t=>e.particles.shape.options[t]).find(t=>!!t),i=[];bt(t,t=>{i.push(An(t.font,t.weight))}),await Promise.all(i)}}particleInit(t,e){if(!e.shape||!ir.includes(e.shape))return;const i=e.shapeData;if(void 0===i)return;const s=i.value;s&&(e.textLines=wt(s,e.randomIndexData)?.split("\n")??[],e.maxTextLength=e.textLines.length?Math.max(...e.textLines.map(t=>t.length)):e.textLines[0]?.length??0)}}async function ar(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(ir,()=>Promise.resolve(new nr))})}var or;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(or||(or={}));class rr{decay=0;enable=!1;speed=0;sync=!1;load(t){E(t)||(te(this,"enable",t.enable),ee(this,"speed",t.speed),ee(this,"decay",t.decay),te(this,"sync",t.sync))}}class cr extends be{animation=new rr;direction=or.clockwise;enable=!1;load(t){super.load(t),E(t)||(this.animation.load(t.animation),te(this,"direction",t.direction),te(this,"enable",t.enable))}}class lr{#u;constructor(t){this.#u=t}getTransformValues(t){const e=t.tilt?.enable&&t.tilt;return{b:e?Math.cos(e.value)*e.cosDirection:void 0,c:e?Math.sin(e.value)*e.sinDirection:void 0}}init(e){const i=e.options.tilt;if(!i)return;e.tilt={enable:i.enable,value:K(W(i.value)),sinDirection:A()>=o?1:-1,cosDirection:A()>=o?1:-1,min:0,max:u};let s=i.direction;if(s===or.random){s=Math.floor(2*A())>0?or.counterClockwise:or.clockwise}switch(s){case or.counterClockwise:case"counterClockwise":e.tilt.status=t.AnimationStatus.decreasing;break;case or.clockwise:e.tilt.status=t.AnimationStatus.increasing}const n=e.options.tilt?.animation;n?.enable&&(e.tilt.decay=1-W(n.decay),e.tilt.velocity=W(n.speed)/360*this.#u.retina.reduceFactor,n.sync||(e.tilt.velocity*=A()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){ne(t,"tilt",cr,...e)}update(e,i){this.isEnabled(e)&&e.tilt&&ln(e,e.tilt,!1,t.DestroyType.none,i)}}async function dr(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("tilt",t=>Promise.resolve(new lr(t)))})}class hr{color;enable=!1;frequency=.05;opacity=1;load(t){E(t)||(void 0!==t.color&&(this.color=le.create(this.color,t.color)),te(this,"enable",t.enable),te(this,"frequency",t.frequency),ee(this,"opacity",t.opacity))}}class ur{enable=!1;fillColor;frequency=.05;opacity=1;strokeColor;load(t){E(t)||(void 0!==t.fillColor&&(this.fillColor=le.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=le.create(this.strokeColor,t.strokeColor)),te(this,"enable",t.enable),te(this,"frequency",t.frequency),ee(this,"opacity",t.opacity))}}class pr{links=new hr;particles=new ur;load(t){E(t)||(this.links.load(t.links),this.particles.load(t.particles))}}class gr{#u;#p;constructor(t,e){this.#p=t,this.#u=e}getColorStyles(t,e,i,s){const n=t.options,a=this.#u,o=n.twinkle;if(!o)return{};const r=o.particles,c=r.enable&&A()<r.frequency,l=t.options.zIndex,d=(1-t.zIndexFactor)**l.opacityRate,h=c?W(r.opacity)*d:s,u=We(this.#p,r.fillColor),p=We(this.#p,r.strokeColor),g=(()=>{if(u)return Qe(u,a.hdr,h)})(),f=(()=>{if(p)return Qe(p,a.hdr,h)})(),m={},y=c&&(!!g||!!f);return m.fill=y?g:void 0,m.stroke=y?f:void 0,m}init(){}isEnabled(t){const e=t.options.twinkle;return!!e&&e.particles.enable}loadOptions(t,...e){ne(t,"twinkle",pr,...e)}update(){}}async function fr(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("twinkle",e=>Promise.resolve(new gr(t.pluginManager,e)))})}class mr{angle=50;move=10;load(t){E(t)||(ee(this,"angle",t.angle),ee(this,"move",t.move))}}class yr{distance=5;enable=!1;speed=new mr;load(t){if(!E(t)&&(ee(this,"distance",t.distance),te(this,"enable",t.enable),void 0!==t.speed))if(S(t.speed))this.speed.load({angle:t.speed});else{const e=t.speed;"min"in e?this.speed.load({angle:e}):this.speed.load(t.speed)}}}class vr{#u;constructor(t){this.#u=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:A()*u,angleSpeed:W(e.speed.angle)/360,moveSpeed:W(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=W(e?.distance??0)*this.#u.retina.pixelRatio}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.options.wobble?.enable}loadOptions(t,...e){ne(t,"wobble",yr,...e)}update(t,e){this.isEnabled(t)&&function(t,e,i){const{wobble:s}=e.options,{wobble:n}=e;if(!s?.enable||!n)return;const a=t.retina.reduceFactor,o=n.angleSpeed*i.factor*a,r=n.moveSpeed*i.factor*a*(e.retina.wobbleDistance??0)/16.666666666666668,c=u,{position:l}=e;n.angle+=o,n.angle>c&&(n.angle-=c),l.x+=r*Math.cos(n.angle),l.y+=r*Math.abs(Math.sin(n.angle))}(this.#u,t,e)}}async function br(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("wobble",t=>Promise.resolve(new vr(t)))})}async function wr(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{const e=async t=>{await ws(t),await Promise.all([Ps(t),Ds(t)])};await Promise.all([(async t=>{await er(t),await Promise.all([Es(t),Bs(t),$i(t),e(t)])})(t),is(t),js(t),dr(t),fr(t),br(t),ar(t)])})}var xr;!function(t){t.screen="screen",t.window="window",t.canvas="canvas"}(xr||(xr={}));class Mr{maxWidth=1/0;mode=xr.canvas;options={};load(t){E(t)||(E(t.maxWidth)||(this.maxWidth=t.maxWidth),E(t.mode)||(t.mode===xr.screen?this.mode=xr.screen:this.mode=xr.canvas),E(t.options)||(this.options=mt({},t.options)))}}class Pr{id="responsive";async getPlugin(t){const{ResponsivePluginInstance:e}=await Promise.resolve().then(function(){return ac});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;if(e.setResponsive=(t,i,s)=>{e.load(s);const n=t/i,a={[xr.screen]:screen.availWidth,[xr.window]:innerWidth,[xr.canvas]:n},o=e.responsive?.find(t=>t.maxWidth>a[t.mode]);return e.load(o?.options),o?.maxWidth},e.responsive??=[],void 0!==i?.responsive)for(const t of i.responsive){const i=new Mr;t&&i.load(t),e.responsive.push(i)}e.responsive.sort((t,e)=>t.maxWidth-e.maxWidth)}needsPlugin(t){return!!t?.responsive?.length}}async function kr(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Pr)})}const Cr=async t=>{t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{await Promise.all([wr(t),kr(t)])});const{particlesJS:e,pJSDom:i}=(t=>{const e=async(e,i)=>{const s=mt({},di,i);return await t.load({id:e,options:{fullScreen:{enable:!1},detectRetina:s.retina_detect,smooth:!0,interactivity:{detectsOn:s.interactivity.detect_on,events:{onHover:{enable:s.interactivity.events.onhover.enable,mode:s.interactivity.events.onhover.mode},onClick:{enable:s.interactivity.events.onclick.enable,mode:s.interactivity.events.onclick.mode}},modes:{grab:{distance:s.interactivity.modes.grab.distance,links:{opacity:s.interactivity.modes.grab.line_linked.opacity}},bubble:{distance:s.interactivity.modes.bubble.distance,size:s.interactivity.modes.bubble.size,duration:s.interactivity.modes.bubble.duration,opacity:s.interactivity.modes.bubble.opacity,speed:s.interactivity.modes.bubble.speed},repulse:{distance:s.interactivity.modes.repulse.distance,duration:s.interactivity.modes.repulse.duration},push:{quantity:s.interactivity.modes.push.particles_nb},remove:{quantity:s.interactivity.modes.remove.particles_nb}}},particles:{attract:{enable:s.particles.move.attract.enable,rotate:{x:s.particles.move.attract.rotateX,y:s.particles.move.attract.rotateY}},collisions:{enable:s.particles.move.bounce},number:{value:s.particles.number.value,density:{enable:s.particles.number.density.enable,width:s.particles.number.density.value_area}},color:{value:s.particles.color.value},stroke:{width:s.particles.shape.stroke.width,color:{value:s.particles.shape.stroke.color}},shape:{type:s.particles.shape.type,options:{polygon:{sides:s.particles.shape.polygon.nb_sides},image:{src:s.particles.shape.image.src,width:s.particles.shape.image.width,height:s.particles.shape.image.height}}},opacity:{value:s.particles.opacity.random?{min:s.particles.opacity.anim.enable?s.particles.opacity.anim.opacity_min:0,max:s.particles.opacity.value}:s.particles.opacity.value,animation:{enable:s.particles.opacity.anim.enable,speed:s.particles.opacity.anim.speed,sync:s.particles.opacity.anim.sync}},size:{value:s.particles.size.random?{min:s.particles.size.anim.enable?s.particles.size.anim.size_min:0,max:s.particles.size.value}:s.particles.size.value,animation:{enable:s.particles.size.anim.enable,speed:s.particles.size.anim.speed,sync:s.particles.size.anim.sync}},links:{enable:s.particles.line_linked.enable,distance:s.particles.line_linked.distance,color:s.particles.line_linked.color,opacity:s.particles.line_linked.opacity,width:s.particles.line_linked.width},move:{enable:s.particles.move.enable,speed:s.particles.move.speed/3,direction:s.particles.move.direction,random:s.particles.move.random,straight:s.particles.move.straight,outModes:s.particles.move.out_mode}},resize:{enable:s.interactivity.events.resize}}})};return e.load=(e,i,s)=>{t.load({id:e,url:i}).then(t=>{s(t)}).catch(()=>{s(void 0)})},e.setOnClickHandler=e=>{t.pluginManager.setOnClickHandler?.(e)},{particlesJS:e,pJSDom:t.items}})(t);globalThis.particlesJS=e,globalThis.pJSDom=i,globalThis.Particles=li},Or=globalThis;Or.initPjs=Cr,Or.tsParticles=ci;function zr(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Dr{#rt;#ct;#lt;#dt;#ht;#u;#ut;#pt;#gt;#ft;#mt;#yt;#p;#vt;#bt;#wt={};#xt=[void 0,void 0];#Mt={};constructor(t,e,i){this.#p=t,this.#u=e,this.#dt=i,this.#ut=null,this.#rt=null,this.#ct=new Set,this.#bt=[],this.#vt=[],this.#lt=[],this.#ht=[],this.#gt=[],this.#ft=[],this.#mt=[],this.#yt={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#pt}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(c.x,c.y,this.#dt.size.width,this.#dt.size.height)})}clear(){for(const t of this.#lt)if(t.canvasClear?.())return;for(const e of Object.values(t.DrawLayer))if("number"==typeof e)for(const t of this.#Pt(e))if(t.canvasClear?.())return;this.canvasClear()}destroy(){this.stop(),this.#rt=null,this.#ct.clear(),this.#bt=[],this.#vt=[],this.#lt=[],this.#ht=[],this.#gt=[],this.#ft=[],this.#mt=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#yt[e]=[])}draw(t){const e=this.#ut;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.#kt(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,c=t.options.zIndex,l=1-t.zIndexFactor,{fillOpacity:d,opacity:h,strokeOpacity:u}=t.getOpacity(),p=this.#Mt,g=this.#wt,f=a?Qe(a,r.hdr,d*h):void 0,m=o?Qe(o,r.hdr,u*h):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=m,this.draw(s=>{for(const i of this.#mt)i.drawParticleSetup?.(s,t,e);this.#Ct(s,t,i,h,g,p),this.#Ot({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*l**c.sizeRate,opacity:h,transform:p}),this.#zt(t);for(const i of this.#ft)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#gt)this.#Dt(i,s,t,e)})}drawParticles(e){const{particles:i,actualOptions:s}=this.#u;this.clear(),i.update(e),this.draw(n=>{const a=this.#dt.size.width,o=this.#dt.size.height;if(this.#rt)try{n.drawImage(this.#rt,c.x,c.y,a,o)}catch{this.#St("background-element-draw-error","Error drawing background element onto canvas")}const r=s.background;if(r.draw)try{r.draw(n,e)}catch{this.#St("background-draw-error","Error in background.draw callback")}for(const e of this.#Pt(t.DrawLayer.BackgroundMask))e.canvasPaint?.();for(const i of this.#Pt(t.DrawLayer.CanvasSetup))i.drawSettingsSetup?.(n,e);for(const i of this.#Pt(t.DrawLayer.PluginContent))i.draw?.(n,e);i.drawParticles(e);for(const i of this.#Pt(t.DrawLayer.CanvasCleanup))i.clearDraw?.(n,e),i.drawSettingsCleanup?.(n,e)})}init(){this.initUpdaters(),this.initPlugins(),this.#It(),this.paint()}initPlugins(){this.#lt=[],this.#ht=[],this.#gt=[],this.#mt=[],this.#ft=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#yt[e]=[]);for(const e of this.#u.plugins)(e.particleFillColor??e.particleStrokeColor)&&this.#ht.push(e),e.drawParticle&&this.#gt.push(e),e.drawParticleSetup&&this.#mt.push(e),e.drawParticleCleanup&&this.#ft.push(e),e.canvasClear&&this.#lt.push(e),e.canvasPaint&&this.#Pt(t.DrawLayer.BackgroundMask).push(e),e.drawSettingsSetup&&this.#Pt(t.DrawLayer.CanvasSetup).push(e),e.draw&&this.#Pt(t.DrawLayer.PluginContent).push(e),(e.clearDraw??e.drawSettingsCleanup)&&this.#Pt(t.DrawLayer.CanvasCleanup).push(e)}initUpdaters(){this.#bt=[],this.#vt=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#vt.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#bt.push(t)}paint(){let e=!1;for(const i of this.#Pt(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(c.x,c.y,this.#dt.size.width,this.#dt.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,c.x,c.y,this.#dt.size.width,this.#dt.size.height),i.globalAlpha=s})}setContext(t){this.#ut=t,this.#ut&&(this.#ut.globalCompositeOperation=i)}setContextSettings(t){this.#pt=t}stop(){this.draw(t=>{t.clearRect(c.x,c.y,this.#dt.size.width,this.#dt.size.height)})}#zt(t){for(const e of this.#vt)e.afterDraw?.(t)}#Ct(t,e,i,s,n,a){for(const o of this.#bt){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)zr(a,t,e)}o.beforeDraw?.(e)}}#Tt(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#Et(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#Ot(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:c}=t,{effectDrawers:l,shapeDrawers:d}=e,h=s.getPosition(),u=s.getTransformData(c),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 m={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?.(m);const y=s.effect?l.get(s.effect):void 0,v=s.shape?d.get(s.shape):void 0;this.#Et(y,m),this.#Rt(v,m),this.#Lt(v,m),this.#_t(v,m),this.#Tt(y,m),i.resetTransform()}#Dt(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#Lt(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())}#_t(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#Rt(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#Pt(t){return this.#yt[t]}#kt(t){let e,i;for(const s of this.#ht)if(!e&&s.particleFillColor&&(e=We(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=We(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#xt[0]=e,this.#xt[1]=i,this.#xt}#It(){const t=this.#u.actualOptions.background;if(this.#rt=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.#rt=e:e?this.#St("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#St("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.#rt=t.element)}#St(t,e){this.#ct.has(t)||(this.#ct.add(t),Lt().warning(e))}}const Sr=new WeakMap;function Ir(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 Tr{domElement;render;renderCanvas;size;zoom=1;#u;#At;#Ft;#Vt;#p;#Bt;#Ht;#qt;#Ut;constructor(t,e){this.#p=t,this.#u=e,this.render=new Dr(t,e,this),this.#qt={height:0,width:0};const i=e.retina.pixelRatio,s=this.#qt;this.size={height:s.height*i,width:s.width*i},this.#At=!1,this.#Ht=[],this.#Bt="none"}get#Wt(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#At){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#jt();this.render.destroy(),this.#Ht=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#Ut?this.#Ut:{x:e*o/t,y:i*o/t}}init(){this.#$t(t=>{t.disconnect()}),this.#Ft=dt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#Gt()}),this.resize(),this.#Nt(),this.initBackground(),this.#$t(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#Xt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=qe(this.#p,e.color);s.backgroundColor=n?Ke(n,t.actualOptions.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#Ht=[];for(const t of this.#u.plugins)t.resize&&this.#Ht.push(t)}loadCanvas(t){this.#At&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#At=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=Sr.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 Sr.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#Vt=Mt(s.style));const n=this.#qt,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.#qt,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 c=this.size;return i.width=c.width=o.width,i.height=c.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.#Bt=t,this.#Gt())}setZoom(t,e){this.zoom=t,this.#Ut=e}stop(){this.#$t(t=>{t.disconnect()}),this.#Ft=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#Yt(),e&&await t.refresh()}#Yt(){for(const t of this.#Ht)t.resize?.()}#Xt(){const t=this.#u.actualOptions.hdr&<("(color-gamut: p3)")?.matches&<("(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))}#Nt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#Wt?this.#Jt():this.#jt();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")}}}#Gt(){const t=this.domElement;if(!t)return;this.#$t(t=>{t.disconnect()}),this.#Nt(),this.initBackground();const e=this.#Bt;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#$t(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#jt(){const t=this.domElement,e=this.#Vt;t&&e&&Ir(t,e,!0)}#$t(t){this.#Ft&&t(this.#Ft)}#Jt(){const t=this.domElement;t&&Ir(t,Ct(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Er{#u;#Kt;#Qt;#Zt;constructor(t){this.#u=t,this.#Kt={visibilityChange:()=>{this.#te()},resize:()=>{this.#ee()}}}addListeners(){this.#ie(!0)}removeListeners(){this.#ie(!1)}#te(){const t=this.#u;t.actualOptions.pauseOnBlur&&(ct().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#ee(){this.#Zt&&(clearTimeout(this.#Zt),this.#Zt=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#Zt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*r)}#ie(t){const e=this.#Kt;this.#se(t),Ot(document,n,e.visibilityChange,t,!1)}#se(t){const e=this.#Kt,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Ot(globalThis,s,e.resize,t);const n=i.canvas.domElement;this.#Qt&&!t?(n&&this.#Qt.unobserve(n),this.#Qt.disconnect(),this.#Qt=void 0):!this.#Qt&&t&&n&&(this.#Qt=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this.#ee()}),this.#Qt.observe(n))}}function Rr(t){if(!ht(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 Lr(t,e){const i=t%e;return i<0?i+e:i}function _r(t,e,i,s){const n=Ae(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=wt(n.effect.type,t.id,a),t.shape=wt(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=wt(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=wt(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 mt({close:e.close},wt(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 mt({close:e.close},wt(n,i,s))}(t.shape,r,t.id,a):void 0,n.load(s);const c=t.effectData,l=t.shapeData;return c&&n.load(c.particles),l&&n.load(l.particles),t.effectClose=c?.close??n.effect.close,t.shapeClose=l?.close??n.shape.close,n}class Ar{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;#ne={fillOpacity:1,opacity:1,strokeOpacity:1};#ae=C.origin;#oe={sin:0,cos:0};#re={a:1,b:0,c:0,d:1};#u;#U=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#U.push(t),this.#U.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#U.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.#ce(this.#le(ii(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*o}getModifier(t){return this.#U.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.#le(void 0,t=>t.opacity)??i,n=this.fillOpacity??1,a=this.strokeOpacity??1;return this.#ne.fillOpacity=s*n*e,this.#ne.opacity=s*e,this.#ne.strokeOpacity=s*a*e,this.#ne}getPosition(){return this.#ae.x=this.position.x+this.offset.x,this.#ae.y=this.position.y+this.offset.y,this.#ae.z=this.position.z,this.#ae}getRadius(){return this.#le(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#oe.sin=Math.sin(t),this.#oe.cos=Math.cos(t),this.#oe}getStrokeColor(){return this.#ce(this.#le(ii(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#re.a=e.cos*(t.a??l.a),this.#re.b=i?e.sin*(t.b??1):t.b??l.b,this.#re.c=i?-e.sin*(t.c??1):t.c??l.c,this.#re.d=e.cos*(t.d??l.d),this.#re}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=_r(this,a,this.#p,s),a.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(a.particleUpdaters,this),this.#de(i),this.initialVelocity=this.#he(),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.#ue({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#ue({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=Lr(t,u);return e>=Math.PI*o&&e<3*Math.PI*o}if(this.roll.horizontal){const e=Lr(t+Math.PI*o,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Lr(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.#U.findIndex(e=>e.id===t);e>=0&&this.#U.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#le(t,e){let i=t;for(const t of this.#U)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#pe(t,e){let i=0,s=t?C.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),c=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return C.create(i.x,i.y,e)}const t=st({size:c,position:s}),l=C.create(t.x,t.y,e);this.#ge(l,r,o.left??o.default),this.#ge(l,r,o.right??o.default),this.#fe(l,r,o.top??o.default),this.#fe(l,r,o.bottom??o.default);let d=!0;for(const t of n.particles.checkParticlePositionPlugins)if(d=t.checkParticlePosition?.(this,l,i)??!0,!d)break;if(d)return l;i+=1,s=void 0}}#he(){const e=this.options.move,i=Z(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=K(W(e.angle.value)),n=K(W(e.angle.offset)),a={left:n-s*o,right:n+s*o};return e.straight||(i.angle+=U(G(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=A()),i}#ge(e,i,s){Rr({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#fe(e,i,s){Rr({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#me(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"}}#ye(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#ue(t){const e=this.#me(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.#ye(t.direction,t.outMode),c=a?this.#ve(a(r),"shape"):void 0,l=o?this.#ve(o(r),"effect"):void 0;if(c&&l){const t=Math.max(c.margin??0,l.margin??0);return{inside:c.inside&&l.inside,margin:t>0?t:void 0,reason:"combined"}}return c??l??e}#ce(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?ri(t,this.roll.alter.type,this.roll.alter.value):t:t}#de(e){const i=this.#u,s=Math.floor(W(this.options.zIndex.value)),n=this.#pe(e,H(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={...xt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=Q(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=O.origin}#ve(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Fr{#be;#we=new Map;#xe=[];#Me;#Pe;#ke=[];#Ce;constructor(t){this.#be=t,this.#Me=0,this.#Ce=0}clear(){this.#we.clear();const t=this.#Pe;t&&(this.#be=t),this.#Pe=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Oe(e,i);this.#we.has(s)||this.#we.set(s,[]),this.#we.get(s)?.push(t)}query(t,e,i=[]){const s=this.#ze(t);if(!s)return i;const n=Math.floor(s.minX/this.#be),a=Math.floor(s.maxX/this.#be),o=Math.floor(s.minY/this.#be),r=Math.floor(s.maxY/this.#be);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#we.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.#De(t.x,t.y,e),a=this.query(n,i,s);return this.#Se(),a}queryRectangle(t,e,i,s=[]){const n=this.#Ie(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Se(),a}setCellSize(t){this.#Pe=t}#De(t,e,i){return(this.#xe[this.#Me++]??=new Jt(t,e,i)).reset(t,e,i)}#Ie(t,e,i,s){return(this.#ke[this.#Ce++]??=new Kt(t,e,i,s)).reset(t,e,i,s)}#Oe(t,e){return`${Math.floor(t/this.#be)}_${Math.floor(e/this.#be)}`}#ze(t){if(t instanceof Jt){const e=t.radius,{x:i,y:s}=t.position;return{minX:i-e,maxX:i+e,minY:s-e,maxY:s+e}}if(t instanceof Kt){const{x:e,y:i}=t.position,{width:s,height:n}=t.size;return{minX:e,maxX:e+s,minY:i,maxY:i+n}}return null}#Se(){this.#Me=0,this.#Ce=0}}class Vr{checkParticlePositionPlugins;grid;#Te;#u;#Ee;#Re;#Le;#_e;#Ae;#Fe;#p;#Ve;#Be;#He;#qe;#Ue;#We;constructor(t,e){this.#p=t,this.#u=e,this.#Le=0,this.#Te=[],this.#Ve=[],this.#Re=0,this.#Ee=new Map,this.#_e=new Map,this.#We=this.#je(this.#u.zLayers),this.grid=new Fr(100),this.checkParticlePositionPlugins=[],this.#Ae=[],this.#Fe=[],this.#He=[],this.#Be=[],this.#Ue=[]}get count(){return this.#Te.length}addParticle(e,i,s,n){const a=this.#u.actualOptions.particles.number.limit.mode,o=void 0===s?this.#Re:this.#Ee.get(s)??this.#Re,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.#Ve.pop()??new Ar(this.#p,this.#u);a.init(this.#Le,e,i,s);let o=!0;return n&&(o=n(a)),o?(this.#Te.push(a),this.#$e(a),this.#Le++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this.#Ve.push(a)}catch(t){Lt().warning(`error adding particle: ${t}`)}}clear(){this.#Te=[],this.#_e.clear(),this.#Ge(this.#u.zLayers)}destroy(){this.#Te=[],this.#Ve.length=0,this.#_e.clear(),this.#We=[],this.checkParticlePositionPlugins=[],this.#Ae=[],this.#Fe=[],this.#He=[],this.#Be=[],this.#Ue=[]}drawParticles(t){for(let e=this.#We.length-1;e>=0;e--){const i=this.#We[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Te.filter(t)}find(t){return this.#Te.find(t)}get(t){return this.#Te[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#Ue=[],this.#Fe=[],this.#He=[],this.#Ae=[],this.#Be=[],this.#_e.clear(),this.#Ge(t.zLayers),this.grid=new Fr(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#Ue.push(e),e.particleUpdate&&this.#Fe.push(e),e.postUpdate&&this.#He.push(e),e.particleReset&&this.#Ae.push(e),e.postParticleUpdate&&this.#Be.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.#Te.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.#Ne(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=Ae(this.#p,this.#u,s);this.#Xe(n,i,t)}this.#Xe(t.particles,i)}setResizeFactor(t){this.#qe=t}update(t){this.grid.clear();for(const e of this.#Ue)e.update?.(t);const e=this.#Ye(t);for(const e of this.#He)e.postUpdate?.(t);if(this.#Je(t,e),e.size)for(const t of e)this.remove(t);this.#qe=void 0}#Ke(...t){this.#Ve.push(...t)}#Xe(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Re=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Ee.set(i,s?.number.limit.value??n.limit.value));const a=this.#Qe(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,c=Math.min(o,r)*a+e,l=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#Re=n.limit.value*a:this.#Ee.set(i,n.limit.value*a),l<c?this.push(Math.abs(c-l),void 0,t,i):l>c&&this.removeQuantity(l-c,i)}#je(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#Ze(t){const e=this.#We.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#Qe(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}#$e(t){const e=this.#Ze(t.position.z),i=this.#We[e];i&&(i.push(t),this.#_e.set(t.id,e))}#Ne(e,i,s){const n=this.#Te[e];return!!n&&(n.group===i&&(this.#Te.splice(e,1),this.#ti(n),n.destroy(s),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this.#Ke(n),!0))}#ti(t){const e=this.#_e.get(t.id)??this.#Ze(t.position.z),i=this.#We[e];if(!i)return void this.#_e.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#_e.delete(t.id)}#Ge(t){const e=Math.max(Math.floor(t),1);if(this.#We.length===e)for(const t of this.#We)t.length=0;else this.#We=this.#je(e)}#ei(t){const e=this.#Ze(t.position.z),i=this.#_e.get(t.id);if(void 0===i)return void this.#$e(t);if(i===e)return;const s=this.#We[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#We[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.#_e.set(t.id,e)}else this.#_e.set(t.id,e)}#Ye(t){const e=new Set,i=this.#qe;for(const s of this.#Te){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.#Ae)t.particleReset?.(s);for(const e of this.#Fe){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#Je(t,e){for(const i of this.#Te)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.#Be)e.postParticleUpdate?.(i,t);this.#ei(i)}}}class Br{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 Hr(t){return!t.destroyed}function qr(t,e,...i){const s=new Fe(t,e);return Zt(s,...i),s}var Ur=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#I;#ii;#si={value:0,factor:0};#ni;#ai;#oi;#ri;#ci;#li;#di;#hi;#ui;#pi;#gi;#p;#fi;#mi;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this.#p=s,this.#ni=i,this.#ui=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.#fi=!1,this.#I=0,this.#oi=0,this.#hi=0,this.#ci=!0,this.started=!1,this.destroyed=!1,this.#gi=!0,this.#di=0,this.zLayers=100,this.pageHidden=!1,this.#mi=o,this.#li=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Br(this),this.canvas=new Tr(this.#p,this),this.particles=new Vr(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#pi=qr(this.#p,this),this.actualOptions=qr(this.#p,this),this.#ri=new Er(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#gi&&!this.pageHidden&&Hr(this)}get options(){return this.#pi}get sourceOptions(){return this.#mi}addLifeTime(t){this.#hi+=t}alive(){return!this.#oi||this.#hi<=this.#oi}destroy(e=!0){if(Hr(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.#ui(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#ni(t,{container:this,data:e})}draw(t){if(!Hr(this))return;let e=t;this.#ai=V(t=>{e&&(this.#di=void 0,e=!1),this.#yi(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}Lt().error(`Export plugin with type ${t} not found`)}async init(){if(!Hr(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.#pi=qr(this.#p,this,this.#li,this.sourceOptions),this.actualOptions=qr(this.#p,this,this.#pi),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:c}=this.actualOptions;this.hdr=a,this.zLayers=c,this.#oi=W(s)*r,this.#I=W(i)*r,this.#hi=0,this.fpsLimit=n>0?n:120,this.#fi=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(Hr(this)&&(void 0!==this.#ai&&(B(this.#ai),this.#ai=void 0),!this.#gi)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#gi=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!Hr(this))return;const i=this.#gi||e;if(!this.#ci||this.actualOptions.autoPlay){if(this.#gi&&(this.#gi=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#ci=!1}async refresh(){if(Hr(this))return this.stop(),this.start()}async reset(t){if(Hr(this))return this.#li=t,this.#mi=t,this.#pi=qr(this.#p,this,this.#li,this.sourceOptions),this.actualOptions=qr(this.#p,this,this.#pi),this.refresh()}async start(){Hr(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#ri.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#ii=setTimeout(()=>{i()},this.#I)}))}stop(){if(Hr(this)&&this.started){this.#ii&&(clearTimeout(this.#ii),this.#ii=void 0),this.#ci=!0,this.started=!1,this.#ri.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.#mi=this.#pi,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#yi(t){try{if(!this.#fi&&void 0!==this.#di&&t<this.#di+r/this.fpsLimit)return void this.draw(!1);if(this.#di??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this.#si,t-this.#di,this.fpsLimit,this.#fi),this.addLifeTime(this.#si.value),this.#di=t,this.#si.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#si),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Lt().error("error in animation loop",t)}}}});class Wr{#vi=!0;#bi;#u;#Kt;#wi;#xi;constructor(t,e){this.#u=t,this.#bi=[],this.#wi=e,this.#xi=new Map,this.#Kt={mouseDown:()=>{this.#Mi()},mouseLeave:()=>{this.#Pi()},mouseMove:t=>{this.#ki(t)},mouseUp:t=>{this.#Ci(t)},touchStart:t=>{this.#Oi(t)},touchMove:t=>{this.#ki(t)},touchEnd:t=>{this.#zi(t)},touchCancel:t=>{this.#zi(t)},touchEndClick:t=>{this.#Di(t)},visibilityChange:()=>{this.#te()}}}addListeners(){this.#ie(!0)}init(){this.#bi.length=0;for(const t of this.#u.plugins.filter(t=>!!t.clickPositionValid))this.#bi.push(t)}removeListeners(){this.#ie(!1)}#Si(t){const e=this.#u,i=this.#wi,s=e.actualOptions;if(this.#vi){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;bt(n.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this.#Pi()},500)}#te(){this.#Pi()}#Ii(t){const e=this.#Kt,i=this.#u,s=this.#wi,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)&&(Ot(a,Oi,e.mouseMove,t),Ot(a,zi,e.touchStart,t),Ot(a,Si,e.touchMove,t),t?n.interactivity?.events.onClick.enable?(Ot(a,Di,e.touchEndClick,t),Ot(a,ki,e.mouseUp,t),Ot(a,Pi,e.mouseDown,t)):Ot(a,Di,e.touchEnd,t):(Ot(a,Di,e.touchEndClick,t),Ot(a,ki,e.mouseUp,t),Ot(a,Pi,e.mouseDown,t),Ot(a,Di,e.touchEnd,t)),Ot(a,Ci,e.mouseLeave,t),Ot(a,Ii,e.touchCancel,t))}#ie(t){const e=this.#Kt,i=this.#u,s=this.#wi,a=i.actualOptions,o=a.interactivity?.detectsOn,r=i.canvas.domElement;o===pi.window?s.interactivityData.element=ct():o===pi.parent&&r?s.interactivityData.element=r.parentElement??r.parentNode:s.interactivityData.element=r,this.#Ii(t),Ot(document,n,e.visibilityChange,t,!1)}#Mi(){const{interactivityData:t}=this.#wi,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position}#Ci(t){const e=this.#u,i=this.#wi,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.#bi)if(a=t.clickPositionValid?.(o)??!1,a)break;a||this.#Si(t),n.clicking=!1}}#Pi(){const{interactivityData:t}=this.#wi,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=Ci,e.inside=!1,e.clicking=!1}#ki(t){const e=this.#u,i=this.#wi,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.#vi=!0;const e=t;if(n.element===ct()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(s.interactivity?.detectsOn===pi.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.#vi="touchmove"!==t.type,a){const e=t,i=e.touches[e.touches.length-1],s=a.getBoundingClientRect();if(!i)return;o={x:i.clientX-s.left,y:i.clientY-s.top}}const r=e.retina.pixelRatio;o&&(o.x*=r,o.y*=r),n.mouse.position=o,n.status=Oi}#zi(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#xi.delete(t.identifier);this.#Pi()}#Di(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#xi.delete(t.identifier);this.#Ci(t)}#Oi(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#xi.set(t.identifier,performance.now());this.#ki(t)}}class jr{interactivityData;#Ti;#u;#ri;#Ei;#Ri;#Li;#_i;#p;constructor(t,e){this.#u=e,this.#p=t,this.#Ri=[],this.#Ei=[],this.#_i=[],this.#Ti=new Map,this.#ri=new Wr(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this.#Li=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(t=>{this.#Ai(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.#Ti.set("click",t=>{if(e.destroyed)return;const i=t,s={x:i.offsetX,y:i.offsetY};n(t,s,1)}),this.#Ti.set(zi,()=>{e.destroyed||(a=!0,o=!1)}),this.#Ti.set(Si,()=>{e.destroyed||(o=!0)}),this.#Ti.set(Di,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.#Ti.set(Ii,()=>{e.destroyed||(a=!1,o=!1)});for(const[t,e]of this.#Ti)s.addEventListener(t,e)}addListeners(){this.#ri.addListeners()}clearClickHandlers(){const t=this.#u,e=this.interactivityData;if(!t.destroyed){for(const[t,i]of this.#Ti)e.element?.removeEventListener(t,i);this.#Ti.clear()}}externalInteract(t){for(const e of this.#Ei){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.#Ei)i.handleClickMode?.(t,e)}init(){this.#ri.init();for(const t of this.#Ri){switch(t.type){case gi.external:this.#Ei.push(t);break;case gi.particles:this.#_i.push(t)}t.init()}}async initInteractors(){const t=await(this.#p.getInteractors?.(this.#u,!0));t&&(this.#Ri=t,this.#Ei=[],this.#_i=[])}particlesInteract(t,e){const i=this.interactivityData;for(const i of this.#Ei)i.clear(t,e);for(const s of this.#_i)s.isEnabled(t,i)&&s.interact(t,i,e)}removeListeners(){this.#ri.removeListeners()}reset(t){const e=this.interactivityData;for(const i of this.#Ei)i.isEnabled(e)&&i.reset(e,t);for(const i of this.#_i)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Li&&this.#Li.observe(t.element)}stopObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Li&&this.#Li.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this.#Ri)e.maxDistance>t&&(t=e.maxDistance);const e=this.#u;e.particles.grid.setCellSize(t*e.retina.pixelRatio)}#Ai(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 $r=Object.freeze({__proto__:null,InteractivityPluginInstance:class{interactionManager;#u;#p;constructor(t,e){this.#u=e,this.#p=t,this.interactionManager=new jr(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 bi(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 Gr=Object.freeze({__proto__:null,AbsorbersInstancesManager:class{#Fi;#p;constructor(t){this.#p=t,this.#Fi=new Map}async addAbsorber(t,e,i){const{AbsorberInstance:s}=await Promise.resolve().then(function(){return cc}),n=new s(this.#p,t,e,i);return this.getArray(t).push(n),n}clear(t){this.initContainer(t),this.#Fi.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Fi.get(t);return e||(e=[],this.#Fi.set(t,e)),e}initContainer(t){this.#Fi.has(t)||(this.#Fi.set(t,[]),t.getAbsorber??=e=>{const i=this.getArray(t);return void 0===e||S(e)?i[e??0]:i.find(t=>t.name===e)},t.addAbsorber??=(e,i)=>this.addAbsorber(t,e,i))}removeAbsorber(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});var Nr=Object.freeze({__proto__:null,AbsorbersPluginInstance:class{#u;#v;constructor(t,e){this.#u=t,this.#v=e,this.#v.initContainer(t)}draw(t){for(const e of this.#v.getArray(this.#u))e.draw(t)}async init(){const t=bt(this.#u.actualOptions.absorbers,async t=>{await this.#v.addAbsorber(this.#u,t)});T(t)?await Promise.all(t):await t}particleUpdate(t,e){for(const i of this.#v.getArray(this.#u))if(i.attract(t,e),t.destroyed)break}resize(){for(const t of this.#v.getArray(this.#u))t.resize()}stop(){this.#v.clear(this.#u)}}});const Xr=new Map;var Yr=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||Xr.set(t,e)}getShapeGenerator(t){return Xr.get(t)}getSupportedShapeGenerators(){return Xr.keys()}}});var Jr=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Fi;#p;constructor(t){this.#Fi=new Map,this.#p=t}async addEmitter(t,e,i){const s=new ls;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return hc}),a=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this.#Fi.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Fi.get(t);return e||(e=[],this.#Fi.set(t,e)),e}initContainer(t){this.#Fi.has(t)||(this.#Fi.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||S(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});var Kr=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#v;constructor(t,e){this.#v=t,this.#u=e,this.#v.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(T(t))for(const e of t)await this.#v.addEmitter(this.#u,e);else await this.#v.addEmitter(this.#u,t)}pause(){for(const t of this.#v.getArray(this.#u))t.pause()}play(){for(const t of this.#v.getArray(this.#u))t.play()}resize(){for(const t of this.#v.getArray(this.#u))t.resize()}stop(){this.#v.clear(this.#u)}update(t){this.#v.getArray(this.#u).forEach(e=>{e.update(t)})}}});var Qr=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=t.DrawLayer.CanvasSetup;#u;#Vi;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.#Vi&&(t.globalCompositeOperation=this.#Vi)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Vi=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function Zr(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=H(t.velocity.x,-1,1),t.velocity.y=H(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,c=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=c*(r.acceleration*o.factor)/(60*i));const l=t.moveDecay;t.velocity.multTo(l??1);const 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=c*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 tc=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,c=e.retina.moveSpeed,l=e.retina.moveDrift,d=e.size.max,h=c*(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 c=Math.max(e.canvas.size.width,e.canvas.size.height),l=c*o;i.spin.radius>l?(i.spin.radius=l,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/c)}(n,e,h,r):Zr(e,s,h,u,l,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,c=r.horizontal,l=r.vertical;if(!c&&!l)return;if((c&&n>=c||l&&a>=l)&&!t.misplaced)t.misplaced=!!c&&n>c||!!l&&a>l,c&&(t.velocity.x=t.velocity.y*o-t.velocity.x),l&&(t.velocity.y=t.velocity.x*o-t.velocity.y);else if((!c||n<c)&&(!l||a<l)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;c&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-A()),l&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-A())}}(e)}preInit(){return this.#Bi()}redrawInit(){return this.#Bi()}update(){for(const t of this.pathGenerators.values())t.update()}async#Bi(){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()}}}});var ec=Object.freeze({__proto__:null,ImagePreloaderInstance:class{#u;#n;constructor(t,e){this.#n=t,this.#u=e}destroy(){this.#n.images?.delete(this.#u)}}});var ic=Object.freeze({__proto__:null,OverlapPluginInstance:class{#u;constructor(t){this.#u=t}checkParticlePosition(t,e,i){return!this.#Hi(t,e,i)}#Hi(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 sc(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 nc=Object.freeze({__proto__:null,LinkInstance:class{#qi=new Map;#u;#Ui;#p;constructor(t,e){this.#p=t,this.#u=e,this.#Ui={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(),l=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,m=!1;const y=()=>{m&&(t.stroke(),m=!1)};for(const u of i){if(n.frequency<1&&this.#Wi(e,u.destination)>n.frequency)continue;const i=u.destination.getPosition();if(d&&!u.isWarped&&h&&(y(),this.#ji(s,e,u,h,r,i,t)),u.opacity<=0||a<=0)continue;if(!n.enable)continue;let v=u.opacity,b=u.color;const w=l?.enable&&A()<l.frequency?qe(this.#p,l.color):void 0;if(l&&w&&(b=w,v=W(l.opacity)),!b){const t=void 0!==n.id?this.#u.particles.linksColors.get(n.id):this.#u.particles.linksColor;b=ti(e,u.destination,t)}if(!b)continue;const x=this.#$i(b);if(x===p&&a===g&&v===f||(y(),t.strokeStyle=x,t.lineWidth=a,t.globalAlpha=v,p=x,g=a,f=v,t.beginPath(),m=!0),u.isWarped){const e=this.#u.canvas.size,s=i.x-r.x,n=i.y-r.y;let a=c.x,l=c.y;Math.abs(s)>e.width*o&&(a=s>0?-e.width:e.width),Math.abs(n)>e.height*o&&(l=n>0?-e.height:e.height),t.moveTo(r.x,r.y),t.lineTo(i.x+a,i.y+l),t.moveTo(r.x-a,r.y-l),t.lineTo(i.x,i.y)}else t.moveTo(r.x,r.y),t.lineTo(i.x,i.y)}y(),t.globalAlpha=u}init(){return this.#Ui.links.clear(),this.#Ui.triangles.clear(),this.#qi.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=[]}#ji(t,e,i,s,n,a,r){const c=i.destination,l=t.links?.triangles;if(!l?.enable||!c.options.links?.triangles.enable)return;const d=c.links;if(d?.length)for(const h of d){if(h.isWarped||this.#Wi(c,h.destination)>c.options.links.frequency||!s.has(h.destination.id))continue;const d=h.destination;if(this.#Gi(e,c,d)>(t.links?.triangles.frequency??0))continue;const u=l.opacity??(i.opacity+h.opacity)*o,p=qe(this.#p,l.color)??i.color;if(!p||u<=0)continue;const g=d.getPosition();r.save(),r.fillStyle=this.#$i(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()}}#$i(t){const e=`${t.r},${t.g},${t.b}`;let i=this.#qi.get(e);return i||(i=Ke(t,this.#u.hdr),this.#qi.set(e,i)),i}#Wi(t,e){return sc([t,e],this.#Ui.links)}#Gi(t,e,i){return sc([t,e,i],this.#Ui.triangles)}}});var ac=Object.freeze({__proto__:null,ResponsivePluginInstance:class{#u;constructor(t){this.#u=t}updateActualOptions(){const t=this.#u;t.actualOptions.responsive=[];const e=t.actualOptions.setResponsive?.(t.canvas.size.width,t.retina.pixelRatio,t.options);return t.responsiveMaxWidth!==e&&(t.responsiveMaxWidth=e,!0)}}});const oc=u,rc=1/360;var cc=Object.freeze({__proto__:null,AbsorberInstance:class{color;limit;mass;name;opacity;options;position;size;#u;#Ni;#Xi;#oi;#Yi;#Ji;#Ki;#Qi;#p;#Zi;constructor(t,e,i,s){this.#u=e,this.#p=t,this.#Ni=0,this.#Xi=0,this.#Ki=s?O.create(s.x,s.y):void 0,i instanceof Bi?this.options=i:(this.options=new Bi,this.options.load(i)),this.name=this.options.name,this.opacity=this.options.opacity,this.size=W(this.options.size.value)*e.retina.pixelRatio,this.mass=this.size*this.options.size.density*e.retina.reduceFactor;const n=this.options.size.limit;this.limit={radius:n.radius*e.retina.pixelRatio*e.retina.reduceFactor,mass:n.mass},this.color=qe(this.#p,this.options.color)??{b:0,g:0,r:0},this.position=this.#Ki?.copy()??this.#pe(),this.#Yi=!this.options.life.wait,this.#Qi=this.options.life.count??-1,this.#Ji=this.#Qi<=0,this.#Zi=e.retina.reduceFactor?W(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0}attract(t,e){const i=this.#u,s=this.options,n=t.getPosition(),{dx:a,dy:o,distance:r}=N(this.position,n),c=O.create(a,o);if(c.length=this.mass/Math.pow(r,2)*i.retina.reduceFactor,r<this.size+t.getRadius()){const n=.033*t.getRadius()*i.retina.pixelRatio*e.factor;this.size>t.getRadius()&&r<this.size-t.getRadius()||void 0!==t.absorberOrbit&&t.absorberOrbit.length<0?s.destroy?t.destroy():(t.needsNewPosition=!0,this.#ts(t,e,c)):(s.destroy&&(t.size.value-=n),this.#ts(t,e,c)),(this.limit.radius<=0||this.size<this.limit.radius)&&(this.size+=n),(this.limit.mass<=0||this.mass<this.limit.mass)&&(this.mass+=n*this.options.size.density*i.retina.reduceFactor)}else this.#ts(t,e,c)}draw(t){t.translate(this.position.x,this.position.y),t.beginPath(),t.arc(c.x,c.y,this.size,0,oc,!1),t.closePath(),t.fillStyle=Ke(this.color,this.#u.hdr,this.opacity),t.fill()}resize(){const t=this.#Ki;this.position=t&&pt(t,this.#u.canvas.size,O.origin)?t:this.#pe()}update(t){this.#Yi&&(this.#Yi=!1,this.#Xi=this.#Zi??0),void 0!==this.#oi&&(this.#Ni+=t.value,this.#Ni>=this.#oi&&(this.#Ji||this.#Qi--,(this.#Qi>0||this.#Ji)&&(this.position=this.#pe(),this.#Zi=this.#u.retina.reduceFactor?W(this.options.life.delay??0)*r/this.#u.retina.reduceFactor:1/0),this.#Ni-=this.#oi,this.#oi=void 0)),void 0!==this.#Zi&&(this.#Xi+=t.value,this.#Xi>=this.#Zi&&(this.#es(),this.#Xi-=this.#Zi,this.#Zi=void 0))}#pe(){const t=it({size:this.#u.canvas.size,position:this.options.position});return O.create(t.x,t.y)}#es(){(this.#Qi>0||this.#Ji||!this.options.life.count)&&(this.#Yi||this.#Xi>=(this.#Zi??0))&&(this.#Qi>0||this.#Ji)&&this.#is()}#is(){const t=void 0!==this.options.life.duration?W(this.options.life.duration):void 0;(this.#Qi>0||this.#Ji)&&void 0!==t&&t>0&&(this.#oi=t*r)}#ts(e,i,s){if(e.destroyed)return;const n=this.#u,a=n.canvas.size;if(e.needsNewPosition){const t=et({size:a});e.position.setTo(t),e.velocity.setTo(e.initialVelocity),e.absorberOrbit=void 0,e.needsNewPosition=!1}if(this.options.orbits){if(void 0===e.absorberOrbit&&(e.absorberOrbit=O.origin,e.absorberOrbit.length=Y(e.getPosition(),this.position),e.absorberOrbit.angle=A()*oc),e.absorberOrbit.length<=this.size&&!this.options.destroy){const t=Math.min(a.width,a.height),i=1,s=.1,n=.2;e.absorberOrbit.length=t*(i+(A()*n-s))}e.absorberOrbitDirection??=e.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise;const r=e.absorberOrbit.length,c=e.absorberOrbit.angle,l=e.absorberOrbitDirection;e.velocity.setTo(O.origin);const d=e.size.max,h=e.options.move.size?e.getRadius()/d:1,u=i.factor||1,p=e.retina.moveSpeed*h*u*o;e.position.x=this.position.x+r*Math.cos(c),e.position.y=this.position.y+r*(l===t.RotateDirection.clockwise?1:-1)*Math.sin(c),e.absorberOrbit.length=Math.max(0,e.absorberOrbit.length-s.length),e.absorberOrbit.angle+=p*rc*n.retina.reduceFactor}else e.velocity.addTo(s)}}});function lc(t,e,i,s){(t.paint??=new ze).fill={color:de.create(void 0,{value:e}),enable:s,opacity:i}}function dc(t,e,i,s){(t.paint??=new ze).stroke={color:de.create(void 0,{value:e}),opacity:i,width:s}}var hc=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#Ni;#ss;#Xi;#oi;#ns;#Yi;#Ji;#Ki;#Qi;#Ft;#as;#gi;#p;#os;#Qt;#rs;#cs;#Zi;#ls;constructor(e,i,s,n,o){this.#p=e,this.#u=i,this.#os=s,this.#Ni=0,this.#ss=0,this.#Xi=0,this.#Ki=o,n instanceof ls?this.options=n:(this.options=new ls,this.options.load(n)),this.#Zi=i.retina.reduceFactor?W(this.options.life.delay??0)*r/i.retina.reduceFactor:1/0,this.position=this.#Ki??this.#pe(),this.name=this.options.name,this.fill=this.options.fill,this.#Yi=!this.options.life.wait,this.#ls=!1;const c=mt({},this.options.particles);if(c.move??={},c.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=We(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=We(this.#p,this.options.spawn.stroke.color)),this.#gi=!this.options.autoPlay,this.#as=c,this.#cs=this.#ds(),this.size=this.#cs.mode===t.PixelMode.percent?{width:this.#cs.width/a*this.#u.canvas.size.width,height:this.#cs.height/a*this.#u.canvas.size.height}:{width:this.#cs.width,height:this.#cs.height},this.#Qi=this.options.life.count??-1,this.#Ji=this.#Qi<=0,this.options.domId){const t=ct().getElementById(this.options.domId);t&&(this.#Ft=new MutationObserver(()=>{this.resize()}),this.#Qt=new ResizeObserver(()=>{this.resize()}),this.#Ft.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#Qt.observe(t))}const l=this.options.shape,d=this.#p.emitterShapeManager?.getShapeGenerator(l.type);d&&(this.#rs=d.generate(this.#u,this.position,this.size,this.fill,l.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#gi=!0,this.pause()}externalPlay(){this.#gi=!1,this.play()}async init(){await(this.#rs?.init())}pause(){this.#gi||(this.#ns=void 0)}play(){if(this.#gi)return;if(!(this.#Qi>0||this.#Ji)&&this.options.life.count||!(this.#Yi||this.#Xi>=(this.#Zi??0)))return;const t=this.#u;if(void 0===this.#ns){const e=W(this.options.rate.delay);this.#ns=t.retina.reduceFactor?e*r/t.retina.reduceFactor:1/0}(this.#Qi>0||this.#Ji)&&this.#is()}resize(){const e=this.#Ki,i=this.#u;this.position=e&&pt(e,i.canvas.size,O.origin)?e:this.#pe(),this.#cs=this.#ds(),this.size=this.#cs.mode===t.PixelMode.percent?{width:this.#cs.width/a*i.canvas.size.width,height:this.#cs.height/a*i.canvas.size.height}:{width:this.#cs.width,height:this.#cs.height},this.#rs?.resize(this.position,this.size)}update(t){if(this.#gi)return;const e=this.#u;this.#Yi&&(this.#Yi=!1,this.#Xi=this.#Zi??0,this.#ss=this.#ns??0),this.#ls||(this.#ls=!0,this.#hs(this.options.startCount)),void 0!==this.#oi&&(this.#Ni+=t.value,this.#Ni>=this.#oi&&(this.pause(),void 0!==this.#Zi&&(this.#Zi=void 0),this.#Ji||this.#Qi--,this.#Qi>0||this.#Ji?(this.position=this.#pe(),this.#rs?.resize(this.position,this.size),this.#Zi=e.retina.reduceFactor?W(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0):this.#us(),this.#Ni-=this.#oi,this.#oi=void 0)),void 0!==this.#Zi&&(this.#Xi+=t.value,this.#Xi>=this.#Zi&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#Xi-=this.#Zi,this.#Zi=void 0)),void 0!==this.#ns&&(this.#ss+=t.value,this.#ss>=this.#ns&&(this.#ps(),this.#ss-=this.#ns))}#pe(){const t=this.#u;if(this.options.domId){const e=ct().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*o)*s,y:(i.y+i.height*o)*s}}}return it({size:t.canvas.size,position:this.options.position})}#ds(){const e=this.#u;if(this.options.domId){const i=ct().getElementById(this.options.domId);if(i){const s=i.getBoundingClientRect();return{width:s.width*e.retina.pixelRatio,height:s.height*e.retina.pixelRatio,mode:t.PixelMode.precise}}}return this.options.size??(()=>{const e=new rs;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}#us(){this.#Ft?.disconnect(),this.#Ft=void 0,this.#Qt?.disconnect(),this.#Qt=void 0,this.#os(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#ps(){if(this.#gi)return;const t=W(this.options.rate.quantity);this.#hs(t)}#hs(t){const e=wt(this.#as)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:W(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,o=void 0===this.options.spawn.stroke?.opacity?1:W(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:W(this.options.spawn.stroke.width),c=this.#u.retina.reduceFactor,l=!!i,d=!!a,h=!!this.#rs,u=l||d,p=u||h,g=u?{h:y,s:v,l:b}:null,f=this.options.shape;for(let l=0;l<t*c;l++){const t=p?mt({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=o,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&g&&(this.spawnFillColor.h=this.#gs(i.h,this.spawnFillColor.h,g.h,3.6),this.spawnFillColor.s=this.#gs(i.s,this.spawnFillColor.s,g.s),this.spawnFillColor.l=this.#gs(i.l,this.spawnFillColor.l,g.l)),lc(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&g&&(this.spawnStrokeColor.h=this.#gs(a.h,this.spawnStrokeColor.h,g.h,3.6),this.spawnStrokeColor.s=this.#gs(a.s,this.spawnStrokeColor.s,g.s),this.spawnStrokeColor.l=this.#gs(a.l,this.spawnStrokeColor.l,g.l)),dc(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let c=this.position;if(this.#rs){const e=this.#rs.randomPosition();if(e){c=e.position;const i=f.replace;i.color&&e.color&&lc(t,e.color,i.opacity?e.opacity??1:1,!0)}else c=null}c&&this.#u.particles.addParticle(c,t)}}#is(){if(this.#gi)return;const t=void 0!==this.options.life.duration?W(this.options.life.duration):void 0;(this.#Qi>0||this.#Ji)&&void 0!==t&&t>0&&(this.#oi=t*r)}#gs(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const a=U(t.offset),o=W(this.options.rate.delay),c=n.retina.reduceFactor?o*r/n.retina.reduceFactor:1/0;return(e+W(t.speed)*n.fpsLimit/c+a*s)%i}}});t.AnimatableColor=de,t.AnimationOptions=ae,t.AnimationValueWithRandom=we,t.Background=he,t.BaseRange=Yt,t.Circle=Jt,t.ColorAnimation=re,t.Fill=fe,t.FullScreen=ue,t.HslAnimation=ce,t.Move=Ce,t.MoveAngle=me,t.MoveCenter=ye,t.MoveGravity=ve,t.MovePath=Me,t.OptionLoader=Qt,t.Options=Fe,t.OptionsColor=le,t.OutModes=Pe,t.Paint=ze,t.ParticlesBounce=Se,t.ParticlesBounceFactor=De,t.ParticlesDensity=Ie,t.ParticlesNumber=Ee,t.ParticlesNumberLimit=Te,t.ParticlesOptions=_e,t.RangedAnimationOptions=oe,t.RangedAnimationValueWithRandom=xe,t.Rectangle=Kt,t.ResizeEvent=pe,t.Shape=Re,t.Spin=ke,t.Stroke=Oe,t.ValueWithRandom=be,t.Vector=O,t.Vector3d=C,t.ZIndex=Le,t.alterHsl=ri,t.animate=V,t.areBoundsInside=gt,t.calcExactPositionOrRandomFromSize=st,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=it,t.calculateBounds=ft,t.cancelAnimation=B,t.canvasFirstIndex=0,t.canvasTag=f,t.checkDistance=J,t.circleBounce=vt,t.circleBounceDataFromParticle=yt,t.clamp=H,t.cloneStyle=Mt,t.collisionVelocity=tt,t.colorMix=Ze,t.colorToRgb=Ue,t.countOffset=1,t.decayOffset=1,t.deepExtend=mt,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=i,t.defaultDensityFactor=1,t.defaultFps=60,t.defaultFpsLimit=120,t.defaultLoops=0,t.defaultOpacity=1,t.defaultRatio=1,t.defaultReduceFactor=1,t.defaultRemoveQuantity=1,t.defaultRetryCount=0,t.defaultRgbMin=0,t.defaultTime=0,t.defaultTransform=l,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=K,t.deleteCount=1,t.double=2,t.doublePI=u,t.empty=0,t.executeOnSingleOrMultiple=bt,t.generatedAttribute=e,t.generatedFalse=g,t.generatedTrue=p,t.getDistance=Y,t.getDistanceSq=X,t.getDistances=N,t.getFullScreenStyle=Ct,t.getHslAnimationFromHsl=si,t.getHslFromAnimation=ii,t.getItemMapFromInitializer=Dt,t.getItemsFromInitializer=zt,t.getLinkColor=ti,t.getLinkRandomColor=ei,t.getLogger=Lt,t.getParticleBaseVelocity=Z,t.getParticleDirectionAngle=Q,t.getPosition=xt,t.getRandom=A,t.getRandomFn=function(){return L},t.getRandomInRange=F,t.getRandomRgbColor=Je,t.getRangeMax=$,t.getRangeMin=j,t.getRangeValue=W,t.getStyleFromHsl=Qe,t.getStyleFromRgb=Ke,t.hMax=y,t.hMin=0,t.hPhase=60,t.half=o,t.hslToRgb=Ne,t.hslToRgbFloat=Xe,t.hslaToRgba=Ye,t.identity=1,t.initPjs=Cr,t.inverseFactorNumerator=1,t.isArray=T,t.isBoolean=z,t.isFunction=function(t){return"function"==typeof t},t.isInArray=ht,t.isNull=E,t.isNumber=S,t.isObject=I,t.isPointInside=pt,t.isString=D,t.itemFromArray=ut,t.itemFromSingleOrMultiple=wt,t.lFactor=1,t.lMax=b,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){if(void 0!==i){const s=e;if("__proto__"===s||"constructor"===s||"prototype"===s)return;const n=t,a=Object.prototype.hasOwnProperty.call(n,s)?n[s]:{};n[s]=mt(a,i)}},t.loadLazyProperty=se,t.loadMinIndex=0,t.loadNestedProperty=ie,t.loadOptionProperty=ne,t.loadOptions=Zt,t.loadParticlesOptions=Ae,t.loadProperty=te,t.loadRandomFactor=1e4,t.loadRangeProperty=ee,t.manageListener=Ot,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=q,t.none=0,t.one=1,t.originPoint=c,t.parseAlpha=nt,t.percentDenominator=a,t.phaseNumerator=1,t.quarter=w,t.randomColorValue=d,t.randomInRangeValue=U,t.rangeColorToHsl=We,t.rangeColorToRgb=qe,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=m,t.rgbToHsl=je,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=ct,t.safeMatchMedia=lt,t.safeMutationObserver=dt,t.setAnimationFunctions=function(t,e){_.nextFrame=t,_.cancel=e},t.setLogger=function(t){t.debug&&(Rt.debug=Et(t.debug)),t.error&&(Rt.error=Et(t.error)),t.info&&(Rt.info=Et(t.info)),t.log&&(Rt.log=Et(t.log)),t.trace&&(Rt.trace=Et(t.trace)),t.verbose&&(Rt.verbose=Et(t.verbose)),t.warning&&(Rt.warning=Et(t.warning))},t.setRandom=function(t=Math.random){L=t},t.setRangeValue=G,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return He(t,e)?.a},t.stringToRgb=$e,t.threeQuarter=x,t.triple=3,t.tryCountIncrement=1,t.tsParticles=ci,t.updateColor=oi,t.updateColorValue=ai,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{initPjs:(globalThis.__tsParticlesInternals.bundles.pjs||{}).initPjs}),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.pjs=t.__tsParticlesInternals.bundles.pjs||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",a=100,o=.5,r=1e3,c={x:0,y:0,z:0},l={a:1,b:0,c:0,d:1},d="random",h="mid",u=2*Math.PI,p="true",g="false",f="canvas",m=255,y=360,v=100,b=100,w=.25,x=.75,M=400;var P;function k(t){return"z"in t?t.z:c.z}t.MoveDirection=void 0,(P=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",P.bottomLeft="bottom-left",P.bottomRight="bottom-right",P.left="left",P.none="none",P.right="right",P.top="top",P.topLeft="top-left",P.topRight="top-right",P.outside="outside",P.inside="inside";class C{x;y;z;constructor(t=c.x,e=c.y,i=c.z){this.x=t,this.y=e,this.z=i}static get origin(){return C.create(c.x,c.y,c.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 C.create(t.x,t.y,k(t))}static create(t,e,i){return"number"==typeof t?new C(t,e??c.y,i??c.z):new C(t.x,t.y,k(t))}add(t){return C.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 C.clone(this)}div(t){return C.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return C.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 C.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),c.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=k(t)}sub(t){return C.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 O extends C{constructor(t=c.x,e=c.y){super(t,e,c.z)}static get origin(){return O.create(c.x,c.y)}static clone(t){return O.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new O(t,e??c.y):new O(t.x,t.y)}}function z(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 E(t){return null==t}const R=Math.PI/180;let L=Math.random;const _={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return B(L(),0,1-Number.EPSILON)}function F(t,e){return A()*(e-t)+t}function V(t){return _.nextFrame(t)}function H(t){_.cancel(t)}function B(t,e,i){return Math.min(Math.max(t,e),i)}function q(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function U(t){const e=$(t);let i=j(t);return e===i&&(i=0),F(i,e)}function W(t){return S(t)?t:U(t)}function j(t){return S(t)?t:t.min}function $(t){return S(t)?t:t.max}function N(t,e){if(t===e||void 0===e&&S(t))return t;const i=j(t),s=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:N(i,s)}function G(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function 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 J(t,e,i){return X(t,e)<=i*i}function K(t){return t*R}function Q(e,i,s){if(S(e))return K(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*x;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*x;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 Z(t){const e=O.origin;return e.length=1,e.angle=t,e}function tt(t,e,i,s){return O.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 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})}function st(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}function nt(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1}var at,ot;t.OutModeDirection=void 0,(at=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",at.left="left",at.right="right",at.top="top",t.PixelMode=void 0,(ot=t.PixelMode||(t.PixelMode={})).precise="precise",ot.percent="percent";function rt(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function ct(){return globalThis.document}function lt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function dt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function ht(t,e){return t===e||T(e)&&e.includes(t)}function ut(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(A()*t.length)]}function pt(t,e,i,s,n){return gt(ft(t,s??0),e,i,n)}function gt(e,i,s,n){let a=!0;return n&&n!==t.OutModeDirection.bottom||(a=e.top<i.height+s.x),!a||n&&n!==t.OutModeDirection.left||(a=e.right>s.x),!a||n&&n!==t.OutModeDirection.right||(a=e.left<i.width+s.y),!a||n&&n!==t.OutModeDirection.top||(a=e.bottom>s.y),a}function ft(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function mt(t,...e){for(const i of e){if(E(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(rt(t))continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if(rt(s))continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>mt(void 0,t)):mt(e[s],n)}}return t}function yt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:O.create(W(t.options.bounce.horizontal.value),W(t.options.bounce.vertical.value))}}function vt(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=G(a,n);if(i*o+s*r<0)return;const c=-Math.atan2(r,o),l=t.mass,d=e.mass,h=t.velocity.rotate(c),u=e.velocity.rotate(c),p=tt(h,u,l,d),g=tt(u,h,l,d),f=p.rotate(-c),m=g.rotate(-c);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=m.x*e.factor.x,e.velocity.y=m.y*e.factor.y}function bt(t,e){return T(t)?t.map((t,i)=>e(t,i)):e(t,0)}function wt(t,e,i){return T(t)?ut(t,e,i):t}function xt(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 Mt(t){const e=ct().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||E(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 Pt,kt;function Ct(t){if(Pt!==t||!kt){Pt=t;const e=ct().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)}kt=e}return kt}function Ot(t,e,i,s,n){if(s){let s={passive:!0};z(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 Dt(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 St{#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 It;t.EventType=void 0,(It=t.EventType||(t.EventType={})).configAdded="configAdded",It.containerInit="containerInit",It.particlesSetup="particlesSetup",It.containerStarted="containerStarted",It.containerStopped="containerStopped",It.containerDestroyed="containerDestroyed",It.containerPaused="containerPaused",It.containerPlay="containerPlay",It.containerBuilt="containerBuilt",It.particleAdded="particleAdded",It.particleDestroyed="particleDestroyed",It.particleRemoved="particleRemoved";class Tt{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;#c=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 Dt(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 Dt(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.#c);try{for(const t of this.#i)await this.#l(t,this.#a,this.#i)}finally{this.#c.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.#l(e,this.#a,this.#i):this.#c.add(e)}async#l(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const Et=t=>(...e)=>{t(...e)},Rt={debug:Et(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:Et(console.info),log:Et(console.log),trace:Et(console.trace),verbose:Et(console.log),warning:Et(console.warn)};function Lt(){return Rt}const _t="100%";class At{pluginManager=new Tt(this);#d=[];#h=new St;#o=!1;get items(){return this.#d}get version(){return"4.4.0"}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 Qr}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=wt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Lt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,c=wt(r,a),{items:l}=this,d=l.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:c});if(d>=0){const t=this.item(d),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),l.splice(d,e,h)}else l.push(h);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=ct();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=ct();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return 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 Ft,Vt,Ht,Bt,qt,Ut,Wt,jt,$t,Nt,Gt,Xt,Yt;!function(t){t.circle="circle",t.rectangle="rectangle"}(Ft||(Ft={}));class Jt{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 Kt extends Jt{radius;constructor(t,e,i){super(t,e,Ft.circle),this.radius=i}contains(t){return J(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 Kt||t.type===Ft.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Qt||t.type===Ft.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(n-i,2)+Math.pow(a-o,2)<=s**2||n<=s+i&&a<=s+o||n<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Qt extends Jt{size;constructor(t,e,i,s){super(t,e,Ft.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof Kt)return t.intersects(this);if(!(t instanceof Qt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,o=a.width,r=a.height;return n.x<s.x+e&&n.x+o>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}t.RotateDirection=void 0,(Vt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Vt.counterClockwise="counter-clockwise",Vt.random="random",t.AnimationMode=void 0,(Ht=t.AnimationMode||(t.AnimationMode={})).auto="auto",Ht.increase="increase",Ht.decrease="decrease",Ht.random="random",t.HdrMode=void 0,(Bt=t.HdrMode||(t.HdrMode={})).standard="standard",Bt.natural="natural",Bt.vivid="vivid",Bt.cinematic="cinematic",Bt.dynamic="dynamic",t.LimitMode=void 0,(qt=t.LimitMode||(t.LimitMode={})).delete="delete",qt.wait="wait",t.OutMode=void 0,(Ut=t.OutMode||(t.OutMode={})).bounce="bounce",Ut.none="none",Ut.out="out",Ut.destroy="destroy",Ut.split="split",t.AlterType=void 0,(Wt=t.AlterType||(t.AlterType={})).darken="darken",Wt.enlighten="enlighten",t.DestroyType=void 0,(jt=t.DestroyType||(t.DestroyType={})).none="none",jt.max="max",jt.min="min",t.GradientType=void 0,($t=t.GradientType||(t.GradientType={})).linear="linear",$t.radial="radial",$t.random="random",t.ParticleOutType=void 0,(Nt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Nt.inside="inside",Nt.outside="outside",t.StartValueType=void 0,(Gt=t.StartValueType||(t.StartValueType={})).max="max",Gt.min="min",Gt.random="random",t.AnimationStatus=void 0,(Xt=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",Xt.decreasing="decreasing",t.DrawLayer=void 0,(Yt=t.DrawLayer||(t.DrawLayer={}))[Yt.BackgroundElement=0]="BackgroundElement",Yt[Yt.BackgroundDraw=1]="BackgroundDraw",Yt[Yt.BackgroundMask=2]="BackgroundMask",Yt[Yt.CanvasSetup=3]="CanvasSetup",Yt[Yt.PluginContent=4]="PluginContent",Yt[Yt.Particles=5]="Particles",Yt[Yt.CanvasCleanup=6]="CanvasCleanup",Yt[Yt.Foreground=7]="Foreground";class Zt{load(t){E(t)||this.doLoad(t)}}function te(t,...e){for(const i of e)t.load(i)}function ee(t,e,i){void 0!==i&&(t[e]=i)}function ie(t,e,i){void 0!==i&&(t[e]=N(i))}function se(t,e,i){void 0!==i&&t[e].load(i)}function ne(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function ae(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 oe extends Zt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){ie(this,"count",t.count),ee(this,"enable",t.enable),ie(this,"speed",t.speed),ie(this,"decay",t.decay),ie(this,"delay",t.delay),ee(this,"sync",t.sync)}}class re extends oe{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),ee(this,"mode",t.mode),ee(this,"startValue",t.startValue)}}class ce extends oe{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),ee(this,"max",t.max),ee(this,"min",t.min),ie(this,"offset",t.offset)}}class le extends Zt{h=new ce(0,y);l=new ce(0,b);s=new ce(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class de extends Zt{value="";static create(t,e){const i=new de;return i.load(t),void 0!==e&&(D(e)||T(e)?i.load({value:e}):i.load(e)),i}doLoad(t){E(t.value)||(this.value=t.value)}}class he extends de{animation=new le;static create(t,e){const i=new he;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 ue extends Zt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new de,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=de.create(this.color,t.color)),ee(this,"element",t.element),ee(this,"draw",t.draw),ee(this,"image",t.image),ee(this,"position",t.position),ee(this,"repeat",t.repeat),ee(this,"size",t.size),ee(this,"opacity",t.opacity)}}class pe extends Zt{enable=!0;zIndex=0;doLoad(t){ee(this,"enable",t.enable),ee(this,"zIndex",t.zIndex)}}class ge extends Zt{enable=!0;mode=t.HdrMode.standard;peakNits=400;doLoad(e){if(void 0!==e.enable&&!z(e.enable))throw new Error(`Invalid HDR "enable" value: expected a boolean, got "${String(e.enable)}"`);if(void 0!==e.mode&&("string"!=typeof e.mode||!Object.values(t.HdrMode).includes(e.mode)))throw new Error(`Invalid HDR "mode" value: expected one of ${Object.values(t.HdrMode).join(", ")}, got "${i=e.mode,String(i)}"`);var i;if(void 0!==e.peakNits&&(!S(e.peakNits)||!Number.isFinite(e.peakNits)||e.peakNits<=0))throw new Error(`Invalid HDR "peakNits" value: expected a positive number, got "${String(e.peakNits)}"`);ee(this,"enable",e.enable),ee(this,"mode",e.mode),ee(this,"peakNits",e.peakNits)}}class fe extends Zt{delay=.5;enable=!0;doLoad(t){ee(this,"delay",t.delay),ee(this,"enable",t.enable)}}class me extends Zt{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]=mt(this.options[t]??{},i))}ee(this,"close",t.close),ee(this,"type",t.type)}}class ye extends Zt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=he.create(this.color,t.color)),ee(this,"enable",t.enable),ie(this,"opacity",t.opacity)}}class ve extends Zt{offset=0;value=90;doLoad(t){ie(this,"offset",t.offset),ie(this,"value",t.value)}}class be extends Zt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){ee(this,"x",t.x),ee(this,"y",t.y),ee(this,"mode",t.mode),ee(this,"radius",t.radius)}}class we extends Zt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){ie(this,"acceleration",t.acceleration),ee(this,"enable",t.enable),ee(this,"inverse",t.inverse),ie(this,"maxSpeed",t.maxSpeed)}}class xe extends Zt{value=0;doLoad(t){E(t.value)||(this.value=N(t.value))}}class Me extends xe{animation=new oe;doLoad(t){super.doLoad(t),se(this,"animation",t.animation)}}class Pe extends Me{animation=new re}class ke extends Zt{clamp=!0;delay=new xe;enable=!1;generator;options={};doLoad(t){ee(this,"clamp",t.clamp),this.delay.load(t.delay),ee(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=mt(this.options,t.options))}}class Ce extends Zt{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 Oe extends Zt{acceleration=0;enable=!1;position;doLoad(t){ie(this,"acceleration",t.acceleration),ee(this,"enable",t.enable),t.position&&(this.position=mt({},t.position))}}class ze extends Zt{angle=new ve;center=new be;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new we;outModes=new Ce;path=new ke;random=!1;size=!1;speed=2;spin=new Oe;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),ie(this,"decay",t.decay),ee(this,"direction",t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),ie(this,"drift",t.drift),ee(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),ee(this,"random",t.random),ee(this,"size",t.size),ie(this,"speed",t.speed),this.spin.load(t.spin),ee(this,"straight",t.straight),ee(this,"vibrate",t.vibrate),ee(this,"warp",t.warp)}}class De extends Zt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=he.create(this.color,t.color)),ie(this,"width",t.width),ie(this,"opacity",t.opacity)}}class Se extends Zt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=he.create(this.color,t.color)),ne(this,"fill",t.fill,()=>new ye),ne(this,"stroke",t.stroke,()=>new De)}}class Ie extends xe{value=1}class Te extends Zt{horizontal=new Ie;vertical=new Ie;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Ee extends Zt{enable=!1;height=1080;width=1920;doLoad(t){ee(this,"enable",t.enable),ee(this,"width",t.width),ee(this,"height",t.height)}}class Re extends Zt{mode=t.LimitMode.delete;value=0;doLoad(t){ee(this,"mode",t.mode),ee(this,"value",t.value)}}class Le extends Zt{density=new Ee;limit=new Re;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),ee(this,"value",t.value)}}class _e extends Zt{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]=mt(this.options[t]??{},i))}ee(this,"close",t.close),ee(this,"type",t.type)}}class Ae extends xe{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),ee(this,"opacityRate",t.opacityRate),ee(this,"sizeRate",t.sizeRate),ee(this,"velocityRate",t.velocityRate)}}class Fe extends Zt{bounce=new Te;effect=new me;groups={};move=new ze;number=new Le;paint;palette;reduceDuplicates=!1;shape=new _e;zIndex=new Ae;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Se,this.paint.color=new he,this.paint.color.value="#fff",this.paint.fill=new ye,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]=mt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(T(e)?this.paint=bt(e,t=>{const e=new Se;return e.load(t),e}):T(this.paint)?(this.paint=new Se,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 Ve(t,e,...i){const s=new Fe(t,e);return te(s,...i),s}class He extends Zt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr;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 ue,this.fullScreen=new pe,this.hdr=new ge,this.particles=Ve(this.#p,this.#u),this.resize=new fe}doLoad(e){void 0!==e.preset&&(this.preset=e.preset,bt(this.preset,t=>{this.#f(t)})),void 0!==e.palette&&(this.palette=e.palette,this.#g(this.palette)),ee(this,"autoPlay",e.autoPlay),ee(this,"clear",e.clear),ee(this,"key",e.key),ee(this,"name",e.name),ie(this,"delay",e.delay),ee(this,"detectRetina",e.detectRetina),ie(this,"duration",e.duration),ee(this,"fpsLimit",e.fpsLimit);const i=e.hdr;z(i)?(this.hdr.enable=i,this.hdr.mode=t.HdrMode.standard,this.hdr.peakNits=400):this.hdr.load(i),ee(this,"pauseOnBlur",e.pauseOnBlur),ee(this,"pauseOnOutsideViewport",e.pauseOnOutsideViewport),ee(this,"zLayers",e.zLayers),this.background.load(e.background);const s=e.fullScreen;z(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(e.particles),this.resize.load(e.resize),this.style=mt(this.style,e.style),ee(this,"smooth",e.smooth),this.#p.plugins.forEach(t=>{t.loadOptions(this.#u,this,e)})}#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 Be=new Map,qe=1.15,Ue=1.05,We=.2126,je=.7152,$e=.0722;function Ne(t,e){let i=Be.get(t);return i||(i=e(),Be.size>2e3&&Be.clear(),Be.set(t,i)),i}function Ge(t){return B(t*(2.51*t+.03)/(t*(2.43*t+.59)+.14),0,1)}function Xe(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ye(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055}function Je(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Ke(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return Qe(t,n.value,i,s);if(T(n.value)){const e=ut(n.value,i,s);if(!e)return;return Ke(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Qe(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return n.value===d?oi():ei(t,n.value);if(T(n.value)){const e=ut(n.value,i,s);if(!e)return;return Qe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ze(t,e,i,s=!0){const n=Ke(t,e,i,s);return n?ti(n):void 0}function ti(t){const e=t.r/m,i=t.g/m,s=t.b/m,n=Math.max(e,i,s),a=Math.min(e,i,s),r={h:0,l:(n+a)*o,s:0};return n!==a&&(r.s=r.l<o?(n-a)/(n+a):(n-a)/(2-n-a),r.h=e===n?(i-s)/(n-a):i===n?2+(s-e)/(n-a):4+(e-i)/(n-a)),r.l*=b,r.s*=v,r.h*=60,r.h<0&&(r.h+=y),r.h>=y&&(r.h-=y),r}function ei(t,e){return Je(t,e)}function ii(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 si(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/y,a=i/v,r=s/b;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const c=r<o?r*(1+a):r+a-r*a,l=2*r-c,d=1/3,h=Math.min(m,m*ii(l,c,n+d)),u=Math.min(m,m*ii(l,c,n)),p=Math.min(m,m*ii(l,c,n-d));return{r:Math.round(h),g:Math.round(u),b:Math.round(p)}}function ni(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/y,a=i/v,r=s/b;if(0===i){const t=r*m;return{r:t,g:t,b:t}}const c=r<o?r*(1+a):r+a-r*a,l=2*r-c,d=1/3;return{r:Math.min(m,m*ii(l,c,n+d)),g:Math.min(m,m*ii(l,c,n)),b:Math.min(m,m*ii(l,c,n-d))}}function ai(t){const e=si(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function oi(t,e){const i=t??0;if(e)return{r:F(i,m),g:F(i,m),b:F(i,m)};const s=()=>Math.floor(F(i,256));return{b:s(),g:s(),r:s()}}function ri(e,i,s,n,a){const o=i?4:2,r=s??1;return Ne(i?`rgb-${e.r.toFixed(o)}-${e.g.toFixed(o)}-${e.b.toFixed(o)}-hdr-${r.toString()}-${(n??M).toString()}-${a??t.HdrMode.standard}`:`rgb-${e.r.toFixed(o)}-${e.g.toFixed(o)}-${e.b.toFixed(o)}-sdr-${r.toString()}`,()=>i?function(e,i,s=400,n=t.HdrMode.standard){const a=s/203,o=function(e,i,s,n){const a=e.r/m,o=e.g/m,r=e.b/m;if(n!==t.HdrMode.natural&&n!==t.HdrMode.vivid&&n!==t.HdrMode.cinematic&&n!==t.HdrMode.dynamic)return{b:r,g:o,r:a};const c=Math.max(1,i),l=We*a+je*o+$e*r,d=function(t,e,i){if(t<=i)return Ge(t);const s=t+(t-i)*(e-1);return Ge(s)}(l,i,s),h=l>0?d/l:1;return function(e,i,s,n,a){switch(n){case t.HdrMode.vivid:{const t=(e+i+s)/3;return{b:B(B(t+(s-t)*qe,0,a)*Ue,0,a),g:B(B(t+(i-t)*qe,0,a)*Ue,0,a),r:B(B(t+(e-t)*qe,0,a)*Ue,0,a)}}case t.HdrMode.cinematic:{const t=1.05*e,n=.95*s,o=(t+i+n)/3;return{b:B(o+1.1*(n-o),0,a),g:B(o+1.1*(i-o),0,a),r:B(o+1.1*(t-o),0,a)}}case t.HdrMode.dynamic:{const t=We*e+je*i+$e*s,n=Math.min(1,2*t),o=1-n,r=(e+i+s)/3,c=B(r+(e-r)*qe,0,a)*Ue,l=B(r+(i-r)*qe,0,a)*Ue,d=B(r+(s-r)*qe,0,a)*Ue;return{b:B(s*o+d*n,0,a),g:B(i*o+l*n,0,a),r:B(e*o+c*n,0,a)}}case t.HdrMode.standard:case t.HdrMode.natural:default:return{b:s,g:i,r:e}}}(B(a*h,0,c),B(o*h,0,c),B(r*h,0,c),n,c)}(e,a,.18,n);return`color(display-p3 ${o.r.toString()} ${o.g.toString()} ${o.b.toString()} / ${(i??1).toString()})`}(e,s,n,a):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(e,s))}function ci(e,i,s,n,a){const o=i?4:2,r=s??1;return Ne(i?`hsl-${e.h.toFixed(o)}-${e.s.toFixed(o)}-${e.l.toFixed(o)}-hdr-${r.toString()}-${(n??M).toString()}-${a??t.HdrMode.standard}`:`hsl-${e.h.toFixed(o)}-${e.s.toFixed(o)}-${e.l.toFixed(o)}-sdr-${r.toString()}`,()=>i?ri(ni(e),!0,s,n,a):`hsla(${e.h.toString()}, ${e.s.toString()}%, ${e.l.toString()}%, ${r.toString()})`)}function li(t,e,i,s,n){let a=t,o=e;if("r"in a||(a=n?ni(t):si(t)),"r"in o||(o=n?ni(e):si(e)),n){const t={b:Xe(a.b/m),g:Xe(a.g/m),r:Xe(a.r/m)},e={b:Xe(o.b/m),g:Xe(o.g/m),r:Xe(o.r/m)},n=i+s;return{b:Ye((t.b*i+e.b*s)/n)*m,g:Ye((t.g*i+e.g*s)/n)*m,r:Ye((t.r*i+e.r*s)/n)*m}}return{b:q(a.b,o.b,i,s),g:q(a.g,o.g,i,s),r:q(a.r,o.r,i,s)}}function di(t,e,i,s){if(i===d)return oi();if(i!==h)return i;{const i=t.getFillColor()??t.getStrokeColor(),n=e?.getFillColor()??e?.getStrokeColor();if(i&&n&&e)return li(i,n,t.getRadius(),e.getRadius(),s);{const t=i??n;if(t)return si(t)}}}function hi(t,e,i,s){const n=D(e)?e:e.value;return n===d?s?Ke(t,{value:n}):i?d:h:n===h?h:Ke(t,{value:n})}function ui(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function pi(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:y},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:b}};return e&&(gi(s.h,e.h,i),gi(s.s,e.s,i),gi(s.l,e.l,i)),s}function gi(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=N(i.offset)):e.velocity=0}function fi(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?U(e.offset):0,o=(e.velocity??0)*s.factor+3.6*a,r=e.decay??1,c=e.max,l=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=o,e.value<l&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=o,e.value>c&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=c)),e.velocity&&1!==r&&(e.velocity*=r),e.value=B(e.value,l,c)}function mi(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;fi(s,!1,e),fi(n,!0,e),fi(a,!0,e)}function yi(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const vi=function(){const t=globalThis.tsParticles;return t?.pluginManager?t:new At}();class bi{#u;static init(t){const e=new bi,i=t.selector;if(!i)throw new Error("No selector provided");const s=ct().querySelector(i);if(!s)throw new Error("No element found for selector");return(async n=>{await n.load({element:s,id:i.replace(".","").replace("!",""),options:{fullScreen:{enable:!1},particles:{color:{value:t.color??"!000000"},links:{color:"random",distance:t.minDistance??120,enable:t.connectParticles??!1},move:{enable:!0,speed:t.speed??.5},number:{value:t.maxParticles??100},size:{value:{min:1,max:t.sizeVariations??3}}},responsive:t.responsive?.map(e=>({maxWidth:e.breakpoint,options:{particles:{color:{value:e.options?.color},links:{distance:e.options?.minDistance,enable:e.options?.connectParticles},number:{value:t.maxParticles},move:{enable:!0,speed:e.options?.speed},size:{value:e.options?.sizeVariations}}}}))}}).then(t=>{e.#u=t})})(vi),e}destroy(){const t=this.#u;t?.destroy()}pauseAnimation(){const t=this.#u;t?.pause()}resumeAnimation(){const t=this.#u;t?.play()}}const wi={particles:{number:{value:400,density:{enable:!0,value_area:800}},color:{value:"#fff"},shape:{type:"circle",stroke:{width:0,color:"#ff0000"},polygon:{nb_sides:5},image:{src:"",width:100,height:100}},opacity:{value:1,random:!1,anim:{enable:!1,speed:2,opacity_min:0,sync:!1}},size:{value:20,random:!1,anim:{enable:!1,speed:20,size_min:0,sync:!1}},line_linked:{enable:!0,distance:100,color:"#fff",opacity:1,width:1},move:{enable:!0,speed:2,direction:"none",random:!1,straight:!1,out_mode:"out",bounce:!1,attract:{enable:!1,rotateX:3e3,rotateY:3e3}}},interactivity:{detect_on:"canvas",events:{onhover:{enable:!0,mode:"grab"},onclick:{enable:!0,mode:"push"},resize:!0},modes:{grab:{distance:100,line_linked:{opacity:1}},bubble:{distance:200,size:80,duration:.4,opacity:1,speed:3},repulse:{distance:200,duration:.4},push:{particles_nb:4},remove:{particles_nb:2}}},retina_detect:!1};class xi{enable=!1;mode=[];load(t){E(t)||(ee(this,"enable",t.enable),ee(this,"mode",t.mode))}}var Mi,Pi,ki;!function(t){t.circle="circle",t.rectangle="rectangle"}(Mi||(Mi={}));class Ci{enable=!1;mode=[];selectors=[];type=Mi.circle;load(t){E(t)||(ee(this,"selectors",t.selectors),ee(this,"enable",t.enable),ee(this,"mode",t.mode),ee(this,"type",t.type))}}class Oi{enable=!1;mode=[];load(t){E(t)||(ee(this,"enable",t.enable),ee(this,"mode",t.mode))}}class zi{onClick=new xi;onDiv=new Ci;onHover=new Oi;load(t){if(E(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=bt(e,t=>{const e=new Ci;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(Pi||(Pi={}));class Di{#u;#p;constructor(t,e){this.#p=t,this.#u=e}load(t){if(E(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 Si{detectsOn=Pi.window;events=new zi;modes;constructor(t,e){this.modes=new Di(t,e)}load(t){if(E(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class Ii{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return ec});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new Si(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=mt({},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 Ti{type=ki.external;container;constructor(t){this.container=t}}class Ei{type=ki.particles;container;constructor(t){this.container=t}}const Ri="pointerdown",Li="pointerup",_i="pointerleave",Ai="pointermove",Fi="touchstart",Vi="touchend",Hi="touchmove",Bi="touchcancel";function qi(t,e){if(T(t))return t.find((t,i)=>e(t,i));return e(t,0)?t:void 0}function Ui(t,e){return!!qi(e,e=>e.enable&&ht(t,e.mode))}function Wi(t,e,i){bt(e,e=>{const s=e.mode;e.enable&&ht(t,s)&&function(t,e){const i=t.selectors;bt(i,i=>{e(i,t)})}(e,i)})}function ji(t,e){if(e&&t)return qi(t,t=>function(t,e){const i=bt(e,e=>t.matches(e));return T(i)?i.some(t=>t):i}(e,t.selectors))}function $i(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}class Ni{count;delay;duration;wait=!1;load(t){E(t)||(ee(this,"count",t.count),ie(this,"delay",t.delay),ie(this,"duration",t.duration),ee(this,"wait",t.wait))}}class Gi{mass=0;radius=0;load(t){E(t)||(ee(this,"mass",t.mass),ee(this,"radius",t.radius))}}class Xi extends xe{density=5;limit=new Gi;value=50;load(t){E(t)||(super.load(t),ee(this,"density",t.density),S(t.limit)?this.limit.radius=t.limit:this.limit.load(t.limit))}}class Yi{color;destroy;draggable;life;name;opacity;orbits;position;size;constructor(){this.color=new de,this.color.value="#000000",this.draggable=!1,this.opacity=1,this.destroy=!0,this.orbits=!1,this.life=new Ni,this.size=new Xi}load(t){E(t)||(void 0!==t.color&&(this.color=de.create(this.color,t.color)),ee(this,"draggable",t.draggable),void 0!==t.life&&this.life.load(t.life),this.name=t.name,ee(this,"opacity",t.opacity),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=N(t.position.x)),void 0!==t.position.y&&(this.position.y=N(t.position.y))),void 0!==t.size&&this.size.load(t.size),ee(this,"destroy",t.destroy),ee(this,"orbits",t.orbits))}}const Ji="absorbers";class Ki extends Ti{handleClickMode;maxDistance;#m=!1;#y;#v;constructor(t,e){super(t),this.maxDistance=0,this.#v=e,this.#v.initContainer(t),this.handleClickMode=(t,i)=>{const s=this.container,n=s.actualOptions.interactivity.modes.absorbers;if(!n||t!==Ji)return;const{clickPosition:a}=i.mouse;if(a){if(e.getArray(this.container).some(t=>Y(t.position,a)<t.size))return}const o=ut(n)??new Yi;this.#v.addAbsorber(s,o,a)}}clear(){}init(){}interact(t,e){for(const i of this.container.particles.filter(e=>this.isEnabled(t,e)))for(const s of this.#v.getArray(this.container)){if(s.options.draggable){const e=t.mouse;if(e.clicking&&e.downPosition){Y(s.position,e.downPosition)<=s.size&&(this.#m=!0,this.#y=s)}else this.#m=!1,this.#y=void 0;this.#m&&this.#y==s&&e.position&&(s.position.x=e.position.x,s.position.y=e.position.y)}if(s.attract(i,e),i.destroyed)break}}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity).events;return!(!s.clickPosition||!n.onClick.enable)&&ht(Ji,n.onClick.mode)}loadModeOptions(t,...e){t.absorbers??=[];for(const i of e)if(i)if(T(i.absorbers))for(const e of i.absorbers){const i=new Yi;i.load(e),t.absorbers.push(i)}else{const e=new Yi;e.load(i.absorbers),t.absorbers.push(e)}}reset(){}}const Qi=new WeakMap;function Zi(t){const e=t.pluginManager;let i=Qi.get(e);return i||(i=Promise.resolve().then(function(){return ic}).then(({AbsorbersInstancesManager:t})=>new t(e)).catch(t=>{throw Qi.delete(e),t}),Qi.set(e,i)),i}class ts{id="absorbers";#v;constructor(t){this.#v=t}async getPlugin(t){const{AbsorbersPluginInstance:e}=await Promise.resolve().then(function(){return sc});return new e(t,this.#v)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.absorbers&&(e.absorbers=bt(i.absorbers,t=>{const e=new Yi;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.absorbers;return T(e)?!!e.length:!!e}}async function es(t){await async function(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{const e=t.pluginManager,i=await Zi(t);e.addPlugin(new ts(i))})}(t),await async function(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{const e=t.pluginManager,i=await Zi(t);$i(t),e.addInteractor?.("externalAbsorbers",t=>Promise.resolve(new Ki(t,i)))})}(t)}class is{bottom;left;right;top;load(t){E(t)||(ie(this,"bottom",t.bottom),ie(this,"left",t.left),ie(this,"right",t.right),ie(this,"top",t.top))}}var ss;!function(t){t.explode="explode",t.none="none",t.split="split"}(ss||(ss={}));class ns{maxSizeFactor=3;speed=2;load(t){E(t)||(ee(this,"maxSizeFactor",t.maxSizeFactor),ee(this,"speed",t.speed))}}class as extends xe{value=3}class os extends xe{value={min:4,max:9}}class rs{count=1;factor=new as;fillColor;fillColorOffset;particles;rate=new os;sizeOffset=!0;strokeColor;strokeColorOffset;load(t){E(t)||(void 0!==t.fillColor&&(this.fillColor=de.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=de.create(this.strokeColor,t.strokeColor)),ee(this,"count",t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=bt(t.particles,t=>mt({},t)),ee(this,"sizeOffset",t.sizeOffset),t.fillColorOffset&&(this.fillColorOffset=this.fillColorOffset??{},void 0!==t.fillColorOffset.h&&(this.fillColorOffset.h=t.fillColorOffset.h),void 0!==t.fillColorOffset.s&&(this.fillColorOffset.s=t.fillColorOffset.s),void 0!==t.fillColorOffset.l&&(this.fillColorOffset.l=t.fillColorOffset.l)),t.strokeColorOffset&&(this.strokeColorOffset=this.strokeColorOffset??{},void 0!==t.strokeColorOffset.h&&(this.strokeColorOffset.h=t.strokeColorOffset.h),void 0!==t.strokeColorOffset.s&&(this.strokeColorOffset.s=t.strokeColorOffset.s),void 0!==t.strokeColorOffset.l&&(this.strokeColorOffset.l=t.strokeColorOffset.l)))}}let cs=class{bounds=new is;explode=new ns;mode=ss.none;split=new rs;load(t){E(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.explode.load(t.explode),this.split.load(t.split))}};function ls(t,e,i,s){return t&&s?function(t,e){const i=W(e.h??0),s=W(e.s??0),n=W(e.l??0),a=(t.h+i)%360,o=Math.max(0,Math.min(100,t.s+s)),r=Math.max(0,Math.min(100,t.l+n));return he.create(void 0,{value:{hsl:{h:a<0?a+360:a,s:o,l:r}}})}(s,t):e?he.create(void 0,e):i?he.create(void 0,i):s?function(t){return he.create(void 0,{value:{hsl:t}})}(s):void 0}function ds(e,i,s,n){const a=s.options.destroy;if(!a)return;const o=a.split,r=Ve(e,i,s.options),c=wt(o.fillColor),l=wt(o.strokeColor),d=s.getFillColor(),h=s.getStrokeColor();r.move.load({center:{x:s.position.x,y:s.position.y,mode:t.PixelMode.precise}});const u=1/W(o.factor.value),p=r.size;p&&(S(p.value)?p.value*=u:(p.value.min*=u,p.value.max*=u)),r.load(n);const g=wt(r.paint),f=g?.fill,m=g?.stroke,y=ls(o.fillColorOffset,c,f?.color,d),v=ls(o.strokeColorOffset,l,m?.color,h);y&&f&&(f.color=y),v&&m&&(m.color=v);const b=o.sizeOffset?N(-s.size.value,s.size.value):0,w={x:s.position.x+U(b),y:s.position.y+U(b)};return i.particles.addParticle(w,r,s.group,t=>!(t.size.value<.5)&&(t.velocity.length=U(N(s.velocity.length,t.velocity.length)),t.splitCount=(s.splitCount??0)+1,t.unbreakable=!0,t.unbreakableUntil=performance.now()+500,!0))}class hs{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options.destroy;if(!i)return;t.exploding=void 0,t.splitCount=0;const s=i.bounds;t.destroyBounds??={};const{bottom:n,left:o,right:r,top:c}=s,{destroyBounds:l}=t,d=e.canvas.size;n&&(l.bottom=W(n)*d.height/a),o&&(l.left=W(o)*d.width/a),r&&(l.right=W(r)*d.width/a),c&&(l.top=W(c)*d.height/a)}isEnabled(t){const e=t;return!e.destroyed||!!e.exploding}loadOptions(t,...e){ae(t,"destroy",cs,...e)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;switch(i?.mode){case ss.split:!function(t,e,i){const s=i.options.destroy;if(!s)return;const n=s.split;if(n.count>=0){if(void 0===i.splitCount||i.splitCount>n.count)return;i.splitCount++}const a=W(n.rate.value),o=wt(n.particles);for(let s=0;s<a;s++)ds(t,e,i,o)}(this.#p,this.#u,t);break;case ss.explode:{if(t.exploding){t.destroyed=!1;break}const{explode:e}=i,s=t.size.value,n=s*e.maxSizeFactor,a=t.getOpacity();t.exploding={initialFillOpacity:a.fillOpacity,initialSize:s,initialStrokeOpacity:a.strokeOpacity,maxSize:n,progress:0,speed:Math.max(e.speed,.01)},t.fillOpacity=a.fillOpacity,t.strokeOpacity=a.strokeOpacity,t.destroyed=!1;break}}}update(t,e){if(t.exploding){const i=t.exploding,s=e.factor||1;i.progress=Math.min(1,i.progress+i.speed*s/60);const n=i.progress;return t.size.value=i.initialSize+(i.maxSize-i.initialSize)*n,t.fillOpacity=i.initialFillOpacity*(1-n),t.strokeOpacity=i.initialStrokeOpacity*(1-n),void(n>=1&&(t.exploding=void 0,t.destroy(!0)))}void 0!==t.unbreakableUntil&&performance.now()>=t.unbreakableUntil&&(t.unbreakable=!1,t.unbreakableUntil=void 0);const i=t.getPosition(),s=t.destroyBounds;s&&(void 0!==s.bottom&&i.y>=s.bottom||void 0!==s.left&&i.x<=s.left||void 0!==s.right&&i.x>=s.right||void 0!==s.top&&i.y<=s.top)&&t.destroy()}}async function us(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("destroy",e=>Promise.resolve(new hs(t.pluginManager,e)))})}class ps{count;delay;duration;wait=!1;load(t){E(t)||(ee(this,"count",t.count),ie(this,"delay",t.delay),ie(this,"duration",t.duration),ee(this,"wait",t.wait))}}class gs{delay=.1;quantity=1;load(t){E(t)||(ie(this,"quantity",t.quantity),ie(this,"delay",t.delay))}}class fs{color=!1;opacity=!1;load(t){E(t)||(ee(this,"color",t.color),ee(this,"opacity",t.opacity))}}class ms{options={};replace=new fs;type="square";load(t){E(t)||(void 0!==t.options&&(this.options=mt({},t.options??{})),this.replace.load(t.replace),ee(this,"type",t.type))}}class ys{height=0;mode=t.PixelMode.percent;width=0;load(t){E(t)||(ee(this,"mode",t.mode),ee(this,"height",t.height),ee(this,"width",t.width))}}class vs{fill;stroke;load(t){E(t)||(t.fill&&(this.fill??=new ye,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new De,this.stroke.load(t.stroke)))}}class bs{autoPlay=!0;direction;domId;fill=!0;life=new ps;name;particles;position;rate=new gs;shape=new ms;size;spawn=new vs;spawnFillColor;spawnStrokeColor;startCount=0;load(t){E(t)||(ee(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new ys,this.size.load(t.size)),ee(this,"direction",t.direction),ee(this,"domId",t.domId),ee(this,"fill",t.fill),this.life.load(t.life),ee(this,"name",t.name),this.particles=bt(t.particles,t=>mt({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=N(t.position.x)),void 0!==t.position.y&&(this.position.y=N(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new he,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new he,this.spawnStrokeColor.load(t.spawnStrokeColor)),ee(this,"startCount",t.startCount))}}const ws={count:1,enable:!0},xs="emitters";class Ms extends Ti{handleClickMode;maxDistance;#v;constructor(t,e){super(e),this.#v=t,this.maxDistance=0,this.handleClickMode=(t,e)=>{const i=this.container.actualOptions.interactivity.modes.emitters;if(!i||t!==xs)return;let s;if(T(i.value)){const t=0,e=i.value.length;if(e>t&&i.random.enable){s=[];const t=new Set;for(let n=0;n<i.random.count;n++){const a=Math.floor(A()*i.value.length);if(t.has(a)&&t.size<e){n--;continue}t.add(a);const o=ut(i.value,a);o&&s.push(o)}}else s=i.value}else s=i.value;const n=s,a=e.mouse.clickPosition;bt(n,async t=>{await this.#v.addEmitter(this.container,t,a)})}}clear(){}init(){}interact(t,e){for(const t of this.#v.getArray(this.container))t.update(e)}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity).events;return!(!s.clickPosition||!n.onClick.enable)&&ht(xs,n.onClick.mode)}loadModeOptions(t,...e){t.emitters={random:ws,value:[]};for(const i of e)if(i?.emitters)if(T(i.emitters))for(const e of i.emitters){const i=new bs;i.load(e),t.emitters.value.push(i)}else if("value"in i.emitters){const e=i.emitters;if(t.emitters.random.enable=e.random?.enable??t.emitters.random.enable,t.emitters.random.count=e.random?.count??t.emitters.random.count,T(e.value))for(const i of e.value){const e=new bs;e.load(i),t.emitters.value.push(e)}else{const i=new bs;i.load(e.value),t.emitters.value.push(i)}}else{const e=new bs;e.load(i.emitters),t.emitters.value.push(e)}}removeEmitter(t){const e=this.#v.getArray(this.container).indexOf(t);e>=0&&this.#v.getArray(this.container).splice(e,1)}reset(){}}async function Ps(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return ac}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}const ks=new WeakMap;function Cs(t){const e=t.pluginManager;let i=ks.get(e);return i||(i=Promise.resolve().then(function(){return oc}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw ks.delete(e),t}),ks.set(e,i)),i}class Os{fill;options;position;size;constructor(t,e,i,s){this.position=t,this.size=e,this.fill=i,this.options=s}resize(t,e){this.position=t,this.size=e}}var zs;!function(t){t.emitter="emitter"}(zs||(zs={}));class Ds{id="emitters";#v;constructor(t){this.#v=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return rc});return new e(this.#v,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=bt(i.emitters,t=>{const e=new bs;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return T(e)&&!!e.length||void 0!==e}}function Ss(t){if(!t.pluginManager.addEmitterShapeGenerator)throw new Error("tsParticles Emitters Plugin is not loaded")}async function Is(t){await async function(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{const e=await Cs(t);await Ps(t),t.pluginManager.addPlugin(new Ds(e))})}(t),await async function(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{const e=await Cs(t);$i(t),await Ps(t),t.pluginManager.addInteractor?.("externalEmitters",t=>Promise.resolve(new Ms(e,t)))})}(t)}class Ts extends Os{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.size,e=this.fill,i=this.position,[s,n]=[t.width*o,t.height*o],a=((t,e)=>{const i=A()*w,s=Math.atan(e/t*Math.tan(u*i)),n=A();return n<w?s:n<.5?Math.PI-s:n<.75?Math.PI+s:-s})(s,n),r=(h=a,(l=s)*(d=n)/Math.sqrt((d*Math.cos(h))**2+(l*Math.sin(h))**2)),c=e?r*Math.sqrt(A()):r;var l,d,h;return{position:{x:i.x+c*Math.cos(a),y:i.y+c*Math.sin(a)}}}}class Es{generate(t,e,i,s,n){return new Ts(e,i,s,n)}}async function Rs(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{Ss(t),t.pluginManager.addEmitterShapeGenerator?.("circle",new Es)})}var Ls;function _s(t,e){return t+e*(A()-o)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}(Ls||(Ls={}));class As extends Os{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:_s(e.x,i.width),y:_s(e.y,i.height)}};{const t=i.width*o,s=i.height*o,n=function(t){return Math.floor(A()*t)}(4),a=2*(A()-o);switch(n){case Ls.TopLeft:return{position:{x:e.x+a*t,y:e.y-s}};case Ls.TopRight:return{position:{x:e.x-t,y:e.y+a*s}};case Ls.BottomRight:return{position:{x:e.x+a*t,y:e.y+s}};case Ls.BottomLeft:default:return{position:{x:e.x+t,y:e.y+a*s}}}}}}class Fs{generate(t,e,i,s,n){return new As(e,i,s,n)}}async function Vs(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{Ss(t),t.pluginManager.addEmitterShapeGenerator?.("square",new Fs)})}class Hs{momentumFactor=.03;preserveMomentum=false;load(t){E(t)||(ee(this,"momentumFactor",t.momentumFactor),ee(this,"preserveMomentum",t.preserveMomentum))}}const Bs=16.666666666666668;class qs extends Ti{maxDistance=0;#b;#w;#x;#M;#P;#k=[];#C=!1;#O;constructor(t){super(t)}clear(t,e){}init(){}interact(t,e){const i=t.mouse,s=i.position;if(s&&(this.#P=s),this.#x){const t=performance.now();i.clicking?this.#w=void 0:this.#w??=t;const e=void 0===this.#b&&void 0!==this.#w&&t-this.#w>=50;if(!i.inside||this.#z(i)||e)return this.#D(),void(this.#C=!1);const n=s??this.#P;if(!n)return;this.#k.push({x:n.x,y:n.y,t:t}),this.#k.length>5&&this.#k.shift();const a=n.x+(this.#M?.x??0),o=n.y+(this.#M?.y??0);return this.#x.position.x=a-this.#x.offset.x,this.#x.position.y=o-this.#x.offset.y,this.#x.velocity.x=0,this.#x.velocity.y=0,this.#x.initialPosition.x=this.#x.position.x,this.#x.initialPosition.y=this.#x.position.y,void(this.#x.misplaced=!1)}if(!i.clicking)return this.#D(),void(this.#C=!1);if(this.#C)return;this.#C=!0;const n=i.downPosition??s??this.#P,a=this.#S(t,n);if(!a||!s)return void(a||(this.#C=!1));const o=a.getPosition();this.#x=a,this.#b=i.clickTime,this.#M={x:o.x-s.x,y:o.y-s.y},this.#O={x:a.velocity.x,y:a.velocity.y},this.#w=void 0,this.#k=[{x:s.x,y:s.y,t:performance.now()}],a.velocity.x=0,a.velocity.y=0,a.position.x=o.x-a.offset.x,a.position.y=o.y-a.offset.y,a.initialPosition.x=a.position.x,a.initialPosition.y=a.position.y,a.misplaced=!1}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!(!this.#x&&!this.#C)||!!n?.onClick.enable&&s.clicking&&!!s.position&&ht("drag",n.onClick.mode)}loadModeOptions(t,...e){ae(t,"drag",Hs,...e)}reset(t,e){}#S(t,e){if(!e)return;const i=this.container.particles.filter(e=>this.isEnabled(t,e));let s,n=1/0;for(const t of i){const i=Y(t.getPosition(),e),a=t.getRadius();!Number.isFinite(i)||!Number.isFinite(a)||i>a||i>=n||(s=t,n=i)}return s}#z(t){return void 0!==this.#b&&void 0!==t.clickTime&&t.clickTime!==this.#b}#D(){if(this.#x){const t=this.container.actualOptions.interactivity?.modes.drag;if((t?.preserveMomentum??!1)&&this.#k.length>=2){const e=this.#k[0],i=this.#k[this.#k.length-1];if(e&&i){const s=i.t-e.t;if(s>0){const n=t?.momentumFactor??.03;this.#x.velocity.x=(i.x-e.x)/s*Bs*n,this.#x.velocity.y=(i.y-e.y)/s*Bs*n}else this.#O&&(this.#x.velocity.x=this.#O.x,this.#x.velocity.y=this.#O.y)}else this.#O&&(this.#x.velocity.x=this.#O.x,this.#x.velocity.y=this.#O.y)}else this.#O&&(this.#x.velocity.x=this.#O.x,this.#x.velocity.y=this.#O.y)}this.#x=void 0,this.#b=void 0,this.#w=void 0,this.#M=void 0,this.#P=void 0,this.#k=[],this.#O=void 0}}async function Us(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{$i(t),t.pluginManager.addInteractor?.("externalDrag",t=>Promise.resolve(new qs(t)))})}class Ws{x=0;y=0;load(t){t&&(ee(this,"x",t.x),ee(this,"y",t.y))}}class js{value;weights=new Ws;load(t){t&&(t.weights&&(this.weights??=new Ws,this.weights.load(t.weights)),E(t.value)||(this.value=N(t.value)))}}class $s{h=new js;l=new js;s=new js;load(t){t&&(t.h&&(this.h??=new js,this.h.load(t.h)),t.s&&(this.s??=new js,this.s.load(t.s)),t.l&&(this.l??=new js,this.l.load(t.l)))}}class Ns{colorCoords=new $s;delay=1;particles;pauseOnStop=!1;quantity=1;load(t){E(t)||(ee(this,"delay",t.delay),ee(this,"quantity",t.quantity),ee(this,"pauseOnStop",t.pauseOnStop),void 0!==t.particles&&(this.particles=mt({},t.particles)),t.colorCoords&&(this.colorCoords??=new $s,this.colorCoords.load(t.colorCoords)))}}const Gs="trail";class Xs extends Ti{maxDistance=0;#I;#T;#p;constructor(t,e){super(e),this.#p=t,this.#I=0}clear(){}init(){}interact(t,e){const i=this.container;if(!i.retina.reduceFactor)return;const s=i.actualOptions,n=s.interactivity?.modes.trail;if(!n)return;const a=n.delay*r/this.container.retina.reduceFactor;if(this.#I<a&&(this.#I+=e.value),this.#I<a)return;const o=t.mouse.position,c=!(n.pauseOnStop&&(o===this.#T||o?.x===this.#T?.x&&o?.y===this.#T?.y));if(this.#T=o?{...o}:void 0,c&&o){let t=n.particles;const e=n.colorCoords;if(e){const{width:s,height:a}=i.canvas.size,r={x:o.x/s,y:o.y/a},c=t=>!!(t?.weights?.x??t?.weights?.y),l=(t,e,i)=>{if(!c(t))return;const s=t?.weights,n=r.x*(s?.x??0)+r.y*(s?.y??0),a=t?.value??e,o=j(a??0),l=$(a??i),d=o+n*(l-o);return Math.min(l,Math.max(o,d))},d=n.particles?.paint?wt(n.particles.paint):void 0,h=d?.fill,u=h?Ze(this.#p,he.create(void 0,h.color)):void 0,p=l(e.h,u?.h,y),g=l(e.s,u?.s,v),f=l(e.l,u?.l,b);void 0===p&&void 0===g&&void 0===f||(t=mt({},n.particles,{paint:{fill:{color:{value:{h:p??u?.h,s:g??u?.s,l:f??u?.l}}}}}))}i.particles.push(n.quantity,o,t)}this.#I-=a}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;return!!n&&(s.clicking&&s.inside&&!!s.position&&ht(Gs,n.onClick.mode)||s.inside&&!!s.position&&ht(Gs,n.onHover.mode))}loadModeOptions(t,...e){ae(t,"trail",Ns,...e)}reset(){}}async function Ys(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{$i(t),t.pluginManager.addInteractor?.("externalTrail",e=>Promise.resolve(new Xs(t.pluginManager,e)))})}var Js;!function(t){t.both="both",t.horizontal="horizontal",t.vertical="vertical"}(Js||(Js={}));class Ks{enable=!1;value=0;load(t){E(t)||(ee(this,"enable",t.enable),ie(this,"value",t.value))}}class Qs{backColor;darken=new Ks;enable=!1;enlighten=new Ks;mode=Js.vertical;speed=25;load(t){E(t)||(void 0!==t.backColor&&(this.backColor=de.create(this.backColor,t.backColor)),this.darken.load(t.darken),ee(this,"enable",t.enable),this.enlighten.load(t.enlighten),ee(this,"mode",t.mode),ie(this,"speed",t.speed))}}class Zs{#p;constructor(t){this.#p=t}getTransformValues(t){const e=t.roll?.enable&&t.roll,i=e&&e.horizontal,s=e&&e.vertical;return{a:i?Math.cos(e.angle):void 0,d:s?Math.sin(e.angle):void 0}}init(e){!function(e,i){const s=i.options.roll;if(s?.enable)if(i.roll={enable:s.enable,horizontal:s.mode===Js.horizontal||s.mode===Js.both,vertical:s.mode===Js.vertical||s.mode===Js.both,angle:A()*u,speed:W(s.speed)/360},s.backColor)i.backColor=Ze(e,s.backColor);else if(s.darken.enable&&s.enlighten.enable){const e=A()>=o?t.AlterType.darken:t.AlterType.enlighten;i.roll.alter={type:e,value:W(e===t.AlterType.darken?s.darken.value:s.enlighten.value)}}else s.darken.enable?i.roll.alter={type:t.AlterType.darken,value:W(s.darken.value)}:s.enlighten.enable&&(i.roll.alter={type:t.AlterType.enlighten,value:W(s.enlighten.value)});else i.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this.#p,e)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){ae(t,"roll",Qs,...e)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.options.roll,s=t.roll;if(!s||!i?.enable)return;const n=s.speed*e.factor,a=u;s.angle+=n,s.angle>a&&(s.angle-=a)}(t,e)}}async function tn(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("roll",()=>Promise.resolve(new Zs(t.pluginManager)))})}class en{enable=!1;mode="destination-out";load(t){E(t)||(ee(this,"mode",t.mode),ee(this,"enable",t.enable))}}class sn{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return cc});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 en),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new en,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function nn(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new sn)})}class an{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(c.x,c.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:K(s.min),max:K(s.max)}:{min:0,max:K(s)}}}async function on(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new an))})}var rn;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(rn||(rn={}));const cn=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,ln=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class dn{accepts(t){return t.startsWith("#")}handleColor(t){return this.#E(t.value)}handleRangeColor(t){return this.#E(t.value)}parseString(t){return this.#E(t)}#E(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(cn,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=ln.exec(e);return i?{a:i[rn.a]?Number.parseInt(i[rn.a],16)/255:1,b:Number.parseInt(i[rn.b]??"0",16),g:Number.parseInt(i[rn.g]??"0",16),r:Number.parseInt(i[rn.r]??"0",16)}:void 0}}async function hn(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new dn)})}var un;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(un||(un={}));const pn=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class gn{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 si(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return si({h:W(e.h),l:W(e.l),s:W(e.s)})}parseString(t){if(!this.accepts(t))return;const e=pn.exec(t);return e?ai({a:e.length>4?nt(e[un.a]):1,h:Number.parseInt(e[un.h]??"0",10),l:Number.parseInt(e[un.l]??"0",10),s:Number.parseInt(e[un.s]??"0",10)}):void 0}}async function fn(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new gn)})}class mn{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return dc});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function yn(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,Dt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new mn(t.pluginManager))})}function vn(e,i){const s=e.value,n=e.animation,a={delayTime:W(n.delay)*r,enable:n.enable,value:W(e.value)*i,max:$(s)*i,min:j(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=U(a),e&&(a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function bn(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,c=i.max,l=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!==l&&(i.velocity*=l),i.status){case t.AnimationStatus.increasing:i.value>=c&&(s?i.status=t.AnimationStatus.decreasing:i.value-=c,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(s?i.status=t.AnimationStatus.increasing:i.value+=c,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,c),e.destroyed||(i.value=B(i.value,r,c))}}class wn extends re{destroy=t.DestroyType.none;load(t){super.load(t),E(t)||ee(this,"destroy",t.destroy)}}class xn extends Pe{animation=new wn;value=1;load(t){if(E(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Mn{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=vn(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){ae(t,"opacity",xn,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&bn(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function Pn(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Mn(t)))})}class kn{modes;#u;#R;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#R=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.#R)if(o=t.particleBounce?.(e,s,i)??!1,o)break;if(o)return;const r=e.getPosition(),c=e.offset,l=e.getRadius(),d=ft(r,l),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:c,outOfCanvas:u,size:l}),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:c,outOfCanvas:u,size:l})}}class Cn{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}=G(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 On{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,l=e.getRadius();if(a.enable){const s=e.position;(!a.inverse&&s.y>r.height+l&&i===t.OutModeDirection.bottom||a.inverse&&s.y<-l&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+l||e.velocity.y<0&&e.position.y>=-l||e.velocity.x>0&&e.position.x<=r.width+l||e.velocity.x<0&&e.position.x>=-l)return;pt(e.position,o.canvas.size,c,l,i)||e.destroy()}}}const zn=O.origin;class Dn{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;zn.setTo(c),zn.length=e.moveCenter.radius,zn.angle=e.velocity.angle+Math.PI,zn.addTo(e.moveCenter);const{dx:s,dy:n}=G(e.position,zn);if(t<=0&&s>=0||i<=0&&n>=0||t>=0&&s<=0||i>=0&&n<=0)return;e.position.x=Math.floor(U({min:0,max:a.canvas.size.width})),e.position.y=Math.floor(U({min:0,max:a.canvas.size.height}));const{dx:o,dy:r}=G(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(U({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(U({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=G(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(),c=ft(e.position,r);i===t.OutModeDirection.right&&c.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&&c.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&&c.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&&c.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 Sn{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#L(e,t.OutMode.bounce,t=>new kn(t)),this.#L(e,t.OutMode.out,t=>new Dn(t)),this.#L(e,t.OutMode.destroy,t=>new Cn(t)),this.#L(e,t.OutMode.none,t=>new On(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#_(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#_(e,i,s.left??s.default,t.OutModeDirection.left),this.#_(e,i,s.right??s.default,t.OutModeDirection.right),this.#_(e,i,s.top??s.default,t.OutModeDirection.top)}#L(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))}#_(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function In(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Sn(t)))})}class Tn{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=wt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=he.create(void 0===a?void 0:he.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=W(o.opacity),t.fillAnimation=i.animation;const s=Ze(this.#p,i);s&&(t.fillColor=pi(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=he.create(void 0===a?void 0:he.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=Ze(this.#p,i)??t.getFillColor();s&&(t.strokeColor=pi(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)&&(mi(t.fillColor,e,this.#u.hdr),mi(t.strokeColor,e,this.#u.hdr))}}async function En(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Tn(t.pluginManager,e)))})}var Rn;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Rn||(Rn={}));const Ln=/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 _n{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=Ln.exec(t);return e?{a:e.length>4?nt(e[Rn.a]):1,b:parseInt(e[Rn.b]??"0",10),g:parseInt(e[Rn.g]??"0",10),r:parseInt(e[Rn.r]??"0",10)}:void 0}}async function An(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new _n)})}class Fn extends re{destroy=t.DestroyType.none;load(t){super.load(t),E(t)||ee(this,"destroy",t.destroy)}}class Vn extends Pe{animation=new Fn;value=3;load(t){if(super.load(t),E(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Hn{#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){ae(t,"size",Vn,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=vn(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&&bn(t,t.size,!0,t.options.size.animation.destroy,e)}}async function Bn(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Hn(t)))})}async function qn(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{await Promise.all([nn(t),hn(t),fn(t),An(t),yn(t),on(t),En(t),Pn(t),In(t),Bn(t)])})}const Un=new Map;async function Wn(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{for(const[e,i]of Un)t.pluginManager.addEasing(e,i)})}Un.set("ease-in-quad",t=>t**2),Un.set("ease-out-quad",t=>1-(1-t)**2),Un.set("ease-in-out-quad",t=>t<.5?2*t**2:1-(-2*t+2)**2/2);const jn=["emoji"];function $n(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}async function Nn(t,e){try{await ct().fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}const Gn='"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';class Xn{#A=new Map;destroy(){for(const[t,e]of this.#A)e instanceof ImageBitmap&&e.close(),this.#A.delete(t)}draw(t){const e=t.particle.emojiDataKey;if(!e)return;const i=this.#A.get(e);i&&function(t,e){const{context:i,opacity:s}=t,n=i.globalAlpha,a=e.width,r=a*o;i.globalAlpha=s,i.drawImage(e,-r,-r,a,a),i.globalAlpha=n}(t,i)}async init(t){const e=t.actualOptions.particles.shape;if(!jn.some(t=>ht(t,e.type)))return;const i=[Nn(Gn)];bt(jn.map(t=>e.options[t])[0],t=>{t.font&&i.push(Nn(t.font))}),await Promise.all(i)}particleDestroy(t){t.emojiDataKey=void 0}particleInit(t,e){const i=e.shapeData;if(!i.value)return;const s=wt(i.value,e.randomIndexData);if(!s)return;const n="string"==typeof s?{font:i.font??Gn,padding:i.padding??0,value:s}:{font:Gn,padding:0,...i,...s},a=n.font,o=n.value,r=`${o}_${a}`;if(this.#A.has(r))return void(e.emojiDataKey=r);const c=2*n.padding,l=$(e.size.value),d=l+c,h=2*d,u=new OffscreenCanvas(h,h),p=u.getContext("2d",t.canvas.render.settings);if(!p)return;p.font=`400 ${(2*l).toString()}px ${a}`,p.textBaseline="middle",p.textAlign="center",p.fillText(o,d,d);const g=u instanceof HTMLCanvasElement?u:u.transferToImageBitmap();this.#A.set(r,g),e.emojiDataKey=r}}async function Yn(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(jn,()=>Promise.resolve(new Xn))})}const Jn=O.origin;function Kn(t,e,i,s,n,a,o){const r=e.actualOptions.interactivity?.modes.attract;if(!r)return;const c=e.particles.grid.query(n,a);for(const e of c){const{dx:n,dy:a,distance:c}=G(e.position,i),l=r.speed*r.factor,d=B(t.getEasing(r.easing)(1-c/s)*l,1,r.maxSpeed);Jn.x=c?n/c*d:l,Jn.y=c?a/c*d:l,o?.(e),e.position.subFrom(Jn)}}let Qn=class{distance=200;duration=.4;easing="ease-out-quad";factor=1;maxSpeed=50;restore;speed=1;constructor(){this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){E(t)||(ee(this,"distance",t.distance),ee(this,"duration",t.duration),void 0!==t.easing&&(this.easing=t.easing),ee(this,"factor",t.factor),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed),ee(this,"speed",t.speed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}};const Zn="attract";let ta=class extends Ti{handleClickMode;#F;#V;#p;#H;constructor(t,e){super(e),this.#p=t,this.#V=0,this.#F=new Set,this.#H=new Map,e.attract??={particles:[]},this.handleClickMode=(t,i)=>{const s=this.container.actualOptions,n=s.interactivity?.modes.attract;if(n&&t===Zn){e.attract??={particles:[]},e.attract.clicking=!0,e.attract.count=0;for(const t of e.attract.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);e.attract.particles=[],e.attract.finish=!1,setTimeout(()=>{e.destroyed||(e.attract??={particles:[]},e.attract.clicking=!1)},n.duration*r)}}}get maxDistance(){return this.#V}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.attract;e&&(this.#V=e.distance,t.retina.attractModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#F.clear();const e=this.container.actualOptions,i=t.status===Ai,s=e.interactivity?.events;if(!s)return;const{enable:n,mode:a}=s.onHover,{enable:o,mode:r}=s.onClick;i&&n&&ht(Zn,a)?function(t,e,i,s,n){const a=i.mouse.position,o=e.retina.attractModeDistance;!o||o<0||!a||Kn(t,e,a,o,new Kt(a.x,a.y,o),t=>s(t),n)}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#B(t)}):o&&ht(Zn,r)&&function(t,e,i,s,n){e.attract??={particles:[]};const{attract:a}=e;if(a.finish||(a.count??=0,a.count++,a.count===e.particles.count&&(a.finish=!0)),a.clicking){const a=i.mouse.clickPosition,o=e.retina.attractModeDistance;if(!o||o<0||!a)return;Kn(t,e,a,o,new Kt(a.x,a.y,o),t=>s(t),n)}else!1===a.clicking&&(a.particles=[])}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#B(t)}),this.#q()}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!(s.position&&n?.onHover.enable||s.clickPosition&&n?.onClick.enable))return!1;const a=n.onHover.mode,o=n.onClick.mode;return ht(Zn,a)||ht(Zn,o)}loadModeOptions(t,...e){ae(t,"attract",Qn,...e)}reset(){}#q(){const t=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!t?.enable||!this.#H.size)return;const e=Date.now(),i=t.delay*r,s=Math.max(.001,Math.min(1,t.speed));for(const[n,a]of this.#H){if(this.#F.has(n))continue;if(n.destroyed){this.#H.delete(n);continue}const o=a.target;if(e-a.lastInteractionTime<i)continue;let r=o.x-n.position.x,c=o.y-n.position.y,l=o.z-n.position.z;if(t.follow&&n.options.move.enable){const{x:t,y:e,z:i}=n.velocity,s=t*t+e*e+i*i;if(s>0){const n=(r*t+c*e+l*i)/s;r-=t*n,c-=e*n,l-=i*n}}n.position.x+=r*s,n.position.y+=c*s,n.position.z+=l*s,Math.abs(r)<=.5&&Math.abs(c)<=.5&&(n.position.x=o.x,n.position.y=o.y,n.position.z=o.z,this.#H.delete(n))}}#B(t){this.#F.add(t);const e=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!e?.enable)return;const i=Date.now();let s=this.#H.get(t);s||(s={target:t.position.copy(),lastInteractionTime:i},this.#H.set(t,s)),s.lastInteractionTime=i}};async function ea(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{$i(t),t.pluginManager.addInteractor?.("externalAttract",e=>Promise.resolve(new ta(t.pluginManager,e)))})}const ia=Math.PI*o;function sa(t,e,i,s,n){const a=t.particles.grid.query(s,n);for(const t of a)s instanceof Kt?vt(yt(t),{position:e,mass:i**2*ia,velocity:O.origin,factor:O.origin}):s instanceof Qt&&oa(t,ft(e,i))}function na(t,e,i,s){Wi(i,e,(e,i)=>{!function(t,e,i,s){const n=ct().querySelectorAll(e);n.length&&n.forEach(e=>{const n=e,a=t.retina.pixelRatio,r={x:(n.offsetLeft+n.offsetWidth*o)*a,y:(n.offsetTop+n.offsetHeight*o)*a},c=n.offsetWidth*o*a,l=10*a,d=i.type===Mi.circle?new Kt(r.x,r.y,c+l):new Qt(n.offsetLeft*a-l,n.offsetTop*a-l,n.offsetWidth*a+2*l,n.offsetHeight*a+2*l);s(r,c,d)})}(t,e,i,(e,i,n)=>{sa(t,e,i,n,s)})})}function aa(t){const e={bounced:!1},{pSide:i,pOtherSide:s,rectSide:n,rectOtherSide:a,velocity:r,factor:c}=t;return s.min<a.min||s.min>a.max||s.max<a.min||s.max>a.max||(i.max>=n.min&&i.max<=(n.max+n.min)*o&&r>0||i.min<=n.max&&i.min>(n.max+n.min)*o&&r<0)&&(e.velocity=r*-c,e.bounced=!0),e}function oa(t,e){const i=ft(t.getPosition(),t.getRadius()),s=t.options.bounce,n=aa({pSide:{min:i.left,max:i.right},pOtherSide:{min:i.top,max:i.bottom},rectSide:{min:e.left,max:e.right},rectOtherSide:{min:e.top,max:e.bottom},velocity:t.velocity.x,factor:W(s.horizontal.value)});n.bounced&&(void 0!==n.velocity&&(t.velocity.x=n.velocity),void 0!==n.position&&(t.position.x=n.position));const a=aa({pSide:{min:i.top,max:i.bottom},pOtherSide:{min:i.left,max:i.right},rectSide:{min:e.top,max:e.bottom},rectOtherSide:{min:e.left,max:e.right},velocity:t.velocity.y,factor:W(s.vertical.value)});a.bounced&&(void 0!==a.velocity&&(t.velocity.y=a.velocity),void 0!==a.position&&(t.position.y=a.position))}class ra{distance=200;load(t){E(t)||ee(this,"distance",t.distance)}}const ca="bounce";class la extends Ti{#V;constructor(t){super(t),this.#V=0}get maxDistance(){return this.#V}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bounce;e&&(this.#V=e.distance,t.retina.bounceModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,s=t.status===Ai;if(!i)return;const n=i.onHover.enable,a=i.onHover.mode,o=i.onDiv;s&&n&&ht(ca,a)?function(t,e,i){const s=10*t.retina.pixelRatio,n=e.mouse.position,a=t.retina.bounceModeDistance;!a||a<0||!n||sa(t,n,a,new Kt(n.x,n.y,a+s),i)}(this.container,t,e=>this.isEnabled(t,e)):na(this.container,o,ca,e=>this.isEnabled(t,e))}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const a=n.onDiv;return!!s.position&&n.onHover.enable&&ht(ca,n.onHover.mode)||Ui(ca,a)}loadModeOptions(t,...e){ae(t,"bounce",ra,...e)}reset(){}}async function da(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{$i(t),t.pluginManager.addInteractor?.("externalBounce",t=>Promise.resolve(new la(t)))})}class ha{color;distance=200;duration=.4;mix=!1;opacity;size;load(t){if(!E(t)){if(ee(this,"distance",t.distance),ee(this,"duration",t.duration),ee(this,"mix",t.mix),ie(this,"opacity",t.opacity),void 0!==t.color){const e=T(this.color)?void 0:this.color;this.color=bt(t.color,t=>de.create(e,t))}ee(this,"size",t.size)}}}class ua extends ha{selectors=[];load(t){super.load(t),E(t)||ee(this,"selectors",t.selectors)}}class pa extends ha{divs;load(t){super.load(t),E(t)||(this.divs=bt(t.divs,t=>{const e=new ua;return e.load(t),e}))}}class ga{div;enabled=!1;fillColor;finalColor;id="bubble";inRange=!1;opacity;priority=100;radius;strokeColor}var fa;function ma(t,e,i,s){if(e>=i){return B(t+(e-i)*s,t,e)}if(e<i){return B(t-(i-e)*s,e,t)}}!function(t){t.color="color",t.opacity="opacity",t.size="size"}(fa||(fa={}));const ya="bubble";class va extends Ti{handleClickMode;#V;#U=new WeakMap;#p;constructor(t,e){super(e),this.#p=t,this.#V=0,e.bubble??={},this.handleClickMode=t=>{t===ya&&(e.bubble??={},e.bubble.clicking=!0)}}get maxDistance(){return this.#V}clear(t,e,i){const s=this.#U.get(t);s?.inRange&&!i||(t.removeModifier(ya),this.#U.delete(t))}getOrCreateModifier(t){let e=this.#U.get(t);return e||(e=new ga,this.#U.set(t,e),t.addModifier(e)),e}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bubble;e&&(this.#V=e.distance,t.retina.bubbleModeDistance=e.distance*t.retina.pixelRatio,void 0!==e.size&&(t.retina.bubbleModeSize=e.size*t.retina.pixelRatio))}interact(t,e){const i=this.container.actualOptions,s=i.interactivity?.events;if(!s)return;const n=s.onHover,a=s.onClick,o=n.enable,r=n.mode,c=a.enable,l=a.mode,d=s.onDiv;o&&ht(ya,r)?this.#W(t):c&&ht(ya,l)?this.#j(t):Wi(ya,d,(i,s)=>{this.#$(t,e,i,s)})}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const{onClick:a,onDiv:o,onHover:r}=n,c=Ui(ya,o);return!!(c||r.enable&&s.position||a.enable&&s.clickPosition)&&(ht(ya,r.mode)||ht(ya,a.mode)||c)}loadModeOptions(t,...e){ae(t,"bubble",pa,...e)}reset(t,e){const i=this.#U.get(e);i&&(i.enabled=!1,i.inRange=!1)}#j(t){const e=this.container,i=e.actualOptions,s=t.mouse.clickPosition,n=i.interactivity?.modes.bubble;if(!n||!s)return;e.bubble??={};const a=e.retina.bubbleModeDistance;if(!a||a<0)return;const o=e.particles.grid.queryCircle(s,a,e=>this.isEnabled(t,e)),{bubble:c}=e;for(const i of o){if(!c.clicking)continue;const o=this.getOrCreateModifier(i);o.enabled=!c.durationEnd,o.inRange=!c.durationEnd;const l=Y(i.getPosition(),s),d=(performance.now()-(t.mouse.clickTime??0))/r;d>n.duration&&(c.durationEnd=!0),d>2*n.duration&&(c.clicking=!1,c.durationEnd=!1);const h={bubbleObj:{optValue:e.retina.bubbleModeSize,value:o.radius},particlesObj:{optValue:i.size.max,value:i.size.value},type:fa.size};this.#N(i,l,d,h);const u={bubbleObj:{optValue:n.opacity,value:o.opacity},particlesObj:{optValue:i.opacity?.max??1,value:i.opacity?.value??1},type:fa.opacity};this.#N(i,l,d,u),!c.durationEnd&&l<=a?this.#G(i,l):(o.fillColor=void 0,o.strokeColor=void 0)}}#W(t){const e=this.container,i=t.mouse.position,s=e.retina.bubbleModeDistance;if(!s||s<0||!i)return;const n=e.particles.grid.queryCircle(i,s,e=>this.isEnabled(t,e));for(const e of n){const n=this.getOrCreateModifier(e);n.enabled=!0,n.inRange=!0;const a=Y(e.getPosition(),i),o=1-a/s;a<=s?o>=0&&t.status===Ai&&(this.#X(e,o),this.#Y(e,o),this.#G(e,o)):this.reset(t,e),t.status===_i&&this.reset(t,e)}}#G(t,e,i){const s=this.container.actualOptions,n=i??s.interactivity?.modes.bubble,a=this.getOrCreateModifier(t);if(n){if(!a.finalColor){const t=n.color;if(!t)return;const e=wt(t);a.finalColor=Ze(this.#p,e)}if(a.finalColor)if(n.mix){a.fillColor=void 0,a.strokeColor=void 0;const i=t.getFillColor();if(i){const t=ti(li(i,a.finalColor,1-e,e,this.container.hdr));a.fillColor=t,a.strokeColor=t}else a.fillColor=a.finalColor,a.strokeColor=a.finalColor}else a.fillColor=a.finalColor,a.strokeColor=a.finalColor}}#Y(t,e,i){const s=this.container.actualOptions,n=i?.opacity??s.interactivity?.modes.bubble?.opacity;if(!n)return;const a=ma(t.opacity?.value??1,n,t.opacity?.max??1,e);if(void 0!==a){this.getOrCreateModifier(t).opacity=a}}#X(t,e,i){const s=this.container,n=i?.size?i.size*s.retina.pixelRatio:s.retina.bubbleModeSize;if(void 0===n)return;const a=ma(t.size.value,n,t.size.max,e);if(void 0!==a){this.getOrCreateModifier(t).radius=a}}#N(t,e,i,s){const n=this.container,a=s.bubbleObj.optValue,o=n.actualOptions,r=o.interactivity?.modes.bubble;if(!r||void 0===a)return;const c=r.duration,l=n.retina.bubbleModeDistance,d=s.particlesObj.optValue,h=s.bubbleObj.value,u=s.particlesObj.value??0,p=s.type;if(!l||l<0||a===d)return;n.bubble??={};const g=this.getOrCreateModifier(t);if(n.bubble.durationEnd)h&&(p===fa.size&&(g.radius=void 0),p===fa.opacity&&(g.opacity=void 0));else if(e<=l){if((h??u)!==a){const t=u-i*(u-a)/c;p===fa.size&&(g.radius=t),p===fa.opacity&&(g.opacity=t)}}else p===fa.size&&(g.radius=void 0),p===fa.opacity&&(g.opacity=void 0)}#$(t,e,i,s){const n=this.container,a=ct().querySelectorAll(i),r=n.actualOptions.interactivity?.modes.bubble;r&&a.length&&a.forEach(i=>{const a=i,c=n.retina.pixelRatio,l={x:(a.offsetLeft+a.offsetWidth*o)*c,y:(a.offsetTop+a.offsetHeight*o)*c},d=a.offsetWidth*o*c,h=s.type===Mi.circle?new Kt(l.x,l.y,d):new Qt(a.offsetLeft*c,a.offsetTop*c,a.offsetWidth*c,a.offsetHeight*c),u=n.particles.grid.query(h,e=>this.isEnabled(t,e));for(const t of u){if(!h.contains(t.getPosition()))continue;const i=this.getOrCreateModifier(t);i.enabled=!0,i.inRange=!0;const s=ji(r.divs,a);i.div&&i.div===a||(this.clear(t,e,!0),i.div=a),this.#X(t,1,s),this.#Y(t,1,s),this.#G(t,1,s)}})}}async function ba(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{$i(t),t.pluginManager.addInteractor?.("externalBubble",e=>Promise.resolve(new va(t.pluginManager,e)))})}class wa{opacity=.5;load(t){E(t)||ie(this,"opacity",t.opacity)}}class xa{distance=80;links=new wa;radius=60;load(t){E(t)||(ee(this,"distance",t.distance),this.links.load(t.links),ee(this,"radius",t.radius))}}function Ma(t,e,i,s){const n=t.actualOptions,a=n.interactivity?.modes.connect;if(a)return function(t,e,i,s,n){const a=Math.floor(s.getRadius()/i.getRadius()),o=i.getFillColor(),r=s.getFillColor();if(!o||!r)return;const c=i.getPosition(),l=s.getPosition(),d=li(o,r,i.getRadius(),s.getRadius(),t.hdr),h=e.createLinearGradient(c.x,c.y,l.x,l.y);return h.addColorStop(0,ci(o,t.hdr,n,t.peakNits,t.hdrMode)),h.addColorStop(B(a,0,1),ri(d,t.hdr,n,t.peakNits,t.hdrMode)),h.addColorStop(1,ci(r,t.hdr,n,t.peakNits,t.hdrMode)),h}(t,e,i,s,a.links.opacity)}function Pa(t,e,i){t.canvas.render.draw(s=>{const n=Ma(t,s,e,i);if(!n)return;const a=e.getPosition(),o=i.getPosition();!function(t,e,i,s,n){$n(t,s,n),t.lineWidth=e,t.strokeStyle=i,t.stroke()}(s,e.retina.linksWidth??0,n,a,o)})}class ka extends Ti{#V;constructor(t){super(t),this.#V=0}get maxDistance(){return this.#V}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.connect;e&&(this.#V=e.distance,t.retina.connectModeDistance=e.distance*t.retina.pixelRatio,t.retina.connectModeRadius=e.radius*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions;if(i.interactivity?.events.onHover.enable&&"pointermove"===t.status){const i=t.mouse.position,{connectModeDistance:s,connectModeRadius:n}=e.retina;if(!s||s<0||!n||n<0||!i)return;const a=Math.abs(n),o=e.particles.grid.queryCircle(i,a,e=>this.isEnabled(t,e));o.forEach((t,i)=>{const n=t.getPosition();for(const a of o.slice(i+1)){const i=a.getPosition(),o=Math.abs(s),r=Math.abs(n.x-i.x),c=Math.abs(n.y-i.y);r<o&&c<o&&Pa(e,t,a)}})}}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!(!n?.onHover.enable||!s.position)&&ht("connect",n.onHover.mode)}loadModeOptions(t,...e){ae(t,"connect",xa,...e)}reset(){}}async function Ca(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{$i(t),t.pluginManager.addInteractor?.("externalConnect",t=>Promise.resolve(new ka(t)))})}function Oa(t,e){const i=t.particles.grid.query(e);for(const t of i)t.destroy()}function za(t,e,i){Wi(i,e,(e,i)=>{!function(t,e,i){const s=ct().querySelectorAll(e);s.length&&s.forEach(e=>{const s=e,n=t.retina.pixelRatio,a={x:(s.offsetLeft+s.offsetWidth*o)*n,y:(s.offsetTop+s.offsetHeight*o)*n},r=s.offsetWidth*o*n,c=10*n,l=i.type===Mi.circle?new Kt(a.x,a.y,r+c):new Qt(s.offsetLeft*n-c,s.offsetTop*n-c,s.offsetWidth*n+2*c,s.offsetHeight*n+2*c);Oa(t,l)})}(t,e,i)})}class Da{distance=200;load(t){E(t)||ee(this,"distance",t.distance)}}const Sa="destroy";class Ia extends Ti{#V;constructor(t){super(t),this.#V=0}get maxDistance(){return this.#V}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.destroy;e&&(this.#V=e.distance,t.retina.destroyModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,s=t.status===Ai;if(!i)return;const n=i.onHover.enable,a=i.onHover.mode,o=i.onDiv;s&&n&&ht(Sa,a)?function(t,e){const i=10*t.retina.pixelRatio,s=e.mouse.position,n=t.retina.destroyModeDistance;!n||n<0||!s||Oa(t,new Kt(s.x,s.y,n+i))}(this.container,t):za(this.container,o,Sa)}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const a=n.onDiv;return!!s.position&&n.onHover.enable&&ht(Sa,n.onHover.mode)||Ui(Sa,a)}loadModeOptions(t,...e){ae(t,"destroy",Da,...e)}reset(){}}async function Ta(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{$i(t),t.pluginManager.addInteractor?.("externalDestroy",async t=>Promise.resolve(new Ia(t)))})}class Ea{blink=!1;color;consent=!1;opacity=1;load(t){E(t)||(ee(this,"blink",t.blink),void 0!==t.color&&(this.color=de.create(this.color,t.color)),ee(this,"consent",t.consent),ie(this,"opacity",t.opacity))}}class Ra{distance=100;links=new Ea;load(t){E(t)||(ee(this,"distance",t.distance),this.links.load(t.links))}}function La(t,e,i,s,n){t.canvas.render.draw(a=>{const o=e.getPosition();!function(t,e,i,s,n,a,o=!1,r,c){$n(t,i,s),t.strokeStyle=ri(n,o,a,r,c),t.lineWidth=e,t.stroke()}(a,e.retina.linksWidth??0,o,n,i,s,t.hdr,t.peakNits,t.hdrMode)})}class _a extends Ti{#V;#p;constructor(t,e){super(e),this.#p=t,this.#V=0}get maxDistance(){return this.#V}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.grab;e&&(this.#V=e.distance,t.retina.grabModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions.interactivity;if(!i?.modes.grab||!i.events.onHover.enable||t.status!==Ai)return;const s=t.mouse.position;if(!s)return;const n=e.retina.grabModeDistance;if(!n||n<0)return;const a=e.particles.grid.queryCircle(s,n,e=>this.isEnabled(t,e));for(const t of a){const a=Y(t.getPosition(),s);if(a>n)continue;const o=i.modes.grab.links,r=o.opacity,c=r-a*r/n;if(c<=0)continue;const l=o.color??t.options.links?.color;if(!e.particles.grabLineColor&&l){const t=i.modes.grab.links;e.particles.grabLineColor=hi(this.#p,l,t.blink,t.consent)}const d=di(t,void 0,e.particles.grabLineColor,e.hdr);d&&La(e,t,d,c,s)}}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&ht("grab",n.onHover.mode)}loadModeOptions(t,...e){ae(t,"grab",Ra,...e)}reset(){}}async function Aa(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{$i(t),t.pluginManager.addInteractor?.("externalGrab",e=>Promise.resolve(new _a(t.pluginManager,e)))})}class Fa{force=2;smooth=10;load(t){E(t)||(ee(this,"force",t.force),ee(this,"smooth",t.smooth))}}class Va extends Ti{maxDistance=0;constructor(t){super(t)}clear(){}init(){}interact(t){for(const e of this.container.particles.filter(e=>this.isEnabled(t,e)))this.#J(t,e)}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&ht("parallax",n.onHover.mode)}loadModeOptions(t,...e){ae(t,"parallax",Fa,...e)}reset(){}#J(t,e){if(!this.isEnabled(t,e))return;const i=this.container,s=i.actualOptions,n=s.interactivity?.modes.parallax;if(!n)return;const a=n.force,r=t.mouse.position;if(!r)return;const c=i.canvas.size,l=c.width*o,d=c.height*o,h=n.smooth,u=e.getRadius()/a,p=(r.x-l)*u,g=(r.y-d)*u,{offset:f}=e;f.x+=(p-f.x)/h,f.y+=(g-f.y)/h}}async function Ha(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{$i(t),t.pluginManager.addInteractor?.("externalParallax",t=>Promise.resolve(new Va(t)))})}const Ba="pause";class qa extends Ti{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{if(t!==Ba)return;const e=this.container;e.animationStatus?e.pause():e.play()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,s=(e?.interactivity??i.interactivity)?.events;return!!s&&ht(Ba,s.onClick.mode)}reset(){}}async function Ua(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{$i(t),t.pluginManager.addInteractor?.("externalPause",t=>Promise.resolve(new qa(t)))})}class Wa{default=!0;groups=[];particles;quantity=4;load(t){E(t)||(ee(this,"default",t.default),void 0!==t.groups&&(this.groups=t.groups.map(t=>t)),this.groups.length||(this.default=!0),ie(this,"quantity",t.quantity),this.particles=bt(t.particles,t=>mt({},t)))}}const ja="push";class $a extends Ti{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=(t,e)=>{if(t!==ja)return;const i=this.container,s=i.actualOptions,n=s.interactivity?.modes.push;if(!n)return;const a=W(n.quantity);if(a<=0)return;const o=ut([void 0,...n.groups]),r=mt(void 0!==o?i.actualOptions.particles.groups[o]:void 0,wt(n.particles));i.particles.push(a,e.mouse.position,r,o)}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;return!!n&&s.clicking&&s.inside&&!!s.position&&ht(ja,n.onClick.mode)}loadModeOptions(t,...e){ae(t,"push",Wa,...e)}reset(){}}async function Na(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{$i(t),t.pluginManager.addInteractor?.("externalPush",t=>Promise.resolve(new $a(t)))})}class Ga{quantity=2;load(t){E(t)||ie(this,"quantity",t.quantity)}}const Xa="remove";class Ya extends Ti{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{const e=this.container,i=e.actualOptions;if(!i.interactivity?.modes.remove||t!==Xa)return;const s=W(i.interactivity.modes.remove.quantity);for(let t=0;t<s;t++)e.particles.get(t)?.destroy()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;return!!n&&s.clicking&&s.inside&&!!s.position&&ht(Xa,n.onClick.mode)}loadModeOptions(t,...e){ae(t,"remove",Ga,...e)}reset(){}}async function Ja(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{$i(t),t.pluginManager.addInteractor?.("externalRemove",t=>Promise.resolve(new Ya(t)))})}class Ka{distance=200;duration=.4;easing="ease-out-quad";factor=100;maxSpeed=50;restore;speed=1;constructor(){this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){E(t)||(ee(this,"distance",t.distance),ee(this,"duration",t.duration),ee(this,"easing",t.easing),ee(this,"factor",t.factor),ee(this,"speed",t.speed),ee(this,"maxSpeed",t.maxSpeed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}}class Qa extends Ka{selectors=[];load(t){super.load(t),E(t)||ee(this,"selectors",t.selectors)}}class Za extends Ka{divs;load(t){super.load(t),E(t)||(this.divs=bt(t.divs,t=>{const e=new Qa;return e.load(t),e}))}}const to="repulse";class eo extends Ti{handleClickMode;#K;#F;#V;#Q;#p;#H;constructor(t,e){super(e),this.#p=t,this.#V=0,this.#Q=O.origin,this.#F=new Set,this.#K=O.origin,this.#H=new Map,e.repulse??={particles:[]},this.handleClickMode=(t,i)=>{const s=this.container.actualOptions,n=s.interactivity?.modes.repulse;if(!n||t!==to)return;e.repulse??={particles:[]};const a=e.repulse;a.clicking=!0,a.count=0;for(const t of e.repulse.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);a.particles=[],a.finish=!1,setTimeout(()=>{e.destroyed||(a.clicking=!1)},n.duration*r)}}get maxDistance(){return this.#V}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.repulse;e&&(this.#V=e.distance,t.retina.repulseModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#F.clear();const e=this.container.actualOptions,i=t.status===Ai,s=e.interactivity?.events;if(!s)return;const n=s.onHover,a=n.enable,o=n.mode,r=s.onClick,c=r.enable,l=r.mode,d=s.onDiv;i&&a&&ht(to,o)?this.#Z(t):c&&ht(to,l)?this.#tt(t):Wi(to,d,(e,i)=>{this.#et(t,e,i)}),this.#q()}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const a=n.onDiv,o=n.onHover,r=n.onClick,c=Ui(to,a);if(!(c||o.enable&&s.position||r.enable&&s.clickPosition))return!1;const l=o.mode,d=r.mode;return ht(to,l)||ht(to,d)||c}loadModeOptions(t,...e){ae(t,"repulse",Za,...e)}reset(){}#tt(t){const e=this.container,i=e.actualOptions.interactivity?.modes.repulse;if(!i)return;const s=e.repulse??{particles:[]};if(s.finish||(s.count??=0,s.count++,s.count===e.particles.count&&(s.finish=!0)),s.clicking){const n=e.retina.repulseModeDistance;if(!n||n<0)return;const a=Math.pow(n/6,3),o=t.mouse.clickPosition;if(void 0===o)return;const r=new Kt(o.x,o.y,a),c=e.particles.grid.query(r,e=>this.isEnabled(t,e));for(const t of c){const{dx:e,dy:n,distance:r}=G(o,t.position),c=r**2,l=-a*i.speed/c;c<=a&&(this.#B(t),s.particles.push(t),this.#K.x=e,this.#K.y=n,this.#K.length=l,t.velocity.setTo(this.#K))}}else if(!1===s.clicking){for(const t of s.particles)t.velocity.setTo(t.initialVelocity);s.particles=[]}}#Z(t){const e=this.container,i=t.mouse.position,s=e.retina.repulseModeDistance;!s||s<0||!i||this.#it(t,i,s,new Kt(i.x,i.y,s))}#it(t,e,i,s,n){const a=this.container,o=a.particles.grid.query(s,e=>this.isEnabled(t,e)),r=a.actualOptions.interactivity?.modes.repulse;if(!r)return;const{easing:c,speed:l,factor:d,maxSpeed:h}=r,u=this.#p.getEasing(c),p=(n?.speed??l)*d;for(const t of o){const{dx:s,dy:n,distance:a}=G(t.position,e),o=B(u(1-a/i)*p,0,h);this.#Q.x=a?s/a*o:p,this.#Q.y=a?n/a*o:p,this.#B(t),t.position.addTo(this.#Q)}}#q(){const t=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!t?.enable||!this.#H.size)return;const e=Date.now(),i=t.delay*r,s=Math.max(.001,Math.min(1,t.speed));for(const[n,a]of this.#H){if(this.#F.has(n))continue;if(n.destroyed){this.#H.delete(n);continue}const o=a.target;if(e-a.lastInteractionTime<i)continue;t.follow&&n.options.move.enable&&(o.x+=n.velocity.x,o.y+=n.velocity.y,o.z+=n.velocity.z);const r=o.x-n.position.x,c=o.y-n.position.y,l=o.z-n.position.z;n.position.x+=r*s,n.position.y+=c*s,n.position.z+=l*s,Math.abs(r)<=.5&&Math.abs(c)<=.5&&(n.position.x=o.x,n.position.y=o.y,n.position.z=o.z,this.#H.delete(n))}}#et(t,e,i){const s=this.container,n=s.actualOptions.interactivity?.modes.repulse;if(!n)return;const a=ct().querySelectorAll(e);a.length&&a.forEach(e=>{const a=e,r=s.retina.pixelRatio,c={x:(a.offsetLeft+a.offsetWidth*o)*r,y:(a.offsetTop+a.offsetHeight*o)*r},l=a.offsetWidth*o*r,d=i.type===Mi.circle?new Kt(c.x,c.y,l):new Qt(a.offsetLeft*r,a.offsetTop*r,a.offsetWidth*r,a.offsetHeight*r),h=ji(n.divs,a);this.#it(t,c,l,d,h)})}#B(t){this.#F.add(t);const e=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!e?.enable)return;const i=Date.now();let s=this.#H.get(t);s||(s={target:t.position.copy(),lastInteractionTime:i},this.#H.set(t,s)),s.lastInteractionTime=i,e.follow&&t.options.move.enable&&(s.target.x+=t.velocity.x,s.target.y+=t.velocity.y,s.target.z+=t.velocity.z)}}async function io(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{$i(t);const e=t.pluginManager;e.addInteractor?.("externalRepulse",t=>Promise.resolve(new eo(e,t)))})}class so{factor=3;radius=200;load(t){E(t)||(ee(this,"factor",t.factor),ee(this,"radius",t.radius))}}class no{enabled=!1;id="slow";priority=100;speedFactor=1}const ao="slow";class oo extends Ti{#V;#U=new WeakMap;constructor(t){super(t),this.#V=0}get maxDistance(){return this.#V}clear(t,e,i){const s=this.#U.get(t);s?.enabled&&!i||(t.removeModifier(ao),this.#U.delete(t))}getOrCreateModifier(t){let e=this.#U.get(t);return e||(e=new no,this.#U.set(t,e),t.addModifier(e)),e}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.slow;e&&(this.#V=e.radius,t.retina.slowModeRadius=e.radius*t.retina.pixelRatio)}interact(){}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&ht(ao,n.onHover.mode)}loadModeOptions(t,...e){ae(t,"slow",so,...e)}reset(t,e){const i=this.#U.get(e);i&&(i.enabled=!1);const s=this.container,n=s.actualOptions,a=t.mouse.position,o=s.retina.slowModeRadius,r=n.interactivity?.modes.slow;if(!r||!o||o<0||!a)return;const c=Y(a,e.getPosition()),l=c/o,d=r.factor;if(c>o)return;const h=this.getOrCreateModifier(e);h.enabled=!0,h.speedFactor=l/d}}async function ro(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{$i(t),t.pluginManager.addInteractor?.("externalSlow",t=>Promise.resolve(new oo(t)))})}const co=["image","images"],lo=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function ho(t){return new Promise(e=>{t.loading=!0;const i=new Image;t.element=i,i.addEventListener("load",()=>{t.loading=!1,e()}),i.addEventListener("error",()=>{t.element=void 0,t.error=!0,t.loading=!1,Lt().error(`Error loading image: ${t.source}`),e()}),i.src=t.source})}async function uo(t){if("svg"!==t.type)return void await ho(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(Lt().error("Image not found"),t.error=!0),t.loading=!1}function po(t,e,i,s,n=!1,a,o){const r=function(t,e,i,s=!1,n,a){const{svgData:o}=t;if(!o)return"";const r=ci(e,s,i,n,a);if(o.includes("fill"))return o.replaceAll(lo,()=>r);const c=o.indexOf(">");return`${o.substring(0,c)} fill="${r}"${o.substring(c)}`}(t,i,s.opacity?.value??1,n,a,o),c={color:i,data:{...t,svgData:r},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise(e=>{const i=new Blob([r],{type:"image/svg+xml"}),s=URL.createObjectURL(i),n=new Image;n.addEventListener("load",()=>{c.loaded=!0,c.element=n,e(c),URL.revokeObjectURL(s)});n.addEventListener("error",()=>{(async()=>{URL.revokeObjectURL(s);const i={...t,error:!1,loading:!0};await ho(i),c.loaded=!0,c.element=i.element,e(c)})()}),n.src=s})}class go{#u;#n;constructor(t,e){this.#n=t,this.#u=e}draw(t){const{context:e,radius:i,particle:s,opacity:n}=t,a=s.image,o=a?.element;if(a){if(e.globalAlpha=n,o){const t=a.ratio,s={x:-i,y:-i},n=2*i;e.drawImage(o,s.x,s.y,n,n/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(!e.preload||!this.#n.loadImage)return;const i=[];for(const s of e.preload)i.push(this.#n.loadImage(t,s));await Promise.all(i)}loadShape(t){const e=this.#u;if(!t.shape||!co.includes(t.shape))return;const i=t.shapeData;if(!i)return;const s=this.#n.getImages?.(e),n=s?.find(t=>t.name===i.name||t.source===i.src);n||this.#st(e,i).then(()=>{this.loadShape(t)})}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;const i=this.#n.getImages?.(t),s=e.shapeData;if(!s)return;const n=e.getFillColor(),a=i?.find(t=>t.name===s.name||t.source===s.src);if(!a)return;const o=s.replaceColor;a.loading?setTimeout(()=>{this.particleInit(t,e)}):(async()=>{let i;i=a.svgData&&n?await po(a,s,n,e,t.hdr,t.peakNits,t.hdrMode):{color:n,data:a,element:a.element,loaded:!0,ratio:s.width&&s.height?s.width/s.height:a.ratio??1,replaceColor:o,source:s.src},i.ratio||(i.ratio=1);const r={image:i,close:s.close??e.shapeClose};e.image=r.image,e.shapeClose=r.close})()}#st=async(t,e)=>{if(!this.#n.loadImage)throw new Error("Image shape not initialized");await this.#n.loadImage(t,{name:e.name,replaceColor:e.replaceColor,src:e.src})}}class fo{height;name;replaceColor;src="";width;load(t){E(t)||(ee(this,"height",t.height),ee(this,"name",t.name),ee(this,"replaceColor",t.replaceColor),ee(this,"src",t.src),ee(this,"width",t.width))}}class mo{id="image-preloader";#n;constructor(t){this.#n=t}async getPlugin(t){const{ImagePreloaderInstance:e}=await Promise.resolve().then(function(){return hc});return new e(this.#n,t)}loadOptions(t,e,i){if(!i?.preload)return;e.preload??=[];const s=e.preload;for(const t of i.preload){const e=s.find(e=>e.name===t.name||e.src===t.src);if(e)e.load(t);else{const e=new fo;e.load(t),s.push(e)}}}needsPlugin(){return!0}}async function yo(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{!function(t){t.getImages??=e=>{t.images??=new Map;let i=t.images.get(e);return i||(i=[],t.images.set(e,i)),i},t.loadImage??=async(e,i)=>{if(!t.getImages)throw new Error("No images collection found");if(!i.name&&!i.src)throw new Error("No image source provided");t.images??=new Map;const s=t.getImages(e);if(!s.some(t=>t.name===i.name||t.source===i.src))try{const n={name:i.name??i.src,source:i.src,type:i.src.substring(i.src.length-3),error:!1,loading:!0,replaceColor:i.replaceColor,ratio:i.width&&i.height?i.width/i.height:void 0};let a;s.push(n),t.images.set(e,s),a=i.replaceColor?uo:ho,await a(n)}catch{throw new Error(`${i.name??i.src} not found`)}}}(t),t.pluginManager.addPlugin(new mo(t)),t.pluginManager.addShape(co,e=>Promise.resolve(new go(t,e)))})}class vo extends xe{sync=!1;load(t){E(t)||(super.load(t),ee(this,"sync",t.sync))}}class bo extends xe{sync=!1;load(t){E(t)||(super.load(t),ee(this,"sync",t.sync))}}class wo{count=0;delay=new vo;duration=new bo;load(t){E(t)||(ee(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class xo{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const s=i.delay.sync?1:A(),n=i.duration.sync?1:A();t.life={delay:e.retina.reduceFactor?W(i.delay.value)*s/e.retina.reduceFactor*r:0,delayTime:0,duration:e.retina.reduceFactor?W(i.duration.value)*n/e.retina.reduceFactor*r:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){ae(t,"life",wo,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const a=N(0,i.width),o=N(0,i.width);t.position.x=U(a),t.position.y=U(o),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const c=t.options.life;c&&(s.delay=W(c.delay.value)*r,s.duration=W(c.duration.value)*r)}(t,e,this.#u.canvas.size)}}async function Mo(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new xo(t)))})}class Po{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.shapeData;e.moveTo(-s,0),e.lineTo(s,0),e.lineCap=n?.cap??"butt"}(t)}getSidesCount(){return 1}}async function ko(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["line"],()=>Promise.resolve(new Po))})}class Co{distance=200;enable=!1;rotate;constructor(){this.rotate={x:3e3,y:3e3}}load(t){if(!E(t)&&(ie(this,"distance",t.distance),ee(this,"enable",t.enable),t.rotate)){const e=t.rotate.x;void 0!==e&&(this.rotate.x=e);const i=t.rotate.y;void 0!==i&&(this.rotate.y=i)}}}class Oo extends Ei{#V;constructor(t){super(t),this.#V=0}get maxDistance(){return this.#V}clear(){}init(){}interact(t){if(!t.options.attract?.enable)return;const e=this.container;if(E(t.attractDistance)){const i=W(t.options.attract.distance);i>this.#V&&(this.#V=i),t.attractDistance=i*e.retina.pixelRatio}const i=t.attractDistance,s=t.getPosition(),n=e.particles.grid.queryCircle(s,i);for(const e of n){if(t===e||!e.options.attract?.enable||e.destroyed||e.spawning)continue;const i=e.getPosition(),{dx:n,dy:a}=G(s,i),o=t.options.attract.rotate,r=n/(1e3*o.x),c=a/(1e3*o.y),l=e.size.value/t.size.value,d=1/l;t.velocity.x-=r*l,t.velocity.y-=c*l,e.velocity.x+=r*d,e.velocity.y+=c*d}}isEnabled(t){return t.options.attract?.enable??!1}loadParticlesOptions(t,...e){ae(t,"attract",Co,...e)}reset(){}}async function zo(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{$i(t),t.pluginManager.addInteractor?.("particlesAttract",t=>Promise.resolve(new Oo(t)))})}var Do;!function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy"}(Do||(Do={}));class So{speed=2;load(t){E(t)||ee(this,"speed",t.speed)}}class Io{enable=!0;retries=0;load(t){E(t)||(ee(this,"enable",t.enable),ee(this,"retries",t.retries))}}class To{absorb=new So;bounce=new Te;enable=!1;maxSpeed=50;mode=Do.bounce;overlap=new Io;load(t){E(t)||(this.absorb.load(t.absorb),this.bounce.load(t.bounce),ee(this,"enable",t.enable),ie(this,"maxSpeed",t.maxSpeed),ee(this,"mode",t.mode),this.overlap.load(t.overlap))}}function Eo(t,e,i,s,n,a){if(!t.options.collisions||!i.options.collisions)return;const o=B(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 Ro=t=>{t.options.collisions&&(t.collisionMaxSpeed??=W(t.options.collisions.maxSpeed),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed))};function Lo(t,e){const i=t.getMass(),s=e.getMass(),n=t.velocity.length,a=e.velocity.length,o=i*n*n+s*a*a;vt(yt(t),yt(e));const r=t.velocity.length,c=e.velocity.length,l=i*r*r+s*c*c;if(l>1e-6*o){const i=Math.sqrt(o/l);Math.abs(i-1)>1e-4&&(t.velocity.length=r*i,e.velocity.length=c*i)}Ro(t),Ro(e)}function _o(t,e,i,s){if(t.options.collisions&&e.options.collisions)switch(t.options.collisions.mode){case Do.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?Eo(t,n,e,a,i,s):Eo(e,a,t,n,i,s))}(t,e,i,s);break;case Do.bounce:Lo(t,e);break;case Do.destroy:!function(t,e){t.unbreakable||e.unbreakable||Lo(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 Ao extends Ei{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||_o(t,e,i,s.retina.pixelRatio)}}isEnabled(t){return!!t.options.collisions?.enable}loadParticlesOptions(t,...e){ae(t,"collisions",To,...e)}reset(){}}class Fo{id="overlap";async getPlugin(t){const{OverlapPluginInstance:e}=await Promise.resolve().then(function(){return uc});return new e(t)}loadOptions(){}needsPlugin(){return!0}}async function Vo(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{$i(t),t.pluginManager.addPlugin(new Fo),t.pluginManager.addInteractor?.("particlesCollisions",t=>Promise.resolve(new Ao(t)))})}class Ho extends Kt{#nt;constructor(t,e,i,s){super(t,e,i),this.#nt=s}contains(t){if(super.contains(t))return!0;const{width:e,height:i}=this.#nt,{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.#nt,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 Kt)n=new Kt(i.x,i.y,t.radius);else{const e=t;n=new Qt(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(n))return!0}return!1}}class Bo{blur=5;color=new de;enable=!1;constructor(){this.color.value="#000"}load(t){E(t)||(ee(this,"blur",t.blur),this.color=de.create(this.color,t.color),ee(this,"enable",t.enable))}}class qo{color;enable=!1;frequency=1;opacity;load(t){E(t)||(void 0!==t.color&&(this.color=de.create(this.color,t.color)),ee(this,"enable",t.enable),ee(this,"frequency",t.frequency),ee(this,"opacity",t.opacity))}}class Uo{blink=!1;color=new de;consent=!1;distance=100;enable=!1;frequency=1;id;opacity=1;shadow=new Bo;triangles=new qo;warp=!1;width=1;constructor(){this.color.value="#fff"}load(t){E(t)||(ee(this,"id",t.id),ee(this,"blink",t.blink),this.color=de.create(this.color,t.color),ee(this,"consent",t.consent),ee(this,"distance",t.distance),ee(this,"enable",t.enable),ee(this,"frequency",t.frequency),ee(this,"opacity",t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),ee(this,"width",t.width),ee(this,"warp",t.warp))}}function Wo(t,e,i){const{dx:s,dy:n}=G(t,e),a={x:Math.abs(s),y:Math.abs(n)},o={x:Math.min(a.x,i.width-a.x),y:Math.min(a.y,i.height-a.y)};return Math.hypot(o.x,o.y)}class jo extends Ei{#V;#p;constructor(t,e){super(e),this.#p=t,this.#V=0}get maxDistance(){return this.#V}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.#V&&(this.#V=t.linksDistance);const e=t.getPosition(),i=this.container,s=i.canvas.size;if(e.x<c.x||e.y<c.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,l=r?new Ho(e.x,e.y,o,s):new Kt(e.x,e.y,o),d=i.particles.grid.query(l);for(const i of d){const l=i.options.links;if(t===i||!l?.enable||n.id!==l.id||i.spawning||i.destroyed||!i.links||t.links.some(t=>t.destination===i)||i.links.some(e=>e.destination===t))continue;const d=i.getPosition();if(d.x<c.x||d.y<c.y||d.x>s.width||d.y>s.height)continue;const h=G(e,d).distance,u=r&&l.warp?Wo(e,d,s):h,p=Math.min(h,u);if(p>o)continue;const g=(1-p/o)*a;this.#at(t),t.links.push({destination:i,opacity:g,color:this.#ot(t,i),isWarped:u<h})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){ae(t,"links",Uo,...e)}reset(){}#ot(t,e){const i=this.container,s=t.options.links;if(!s)return;return di(t,e,void 0!==s.id?i.particles.linksColors.get(s.id):i.particles.linksColor,i.hdr)}#at(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=hi(this.#p,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s))}}class $o{id="links";#p;constructor(t){this.#p=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return gc});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function No(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;$i(t),e.addPlugin(new $o(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new jo(e,t)))})}const Go=new Map;function Xo(t,e){const{context:i,radius:s}=t,n=function(t){const e=Go.get(t);if(e)return e;const i=u/t,s=!!(t%2),n=(-Math.PI+(s?0:i))*o,a=[];for(let e=0;e<t;e++){const t=n+e*i;a[e]={x:Math.cos(t),y:Math.sin(t)}}return Go.set(t,a),a}(e.count.numerator/e.count.denominator);i.beginPath();for(let t=0;t<n.length;t++){const e=n[t];if(!e)continue;const a=e.x*s,o=e.y*s;t?i.lineTo(a,o):i.moveTo(a,o)}i.closePath()}class Yo{draw(t){const{particle:e,radius:i}=t;Xo(t,this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round(W(e?.sides??5))}}class Jo extends Yo{getSidesData(t,e){const{sides:i}=t;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class Ko extends Yo{getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:1,numerator:3},length:2.66*e/1}}}async function Qo(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["polygon"],()=>Promise.resolve(new Jo))})}async function Zo(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["triangle"],()=>Promise.resolve(new Ko))})}async function tr(t){t.checkVersion("4.4.0"),await Promise.all([Qo(t),Zo(t)])}class er{decay=0;enable=!1;speed=0;sync=!1;load(t){E(t)||(ee(this,"enable",t.enable),ie(this,"speed",t.speed),ie(this,"decay",t.decay),ee(this,"sync",t.sync))}}class ir extends xe{animation=new er;direction=t.RotateDirection.clockwise;path=!1;load(t){E(t)||(super.load(t),ee(this,"direction",t.direction),this.animation.load(t.animation),ee(this,"path",t.path))}}class sr{#u;constructor(t){this.#u=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:K(W(i.value)),min:0,max:u},e.pathRotation=i.path;let s=i.direction;if(s===t.RotateDirection.random){s=Math.floor(2*A())>0?t.RotateDirection.counterClockwise:t.RotateDirection.clockwise}switch(s){case t.RotateDirection.counterClockwise:case"counterClockwise":e.rotate.status=t.AnimationStatus.decreasing;break;case t.RotateDirection.clockwise:e.rotate.status=t.AnimationStatus.increasing}const n=i.animation;n.enable&&(e.rotate.decay=1-W(n.decay),e.rotate.velocity=W(n.speed)/360*this.#u.retina.reduceFactor,n.sync||(e.rotate.velocity*=A())),e.rotation=e.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){ae(t,"rotate",ir,...e)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(bn(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function nr(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new sr(t)))})}class ar{draw(t){!function(t){const{context:e,radius:i}=t,s=i*Math.SQRT1_2,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}async function or(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new ar))})}const rr=0,cr=0;class lr{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.sides,a=i.starInset??2;e.moveTo(rr,cr-s);for(let t=0;t<n;t++)e.rotate(Math.PI/n),e.lineTo(rr,cr-s*a),e.rotate(Math.PI/n),e.lineTo(rr,cr-s)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round(W(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=W(i?.inset??2)}}async function dr(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["star"],()=>Promise.resolve(new lr))})}async function hr(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{await Promise.all([qn(t),(async t=>{await async function(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new Ii(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([Ha(t),ea(t),da(t),ba(t),Ca(t),Ta(t),Aa(t),Ua(t),Na(t),Ja(t),io(t),ro(t),zo(t),Vo(t),No(t)])})(t),Wn(t),Yn(t),yo(t),ko(t),tr(t),or(t),dr(t),Mo(t),En(t),nr(t)])})}const ur=["text","character","char","multiline-text"];function pr(t,e,i,s,n,a){const r={x:-e.length*i*o,y:i*o+s*i};n&&t.fillText(e,r.x,r.y),a&&t.strokeText(e,r.x,r.y)}class gr{draw(t){!function(t){const{context:e,particle:i,fill:s,stroke:n,radius:a,opacity:o}=t,r=i.shapeData;if(!r)return;const c=r.value;if(i.textLines??=wt(c,i.randomIndexData)?.split("\n")??[],i.maxTextLength??=i.textLines.length?Math.max(...i.textLines.map(t=>t.length)):i.textLines[0]?.length??0,!i.textLines.length||!i.maxTextLength)return;const l=i.textLines,d=r.style??"",h=r.weight??"400",u=r.font??"Verdana",p=2*Math.round(a)/(l.length*i.maxTextLength);e.font=`${d} ${h} ${p.toString()}px "${u}"`;const g=e.globalAlpha;e.globalAlpha=o;for(let t=0;t<l.length;t++){const i=l[t];i&&pr(e,i,p,t,s,n)}e.globalAlpha=g}(t)}async init(t){const e=t.actualOptions;if(ur.find(t=>ht(t,e.particles.shape.type))){const t=ur.map(t=>e.particles.shape.options[t]).find(t=>!!t),i=[];bt(t,t=>{i.push(Nn(t.font,t.weight))}),await Promise.all(i)}}particleInit(t,e){if(!e.shape||!ur.includes(e.shape))return;const i=e.shapeData;if(void 0===i)return;const s=i.value;s&&(e.textLines=wt(s,e.randomIndexData)?.split("\n")??[],e.maxTextLength=e.textLines.length?Math.max(...e.textLines.map(t=>t.length)):e.textLines[0]?.length??0)}}async function fr(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(ur,()=>Promise.resolve(new gr))})}var mr;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(mr||(mr={}));class yr{decay=0;enable=!1;speed=0;sync=!1;load(t){E(t)||(ee(this,"enable",t.enable),ie(this,"speed",t.speed),ie(this,"decay",t.decay),ee(this,"sync",t.sync))}}class vr extends xe{animation=new yr;direction=mr.clockwise;enable=!1;load(t){super.load(t),E(t)||(this.animation.load(t.animation),ee(this,"direction",t.direction),ee(this,"enable",t.enable))}}class br{#u;constructor(t){this.#u=t}getTransformValues(t){const e=t.tilt?.enable&&t.tilt;return{b:e?Math.cos(e.value)*e.cosDirection:void 0,c:e?Math.sin(e.value)*e.sinDirection:void 0}}init(e){const i=e.options.tilt;if(!i)return;e.tilt={enable:i.enable,value:K(W(i.value)),sinDirection:A()>=o?1:-1,cosDirection:A()>=o?1:-1,min:0,max:u};let s=i.direction;if(s===mr.random){s=Math.floor(2*A())>0?mr.counterClockwise:mr.clockwise}switch(s){case mr.counterClockwise:case"counterClockwise":e.tilt.status=t.AnimationStatus.decreasing;break;case mr.clockwise:e.tilt.status=t.AnimationStatus.increasing}const n=e.options.tilt?.animation;n?.enable&&(e.tilt.decay=1-W(n.decay),e.tilt.velocity=W(n.speed)/360*this.#u.retina.reduceFactor,n.sync||(e.tilt.velocity*=A()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){ae(t,"tilt",vr,...e)}update(e,i){this.isEnabled(e)&&e.tilt&&bn(e,e.tilt,!1,t.DestroyType.none,i)}}async function wr(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("tilt",t=>Promise.resolve(new br(t)))})}class xr{color;enable=!1;frequency=.05;opacity=1;load(t){E(t)||(void 0!==t.color&&(this.color=de.create(this.color,t.color)),ee(this,"enable",t.enable),ee(this,"frequency",t.frequency),ie(this,"opacity",t.opacity))}}class Mr{enable=!1;fillColor;frequency=.05;opacity=1;strokeColor;load(t){E(t)||(void 0!==t.fillColor&&(this.fillColor=de.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=de.create(this.strokeColor,t.strokeColor)),ee(this,"enable",t.enable),ee(this,"frequency",t.frequency),ie(this,"opacity",t.opacity))}}class Pr{links=new xr;particles=new Mr;load(t){E(t)||(this.links.load(t.links),this.particles.load(t.particles))}}class kr{#u;#p;constructor(t,e){this.#p=t,this.#u=e}getColorStyles(t,e,i,s){const n=t.options,a=this.#u,o=n.twinkle;if(!o)return{};const r=o.particles,c=r.enable&&A()<r.frequency,l=t.options.zIndex,d=(1-t.zIndexFactor)**l.opacityRate,h=c?W(r.opacity)*d:s,u=Ze(this.#p,r.fillColor),p=Ze(this.#p,r.strokeColor),g=(()=>{if(u)return ci(u,a.hdr,h,a.peakNits,a.hdrMode)})(),f=(()=>{if(p)return ci(p,a.hdr,h,a.peakNits,a.hdrMode)})(),m={},y=c&&(!!g||!!f);return m.fill=y?g:void 0,m.stroke=y?f:void 0,m}init(){}isEnabled(t){const e=t.options.twinkle;return!!e&&e.particles.enable}loadOptions(t,...e){ae(t,"twinkle",Pr,...e)}update(){}}async function Cr(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("twinkle",e=>Promise.resolve(new kr(t.pluginManager,e)))})}class Or{angle=50;move=10;load(t){E(t)||(ie(this,"angle",t.angle),ie(this,"move",t.move))}}class zr{distance=5;enable=!1;speed=new Or;load(t){if(!E(t)&&(ie(this,"distance",t.distance),ee(this,"enable",t.enable),void 0!==t.speed))if(S(t.speed))this.speed.load({angle:t.speed});else{const e=t.speed;"min"in e?this.speed.load({angle:e}):this.speed.load(t.speed)}}}class Dr{#u;constructor(t){this.#u=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:A()*u,angleSpeed:W(e.speed.angle)/360,moveSpeed:W(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=W(e?.distance??0)*this.#u.retina.pixelRatio}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.options.wobble?.enable}loadOptions(t,...e){ae(t,"wobble",zr,...e)}update(t,e){this.isEnabled(t)&&function(t,e,i){const{wobble:s}=e.options,{wobble:n}=e;if(!s?.enable||!n)return;const a=t.retina.reduceFactor,o=n.angleSpeed*i.factor*a,r=n.moveSpeed*i.factor*a*(e.retina.wobbleDistance??0)/16.666666666666668,c=u,{position:l}=e;n.angle+=o,n.angle>c&&(n.angle-=c),l.x+=r*Math.cos(n.angle),l.y+=r*Math.abs(Math.sin(n.angle))}(this.#u,t,e)}}async function Sr(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("wobble",t=>Promise.resolve(new Dr(t)))})}async function Ir(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{const e=async t=>{await Is(t),await Promise.all([Rs(t),Vs(t)])};await Promise.all([(async t=>{await hr(t),await Promise.all([Us(t),Ys(t),es(t),e(t)])})(t),us(t),tn(t),wr(t),Cr(t),Sr(t),fr(t)])})}var Tr;!function(t){t.screen="screen",t.window="window",t.canvas="canvas"}(Tr||(Tr={}));class Er{maxWidth=1/0;mode=Tr.canvas;options={};load(t){E(t)||(E(t.maxWidth)||(this.maxWidth=t.maxWidth),E(t.mode)||(t.mode===Tr.screen?this.mode=Tr.screen:this.mode=Tr.canvas),E(t.options)||(this.options=mt({},t.options)))}}class Rr{id="responsive";async getPlugin(t){const{ResponsivePluginInstance:e}=await Promise.resolve().then(function(){return fc});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;if(e.setResponsive=(t,i,s)=>{e.load(s);const n=t/i,a={[Tr.screen]:screen.availWidth,[Tr.window]:innerWidth,[Tr.canvas]:n},o=e.responsive?.find(t=>t.maxWidth>a[t.mode]);return e.load(o?.options),o?.maxWidth},e.responsive??=[],void 0!==i?.responsive)for(const t of i.responsive){const i=new Er;t&&i.load(t),e.responsive.push(i)}e.responsive.sort((t,e)=>t.maxWidth-e.maxWidth)}needsPlugin(t){return!!t?.responsive?.length}}async function Lr(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Rr)})}const _r=async t=>{t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{await Promise.all([Ir(t),Lr(t)])});const{particlesJS:e,pJSDom:i}=(t=>{const e=async(e,i)=>{const s=mt({},wi,i);return await t.load({id:e,options:{fullScreen:{enable:!1},detectRetina:s.retina_detect,smooth:!0,interactivity:{detectsOn:s.interactivity.detect_on,events:{onHover:{enable:s.interactivity.events.onhover.enable,mode:s.interactivity.events.onhover.mode},onClick:{enable:s.interactivity.events.onclick.enable,mode:s.interactivity.events.onclick.mode}},modes:{grab:{distance:s.interactivity.modes.grab.distance,links:{opacity:s.interactivity.modes.grab.line_linked.opacity}},bubble:{distance:s.interactivity.modes.bubble.distance,size:s.interactivity.modes.bubble.size,duration:s.interactivity.modes.bubble.duration,opacity:s.interactivity.modes.bubble.opacity,speed:s.interactivity.modes.bubble.speed},repulse:{distance:s.interactivity.modes.repulse.distance,duration:s.interactivity.modes.repulse.duration},push:{quantity:s.interactivity.modes.push.particles_nb},remove:{quantity:s.interactivity.modes.remove.particles_nb}}},particles:{attract:{enable:s.particles.move.attract.enable,rotate:{x:s.particles.move.attract.rotateX,y:s.particles.move.attract.rotateY}},collisions:{enable:s.particles.move.bounce},number:{value:s.particles.number.value,density:{enable:s.particles.number.density.enable,width:s.particles.number.density.value_area}},color:{value:s.particles.color.value},stroke:{width:s.particles.shape.stroke.width,color:{value:s.particles.shape.stroke.color}},shape:{type:s.particles.shape.type,options:{polygon:{sides:s.particles.shape.polygon.nb_sides},image:{src:s.particles.shape.image.src,width:s.particles.shape.image.width,height:s.particles.shape.image.height}}},opacity:{value:s.particles.opacity.random?{min:s.particles.opacity.anim.enable?s.particles.opacity.anim.opacity_min:0,max:s.particles.opacity.value}:s.particles.opacity.value,animation:{enable:s.particles.opacity.anim.enable,speed:s.particles.opacity.anim.speed,sync:s.particles.opacity.anim.sync}},size:{value:s.particles.size.random?{min:s.particles.size.anim.enable?s.particles.size.anim.size_min:0,max:s.particles.size.value}:s.particles.size.value,animation:{enable:s.particles.size.anim.enable,speed:s.particles.size.anim.speed,sync:s.particles.size.anim.sync}},links:{enable:s.particles.line_linked.enable,distance:s.particles.line_linked.distance,color:s.particles.line_linked.color,opacity:s.particles.line_linked.opacity,width:s.particles.line_linked.width},move:{enable:s.particles.move.enable,speed:s.particles.move.speed/3,direction:s.particles.move.direction,random:s.particles.move.random,straight:s.particles.move.straight,outModes:s.particles.move.out_mode}},resize:{enable:s.interactivity.events.resize}}})};return e.load=(e,i,s)=>{t.load({id:e,url:i}).then(t=>{s(t)}).catch(()=>{s(void 0)})},e.setOnClickHandler=e=>{t.pluginManager.setOnClickHandler?.(e)},{particlesJS:e,pJSDom:t.items}})(t);globalThis.particlesJS=e,globalThis.pJSDom=i,globalThis.Particles=bi},Ar=globalThis;Ar.initPjs=_r,Ar.tsParticles=vi;function Fr(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Vr{#rt;#ct;#lt;#dt;#ht;#u;#ut;#pt;#gt;#ft;#mt;#yt;#p;#vt;#bt;#wt={};#xt=[void 0,void 0];#Mt={};constructor(t,e,i){this.#p=t,this.#u=e,this.#dt=i,this.#ut=null,this.#rt=null,this.#ct=new Set,this.#bt=[],this.#vt=[],this.#lt=[],this.#ht=[],this.#gt=[],this.#ft=[],this.#mt=[],this.#yt={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#pt}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(c.x,c.y,this.#dt.size.width,this.#dt.size.height)})}clear(){for(const t of this.#lt)if(t.canvasClear?.())return;for(const e of Object.values(t.DrawLayer))if("number"==typeof e)for(const t of this.#Pt(e))if(t.canvasClear?.())return;this.canvasClear()}destroy(){this.stop(),this.#rt=null,this.#ct.clear(),this.#bt=[],this.#vt=[],this.#lt=[],this.#ht=[],this.#gt=[],this.#ft=[],this.#mt=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#yt[e]=[])}draw(t){const e=this.#ut;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.#kt(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,c=t.options.zIndex,l=1-t.zIndexFactor,{fillOpacity:d,opacity:h,strokeOpacity:u}=t.getOpacity(),p=this.#Mt,g=this.#wt,f=a?ci(a,r.hdr,d*h,r.peakNits,r.hdrMode):void 0,m=o?ci(o,r.hdr,u*h,r.peakNits,r.hdrMode):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=m,this.draw(s=>{for(const i of this.#mt)i.drawParticleSetup?.(s,t,e);this.#Ct(s,t,i,h,g,p),this.#Ot({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*l**c.sizeRate,opacity:h,transform:p}),this.#zt(t);for(const i of this.#ft)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#gt)this.#Dt(i,s,t,e)})}drawParticles(e){const{particles:i,actualOptions:s}=this.#u;this.clear(),i.update(e),this.draw(n=>{const a=this.#dt.size.width,o=this.#dt.size.height;if(this.#rt)try{n.drawImage(this.#rt,c.x,c.y,a,o)}catch{this.#St("background-element-draw-error","Error drawing background element onto canvas")}const r=s.background;if(r.draw)try{r.draw(n,e)}catch{this.#St("background-draw-error","Error in background.draw callback")}for(const e of this.#Pt(t.DrawLayer.BackgroundMask))e.canvasPaint?.();for(const i of this.#Pt(t.DrawLayer.CanvasSetup))i.drawSettingsSetup?.(n,e);for(const i of this.#Pt(t.DrawLayer.PluginContent))i.draw?.(n,e);i.drawParticles(e);for(const i of this.#Pt(t.DrawLayer.CanvasCleanup))i.clearDraw?.(n,e),i.drawSettingsCleanup?.(n,e)})}init(){this.initUpdaters(),this.initPlugins(),this.#It(),this.paint()}initPlugins(){this.#lt=[],this.#ht=[],this.#gt=[],this.#mt=[],this.#ft=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#yt[e]=[]);for(const e of this.#u.plugins)(e.particleFillColor??e.particleStrokeColor)&&this.#ht.push(e),e.drawParticle&&this.#gt.push(e),e.drawParticleSetup&&this.#mt.push(e),e.drawParticleCleanup&&this.#ft.push(e),e.canvasClear&&this.#lt.push(e),e.canvasPaint&&this.#Pt(t.DrawLayer.BackgroundMask).push(e),e.drawSettingsSetup&&this.#Pt(t.DrawLayer.CanvasSetup).push(e),e.draw&&this.#Pt(t.DrawLayer.PluginContent).push(e),(e.clearDraw??e.drawSettingsCleanup)&&this.#Pt(t.DrawLayer.CanvasCleanup).push(e)}initUpdaters(){this.#bt=[],this.#vt=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#vt.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#bt.push(t)}paint(){let e=!1;for(const i of this.#Pt(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(c.x,c.y,this.#dt.size.width,this.#dt.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,c.x,c.y,this.#dt.size.width,this.#dt.size.height),i.globalAlpha=s})}setContext(t){this.#ut=t,this.#ut&&(this.#ut.globalCompositeOperation=i)}setContextSettings(t){this.#pt=t}stop(){this.draw(t=>{t.clearRect(c.x,c.y,this.#dt.size.width,this.#dt.size.height)})}#zt(t){for(const e of this.#vt)e.afterDraw?.(t)}#Ct(t,e,i,s,n,a){for(const o of this.#bt){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)Fr(a,t,e)}o.beforeDraw?.(e)}}#Tt(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#Et(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#Ot(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:c}=t,{effectDrawers:l,shapeDrawers:d}=e,h=s.getPosition(),u=s.getTransformData(c),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 m={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?.(m);const y=s.effect?l.get(s.effect):void 0,v=s.shape?d.get(s.shape):void 0;this.#Et(y,m),this.#Rt(v,m),this.#Lt(v,m),this.#_t(v,m),this.#Tt(y,m),i.resetTransform()}#Dt(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#Lt(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())}#_t(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#Rt(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#Pt(t){return this.#yt[t]}#kt(t){let e,i;for(const s of this.#ht)if(!e&&s.particleFillColor&&(e=Ze(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ze(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#xt[0]=e,this.#xt[1]=i,this.#xt}#It(){const t=this.#u.actualOptions.background;if(this.#rt=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement||"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?this.#rt=e:e?this.#St("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#St("background-element-not-found",`Background element selector "${t.element}" not found`)}}else("undefined"!=typeof HTMLCanvasElement&&t.element instanceof HTMLCanvasElement||"undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas||"undefined"!=typeof HTMLVideoElement&&t.element instanceof HTMLVideoElement||"undefined"!=typeof HTMLImageElement&&t.element instanceof HTMLImageElement)&&(this.#rt=t.element)}#St(t,e){this.#ct.has(t)||(this.#ct.add(t),Lt().warning(e))}}const Hr=new WeakMap;function Br(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 qr{domElement;render;renderCanvas;size;zoom=1;#u;#At;#Ft;#Vt;#Ht;#p;#Bt;#qt;#Ut;#Wt;constructor(t,e){this.#p=t,this.#u=e,this.render=new Vr(t,e,this),this.#Ut={height:0,width:0};const i=e.retina.pixelRatio,s=this.#Ut;this.size={height:s.height*i,width:s.width*i},this.#At=!1,this.#qt=[],this.#Bt="none"}get#jt(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#At){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#$t();this.render.destroy(),this.#qt=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#Wt?this.#Wt:{x:e*o/t,y:i*o/t}}init(){this.#Nt(t=>{t.disconnect()}),this.#Vt=dt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#Gt()}),this.resize(),this.#Xt(),this.#Nt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#Yt(),this.initBackground(),this.#Jt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Ke(this.#p,e.color);if(n){const i=t.actualOptions.hdr;s.backgroundColor=ri(n,t.hdr,e.opacity,i.peakNits,i.mode)}else s.backgroundColor="";s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#qt=[];for(const t of this.#u.plugins)t.resize&&this.#qt.push(t)}loadCanvas(t){this.#At&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#At=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=Hr.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 Hr.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#Ht=Mt(s.style));const n=this.#Ut,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.#Ut,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 c=this.size;return i.width=c.width=o.width,i.height=c.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.#Bt=t,this.#Gt())}setZoom(t,e){this.zoom=t,this.#Wt=e}stop(){this.#Nt(t=>{t.disconnect()}),this.#Vt=void 0,this.#Kt(),this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#Qt(),e&&await t.refresh()}#Qt(){for(const t of this.#qt)t.resize?.()}#Yt(){const t=this.#u,e=t.actualOptions.hdr.enable&<("(color-gamut: p3)")?.matches&<("(dynamic-range: high)")?.matches;t.hdr=e??!1,t.hdrMode=t.actualOptions.hdr.mode,t.peakNits=t.actualOptions.hdr.peakNits;const i=this.renderCanvas;if(!i)return;let s;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...e?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});try{s=i.getContext("2d",this.render.settings)}catch{s=null}if(e&&!s){t.hdr=!1;const e={alpha:!0,desynchronized:!0,willReadFrequently:!1,colorSpace:"srgb"};this.render.setContextSettings(e);try{s=i.getContext("2d",e)}catch{s=null}}this.render.setContext(s)}#Jt(){this.#Kt();const t=lt("(color-gamut: p3)"),e=lt("(dynamic-range: high)"),i=()=>{this.#Zt(),this.#Yt(),this.initBackground()},s=[];t&&(t.addEventListener("change",i),s.push({handler:i,mql:t})),e&&(e.addEventListener("change",i),s.push({handler:i,mql:e})),this.#Ft=s}#Xt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#jt?this.#te():this.#$t();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")}}}#Zt(){const t=this.renderCanvas;t&&(this.domElement||(this.renderCanvas=new OffscreenCanvas(t.width,t.height)))}#Kt(){if(this.#Ft){for(const{handler:t,mql:e}of this.#Ft)e.removeEventListener("change",t);this.#Ft=void 0}}#Gt(){const t=this.domElement;if(!t)return;this.#Nt(t=>{t.disconnect()}),this.#Xt(),this.initBackground();const e=this.#Bt;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#Nt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#$t(){const t=this.domElement,e=this.#Ht;t&&e&&Br(t,e,!0)}#Nt(t){this.#Vt&&t(this.#Vt)}#te(){const t=this.domElement;t&&Br(t,Ct(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Ur{#u;#ee;#ie;#se;constructor(t){this.#u=t,this.#ee={visibilityChange:()=>{this.#ne()},resize:()=>{this.#ae()}}}addListeners(){this.#oe(!0)}removeListeners(){this.#oe(!1)}#ne(){const t=this.#u;t.actualOptions.pauseOnBlur&&(ct().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#ae(){this.#se&&(clearTimeout(this.#se),this.#se=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#se=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*r)}#oe(t){const e=this.#ee;this.#re(t),Ot(document,n,e.visibilityChange,t,!1)}#re(t){const e=this.#ee,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Ot(globalThis,s,e.resize,t);const n=i.canvas.domElement;this.#ie&&!t?(n&&this.#ie.unobserve(n),this.#ie.disconnect(),this.#ie=void 0):!this.#ie&&t&&n&&(this.#ie=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this.#ae()}),this.#ie.observe(n))}}function Wr(t){if(!ht(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 jr(t,e){const i=t%e;return i<0?i+e:i}function $r(t,e,i,s){const n=Ve(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=wt(n.effect.type,t.id,a),t.shape=wt(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=wt(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=wt(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 mt({close:e.close},wt(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 mt({close:e.close},wt(n,i,s))}(t.shape,r,t.id,a):void 0,n.load(s);const c=t.effectData,l=t.shapeData;return c&&n.load(c.particles),l&&n.load(l.particles),t.effectClose=c?.close??n.effect.close,t.shapeClose=l?.close??n.shape.close,n}class Nr{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;#ce={fillOpacity:1,opacity:1,strokeOpacity:1};#le=C.origin;#de={sin:0,cos:0};#he={a:1,b:0,c:0,d:1};#u;#U=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#U.push(t),this.#U.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#U.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.#ue(this.#pe(ui(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*o}getModifier(t){return this.#U.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.#pe(void 0,t=>t.opacity)??i,n=this.fillOpacity??1,a=this.strokeOpacity??1;return this.#ce.fillOpacity=n,this.#ce.opacity=s*e,this.#ce.strokeOpacity=a,this.#ce}getPosition(){return this.#le.x=this.position.x+this.offset.x,this.#le.y=this.position.y+this.offset.y,this.#le.z=this.position.z,this.#le}getRadius(){return this.#pe(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#de.sin=Math.sin(t),this.#de.cos=Math.cos(t),this.#de}getStrokeColor(){return this.#ue(this.#pe(ui(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#he.a=e.cos*(t.a??l.a),this.#he.b=i?e.sin*(t.b??1):t.b??l.b,this.#he.c=i?-e.sin*(t.c??1):t.c??l.c,this.#he.d=e.cos*(t.d??l.d),this.#he}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=$r(this,a,this.#p,s),a.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(a.particleUpdaters,this),this.#ge(i),this.initialVelocity=this.#fe(),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.#me({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#me({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=jr(t,u);return e>=Math.PI*o&&e<3*Math.PI*o}if(this.roll.horizontal){const e=jr(t+Math.PI*o,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=jr(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.#U.findIndex(e=>e.id===t);e>=0&&this.#U.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#pe(t,e){let i=t;for(const t of this.#U)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#ye(t,e){let i=0,s=t?C.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),c=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return C.create(i.x,i.y,e)}const t=st({size:c,position:s}),l=C.create(t.x,t.y,e);this.#ve(l,r,o.left??o.default),this.#ve(l,r,o.right??o.default),this.#be(l,r,o.top??o.default),this.#be(l,r,o.bottom??o.default);let d=!0;for(const t of n.particles.checkParticlePositionPlugins)if(d=t.checkParticlePosition?.(this,l,i)??!0,!d)break;if(d)return l;i+=1,s=void 0}}#fe(){const e=this.options.move,i=Z(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=K(W(e.angle.value)),n=K(W(e.angle.offset)),a={left:n-s*o,right:n+s*o};return e.straight||(i.angle+=U(N(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=A()),i}#ve(e,i,s){Wr({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#be(e,i,s){Wr({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#we(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"}}#xe(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#me(t){const e=this.#we(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.#xe(t.direction,t.outMode),c=a?this.#Me(a(r),"shape"):void 0,l=o?this.#Me(o(r),"effect"):void 0;if(c&&l){const t=Math.max(c.margin??0,l.margin??0);return{inside:c.inside&&l.inside,margin:t>0?t:void 0,reason:"combined"}}return c??l??e}#ue(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?yi(t,this.roll.alter.type,this.roll.alter.value):t:t}#ge(e){const i=this.#u,s=Math.floor(W(this.options.zIndex.value)),n=this.#ye(e,B(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={...xt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=Q(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=O.origin}#Me(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Gr{#Pe;#ke=new Map;#Ce=[];#Oe;#ze;#De=[];#Se;constructor(t){this.#Pe=t,this.#Oe=0,this.#Se=0}clear(){this.#ke.clear();const t=this.#ze;t&&(this.#Pe=t),this.#ze=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Ie(e,i);this.#ke.has(s)||this.#ke.set(s,[]),this.#ke.get(s)?.push(t)}query(t,e,i=[]){const s=this.#Te(t);if(!s)return i;const n=Math.floor(s.minX/this.#Pe),a=Math.floor(s.maxX/this.#Pe),o=Math.floor(s.minY/this.#Pe),r=Math.floor(s.maxY/this.#Pe);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#ke.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.#Ee(t.x,t.y,e),a=this.query(n,i,s);return this.#Re(),a}queryRectangle(t,e,i,s=[]){const n=this.#Le(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Re(),a}setCellSize(t){this.#ze=t}#Ee(t,e,i){return(this.#Ce[this.#Oe++]??=new Kt(t,e,i)).reset(t,e,i)}#Le(t,e,i,s){return(this.#De[this.#Se++]??=new Qt(t,e,i,s)).reset(t,e,i,s)}#Ie(t,e){return`${Math.floor(t/this.#Pe)}_${Math.floor(e/this.#Pe)}`}#Te(t){if(t instanceof Kt){const e=t.radius,{x:i,y:s}=t.position;return{minX:i-e,maxX:i+e,minY:s-e,maxY:s+e}}if(t instanceof Qt){const{x:e,y:i}=t.position,{width:s,height:n}=t.size;return{minX:e,maxX:e+s,minY:i,maxY:i+n}}return null}#Re(){this.#Oe=0,this.#Se=0}}class Xr{checkParticlePositionPlugins;grid;#_e;#u;#Ae;#Fe;#Ve;#He;#Be;#qe;#p;#Ue;#We;#je;#$e;#Ne;#Ge;constructor(t,e){this.#p=t,this.#u=e,this.#Ve=0,this.#_e=[],this.#Ue=[],this.#Fe=0,this.#Ae=new Map,this.#He=new Map,this.#Ge=this.#Xe(this.#u.zLayers),this.grid=new Gr(100),this.checkParticlePositionPlugins=[],this.#Be=[],this.#qe=[],this.#je=[],this.#We=[],this.#Ne=[]}get count(){return this.#_e.length}addParticle(e,i,s,n){const a=this.#u.actualOptions.particles.number.limit.mode,o=void 0===s?this.#Fe:this.#Ae.get(s)??this.#Fe,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.#Ue.pop()??new Nr(this.#p,this.#u);a.init(this.#Ve,e,i,s);let o=!0;return n&&(o=n(a)),o?(this.#_e.push(a),this.#Ye(a),this.#Ve++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this.#Ue.push(a)}catch(t){Lt().warning(`error adding particle: ${t}`)}}clear(){this.#_e=[],this.#He.clear(),this.#Je(this.#u.zLayers)}destroy(){this.#_e=[],this.#Ue.length=0,this.#He.clear(),this.#Ge=[],this.checkParticlePositionPlugins=[],this.#Be=[],this.#qe=[],this.#je=[],this.#We=[],this.#Ne=[]}drawParticles(t){for(let e=this.#Ge.length-1;e>=0;e--){const i=this.#Ge[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#_e.filter(t)}find(t){return this.#_e.find(t)}get(t){return this.#_e[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#Ne=[],this.#qe=[],this.#je=[],this.#Be=[],this.#We=[],this.#He.clear(),this.#Je(t.zLayers),this.grid=new Gr(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#Ne.push(e),e.particleUpdate&&this.#qe.push(e),e.postUpdate&&this.#je.push(e),e.particleReset&&this.#Be.push(e),e.postParticleUpdate&&this.#We.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.#_e.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.#Ke(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=Ve(this.#p,this.#u,s);this.#Qe(n,i,t)}this.#Qe(t.particles,i)}setResizeFactor(t){this.#$e=t}update(t){this.grid.clear();for(const e of this.#Ne)e.update?.(t);const e=this.#Ze(t);for(const e of this.#je)e.postUpdate?.(t);if(this.#ti(t,e),e.size)for(const t of e)this.remove(t);this.#$e=void 0}#ei(...t){this.#Ue.push(...t)}#Qe(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Fe=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Ae.set(i,s?.number.limit.value??n.limit.value));const a=this.#ii(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,c=Math.min(o,r)*a+e,l=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#Fe=n.limit.value*a:this.#Ae.set(i,n.limit.value*a),l<c?this.push(Math.abs(c-l),void 0,t,i):l>c&&this.removeQuantity(l-c,i)}#Xe(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#si(t){const e=this.#Ge.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#ii(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}#Ye(t){const e=this.#si(t.position.z),i=this.#Ge[e];i&&(i.push(t),this.#He.set(t.id,e))}#Ke(e,i,s){const n=this.#_e[e];return!!n&&(n.group===i&&(this.#_e.splice(e,1),this.#ni(n),n.destroy(s),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this.#ei(n),!0))}#ni(t){const e=this.#He.get(t.id)??this.#si(t.position.z),i=this.#Ge[e];if(!i)return void this.#He.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#He.delete(t.id)}#Je(t){const e=Math.max(Math.floor(t),1);if(this.#Ge.length===e)for(const t of this.#Ge)t.length=0;else this.#Ge=this.#Xe(e)}#ai(t){const e=this.#si(t.position.z),i=this.#He.get(t.id);if(void 0===i)return void this.#Ye(t);if(i===e)return;const s=this.#Ge[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#Ge[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.#He.set(t.id,e)}else this.#He.set(t.id,e)}#Ze(t){const e=new Set,i=this.#$e;for(const s of this.#_e){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.#Be)t.particleReset?.(s);for(const e of this.#qe){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#ti(t,e){for(const i of this.#_e)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.#We)e.postParticleUpdate?.(i,t);this.#ai(i)}}}class Yr{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 Jr(t){return!t.destroyed}function Kr(t,e,...i){const s=new He(t,e);return te(s,...i),s}var Qr=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;hdrMode;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;peakNits;plugins;retina;shapeDrawers;started;zLayers;#I;#oi;#ri={value:0,factor:0};#ci;#li;#di;#hi;#ui;#pi;#gi;#fi;#mi;#yi;#vi;#p;#bi;#wi;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this.#p=s,this.#ci=i,this.#mi=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.hdrMode=t.HdrMode.standard,this.peakNits=400,this.#bi=!1,this.#I=0,this.#di=0,this.#fi=0,this.#ui=!0,this.started=!1,this.destroyed=!1,this.#vi=!0,this.#gi=0,this.zLayers=100,this.pageHidden=!1,this.#wi=o,this.#pi=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Yr(this),this.canvas=new qr(this.#p,this),this.particles=new Xr(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#yi=Kr(this.#p,this),this.actualOptions=Kr(this.#p,this),this.#hi=new Ur(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#vi&&!this.pageHidden&&Jr(this)}get options(){return this.#yi}get sourceOptions(){return this.#wi}addLifeTime(t){this.#fi+=t}alive(){return!this.#di||this.#fi<=this.#di}destroy(e=!0){if(Jr(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.#mi(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#ci(t,{container:this,data:e})}draw(t){if(!Jr(this))return;let e=t;this.#li=V(t=>{e&&(this.#gi=void 0,e=!1),this.#xi(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}Lt().error(`Export plugin with type ${t} not found`)}async init(){if(!Jr(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.#yi=Kr(this.#p,this,this.#pi,this.sourceOptions),this.actualOptions=Kr(this.#p,this,this.#yi),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,smooth:a,zLayers:o}=this.actualOptions,c=this.actualOptions.hdr;this.hdrMode=c.mode,this.peakNits=c.peakNits,this.zLayers=o,this.#di=W(s)*r,this.#I=W(i)*r,this.#fi=0,this.fpsLimit=n>0?n:120,this.#bi=a;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(Jr(this)&&(void 0!==this.#li&&(H(this.#li),this.#li=void 0),!this.#vi)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#vi=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!Jr(this))return;const i=this.#vi||e;if(!this.#ui||this.actualOptions.autoPlay){if(this.#vi&&(this.#vi=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#ui=!1}async refresh(){if(Jr(this))return this.stop(),this.start()}async reset(t){if(Jr(this))return this.#pi=t,this.#wi=t,this.#yi=Kr(this.#p,this,this.#pi,this.sourceOptions),this.actualOptions=Kr(this.#p,this,this.#yi),this.refresh()}async start(){Jr(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#hi.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#oi=setTimeout(()=>{i()},this.#I)}))}stop(){if(Jr(this)&&this.started){this.#oi&&(clearTimeout(this.#oi),this.#oi=void 0),this.#ui=!0,this.started=!1,this.#hi.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.#wi=this.#yi,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#xi(t){try{if(!this.#bi&&void 0!==this.#gi&&t<this.#gi+r/this.fpsLimit)return void this.draw(!1);if(this.#gi??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this.#ri,t-this.#gi,this.fpsLimit,this.#bi),this.addLifeTime(this.#ri.value),this.#gi=t,this.#ri.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#ri),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Lt().error("error in animation loop",t)}}}});class Zr{#Mi=!0;#Pi;#u;#ee;#ki;#Ci;constructor(t,e){this.#u=t,this.#Pi=[],this.#ki=e,this.#Ci=new Map,this.#ee={mouseDown:()=>{this.#Oi()},mouseLeave:()=>{this.#zi()},mouseMove:t=>{this.#Di(t)},mouseUp:t=>{this.#Si(t)},touchStart:t=>{this.#Ii(t)},touchMove:t=>{this.#Di(t)},touchEnd:t=>{this.#Ti(t)},touchCancel:t=>{this.#Ti(t)},touchEndClick:t=>{this.#Ei(t)},visibilityChange:()=>{this.#ne()}}}addListeners(){this.#oe(!0)}init(){this.#Pi.length=0;for(const t of this.#u.plugins.filter(t=>!!t.clickPositionValid))this.#Pi.push(t)}removeListeners(){this.#oe(!1)}#Ri(t){const e=this.#u,i=this.#ki,s=e.actualOptions;if(this.#Mi){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;bt(n.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this.#zi()},500)}#ne(){this.#zi()}#Li(t){const e=this.#ee,i=this.#u,s=this.#ki,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)&&(Ot(a,Ai,e.mouseMove,t),Ot(a,Fi,e.touchStart,t),Ot(a,Hi,e.touchMove,t),t?n.interactivity?.events.onClick.enable?(Ot(a,Vi,e.touchEndClick,t),Ot(a,Li,e.mouseUp,t),Ot(a,Ri,e.mouseDown,t)):Ot(a,Vi,e.touchEnd,t):(Ot(a,Vi,e.touchEndClick,t),Ot(a,Li,e.mouseUp,t),Ot(a,Ri,e.mouseDown,t),Ot(a,Vi,e.touchEnd,t)),Ot(a,_i,e.mouseLeave,t),Ot(a,Bi,e.touchCancel,t))}#oe(t){const e=this.#ee,i=this.#u,s=this.#ki,a=i.actualOptions,o=a.interactivity?.detectsOn,r=i.canvas.domElement;o===Pi.window?s.interactivityData.element=ct():o===Pi.parent&&r?s.interactivityData.element=r.parentElement??r.parentNode:s.interactivityData.element=r,this.#Li(t),Ot(document,n,e.visibilityChange,t,!1)}#Oi(){const{interactivityData:t}=this.#ki,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position}#Si(t){const e=this.#u,i=this.#ki,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.#Pi)if(a=t.clickPositionValid?.(o)??!1,a)break;a||this.#Ri(t),n.clicking=!1}}#zi(){const{interactivityData:t}=this.#ki,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=_i,e.inside=!1,e.clicking=!1}#Di(t){const e=this.#u,i=this.#ki,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.#Mi=!0;const e=t;if(n.element===ct()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(s.interactivity?.detectsOn===Pi.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.#Mi="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=Ai}#Ti(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Ci.delete(t.identifier);this.#zi()}#Ei(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Ci.delete(t.identifier);this.#Si(t)}#Ii(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Ci.set(t.identifier,performance.now());this.#Di(t)}}class tc{interactivityData;#_i;#u;#hi;#Ai;#Fi;#Vi;#Hi;#p;constructor(t,e){this.#u=e,this.#p=t,this.#Fi=[],this.#Ai=[],this.#Hi=[],this.#_i=new Map,this.#hi=new Zr(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this.#Vi=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(t=>{this.#Bi(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.#_i.set("click",t=>{if(e.destroyed)return;const i=t,s={x:i.offsetX,y:i.offsetY};n(t,s,1)}),this.#_i.set(Fi,()=>{e.destroyed||(a=!0,o=!1)}),this.#_i.set(Hi,()=>{e.destroyed||(o=!0)}),this.#_i.set(Vi,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.#_i.set(Bi,()=>{e.destroyed||(a=!1,o=!1)});for(const[t,e]of this.#_i)s.addEventListener(t,e)}addListeners(){this.#hi.addListeners()}clearClickHandlers(){const t=this.#u,e=this.interactivityData;if(!t.destroyed){for(const[t,i]of this.#_i)e.element?.removeEventListener(t,i);this.#_i.clear()}}externalInteract(t){for(const e of this.#Ai){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.#Ai)i.handleClickMode?.(t,e)}init(){this.#hi.init();for(const t of this.#Fi){switch(t.type){case ki.external:this.#Ai.push(t);break;case ki.particles:this.#Hi.push(t)}t.init()}}async initInteractors(){const t=await(this.#p.getInteractors?.(this.#u,!0));t&&(this.#Fi=t,this.#Ai=[],this.#Hi=[])}particlesInteract(t,e){const i=this.interactivityData;for(const i of this.#Ai)i.clear(t,e);for(const s of this.#Hi)s.isEnabled(t,i)&&s.interact(t,i,e)}removeListeners(){this.#hi.removeListeners()}reset(t){const e=this.interactivityData;for(const i of this.#Ai)i.isEnabled(e)&&i.reset(e,t);for(const i of this.#Hi)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Vi&&this.#Vi.observe(t.element)}stopObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Vi&&this.#Vi.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this.#Fi)e.maxDistance>t&&(t=e.maxDistance);const e=this.#u;e.particles.grid.setCellSize(t*e.retina.pixelRatio)}#Bi(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 ec=Object.freeze({__proto__:null,InteractivityPluginInstance:class{interactionManager;#u;#p;constructor(t,e){this.#u=e,this.#p=t,this.interactionManager=new tc(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 Si(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 ic=Object.freeze({__proto__:null,AbsorbersInstancesManager:class{#qi;#p;constructor(t){this.#p=t,this.#qi=new Map}async addAbsorber(t,e,i){const{AbsorberInstance:s}=await Promise.resolve().then(function(){return vc}),n=new s(this.#p,t,e,i);return this.getArray(t).push(n),n}clear(t){this.initContainer(t),this.#qi.set(t,[])}getArray(t){this.initContainer(t);let e=this.#qi.get(t);return e||(e=[],this.#qi.set(t,e)),e}initContainer(t){this.#qi.has(t)||(this.#qi.set(t,[]),t.getAbsorber??=e=>{const i=this.getArray(t);return void 0===e||S(e)?i[e??0]:i.find(t=>t.name===e)},t.addAbsorber??=(e,i)=>this.addAbsorber(t,e,i))}removeAbsorber(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});var sc=Object.freeze({__proto__:null,AbsorbersPluginInstance:class{#u;#v;constructor(t,e){this.#u=t,this.#v=e,this.#v.initContainer(t)}draw(t){for(const e of this.#v.getArray(this.#u))e.draw(t)}async init(){const t=bt(this.#u.actualOptions.absorbers,async t=>{await this.#v.addAbsorber(this.#u,t)});T(t)?await Promise.all(t):await t}particleUpdate(t,e){for(const i of this.#v.getArray(this.#u))if(i.attract(t,e),t.destroyed)break}resize(){for(const t of this.#v.getArray(this.#u))t.resize()}stop(){this.#v.clear(this.#u)}}});const nc=new Map;var ac=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||nc.set(t,e)}getShapeGenerator(t){return nc.get(t)}getSupportedShapeGenerators(){return nc.keys()}}});var oc=Object.freeze({__proto__:null,EmittersInstancesManager:class{#qi;#p;constructor(t){this.#qi=new Map,this.#p=t}async addEmitter(t,e,i){const s=new bs;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return xc}),a=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this.#qi.set(t,[])}getArray(t){this.initContainer(t);let e=this.#qi.get(t);return e||(e=[],this.#qi.set(t,e)),e}initContainer(t){this.#qi.has(t)||(this.#qi.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||S(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});var rc=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#v;constructor(t,e){this.#v=t,this.#u=e,this.#v.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(T(t))for(const e of t)await this.#v.addEmitter(this.#u,e);else await this.#v.addEmitter(this.#u,t)}pause(){for(const t of this.#v.getArray(this.#u))t.pause()}play(){for(const t of this.#v.getArray(this.#u))t.play()}resize(){for(const t of this.#v.getArray(this.#u))t.resize()}stop(){this.#v.clear(this.#u)}update(t){this.#v.getArray(this.#u).forEach(e=>{e.update(t)})}}});var cc=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=t.DrawLayer.CanvasSetup;#u;#Ui;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.#Ui&&(t.globalCompositeOperation=this.#Ui)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Ui=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function lc(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=B(t.velocity.x,-1,1),t.velocity.y=B(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,c=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=c*(r.acceleration*o.factor)/(60*i));const l=t.moveDecay;t.velocity.multTo(l??1);const 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=c*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 dc=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,c=e.retina.moveSpeed,l=e.retina.moveDrift,d=e.size.max,h=c*(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 c=Math.max(e.canvas.size.width,e.canvas.size.height),l=c*o;i.spin.radius>l?(i.spin.radius=l,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/c)}(n,e,h,r):lc(e,s,h,u,l,r,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=G(e,t.position),n=Math.abs(i),a=Math.abs(s),{maxDistance:r}=t.retina,c=r.horizontal,l=r.vertical;if(!c&&!l)return;if((c&&n>=c||l&&a>=l)&&!t.misplaced)t.misplaced=!!c&&n>c||!!l&&a>l,c&&(t.velocity.x=t.velocity.y*o-t.velocity.x),l&&(t.velocity.y=t.velocity.x*o-t.velocity.y);else if((!c||n<c)&&(!l||a<l)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;c&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-A()),l&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-A())}}(e)}preInit(){return this.#Wi()}redrawInit(){return this.#Wi()}update(){for(const t of this.pathGenerators.values())t.update()}async#Wi(){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()}}}});var hc=Object.freeze({__proto__:null,ImagePreloaderInstance:class{#u;#n;constructor(t,e){this.#n=t,this.#u=e}destroy(){this.#n.images?.delete(this.#u)}}});var uc=Object.freeze({__proto__:null,OverlapPluginInstance:class{#u;constructor(t){this.#u=t}checkParticlePosition(t,e,i){return!this.#ji(t,e,i)}#ji(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 pc(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 gc=Object.freeze({__proto__:null,LinkInstance:class{#$i=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(),l=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,m=!1;const y=()=>{m&&(t.stroke(),m=!1)};for(const u of i){if(n.frequency<1&&this.#Gi(e,u.destination)>n.frequency)continue;const i=u.destination.getPosition();if(d&&!u.isWarped&&h&&(y(),this.#Xi(s,e,u,h,r,i,t)),u.opacity<=0||a<=0)continue;if(!n.enable)continue;let v=u.opacity,b=u.color;const w=l?.enable&&A()<l.frequency?Ke(this.#p,l.color):void 0;if(l&&w&&(b=w,v=W(l.opacity)),!b){const t=void 0!==n.id?this.#u.particles.linksColors.get(n.id):this.#u.particles.linksColor;b=di(e,u.destination,t)}if(!b)continue;const x=this.#Yi(b);if(x===p&&a===g&&v===f||(y(),t.strokeStyle=x,t.lineWidth=a,t.globalAlpha=v,p=x,g=a,f=v,t.beginPath(),m=!0),u.isWarped){const e=this.#u.canvas.size,s=i.x-r.x,n=i.y-r.y;let a=c.x,l=c.y;Math.abs(s)>e.width*o&&(a=s>0?-e.width:e.width),Math.abs(n)>e.height*o&&(l=n>0?-e.height:e.height),t.moveTo(r.x,r.y),t.lineTo(i.x+a,i.y+l),t.moveTo(r.x-a,r.y-l),t.lineTo(i.x,i.y)}else t.moveTo(r.x,r.y),t.lineTo(i.x,i.y)}y(),t.globalAlpha=u}init(){return this.#Ni.links.clear(),this.#Ni.triangles.clear(),this.#$i.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=[]}#Xi(t,e,i,s,n,a,r){const c=i.destination,l=t.links?.triangles;if(!l?.enable||!c.options.links?.triangles.enable)return;const d=c.links;if(d?.length)for(const h of d){if(h.isWarped||this.#Gi(c,h.destination)>c.options.links.frequency||!s.has(h.destination.id))continue;const d=h.destination;if(this.#Ji(e,c,d)>(t.links?.triangles.frequency??0))continue;const u=l.opacity??(i.opacity+h.opacity)*o,p=Ke(this.#p,l.color)??i.color;if(!p||u<=0)continue;const g=d.getPosition();r.save(),r.fillStyle=this.#Yi(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()}}#Yi(t){const e=`${t.r},${t.g},${t.b}-${this.#u.hdr}-${this.#u.peakNits}-${this.#u.hdrMode}`;let i=this.#$i.get(e);return i||(i=ri(t,this.#u.hdr,void 0,this.#u.peakNits,this.#u.hdrMode),this.#$i.set(e,i)),i}#Gi(t,e){return pc([t,e],this.#Ni.links)}#Ji(t,e,i){return pc([t,e,i],this.#Ni.triangles)}}});var fc=Object.freeze({__proto__:null,ResponsivePluginInstance:class{#u;constructor(t){this.#u=t}updateActualOptions(){const t=this.#u;t.actualOptions.responsive=[];const e=t.actualOptions.setResponsive?.(t.canvas.size.width,t.retina.pixelRatio,t.options);return t.responsiveMaxWidth!==e&&(t.responsiveMaxWidth=e,!0)}}});const mc=u,yc=1/360;var vc=Object.freeze({__proto__:null,AbsorberInstance:class{color;limit;mass;name;opacity;options;position;size;#u;#Ki;#Qi;#di;#Zi;#ts;#es;#is;#p;#ss;constructor(t,e,i,s){this.#u=e,this.#p=t,this.#Ki=0,this.#Qi=0,this.#es=s?O.create(s.x,s.y):void 0,i instanceof Yi?this.options=i:(this.options=new Yi,this.options.load(i)),this.name=this.options.name,this.opacity=this.options.opacity,this.size=W(this.options.size.value)*e.retina.pixelRatio,this.mass=this.size*this.options.size.density*e.retina.reduceFactor;const n=this.options.size.limit;this.limit={radius:n.radius*e.retina.pixelRatio*e.retina.reduceFactor,mass:n.mass},this.color=Ke(this.#p,this.options.color)??{b:0,g:0,r:0},this.position=this.#es?.copy()??this.#ye(),this.#Zi=!this.options.life.wait,this.#is=this.options.life.count??-1,this.#ts=this.#is<=0,this.#ss=e.retina.reduceFactor?W(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0}attract(t,e){const i=this.#u,s=this.options,n=t.getPosition(),{dx:a,dy:o,distance:r}=G(this.position,n),c=O.create(a,o);if(c.length=this.mass/Math.pow(r,2)*i.retina.reduceFactor,r<this.size+t.getRadius()){const n=.033*t.getRadius()*i.retina.pixelRatio*e.factor;this.size>t.getRadius()&&r<this.size-t.getRadius()||void 0!==t.absorberOrbit&&t.absorberOrbit.length<0?s.destroy?t.destroy():(t.needsNewPosition=!0,this.#ns(t,e,c)):(s.destroy&&(t.size.value-=n),this.#ns(t,e,c)),(this.limit.radius<=0||this.size<this.limit.radius)&&(this.size+=n),(this.limit.mass<=0||this.mass<this.limit.mass)&&(this.mass+=n*this.options.size.density*i.retina.reduceFactor)}else this.#ns(t,e,c)}draw(t){t.translate(this.position.x,this.position.y),t.beginPath(),t.arc(c.x,c.y,this.size,0,mc,!1),t.closePath(),t.fillStyle=ri(this.color,this.#u.hdr,this.opacity,this.#u.peakNits,this.#u.hdrMode),t.fill()}resize(){const t=this.#es;this.position=t&&pt(t,this.#u.canvas.size,O.origin)?t:this.#ye()}update(t){this.#Zi&&(this.#Zi=!1,this.#Qi=this.#ss??0),void 0!==this.#di&&(this.#Ki+=t.value,this.#Ki>=this.#di&&(this.#ts||this.#is--,(this.#is>0||this.#ts)&&(this.position=this.#ye(),this.#ss=this.#u.retina.reduceFactor?W(this.options.life.delay??0)*r/this.#u.retina.reduceFactor:1/0),this.#Ki-=this.#di,this.#di=void 0)),void 0!==this.#ss&&(this.#Qi+=t.value,this.#Qi>=this.#ss&&(this.#as(),this.#Qi-=this.#ss,this.#ss=void 0))}#ye(){const t=it({size:this.#u.canvas.size,position:this.options.position});return O.create(t.x,t.y)}#as(){(this.#is>0||this.#ts||!this.options.life.count)&&(this.#Zi||this.#Qi>=(this.#ss??0))&&(this.#is>0||this.#ts)&&this.#os()}#os(){const t=void 0!==this.options.life.duration?W(this.options.life.duration):void 0;(this.#is>0||this.#ts)&&void 0!==t&&t>0&&(this.#di=t*r)}#ns(e,i,s){if(e.destroyed)return;const n=this.#u,a=n.canvas.size;if(e.needsNewPosition){const t=et({size:a});e.position.setTo(t),e.velocity.setTo(e.initialVelocity),e.absorberOrbit=void 0,e.needsNewPosition=!1}if(this.options.orbits){if(void 0===e.absorberOrbit&&(e.absorberOrbit=O.origin,e.absorberOrbit.length=Y(e.getPosition(),this.position),e.absorberOrbit.angle=A()*mc),e.absorberOrbit.length<=this.size&&!this.options.destroy){const t=Math.min(a.width,a.height),i=1,s=.1,n=.2;e.absorberOrbit.length=t*(i+(A()*n-s))}e.absorberOrbitDirection??=e.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise;const r=e.absorberOrbit.length,c=e.absorberOrbit.angle,l=e.absorberOrbitDirection;e.velocity.setTo(O.origin);const d=e.size.max,h=e.options.move.size?e.getRadius()/d:1,u=i.factor||1,p=e.retina.moveSpeed*h*u*o;e.position.x=this.position.x+r*Math.cos(c),e.position.y=this.position.y+r*(l===t.RotateDirection.clockwise?1:-1)*Math.sin(c),e.absorberOrbit.length=Math.max(0,e.absorberOrbit.length-s.length),e.absorberOrbit.angle+=p*yc*n.retina.reduceFactor}else e.velocity.addTo(s)}}});function bc(t,e,i,s){(t.paint??=new Se).fill={color:he.create(void 0,{value:e}),enable:s,opacity:i}}function wc(t,e,i,s){(t.paint??=new Se).stroke={color:he.create(void 0,{value:e}),opacity:i,width:s}}var xc=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#Ki;#rs;#Qi;#di;#cs;#Zi;#ts;#es;#is;#Vt;#ls;#vi;#p;#ds;#ie;#hs;#us;#ss;#ps;constructor(e,i,s,n,o){this.#p=e,this.#u=i,this.#ds=s,this.#Ki=0,this.#rs=0,this.#Qi=0,this.#es=o,n instanceof bs?this.options=n:(this.options=new bs,this.options.load(n)),this.#ss=i.retina.reduceFactor?W(this.options.life.delay??0)*r/i.retina.reduceFactor:1/0,this.position=this.#es??this.#ye(),this.name=this.options.name,this.fill=this.options.fill,this.#Zi=!this.options.life.wait,this.#ps=!1;const c=mt({},this.options.particles);if(c.move??={},c.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=Ze(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=Ze(this.#p,this.options.spawn.stroke.color)),this.#vi=!this.options.autoPlay,this.#ls=c,this.#us=this.#gs(),this.size=this.#us.mode===t.PixelMode.percent?{width:this.#us.width/a*this.#u.canvas.size.width,height:this.#us.height/a*this.#u.canvas.size.height}:{width:this.#us.width,height:this.#us.height},this.#is=this.options.life.count??-1,this.#ts=this.#is<=0,this.options.domId){const t=ct().getElementById(this.options.domId);t&&(this.#Vt=new MutationObserver(()=>{this.resize()}),this.#ie=new ResizeObserver(()=>{this.resize()}),this.#Vt.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#ie.observe(t))}const l=this.options.shape,d=this.#p.emitterShapeManager?.getShapeGenerator(l.type);d&&(this.#hs=d.generate(this.#u,this.position,this.size,this.fill,l.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#vi=!0,this.pause()}externalPlay(){this.#vi=!1,this.play()}async init(){await(this.#hs?.init())}pause(){this.#vi||(this.#cs=void 0)}play(){if(this.#vi)return;if(!(this.#is>0||this.#ts)&&this.options.life.count||!(this.#Zi||this.#Qi>=(this.#ss??0)))return;const t=this.#u;if(void 0===this.#cs){const e=W(this.options.rate.delay);this.#cs=t.retina.reduceFactor?e*r/t.retina.reduceFactor:1/0}(this.#is>0||this.#ts)&&this.#os()}resize(){const e=this.#es,i=this.#u;this.position=e&&pt(e,i.canvas.size,O.origin)?e:this.#ye(),this.#us=this.#gs(),this.size=this.#us.mode===t.PixelMode.percent?{width:this.#us.width/a*i.canvas.size.width,height:this.#us.height/a*i.canvas.size.height}:{width:this.#us.width,height:this.#us.height},this.#hs?.resize(this.position,this.size)}update(t){if(this.#vi)return;const e=this.#u;this.#Zi&&(this.#Zi=!1,this.#Qi=this.#ss??0,this.#rs=this.#cs??0),this.#ps||(this.#ps=!0,this.#fs(this.options.startCount)),void 0!==this.#di&&(this.#Ki+=t.value,this.#Ki>=this.#di&&(this.pause(),void 0!==this.#ss&&(this.#ss=void 0),this.#ts||this.#is--,this.#is>0||this.#ts?(this.position=this.#ye(),this.#hs?.resize(this.position,this.size),this.#ss=e.retina.reduceFactor?W(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0):this.#ms(),this.#Ki-=this.#di,this.#di=void 0)),void 0!==this.#ss&&(this.#Qi+=t.value,this.#Qi>=this.#ss&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#Qi-=this.#ss,this.#ss=void 0)),void 0!==this.#cs&&(this.#rs+=t.value,this.#rs>=this.#cs&&(this.#ys(),this.#rs-=this.#cs))}#ye(){const t=this.#u;if(this.options.domId){const e=ct().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*o)*s,y:(i.y+i.height*o)*s}}}return it({size:t.canvas.size,position:this.options.position})}#gs(){const e=this.#u;if(this.options.domId){const i=ct().getElementById(this.options.domId);if(i){const s=i.getBoundingClientRect();return{width:s.width*e.retina.pixelRatio,height:s.height*e.retina.pixelRatio,mode:t.PixelMode.precise}}}return this.options.size??(()=>{const e=new ys;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}#ms(){this.#Vt?.disconnect(),this.#Vt=void 0,this.#ie?.disconnect(),this.#ie=void 0,this.#ds(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#ys(){if(this.#vi)return;const t=W(this.options.rate.quantity);this.#fs(t)}#fs(t){const e=wt(this.#ls)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:W(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,o=void 0===this.options.spawn.stroke?.opacity?1:W(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:W(this.options.spawn.stroke.width),c=this.#u.retina.reduceFactor,l=!!i,d=!!a,h=!!this.#hs,u=l||d,p=u||h,g=u?{h:y,s:v,l:b}:null,f=this.options.shape;for(let l=0;l<t*c;l++){const t=p?mt({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=o,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&g&&(this.spawnFillColor.h=this.#vs(i.h,this.spawnFillColor.h,g.h,3.6),this.spawnFillColor.s=this.#vs(i.s,this.spawnFillColor.s,g.s),this.spawnFillColor.l=this.#vs(i.l,this.spawnFillColor.l,g.l)),bc(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&g&&(this.spawnStrokeColor.h=this.#vs(a.h,this.spawnStrokeColor.h,g.h,3.6),this.spawnStrokeColor.s=this.#vs(a.s,this.spawnStrokeColor.s,g.s),this.spawnStrokeColor.l=this.#vs(a.l,this.spawnStrokeColor.l,g.l)),wc(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let c=this.position;if(this.#hs){const e=this.#hs.randomPosition();if(e){c=e.position;const i=f.replace;i.color&&e.color&&bc(t,e.color,i.opacity?e.opacity??1:1,!0)}else c=null}c&&this.#u.particles.addParticle(c,t)}}#os(){if(this.#vi)return;const t=void 0!==this.options.life.duration?W(this.options.life.duration):void 0;(this.#is>0||this.#ts)&&void 0!==t&&t>0&&(this.#di=t*r)}#vs(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const a=U(t.offset),o=W(this.options.rate.delay),c=n.retina.reduceFactor?o*r/n.retina.reduceFactor:1/0;return(e+W(t.speed)*n.fpsLimit/c+a*s)%i}}});t.AnimatableColor=he,t.AnimationOptions=oe,t.AnimationValueWithRandom=Me,t.Background=ue,t.BaseRange=Jt,t.Circle=Kt,t.ColorAnimation=ce,t.Fill=ye,t.FullScreen=pe,t.HDROptions=ge,t.HslAnimation=le,t.Move=ze,t.MoveAngle=ve,t.MoveCenter=be,t.MoveGravity=we,t.MovePath=ke,t.OptionLoader=Zt,t.Options=He,t.OptionsColor=de,t.OutModes=Ce,t.Paint=Se,t.ParticlesBounce=Te,t.ParticlesBounceFactor=Ie,t.ParticlesDensity=Ee,t.ParticlesNumber=Le,t.ParticlesNumberLimit=Re,t.ParticlesOptions=Fe,t.RangedAnimationOptions=re,t.RangedAnimationValueWithRandom=Pe,t.Rectangle=Qt,t.ResizeEvent=fe,t.Shape=_e,t.Spin=Oe,t.Stroke=De,t.ValueWithRandom=xe,t.Vector=O,t.Vector3d=C,t.ZIndex=Ae,t.alterHsl=yi,t.animate=V,t.areBoundsInside=gt,t.calcExactPositionOrRandomFromSize=st,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=it,t.calculateBounds=ft,t.cancelAnimation=H,t.canvasFirstIndex=0,t.canvasTag=f,t.checkDistance=J,t.circleBounce=vt,t.circleBounceDataFromParticle=yt,t.clamp=B,t.cloneStyle=Mt,t.collisionVelocity=tt,t.colorMix=li,t.colorToRgb=Qe,t.countOffset=1,t.decayOffset=1,t.deepExtend=mt,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=i,t.defaultDensityFactor=1,t.defaultFps=60,t.defaultFpsLimit=120,t.defaultLoops=0,t.defaultOpacity=1,t.defaultRatio=1,t.defaultReduceFactor=1,t.defaultRemoveQuantity=1,t.defaultRetryCount=0,t.defaultRgbMin=0,t.defaultTime=0,t.defaultTransform=l,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=K,t.deleteCount=1,t.double=2,t.doublePI=u,t.empty=0,t.executeOnSingleOrMultiple=bt,t.generatedAttribute=e,t.generatedFalse=g,t.generatedTrue=p,t.getDistance=Y,t.getDistanceSq=X,t.getDistances=G,t.getFullScreenStyle=Ct,t.getHslAnimationFromHsl=pi,t.getHslFromAnimation=ui,t.getItemMapFromInitializer=Dt,t.getItemsFromInitializer=zt,t.getLinkColor=di,t.getLinkRandomColor=hi,t.getLogger=Lt,t.getParticleBaseVelocity=Z,t.getParticleDirectionAngle=Q,t.getPosition=xt,t.getRandom=A,t.getRandomFn=function(){return L},t.getRandomInRange=F,t.getRandomRgbColor=oi,t.getRangeMax=$,t.getRangeMin=j,t.getRangeValue=W,t.getStyleFromHsl=ci,t.getStyleFromRgb=ri,t.hMax=y,t.hMin=0,t.hPhase=60,t.half=o,t.hslToRgb=si,t.hslToRgbFloat=ni,t.hslaToRgba=ai,t.identity=1,t.initPjs=_r,t.inverseFactorNumerator=1,t.isArray=T,t.isBoolean=z,t.isFunction=function(t){return"function"==typeof t},t.isInArray=ht,t.isNull=E,t.isNumber=S,t.isObject=I,t.isPointInside=pt,t.isString=D,t.itemFromArray=ut,t.itemFromSingleOrMultiple=wt,t.lFactor=1,t.lMax=b,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){if(void 0!==i){const s=e;if("__proto__"===s||"constructor"===s||"prototype"===s)return;const n=t,a=Object.prototype.hasOwnProperty.call(n,s)?n[s]:{};n[s]=mt(a,i)}},t.loadLazyProperty=ne,t.loadMinIndex=0,t.loadNestedProperty=se,t.loadOptionProperty=ae,t.loadOptions=te,t.loadParticlesOptions=Ve,t.loadProperty=ee,t.loadRandomFactor=1e4,t.loadRangeProperty=ie,t.manageListener=Ot,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=q,t.none=0,t.one=1,t.originPoint=c,t.parseAlpha=nt,t.percentDenominator=a,t.phaseNumerator=1,t.quarter=w,t.randomColorValue=d,t.randomInRangeValue=U,t.rangeColorToHsl=Ze,t.rangeColorToRgb=Ke,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=m,t.rgbToHsl=ti,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=ct,t.safeMatchMedia=lt,t.safeMutationObserver=dt,t.setAnimationFunctions=function(t,e){_.nextFrame=t,_.cancel=e},t.setLogger=function(t){t.debug&&(Rt.debug=Et(t.debug)),t.error&&(Rt.error=Et(t.error)),t.info&&(Rt.info=Et(t.info)),t.log&&(Rt.log=Et(t.log)),t.trace&&(Rt.trace=Et(t.trace)),t.verbose&&(Rt.verbose=Et(t.verbose)),t.warning&&(Rt.warning=Et(t.warning))},t.setRandom=function(t=Math.random){L=t},t.setRangeValue=N,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Je(t,e)?.a},t.stringToRgb=ei,t.threeQuarter=x,t.triple=3,t.tryCountIncrement=1,t.tsParticles=vi,t.updateColor=mi,t.updateColorValue=fi,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{initPjs:(globalThis.__tsParticlesInternals.bundles.pjs||{}).initPjs}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|