UNPKG

tsparticles

Version:

Full-featured tsParticles bundle — create stunning particle, confetti and fireworks animations with all official plugins and presets included. Ready to use components available for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inf

1 lines 195 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),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.full=t.__tsParticlesInternals.bundles.full||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",o=100,a=.5,r=1e3,l={x:0,y:0,z:0},c={a:1,b:0,c:0,d:1},d="random",h="mid",u=2*Math.PI,p="true",g="false",f="canvas",y=255,m=360,v=100,b=100,w=.25,x=.75,M=400;var P;function k(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(P=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",P.bottomLeft="bottom-left",P.bottomRight="bottom-right",P.left="left",P.none="none",P.right="right",P.top="top",P.topLeft="top-left",P.topRight="top-right",P.outside="outside",P.inside="inside";class C{x;y;z;constructor(t=l.x,e=l.y,i=l.z){this.x=t,this.y=e,this.z=i}static get origin(){return C.create(l.x,l.y,l.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return C.create(t.x,t.y,k(t))}static create(t,e,i){return"number"==typeof t?new C(t,e??l.y,i??l.z):new C(t.x,t.y,k(t))}add(t){return C.create(this.x+t.x,this.y+t.y,this.z+k(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=k(t)}copy(){return C.clone(this)}div(t){return C.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return C.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return C.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),l.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=k(t)}sub(t){return C.create(this.x-t.x,this.y-t.y,this.z-k(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=k(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class O extends C{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return O.create(l.x,l.y)}static clone(t){return O.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new O(t,e??l.y):new O(t.x,t.y)}}function D(t){return"boolean"==typeof t}function z(t){return"string"==typeof t}function S(t){return"number"==typeof t}function I(t){return"object"==typeof t&&null!==t}function T(t){return Array.isArray(t)}function E(t){return null==t}const R=Math.PI/180;let L=Math.random;const _={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return H(L(),0,1-Number.EPSILON)}function F(t,e){return A()*(e-t)+t}function V(t){return _.nextFrame(t)}function B(t){_.cancel(t)}function H(t,e,i){return Math.min(Math.max(t,e),i)}function q(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function U(t){const e=$(t);let i=j(t);return e===i&&(i=0),F(i,e)}function W(t){return S(t)?t:U(t)}function j(t){return S(t)?t:t.min}function $(t){return S(t)?t:t.max}function G(t,e){if(t===e||void 0===e&&S(t))return t;const i=j(t),s=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:G(i,s)}function N(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function X(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function Y(t,e){return Math.sqrt(X(t,e))}function K(t,e,i){return X(t,e)<=i*i}function Q(t){return t*R}function Z(e,i,s){if(S(e))return Q(e);switch(e){case t.MoveDirection.top:return-Math.PI*a;case t.MoveDirection.topRight:return-Math.PI*w;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*w;case t.MoveDirection.bottom:return Math.PI*a;case t.MoveDirection.bottomLeft:return Math.PI*x;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*x;case t.MoveDirection.inside:return Math.atan2(s.y-i.y,s.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-s.y,i.x-s.x);default:return A()*u}}function J(t){const e=O.origin;return e.length=1,e.angle=t,e}function tt(t,e,i,s){return O.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function et(t){return{x:(t.position?.x??A()*o)*t.size.width/o,y:(t.position?.y??A()*o)*t.size.height/o}}function it(t){const e={x:void 0!==t.position?.x?W(t.position.x):void 0,y:void 0!==t.position?.y?W(t.position.y):void 0};return et({size:t.size,position:e})}function st(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}function nt(t){return t?t.endsWith("%")?parseFloat(t)/o:parseFloat(t):1}var ot,at;t.OutModeDirection=void 0,(ot=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",ot.left="left",ot.right="right",ot.top="top",t.PixelMode=void 0,(at=t.PixelMode||(t.PixelMode={})).precise="precise",at.percent="percent";function rt(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function lt(){return globalThis.document}function ct(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function dt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function ht(t,e){return t===e||T(e)&&e.includes(t)}function ut(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(A()*t.length)]}function pt(t,e,i,s,n){return gt(ft(t,s??0),e,i,n)}function gt(e,i,s,n){let o=!0;return n&&n!==t.OutModeDirection.bottom||(o=e.top<i.height+s.x),!o||n&&n!==t.OutModeDirection.left||(o=e.right>s.x),!o||n&&n!==t.OutModeDirection.right||(o=e.left<i.width+s.y),!o||n&&n!==t.OutModeDirection.top||(o=e.bottom>s.y),o}function ft(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function yt(t,...e){for(const i of e){if(E(i))continue;if(!I(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):I(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return I(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if(rt(t))continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if(rt(s))continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>yt(void 0,t)):yt(e[s],n)}}return t}function mt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:O.create(W(t.options.bounce.horizontal.value),W(t.options.bounce.vertical.value))}}function vt(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,o]=[t.position,e.position],{dx:a,dy:r}=N(o,n);if(i*a+s*r<0)return;const l=-Math.atan2(r,a),c=t.mass,d=e.mass,h=t.velocity.rotate(l),u=e.velocity.rotate(l),p=tt(h,u,c,d),g=tt(u,h,c,d),f=p.rotate(-l),y=g.rotate(-l);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=y.x*e.factor.x,e.velocity.y=y.y*e.factor.y}function bt(t,e){return T(t)?t.map((t,i)=>e(t,i)):e(t,0)}function wt(t,e,i){return T(t)?ut(t,e,i):t}function xt(e,i){return function(e,i){if(e.mode!==t.PixelMode.percent){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/o*i.width,y:e.y/o*i.height}:{width:e.width/o*i.width,height:e.height/o*i.height}}(e,i)}function Mt(t){const e=lt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||E(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const o=t.getPropertyPriority?.(s);o?e.setProperty(s,n,o):e.setProperty(s,n)}return e}let Pt,kt;function Ct(t){if(Pt!==t||!kt){Pt=t;const e=lt().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}kt=e}return kt}function Ot(t,e,i,s,n){if(s){let s={passive:!0};D(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function Dt(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,n)),n}async function zt(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class St{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var It;t.EventType=void 0,(It=t.EventType||(t.EventType={})).configAdded="configAdded",It.containerInit="containerInit",It.particlesSetup="particlesSetup",It.containerStarted="containerStarted",It.containerStopped="containerStopped",It.containerDestroyed="containerDestroyed",It.containerPaused="containerPaused",It.containerPlay="containerPlay",It.containerBuilt="containerBuilt",It.particleAdded="particleAdded",It.particleDestroyed="particleDestroyed",It.particleRemoved="particleRemoved";class Tt{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#o=new Set;#a=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#s.set(i,e),this.#n.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return zt(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return zt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return Dt(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#a&&!this.#r){this.#r=!0,this.#o=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#o,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#a=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#a)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#o,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const Et=t=>(...e)=>{t(...e)},Rt={debug:Et(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:Et(console.info),log:Et(console.log),trace:Et(console.trace),verbose:Et(console.log),warning:Et(console.warn)};function Lt(){return Rt}const _t="100%";class At{pluginManager=new Tt(this);#d=[];#h=new St;#a=!1;get items(){return this.#d}get version(){return"4.3.2"}addEventListener(t,e){this.#h.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#h.dispatchEvent(t,e)}async init(){this.#a||(await this.pluginManager.init(),this.#a=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return _r}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:o,url:a}=t,r=a?await async function(t){const e=wt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Lt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:a,index:o}):t.options,l=wt(r,o),{items:c}=this,d=c.findIndex(t=>t.id.description===n),h=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(h);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(d>=0){const t=this.item(d),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(d,e,h)}else c.push(h);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=lt();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)s=t,s.dataset[e]??=g,s.dataset[e]===p&&(s.style.width||=_t,s.style.height||=_t,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(f).item(0);n?(s=n,s.dataset[e]=g):(s=i.createElement(f),s.dataset[e]=p,t.appendChild(s)),s.style.width||=_t,s.style.height||=_t,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=lt();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return h.canvas.loadCanvas(u),await h.start(),h}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#h.removeEventListener(t,e)}}var Ft,Vt,Bt,Ht,qt,Ut,Wt,jt,$t,Gt,Nt,Xt;!function(t){t.circle="circle",t.rectangle="rectangle"}(Ft||(Ft={}));class Yt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Kt extends Yt{radius;constructor(t,e,i){super(t,e,Ft.circle),this.radius=i}contains(t){return K(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),o=Math.abs(i.y-e.y);if(t instanceof Kt||t.type===Ft.circle){return s+t.radius>Math.hypot(n,o)}if(t instanceof Qt||t.type===Ft.rectangle){const e=t,{width:i,height:a}=e.size;return Math.pow(n-i,2)+Math.pow(o-a,2)<=s**2||n<=s+i&&o<=s+a||n<=i||o<=a}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Qt extends Yt{size;constructor(t,e,i,s){super(t,e,Ft.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof Kt)return t.intersects(this);if(!(t instanceof Qt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,o=t.size,a=o.width,r=o.height;return n.x<s.x+e&&n.x+a>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}t.RotateDirection=void 0,(Vt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Vt.counterClockwise="counter-clockwise",Vt.random="random",t.AnimationMode=void 0,(Bt=t.AnimationMode||(t.AnimationMode={})).auto="auto",Bt.increase="increase",Bt.decrease="decrease",Bt.random="random",t.LimitMode=void 0,(Ht=t.LimitMode||(t.LimitMode={})).delete="delete",Ht.wait="wait",t.OutMode=void 0,(qt=t.OutMode||(t.OutMode={})).bounce="bounce",qt.none="none",qt.out="out",qt.destroy="destroy",qt.split="split",t.AlterType=void 0,(Ut=t.AlterType||(t.AlterType={})).darken="darken",Ut.enlighten="enlighten",t.DestroyType=void 0,(Wt=t.DestroyType||(t.DestroyType={})).none="none",Wt.max="max",Wt.min="min",t.GradientType=void 0,(jt=t.GradientType||(t.GradientType={})).linear="linear",jt.radial="radial",jt.random="random",t.ParticleOutType=void 0,($t=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",$t.inside="inside",$t.outside="outside",t.StartValueType=void 0,(Gt=t.StartValueType||(t.StartValueType={})).max="max",Gt.min="min",Gt.random="random",t.AnimationStatus=void 0,(Nt=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",Nt.decreasing="decreasing",t.DrawLayer=void 0,(Xt=t.DrawLayer||(t.DrawLayer={}))[Xt.BackgroundElement=0]="BackgroundElement",Xt[Xt.BackgroundDraw=1]="BackgroundDraw",Xt[Xt.BackgroundMask=2]="BackgroundMask",Xt[Xt.CanvasSetup=3]="CanvasSetup",Xt[Xt.PluginContent=4]="PluginContent",Xt[Xt.Particles=5]="Particles",Xt[Xt.CanvasCleanup=6]="CanvasCleanup",Xt[Xt.Foreground=7]="Foreground";class Zt{load(t){E(t)||this.doLoad(t)}}function Jt(t,...e){for(const i of e)t.load(i)}function te(t,e,i){void 0!==i&&(t[e]=i)}function ee(t,e,i){void 0!==i&&(t[e]=G(i))}function ie(t,e,i){void 0!==i&&t[e].load(i)}function se(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function ne(t,e,i,...s){const n=t;n[e]??=new i;const o=n[e];for(const t of s)o.load(t?.[e])}class oe extends Zt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){ee(this,"count",t.count),te(this,"enable",t.enable),ee(this,"speed",t.speed),ee(this,"decay",t.decay),ee(this,"delay",t.delay),te(this,"sync",t.sync)}}class ae extends oe{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),te(this,"mode",t.mode),te(this,"startValue",t.startValue)}}class re extends oe{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),te(this,"max",t.max),te(this,"min",t.min),ee(this,"offset",t.offset)}}class le extends Zt{h=new re(0,m);l=new re(0,b);s=new re(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class ce extends Zt{value="";static create(t,e){const i=new ce;return i.load(t),void 0!==e&&(z(e)||T(e)?i.load({value:e}):i.load(e)),i}doLoad(t){E(t.value)||(this.value=t.value)}}class de extends ce{animation=new le;static create(t,e){const i=new de;return i.load(t),void 0!==e&&(z(e)||T(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class he extends Zt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new ce,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),te(this,"element",t.element),te(this,"draw",t.draw),te(this,"image",t.image),te(this,"position",t.position),te(this,"repeat",t.repeat),te(this,"size",t.size),te(this,"opacity",t.opacity)}}class ue extends Zt{enable=!0;zIndex=0;doLoad(t){te(this,"enable",t.enable),te(this,"zIndex",t.zIndex)}}class pe extends Zt{delay=.5;enable=!0;doLoad(t){te(this,"delay",t.delay),te(this,"enable",t.enable)}}class ge extends Zt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=yt(this.options[t]??{},i))}te(this,"close",t.close),te(this,"type",t.type)}}class fe extends Zt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=de.create(this.color,t.color)),te(this,"enable",t.enable),ee(this,"opacity",t.opacity)}}class ye extends Zt{offset=0;value=90;doLoad(t){ee(this,"offset",t.offset),ee(this,"value",t.value)}}class me extends Zt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){te(this,"x",t.x),te(this,"y",t.y),te(this,"mode",t.mode),te(this,"radius",t.radius)}}class ve extends Zt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){ee(this,"acceleration",t.acceleration),te(this,"enable",t.enable),te(this,"inverse",t.inverse),ee(this,"maxSpeed",t.maxSpeed)}}class be extends Zt{value=0;doLoad(t){E(t.value)||(this.value=G(t.value))}}class we extends be{animation=new oe;doLoad(t){super.doLoad(t),ie(this,"animation",t.animation)}}class xe extends we{animation=new ae}class Me extends Zt{clamp=!0;delay=new be;enable=!1;generator;options={};doLoad(t){te(this,"clamp",t.clamp),this.delay.load(t.delay),te(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=yt(this.options,t.options))}}class Pe extends Zt{bottom;default=t.OutMode.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class ke extends Zt{acceleration=0;enable=!1;position;doLoad(t){ee(this,"acceleration",t.acceleration),te(this,"enable",t.enable),t.position&&(this.position=yt({},t.position))}}class Ce extends Zt{angle=new ye;center=new me;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new ve;outModes=new Pe;path=new Me;random=!1;size=!1;speed=2;spin=new ke;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),ee(this,"decay",t.decay),te(this,"direction",t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),ee(this,"drift",t.drift),te(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(I(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),te(this,"random",t.random),te(this,"size",t.size),ee(this,"speed",t.speed),this.spin.load(t.spin),te(this,"straight",t.straight),te(this,"vibrate",t.vibrate),te(this,"warp",t.warp)}}class Oe extends Zt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=de.create(this.color,t.color)),ee(this,"width",t.width),ee(this,"opacity",t.opacity)}}class De extends Zt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=de.create(this.color,t.color)),se(this,"fill",t.fill,()=>new fe),se(this,"stroke",t.stroke,()=>new Oe)}}class ze extends be{value=1}class Se extends Zt{horizontal=new ze;vertical=new ze;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Ie extends Zt{enable=!1;height=1080;width=1920;doLoad(t){te(this,"enable",t.enable),te(this,"width",t.width),te(this,"height",t.height)}}class Te extends Zt{mode=t.LimitMode.delete;value=0;doLoad(t){te(this,"mode",t.mode),te(this,"value",t.value)}}class Ee extends Zt{density=new Ie;limit=new Te;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),te(this,"value",t.value)}}class Re extends Zt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=yt(this.options[t]??{},i))}te(this,"close",t.close),te(this,"type",t.type)}}class Le extends be{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),te(this,"opacityRate",t.opacityRate),te(this,"sizeRate",t.sizeRate),te(this,"velocityRate",t.velocityRate)}}class _e extends Zt{bounce=new Se;effect=new ge;groups={};move=new Ce;number=new Ee;paint;palette;reduceDuplicates=!1;shape=new Re;zIndex=new Le;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new De,this.paint.color=new de,this.paint.color.value="#fff",this.paint.fill=new fe,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#g(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=yt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(T(e)?this.paint=bt(e,t=>{const e=new De;return e.load(t),e}):T(this.paint)?(this.paint=new De,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#g(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(T(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function Ae(t,e,...i){const s=new _e(t,e);return Jt(s,...i),s}class Fe extends Zt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new he,this.fullScreen=new ue,this.particles=Ae(this.#p,this.#u),this.resize=new pe}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,bt(this.preset,t=>{this.#f(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#g(this.palette)),te(this,"autoPlay",t.autoPlay),te(this,"clear",t.clear),te(this,"key",t.key),te(this,"name",t.name),ee(this,"delay",t.delay),te(this,"detectRetina",t.detectRetina),ee(this,"duration",t.duration),te(this,"fpsLimit",t.fpsLimit),te(this,"hdr",t.hdr),te(this,"pauseOnBlur",t.pauseOnBlur),te(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),te(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;D(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=yt(this.style,t.style),te(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#g(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#f(t){this.load(this.#p.getPreset(t))}}const Ve=new Map;function Be(t,e){let i=Ve.get(t);return i||(i=e(),Ve.size>2e3&&Ve.clear(),Ve.set(t,i)),i}function He(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function qe(t,e,i,s=!0){if(!e)return;const n=z(e)?{value:e}:e;if(z(n.value))return Ue(t,n.value,i,s);if(T(n.value)){const e=ut(n.value,i,s);if(!e)return;return qe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Ue(t,e,i,s=!0){if(!e)return;const n=z(e)?{value:e}:e;if(z(n.value))return n.value===d?Ke():$e(t,n.value);if(T(n.value)){const e=ut(n.value,i,s);if(!e)return;return Ue(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function We(t,e,i,s=!0){const n=qe(t,e,i,s);return n?je(n):void 0}function je(t){const e=t.r/y,i=t.g/y,s=t.b/y,n=Math.max(e,i,s),o=Math.min(e,i,s),r={h:0,l:(n+o)*a,s:0};return n!==o&&(r.s=r.l<a?(n-o)/(n+o):(n-o)/(2-n-o),r.h=e===n?(i-s)/(n-o):i===n?2+(s-e)/(n-o):4+(e-i)/(n-o)),r.l*=b,r.s*=v,r.h*=60,r.h<0&&(r.h+=m),r.h>=m&&(r.h-=m),r}function $e(t,e){return He(t,e)}function Ge(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function Ne(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/m,o=i/v,r=s/b;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const l=r<a?r*(1+o):r+o-r*o,c=2*r-l,d=1/3,h=Math.min(y,y*Ge(c,l,n+d)),u=Math.min(y,y*Ge(c,l,n)),p=Math.min(y,y*Ge(c,l,n-d));return{r:Math.round(h),g:Math.round(u),b:Math.round(p)}}function Xe(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/m,o=i/v,r=s/b;if(0===i){const t=r*y;return{r:t,g:t,b:t}}const l=r<a?r*(1+o):r+o-r*o,c=2*r-l,d=1/3;return{r:Math.min(y,y*Ge(c,l,n+d)),g:Math.min(y,y*Ge(c,l,n)),b:Math.min(y,y*Ge(c,l,n-d))}}function Ye(t){const e=Ne(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Ke(t,e){const i=t??0;if(e)return{r:F(i,y),g:F(i,y),b:F(i,y)};const s=()=>Math.floor(F(i,256));return{b:s(),g:s(),r:s()}}function Qe(t,e,i){const s=e?4:2,n=i??1;return Be(`rgb-${t.r.toFixed(s)}-${t.g.toFixed(s)}-${t.b.toFixed(s)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/y*s).toString()} ${(t.g/y*s).toString()} ${(t.b/y*s).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Ze(t,e,i){const s=e?4:2,n=i??1;return Be(`hsl-${t.h.toFixed(s)}-${t.s.toFixed(s)}-${t.l.toFixed(s)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?Qe(Xe(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${n.toString()})`)}function Je(t,e,i,s){let n=t,o=e;return"r"in n||(n=Ne(t)),"r"in o||(o=Ne(e)),{b:q(n.b,o.b,i,s),g:q(n.g,o.g,i,s),r:q(n.r,o.r,i,s)}}function ti(t,e,i){if(i===d)return Ke();if(i!==h)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return Je(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return Ne(t)}}}function ei(t,e,i,s){const n=z(e)?e:e.value;return n===d?s?qe(t,{value:n}):i?d:h:n===h?h:qe(t,{value:n})}function ii(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function si(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:m},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:b}};return e&&(ni(s.h,e.h,i),ni(s.s,e.s,i),ni(s.l,e.l,i)),s}function ni(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=W(i.speed)/o*s,e.decay=1-W(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=W(i.count),e.time=0,e.delayTime=W(i.delay)*r,i.sync||(e.velocity*=A(),e.value*=A()),e.initialValue=e.value,e.offset=G(i.offset)):e.velocity=0}function oi(e,i,s,n){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const o=e.offset?U(e.offset):0,a=((e.velocity??0)*s.factor+3.6*o)*(n?.5075:1),r=e.decay??1,l=e.max,c=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=a,e.value<c&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=a,e.value>l&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=l)),e.velocity&&1!==r&&(e.velocity*=r),e.value=H(e.value,c,l)}function ai(t,e,i){if(!t)return;const{h:s,s:n,l:o}=t;oi(s,!1,e,i),oi(n,!0,e,i),oi(o,!0,e,i)}function ri(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const li=new At;class ci{enable=!1;mode=[];load(t){E(t)||(te(this,"enable",t.enable),te(this,"mode",t.mode))}}var di,hi,ui;!function(t){t.circle="circle",t.rectangle="rectangle"}(di||(di={}));class pi{enable=!1;mode=[];selectors=[];type=di.circle;load(t){E(t)||(te(this,"selectors",t.selectors),te(this,"enable",t.enable),te(this,"mode",t.mode),te(this,"type",t.type))}}class gi{enable=!1;mode=[];load(t){E(t)||(te(this,"enable",t.enable),te(this,"mode",t.mode))}}class fi{onClick=new ci;onDiv=new pi;onHover=new gi;load(t){if(E(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=bt(e,t=>{const e=new pi;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(hi||(hi={}));class yi{#u;#p;constructor(t,e){this.#p=t,this.#u=e}load(t){if(E(t))return;if(!this.#u)return;const e=this.#p.interactors?.get(this.#u);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class mi{detectsOn=hi.window;events=new fi;modes;constructor(t,e){this.modes=new yi(t,e)}load(t){if(E(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class vi{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return Vr});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new mi(this.#p,t)),s.load(i?.interactivity);const n=this.#p.interactors?.get(t);if(n)for(const t of n)t.loadOptions&&t.loadOptions(e,i)}loadParticlesOptions(t,e,i){i?.interactivity&&(e.interactivity=yt({},i.interactivity));const s=this.#p.interactors?.get(t);if(s)for(const t of s)t.loadParticlesOptions?.(e,i)}needsPlugin(){return!0}}!function(t){t.external="external",t.particles="particles"}(ui||(ui={}));class bi{type=ui.external;container;constructor(t){this.container=t}}class wi{type=ui.particles;container;constructor(t){this.container=t}}const xi="pointerdown",Mi="pointerup",Pi="pointerleave",ki="pointermove",Ci="touchstart",Oi="touchend",Di="touchmove",zi="touchcancel";function Si(t,e){if(T(t))return t.find((t,i)=>e(t,i));return e(t,0)?t:void 0}function Ii(t,e){return!!Si(e,e=>e.enable&&ht(t,e.mode))}function Ti(t,e,i){bt(e,e=>{const s=e.mode;e.enable&&ht(t,s)&&function(t,e){const i=t.selectors;bt(i,i=>{e(i,t)})}(e,i)})}function Ei(t,e){if(e&&t)return Si(t,t=>function(t,e){const i=bt(e,e=>t.matches(e));return T(i)?i.some(t=>t):i}(e,t.selectors))}function Ri(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}class Li{count;delay;duration;wait=!1;load(t){E(t)||(te(this,"count",t.count),ee(this,"delay",t.delay),ee(this,"duration",t.duration),te(this,"wait",t.wait))}}class _i{mass=0;radius=0;load(t){E(t)||(te(this,"mass",t.mass),te(this,"radius",t.radius))}}class Ai extends be{density=5;limit=new _i;value=50;load(t){E(t)||(super.load(t),te(this,"density",t.density),S(t.limit)?this.limit.radius=t.limit:this.limit.load(t.limit))}}class Fi{color;destroy;draggable;life;name;opacity;orbits;position;size;constructor(){this.color=new ce,this.color.value="#000000",this.draggable=!1,this.opacity=1,this.destroy=!0,this.orbits=!1,this.life=new Li,this.size=new Ai}load(t){E(t)||(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),te(this,"draggable",t.draggable),void 0!==t.life&&this.life.load(t.life),this.name=t.name,te(this,"opacity",t.opacity),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=G(t.position.x)),void 0!==t.position.y&&(this.position.y=G(t.position.y))),void 0!==t.size&&this.size.load(t.size),te(this,"destroy",t.destroy),te(this,"orbits",t.orbits))}}const Vi="absorbers";class Bi extends bi{handleClickMode;maxDistance;#y=!1;#m;#v;constructor(t,e){super(t),this.maxDistance=0,this.#v=e,this.#v.initContainer(t),this.handleClickMode=(t,i)=>{const s=this.container,n=s.actualOptions.interactivity.modes.absorbers;if(!n||t!==Vi)return;const{clickPosition:o}=i.mouse;if(o){if(e.getArray(this.container).some(t=>Y(t.position,o)<t.size))return}const a=ut(n)??new Fi;this.#v.addAbsorber(s,a,o)}}clear(){}init(){}interact(t,e){for(const i of this.container.particles.filter(e=>this.isEnabled(t,e)))for(const s of this.#v.getArray(this.container)){if(s.options.draggable){const e=t.mouse;if(e.clicking&&e.downPosition){Y(s.position,e.downPosition)<=s.size&&(this.#y=!0,this.#m=s)}else this.#y=!1,this.#m=void 0;this.#y&&this.#m==s&&e.position&&(s.position.x=e.position.x,s.position.y=e.position.y)}if(s.attract(i,e),i.destroyed)break}}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity).events;return!(!s.clickPosition||!n.onClick.enable)&&ht(Vi,n.onClick.mode)}loadModeOptions(t,...e){t.absorbers??=[];for(const i of e)if(i)if(T(i.absorbers))for(const e of i.absorbers){const i=new Fi;i.load(e),t.absorbers.push(i)}else{const e=new Fi;e.load(i.absorbers),t.absorbers.push(e)}}reset(){}}const Hi=new WeakMap;function qi(t){const e=t.pluginManager;let i=Hi.get(e);return i||(i=Promise.resolve().then(function(){return Br}).then(({AbsorbersInstancesManager:t})=>new t(e)).catch(t=>{throw Hi.delete(e),t}),Hi.set(e,i)),i}class Ui{id="absorbers";#v;constructor(t){this.#v=t}async getPlugin(t){const{AbsorbersPluginInstance:e}=await Promise.resolve().then(function(){return Hr});return new e(t,this.#v)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.absorbers&&(e.absorbers=bt(i.absorbers,t=>{const e=new Fi;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.absorbers;return T(e)?!!e.length:!!e}}async function Wi(t){await async function(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{const e=t.pluginManager,i=await qi(t);e.addPlugin(new Ui(i))})}(t),await async function(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{const e=t.pluginManager,i=await qi(t);Ri(t),e.addInteractor?.("externalAbsorbers",t=>Promise.resolve(new Bi(t,i)))})}(t)}class ji{bottom;left;right;top;load(t){E(t)||(ee(this,"bottom",t.bottom),ee(this,"left",t.left),ee(this,"right",t.right),ee(this,"top",t.top))}}var $i;!function(t){t.explode="explode",t.none="none",t.split="split"}($i||($i={}));class Gi{maxSizeFactor=3;speed=2;load(t){E(t)||(te(this,"maxSizeFactor",t.maxSizeFactor),te(this,"speed",t.speed))}}class Ni extends be{value=3}class Xi extends be{value={min:4,max:9}}class Yi{count=1;factor=new Ni;fillColor;fillColorOffset;particles;rate=new Xi;sizeOffset=!0;strokeColor;strokeColorOffset;load(t){E(t)||(void 0!==t.fillColor&&(this.fillColor=ce.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=ce.create(this.strokeColor,t.strokeColor)),te(this,"count",t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=bt(t.particles,t=>yt({},t)),te(this,"sizeOffset",t.sizeOffset),t.fillColorOffset&&(this.fillColorOffset=this.fillColorOffset??{},void 0!==t.fillColorOffset.h&&(this.fillColorOffset.h=t.fillColorOffset.h),void 0!==t.fillColorOffset.s&&(this.fillColorOffset.s=t.fillColorOffset.s),void 0!==t.fillColorOffset.l&&(this.fillColorOffset.l=t.fillColorOffset.l)),t.strokeColorOffset&&(this.strokeColorOffset=this.strokeColorOffset??{},void 0!==t.strokeColorOffset.h&&(this.strokeColorOffset.h=t.strokeColorOffset.h),void 0!==t.strokeColorOffset.s&&(this.strokeColorOffset.s=t.strokeColorOffset.s),void 0!==t.strokeColorOffset.l&&(this.strokeColorOffset.l=t.strokeColorOffset.l)))}}let Ki=class{bounds=new ji;explode=new Gi;mode=$i.none;split=new Yi;load(t){E(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.explode.load(t.explode),this.split.load(t.split))}};function Qi(t,e,i,s){return t&&s?function(t,e){const i=W(e.h??0),s=W(e.s??0),n=W(e.l??0),o=(t.h+i)%360,a=Math.max(0,Math.min(100,t.s+s)),r=Math.max(0,Math.min(100,t.l+n));return de.create(void 0,{value:{hsl:{h:o<0?o+360:o,s:a,l:r}}})}(s,t):e?de.create(void 0,e):i?de.create(void 0,i):s?function(t){return de.create(void 0,{value:{hsl:t}})}(s):void 0}function Zi(e,i,s,n){const o=s.options.destroy;if(!o)return;const a=o.split,r=Ae(e,i,s.options),l=wt(a.fillColor),c=wt(a.strokeColor),d=s.getFillColor(),h=s.getStrokeColor();r.move.load({center:{x:s.position.x,y:s.position.y,mode:t.PixelMode.precise}});const u=1/W(a.factor.value),p=r.size;p&&(S(p.value)?p.value*=u:(p.value.min*=u,p.value.max*=u)),r.load(n);const g=wt(r.paint),f=g?.fill,y=g?.stroke,m=Qi(a.fillColorOffset,l,f?.color,d),v=Qi(a.strokeColorOffset,c,y?.color,h);m&&f&&(f.color=m),v&&y&&(y.color=v);const b=a.sizeOffset?G(-s.size.value,s.size.value):0,w={x:s.position.x+U(b),y:s.position.y+U(b)};return i.particles.addParticle(w,r,s.group,t=>!(t.size.value<.5)&&(t.velocity.length=U(G(s.velocity.length,t.velocity.length)),t.splitCount=(s.splitCount??0)+1,t.unbreakable=!0,t.unbreakableUntil=performance.now()+500,!0))}class Ji{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options.destroy;if(!i)return;t.exploding=void 0,t.splitCount=0;const s=i.bounds;t.destroyBounds??={};const{bottom:n,left:a,right:r,top:l}=s,{destroyBounds:c}=t,d=e.canvas.size;n&&(c.bottom=W(n)*d.height/o),a&&(c.left=W(a)*d.width/o),r&&(c.right=W(r)*d.width/o),l&&(c.top=W(l)*d.height/o)}isEnabled(t){const e=t;return!e.destroyed||!!e.exploding}loadOptions(t,...e){ne(t,"destroy",Ki,...e)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;switch(i?.mode){case $i.split:!function(t,e,i){const s=i.options.destroy;if(!s)return;const n=s.split;if(n.count>=0){if(void 0===i.splitCount||i.splitCount>n.count)return;i.splitCount++}const o=W(n.rate.value),a=wt(n.particles);for(let s=0;s<o;s++)Zi(t,e,i,a)}(this.#p,this.#u,t);break;case $i.explode:{if(t.exploding){t.destroyed=!1;break}const{explode:e}=i,s=t.size.value,n=s*e.maxSizeFactor,o=t.getOpacity();t.exploding={initialFillOpacity:o.fillOpacity,initialSize:s,initialStrokeOpacity:o.strokeOpacity,maxSize:n,progress:0,speed:Math.max(e.speed,.01)},t.fillOpacity=o.fillOpacity,t.strokeOpacity=o.strokeOpacity,t.destroyed=!1;break}}}update(t,e){if(t.exploding){const i=t.exploding,s=e.factor||1;i.progress=Math.min(1,i.progress+i.speed*s/60);const n=i.progress;return t.size.value=i.initialSize+(i.maxSize-i.initialSize)*n,t.fillOpacity=i.initialFillOpacity*(1-n),t.strokeOpacity=i.initialStrokeOpacity*(1-n),void(n>=1&&(t.exploding=void 0,t.destroy(!0)))}void 0!==t.unbreakableUntil&&performance.now()>=t.unbreakableUntil&&(t.unbreakable=!1,t.unbreakableUntil=void 0);const i=t.getPosition(),s=t.destroyBounds;s&&(void 0!==s.bottom&&i.y>=s.bottom||void 0!==s.left&&i.x<=s.left||void 0!==s.right&&i.x>=s.right||void 0!==s.top&&i.y<=s.top)&&t.destroy()}}async function ts(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("destroy",e=>Promise.resolve(new Ji(t.pluginManager,e)))})}class es{count;delay;duration;wait=!1;load(t){E(t)||(te(this,"count",t.count),ee(this,"delay",t.delay),ee(this,"duration",t.duration),te(this,"wait",t.wait))}}class is{delay=.1;quantity=1;load(t){E(t)||(ee(this,"quantity",t.quantity),ee(this,"delay",t.delay))}}class ss{color=!1;opacity=!1;load(t){E(t)||(te(this,"color",t.color),te(this,"opacity",t.opacity))}}class ns{options={};replace=new ss;type="square";load(t){E(t)||(void 0!==t.options&&(this.options=yt({},t.options??{})),this.replace.load(t.replace),te(this,"type",t.type))}}class os{height=0;mode=t.PixelMode.percent;width=0;load(t){E(t)||(te(this,"mode",t.mode),te(this,"height",t.height),te(this,"width",t.width))}}class as{fill;stroke;load(t){E(t)||(t.fill&&(this.fill??=new fe,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new Oe,this.stroke.load(t.stroke)))}}class rs{autoPlay=!0;direction;domId;fill=!0;life=new es;name;particles;position;rate=new is;shape=new ns;size;spawn=new as;spawnFillColor;spawnStrokeColor;startCount=0;load(t){E(t)||(te(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new os,this.size.load(t.size)),te(this,"direction",t.direction),te(this,"domId",t.domId),te(this,"fill",t.fill),this.life.load(t.life),te(this,"name",t.name),this.particles=bt(t.particles,t=>yt({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=G(t.position.x)),void 0!==t.position.y&&(this.position.y=G(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new de,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new de,this.spawnStrokeColor.load(t.spawnStrokeColor)),te(this,"startCount",t.startCount))}}const ls={count:1,enable:!0},cs="emitters";class ds extends bi{handleClickMode;maxDistance;#v;constructor(t,e){super(e),this.#v=t,this.maxDistance=0,this.handleClickMode=(t,e)=>{const i=this.container.actualOptions.interactivity.modes.emitters;if(!i||t!==cs)return;let s;if(T(i.value)){const t=0,e=i.value.length;if(e>t&&i.random.enable){s=[];const t=new Set;for(let n=0;n<i.random.count;n++){const o=Math.floor(A()*i.value.length);if(t.has(o)&&t.size<e){n--;continue}t.add(o);const a=ut(i.value,o);a&&s.push(a)}}else s=i.value}else s=i.value;const n=s,o=e.mouse.clickPosition;bt(n,async t=>{await this.#v.addEmitter(this.container,t,o)})}}clear(){}init(){}interact(t,e){for(const t of this.#v.getArray(this.container))t.update(e)}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity).events;return!(!s.clickPosition||!n.onClick.enable)&&ht(cs,n.onClick.mode)}loadModeOptions(t,...e){t.emitters={random:ls,value:[]};for(const i of e)if(i?.emitters)if(T(i.emitters))for(const e of i.emitters){const i=new rs;i.load(e),t.emitters.value.push(i)}else if("value"in i.emitters){const e=i.emitters;if(t.emitters.random.enable=e.random?.enable??t.emitters.random.enable,t.emitters.random.count=e.random?.count??t.emitters.random.count,T(e.value))for(const i of e.value){const e=new rs;e.load(i),t.emitters.value.push(e)}else{const i=new rs;i.load(e.value),t.emitters.value.push(i)}}else{const e=new rs;e.load(i.emitters),t.emitters.value.push(e)}}removeEmitter(t){const e=this.#v.getArray(this.container).indexOf(t);e>=0&&this.#v.getArray(this.container).splice(e,1)}reset(){}}async function hs(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return Ur}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}const us=new WeakMap;function ps(t){const e=t.pluginManager;let i=us.get(e);return i||(i=Promise.resolve().then(function(){return Wr}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw us.delete(e),t}),us.set(e,i)),i}class gs{fill;options;position;size;constructor(t,e,i,s){this.position=t,this.size=e,this.fill=i,this.options=s}resize(t,e){this.position=t,this.size=e}}var fs;!function(t){t.emitter="emitter"}(fs||(fs={}));class ys{id="emitters";#v;constructor(t){this.#v=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return jr});return new e(this.#v,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=bt(i.emitters,t=>{const e=new rs;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return T(e)&&!!e.length||void 0!==e}}function ms(t){if(!t.pluginManager.addEmitterShapeGenerator)throw new Error("tsParticles Emitters Plugin is not loaded")}async function vs(t){await async function(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{const e=await ps(t);await hs(t),t.pluginManager.addPlugin(new ys(e))})}(t),await async function(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{const e=await ps(t);Ri(t),await hs(t),t.pluginManager.addInteractor?.("externalEmitters",t=>Promise.resolve(new ds(e,t)))})}(t)}class bs extends gs{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.size,e=this.fill,i=this.position,[s,n]=[t.width*a,t.height*a],o=((t,e)=>{const i=A()*w,s=Math.atan(e/t*Math.tan(u*i)),n=A();return n<w?s:n<.5?Math.PI-s:n<.75?Math.PI+s:-s})(s,n),r=(h=o,(c=s)*(d=n)/Math.sqrt((d*Math.cos(h))**2+(c*Math.sin(h))**2)),l=e?r*Math.sqrt(A()):r;var c,d,h;return{position:{x:i.x+l*Math.cos(o),y:i.y+l*Math.sin(o)}}}}class ws{generate(t,e,i,s,n){return new bs(e,i,s,n)}}async function xs(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{ms(t),t.pluginManager.addEmitterShapeGenerator?.("circle",new ws)})}var Ms;function Ps(t,e){return t+e*(A()-a)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}(Ms||(Ms={}));class ks extends gs{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:Ps(e.x,i.width),y:Ps(e.y,i.height)}};{const t=i.width*a,s=i.height*a,n=function(t){return Math.floor(A()*t)}(4),o=2*(A()-a);switch(n){case Ms.TopLeft:return{position:{x:e.x+o*t,y:e.y-s}};case Ms.TopRight:return{position:{x:e.x-t,y:e.y+o*s}};case Ms.BottomRight:return{position:{x:e.x+o*t,y:e.y+s}};case Ms.BottomLeft:default:return{position:{x:e.x+t,y:e.y+o*s}}}}}}class Cs{generate(t,e,i,s,n){return new ks(e,i,s,n)}}async function Os(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{ms(t),t.plu