UNPKG

@tsparticles/slim

Version:

Slim tsParticles bundle — core engine with essential plugins, presets, and interactions for lightweight particle animations. Ready to use components available for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.

2 lines • 162 kB
!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)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},function(t){"use strict";const e=/^\[tsParticles Error (TSP-\d+)\]\s*/,i=t=>(...e)=>{t(...e)},n={debug:i(console.debug),error:(t,...i)=>{if("string"==typeof t){const n=e.exec(t);if(n?.[1])return void console.error(`tsParticles - ${n[1]} - ${t.slice(n[0].length)}`,...i)}console.error(`tsParticles - Error - ${t}`,...i)},info:i(console.info),log:i(console.log),trace:i(console.trace),verbose:i(console.log),warning:i(console.warn)};function s(){return n}var a;t.MoveDirection=void 0,(a=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",a.bottomLeft="bottom-left",a.bottomRight="bottom-right",a.left="left",a.none="none",a.right="right",a.top="top",a.topLeft="top-left",a.topRight="top-right",a.outside="outside",a.inside="inside";const o="generated",r="100%",c="source-over",l="resize",d="visibilitychange",h=100,u=.5,p=1e3,g={x:0,y:0,z:0},f={a:1,b:0,c:0,d:1},m="random",y="mid",v=2*Math.PI,b="true",x="false",w="canvas",M=255,P=360,k=100,C=100,D=.25,O=.75,z=400;function S(t){return"z"in t?t.z:g.z}class I{x;y;z;constructor(t=g.x,e=g.y,i=g.z){this.x=t,this.y=e,this.z=i}static get origin(){return I.create(g.x,g.y,g.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 I.create(t.x,t.y,S(t))}static create(t,e,i){return"number"==typeof t?new I(t,e??g.y,i??g.z):new I(t.x,t.y,S(t))}add(t){return I.create(this.x+t.x,this.y+t.y,this.z+S(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=S(t)}copy(){return I.clone(this)}div(t){return I.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return I.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 I.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),g.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=S(t)}sub(t){return I.create(this.x-t.x,this.y-t.y,this.z-S(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=S(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class T extends I{constructor(t=g.x,e=g.y){super(t,e,g.z)}static get origin(){return T.create(g.x,g.y)}static clone(t){return T.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new T(t,e??g.y):new T(t.x,t.y)}}function R(t){return"boolean"==typeof t}function L(t){return"string"==typeof t}function E(t){return"number"==typeof t}function _(t,e){return Object.values(t).some(t=>t===e)}function F(t,e,i){return _(t,e)?e:i}function A(t){return"object"==typeof t&&null!==t}function B(t){return Array.isArray(t)}function H(t){return null==t}const V=Math.PI/180;let q=Math.random;const U={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function N(){return G(q(),0,1-Number.EPSILON)}function $(t,e){return N()*(e-t)+t}function W(t){return U.nextFrame(t)}function j(t){U.cancel(t)}function G(t,e,i){return Math.min(Math.max(t,e),i)}function X(t,e,i,n){return Math.floor((t*i+e*n)/(i+n))}function Y(t){const e=Q(t);let i=K(t);return e===i&&(i=0),$(i,e)}function Z(t){return E(t)?t:Y(t)}function K(t){return E(t)?t:t.min}function Q(t){return E(t)?t:t.max}function J(t,e){if(t===e||void 0===e&&E(t))return t;const i=K(t),n=Q(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(n,e)}:J(i,n)}function tt(t,e){const i=t.x-e.x,n=t.y-e.y;return{dx:i,dy:n,distance:Math.hypot(i,n)}}function et(t,e){const i=t.x-e.x,n=t.y-e.y;return i*i+n*n}function it(t,e){return Math.sqrt(et(t,e))}function nt(t,e,i){return et(t,e)<=i*i}function st(t){return t*V}function at(e,i,n){if(E(e))return st(e);switch(e){case t.MoveDirection.top:return-Math.PI*u;case t.MoveDirection.topRight:return-Math.PI*D;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*D;case t.MoveDirection.bottom:return Math.PI*u;case t.MoveDirection.bottomLeft:return Math.PI*O;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*O;case t.MoveDirection.inside:return Math.atan2(n.y-i.y,n.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-n.y,i.x-n.x);default:return N()*v}}function ot(t){const e=T.origin;return e.length=1,e.angle=t,e}function rt(t,e,i,n){return T.create(t.x*(i-n)/(i+n)+2*e.x*n/(i+n),t.y)}function ct(t){return{x:(t.position?.x??N()*h)*t.size.width/h,y:(t.position?.y??N()*h)*t.size.height/h}}function lt(t){const{position:e,size:i}=t;return{x:e?.x??N()*i.width,y:e?.y??N()*i.height}}function dt(t){return t?t.endsWith("%")?Number.parseFloat(t)/h:Number.parseFloat(t):1}const ht={engineVersionMismatch:"TSP-1001",particlePositionNotFound:"TSP-1002",pluginRegisterAfterLoad:"TSP-1003",offscreenCanvasUnsupported:"TSP-1101",offscreenCanvasTransferFailed:"TSP-1102",hdrEnableInvalid:"TSP-1201",hdrModeInvalid:"TSP-1202",hdrPeakNitsInvalid:"TSP-1203"};function ut(t,...e){return`[tsParticles Error ${t}] https://particles.js.org/errors/#${t}`}var pt,gt;function ft(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function mt(){return globalThis.document}function yt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function vt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function bt(t,e){return t===e||B(e)&&e.includes(t)}function xt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(N()*t.length)]}function wt(t,e,i,n,s){return Mt(Pt(t,n??0),e,i,s)}function Mt(e,i,n,s){let a=!0;return s&&s!==t.OutModeDirection.bottom||(a=e.top<i.height+n.x),!a||s&&s!==t.OutModeDirection.left||(a=e.right>n.x),!a||s&&s!==t.OutModeDirection.right||(a=e.left<i.width+n.y),!a||s&&s!==t.OutModeDirection.top||(a=e.bottom>n.y),a}function Pt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function kt(t,...e){for(const i of e){if(H(i))continue;if(!A(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):A(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return A(e)||Array.isArray(e)})){const n=i,s=t;for(const t of e){if(ft(t))continue;const e=n[t];void 0!==e&&(s[t]=e)}continue}for(const n of e){if(ft(n))continue;const e=t,s=i[n];e[n]=Array.isArray(s)?s.map(t=>kt(void 0,t)):kt(e[n],s)}}return t}function Ct(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:T.create(Z(t.options.bounce.horizontal.value),Z(t.options.bounce.vertical.value))}}function Dt(t,e){const{x:i,y:n}=t.velocity.sub(e.velocity),[s,a]=[t.position,e.position],{dx:o,dy:r}=tt(a,s);if(i*o+n*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=rt(h,u,l,d),g=rt(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 Ot(t,e){return B(t)?t.map((t,i)=>e(t,i)):e(t,0)}function zt(t,e,i){return B(t)?xt(t,e,i):t}function St(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/h*i.width,y:e.y/h*i.height}:{width:e.width/h*i.width,height:e.height/h*i.height}}(e,i)}function It(t){const e=mt().createElement("div").style;for(const i in t){const n=t[i];if(!(i in t)||H(n))continue;const s=t.getPropertyValue?.(n);if(!s)continue;const a=t.getPropertyPriority?.(n);a?e.setProperty(n,s,a):e.setProperty(n,s)}return e}let Tt,Rt;function Lt(t){if(Tt!==t||!Rt){Tt=t;const e=mt().createElement("div").style,i=10,n={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 n){const i=n[t];void 0!==i&&e.setProperty(t,i)}Rt=e}return Rt}function Et(t,e,i,n,s){if(n){let n={passive:!0};R(s)?n.capture=s:void 0!==s&&(n=s),t.addEventListener(e,i,n)}else{const n=s;t.removeEventListener(e,i,n)}}async function _t(t,e){return await Promise.all([...e.values()].map(e=>e(t)))}async function Ft(t,e){const i=await Promise.all([...e.entries()].map(([e,i])=>i(t).then(t=>[e,t])));return new Map(i)}async function At(t){const e=zt(t.url,t.index);if(!e)return t.fallback;try{const t=await fetch(e);if(t.ok){const e=await t.json();if(function(t){if(B(t))return t.every(t=>A(t)&&!B(t));return A(t)&&!B(t)}(e))return e;s().error("invalid configuration data while retrieving config file")}else s().error(`${t.status.toString()} while retrieving config file`)}catch(t){s().error(`error while retrieving config file: ${t}`)}return t.fallback}function Bt(t){let e;const i=mt();if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===w)e=t,e.dataset[o]??=x,e.dataset[o]===b&&(e.style.width||=r,e.style.height||=r,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(w).item(0);n?(e=n,e.dataset[o]=x):(e=i.createElement(w),e.dataset[o]=b,t.appendChild(e)),e.style.width||=r,e.style.height||=r,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none")}return e}function Ht(t,e){const i=mt();let n=e??i.getElementById(t);return n||(n=i.createElement("canvas"),n.id=t,n.dataset[o]=b,i.body.append(n),n)}t.OutModeDirection=void 0,(pt=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",pt.left="left",pt.right="right",pt.top="top",t.PixelMode=void 0,(gt=t.PixelMode||(t.PixelMode={})).precise="precise",gt.percent="percent";class Vt{#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 n=i.length,s=i.indexOf(e);s<0||(1===n?this.#e.delete(t):i.splice(s,1))}}var qt,Ut,Nt,$t,Wt,jt,Gt,Xt,Yt,Zt,Kt,Qt,Jt,te;t.EventType=void 0,(qt=t.EventType||(t.EventType={})).configAdded="configAdded",qt.containerInit="containerInit",qt.particlesSetup="particlesSetup",qt.containerStarted="containerStarted",qt.containerStopped="containerStopped",qt.containerDestroyed="containerDestroyed",qt.containerPaused="containerPaused",qt.containerPlay="containerPlay",qt.containerBuilt="containerBuilt",qt.particleAdded="particleAdded",qt.particleDestroyed="particleDestroyed",qt.particleRemoved="particleRemoved";class ee{colorManagers=new Map;easingFunctions=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;#i=new Set;#n=new Map;#s;#a=new Set;#o=!1;#r=!1;#c=new Set;constructor(t){this.#s=t}get configs(){const t={};for(const[e,i]of this.#n)t[e]=i;return t}get initialized(){return this.#o}addColorManager(t,e){this.#o||this.colorManagers.set(t,e)}addConfig(e){if(this.#o)return;const i=e.key??e.name??"default";this.#n.set(i,e),this.#s.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.#o||this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.#o||this.initializers.effects.set(t,e)}addPalette(t,e){this.#o||this.palettes.set(t,e)}addParticleUpdater(t,e){this.#o||this.initializers.updaters.set(t,e)}addPlugin(t){this.#o||this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){this.#o||!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){if(!this.#o)for(const i of t)this.initializers.shapes.set(i,e)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}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 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}}}async register(...t){if(this.#o)throw new Error(ut(ht.pluginRegisterAfterLoad));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.#s))}}class ie{pluginManager=new ee(this);#d=[];#h=new Vt;#o=!1;get items(){return this.#d}get version(){return"4.5.0"}addEventListener(t,e){this.#h.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(ut(ht.engineVersionMismatch,this.version))}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 e;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(e=t.element);const{Container:i}=await Promise.resolve().then(function(){return _o}),n=t.id??e?.id??`tsparticles${Math.floor(1e4*N()).toString()}`,{index:s,url:a}=t,o=zt(a?await At({fallback:t.options,url:a,index:s}):t.options,s),{items:r}=this,c=r.findIndex(t=>t.id.description===n),l=new i({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(l);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:o});if(c>=0){const t=this.item(c),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),r.splice(c,e,l)}else r.push(l);const d="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:Bt(Ht(n,e));return l.canvas.loadCanvas(d),await l.start(),l}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#h.removeEventListener(t,e)}}!function(t){t.circle="circle",t.rectangle="rectangle"}(Ut||(Ut={}));class ne{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 se extends ne{radius;constructor(t,e,i){super(t,e,Ut.circle),this.radius=i}contains(t){return nt(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,n=this.radius,s=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof se||t.type===Ut.circle){return n+t.radius>Math.hypot(s,a)}if(t instanceof ae||t.type===Ut.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(s-i,2)+Math.pow(a-o,2)<=n**2||s<=n+i&&a<=n+o||s<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class ae extends ne{size;constructor(t,e,i,n){super(t,e,Ut.rectangle),this.size={height:n,width:i}}contains(t){const e=this.size.width,i=this.size.height,n=this.position;return t.x>=n.x&&t.x<=n.x+e&&t.y>=n.y&&t.y<=n.y+i}intersects(t){if(t instanceof se)return t.intersects(this);if(!(t instanceof ae))return!1;const e=this.size.width,i=this.size.height,n=this.position,s=t.position,a=t.size,o=a.width,r=a.height;return s.x<n.x+e&&s.x+o>n.x&&s.y<n.y+i&&s.y+r>n.y}reset(t,e,i,n){return this._resetPosition(t,e),this.size.width=i,this.size.height=n,this}}function oe(t,e,i){void 0!==i&&(t[e]=i)}function re(t,e,i){void 0!==i&&(t[e]=J(i))}function ce(t,e,i){void 0!==i&&t[e].load(i)}function le(t,e,i,n){if(void 0!==i){const s=t;s[e]??=n(),s[e].load(i)}}function de(t,e,i,...n){const s=t;s[e]??=new i;const a=s[e];for(const t of n)a.load(t?.[e])}t.RotateDirection=void 0,(Nt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Nt.counterClockwise="counter-clockwise",Nt.random="random",t.AnimationMode=void 0,($t=t.AnimationMode||(t.AnimationMode={})).auto="auto",$t.increase="increase",$t.decrease="decrease",$t.random="random",t.HdrMode=void 0,(Wt=t.HdrMode||(t.HdrMode={})).standard="standard",Wt.natural="natural",Wt.vivid="vivid",Wt.cinematic="cinematic",Wt.dynamic="dynamic",t.LimitMode=void 0,(jt=t.LimitMode||(t.LimitMode={})).delete="delete",jt.wait="wait",t.OutMode=void 0,(Gt=t.OutMode||(t.OutMode={})).bounce="bounce",Gt.none="none",Gt.out="out",Gt.destroy="destroy",Gt.split="split",t.AlterType=void 0,(Xt=t.AlterType||(t.AlterType={})).darken="darken",Xt.enlighten="enlighten",t.DestroyType=void 0,(Yt=t.DestroyType||(t.DestroyType={})).none="none",Yt.max="max",Yt.min="min",t.GradientType=void 0,(Zt=t.GradientType||(t.GradientType={})).linear="linear",Zt.radial="radial",Zt.random="random",t.ParticleOutType=void 0,(Kt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Kt.inside="inside",Kt.outside="outside",t.StartValueType=void 0,(Qt=t.StartValueType||(t.StartValueType={})).max="max",Qt.min="min",Qt.random="random",t.AnimationStatus=void 0,(Jt=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",Jt.decreasing="decreasing",t.DrawLayer=void 0,(te=t.DrawLayer||(t.DrawLayer={}))[te.BackgroundElement=0]="BackgroundElement",te[te.BackgroundDraw=1]="BackgroundDraw",te[te.BackgroundMask=2]="BackgroundMask",te[te.CanvasSetup=3]="CanvasSetup",te[te.PluginContent=4]="PluginContent",te[te.Particles=5]="Particles",te[te.CanvasCleanup=6]="CanvasCleanup",te[te.Foreground=7]="Foreground";class he{load(t){H(t)||this.doLoad(t)}}function ue(t,...e){for(const i of e)t.load(i)}class pe extends he{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){re(this,"count",t.count),oe(this,"enable",t.enable),re(this,"speed",t.speed),re(this,"decay",t.decay),re(this,"delay",t.delay),oe(this,"sync",t.sync)}}class ge extends pe{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),oe(this,"mode",t.mode),oe(this,"startValue",t.startValue)}}class fe extends pe{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),oe(this,"max",t.max),oe(this,"min",t.min),re(this,"offset",t.offset)}}class me extends he{h=new fe(0,P);l=new fe(0,C);s=new fe(0,k);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class ye extends he{value="";static create(t,e){const i=new ye;return i.load(t),void 0!==e&&(L(e)||B(e)?i.load({value:e}):i.load(e)),i}doLoad(t){H(t.value)||(this.value=t.value)}}class ve extends ye{animation=new me;static create(t,e){const i=new ve;return i.load(t),void 0!==e&&(L(e)||B(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 be extends he{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new ye,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=ye.create(this.color,t.color)),oe(this,"element",t.element),oe(this,"draw",t.draw),oe(this,"image",t.image),oe(this,"position",t.position),oe(this,"repeat",t.repeat),oe(this,"size",t.size),oe(this,"opacity",t.opacity)}}class xe extends he{enable=!0;zIndex=0;doLoad(t){oe(this,"enable",t.enable),oe(this,"zIndex",t.zIndex)}}class we extends he{enable=!0;mode=t.HdrMode.standard;peakNits=400;doLoad(e){if(void 0!==e.enable&&!R(e.enable))throw new Error(ut(ht.hdrEnableInvalid,String(e.enable)));if(void 0!==e.mode&&!_(t.HdrMode,e.mode))throw new Error(ut(ht.hdrModeInvalid,Object.values(t.HdrMode).join(", "),(i=e.mode,String(i))));var i;if(void 0!==e.peakNits&&(!E(e.peakNits)||!Number.isFinite(e.peakNits)||e.peakNits<=0))throw new Error(ut(ht.hdrPeakNitsInvalid,String(e.peakNits)));oe(this,"enable",e.enable),oe(this,"mode",e.mode),oe(this,"peakNits",e.peakNits)}}class Me extends he{delay=.5;enable=!0;doLoad(t){oe(this,"delay",t.delay),oe(this,"enable",t.enable)}}class Pe extends he{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]=kt(this.options[t]??{},i))}oe(this,"close",t.close),oe(this,"type",t.type)}}class ke extends he{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=ve.create(this.color,t.color)),oe(this,"enable",t.enable),re(this,"opacity",t.opacity)}}class Ce extends he{offset=0;value=90;doLoad(t){re(this,"offset",t.offset),re(this,"value",t.value)}}class De extends he{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){oe(this,"x",t.x),oe(this,"y",t.y),oe(this,"mode",t.mode),oe(this,"radius",t.radius)}}class Oe extends he{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){re(this,"acceleration",t.acceleration),oe(this,"enable",t.enable),oe(this,"inverse",t.inverse),re(this,"maxSpeed",t.maxSpeed)}}class ze extends he{value=0;doLoad(t){H(t.value)||(this.value=J(t.value))}}class Se extends ze{animation=new pe;doLoad(t){super.doLoad(t),ce(this,"animation",t.animation)}}class Ie extends Se{animation=new ge}class Te extends he{clamp=!0;delay=new ze;enable=!1;generator;options={};doLoad(t){oe(this,"clamp",t.clamp),this.delay.load(t.delay),oe(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=kt(this.options,t.options))}}class Re extends he{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 Le extends he{acceleration=0;enable=!1;position;doLoad(t){re(this,"acceleration",t.acceleration),oe(this,"enable",t.enable),t.position&&(this.position=kt({},t.position))}}class Ee extends he{angle=new Ce;center=new De;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new Oe;outModes=new Re;path=new Te;random=!1;size=!1;speed=2;spin=new Le;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(E(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),re(this,"decay",t.decay),oe(this,"direction",t.direction),void 0!==t.distance&&(this.distance=E(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),re(this,"drift",t.drift),oe(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(A(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),oe(this,"random",t.random),oe(this,"size",t.size),re(this,"speed",t.speed),this.spin.load(t.spin),oe(this,"straight",t.straight),oe(this,"vibrate",t.vibrate),oe(this,"warp",t.warp)}}class _e extends he{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=ve.create(this.color,t.color)),re(this,"width",t.width),re(this,"opacity",t.opacity)}}class Fe extends he{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=ve.create(this.color,t.color)),le(this,"fill",t.fill,()=>new ke),le(this,"stroke",t.stroke,()=>new _e)}}class Ae extends ze{value=1}class Be extends he{horizontal=new Ae;vertical=new Ae;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class He extends he{enable=!1;height=1080;width=1920;doLoad(t){oe(this,"enable",t.enable),oe(this,"width",t.width),oe(this,"height",t.height)}}class Ve extends he{mode=t.LimitMode.delete;value=0;doLoad(t){oe(this,"mode",t.mode),oe(this,"value",t.value)}}class qe extends he{density=new He;limit=new Ve;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),oe(this,"value",t.value)}}class Ue extends he{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]=kt(this.options[t]??{},i))}oe(this,"close",t.close),oe(this,"type",t.type)}}class Ne extends ze{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),oe(this,"opacityRate",t.opacityRate),oe(this,"sizeRate",t.sizeRate),oe(this,"velocityRate",t.velocityRate)}}class $e extends he{bounce=new Be;effect=new Pe;groups={};move=new Ee;number=new qe;paint;palette;reduceDuplicates=!1;shape=new Ue;zIndex=new Ne;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Fe,this.paint.color=new ve,this.paint.color.value="#fff",this.paint.fill=new ke,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]=kt(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&&(B(e)?this.paint=Ot(e,t=>{const e=new Fe;return e.load(t),e}):B(this.paint)?(this.paint=new Fe,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.#u.particleUpdaters;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,n=(B(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,n=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:n,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:n}]}),s=n.length>1?n:n[0]??{};this.load({paint:s,blend:{enable:!0,mode:e.blendMode}})}}function We(t,e,...i){const n=new $e(t,e);return ue(n,...i),n}class je extends he{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 be,this.fullScreen=new xe,this.hdr=new we,this.particles=We(this.#p,this.#u),this.resize=new Me}doLoad(e){void 0!==e.preset&&(this.preset=e.preset,Ot(this.preset,t=>{this.#f(t)})),void 0!==e.palette&&(this.palette=e.palette,this.#g(this.palette)),oe(this,"autoPlay",e.autoPlay),oe(this,"clear",e.clear),oe(this,"key",e.key),oe(this,"name",e.name),re(this,"delay",e.delay),oe(this,"detectRetina",e.detectRetina),re(this,"duration",e.duration),oe(this,"fpsLimit",e.fpsLimit);const i=e.hdr;R(i)?(this.hdr.enable=i,this.hdr.mode=t.HdrMode.standard,this.hdr.peakNits=400):this.hdr.load(i),oe(this,"pauseOnBlur",e.pauseOnBlur),oe(this,"pauseOnOutsideViewport",e.pauseOnOutsideViewport),oe(this,"zLayers",e.zLayers),this.background.load(e.background);const n=e.fullScreen;R(n)?this.fullScreen.enable=n:this.fullScreen.load(n),this.particles.load(e.particles),this.resize.load(e.resize),this.style=kt(this.style,e.style),oe(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 Ge=new Map,Xe=1.15,Ye=1.05,Ze=.2126,Ke=.7152,Qe=.0722;function Je(t,e){let i=Ge.get(t);return i||(i=e(),Ge.size>2e3&&Ge.clear(),Ge.set(t,i)),i}function ti(t){return G(t*(2.51*t+.03)/(t*(2.43*t+.59)+.14),0,1)}function ei(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ii(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055}function ni(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function si(t,e,i,n=!0){if(!e)return;const s=L(e)?{value:e}:e;if(L(s.value))return ai(t,s.value,i,n);if(B(s.value)){const e=xt(s.value,i,n);if(!e)return;return si(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(s);if(t)return t}}function ai(t,e,i,n=!0){if(!e)return;const s=L(e)?{value:e}:e;if(L(s.value))return s.value===m?pi():ci(t,s.value);if(B(s.value)){const e=xt(s.value,i,n);if(!e)return;return ai(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(s);if(t)return t}}function oi(t,e,i,n=!0){const s=si(t,e,i,n);return s?ri(s):void 0}function ri(t){const e=t.r/M,i=t.g/M,n=t.b/M,s=Math.max(e,i,n),a=Math.min(e,i,n),o={h:0,l:(s+a)*u,s:0};return s!==a&&(o.s=o.l<u?(s-a)/(s+a):(s-a)/(2-s-a),o.h=e===s?(i-n)/(s-a):i===s?2+(n-e)/(s-a):4+(e-i)/(s-a)),o.l*=C,o.s*=k,o.h*=60,o.h<0&&(o.h+=P),o.h>=P&&(o.h-=P),o}function ci(t,e){return ni(t,e)}function li(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 di(t){const e=(t.h%P+P)%P,i=Math.max(0,Math.min(k,t.s)),n=Math.max(0,Math.min(C,t.l)),s=e/P,a=i/k,o=n/C;if(0===i){const t=Math.round(o*M);return{r:t,g:t,b:t}}const r=o<u?o*(1+a):o+a-o*a,c=2*o-r,l=1/3,d=Math.min(M,M*li(c,r,s+l)),h=Math.min(M,M*li(c,r,s)),p=Math.min(M,M*li(c,r,s-l));return{r:Math.round(d),g:Math.round(h),b:Math.round(p)}}function hi(t){const e=(t.h%P+P)%P,i=Math.max(0,Math.min(k,t.s)),n=Math.max(0,Math.min(C,t.l)),s=e/P,a=i/k,o=n/C;if(0===i){const t=o*M;return{r:t,g:t,b:t}}const r=o<u?o*(1+a):o+a-o*a,c=2*o-r,l=1/3;return{r:Math.min(M,M*li(c,r,s+l)),g:Math.min(M,M*li(c,r,s)),b:Math.min(M,M*li(c,r,s-l))}}function ui(t){const e=di(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function pi(t,e){const i=t??0;if(e)return{r:$(i,M),g:$(i,M),b:$(i,M)};const n=()=>Math.floor($(i,256));return{b:n(),g:n(),r:n()}}function gi(e,i,n,s,a){const o=i?4:2,r=n??1;return Je(i?`rgb-${e.r.toFixed(o)}-${e.g.toFixed(o)}-${e.b.toFixed(o)}-hdr-${r.toString()}-${(s??z).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,n=400,s=t.HdrMode.standard){const a=n/203,o=function(e,i,n,s){const a=e.r/M,o=e.g/M,r=e.b/M;if(s!==t.HdrMode.natural&&s!==t.HdrMode.vivid&&s!==t.HdrMode.cinematic&&s!==t.HdrMode.dynamic)return{b:r,g:o,r:a};const c=Math.max(1,i),l=Ze*a+Ke*o+Qe*r,d=function(t,e,i){if(t<=i)return ti(t);const n=t+(t-i)*(e-1);return ti(n)}(l,i,n),h=l>0?d/l:1;return function(e,i,n,s,a){switch(s){case t.HdrMode.vivid:{const t=(e+i+n)/3;return{b:G(G(t+(n-t)*Xe,0,a)*Ye,0,a),g:G(G(t+(i-t)*Xe,0,a)*Ye,0,a),r:G(G(t+(e-t)*Xe,0,a)*Ye,0,a)}}case t.HdrMode.cinematic:{const t=1.05*e,s=.95*n,o=(t+i+s)/3;return{b:G(o+1.1*(s-o),0,a),g:G(o+1.1*(i-o),0,a),r:G(o+1.1*(t-o),0,a)}}case t.HdrMode.dynamic:{const t=Ze*e+Ke*i+Qe*n,s=Math.min(1,2*t),o=1-s,r=(e+i+n)/3,c=G(r+(e-r)*Xe,0,a)*Ye,l=G(r+(i-r)*Xe,0,a)*Ye,d=G(r+(n-r)*Xe,0,a)*Ye;return{b:G(n*o+d*s,0,a),g:G(i*o+l*s,0,a),r:G(e*o+c*s,0,a)}}case t.HdrMode.standard:case t.HdrMode.natural:default:return{b:n,g:i,r:e}}}(G(a*h,0,c),G(o*h,0,c),G(r*h,0,c),s,c)}(e,a,.18,s);return`color(display-p3 ${o.r.toString()} ${o.g.toString()} ${o.b.toString()} / ${(i??1).toString()})`}(e,n,s,a):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(e,n))}function fi(e,i,n,s,a){const o=i?4:2,r=n??1;return Je(i?`hsl-${e.h.toFixed(o)}-${e.s.toFixed(o)}-${e.l.toFixed(o)}-hdr-${r.toString()}-${(s??z).toString()}-${a??t.HdrMode.standard}`:`hsl-${e.h.toFixed(o)}-${e.s.toFixed(o)}-${e.l.toFixed(o)}-sdr-${r.toString()}`,()=>i?gi(hi(e),!0,n,s,a):`hsla(${e.h.toString()}, ${e.s.toString()}%, ${e.l.toString()}%, ${r.toString()})`)}function mi(t,e,i,n,s){let a=t,o=e;if("r"in a||(a=s?hi(t):di(t)),"r"in o||(o=s?hi(e):di(e)),s){const t={b:ei(a.b/M),g:ei(a.g/M),r:ei(a.r/M)},e={b:ei(o.b/M),g:ei(o.g/M),r:ei(o.r/M)},s=i+n;return{b:ii((t.b*i+e.b*n)/s)*M,g:ii((t.g*i+e.g*n)/s)*M,r:ii((t.r*i+e.r*n)/s)*M}}return{b:X(a.b,o.b,i,n),g:X(a.g,o.g,i,n),r:X(a.r,o.r,i,n)}}function yi(t,e,i,n){if(i===m)return pi();if(i!==y)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return mi(i,s,t.getRadius(),e.getRadius(),n);{const t=i??s;if(t)return di(t)}}}function vi(t,e,i,n){const s=L(e)?e:e.value;return s===m?n?si(t,{value:s}):i?m:y:s===y?y:si(t,{value:s})}function bi(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function xi(t,e,i){const n={h:{enable:!1,value:t.h,min:0,max:P},s:{enable:!1,value:t.s,min:0,max:k},l:{enable:!1,value:t.l,min:0,max:C}};return e&&(wi(n.h,e.h,i),wi(n.s,e.s,i),wi(n.l,e.l,i)),n}function wi(e,i,n){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=Z(i.speed)/h*n,e.decay=1-Z(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=Z(i.count),e.time=0,e.delayTime=Z(i.delay)*p,i.sync||(e.velocity*=N(),e.value*=N()),e.initialValue=e.value,e.offset=J(i.offset)):e.velocity=0}function Mi(e,i,n,s){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=n.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const a=e.offset?Y(e.offset):0,o=(e.velocity??0)*n.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=G(e.value,l,c)}function Pi(t,e,i){if(!t)return;const{h:n,s:s,l:a}=t;Mi(n,!1,e),Mi(s,!0,e),Mi(a,!0,e)}function ki(e,i,n){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*n}}const Ci=function(){const t=globalThis.tsParticles;return t?.pluginManager?t:new ie}();class Di{enable=!1;mode="destination-out";load(t){H(t)||(oe(this,"mode",t.mode),oe(this,"enable",t.enable))}}class Oi{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Fo});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let n=e.blend;n?.load||(e.blend=n=new Di),n.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new Di,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function zi(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Oi)})}class Si{draw(t){!function(t){const{context:e,particle:i,radius:n}=t;i.circleRange??={min:0,max:v};const s=i.circleRange;e.arc(g.x,g.y,n,s.min,s.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,n=i?.angle??{max:360,min:0};e.circleRange=A(n)?{min:st(n.min),max:st(n.max)}:{min:0,max:st(n)}}}async function Ii(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Si))})}var Ti;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Ti||(Ti={}));const Ri=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Li=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Ei{accepts(t){return t.startsWith("#")}handleColor(t){return this.#m(t.value)}handleRangeColor(t){return this.#m(t.value)}parseString(t){return this.#m(t)}#m(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Ri,(t,e,i,n,s)=>e+e+i+i+n+n+(void 0===s?"":s+s)),i=Li.exec(e);return i?{a:i[Ti.a]?Number.parseInt(i[Ti.a],16)/255:1,b:Number.parseInt(i[Ti.b]??"0",16),g:Number.parseInt(i[Ti.g]??"0",16),r:Number.parseInt(i[Ti.r]??"0",16)}:void 0}}async function _i(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ei)})}var Fi;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Fi||(Fi={}));const Ai=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Bi{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return di(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return di({h:Z(e.h),l:Z(e.l),s:Z(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Ai.exec(t);return e?ui({a:e.length>4?dt(e[Fi.a]):1,h:Number.parseInt(e[Fi.h]??"0",10),l:Number.parseInt(e[Fi.l]??"0",10),s:Number.parseInt(e[Fi.s]??"0",10)}):void 0}}async function Hi(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Bi)})}class Vi{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Bo});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function qi(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initialized||(e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i))},t.pluginManager.addPlugin(new Vi(t.pluginManager))})}function Ui(e,i){const n=e.value,s=e.animation,a={delayTime:Z(s.delay)*p,enable:s.enable,value:Z(e.value)*i,max:Q(n)*i,min:K(n)*i,loops:0,maxLoops:Z(s.count),time:0};if(s.enable){switch(a.decay=1-Z(s.decay),s.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=N()>=u?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=s.mode===t.AnimationMode.auto;switch(s.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=Y(a),e&&(a.status=N()>=u?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function Ni(e,i,n,s,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&&(n?i.status=t.AnimationStatus.decreasing:i.value-=c,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(n?i.status=t.AnimationStatus.increasing:i.value+=c,i.loops??=0,i.loops++)}!function(e,i,n,s,a){switch(i){case t.DestroyType.max:n>=a&&e.destroy();break;case t.DestroyType.min:n<=s&&e.destroy()}}(e,s,i.value,r,c),e.destroyed||(i.value=G(i.value,r,c))}}class $i extends ge{destroy=t.DestroyType.none;load(t){super.load(t),H(t)||oe(this,"destroy",t.destroy)}}class Wi extends Ie{animation=new $i;value=1;load(t){if(H(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class ji{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Ui(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=Z(i.speed)/h*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=N()))}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){de(t,"opacity",Wi,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&Ni(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function Gi(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new ji(t)))})}const Xi={[t.OutModeDirection.left]:{axis:"x",canvas:"width",bounce:"horizontal",negativeEdge:"right",positiveEdge:"left",negative:!0},[t.OutModeDirection.right]:{axis:"x",canvas:"width",bounce:"horizontal",negativeEdge:"right",positiveEdge:"left",negative:!1},[t.OutModeDirection.top]:{axis:"y",canvas:"height",bounce:"vertical",negativeEdge:"bottom",positiveEdge:"top",negative:!0},[t.OutModeDirection.bottom]:{axis:"y",canvas:"height",bounce:"vertical",negativeEdge:"bottom",positiveEdge:"top",negative:!1}};class Yi{modes;#u;#y;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#y=e.plugins.filter(t=>!!t.particleBounce)}update(e,i,n,s){if(!this.modes.includes(s))return;for(const t of this.#y)if(t.particleBounce?.(e,n,i))return;const a=e.getPosition(),o=e.offset,r=e.getRadius(),c=Pt(a,r),l=this.#u.canvas.size,d=!e.isInsideCanvasForOutMode(s,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||!(e.direction in Xi))return;const i=Xi[e.direction],n=e.bounds,s=e.canvasSize[i.canvas],a=e.particle.position,o=e.particle.velocity[i.axis];if(i.negative&&n[i.negativeEdge]<0?a[i.axis]=e.size+e.offset[i.axis]:!i.negative&&n[i.positiveEdge]>s&&(a[i.axis]=s-e.size-e.offset[i.axis]),!e.outOfCanvas||!(i.negative&&o<0||!i.negative&&o>0))return;e.particle.velocity[i.axis]*=-Z(e.particle.options.bounce[i.bounce].value);const r=e.offset[i.axis]+e.size;a[i.axis]=i.negative?r:s-r,e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:s,direction:i,bounds:c,canvasSize:l,offset:o,outOfCanvas:d,size:r})}}class Zi{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,n,s){if(this.modes.includes(s)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(s,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=tt(e.position,e.moveCenter),{x:n,y:s}=e.velocity;if(n<0&&t>e.moveCenter.radius||s<0&&i>e.moveCenter.radius||n>=0&&t<-e.moveCenter.radius||s>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class Ki{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,n,s){if(!this.modes.includes(s))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const a=e.options.move.gravity,o=this.#u,r=o.canvas.size,c=e.getRadius();if(a.enable){const n=e.position;(!a.inverse&&n.y>r.height+c&&i===t.OutModeDirection.bottom||a.inverse&&n.y<-c&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+c||e.velocity.y<0&&e.position.y>=-c||e.velocity.x>0&&e.position.x<=r.width+c||e.velocity.x<0&&e.position.x>=-c)return;wt(e.position,o.canvas.size,g,c,i)||e.destroy()}}}const Qi=T.origin;class Ji{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,n,s){if(!this.modes.includes(s))return;const a=this.#u;if(e.outType===t.ParticleOutType.inside)this.#v(e,a);else{if(e.isInsideCanvasForOutMode(s,i))return;e.outType===t.ParticleOutType.outside?this.#b(e):this.#x(e,a,i)}}#v(t,e){const{x:i,y:n}=t.velocity;Qi.setTo(g),Qi.length=t.moveCenter.radius,Qi.angle=t.velocity.angle+Math.PI,Qi.addTo(t.moveCenter);const{dx:s,dy:a}=tt(t.position,Qi);if(i<=0&&s>=0||n<=0&&a>=0||i>=0&&s<=0||n>=0&&a<=0)return;t.position.x=Math.floor(Y({min:0,max:e.canvas.size.width})),t.position.y=Math.floor(Y({min:0,max:e.canvas.size.height}));const{dx:o,dy:r}=tt(t.position,t.moveCenter);t.direction=Math.atan2(-r,-o),t.velocity.angle=t.direction,t.justWarped=!0}#x(e,i,n){const s=e.options.move.warp,a=i.canvas.size,o=e.getRadius(),r={bottom:a.height+o+e.offset.y,left:-o-e.offset.x,right:a.width+o+e.offset.x,top:-o-e.offset.y},c=Pt(e.position,o);n===t.OutModeDirection.right&&c.left>a.width+e.offset.x?(e.position.x=r.left,e.initialPosition.x=e.position.x,s||(e.position.y=N()*a.height,e.initialPosition.y=e.position.y),e.justWarped=!0):n===t.OutModeDirection.left&&c.right<-e.offset.x&&(e.position.x=r.right,e.initialPosition.x=e.position.x,s||(e.position.y=N()*a.height,e.initialPosition.y=e.position.y),e.justWarped=!0),n===t.OutModeDirection.bottom&&c.top>a.height+e.offset.y?(s||(e.position.x=N()*a.width,e.initialPosition.x=e.position.x),e.position.y=r.top,e.initialPosition.y=e.position.y,e.justWarped=!0):n===t.OutModeDirection.top&&c.bottom<-e.offset.y&&(s||(e.position.x=N()*a.width,e.initialPosition.x=e.position.x),e.position.y=r.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0)}#b(t){t.position.x=Math.floor(Y({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(Y({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=tt(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0}}class tn{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#w(e,t.OutMode.bounce,t=>new Yi(t)),this.#w(e,t.OutMode.out,t=>new Ji(t)),this.#w(e,t.OutMode.destroy,t=>new Zi(t)),this.#w(e,t.OutMode.none,t=>new Ki(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const n=e.options.move.outModes;e.justWarped=!1,this.#M(e,i,n.bottom??n.default,t.OutModeDirection.bottom),this.#M(e,i,n.left??n.default,t.OutModeDirection.left),this.#M(e,i,n.right??n.default,t.OutModeDirection.right),this.#M(e,i,n.top??n.default,t.OutModeDirection.top)}#w(t,e,i){const n=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)(n,e)&&this.updaters.set(e,i(this.#u))}#M(t,e,i,n){for(const s of this.updaters.values())s.update(t,n,e,i)}}async function en(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new tn(t)))})}class nn{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,n=zt(i.paint,t.id,i.reduceDuplicates);this.#P(n,t,e),this.#k(n,t,e)}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:n,strokeColor:s}=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=!!n&&(void 0!==s?.h.value&&s.h.enable||void 0!==s?.s.value&&s.s.enable||void 0!==s?.l.value&&s.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(Pi(t.fillColor,e,this.#u.hdr),Pi(t.strokeColor,e,this.#u.hdr))}#P(t,e,i){const n=t?.fill,s=t?.color,a=s??void 0;if(!n)return e.fillEnabled=!1,e.fillAnimation=void 0,e.fillColor=void 0,void(e.fillOpacity=1);const o=ve.create(void 0===a?void 0:ve.create(void 0,a),n.color);e.fillEnabled=n.enable,e.fillOpacity=Z(n.opacity),e.fillAnimation=o.animation;const r=oi(this.#p,o);r&&(e.fillColor=xi(r,e.fillAnimation,i.retina.reduceFactor))}#k(t,e,i){const n=t?.stroke,s=t?.color,a=s??void 0;if(!n)return e.strokeAnimation=void 0,e.strokeColor=void 0,e.strokeOpacity=1,void(e.strokeWidth=0);const o=ve.create(void 0===a?void 0:ve.create(void 0,a),n.color);e.strokeWidth=Z(n.width)*i.retina.pixelRatio,e.strokeOpacity=Z(n.opacity??1),e.strokeAnimation=o.animation;const r=oi(this.#p,o)??e.getFillColor();r&&(e.strokeColor=xi(r,e.strokeAnimation,i.retina.reduceFactor))}}async function sn(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new nn(t.pluginManager,e)))})}var an;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(an||(an={}));const on=/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 rn{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:Z(e.r),g:Z(e.g),b:Z(e.b)}}parseString(t){if(!this.accepts(t))return;const e=on.exec(t);return e?{a:e.length>4?dt(e[an.a]):1,b:parseInt(e[an.b]??"0",10),g:parseInt(e[an.g]??"0",10),r:parseInt(e[an.r]??"0",10)}:void 0}}async function cn(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new rn)})}class ln extends ge{destroy=t.DestroyType.none;load(t){super.load(t),H(t)||oe(this,"destroy",t.destroy)}}class dn extends Ie{animation=new ln;value=3;load(t){if(super.load(t),H(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 n=i.animation;n.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/h*e.retina.reduceFactor,n.sync||(t.size.velocity*=N()))}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){de(t,"size",dn,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Ui(i,e),t.retina.sizeAnimationSpeed=Z(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&Ni(t,t.size,!0,t.options.size.animation.destroy,e)}}async function un(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new hn(t)))})}async function pn(t){t.checkVersion("4.5.0"),await t.pluginManager.register(async t=>{await Promise.all([zi(t),_i(t),Hi(t),cn(t),qi(t),Ii(t),sn(t),Gi(t),en(t),un(t)])})}const gn=new Map;async function fn(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{for(const[e,i]of gn)t.pluginManager.addEasing(e,i)})}gn.set("ease-in-quad",t=>t**2),gn.set("ease-out-quad",t=>1-(1-t)**2),gn.set("ease-in-out-quad",t=>t<.5?2*t**2:1-(-2*t+2)**2/2);const mn=["emoji"];function yn(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}async function vn(t,e){try{await mt().fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}const bn='"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';class xn{#C=new Map;destroy(){for(const[t,e]of this.#C)e instanceof ImageBitmap&&e.close(),this.#C.delete(t)}draw(t){const e=t.particle.emojiDataKey;if(!e)return;const i=this.#C.get(e);i&&function(t,e){const{context:i,opacity:n}=t,s=i.globalAlpha,a=e.width,o=a*u;i.globalAlpha=n,i.drawImage(e,-o,-o,a,a),i.globalAlpha=s}(t,i)}async init(t){const e=t.actualOptions.particles.shape;if(!mn.some(t=>bt(t,e.type)))return;const i=[vn(bn)];Ot(mn.map(t=>e.options[t])[0],t=>{t.font&&i.push(vn(t.font))}),await Promise.all(i)}particleDestroy(t){t.emojiDataKey=void 0}particleInit(t,e){const i=e.shapeData;if(!i.value)return;const n=zt(i.value,e.randomIndexData);if(!n)return;const s="string"==typeof n?{font:i.font??bn,padding:i.padding??0,value:n}:{font:bn,padding:0,...i,...n},a=s.font,o=s.value,r=`${o}_${a}`;if(this.#C.has(r))return void(e.emojiDataKey=r);const c=2*s.padding,l=Q(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.#C.set(r,g),e.emojiDataKey=r}}async function wn(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(mn,()=>Promise.resolve(new xn))})}const Mn="TSP-3201",Pn="TSP-3202";class kn{enable=!1;mode=[];load(t){H(t)||(oe(this,"enable",t.enable),oe(this,"mode",t.mode))}}var Cn,Dn,On;!function(t){t.circle="circle",t.rectangle="rectangle"}(Cn||(Cn={}));class zn{enable=!1;mode=[];selectors=[];type=Cn.circle;load(t){H(t)||(oe(this,"selectors",t.selectors),oe(this,"enable",t.enable),oe(this,"mode",t.mode),oe(this,"type",t.type))}}class Sn{enable=!1;mode=[];load(t){H(t)||(oe(this,"enable",t.enable),oe(this,"mode",t.mode))}}class In{onClick=new kn;onDiv=new zn;onHover=new Sn;load(t){if(H(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=Ot(e,t=>{const e=new zn;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(Dn||(Dn={}));class Tn{#u;constructor(t){this.#u=t}load(t){if(H(t))return;if(!this.#u)return;const e=this.#u.interactionManager?.interactors??[];for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class Rn{detectsOn=Dn.window;events=new In;modes;constructor(t){this.modes=new Tn(t)}load(t){if(H(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class Ln{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return qo});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let n=e.interactivity;n?.load||(e.interactivity=n=new Rn(t)),n.load(i?.interactivity);const s=t.interactionManager?.interactors;if(s)for(const t of s)t.loadOptions&&t.loadOptions(e,i)}loadParticlesOptions(t,e,i){i?.interactivity&&(e.interactivity=kt({},i.interactivity));const n=t.interactionManager?.interactors;if(n)for(const t of n)t.loadParticlesOptions?.(e,i)}needsPlugin(){return!0}}!function(t){t.external="external",t.particles="particles"}(On||(On={}));class En{type=On.external;container;constructor(t){this.container=t}}class _n{type=On.particles;container;constructor(t){this.container=t}}const Fn="pointerleave",An="pointermove",Bn="touchstart",Hn="touchend",Vn="touchmove",qn="touchcancel";function Un(t,e){if(B(t))return t.find((t,i)=>e(t,i));return e(t,0)?t:void 0}function Nn(t,e){return!!Un(e,e=>e.enable&&bt(t,e.mode))}function $n(t,e,i){Ot(e,e=>{const n=e.mode;e.enable&&bt(t,n)&&function(t,e){const i=t.selectors;Ot(i,i=>{e(i,t)})}(e,i)})}function Wn(t,e){if(e&&t)return Un(t,t=>function(t,e){const i=Ot(e,e=>t.matches(e));return B(i)?i.some(t=>t):i}(e,t.selectors))}function jn(t){if(!t.pluginManager.addInteractor)throw new Error(ut(Mn))}const Gn=T.origin;function Xn(t,e,i,n,s,a,o){const r=e.actualOptions.interactivity?.modes.attract;if(!r)return;const c=e.particles.grid.query(s,a);for(const e of c){const{dx:s,dy:a,distance:c}=tt(e.position,i),l=r.speed*r.factor,d=G(t.getEasing(r.easing)(1-c/n)*l,1,r.maxSpeed);Gn.x=c?s/c*d:l,Gn.y=c?a/c*d:l,o?.(e),e.position.subFrom(Gn)}}let Yn=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){H(t)||(oe(this,"distance",t.distance),oe(this,"duration",t.duration),void 0!==t.easing&&(this.easing=t.easing),oe(this,"factor",t.factor),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed),oe(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 Kn=class extends En{handleClickMode;#D;#O;#p;#z;constructor(t,e){super(e),this.#p=t,this.#O=0,this.#D=new Set,this.#z=new Map,e.attract??={particles:[]},this.handleClickMode=(t,i)=>{const n=this.container.actualOptions,s=n.interactivity?.modes.attract;if(s&&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)},s.duration*p)}}}get maxDistance(){return this.#O}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.attract;e&&(this.#O=e.distance,t.retina.attractModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#D.clear();const e=this.container.actualOptions,i=t.status===An,n=e.interactivity?.events;if(!n)return;const{enable:s,mode:a}=n.onHover,{enable:o,mode:r}=n.onClick;i&&s&&bt(Zn,a)?function(t,e,i,n,s){const a=i.mouse.position,o=e.retina.attractModeDistance;!o||o<0||!a||Xn(t,e,a,o,new se(a.x,a.y,o),t=>n(t),s)}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#S(t)}):o&&bt(Zn,r)&&function(t,e,i,n,s){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;Xn(t,e,a,o,new se(a.x,a.y,o),t=>n(t),s)}else!1===a.clicking&&(a.particles=[])}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#S(t)}),this.#I()}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!(n.position&&s?.onHover.enable||n.clickPosition&&s?.onClick.enable))return!1;const a=s.onHover.mode,o=s.onClick.mode;return bt(Zn,a)||bt(Zn,o)}loadModeOptions(t,...e){de(t,"attract",Yn,...e)}reset(){}#I(){const t=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!t?.enable||!this.#z.size)return;const e=Date.now(),i=t.delay*p,n=Math.max(.001,Math.min(1,t.speed));for(const[s,a]of this.#z){if(this.#D.has(s))continue;if(s.destroyed){this.#z.delete(s);continue}const o=a.target;if(e-a.lastInteractionTime<i)continue;let r=o.x-s.position.x,c=o.y-s.position.y,l=o.z-s.position.z;if(t.follow&&s.options.move.enable){const{x:t,y:e,z:i}=s.velocity,n=t*t+e*e+i*i;if(n>0){const s=(r*t+c*e+l*i)/n;r-=t*s,c-=e*s,l-=i*s}}s.position.x+=r*n,s.position.y+=c*n,s.position.z+=l*n,Math.abs(r)<=.5&&Math.abs(c)<=.5&&(s.position.x=o.x,s.position.y=o.y,s.position.z=o.z,this.#z.delete(s))}}#S(t){this.#D.add(t);const e=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!e?.enable)return;const i=Date.now();let n=this.#z.get(t);n||(n={target:t.position.copy(),lastInteractionTime:i},this.#z.set(t,n)),n.lastInteractionTime=i}};async function Qn(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{jn(t),t.pluginManager.addInteractor?.("externalAttract",e=>Promise.resolve(new Kn(t.pluginManager,e)))})}const Jn=Math.PI*u;function ts(t,e,i,n,s){const a=t.particles.grid.query(n,s);for(const t of a)n instanceof se?Dt(Ct(t),{position:e,mass:i**2*Jn,velocity:T.origin,factor:T.origin}):n instanceof ae&&ns(t,Pt(e,i))}function es(t,e,i,n){$n(i,e,(e,i)=>{!function(t,e,i,n){const s=mt().querySelectorAll(e);s.length&&s.forEach(e=>{const s=e,a=t.retina.pixelRatio,o={x:(s.offsetLeft+s.offsetWidth*u)*a,y:(s.offsetTop+s.offsetHeight*u)*a},r=s.offsetWidth*u*a,c=10*a,l=i.type===Cn.circle?new se(o.x,o.y,r+c):new ae(s.offsetLeft*a-c,s.offsetTop*a-c,s.offsetWidth*a+2*c,s.offsetHeight*a+2*c);n(o,r,l)})}(t,e,i,(e,i,s)=>{ts(t,e,i,s,n)})})}function is(t){const e={bounced:!1},{pSide:i,pOtherSide:n,rectSide:s,rectOtherSide:a,velocity:o,factor:r}=t;return n.min<a.min||n.min>a.max||n.max<a.min||n.max>a.max||(i.max>=s.min&&i.max<=(s.max+s.min)*u&&o>0||i.min<=s.max&&i.min>(s.max+s.min)*u&&o<0)&&(e.velocity=o*-r,e.bounced=!0),e}function ns(t,e){const i=Pt(t.getPosition(),t.getRadius()),n=t.options.bounce,s=is({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:Z(n.horizontal.value)});s.bounced&&(void 0!==s.velocity&&(t.velocity.x=s.velocity),void 0!==s.position&&(t.position.x=s.position));const a=is({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:Z(n.vertical.value)});a.bounced&&(void 0!==a.velocity&&(t.velocity.y=a.velocity),void 0!==a.position&&(t.position.y=a.position))}class ss{distance=200;load(t){H(t)||oe(this,"distance",t.distance)}}const as="bounce";class os extends En{#O;constructor(t){super(t),this.#O=0}get maxDistance(){return this.#O}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bounce;e&&(this.#O=e.distance,t.retina.bounceModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,n=t.status===An;if(!i)return;const s=i.onHover.enable,a=i.onHover.mode,o=i.onDiv;n&&s&&bt(as,a)?function(t,e,i){const n=10*t.retina.pixelRatio,s=e.mouse.position,a=t.retina.bounceModeDistance;!a||a<0||!s||ts(t,s,a,new se(s.x,s.y,a+n),i)}(this.container,t,e=>this.isEnabled(t,e)):es(this.container,o,as,e=>this.isEnabled(t,e))}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const a=s.onDiv;return!!n.position&&s.onHover.enable&&bt(as,s.onHover.mode)||Nn(as,a)}loadModeOptions(t,...e){de(t,"bounce",ss,...e)}reset(){}}async function rs(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{jn(t),t.pluginManager.addInteractor?.("externalBounce",t=>Promise.resolve(new os(t)))})}class cs{color;distance=200;duration=.4;mix=!1;opacity;size;load(t){if(!H(t)){if(oe(this,"distance",t.distance),oe(this,"duration",t.duration),oe(this,"mix",t.mix),re(this,"opacity",t.opacity),void 0!==t.color){const e=B(this.color)?void 0:this.color;this.color=Ot(t.color,t=>ye.create(e,t))}oe(this,"size",t.size)}}}class ls extends cs{selectors=[];load(t){super.load(t),H(t)||oe(this,"selectors",t.selectors)}}class ds extends cs{divs;load(t){super.load(t),H(t)||(this.divs=Ot(t.divs,t=>{const e=new ls;return e.load(t),e}))}}class hs{div;enabled=!1;fillColor;finalColor;id="bubble";inRange=!1;opacity;priority=100;radius;strokeColor}var us;function ps(t,e,i,n){if(e>=i){return G(t+(e-i)*n,t,e)}if(e<i){return G(t-(i-e)*n,e,t)}}!function(t){t.color="color",t.opacity="opacity",t.size="size"}(us||(us={}));const gs="bubble";class fs extends En{handleClickMode;#O;#T=new WeakMap;#p;constructor(t,e){super(e),this.#p=t,this.#O=0,e.bubble??={},this.handleClickMode=t=>{t===gs&&(e.bubble??={},e.bubble.clicking=!0)}}get maxDistance(){return this.#O}clear(t,e,i){const n=this.#T.get(t);n?.inRange&&!i||(t.removeModifier(gs),this.#T.delete(t))}getOrCreateModifier(t){let e=this.#T.get(t);return e||(e=new hs,this.#T.set(t,e)),t.getModifier(e.id)!==e&&t.addModifier(e),e}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bubble;e&&(this.#O=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,n=i.interactivity?.events;if(!n)return;const s=n.onHover,a=n.onClick,o=s.enable,r=s.mode,c=a.enable,l=a.mode,d=n.onDiv;o&&bt(gs,r)?this.#R(t):c&&bt(gs,l)?this.#L(t):$n(gs,d,(i,n)=>{this.#E(t,e,i,n)})}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const{onClick:a,onDiv:o,onHover:r}=s,c=Nn(gs,o);return!!(c||r.enable&&n.position||a.enable&&n.clickPosition)&&(bt(gs,r.mode)||bt(gs,a.mode)||c)}loadModeOptions(t,...e){de(t,"bubble",ds,...e)}reset(t,e){const i=this.#T.get(e);i&&(i.enabled=!1,i.inRange=!1)}#L(t){const e=this.container,i=e.actualOptions,n=t.mouse.clickPosition,s=i.interactivity?.modes.bubble;if(!s||!n)return;e.bubble??={};const a=e.retina.bubbleModeDistance;if(!a||a<0)return;const o=e.particles.grid.queryCircle(n,a,e=>this.isEnabled(t,e)),{bubble:r}=e;for(const i of o){if(!r.clicking)continue;const o=this.getOrCreateModifier(i);o.enabled=!r.durationEnd,o.inRange=!r.durationEnd;const c=it(i.getPosition(),n),l=(performance.now()-(t.mouse.clickTime??0))/p;l>s.duration&&(r.durationEnd=!0),l>2*s.duration&&(r.clicking=!1,r.durationEnd=!1);const d={bubbleObj:{optValue:e.retina.bubbleModeSize,value:o.radius},particlesObj:{optValue:i.size.max,value:i.size.value},type:us.size};this.#_(i,c,l,d);const h={bubbleObj:{optValue:s.opacity,value:o.opacity},particlesObj:{optValue:i.opacity?.max??1,value:i.opacity?.value??1},type:us.opacity};this.#_(i,c,l,h),!r.durationEnd&&c<=a?this.#F(i,c):(o.fillColor=void 0,o.strokeColor=void 0)}}#R(t){const e=this.container,i=t.mouse.position,n=e.retina.bubbleModeDistance;if(!n||n<0||!i)return;const s=e.particles.grid.queryCircle(i,n,e=>this.isEnabled(t,e));for(const e of s){const s=this.getOrCreateModifier(e);s.enabled=!0,s.inRange=!0;const a=it(e.getPosition(),i),o=1-a/n;a<=n?o>=0&&t.status===An&&(this.#A(e,o),this.#B(e,o),this.#F(e,o)):this.reset(t,e),t.status===Fn&&this.reset(t,e)}}#F(t,e,i){const n=this.container.actualOptions,s=i??n.interactivity?.modes.bubble,a=this.getOrCreateModifier(t);if(s){if(!a.finalColor){const t=s.color;if(!t)return;const e=zt(t);a.finalColor=oi(this.#p,e)}if(a.finalColor)if(s.mix){a.fillColor=void 0,a.strokeColor=void 0;const i=t.getFillColor();if(i){const t=ri(mi(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}}#B(t,e,i){const n=this.container.actualOptions,s=i?.opacity??n.interactivity?.modes.bubble?.opacity;if(!s)return;const a=ps(t.opacity?.value??1,s,t.opacity?.max??1,e);if(void 0!==a){this.getOrCreateModifier(t).opacity=a}}#A(t,e,i){const n=this.container,s=i?.size?i.size*n.retina.pixelRatio:n.retina.bubbleModeSize;if(void 0===s)return;const a=ps(t.size.value,s,t.size.max,e);if(void 0!==a){this.getOrCreateModifier(t).radius=a}}#_(t,e,i,n){const s=this.container,a=n.bubbleObj.optValue,o=s.actualOptions,r=o.interactivity?.modes.bubble;if(!r||void 0===a)return;const c=r.duration,l=s.retina.bubbleModeDistance,d=n.particlesObj.optValue,h=n.bubbleObj.value,u=n.particlesObj.value??0,p=n.type;if(!l||l<0||a===d)return;s.bubble??={};const g=this.getOrCreateModifier(t);if(s.bubble.durationEnd)h&&(p===us.size&&(g.radius=void 0),p===us.opacity&&(g.opacity=void 0));else if(e<=l){if((h??u)!==a){const t=u-i*(u-a)/c;p===us.size&&(g.radius=t),p===us.opacity&&(g.opacity=t)}}else p===us.size&&(g.radius=void 0),p===us.opacity&&(g.opacity=void 0)}#E(t,e,i,n){const s=this.container,a=mt().querySelectorAll(i),o=s.actualOptions.interactivity?.modes.bubble;o&&a.length&&a.forEach(i=>{const a=i,r=s.retina.pixelRatio,c={x:(a.offsetLeft+a.offsetWidth*u)*r,y:(a.offsetTop+a.offsetHeight*u)*r},l=a.offsetWidth*u*r,d=n.type===Cn.circle?new se(c.x,c.y,l):new ae(a.offsetLeft*r,a.offsetTop*r,a.offsetWidth*r,a.offsetHeight*r),h=s.particles.grid.query(d,e=>this.isEnabled(t,e));for(const t of h){if(!d.contains(t.getPosition()))continue;let i=this.getOrCreateModifier(t);i.enabled=!0,i.inRange=!0;const n=Wn(o.divs,a);i.div&&i.div===a||(this.clear(t,e,!0),i=this.getOrCreateModifier(t),i.enabled=!0,i.inRange=!0,i.div=a),this.#A(t,1,n),this.#B(t,1,n),this.#F(t,1,n)}})}}async function ms(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{jn(t),t.pluginManager.addInteractor?.("externalBubble",e=>Promise.resolve(new fs(t.pluginManager,e)))})}class ys{opacity=.5;load(t){H(t)||re(this,"opacity",t.opacity)}}class vs{distance=80;links=new ys;radius=60;load(t){H(t)||(oe(this,"distance",t.distance),this.links.load(t.links),oe(this,"radius",t.radius))}}function bs(t,e,i,n){const s=t.actualOptions,a=s.interactivity?.modes.connect;if(a)return function(t,e,i,n,s){const a=Math.floor(n.getRadius()/i.getRadius()),o=i.getFillColor(),r=n.getFillColor();if(!o||!r)return;const c=i.getPosition(),l=n.getPosition(),d=mi(o,r,i.getRadius(),n.getRadius(),t.hdr),h=e.createLinearGradient(c.x,c.y,l.x,l.y);return h.addColorStop(0,fi(o,t.hdr,s,t.peakNits,t.hdrMode)),h.addColorStop(G(a,0,1),gi(d,t.hdr,s,t.peakNits,t.hdrMode)),h.addColorStop(1,fi(r,t.hdr,s,t.peakNits,t.hdrMode)),h}(t,e,i,n,a.links.opacity)}function xs(t,e,i){t.canvas.render.draw(n=>{const s=bs(t,n,e,i);if(!s)return;const a=e.getPosition(),o=i.getPosition();!function(t,e,i,n,s){yn(t,n,s),t.lineWidth=e,t.strokeStyle=i,t.stroke()}(n,e.retina.linksWidth??0,s,a,o)})}class ws extends En{#O;constructor(t){super(t),this.#O=0}get maxDistance(){return this.#O}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.connect;e&&(this.#O=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:n,connectModeRadius:s}=e.retina;if(!n||n<0||!s||s<0||!i)return;const a=Math.abs(s),o=e.particles.grid.queryCircle(i,a,e=>this.isEnabled(t,e));o.forEach((t,i)=>{const s=t.getPosition();for(const a of o.slice(i+1)){const i=a.getPosition(),o=Math.abs(n),r=Math.abs(s.x-i.x),c=Math.abs(s.y-i.y);r<o&&c<o&&xs(e,t,a)}})}}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!(!s?.onHover.enable||!n.position)&&bt("connect",s.onHover.mode)}loadModeOptions(t,...e){de(t,"connect",vs,...e)}reset(){}}async function Ms(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{jn(t),t.pluginManager.addInteractor?.("externalConnect",t=>Promise.resolve(new ws(t)))})}function Ps(t,e){const i=t.particles.grid.query(e);for(const t of i)t.destroy()}function ks(t,e,i){$n(i,e,(e,i)=>{!function(t,e,i){const n=mt().querySelectorAll(e);n.length&&n.forEach(e=>{const n=e,s=t.retina.pixelRatio,a={x:(n.offsetLeft+n.offsetWidth*u)*s,y:(n.offsetTop+n.offsetHeight*u)*s},o=n.offsetWidth*u*s,r=10*s,c=i.type===Cn.circle?new se(a.x,a.y,o+r):new ae(n.offsetLeft*s-r,n.offsetTop*s-r,n.offsetWidth*s+2*r,n.offsetHeight*s+2*r);Ps(t,c)})}(t,e,i)})}class Cs{distance=200;load(t){H(t)||oe(this,"distance",t.distance)}}const Ds="destroy";class Os extends En{#O;constructor(t){super(t),this.#O=0}get maxDistance(){return this.#O}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.destroy;e&&(this.#O=e.distance,t.retina.destroyModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,n=t.status===An;if(!i)return;const s=i.onHover.enable,a=i.onHover.mode,o=i.onDiv;n&&s&&bt(Ds,a)?function(t,e){const i=10*t.retina.pixelRatio,n=e.mouse.position,s=t.retina.destroyModeDistance;!s||s<0||!n||Ps(t,new se(n.x,n.y,s+i))}(this.container,t):ks(this.container,o,Ds)}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const a=s.onDiv;return!!n.position&&s.onHover.enable&&bt(Ds,s.onHover.mode)||Nn(Ds,a)}loadModeOptions(t,...e){de(t,"destroy",Cs,...e)}reset(){}}async function zs(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{jn(t),t.pluginManager.addInteractor?.("externalDestroy",async t=>Promise.resolve(new Os(t)))})}class Ss{blink=!1;color;consent=!1;opacity=1;load(t){H(t)||(oe(this,"blink",t.blink),void 0!==t.color&&(this.color=ye.create(this.color,t.color)),oe(this,"consent",t.consent),re(this,"opacity",t.opacity))}}class Is{distance=100;links=new Ss;load(t){H(t)||(oe(this,"distance",t.distance),this.links.load(t.links))}}function Ts(t,e,i,n,s){t.canvas.render.draw(a=>{const o=e.getPosition();!function(t,e,i,n,s,a,o=!1,r,c){yn(t,i,n),t.strokeStyle=gi(s,o,a,r,c),t.lineWidth=e,t.stroke()}(a,e.retina.linksWidth??0,o,s,i,n,t.hdr,t.peakNits,t.hdrMode)})}class Rs extends En{#O;#p;constructor(t,e){super(e),this.#p=t,this.#O=0}get maxDistance(){return this.#O}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.grab;e&&(this.#O=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!==An)return;const n=t.mouse.position;if(!n)return;const s=e.retina.grabModeDistance;if(!s||s<0)return;const a=e.particles.grid.queryCircle(n,s,e=>this.isEnabled(t,e));for(const t of a){const a=it(t.getPosition(),n);if(a>s)continue;const o=i.modes.grab.links,r=o.opacity,c=r-a*r/s;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=vi(this.#p,l,t.blink,t.consent)}const d=yi(t,void 0,e.particles.grabLineColor,e.hdr);d&&Ts(e,t,d,c,n)}}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!s?.onHover.enable&&!!n.position&&bt("grab",s.onHover.mode)}loadModeOptions(t,...e){de(t,"grab",Is,...e)}reset(){}}async function Ls(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{jn(t),t.pluginManager.addInteractor?.("externalGrab",e=>Promise.resolve(new Rs(t.pluginManager,e)))})}class Es{force=2;smooth=10;load(t){H(t)||(oe(this,"force",t.force),oe(this,"smooth",t.smooth))}}class _s extends En{maxDistance=0;constructor(t){super(t)}clear(){}init(){}interact(t){for(const e of this.container.particles.filter(e=>this.isEnabled(t,e)))this.#H(t,e)}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!s?.onHover.enable&&!!n.position&&bt("parallax",s.onHover.mode)}loadModeOptions(t,...e){de(t,"parallax",Es,...e)}reset(){}#H(t,e){if(!this.isEnabled(t,e))return;const i=this.container,n=i.actualOptions,s=n.interactivity?.modes.parallax;if(!s)return;const a=s.force,o=t.mouse.position;if(!o)return;const r=i.canvas.size,c=r.width*u,l=r.height*u,d=s.smooth,h=e.getRadius()/a,p=(o.x-c)*h,g=(o.y-l)*h,{offset:f}=e;f.x+=(p-f.x)/d,f.y+=(g-f.y)/d}}async function Fs(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{jn(t),t.pluginManager.addInteractor?.("externalParallax",t=>Promise.resolve(new _s(t)))})}const As="pause";class Bs extends En{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{if(t!==As)return;const e=this.container;e.animationStatus?e.pause():e.play()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,n=(e?.interactivity??i.interactivity)?.events;return!!n&&bt(As,n.onClick.mode)}reset(){}}async function Hs(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{jn(t),t.pluginManager.addInteractor?.("externalPause",t=>Promise.resolve(new Bs(t)))})}class Vs{default=!0;groups=[];particles;quantity=4;load(t){H(t)||(oe(this,"default",t.default),void 0!==t.groups&&(this.groups=t.groups.map(t=>t)),this.groups.length||(this.default=!0),re(this,"quantity",t.quantity),this.particles=Ot(t.particles,t=>kt({},t)))}}const qs="push";class Us extends En{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=(t,e)=>{if(t!==qs)return;const i=this.container,n=i.actualOptions,s=n.interactivity?.modes.push;if(!s)return;const a=Z(s.quantity);if(a<=0)return;const o=xt([void 0,...s.groups]),r=kt(void 0!==o?i.actualOptions.particles.groups[o]:void 0,zt(s.particles));i.particles.push(a,e.mouse.position,r,o)}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;return!!s&&n.clicking&&n.inside&&!!n.position&&bt(qs,s.onClick.mode)}loadModeOptions(t,...e){de(t,"push",Vs,...e)}reset(){}}async function Ns(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{jn(t),t.pluginManager.addInteractor?.("externalPush",t=>Promise.resolve(new Us(t)))})}class $s{quantity=2;load(t){H(t)||re(this,"quantity",t.quantity)}}const Ws="remove";class js extends En{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{const e=this.container,i=e.actualOptions;if(!i.interactivity?.modes.remove||t!==Ws)return;const n=Z(i.interactivity.modes.remove.quantity);for(let t=0;t<n;t++)e.particles.get(t)?.destroy()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;return!!s&&n.clicking&&n.inside&&!!n.position&&bt(Ws,s.onClick.mode)}loadModeOptions(t,...e){de(t,"remove",$s,...e)}reset(){}}async function Gs(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{jn(t),t.pluginManager.addInteractor?.("externalRemove",t=>Promise.resolve(new js(t)))})}class Xs{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){H(t)||(oe(this,"distance",t.distance),oe(this,"duration",t.duration),oe(this,"easing",t.easing),oe(this,"factor",t.factor),oe(this,"speed",t.speed),oe(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 Ys extends Xs{selectors=[];load(t){super.load(t),H(t)||oe(this,"selectors",t.selectors)}}class Zs extends Xs{divs;load(t){super.load(t),H(t)||(this.divs=Ot(t.divs,t=>{const e=new Ys;return e.load(t),e}))}}const Ks="repulse";class Qs extends En{handleClickMode;#V;#D;#O;#q;#p;#z;constructor(t,e){super(e),this.#p=t,this.#O=0,this.#q=T.origin,this.#D=new Set,this.#V=T.origin,this.#z=new Map,e.repulse??={particles:[]},this.handleClickMode=(t,i)=>{const n=this.container.actualOptions,s=n.interactivity?.modes.repulse;if(!s||t!==Ks)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)},s.duration*p)}}get maxDistance(){return this.#O}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.repulse;e&&(this.#O=e.distance,t.retina.repulseModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#D.clear();const e=this.container.actualOptions,i=t.status===An,n=e.interactivity?.events;if(!n)return;const s=n.onHover,a=s.enable,o=s.mode,r=n.onClick,c=r.enable,l=r.mode,d=n.onDiv;i&&a&&bt(Ks,o)?this.#U(t):c&&bt(Ks,l)?this.#N(t):$n(Ks,d,(e,i)=>{this.#$(t,e,i)}),this.#I()}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const a=s.onDiv,o=s.onHover,r=s.onClick,c=Nn(Ks,a);if(!(c||o.enable&&n.position||r.enable&&n.clickPosition))return!1;const l=o.mode,d=r.mode;return bt(Ks,l)||bt(Ks,d)||c}loadModeOptions(t,...e){de(t,"repulse",Zs,...e)}reset(){}#N(t){const e=this.container,i=e.actualOptions.interactivity?.modes.repulse;if(!i)return;const n=e.repulse??{particles:[]};if(n.finish||(n.count??=0,n.count++,n.count===e.particles.count&&(n.finish=!0)),n.clicking){const s=e.retina.repulseModeDistance;if(!s||s<0)return;const a=Math.pow(s/6,3),o=t.mouse.clickPosition;if(void 0===o)return;const r=new se(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:s,distance:r}=tt(o,t.position),c=r**2,l=-a*i.speed/c;c<=a&&(this.#S(t),n.particles.push(t),this.#V.x=e,this.#V.y=s,this.#V.length=l,t.velocity.setTo(this.#V))}}else if(!1===n.clicking){for(const t of n.particles)t.velocity.setTo(t.initialVelocity);n.particles=[]}}#U(t){const e=this.container,i=t.mouse.position,n=e.retina.repulseModeDistance;!n||n<0||!i||this.#W(t,i,n,new se(i.x,i.y,n))}#W(t,e,i,n,s){const a=this.container,o=a.particles.grid.query(n,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=(s?.speed??l)*d;for(const t of o){const{dx:n,dy:s,distance:a}=tt(t.position,e),o=G(u(1-a/i)*p,0,h);this.#q.x=a?n/a*o:p,this.#q.y=a?s/a*o:p,this.#S(t),t.position.addTo(this.#q)}}#I(){const t=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!t?.enable||!this.#z.size)return;const e=Date.now(),i=t.delay*p,n=Math.max(.001,Math.min(1,t.speed));for(const[s,a]of this.#z){if(this.#D.has(s))continue;if(s.destroyed){this.#z.delete(s);continue}const o=a.target;if(e-a.lastInteractionTime<i)continue;t.follow&&s.options.move.enable&&(o.x+=s.velocity.x,o.y+=s.velocity.y,o.z+=s.velocity.z);const r=o.x-s.position.x,c=o.y-s.position.y,l=o.z-s.position.z;s.position.x+=r*n,s.position.y+=c*n,s.position.z+=l*n,Math.abs(r)<=.5&&Math.abs(c)<=.5&&(s.position.x=o.x,s.position.y=o.y,s.position.z=o.z,this.#z.delete(s))}}#$(t,e,i){const n=this.container,s=n.actualOptions.interactivity?.modes.repulse;if(!s)return;const a=mt().querySelectorAll(e);a.length&&a.forEach(e=>{const a=e,o=n.retina.pixelRatio,r={x:(a.offsetLeft+a.offsetWidth*u)*o,y:(a.offsetTop+a.offsetHeight*u)*o},c=a.offsetWidth*u*o,l=i.type===Cn.circle?new se(r.x,r.y,c):new ae(a.offsetLeft*o,a.offsetTop*o,a.offsetWidth*o,a.offsetHeight*o),d=Wn(s.divs,a);this.#W(t,r,c,l,d)})}#S(t){this.#D.add(t);const e=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!e?.enable)return;const i=Date.now();let n=this.#z.get(t);n||(n={target:t.position.copy(),lastInteractionTime:i},this.#z.set(t,n)),n.lastInteractionTime=i,e.follow&&t.options.move.enable&&(n.target.x+=t.velocity.x,n.target.y+=t.velocity.y,n.target.z+=t.velocity.z)}}async function Js(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{jn(t);const e=t.pluginManager;e.addInteractor?.("externalRepulse",t=>Promise.resolve(new Qs(e,t)))})}class ta{factor=3;radius=200;load(t){H(t)||(oe(this,"factor",t.factor),oe(this,"radius",t.radius))}}class ea{enabled=!1;id="slow";priority=100;speedFactor=1}const ia="slow";class na extends En{#O;#T=new WeakMap;constructor(t){super(t),this.#O=0}get maxDistance(){return this.#O}clear(t,e,i){const n=this.#T.get(t);n?.enabled&&!i||(t.removeModifier(ia),this.#T.delete(t))}getOrCreateModifier(t){let e=this.#T.get(t);return e||(e=new ea,this.#T.set(t,e)),t.getModifier(e.id)!==e&&t.addModifier(e),e}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.slow;e&&(this.#O=e.radius,t.retina.slowModeRadius=e.radius*t.retina.pixelRatio)}interact(){}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!s?.onHover.enable&&!!n.position&&bt(ia,s.onHover.mode)}loadModeOptions(t,...e){de(t,"slow",ta,...e)}reset(t,e){const i=this.#T.get(e);i&&(i.enabled=!1);const n=this.container,s=n.actualOptions,a=t.mouse.position,o=n.retina.slowModeRadius,r=s.interactivity?.modes.slow;if(!r||!o||o<0||!a)return;const c=it(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 sa(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{jn(t),t.pluginManager.addInteractor?.("externalSlow",t=>Promise.resolve(new na(t)))})}const aa=["image","images"],oa=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function ra(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,s().error(`Error loading image: ${t.source}`),e()}),i.src=t.source})}async function ca(t){if("svg"!==t.type)return void await ra(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(s().error("Image not found"),t.error=!0),t.loading=!1}function la(t,e,i,n,s=!1,a,o){const r=function(t,e,i,n=!1,s,a){const{svgData:o}=t;if(!o)return"";const r=fi(e,n,i,s,a);if(o.includes("fill"))return o.replaceAll(oa,()=>r);const c=o.indexOf(">");return`${o.substring(0,c)} fill="${r}"${o.substring(c)}`}(t,i,n.opacity?.value??1,s,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"}),n=URL.createObjectURL(i),s=new Image;s.addEventListener("load",()=>{c.loaded=!0,c.element=s,e(c),URL.revokeObjectURL(n)});s.addEventListener("error",()=>{(async()=>{URL.revokeObjectURL(n);const i={...t,error:!1,loading:!0};await ra(i),c.loaded=!0,c.element=i.element,e(c)})()}),s.src=n})}const da="TSP-2001",ha="TSP-2002",ua="TSP-2003",pa="TSP-2004";class ga{#u;#s;constructor(t,e){this.#s=t,this.#u=e}draw(t){const{context:e,radius:i,particle:n,opacity:s}=t,a=n.image,o=a?.element;if(a){if(e.globalAlpha=s,o){const t=a.ratio,n={x:-i,y:-i},s=2*i;e.drawImage(o,n.x,n.y,s,s/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(!e.preload||!this.#s.loadImage)return;const i=[];for(const n of e.preload)i.push(this.#s.loadImage(t,n));await Promise.all(i)}loadShape(t){const e=this.#u;if(!t.shape||!aa.includes(t.shape))return;const i=t.shapeData;if(!i)return;const n=this.#s.getImages?.(e),s=n?.find(t=>t.name===i.name||t.source===i.src);s||this.#j(e,i).then(()=>{this.loadShape(t)})}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;const i=this.#s.getImages?.(t),n=e.shapeData;if(!n)return;const s=e.getFillColor(),a=i?.find(t=>t.name===n.name||t.source===n.src);if(!a)return;const o=n.replaceColor;a.loading?setTimeout(()=>{this.particleInit(t,e)}):(async()=>{let i;i=a.svgData&&s?await la(a,n,s,e,t.hdr,t.peakNits,t.hdrMode):{color:s,data:a,element:a.element,loaded:!0,ratio:n.width&&n.height?n.width/n.height:a.ratio??1,replaceColor:o,source:n.src},i.ratio||(i.ratio=1);const r={image:i,close:n.close??e.shapeClose};e.image=r.image,e.shapeClose=r.close})()}#j=async(t,e)=>{if(!this.#s.loadImage)throw new Error(ut(pa));await this.#s.loadImage(t,{name:e.name,replaceColor:e.replaceColor,src:e.src})}}class fa{height;name;replaceColor;src="";width;load(t){H(t)||(oe(this,"height",t.height),oe(this,"name",t.name),oe(this,"replaceColor",t.replaceColor),oe(this,"src",t.src),oe(this,"width",t.width))}}class ma{id="image-preloader";#s;constructor(t){this.#s=t}async getPlugin(t){const{ImagePreloaderInstance:e}=await Promise.resolve().then(function(){return Uo});return new e(this.#s,t)}loadOptions(t,e,i){if(!i?.preload)return;e.preload??=[];const n=e.preload;for(const t of i.preload){const e=n.find(e=>e.name===t.name||e.src===t.src);if(e)e.load(t);else{const e=new fa;e.load(t),n.push(e)}}}needsPlugin(){return!0}}async function ya(t){t.checkVersion("4.5.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(ut(da));if(!i.name&&!i.src)throw new Error(ut(ha));t.images??=new Map;const n=t.getImages(e);if(!n.some(t=>t.name===i.name||t.source===i.src))try{const s={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;n.push(s),t.images.set(e,n),a=i.replaceColor?ca:ra,await a(s)}catch{throw new Error(ut(ua,i.name??i.src))}}}(t),t.pluginManager.addPlugin(new ma(t)),t.pluginManager.addShape(aa,e=>Promise.resolve(new ga(t,e)))})}class va extends ze{sync=!1;load(t){H(t)||(super.load(t),oe(this,"sync",t.sync))}}class ba extends ze{sync=!1;load(t){H(t)||(super.load(t),oe(this,"sync",t.sync))}}class xa{count=0;delay=new va;duration=new ba;load(t){H(t)||(oe(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class wa{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const n=i.delay.sync?1:N(),s=i.duration.sync?1:N();t.life={delay:e.retina.reduceFactor?Z(i.delay.value)*n/e.retina.reduceFactor*p:0,delayTime:0,duration:e.retina.reduceFactor?Z(i.duration.value)*s/e.retina.reduceFactor*p: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){de(t,"life",xa,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const n=t.life;let s=!1;if(t.spawning){if(n.delayTime+=e.value,!(n.delayTime>=t.life.delay))return;s=!0,t.spawning=!1,n.delayTime=0,n.time=0}if(-1===n.duration)return;if(s?n.time=0:n.time+=e.value,n.time<n.duration)return;if(n.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const a=J(0,i.width),o=J(0,i.width);t.position.x=Y(a),t.position.y=Y(o),t.spawning=!0,n.delayTime=0,n.time=0,t.reset();const r=t.options.life;r&&(n.delay=Z(r.delay.value)*p,n.duration=Z(r.duration.value)*p)}(t,e,this.#u.canvas.size)}}async function Ma(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new wa(t)))})}class Pa{draw(t){!function(t){const{context:e,particle:i,radius:n}=t,s=i.shapeData;e.moveTo(-n,0),e.lineTo(n,0),e.lineCap=s?.cap??"butt"}(t)}getSidesCount(){return 1}}async function ka(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["line"],()=>Promise.resolve(new Pa))})}class Ca{distance=200;enable=!1;rotate;constructor(){this.rotate={x:3e3,y:3e3}}load(t){if(!H(t)&&(re(this,"distance",t.distance),oe(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 Da extends _n{#O;constructor(t){super(t),this.#O=0}get maxDistance(){return this.#O}clear(){}init(){}interact(t){if(!t.options.attract?.enable)return;const e=this.container;if(H(t.attractDistance)){const i=Z(t.options.attract.distance);i>this.#O&&(this.#O=i),t.attractDistance=i*e.retina.pixelRatio}const i=t.attractDistance,n=t.getPosition(),s=e.particles.grid.queryCircle(n,i);for(const e of s){if(t===e||!e.options.attract?.enable||e.destroyed||e.spawning)continue;const i=e.getPosition(),{dx:s,dy:a}=tt(n,i),o=t.options.attract.rotate,r=s/(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){de(t,"attract",Ca,...e)}reset(){}}async function Oa(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{jn(t),t.pluginManager.addInteractor?.("particlesAttract",t=>Promise.resolve(new Da(t)))})}var za;!function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy",t.fluid="fluid"}(za||(za={}));class Sa{speed=2;load(t){H(t)||oe(this,"speed",t.speed)}}class Ia{maxForce=2.5;maxNeighbors=64;nearStiffness=.5;radius=30;restDensity=3;stiffness=.5;load(t){H(t)||(re(this,"maxForce",t.maxForce),oe(this,"maxNeighbors",t.maxNeighbors),re(this,"nearStiffness",t.nearStiffness),re(this,"radius",t.radius),re(this,"restDensity",t.restDensity),re(this,"stiffness",t.stiffness))}}class Ta{enable=!0;retries=0;load(t){H(t)||(oe(this,"enable",t.enable),oe(this,"retries",t.retries))}}class Ra{absorb=new Sa;bounce=new Be;enable=!1;fluid=new Ia;maxSpeed=50;mode=za.bounce;overlap=new Ta;load(t){H(t)||(this.absorb.load(t.absorb),this.bounce.load(t.bounce),oe(this,"enable",t.enable),this.fluid.load(t.fluid),re(this,"maxSpeed",t.maxSpeed),oe(this,"mode",t.mode),this.overlap.load(t.overlap))}}const La=u,Ea=1e-4;function _a(t,e,i,n){t.x<e?t.x+=(e-t.x)*La:t.x>i&&(t.x-=(t.x-i)*La),t.y<e?t.y+=(e-t.y)*La:t.y>n&&(t.y-=(t.y-n)*La)}class Fa{#G=T.origin;#X;#Y=0;#Z=[];#K;#Q=0;constructor(){this.#X=t=>{const e=this.#K,i=t;if(!e||this.#Z.length>=this.#Y||i===e||i.destroyed||i.spawning||!i.options.collisions?.enable||i.options.collisions.mode!==za.fluid)return!1;const n=e.getRadius();return Math.abs(Math.round(this.#Q)-Math.round(i.getPosition().z))<=n+i.getRadius()}}separateOverlaps(t,e){const i=this.#Z;t.position.setTo(e);for(let e=0;e<3;e++)for(const e of i)this.#J(t,e)}solve(t,e){const i=e.options.collisions;if(!i)return;const n=i.fluid,s=t.retina.pixelRatio,a=Z(n.radius)*s,o=Z(n.stiffness),r=Z(n.nearStiffness),c=Z(n.restDensity),l=Z(n.maxForce),d=n.maxNeighbors,h=e.getRadius(),p=e.position,g=t.canvas.size,f=g.width>0&&g.height>0,m=f?.15*h:0,y=g.width-m,v=g.height-m,b=this.#Z;this.#K=e,this.#Y=d,this.#Q=e.getPosition().z,this.#tt(t,e,a,d);for(let t=0;t<3;t++){const t=e.getPosition();let i=0,n=0;for(const e of b){const s=1-it(t,e.getPosition())/a,o=s*s;i+=o,n+=o*s}const s=(i-c)*o*u,d=n*r*u;f&&_a(p,m,y,v);for(const i of b){const n=i.getPosition(),o=n.x-t.x,r=n.y-t.y,c=Math.sqrt(o*o+r*r);if(c>a)continue;const g=1-c/a,f=G(s+d*g,-l,l),m=h+i.getRadius(),y=Math.max(g*f*u,m-c);if(c>Ea){const t=1/c;this.#G.x=o*t*y,this.#G.y=r*t*y}else this.#G.x=(e.id+i.id)%2==0?1:-1,this.#G.y=0,this.#G.multTo(y);p.x-=this.#G.x,p.y-=this.#G.y}}this.#tt(t,e,a,d),f&&function(t,e,i,n){t.x<e?t.x=e:t.x>i&&(t.x=i),t.y<e?t.y=e:t.y>n&&(t.y=n)}(p,m,y,v),this.separateOverlaps(e,p),this.#et(e),f&&this.#it(e,m,y,v)}#it(t,e,i,n){const s=t.position,a=t.velocity;(s.x<=e||s.x>=i)&&(a.x=0),(s.y<=e||s.y>=n)&&(a.y=0)}#et(t){const e=this.#Z,i=t.position,n=t.velocity;let s=0;for(const a of e){const e=a.getPosition(),o=i.x-e.x,r=i.y-e.y,c=o*o+r*r,l=t.getRadius()+a.getRadius();if(!(c>=l*l||c<=Ea)&&!(++s<5))return n.x*=.1,void(n.y*=.1)}}#J(t,e){const i=t.position,n=e.position,s=i.x-n.x,a=i.y-n.y,o=s*s+a*a,r=t.getRadius()+e.getRadius();if(!(o>=r*r))if(o>Ea){const t=Math.sqrt(o),e=1/t,n=r-t;i.x+=s*e*n,i.y+=a*e*n}else{const n=(t.id+e.id)%2==0?1:-1;i.x+=n*r}}#tt(t,e,i,n){i<=0||n<=0||(this.#Z.length=0,t.particles.grid.queryCircle(e.getPosition(),i,this.#X,this.#Z))}}function Aa(t,e,i,n,s,a){if(!t.options.collisions||!i.options.collisions)return;const o=G(t.options.collisions.absorb.speed*s.factor,0,n);t.size.value=Math.sqrt(e*e+o*o),i.size.value-=o,i.size.value<=a&&(i.size.value=0,i.destroy())}const Ba=t=>{t.options.collisions&&(t.collisionMaxSpeed??=Z(t.options.collisions.maxSpeed),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed))};function Ha(t,e){const i=t.getMass(),n=e.getMass(),s=t.velocity.length,a=e.velocity.length,o=i*s*s+n*a*a;Dt(Ct(t),Ct(e));const r=t.velocity.length,c=e.velocity.length,l=i*r*r+n*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)}Ba(t),Ba(e)}function Va(t,e,i,n){if(t.options.collisions&&e.options.collisions)switch(t.options.collisions.mode){case za.absorb:!function(t,e,i,n){const s=t.getRadius(),a=e.getRadius();!s&&a?t.destroy():s&&!a?e.destroy():s&&a&&(s>=a?Aa(t,s,e,a,i,n):Aa(e,a,t,s,i,n))}(t,e,i,n);break;case za.bounce:Ha(t,e);break;case za.destroy:!function(t,e){t.unbreakable||e.unbreakable||Ha(t,e);const i=t.getRadius(),n=e.getRadius();!i&&n?t.destroy():i&&!n?e.destroy():i&&n&&(t.getRadius()>=e.getRadius()?e:t).destroy()}(t,e);case za.fluid:}}class qa extends _n{#nt;#O;constructor(t){super(t),this.#nt=new Fa,this.#O=0}get maxDistance(){return this.#O}clear(){}init(){}interact(t,e,i){if(t.destroyed||t.spawning)return;const n=t.options.collisions;if(!n?.enable)return;if(n.mode===za.fluid){const e=Z(n.fluid.radius);return e>this.#O&&(this.#O=e),void this.#nt.solve(this.container,t)}const s=this.container,a=t.getPosition(),o=t.getRadius(),r=s.particles.grid.queryCircle(a,2*o);for(const e of r){if(t===e||t.id>=e.id||!e.options.collisions?.enable||n.mode!==e.options.collisions.mode||e.destroyed||e.spawning)continue;const r=e.getPosition(),c=e.getRadius();if(Math.abs(Math.round(a.z)-Math.round(r.z))>o+c)continue;it(a,r)>o+c||Va(t,e,i,s.retina.pixelRatio)}}isEnabled(t){return!!t.options.collisions?.enable}loadParticlesOptions(t,...e){de(t,"collisions",Ra,...e)}reset(t,e){}}const Ua="TSP-4001";class Na{id="overlap";async getPlugin(t){const{OverlapPluginInstance:e}=await Promise.resolve().then(function(){return No});return new e(t)}loadOptions(){}needsPlugin(){return!0}}async function $a(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{jn(t),t.pluginManager.addPlugin(new Na),t.pluginManager.addInteractor?.("particlesCollisions",t=>Promise.resolve(new qa(t)))})}class Wa extends se{#st;constructor(t,e,i,n){super(t,e,i),this.#st=n}contains(t){if(super.contains(t))return!0;const{width:e,height:i}=this.#st,{x:n,y:s}=t;return super.contains({x:n-e,y:s})||super.contains({x:n+e,y:s})||super.contains({x:n,y:s-i})||super.contains({x:n,y:s+i})||super.contains({x:n-e,y:s-i})||super.contains({x:n+e,y:s+i})||super.contains({x:n-e,y:s+i})||super.contains({x:n+e,y:s-i})}intersects(t){if(super.intersects(t))return!0;const{width:e,height:i}=this.#st,n=t.position,s=[{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 s){const i={x:n.x+e.x,y:n.y+e.y};let s;if(t instanceof se)s=new se(i.x,i.y,t.radius);else{const e=t;s=new ae(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(s))return!0}return!1}}class ja{blur=5;color=new ye;enable=!1;constructor(){this.color.value="#000"}load(t){H(t)||(oe(this,"blur",t.blur),this.color=ye.create(this.color,t.color),oe(this,"enable",t.enable))}}class Ga{color;enable=!1;frequency=1;opacity;load(t){H(t)||(void 0!==t.color&&(this.color=ye.create(this.color,t.color)),oe(this,"enable",t.enable),oe(this,"frequency",t.frequency),oe(this,"opacity",t.opacity))}}class Xa{blink=!1;color=new ye;consent=!1;distance=100;enable=!1;frequency=1;id;opacity=1;shadow=new ja;triangles=new Ga;warp=!1;width=1;constructor(){this.color.value="#fff"}load(t){H(t)||(oe(this,"id",t.id),oe(this,"blink",t.blink),this.color=ye.create(this.color,t.color),oe(this,"consent",t.consent),oe(this,"distance",t.distance),oe(this,"enable",t.enable),oe(this,"frequency",t.frequency),oe(this,"opacity",t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),oe(this,"width",t.width),oe(this,"warp",t.warp))}}function Ya(t,e,i){const{dx:n,dy:s}=tt(t,e),a={x:Math.abs(n),y:Math.abs(s)},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 Za extends _n{#O;#p;constructor(t,e){super(e),this.#p=t,this.#O=0}get maxDistance(){return this.#O}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.#O&&(this.#O=t.linksDistance);const e=t.getPosition(),i=this.container,n=i.canvas.size;if(e.x<g.x||e.y<g.y||e.x>n.width||e.y>n.height)return;const s=t.options.links,a=s.opacity,o=t.retina.linksDistance??0,r=s.warp,c=r?new Wa(e.x,e.y,o,n):new se(e.x,e.y,o),l=i.particles.grid.query(c);for(const i of l){const c=i.options.links;if(t===i||!c?.enable||s.id!==c.id||i.spawning||i.destroyed||!i.links||t.links.some(t=>t.destination===i)||i.links.some(e=>e.destination===t))continue;const l=i.getPosition();if(l.x<g.x||l.y<g.y||l.x>n.width||l.y>n.height)continue;const d=tt(e,l).distance,h=r&&c.warp?Ya(e,l,n):d,u=Math.min(d,h);if(u>o)continue;const p=(1-u/o)*a;this.#at(t),t.links.push({destination:i,opacity:p,color:this.#ot(t,i),isWarped:h<d})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){de(t,"links",Xa,...e)}reset(){}#ot(t,e){const i=this.container,n=t.options.links;if(!n)return;return yi(t,e,void 0!==n.id?i.particles.linksColors.get(n.id):i.particles.linksColor,i.hdr)}#at(t){if(!t.options.links)return;const e=this.container,i=t.options.links;let n=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);n||(n=vi(this.#p,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=n:e.particles.linksColors.set(i.id,n))}}class Ka{id="links";#p;constructor(t){this.#p=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return Wo});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Qa(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;jn(t),e.addPlugin(new Ka(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new Za(e,t)))})}const Ja=new Map;function to(t,e){const{context:i,radius:n}=t,s=function(t){const e=Ja.get(t);if(e)return e;const i=v/t,n=!!(t%2),s=(-Math.PI+(n?0:i))*u,a=[];for(let e=0;e<t;e++){const t=s+e*i;a[e]={x:Math.cos(t),y:Math.sin(t)}}return Ja.set(t,a),a}(e.count.numerator/e.count.denominator);i.beginPath();for(let t=0;t<s.length;t++){const e=s[t];if(!e)continue;const a=e.x*n,o=e.y*n;t?i.lineTo(a,o):i.moveTo(a,o)}i.closePath()}class eo{draw(t){const{particle:e,radius:i}=t;to(t,this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round(Z(e?.sides??5))}}class io extends eo{getSidesData(t,e){const{sides:i}=t;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class no extends eo{getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:1,numerator:3},length:2.66*e/1}}}async function so(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["polygon"],()=>Promise.resolve(new io))})}async function ao(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["triangle"],()=>Promise.resolve(new no))})}async function oo(t){t.checkVersion("4.5.0"),await Promise.all([so(t),ao(t)])}class ro{decay=0;enable=!1;speed=0;sync=!1;load(t){H(t)||(oe(this,"enable",t.enable),re(this,"speed",t.speed),re(this,"decay",t.decay),oe(this,"sync",t.sync))}}class co extends ze{animation=new ro;direction=t.RotateDirection.clockwise;path=!1;load(t){H(t)||(super.load(t),oe(this,"direction",t.direction),this.animation.load(t.animation),oe(this,"path",t.path))}}class lo{#u;constructor(t){this.#u=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:st(Z(i.value)),min:0,max:v},e.pathRotation=i.path;let n=i.direction;if(n===t.RotateDirection.random){n=Math.floor(2*N())>0?t.RotateDirection.counterClockwise:t.RotateDirection.clockwise}switch(n){case t.RotateDirection.counterClockwise:case"counterClockwise":e.rotate.status=t.AnimationStatus.decreasing;break;case t.RotateDirection.clockwise:e.rotate.status=t.AnimationStatus.increasing}const s=i.animation;s.enable&&(e.rotate.decay=1-Z(s.decay),e.rotate.velocity=Z(s.speed)/360*this.#u.retina.reduceFactor,s.sync||(e.rotate.velocity*=N())),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){de(t,"rotate",co,...e)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(Ni(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function ho(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new lo(t)))})}class uo{draw(t){!function(t){const{context:e,radius:i}=t,n=i*Math.SQRT1_2,s=2*n;e.rect(-n,-n,s,s)}(t)}getSidesCount(){return 4}}async function po(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new uo))})}const go=0,fo=0;class mo{draw(t){!function(t){const{context:e,particle:i,radius:n}=t,s=i.sides,a=i.starInset??2;e.moveTo(go,fo-n);for(let t=0;t<s;t++)e.rotate(Math.PI/s),e.lineTo(go,fo-n*a),e.rotate(Math.PI/s),e.lineTo(go,fo-n)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round(Z(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=Z(i?.inset??2)}}async function yo(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["star"],()=>Promise.resolve(new mo))})}async function vo(t){t.checkVersion("4.5.0"),await t.pluginManager.register(async t=>{await Promise.all([pn(t),(async t=>{await async function(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new Ln(i)),i.initializers.interactors??=new Map,i.addInteractor=(t,e)=>{i.initialized||(i.initializers.interactors??=new Map,i.initializers.interactors.set(t,e))},i.setOnClickHandler=t=>{const{items:i}=e;if(!i.length)throw new Error(ut(Pn));i.forEach(e=>{const i=e;i.addClickHandler?.(t)})}})}(t),await Promise.all([Fs(t),Qn(t),rs(t),ms(t),Ms(t),zs(t),Ls(t),Hs(t),Ns(t),Gs(t),Js(t),sa(t),Oa(t),$a(t),Qa(t)])})(t),fn(t),wn(t),ya(t),ka(t),oo(t),po(t),yo(t),Ma(t),sn(t),ho(t)])})}const bo=globalThis;bo.loadSlim=vo,bo.tsParticles=Ci;function xo(t,e,i){const n=e[i];void 0!==n&&(t[i]=(t[i]??1)*n)}class wo{#rt;#ct;#lt;#dt;#ht;#u;#ut;#pt;#gt;#ft;#mt;#yt;#p;#vt;#bt;#xt={};#wt=[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(g.x,g.y,this.#dt.size.width,this.#dt.size.height)})}clear(){const e=new Set;for(const t of this.#lt)if(e.add(t),t.canvasClear?.())return t;for(const i of Object.values(t.DrawLayer))if("number"==typeof i)for(const t of this.#Pt(i))if(!e.has(t)&&(e.add(t),t.canvasClear?.()))return t;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 n=t.getFillColor(),s=t.getStrokeColor();let[a,o]=this.#kt(t);if(a??=n,o??=s,!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.#xt,f=a?fi(a,r.hdr,d*h,r.peakNits,r.hdrMode):void 0,m=o?fi(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(n=>{for(const i of this.#mt)i.drawParticleSetup?.(n,t,e);this.#Ct(n,t,i,h,g,p),this.#Dt({container:r,context:n,particle:t,delta:e,colorStyles:g,radius:i*l**c.sizeRate,opacity:h,transform:p}),this.#Ot(t);for(const i of this.#ft)i.drawParticleCleanup?.(n,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const n of this.#gt)this.#zt(i,n,t,e)})}drawParticles(e){const{particles:i,actualOptions:n}=this.#u,s=this.clear();i.update(e),this.draw(a=>{const o=this.#dt.size.width,r=this.#dt.size.height;if(this.#rt)try{a.drawImage(this.#rt,g.x,g.y,o,r)}catch{this.#St("background-element-draw-error","Error drawing background element onto canvas")}const c=n.background;if(c.draw)try{c.draw(a,e)}catch{this.#St("background-draw-error","Error in background.draw callback")}for(const e of this.#Pt(t.DrawLayer.BackgroundMask))e!==s&&e.canvasPaint?.();for(const i of this.#Pt(t.DrawLayer.CanvasSetup))i.drawSettingsSetup?.(a,e);for(const i of this.#Pt(t.DrawLayer.PluginContent))i.draw?.(a,e);i.drawParticles(e);for(const i of this.#Pt(t.DrawLayer.CanvasCleanup))i.clearDraw?.(a,e),i.drawSettingsCleanup?.(a,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]=[]);this.#Tt()}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(g.x,g.y,this.#dt.size.width,this.#dt.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const n=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,g.x,g.y,this.#dt.size.width,this.#dt.size.height),i.globalAlpha=n})}setContext(t){this.#ut=t,this.#ut&&(this.#ut.globalCompositeOperation=c)}setContextSettings(t){this.#pt=t}stop(){this.draw(t=>{t.clearRect(g.x,g.y,this.#dt.size.width,this.#dt.size.height)})}#Ot(t){for(const e of this.#vt)e.afterDraw?.(t)}#Ct(t,e,i,n,s,a){for(const o of this.#bt){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,n);a&&(s.fill=a),r&&(s.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)xo(a,t,e)}o.beforeDraw?.(e)}}#Rt(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#Lt(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#Dt(t){const{container:e,context:i,particle:n,delta:s,colorStyles:a,radius:o,opacity:r,transform:c}=t,{effectDrawers:l,shapeDrawers:d}=e,h=n.getPosition(),u=n.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=!!n.fillEnabled,f=n.strokeWidth??0;i.lineWidth=f,a.stroke&&(i.strokeStyle=a.stroke);const m={context:i,particle:n,radius:o,drawRadius:1*o,opacity:r,delta:s,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=n.effect?l.get(n.effect):void 0,v=n.shape?d.get(n.shape):void 0;this.#Lt(y,m),this.#Et(v,m),this.#_t(v,m),this.#Ft(v,m),this.#Rt(y,m),i.resetTransform()}#zt(t,e,i,n){e.drawParticle&&e.drawParticle(t,i,n)}#_t(t,e){if(!t)return;const{context:i,fill:n,particle:s,stroke:a}=e;s.shape&&(i.beginPath(),t.draw(e),s.shapeClose&&i.closePath(),n&&i.fill(),a&&i.stroke())}#Ft(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#Et(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 n of this.#ht)if(!e&&n.particleFillColor&&(e=oi(this.#p,n.particleFillColor(t))),!i&&n.particleStrokeColor&&(i=oi(this.#p,n.particleStrokeColor(t))),e&&i)break;return this.#wt[0]=e,this.#wt[1]=i,this.#wt}#At(e){const i=[[t.DrawLayer.BackgroundMask,!!e.canvasPaint],[t.DrawLayer.CanvasSetup,!!e.drawSettingsSetup],[t.DrawLayer.PluginContent,!!e.draw],[t.DrawLayer.CanvasCleanup,!!(e.clearDraw??e.drawSettingsCleanup)]];for(const[t,n]of i)n&&this.#yt[t].push(e)}#Tt(){for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#ht.push(t),t.drawParticle&&this.#gt.push(t),t.drawParticleSetup&&this.#mt.push(t),t.drawParticleCleanup&&this.#ft.push(t),t.canvasClear&&this.#lt.push(t),this.#At(t)}#Bt(t){return"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas||"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement}#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&&this.#Bt(e)?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 this.#Bt(t.element)&&(this.#rt=t.element)}#St(t,e){this.#ct.has(t)||(this.#ct.add(t),s().warning(e))}}const Mo=new WeakMap;function Po(t,e,i=!1){if(!e)return;const n=t.style,s=new Set;for(let t=0;t<n.length;t++){const e=n.item(t);e&&s.add(e)}for(let t=0;t<e.length;t++){const i=e.item(t);i&&s.add(i)}for(const t of s){const s=e.getPropertyValue(t);s?n.setProperty(t,s,i?"important":""):n.removeProperty(t)}}class ko{domElement;render;renderCanvas;size;zoom=1;#u;#Ht;#Vt;#qt;#Ut;#p;#Nt;#$t;#Wt;#jt;constructor(t,e){this.#p=t,this.#u=e,this.render=new wo(t,e,this),this.#Wt={height:0,width:0};const i=e.retina.pixelRatio,n=this.#Wt;this.size={height:n.height*i,width:n.width*i},this.#Ht=!1,this.#$t=[],this.#Nt="none"}get#Gt(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#Ht){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#Xt();this.render.destroy(),this.#$t=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#jt?this.#jt:{x:e*u/t,y:i*u/t}}init(){this.#Yt(t=>{t.disconnect()}),this.#qt=vt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#Zt()}),this.resize(),this.#Kt(),this.#Yt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#Qt(),this.initBackground(),this.#Jt(),this.render.init()}initBackground(){const e=this.#u,i=e.actualOptions.background,n=this.domElement;if(!n)return;const s=n.style,a=si(this.#p,i.color);if(a){const n=e.actualOptions.hdr;s.backgroundColor=gi(a,e.hdr,i.opacity,n.peakNits,F(t.HdrMode,n.mode,t.HdrMode.standard))}else s.backgroundColor="";s.backgroundImage=i.image||"",s.backgroundPosition=i.position||"",s.backgroundRepeat=i.repeat||"",s.backgroundSize=i.size||""}initPlugins(){this.#$t=[];for(const t of this.#u.plugins)t.resize&&this.#$t.push(t)}loadCanvas(t){this.#Ht&&this.domElement&&this.domElement.remove();const e=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=e,this.#Ht=!!e&&"true"===e.dataset[o],this.renderCanvas=e?(t=>{const e=Mo.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError(ut(ht.offscreenCanvasUnsupported));try{const e=t.transferControlToOffscreen();return Mo.set(t,e),e}catch{throw new TypeError(ut(ht.offscreenCanvasTransferFailed))}})(e):t;const i=this.domElement;i&&(i.ariaHidden="true",this.#Ut=It(i.style));const n=this.#Wt,s=this.renderCanvas;i?(n.height=i.offsetHeight,n.width=i.offsetWidth):(n.height=s.height,n.width=s.width);const a=this.#u.retina.pixelRatio,r=this.size;s.height=r.height=n.height*a,s.width=r.width=n.width*a}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const n=e.canvas.#Wt,s={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:s.width*a,height:s.height*a};if(s.height===n.height&&s.width===n.width&&o.height===i.height&&o.width===i.width)return!1;const r={...n};n.height=s.height,n.width=s.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:n.width/r.width,height:n.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#Nt=t,this.#Zt())}setZoom(t,e){this.zoom=t,this.#jt=e}stop(){this.#Yt(t=>{t.disconnect()}),this.#qt=void 0,this.#te(),this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#ee(),e&&await t.refresh()}#ee(){for(const t of this.#$t)t.resize?.()}#Qt(){const e=this.#u,i=e.actualOptions.hdr.enable&&yt("(color-gamut: p3)")?.matches&&yt("(dynamic-range: high)")?.matches;e.hdrMode=F(t.HdrMode,e.actualOptions.hdr.mode,t.HdrMode.standard),e.peakNits=e.actualOptions.hdr.peakNits;const n=this.renderCanvas;if(!n)return void(e.hdr=i??!1);let s;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...i?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});try{s=n.getContext("2d",this.render.settings)}catch{s=null}if(i&&!s){const t={alpha:!0,desynchronized:!0,willReadFrequently:!1,colorSpace:"srgb"};this.render.setContextSettings(t);try{s=n.getContext("2d",t)}catch{s=null}}if(this.render.setContext(s),s){const t=(t=>{if(!t)return;const e=t;return e.getContextAttributes?.().colorSpace??void 0})(s);void 0!==t&&(e.hdr="display-p3"===t)}}#Jt(){this.#te();const t=yt("(color-gamut: p3)"),e=yt("(dynamic-range: high)"),i=()=>{this.#Qt(),this.initBackground()},n=[];t&&(t.addEventListener("change",i),n.push({handler:i,mql:t})),e&&(e.addEventListener("change",i),n.push({handler:i,mql:e})),this.#Vt=n}#Kt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#Gt?this.#ie():this.#Xt();for(const i in e.style){if(!i||!(i in e.style))continue;const n=e.style[i];n&&t.style.setProperty(i,n,"important")}}}#te(){if(this.#Vt){for(const{handler:t,mql:e}of this.#Vt)e.removeEventListener("change",t);this.#Vt=void 0}}#Zt(){const t=this.domElement;if(!t)return;this.#Yt(t=>{t.disconnect()}),this.#Kt(),this.initBackground();const e=this.#Nt;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#Yt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#Xt(){const t=this.domElement,e=this.#Ut;t&&e&&Po(t,e,!0)}#Yt(t){this.#qt&&t(this.#qt)}#ie(){const t=this.domElement;t&&Po(t,Lt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Co{#u;#ne;#se;#ae;constructor(t){this.#u=t,this.#ne={visibilityChange:()=>{this.#oe()},resize:()=>{this.#re()}}}addListeners(){this.#ce(!0)}removeListeners(){this.#ce(!1)}#oe(){const t=this.#u;t.actualOptions.pauseOnBlur&&(mt().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#re(){this.#ae&&(clearTimeout(this.#ae),this.#ae=void 0);const t=async()=>{await this.#u.canvas.windowResize()};this.#ae=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*p)}#ce(t){const e=this.#ne;this.#le(t),Et(document,d,e.visibilityChange,t,!1)}#le(t){const e=this.#ne,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Et(globalThis,l,e.resize,t);const n=i.canvas.domElement;this.#se&&!t?(n&&this.#se.unobserve(n),this.#se.disconnect(),this.#se=void 0):!this.#se&&t&&n&&(this.#se=new ResizeObserver(t=>{t.some(t=>t.target===n)&&this.#re()}),this.#se.observe(n))}}function Do(t){if(!bt(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 Oo(t,e){const i=t%e;return i<0?i+e:i}function zo(t,e,i,n){const s=We(i,e,e.actualOptions.particles),a=s.reduceDuplicates;t.effect=zt(s.effect.type,t.id,a),t.shape=zt(s.shape.type,t.id,a);const o=s.effect,r=s.shape;if(n){if(n.effect){const e=n.effect.type;if(e&&e!==t.effect){const i=zt(e,t.id,a);i&&(t.effect=i)}o.load(n.effect)}if(n.shape){const e=n.shape.type;if(e&&e!==t.shape){const i=zt(e,t.id,a);i&&(t.shape=i)}r.load(n.shape)}}if(t.effect===m){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(N()*i.length)]}if(t.shape===m){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(N()*i.length)]}t.effectData=t.effect?function(t,e,i,n){const s=e.options[t];return kt({close:e.close},zt(s,i,n))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,n){const s=e.options[t];return kt({close:e.close},zt(s,i,n))}(t.shape,r,t.id,a):void 0,s.load(n);const c=t.effectData,l=t.shapeData;return c&&s.load(c.particles),l&&s.load(l.particles),t.effectClose=c?.close??s.effect.close,t.shapeClose=l?.close??s.shape.close,s}class So{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;#de={fillOpacity:1,opacity:1,strokeOpacity:1};#he=I.origin;#ue={sin:0,cos:0};#pe={a:1,b:0,c:0,d:1};#u;#T=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#T.push(t),this.#T.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#T.length=0}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const i=this.#u,n=this.shape?i.shapeDrawers.get(this.shape):void 0;n?.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.#ge(this.#fe(bi(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*u}getModifier(t){return this.#T.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=Z(this.opacity?.value??1),n=this.#fe(void 0,t=>t.opacity)??i;return this.#de.fillOpacity=this.fillOpacity??1,this.#de.opacity=n*e,this.#de.strokeOpacity=this.strokeOpacity??1,this.#de}getPosition(){return this.#he.x=this.position.x+this.offset.x,this.#he.y=this.position.y+this.offset.y,this.#he.z=this.position.z,this.#he}getRadius(){return this.#fe(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#ue.sin=Math.sin(t),this.#ue.cos=Math.cos(t),this.#ue}getStrokeColor(){return this.#ge(this.#fe(bi(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#pe.a=e.cos*(t.a??f.a),this.#pe.b=i?e.sin*(t.b??1):t.b??f.b,this.#pe.c=i?-e.sin*(t.c??1):t.c??f.c,this.#pe.d=e.cos*(t.d??f.d),this.#pe}init(e,i,n,s){const a=this.#u;!function(e,i,n){e.id=i,e.group=n,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,s),this.options=zo(this,a,this.#p,n),a.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(a.particleUpdaters,this),this.#me(i),this.initialVelocity=this.#ye(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,function(t,e){let i,n;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(n=e.shapeDrawers.get(t.shape)),n?.loadShape&&n.loadShape(t);const s=n?.getSidesCount;s&&(t.sides=s(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,n=e.effect?t.effectDrawers.get(e.effect):void 0;n?.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.#ve({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#ve({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=Oo(t,v);return e>=Math.PI*u&&e<3*Math.PI*u}if(this.roll.horizontal){const e=Oo(t+Math.PI*u,v);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Oo(t,v);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}removeModifier(t){const e=this.#T.findIndex(e=>e.id===t);e>=0&&this.#T.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#fe(t,e){let i=t;for(const t of this.#T)if(t.enabled){const n=e(t);void 0!==n&&(i=n)}return i}#be(t,e){let i=0,n=t?I.create(t.x,t.y,e):void 0;const s=this.#u,a=s.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),c=s.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(n,this);if(i)return I.create(i.x,i.y,e)}const t=lt({size:c,position:n}),l=I.create(t.x,t.y,e);this.#xe(l,r,o.left??o.default),this.#xe(l,r,o.right??o.default),this.#we(l,r,o.top??o.default),this.#we(l,r,o.bottom??o.default);let d=!0;for(const t of s.particles.checkParticlePositionPlugins)if(d=t.checkParticlePosition?.(this,l,i)??!0,!d)break;if(d)return l;i+=1,n=void 0}}#ye(){const e=this.options.move,i=ot(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const n=st(Z(e.angle.value)),s=st(Z(e.angle.offset)),a={left:s-n*u,right:s+n*u};return e.straight||(i.angle+=Y(J(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=N()),i}#xe(e,i,n){Do({outMode:n,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#we(e,i,n){Do({outMode:n,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#Me(e,i){const n=this.getRadius(),s=this.#u.canvas.size,a=this.position,o=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:o?a.y+n<s.height:a.y-n<s.height,reason:"default"}:e===t.OutModeDirection.left?{inside:o?a.x-n>0:a.x+n>0,reason:"default"}:e===t.OutModeDirection.right?{inside:o?a.x+n<s.width:a.x-n<s.width,reason:"default"}:e===t.OutModeDirection.top?{inside:o?a.y-n>0:a.y+n>0,reason:"default"}:{inside:a.x>=-n&&a.y>=-n&&a.y<=s.height+n&&a.x<=s.width+n,reason:"default"}}#Pe(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#ve(t){const e=this.#Me(t.direction,t.outMode),i=this.#u,n=this.shape?i.shapeDrawers.get(this.shape):void 0,s=this.effect?i.effectDrawers.get(this.effect):void 0,a=n?.isInsideCanvas,o=s?.isInsideCanvas;if(!a&&!o)return e;const r=this.#Pe(t.direction,t.outMode),c=a?this.#ke(a(r),"shape"):void 0,l=o?this.#ke(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}#ge(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?ki(t,this.roll.alter.type,this.roll.alter.value):t:t}#me(e){const i=this.#u,n=Math.floor(Z(this.options.zIndex.value)),s=this.#be(e,G(n,0,i.zLayers));if(!s)throw new Error(ut(ht.particlePositionNotFound));this.position=s,this.initialPosition=this.position.copy();const a=i.canvas.size;switch(this.moveCenter={...St(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=at(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=T.origin}#ke(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Io{#Ce;#De=new Map;#Oe=[];#ze;#Se;#Ie=[];#Te;constructor(t){this.#Ce=t,this.#ze=0,this.#Te=0}get cellSize(){return this.#Ce}set cellSize(t){this.#Se=t}clear(){this.#De.clear();const t=this.#Se;t&&(this.#Ce=t),this.#Se=void 0}insert(t){const{x:e,y:i}=t.getPosition(),n=this.#Re(e,i);this.#De.has(n)||this.#De.set(n,[]),this.#De.get(n)?.push(t)}query(t,e,i=[]){const n=this.#Le(t);if(!n)return i;const s=Math.floor(n.minX/this.#Ce),a=Math.floor(n.maxX/this.#Ce),o=Math.floor(n.minY/this.#Ce),r=Math.floor(n.maxY/this.#Ce);for(let n=s;n<=a;n++)for(let s=o;s<=r;s++)this.#Ee(n,s,t,e,i);return i}queryCircle(t,e,i,n=[]){const s=this.#_e(t.x,t.y,e),a=this.query(s,i,n);return this.#Fe(),a}queryRectangle(t,e,i,n=[]){const s=this.#Ae(t.x,t.y,e.width,e.height),a=this.query(s,i,n);return this.#Fe(),a}#_e(t,e,i){const n=this.#ze++;let s=this.#Oe[n];return s||(s=new se(t,e,i),this.#Oe[n]=s),s.reset(t,e,i)}#Ae(t,e,i,n){const s=this.#Te++;let a=this.#Ie[s];return a||(a=new ae(t,e,i,n),this.#Ie[s]=a),a.reset(t,e,i,n)}#Re(t,e){return`${Math.floor(t/this.#Ce)}_${Math.floor(e/this.#Ce)}`}#Le(t){if(t instanceof se){const e=t.radius,{x:i,y:n}=t.position;return{minX:i-e,maxX:i+e,minY:n-e,maxY:n+e}}if(t instanceof ae){const{x:e,y:i}=t.position,{width:n,height:s}=t.size;return{minX:e,maxX:e+n,minY:i,maxY:i+s}}return null}#Ee(t,e,i,n,s){const a=this.#De.get(`${t}_${e}`);if(a)for(const t of a)n&&!n(t)||i.contains(t.getPosition())&&s.push(t)}#Fe(){this.#ze=0,this.#Te=0}}class To{checkParticlePositionPlugins;#Be;#u;#He;#Ve;#qe;#Ue;#Ne;#$e;#We;#p;#je;#Ge;#Xe;#Ye;#Ze;#Ke;constructor(t,e){this.#p=t,this.#u=e,this.#Ue=0,this.#Be=[],this.#je=[],this.#qe=0,this.#Ve=new Map,this.#Ne=new Map,this.#Ke=this.#Qe(this.#u.zLayers),this.#He=new Io(100),this.checkParticlePositionPlugins=[],this.#$e=[],this.#We=[],this.#Xe=[],this.#Ge=[],this.#Ze=[]}get count(){return this.#Be.length}get grid(){return this.#He}addParticle(e,i,n,a){if(!this.#Je(n,this.count))try{const s=this.#je.pop()??new So(this.#p,this.#u);s.init(this.#Ue,e,i,n);let o=!0;return a&&(o=a(s)),o?(this.#Be.push(s),this.#ti(s),this.#Ue++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:s}),s):void this.#je.push(s)}catch(t){s().warning(`error adding particle: ${t}`)}}clear(){this.#Be=[],this.#Ne.clear(),this.#ei(this.#u.zLayers)}destroy(){this.#Be=[],this.#je.length=0,this.#Ne.clear(),this.#Ke=[],this.checkParticlePositionPlugins=[],this.#$e=[],this.#We=[],this.#Xe=[],this.#Ge=[],this.#Ze=[]}drawParticles(t){for(let e=this.#Ke.length-1;e>=0;e--){const i=this.#Ke[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Be.filter(t)}find(t){return this.#Be.find(t)}get(t){return this.#Be[t]}async init(){const t=this.#u;this.checkParticlePositionPlugins=[],this.#Ze=[],this.#We=[],this.#Xe=[],this.#$e=[],this.#Ge=[],this.#Ne.clear(),this.#ei(t.zLayers),this.#He=new Io(100*t.retina.pixelRatio),this.#ii(t.actualOptions.particles);const e=t.actualOptions.particles.groups;for(const t in e){const i=e[t];i&&this.#ii(We(this.#p,this.#u,i),t,i)}await this.#ni()}push(t,e,i,n){for(let s=0;s<t;s++)this.addParticle(e,i,n)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#Be.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,n,s=!0){if(t<0||t>this.count)return;let a=0;for(let o=t;a<e&&o<this.count;o++)this.#si(o,i,n,s)&&(o--,a++)}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 n=e[t];if(!n)continue;const s=We(this.#p,this.#u,n);this.#ai(s,i,t)}this.#ai(t.particles,i)}setResizeFactor(t){this.#Ye=t}update(t){this.#He.clear();for(const e of this.#Ze)e.update?.(t);const e=this.#oi(t);for(const e of this.#Xe)e.postUpdate?.(t);if(this.#ri(t,e),e.size)for(const t of e)this.remove(t,t.group);this.#Ye=void 0}#ci(...t){this.#je.push(...t)}#ai(e,i,n,s){const a=e.number;if(!a.density.enable)return void this.#ii(e,n,s);const o=this.#li(a.density),r=a.value,c=a.limit.value>0?a.limit.value:r,l=Math.min(r,c)*o+i,d=Math.min(this.count,this.filter(t=>t.group===n).length);void 0===n?this.#qe=a.limit.value*o:this.#Ve.set(n,{limit:a.limit.value*o,mode:F(t.LimitMode,a.limit.mode,t.LimitMode.delete)}),d<l?this.push(Math.abs(l-d),void 0,e,n):d>l&&this.removeQuantity(d-l,n)}#ii(e,i,n){if(void 0===i){this.#qe=e.number.limit.value;const t=this.#u.actualOptions.particles.groups;for(const e of this.#Ve.keys())e in t||this.#Ve.delete(e)}else{const s=n?.number?.limit?.value??e.number.limit.value;s>0?this.#Ve.set(i,{limit:s,mode:F(t.LimitMode,n?.number?.limit?.mode??e.number.limit.mode,t.LimitMode.delete)}):this.#Ve.delete(i)}}#Je(e,i){const n=this.#qe,s=this.#u.actualOptions.particles.number.limit.mode;if(n>0&&s===t.LimitMode.wait&&i>=n)return!0;const a=void 0===e?void 0:this.#Ve.get(e);if(a&&a.limit>0&&a.mode===t.LimitMode.wait){if(this.filter(t=>t.group===e).length>=a.limit)return!0}if(a&&a.limit>0&&a.mode===t.LimitMode.delete){const t=this.filter(t=>t.group===e).length+1-a.limit;t>0&&this.removeQuantity(t,e)}if(n>0&&s===t.LimitMode.delete){const t=this.count+1-n;t>0&&this.#di(t)}return!1}#Qe(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#hi(t){const e=this.#Ke.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#li(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,n=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*n**2):1}async#ui(){const t=this.#u;await t.initDrawersAndUpdaters();for(const e of t.effectDrawers.values())await(e.init?.(t));for(const e of t.shapeDrawers.values())await(e.init?.(t))}async#ni(){await this.#pi(),await this.#ui();let t=!1;const e=this.#u;for(const i of e.plugins)if(t=i.particlesInitialization?.()??t,t)break;if(t)return;const i=e.actualOptions.particles,n=i.groups;for(const t in n){const e=n[t];if(e)for(let n=this.count,s=0;s<e.number.value&&n<i.number.value;n++,s++)this.addParticle(void 0,e,t)}for(let t=this.count;t<i.number.value;t++)this.addParticle()}async#pi(){const t=this.#u;for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#Ze.push(e),e.particleUpdate&&this.#We.push(e),e.postUpdate&&this.#Xe.push(e),e.particleReset&&this.#$e.push(e),e.postParticleUpdate&&this.#Ge.push(e)}#ti(t){const e=this.#hi(t.position.z),i=this.#Ke[e];i&&(i.push(t),this.#Ne.set(t.id,e))}#di(t){this.removeAt(0,t,void 0,void 0,!1)}#si(e,i,n,s=!0){const a=this.#Be[e];return!!a&&((!s||a.group===i)&&(this.#Be.splice(e,1),this.#gi(a),a.destroy(n),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:a}),this.#ci(a),!0))}#gi(t){const e=this.#Ne.get(t.id)??this.#hi(t.position.z),i=this.#Ke[e];if(!i)return void this.#Ne.delete(t.id);const n=i.findIndex(e=>e.id===t.id);n>=0&&i.splice(n,1),this.#Ne.delete(t.id)}#ei(t){const e=Math.max(Math.floor(t),1);if(this.#Ke.length===e)for(const t of this.#Ke)t.length=0;else this.#Ke=this.#Qe(e)}#fi(t){const e=this.#hi(t.position.z),i=this.#Ne.get(t.id);if(void 0===i)return void this.#ti(t);if(i===e)return;const n=this.#Ke[i];if(n){const e=n.findIndex(e=>e.id===t.id);e>=0&&n.splice(e,1)}const s=this.#Ke[e];if(s){if(s.push(t),s.length>=2){const e=s[s.length-2];e&&t.id<e.id&&s.sort((t,e)=>t.id-e.id)}this.#Ne.set(t.id,e)}else this.#Ne.set(t.id,e)}#oi(t){const e=new Set,i=this.#Ye;for(const n of this.#Be){i&&!n.ignoresResizeRatio&&(n.position.x*=i.width,n.position.y*=i.height,n.initialPosition.x*=i.width,n.initialPosition.y*=i.height),n.ignoresResizeRatio=!1;for(const t of this.#$e)t.particleReset?.(n);for(const e of this.#We){if(n.destroyed)break;e.particleUpdate?.(n,t)}n.destroyed?e.add(n):this.#He.insert(n)}return e}#ri(t,e){for(const i of this.#Be)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.#Ge)e.postParticleUpdate?.(i,t);this.#fi(i)}}}class Ro{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,n=t.canvas,s=n.domElement;s&&(n.size.width=s.offsetWidth*i,n.size.height=s.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,n=e.move,s=n.distance,a=t.retina;a.maxSpeed=Z(n.gravity.maxSpeed)*i,a.moveDrift=Z(n.drift)*i,a.moveSpeed=Z(n.speed)*i;const o=a.maxDistance;o.horizontal=void 0===s.horizontal?void 0:s.horizontal*i,o.vertical=void 0===s.vertical?void 0:s.vertical*i}}function Lo(t){return!t.destroyed}function Eo(t,e,...i){const n=new je(t,e);return ue(n,...i),n}var _o=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;#mi;#yi;#vi={value:0,factor:0};#bi;#xi;#wi;#Mi;#Pi;#ki;#Ci;#Di;#Oi;#zi;#Si;#p;#Ii;#Ti;constructor(e){const{dispatchCallback:i,pluginManager:n,id:s,onDestroy:a,sourceOptions:o}=e;this.#p=n,this.#bi=i,this.#Oi=a,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.hdrMode=t.HdrMode.standard,this.peakNits=400,this.#Ii=!1,this.#mi=0,this.#wi=0,this.#Di=0,this.#Pi=!0,this.started=!1,this.destroyed=!1,this.#Si=!0,this.#Ci=0,this.zLayers=100,this.pageHidden=!1,this.#Ti=o,this.#ki=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Ro(this),this.canvas=new ko(this.#p,this),this.particles=new To(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#zi=Eo(this.#p,this),this.actualOptions=Eo(this.#p,this),this.#Mi=new Co(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#Si&&!this.pageHidden&&Lo(this)}get options(){return this.#zi}get sourceOptions(){return this.#Ti}addLifeTime(t){this.#Di+=t}alive(){return!this.#wi||this.#Di<=this.#wi}destroy(e=!0){if(Lo(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.destroyed=!0,this.#Oi(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#bi(t,{container:this,data:e})}draw(t){if(!Lo(this))return;let e=t;this.#xi=W(t=>{e&&(this.#Ci=void 0,e=!1),this.#Ri(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const n=await i.export(t,e);if(n.supported)return n.blob}s().error(`Export plugin with type ${t} not found`)}async init(){if(!Lo(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.#zi=Eo(this.#p,this,this.#ki,this.sourceOptions),this.actualOptions=Eo(this.#p,this,this.#zi),this.#ni(e),this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:i,duration:n,fpsLimit:s,smooth:a,zLayers:o}=this.actualOptions,r=this.actualOptions.hdr;this.hdrMode=F(t.HdrMode,r.mode,t.HdrMode.standard),this.peakNits=r.peakNits,this.zLayers=o,this.#wi=Z(n)*p,this.#mi=Z(i)*p,this.#Di=0,this.fpsLimit=s>0?s:120,this.#Ii=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 Ft(this,t.initializers.effects),this.shapeDrawers=await Ft(this,t.initializers.shapes),this.particleUpdaters=await _t(this,t.initializers.updaters)}pause(){if(Lo(this)&&(void 0!==this.#xi&&(j(this.#xi),this.#xi=void 0),!this.#Si)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Si=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!Lo(this))return;const i=this.#Si||e;if(!this.#Pi||this.actualOptions.autoPlay){if(this.#Si&&(this.#Si=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#Pi=!1}async refresh(){if(Lo(this))return this.stop(),this.start()}async reset(t){if(Lo(this))return this.#ki=t,this.#Ti=t,this.#zi=Eo(this.#p,this,this.#ki,this.sourceOptions),this.actualOptions=Eo(this.#p,this,this.#zi),this.refresh()}async start(){Lo(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#Mi.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#yi=setTimeout(()=>{i()},this.#mi)}))}stop(){if(Lo(this)&&this.started){this.#yi&&(clearTimeout(this.#yi),this.#yi=void 0),this.#Pi=!0,this.started=!1,this.#Mi.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.#Ti=this.#zi,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#ni(t){this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[e,i]of t)e.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i))}#Ri(t){try{if(!this.#Ii&&void 0!==this.#Ci&&t<this.#Ci+p/this.fpsLimit)return void this.draw(!1);if(this.#Ci??=t,function(t,e,i=60,n=!1){t.value=e,t.factor=n?60/i:60*e/p}(this.#vi,t-this.#Ci,this.fpsLimit,this.#Ii),this.addLifeTime(this.#vi.value),this.#Ci=t,this.#vi.value>p)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#vi),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){s().error("error in animation loop",t)}}}});var Fo=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=t.DrawLayer.CanvasSetup;#u;#Li;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??c,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#Li&&(t.globalCompositeOperation=this.#Li)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Li=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function Ao(t,e,i,n,s,a,o){!function(t,e){const i=t.options,n=i.move.path;if(!n.enable)return;const s=t.pathDelay??0;if(t.lastPathTime<=s)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);n.clamp&&(t.velocity.x=G(t.velocity.x,-1,1),t.velocity.y=G(t.velocity.y,-1,1));t.lastPathTime-=s}(t,o);const r=t.gravity,c=r?.enable&&r.inverse?-1:1;s&&i&&(t.velocity.x+=s*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&&n>0&&(!r.inverse&&d.y>=0&&d.y>=n||r.inverse&&d.y<=0&&d.y<=-n)&&(d.y=c*n,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 Bo=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,n=i.gravity,s=i.path;if(e.moveDecay=1-Z(i.decay),e.pathDelay=Z(s.delay.value)*p,s.generator){let t=this.pathGenerators.get(s.generator);t||(t=this.availablePathGenerators.get(s.generator),t&&(this.pathGenerators.set(s.generator,t),t.init())),e.pathGenerator=t}e.gravity={enable:n.enable,acceleration:Z(n.acceleration),inverse:n.inverse},function(e,i){const n=i.options.move.spin;if(!n.enable)return;const s=n.position??{x:50,y:50},a={x:.01*s.x*e.canvas.size.width,y:.01*s.y*e.canvas.size.height},o=it(i.getPosition(),a),r=Z(n.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:a,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:N()*v,radius:o,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const n=e.options.move;if(!n.enable)return;const s=this.#u,a=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(e),o=s.retina.reduceFactor,r=e.retina.moveSpeed,c=e.retina.moveDrift,l=e.size.max,d=r*(n.size?e.getRadius()/l:1)*a*(i.factor||1)*u,h=e.retina.maxSpeed;n.spin.enable?function(e,i,n,s){if(!i.spin)return;const a=i.spin.direction===t.RotateDirection.clockwise,o={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*o.x(i.spin.angle)*s,i.position.y=i.spin.center.y+i.spin.radius*o.y(i.spin.angle)*s,i.spin.radius+=i.spin.acceleration*s;const r=Math.max(e.canvas.size.width,e.canvas.size.height),c=r*u;i.spin.radius>c?(i.spin.radius=c,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*n*(1-i.spin.radius/r)}(s,e,d,o):Ao(e,n,d,h,c,o,i),function(t){const e=t.initialPosition,{dx:i,dy:n}=tt(e,t.position),s=Math.abs(i),a=Math.abs(n),{maxDistance:o}=t.retina,r=o.horizontal,c=o.vertical;if(!r&&!c)return;if((r&&s>=r||c&&a>=c)&&!t.misplaced)t.misplaced=!!r&&s>r||!!c&&a>c,r&&(t.velocity.x=t.velocity.y*u-t.velocity.x),c&&(t.velocity.y=t.velocity.x*u-t.velocity.y);else if((!r||s<r)&&(!c||a<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,n=t.velocity;r&&(i.x<e.x&&n.x<0||i.x>e.x&&n.x>0)&&(n.x*=-N()),c&&(i.y<e.y&&n.y<0||i.y>e.y&&n.y>0)&&(n.y*=-N())}}(e)}preInit(){return this.#Ei()}redrawInit(){return this.#Ei()}update(){for(const t of this.pathGenerators.values())t.update()}async#Ei(){const t=this.#p;if(t.initializers.pathGenerators){this.availablePathGenerators=await Ft(this.#u,t.initializers.pathGenerators),this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});class Ho{#_i=!0;#Fi;#u;#ne;#Ai;#Bi;constructor(t,e){this.#u=t,this.#Fi=[],this.#Ai=e,this.#Bi=new Map,this.#ne={mouseDown:()=>{this.#Hi()},mouseLeave:()=>{this.#Vi()},mouseMove:t=>{this.#qi(t)},mouseUp:t=>{this.#Ui(t)},touchStart:t=>{this.#Ni(t)},touchMove:t=>{this.#qi(t)},touchEnd:t=>{this.#$i(t)},touchCancel:t=>{this.#$i(t)},touchEndClick:t=>{this.#Wi(t)},visibilityChange:()=>{this.#oe()}}}addListeners(){this.#ce(!0)}init(){this.#Fi.length=0;for(const t of this.#u.plugins.filter(t=>!!t.clickPositionValid))this.#Fi.push(t)}removeListeners(){this.#ce(!1)}#ji(t){const e=this.#u,i=this.#Ai,n=e.actualOptions;if(this.#_i){const t=i.interactivityData.mouse,e=t.position;if(!e)return;t.clickPosition={...e},t.clickTime=performance.now();const s=n.interactivity?.events.onClick;if(!s?.mode)return;Ot(s.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this.#Vi()},500)}#oe(){this.#Vi()}#Gi(t){const e=this.#ne,i=this.#u,n=this.#Ai,s=i.actualOptions,a=n.interactivityData.element;if(!a)return;const o=a,r=i.canvas;r.setPointerEvents(o===r.domElement?"initial":"none"),Et(a,An,e.mouseMove,t),Et(a,Bn,e.touchStart,t),Et(a,Vn,e.touchMove,t),Et(a,Hn,s.interactivity?.events.onClick.enable?e.touchEndClick:e.touchEnd,t),Et(a,"pointerup",e.mouseUp,t),Et(a,"pointerdown",e.mouseDown,t),Et(a,Fn,e.mouseLeave,t),Et(a,qn,e.touchCancel,t)}#ce(t){const e=this.#ne,i=this.#u,n=this.#Ai,s=i.actualOptions,a=s.interactivity?.detectsOn,o=i.canvas.domElement;a===Dn.window?n.interactivityData.element=mt():a===Dn.parent&&o?n.interactivityData.element=o.parentElement??o.parentNode:n.interactivityData.element=o,this.#Gi(t),Et(document,d,e.visibilityChange,t,!1)}#Hi(){const{interactivityData:t}=this.#Ai,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position}#Ui(t){const e=this.#u,i=this.#Ai,n=e.actualOptions,{mouse:s}=i.interactivityData;s.inside=!0;const a=s.position;if(a&&n.interactivity?.events.onClick.enable){let e=!1;for(const t of this.#Fi)if(e=t.clickPositionValid?.(a)??!1,e)break;e||this.#ji(t)}s.clicking=!1}#Vi(){const{interactivityData:t}=this.#Ai,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=Fn,e.inside=!1,e.clicking=!1}#qi(t){const e=this.#u,i=this.#Ai,n=e.actualOptions,s=i.interactivityData,a=e.canvas.domElement;if(!s.element)return;let o;if(s.mouse.inside=!0,t.type.startsWith("pointer")){this.#_i=!0;const e=t;if(s.element===mt()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(n.interactivity?.detectsOn===Dn.parent){const t=e.target,i=e.currentTarget;if(a){const n=t.getBoundingClientRect(),s=i.getBoundingClientRect(),r=a.getBoundingClientRect();o={x:e.offsetX+2*n.left-(s.left+r.left),y:e.offsetY+2*n.top-(s.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.#_i="touchmove"!==t.type,a){const e=t,i=e.touches[e.touches.length-1],n=a.getBoundingClientRect();if(!i)return;o={x:i.clientX-n.left,y:i.clientY-n.top}}const r=e.retina.pixelRatio;o&&(o.x*=r,o.y*=r),s.mouse.position=o,s.status=An}#$i(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Bi.delete(t.identifier);this.#Vi()}#Wi(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Bi.delete(t.identifier);this.#Ui(t)}#Ni(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Bi.set(t.identifier,performance.now());this.#qi(t);const{mouse:n}=this.#Ai.interactivityData;n.clicking=!0,n.downPosition=n.position}}class Vo{interactivityData;interactors;#Xi;#u;#Mi;#Yi;#Zi;#Ki;#p;constructor(t,e){this.#u=e,this.#p=t,this.interactors=[],this.#Yi=[],this.#Ki=[],this.#Xi=new Map,this.#Mi=new Ho(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this.#Zi=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(t=>{this.#Qi(t)})}addClickHandler(t){const e=this.#u,i=this.interactivityData;if(e.destroyed)return;const n=i.element;if(!n)return;const s=(i,n,s)=>{if(e.destroyed)return;const a=e.retina.pixelRatio,o={x:n.x*a,y:n.y*a},r=e.particles.grid.queryCircle(o,s*a);t(i,r)};let a=!1,o=!1;this.#Xi.set("click",t=>{if(e.destroyed)return;const i=t,n={x:i.offsetX,y:i.offsetY};s(t,n,1)}),this.#Xi.set(Bn,()=>{e.destroyed||(a=!0,o=!1)}),this.#Xi.set(Vn,()=>{e.destroyed||(o=!0)}),this.#Xi.set(Hn,t=>{if(!e.destroyed){if(a&&!o){const i=t,n=i.touches[i.touches.length-1];if(!n)return;const a=e.canvas.domElement,o=a?a.getBoundingClientRect():void 0,r={x:n.clientX-(o?o.left:0),y:n.clientY-(o?o.top:0)};s(t,r,Math.max(n.radiusX,n.radiusY))}a=!1,o=!1}}),this.#Xi.set(qn,()=>{e.destroyed||(a=!1,o=!1)});for(const[t,e]of this.#Xi)n.addEventListener(t,e)}addListeners(){this.#Mi.addListeners()}clearClickHandlers(){const t=this.#u,e=this.interactivityData;if(!t.destroyed){for(const[t,i]of this.#Xi)e.element?.removeEventListener(t,i);this.#Xi.clear()}}externalInteract(t){for(const e of this.#Yi){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.#Yi)i.handleClickMode?.(t,e)}init(){this.#Mi.init();for(const t of this.interactors){switch(t.type){case On.external:this.#Yi.push(t);break;case On.particles:this.#Ki.push(t)}t.init()}}async initInteractors(){const t=this.#p;t.initializers.interactors&&(this.interactors=await _t(this.#u,t.initializers.interactors),this.#Yi=[],this.#Ki=[])}particlesInteract(t,e){const i=this.interactivityData;for(const i of this.#Yi)i.clear(t,e);for(const n of this.#Ki)n.isEnabled(t,i)&&n.interact(t,i,e)}removeListeners(){this.#Mi.removeListeners()}reset(t){const e=this.interactivityData;for(const i of this.#Yi)i.isEnabled(e)&&i.reset(e,t);for(const i of this.#Ki)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Zi&&this.#Zi.observe(t.element)}stopObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Zi&&this.#Zi.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this.interactors)e.maxDistance>t&&(t=e.maxDistance);const e=this.#u;e.particles.grid.cellSize=t*e.retina.pixelRatio}#Qi(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 qo=Object.freeze({__proto__:null,InteractivityPluginInstance:class{#u;constructor(t,e){e.addClickHandler=t=>{e.interactionManager?.addClickHandler(t)},e.interactionManager=new Vo(t,e),this.#u=e}addClickHandler(t){this.#u.interactionManager?.addClickHandler(t)}clearClickHandlers(){this.#u.interactionManager?.clearClickHandlers()}destroy(){this.clearClickHandlers()}particleCreated(t){const e=t,i=this.#u,n=new Rn(i);n.load(i.actualOptions.interactivity),n.load(e.options.interactivity),e.interactivity=n}particleReset(t){this.#u.interactionManager?.reset(t)}postParticleUpdate(t,e){this.#u.interactionManager?.particlesInteract(t,e)}postUpdate(t){const e=this.#u;e.interactionManager?.externalInteract(t),e.interactionManager?.updateMaxDistance()}async preInit(){const t=this.#u;await(t.interactionManager?.initInteractors()),t.interactionManager?.init()}async redrawInit(){const t=this.#u;await(t.interactionManager?.initInteractors()),t.interactionManager?.init()}start(){const t=this.#u;return t.interactionManager?.addListeners(),t.interactionManager?.startObserving(),Promise.resolve()}stop(){this.#u.interactionManager?.removeListeners(),this.#u.interactionManager?.stopObserving()}}});var Uo=Object.freeze({__proto__:null,ImagePreloaderInstance:class{#u;#s;constructor(t,e){this.#s=t,this.#u=e}destroy(){this.#s.images?.delete(this.#u)}}});var No=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 n=t.options.collisions;if(!n?.enable)return!1;const s=n.overlap;if(s.enable)return!1;const a=s.retries;if(a>=0&&i>a)throw new Error(ut(Ua));return!!this.#u.particles.find(i=>it(e,i.position)<t.getRadius()+i.getRadius())}}});function $o(t,e){const i=(n=t.map(t=>t.id),[...n].sort((t,e)=>t-e).join("_"));var n;let s=e.get(i);return void 0===s&&(s=N(),e.set(i,s)),s}var Wo=Object.freeze({__proto__:null,LinkInstance:class{#tn=new Map;#u;#en;#p;constructor(t,e){this.#p=t,this.#u=e,this.#en={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:n}=e;if(!i?.length||!n.links)return;const s=n.links,a=e.retina.linksWidth??0,o=e.getPosition(),r=e.options.twinkle?.links,c=s.triangles.enable,l=c?new Set(i.map(t=>t.destination.id)):null,d=t.globalAlpha;let h="",p=-1,f=-1,m=!1;const y=()=>{m&&(t.stroke(),m=!1)};for(const d of i){if(s.frequency<1&&this.#in(e,d.destination)>s.frequency)continue;const i=d.destination.getPosition();if(c&&!d.isWarped&&l&&(y(),this.#nn(n,e,d,l,o,i,t)),d.opacity<=0||a<=0)continue;if(!s.enable)continue;let v=d.opacity,b=d.color;const x=r?.enable&&N()<r.frequency?si(this.#p,r.color):void 0;if(r&&x&&(b=x,v=Z(r.opacity)),!b){const t=void 0!==s.id?this.#u.particles.linksColors.get(s.id):this.#u.particles.linksColor;b=yi(e,d.destination,t)}if(!b)continue;const w=this.#sn(b);if(w===h&&a===p&&v===f||(y(),t.strokeStyle=w,t.lineWidth=a,t.globalAlpha=v,h=w,p=a,f=v,t.beginPath(),m=!0),d.isWarped){const e=this.#u.canvas.size,n=i.x-o.x,s=i.y-o.y;let a=g.x,r=g.y;Math.abs(n)>e.width*u&&(a=n>0?-e.width:e.width),Math.abs(s)>e.height*u&&(r=s>0?-e.height:e.height),t.moveTo(o.x,o.y),t.lineTo(i.x+a,i.y+r),t.moveTo(o.x-a,o.y-r),t.lineTo(i.x,i.y)}else t.moveTo(o.x,o.y),t.lineTo(i.x,i.y)}y(),t.globalAlpha=d}init(){return this.#en.links.clear(),this.#en.triangles.clear(),this.#tn.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=[]}#nn(t,e,i,n,s,a,o){const r=i.destination,c=t.links?.triangles;if(!c?.enable||!r.options.links?.triangles.enable)return;const l=r.links;if(l?.length)for(const d of l){if(d.isWarped||this.#in(r,d.destination)>r.options.links.frequency||!n.has(d.destination.id))continue;const l=d.destination;if(this.#an(e,r,l)>(t.links?.triangles.frequency??0))continue;const h=c.opacity??(i.opacity+d.opacity)*u,p=si(this.#p,c.color)??i.color;if(!p||h<=0)continue;const g=l.getPosition();o.save(),o.fillStyle=this.#sn(p),o.globalAlpha=h,o.beginPath(),o.moveTo(s.x,s.y),o.lineTo(a.x,a.y),o.lineTo(g.x,g.y),o.closePath(),o.fill(),o.restore()}}#sn(t){const e=`${t.r},${t.g},${t.b}-${this.#u.hdr}-${this.#u.peakNits}-${this.#u.hdrMode}`;let i=this.#tn.get(e);return i||(i=gi(t,this.#u.hdr,void 0,this.#u.peakNits,this.#u.hdrMode),this.#tn.set(e,i)),i}#in(t,e){return $o([t,e],this.#en.links)}#an(t,e,i){return $o([t,e,i],this.#en.triangles)}}});t.AnimatableColor=ve,t.AnimationOptions=pe,t.AnimationValueWithRandom=Se,t.Background=be,t.BaseRange=ne,t.Circle=se,t.ColorAnimation=fe,t.ErrorCodes=ht,t.Fill=ke,t.FullScreen=xe,t.HDROptions=we,t.HslAnimation=me,t.Move=Ee,t.MoveAngle=Ce,t.MoveCenter=De,t.MoveGravity=Oe,t.MovePath=Te,t.OptionLoader=he,t.Options=je,t.OptionsColor=ye,t.OutModes=Re,t.Paint=Fe,t.ParticlesBounce=Be,t.ParticlesBounceFactor=Ae,t.ParticlesDensity=He,t.ParticlesNumber=qe,t.ParticlesNumberLimit=Ve,t.ParticlesOptions=$e,t.RangedAnimationOptions=ge,t.RangedAnimationValueWithRandom=Ie,t.Rectangle=ae,t.ResizeEvent=Me,t.Shape=Ue,t.Spin=Le,t.Stroke=_e,t.ValueWithRandom=ze,t.Vector=T,t.Vector3d=I,t.ZIndex=Ne,t.addErrorMessages=function(t){},t.alterHsl=ki,t.animate=W,t.areBoundsInside=Mt,t.calcExactPositionOrRandomFromSize=lt,t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/h,y:t.position.y*t.size.height/h}:void 0},t.calcPositionOrRandomFromSize=ct,t.calcPositionOrRandomFromSizeRanged=function(t){const e={x:void 0!==t.position?.x?Z(t.position.x):void 0,y:void 0!==t.position?.y?Z(t.position.y):void 0};return ct({size:t.size,position:e})},t.calculateBounds=Pt,t.cancelAnimation=j,t.canvasFirstIndex=0,t.canvasTag=w,t.checkDistance=nt,t.circleBounce=Dt,t.circleBounceDataFromParticle=Ct,t.clamp=G,t.cloneStyle=It,t.collisionVelocity=rt,t.colorMix=mi,t.colorToRgb=ai,t.countOffset=1,t.decayOffset=1,t.deepExtend=kt,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=c,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=f,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=st,t.deleteCount=1,t.double=2,t.doublePI=v,t.empty=0,t.executeOnSingleOrMultiple=Ot,t.fullPercent=r,t.generatedAttribute=o,t.generatedFalse=x,t.generatedTrue=b,t.getCanvasFromContainer=Bt,t.getDataFromUrl=At,t.getDistance=it,t.getDistanceSq=et,t.getDistances=tt,t.getDomContainer=Ht,t.getErrorMessage=ut,t.getFullScreenStyle=Lt,t.getHslAnimationFromHsl=xi,t.getHslFromAnimation=bi,t.getItemMapFromInitializer=Ft,t.getItemsFromInitializer=_t,t.getLinkColor=yi,t.getLinkRandomColor=vi,t.getLogger=s,t.getParticleBaseVelocity=ot,t.getParticleDirectionAngle=at,t.getPosition=St,t.getRandom=N,t.getRandomFn=function(){return q},t.getRandomInRange=$,t.getRandomRgbColor=pi,t.getRangeMax=Q,t.getRangeMin=K,t.getRangeValue=Z,t.getStyleFromHsl=fi,t.getStyleFromRgb=gi,t.hMax=P,t.hMin=0,t.hPhase=60,t.half=u,t.hslToRgb=di,t.hslToRgbFloat=hi,t.hslaToRgba=ui,t.identity=1,t.inverseFactorNumerator=1,t.isArray=B,t.isBoolean=R,t.isEnumValue=_,t.isFunction=function(t){return"function"==typeof t},t.isInArray=bt,t.isNull=H,t.isNumber=E,t.isObject=A,t.isPointInside=wt,t.isString=L,t.itemFromArray=xt,t.itemFromSingleOrMultiple=zt,t.lFactor=1,t.lMax=C,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){if(void 0!==i){const n=e;if("__proto__"===n||"constructor"===n||"prototype"===n)return;const s=t,a=Object.hasOwn(s,n)?s[n]:{};s[n]=kt(a,i)}},t.loadLazyProperty=le,t.loadMinIndex=0,t.loadNestedProperty=ce,t.loadOptionProperty=de,t.loadOptions=ue,t.loadParticlesOptions=We,t.loadProperty=oe,t.loadRandomFactor=1e4,t.loadRangeProperty=re,t.loadSlim=vo,t.manageListener=Et,t.maxNits=z,t.midColorValue=y,t.millisecondsToSeconds=p,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=X,t.none=0,t.one=1,t.originPoint=g,t.parseAlpha=dt,t.percentDenominator=h,t.phaseNumerator=1,t.quarter=D,t.randomColorValue=m,t.randomInRangeValue=Y,t.rangeColorToHsl=oi,t.rangeColorToRgb=si,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=l,t.rgbMax=M,t.rgbToHsl=ri,t.sMax=k,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=mt,t.safeMatchMedia=yt,t.safeMutationObserver=vt,t.setAnimationFunctions=function(t,e){U.nextFrame=t,U.cancel=e},t.setLogger=function(t){t.debug&&(n.debug=i(t.debug)),t.error&&(n.error=i(t.error)),t.info&&(n.info=i(t.info)),t.log&&(n.log=i(t.log)),t.trace&&(n.trace=i(t.trace)),t.verbose&&(n.verbose=i(t.verbose)),t.warning&&(n.warning=i(t.warning))},t.setRandom=function(t=Math.random){q=t},t.setRangeValue=J,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return ni(t,e)?.a},t.stringToRgb=ci,t.threeQuarter=O,t.toEnumValue=F,t.triple=3,t.tryCountIncrement=1,t.tsParticles=Ci,t.updateColor=Pi,t.updateColorValue=Mi,t.visibilityChangeEvent=d,t.zIndexFactorOffset=1}(t.__tsParticlesInternals.bundles.slim=t.__tsParticlesInternals.bundles.slim||{})}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:self),Object.assign(globalThis.window||globalThis,{loadExtendProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadExtendProperty,loadLazyProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadLazyProperty,loadMinIndex:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadMinIndex,loadNestedProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadNestedProperty,loadOptionProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadOptionProperty,loadOptions:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadOptions,loadParticlesOptions:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadParticlesOptions,loadProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadProperty,loadRandomFactor:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadRandomFactor,loadRangeProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadRangeProperty,loadSlim:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadSlim,tsParticles:(globalThis.__tsParticlesInternals.bundles.slim||{}).tsParticles}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.slim||{});