@tsparticles/particles
Version:
Minimal tsParticles particles bundle — lightweight particle engine without confetti or fireworks extras. Perfect for pure particle backgrounds. Ready to use components available for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, In
1 lines • 112 kB
JavaScript
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.particles=t.__tsParticlesInternals.bundles.particles||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",a=100,o=.5,r=1e3,l={x:0,y:0,z:0},c={a:1,b:0,c:0,d:1},h="random",d="mid",u=2*Math.PI,p="true",g="false",f="canvas",y=255,m=360,v=100,P=100,w=.25,b=.75;var M;function x(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(M=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",M.bottomLeft="bottom-left",M.bottomRight="bottom-right",M.left="left",M.none="none",M.right="right",M.top="top",M.topLeft="top-left",M.topRight="top-right",M.outside="outside",M.inside="inside";class z{x;y;z;constructor(t=l.x,e=l.y,i=l.z){this.x=t,this.y=e,this.z=i}static get origin(){return z.create(l.x,l.y,l.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return z.create(t.x,t.y,x(t))}static create(t,e,i){return"number"==typeof t?new z(t,e??l.y,i??l.z):new z(t.x,t.y,x(t))}add(t){return z.create(this.x+t.x,this.y+t.y,this.z+x(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=x(t)}copy(){return z.clone(this)}div(t){return z.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return z.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return z.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),l.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=x(t)}sub(t){return z.create(this.x-t.x,this.y-t.y,this.z-x(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=x(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class k extends z{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return k.create(l.x,l.y)}static clone(t){return k.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new k(t,e??l.y):new k(t.x,t.y)}}function C(t){return"boolean"==typeof t}function O(t){return"string"==typeof t}function S(t){return"number"==typeof t}function D(t){return"object"==typeof t&&null!==t}function I(t){return Array.isArray(t)}function T(t){return null==t}const _=Math.PI/180;let R=Math.random;const L={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function E(){return V(R(),0,1-Number.EPSILON)}function A(t,e){return E()*(e-t)+t}function F(t){return L.nextFrame(t)}function B(t){L.cancel(t)}function V(t,e,i){return Math.min(Math.max(t,e),i)}function U(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function H(t){const e=$(t);let i=W(t);return e===i&&(i=0),A(i,e)}function q(t){return S(t)?t:H(t)}function W(t){return S(t)?t:t.min}function $(t){return S(t)?t:t.max}function G(t,e){if(t===e||void 0===e&&S(t))return t;const i=W(t),s=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:G(i,s)}function N(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function j(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function X(t,e){return Math.sqrt(j(t,e))}function Y(t,e,i){return j(t,e)<=i*i}function Q(t){return t*_}function Z(e,i,s){if(S(e))return Q(e);switch(e){case t.MoveDirection.top:return-Math.PI*o;case t.MoveDirection.topRight:return-Math.PI*w;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*w;case t.MoveDirection.bottom:return Math.PI*o;case t.MoveDirection.bottomLeft:return Math.PI*b;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*b;case t.MoveDirection.inside:return Math.atan2(s.y-i.y,s.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-s.y,i.x-s.x);default:return E()*u}}function K(t){const e=k.origin;return e.length=1,e.angle=t,e}function J(t,e,i,s){return k.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function tt(t){return{x:(t.position?.x??E()*a)*t.size.width/a,y:(t.position?.y??E()*a)*t.size.height/a}}function et(t){const{position:e,size:i}=t;return{x:e?.x??E()*i.width,y:e?.y??E()*i.height}}function it(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1}var st,nt;t.OutModeDirection=void 0,(st=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",st.left="left",st.right="right",st.top="top",t.PixelMode=void 0,(nt=t.PixelMode||(t.PixelMode={})).precise="precise",nt.percent="percent";function at(){return globalThis.document}function ot(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function rt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function lt(t,e){return t===e||I(e)&&e.includes(t)}function ct(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(E()*t.length)]}function ht(t,e,i,s,n){return dt(ut(t,s??0),e,i,n)}function dt(e,i,s,n){let a=!0;return n&&n!==t.OutModeDirection.bottom||(a=e.top<i.height+s.x),!a||n&&n!==t.OutModeDirection.left||(a=e.right>s.x),!a||n&&n!==t.OutModeDirection.right||(a=e.left<i.width+s.y),!a||n&&n!==t.OutModeDirection.top||(a=e.bottom>s.y),a}function ut(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function pt(t,...e){for(const i of e){if(T(i))continue;if(!D(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):D(t)&&!Array.isArray(t)||(t={});const e=Object.keys(i),s=new Set(["__proto__","constructor","prototype"]);if(!e.some(t=>{const e=i[t];return D(e)||Array.isArray(e)})){const n=i,a=t;for(const t of e)if(!s.has(t)&&t in n){const e=n[t];void 0!==e&&(a[t]=e)}continue}for(const n of e){if(s.has(n))continue;const e=t,a=i[n];e[n]=Array.isArray(a)?a.map(t=>pt(void 0,t)):pt(e[n],a)}}return t}function gt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:k.create(q(t.options.bounce.horizontal.value),q(t.options.bounce.vertical.value))}}function ft(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=N(a,n);if(i*o+s*r<0)return;const l=-Math.atan2(r,o),c=t.mass,h=e.mass,d=t.velocity.rotate(l),u=e.velocity.rotate(l),p=J(d,u,c,h),g=J(u,d,c,h),f=p.rotate(-l),y=g.rotate(-l);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=y.x*e.factor.x,e.velocity.y=y.y*e.factor.y}function yt(t,e){return I(t)?t.map((t,i)=>e(t,i)):e(t,0)}function mt(t,e,i){return I(t)?ct(t,e,i):t}function vt(e,i){return function(e,i){if(e.mode!==t.PixelMode.percent){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/a*i.width,y:e.y/a*i.height}:{width:e.width/a*i.width,height:e.height/a*i.height}}(e,i)}function Pt(t){const e=at().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||T(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}let wt,bt;function Mt(t){if(wt!==t||!bt){wt=t;const e=at().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}bt=e}return bt}function xt(t,e,i,s,n){if(s){let s={passive:!0};C(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function zt(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,n)),n}async function kt(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class Ct{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var Ot;t.EventType=void 0,(Ot=t.EventType||(t.EventType={})).configAdded="configAdded",Ot.containerInit="containerInit",Ot.particlesSetup="particlesSetup",Ot.containerStarted="containerStarted",Ot.containerStopped="containerStopped",Ot.containerDestroyed="containerDestroyed",Ot.containerPaused="containerPaused",Ot.containerPlay="containerPlay",Ot.containerBuilt="containerBuilt",Ot.particleAdded="particleAdded",Ot.particleDestroyed="particleDestroyed",Ot.particleRemoved="particleRemoved";class St{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#s.set(i,e),this.#n.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return kt(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return kt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return zt(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#a,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#a,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const Dt=t=>(...e)=>{t(...e)},It={debug:Dt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:Dt(console.info),log:Dt(console.log),trace:Dt(console.trace),verbose:Dt(console.log),warning:Dt(console.warn)};function Tt(){return It}const _t="100%";class Rt{pluginManager=new St(this);#h=[];#d=new Ct;#o=!1;get items(){return this.#h}get version(){return"4.2.1"}addEventListener(t,e){this.#d.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#d.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return Zs}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*E()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=mt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Tt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=mt(r,a),{items:c}=this,h=c.findIndex(t=>t.id.description===n),d=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,d)}else c.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=at();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)s=t,s.dataset[e]??=g,s.dataset[e]===p&&(s.style.width||=_t,s.style.height||=_t,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(f).item(0);n?(s=n,s.dataset[e]=g):(s=i.createElement(f),s.dataset[e]=p,t.appendChild(s)),s.style.width||=_t,s.style.height||=_t,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=at();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}var Lt,Et,At,Ft,Bt,Vt,Ut,Ht,qt,Wt,$t;!function(t){t.circle="circle",t.rectangle="rectangle"}(Lt||(Lt={}));class Gt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Nt extends Gt{radius;constructor(t,e,i){super(t,e,Lt.circle),this.radius=i}contains(t){return Y(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Nt||t.type===Lt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof jt||t.type===Lt.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(n-i,2)+Math.pow(a-o,2)<=s**2||n<=s+i&&a<=s+o||n<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class jt extends Gt{size;constructor(t,e,i,s){super(t,e,Lt.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof Nt)return t.intersects(this);if(!(t instanceof jt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,o=a.width,r=a.height;return n.x<s.x+e&&n.x+o>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}t.RotateDirection=void 0,(Et=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Et.counterClockwise="counter-clockwise",Et.random="random",t.AnimationMode=void 0,(At=t.AnimationMode||(t.AnimationMode={})).auto="auto",At.increase="increase",At.decrease="decrease",At.random="random",t.LimitMode=void 0,(Ft=t.LimitMode||(t.LimitMode={})).delete="delete",Ft.wait="wait",t.OutMode=void 0,(Bt=t.OutMode||(t.OutMode={})).bounce="bounce",Bt.none="none",Bt.out="out",Bt.destroy="destroy",Bt.split="split",t.AlterType=void 0,(Vt=t.AlterType||(t.AlterType={})).darken="darken",Vt.enlighten="enlighten",t.DestroyType=void 0,(Ut=t.DestroyType||(t.DestroyType={})).none="none",Ut.max="max",Ut.min="min",t.GradientType=void 0,(Ht=t.GradientType||(t.GradientType={})).linear="linear",Ht.radial="radial",Ht.random="random",t.ParticleOutType=void 0,(qt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",qt.inside="inside",qt.outside="outside",t.StartValueType=void 0,(Wt=t.StartValueType||(t.StartValueType={})).max="max",Wt.min="min",Wt.random="random",t.AnimationStatus=void 0,($t=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",$t.decreasing="decreasing";class Xt{load(t){T(t)||this.doLoad(t)}}function Yt(t,...e){for(const i of e)t.load(i)}function Qt(t,e,i){void 0!==i&&(t[e]=i)}function Zt(t,e,i){void 0!==i&&(t[e]=G(i))}function Kt(t,e,i){void 0!==i&&t[e].load(i)}function Jt(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function te(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class ee extends Xt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Zt(this,"count",t.count),Qt(this,"enable",t.enable),Zt(this,"speed",t.speed),Zt(this,"decay",t.decay),Zt(this,"delay",t.delay),Qt(this,"sync",t.sync)}}class ie extends ee{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),Qt(this,"mode",t.mode),Qt(this,"startValue",t.startValue)}}class se extends ee{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Qt(this,"max",t.max),Qt(this,"min",t.min),Zt(this,"offset",t.offset)}}class ne extends Xt{h=new se(0,m);l=new se(0,P);s=new se(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class ae extends Xt{value="";static create(t,e){const i=new ae;return i.load(t),void 0!==e&&(O(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){T(t.value)||(this.value=t.value)}}class oe extends ae{animation=new ne;static create(t,e){const i=new oe;return i.load(t),void 0!==e&&(O(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class re extends Xt{color;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new ae,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=ae.create(this.color,t.color)),Qt(this,"image",t.image),Qt(this,"position",t.position),Qt(this,"repeat",t.repeat),Qt(this,"size",t.size),Qt(this,"opacity",t.opacity)}}class le extends Xt{enable=!0;zIndex=0;doLoad(t){Qt(this,"enable",t.enable),Qt(this,"zIndex",t.zIndex)}}class ce extends Xt{delay=.5;enable=!0;doLoad(t){Qt(this,"delay",t.delay),Qt(this,"enable",t.enable)}}class he extends Xt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=pt(this.options[t]??{},i))}Qt(this,"close",t.close),Qt(this,"type",t.type)}}class de extends Xt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=oe.create(this.color,t.color)),Qt(this,"enable",t.enable),Zt(this,"opacity",t.opacity)}}class ue extends Xt{offset=0;value=90;doLoad(t){Zt(this,"offset",t.offset),Zt(this,"value",t.value)}}class pe extends Xt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){Qt(this,"x",t.x),Qt(this,"y",t.y),Qt(this,"mode",t.mode),Qt(this,"radius",t.radius)}}class ge extends Xt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Zt(this,"acceleration",t.acceleration),Qt(this,"enable",t.enable),Qt(this,"inverse",t.inverse),Zt(this,"maxSpeed",t.maxSpeed)}}class fe extends Xt{value=0;doLoad(t){T(t.value)||(this.value=G(t.value))}}class ye extends fe{animation=new ee;doLoad(t){super.doLoad(t),Kt(this,"animation",t.animation)}}class me extends ye{animation=new ie}class ve extends Xt{clamp=!0;delay=new fe;enable=!1;generator;options={};doLoad(t){Qt(this,"clamp",t.clamp),this.delay.load(t.delay),Qt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=pt(this.options,t.options))}}class Pe extends Xt{bottom;default=t.OutMode.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class we extends Xt{acceleration=0;enable=!1;position;doLoad(t){Zt(this,"acceleration",t.acceleration),Qt(this,"enable",t.enable),t.position&&(this.position=pt({},t.position))}}class be extends Xt{angle=new ue;center=new pe;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new ge;outModes=new Pe;path=new ve;random=!1;size=!1;speed=2;spin=new we;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Zt(this,"decay",t.decay),Qt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Zt(this,"drift",t.drift),Qt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(D(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Qt(this,"random",t.random),Qt(this,"size",t.size),Zt(this,"speed",t.speed),this.spin.load(t.spin),Qt(this,"straight",t.straight),Qt(this,"vibrate",t.vibrate),Qt(this,"warp",t.warp)}}class Me extends Xt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=oe.create(this.color,t.color)),Zt(this,"width",t.width),Zt(this,"opacity",t.opacity)}}class xe extends Xt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=oe.create(this.color,t.color)),Jt(this,"fill",t.fill,()=>new de),Jt(this,"stroke",t.stroke,()=>new Me)}}class ze extends fe{value=1}class ke extends Xt{horizontal=new ze;vertical=new ze;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Ce extends Xt{enable=!1;height=1080;width=1920;doLoad(t){Qt(this,"enable",t.enable),Qt(this,"width",t.width),Qt(this,"height",t.height)}}class Oe extends Xt{mode=t.LimitMode.delete;value=0;doLoad(t){Qt(this,"mode",t.mode),Qt(this,"value",t.value)}}class Se extends Xt{density=new Ce;limit=new Oe;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Qt(this,"value",t.value)}}class De extends Xt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=pt(this.options[t]??{},i))}Qt(this,"close",t.close),Qt(this,"type",t.type)}}class Ie extends fe{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Qt(this,"opacityRate",t.opacityRate),Qt(this,"sizeRate",t.sizeRate),Qt(this,"velocityRate",t.velocityRate)}}class Te extends Xt{bounce=new ke;effect=new he;groups={};move=new be;number=new Se;paint;palette;reduceDuplicates=!1;shape=new De;zIndex=new Ie;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new xe,this.paint.color=new oe,this.paint.color.value="#fff",this.paint.fill=new de,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#g(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=pt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(I(e)?this.paint=yt(e,t=>{const e=new xe;return e.load(t),e}):I(this.paint)?(this.paint=new xe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#g(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(I(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function _e(t,e,...i){const s=new Te(t,e);return Yt(s,...i),s}class Re extends Xt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new re,this.fullScreen=new le,this.particles=_e(this.#p,this.#u),this.resize=new ce}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,yt(this.preset,t=>{this.#f(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#g(this.palette)),Qt(this,"autoPlay",t.autoPlay),Qt(this,"clear",t.clear),Qt(this,"key",t.key),Qt(this,"name",t.name),Zt(this,"delay",t.delay),Qt(this,"detectRetina",t.detectRetina),Zt(this,"duration",t.duration),Qt(this,"fpsLimit",t.fpsLimit),Qt(this,"hdr",t.hdr),Qt(this,"pauseOnBlur",t.pauseOnBlur),Qt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Qt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;C(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=pt(this.style,t.style),Qt(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#g(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#f(t){this.load(this.#p.getPreset(t))}}const Le=new Map;function Ee(t,e){let i=Le.get(t);return i||(i=e(),Le.size>2e3&&Le.clear(),Le.set(t,i)),i}function Ae(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Fe(t,e,i,s=!0){if(!e)return;const n=O(e)?{value:e}:e;if(O(n.value))return Be(t,n.value,i,s);if(I(n.value)){const e=ct(n.value,i,s);if(!e)return;return Fe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Be(t,e,i,s=!0){if(!e)return;const n=O(e)?{value:e}:e;if(O(n.value))return n.value===h?Ge():He(t,n.value);if(I(n.value)){const e=ct(n.value,i,s);if(!e)return;return Be(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ve(t,e,i,s=!0){const n=Fe(t,e,i,s);return n?Ue(n):void 0}function Ue(t){const e=t.r/y,i=t.g/y,s=t.b/y,n=Math.max(e,i,s),a=Math.min(e,i,s),r={h:0,l:(n+a)*o,s:0};return n!==a&&(r.s=r.l<o?(n-a)/(n+a):(n-a)/(2-n-a),r.h=e===n?(i-s)/(n-a):i===n?2+(s-e)/(n-a):4+(e-i)/(n-a)),r.l*=P,r.s*=v,r.h*=60,r.h<0&&(r.h+=m),r.h>=m&&(r.h-=m),r}function He(t,e){return Ae(t,e)}function qe(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function We(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(P,t.l)),n=e/m,a=i/v,r=s/P;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const l=r<o?r*(1+a):r+a-r*a,c=2*r-l,h=1/3,d=Math.min(y,y*qe(c,l,n+h)),u=Math.min(y,y*qe(c,l,n)),p=Math.min(y,y*qe(c,l,n-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function $e(t){const e=We(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Ge(t){const e=t??0,i=()=>Math.floor(A(e,256));return{b:i(),g:i(),r:i()}}function Ne(t,e,i){const s=i??1;return Ee(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/y*s).toString()} ${(t.g/y*s).toString()} ${(t.b/y*s).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function je(t,e,i){const s=i??1;return Ee(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?Ne(We(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${s.toString()})`)}function Xe(t,e,i,s){let n=t,a=e;return"r"in n||(n=We(t)),"r"in a||(a=We(e)),{b:U(n.b,a.b,i,s),g:U(n.g,a.g,i,s),r:U(n.r,a.r,i,s)}}function Ye(t,e,i){if(i===h)return Ge();if(i!==d)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return Xe(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return We(t)}}}function Qe(t,e,i,s){const n=O(e)?e:e.value;return n===h?s?Fe(t,{value:n}):i?h:d:n===d?d:Fe(t,{value:n})}function Ze(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Ke(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:m},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:P}};return e&&(Je(s.h,e.h,i),Je(s.s,e.s,i),Je(s.l,e.l,i)),s}function Je(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=q(i.speed)/a*s,e.decay=1-q(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=q(i.count),e.time=0,e.delayTime=q(i.delay)*r,i.sync||(e.velocity*=E(),e.value*=E()),e.initialValue=e.value,e.offset=G(i.offset)):e.velocity=0}function ti(e,i,s){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const n=e.offset?H(e.offset):0,a=(e.velocity??0)*s.factor+3.6*n,o=e.decay??1,r=e.max,l=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=a,e.value<l&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=a,e.value>r&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=r)),e.velocity&&1!==o&&(e.velocity*=o),e.value=V(e.value,l,r)}function ei(t,e){if(!t)return;const{h:i,s:s,l:n}=t;ti(i,!1,e),ti(s,!0,e),ti(n,!0,e)}function ii(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const si=new Rt,ni=new Map;async function ai(t,e,i,s){const n=ni.get(e);if(n instanceof Promise)return n;if(n){if(!n.destroyed)return n;ni.delete(e)}const a=(async()=>{const n=function(t,e){return{fullScreen:{enable:!e},particles:{number:{value:t.count??80},color:{value:t.color??"#fff"},links:{enable:t.links??!1,color:t.linksColor??"#fff",distance:t.linksLength??100},collisions:{enable:t.collisions??!1},move:{enable:!0,speed:t.speed??3},opacity:{value:t.opacity??1},shape:{type:t.shape??"circle"},size:{value:t.radius??3}}}}(i,s),a=await t.load({id:e,element:s,options:n});if(!a)return void ni.delete(e);const{ParticlesInstance:o}=await Promise.resolve().then(function(){return Ks}),r=new o(a,e);return ni.set(e,r),r})();return ni.set(e,a),a}class oi{enable=!1;mode="destination-out";load(t){T(t)||(Qt(this,"mode",t.mode),Qt(this,"enable",t.enable))}}class ri{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Js});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new oi),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new oi,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function li(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new ri)})}class ci{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(l.x,l.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=D(s)?{min:Q(s.min),max:Q(s.max)}:{min:0,max:Q(s)}}}async function hi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new ci))})}var di;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(di||(di={}));const ui=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,pi=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class gi{accepts(t){return t.startsWith("#")}handleColor(t){return this.#y(t.value)}handleRangeColor(t){return this.#y(t.value)}parseString(t){return this.#y(t)}#y(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(ui,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=pi.exec(e);return i?{a:i[di.a]?Number.parseInt(i[di.a],16)/255:1,b:Number.parseInt(i[di.b]??"0",16),g:Number.parseInt(i[di.g]??"0",16),r:Number.parseInt(i[di.r]??"0",16)}:void 0}}async function fi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new gi)})}var yi;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(yi||(yi={}));const mi=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class vi{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return We(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return We({h:q(e.h),l:q(e.l),s:q(e.s)})}parseString(t){if(!this.accepts(t))return;const e=mi.exec(t);return e?$e({a:e.length>4?it(e[yi.a]):1,h:Number.parseInt(e[yi.h]??"0",10),l:Number.parseInt(e[yi.l]??"0",10),s:Number.parseInt(e[yi.s]??"0",10)}):void 0}}async function Pi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new vi)})}class wi{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return en});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function bi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,kt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new wi(t.pluginManager))})}function Mi(e,i){const s=e.value,n=e.animation,a={delayTime:q(n.delay)*r,enable:n.enable,value:q(e.value)*i,max:$(s)*i,min:W(s)*i,loops:0,maxLoops:q(n.count),time:0};if(n.enable){switch(a.decay=1-q(n.decay),n.mode){case t.AnimationMode.increase:a.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:a.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:a.status=E()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:a.value=a.min,e&&(a.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:a.value=a.max,e&&(a.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:a.value=H(a),e&&(a.status=E()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function xi(e,i,s,n,a){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const o=(i.velocity??0)*a.factor,r=i.min,l=i.max,c=i.decay??1;i.time??=0;const h=i.delayTime??0;if(!(h>0&&i.time<h&&(i.time+=a.value,i.time<h))){switch(i.status){case t.AnimationStatus.increasing:i.value+=o;break;case t.AnimationStatus.decreasing:i.value-=o}switch(i.velocity&&1!==c&&(i.velocity*=c),i.status){case t.AnimationStatus.increasing:i.value>=l&&(i.status=t.AnimationStatus.decreasing,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(i.status=t.AnimationStatus.increasing,i.loops??=0,i.loops++)}!function(e,i,s,n,a){switch(i){case t.DestroyType.max:s>=a&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,l),e.destroyed||(i.value=V(i.value,r,l))}}class zi extends ie{destroy=t.DestroyType.none;load(t){super.load(t),T(t)||Qt(this,"destroy",t.destroy)}}class ki extends me{animation=new zi;value=1;load(t){if(T(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Ci{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Mi(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=q(i.speed)/a*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=E()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){te(t,"opacity",ki,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&xi(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function Oi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Ci(t)))})}class Si{modes;#u;#m;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#m=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;let o=!1;for(const t of this.#m)if(o=t.particleBounce?.(e,s,i)??!1,o)break;if(o)return;const r=e.getPosition(),l=e.offset,c=e.getRadius(),h=ut(r,c),d=a.canvas.size,u=!e.isInsideCanvasForOutMode(n,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.left&&e.direction!==t.OutModeDirection.right)return;e.bounds.right<0&&e.direction===t.OutModeDirection.left?e.particle.position.x=e.size+e.offset.x:e.bounds.left>e.canvasSize.width&&e.direction===t.OutModeDirection.right&&(e.particle.position.x=e.canvasSize.width-e.size-e.offset.x);const i=e.particle.velocity.x;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.right&&i>0||e.direction===t.OutModeDirection.left&&i<0)){const t=q(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,s=!0}if(!s)return;const n=e.offset.x+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-n:e.outOfCanvas&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:d,offset:l,outOfCanvas:u,size:c}),function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.bottom&&e.direction!==t.OutModeDirection.top)return;e.bounds.bottom<0&&e.direction===t.OutModeDirection.top?e.particle.position.y=e.size+e.offset.y:e.bounds.top>e.canvasSize.height&&e.direction===t.OutModeDirection.bottom&&(e.particle.position.y=e.canvasSize.height-e.size-e.offset.y);const i=e.particle.velocity.y;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.bottom&&i>0||e.direction===t.OutModeDirection.top&&i<0)){const t=q(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,s=!0}if(!s)return;const n=e.offset.y+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-n:e.outOfCanvas&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:d,offset:l,outOfCanvas:u,size:c})}}class Di{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(this.modes.includes(n)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(n,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=N(e.position,e.moveCenter),{x:s,y:n}=e.velocity;if(s<0&&t>e.moveCenter.radius||n<0&&i>e.moveCenter.radius||s>=0&&t<-e.moveCenter.radius||n>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class Ii{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,s,n){if(!this.modes.includes(n))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const a=e.options.move.gravity,o=this.#u,r=o.canvas.size,c=e.getRadius();if(a.enable){const s=e.position;(!a.inverse&&s.y>r.height+c&&i===t.OutModeDirection.bottom||a.inverse&&s.y<-c&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+c||e.velocity.y<0&&e.position.y>=-c||e.velocity.x>0&&e.position.x<=r.width+c||e.velocity.x<0&&e.position.x>=-c)return;ht(e.position,o.canvas.size,l,c,i)||e.destroy()}}}const Ti=k.origin;class _i{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;Ti.setTo(l),Ti.length=e.moveCenter.radius,Ti.angle=e.velocity.angle+Math.PI,Ti.addTo(e.moveCenter);const{dx:s,dy:n}=N(e.position,Ti);if(t<=0&&s>=0||i<=0&&n>=0||t>=0&&s<=0||i>=0&&n<=0)return;e.position.x=Math.floor(H({min:0,max:a.canvas.size.width})),e.position.y=Math.floor(H({min:0,max:a.canvas.size.height}));const{dx:o,dy:r}=N(e.position,e.moveCenter);e.direction=Math.atan2(-r,-o),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(e.isInsideCanvasForOutMode(n,i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor(H({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(H({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=N(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction),e.justWarped=!0;break}case t.ParticleOutType.normal:{const s=e.options.move.warp,n=a.canvas.size,o={bottom:n.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:n.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),l=ut(e.position,r);i===t.OutModeDirection.right&&l.left>n.width+e.offset.x?(e.position.x=o.left,e.initialPosition.x=e.position.x,s||(e.position.y=E()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0):i===t.OutModeDirection.left&&l.right<-e.offset.x&&(e.position.x=o.right,e.initialPosition.x=e.position.x,s||(e.position.y=E()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0),i===t.OutModeDirection.bottom&&l.top>n.height+e.offset.y?(s||(e.position.x=E()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.top,e.initialPosition.y=e.position.y,e.justWarped=!0):i===t.OutModeDirection.top&&l.bottom<-e.offset.y&&(s||(e.position.x=E()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0);break}}}}}class Ri{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#v(e,t.OutMode.bounce,t=>new Si(t)),this.#v(e,t.OutMode.out,t=>new _i(t)),this.#v(e,t.OutMode.destroy,t=>new Di(t)),this.#v(e,t.OutMode.none,t=>new Ii(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#P(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#P(e,i,s.left??s.default,t.OutModeDirection.left),this.#P(e,i,s.right??s.default,t.OutModeDirection.right),this.#P(e,i,s.top??s.default,t.OutModeDirection.top)}#v(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#P(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function Li(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Ri(t)))})}class Ei{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=mt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=oe.create(void 0===a?void 0:oe.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=q(o.opacity),t.fillAnimation=i.animation;const s=Ve(this.#p,i);s&&(t.fillColor=Ke(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=oe.create(void 0===a?void 0:oe.create(void 0,a),r.color);t.strokeWidth=q(r.width)*e.retina.pixelRatio,t.strokeOpacity=q(r.opacity??1),t.strokeAnimation=i.animation;const s=Ve(this.#p,i)??t.getFillColor();s&&(t.strokeColor=Ke(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(ei(t.fillColor,e),ei(t.strokeColor,e))}}async function Ai(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Ei(t.pluginManager,e)))})}var Fi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Fi||(Fi={}));const Bi=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Vi{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:q(e.r),g:q(e.g),b:q(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Bi.exec(t);return e?{a:e.length>4?it(e[Fi.a]):1,b:parseInt(e[Fi.b]??"0",10),g:parseInt(e[Fi.g]??"0",10),r:parseInt(e[Fi.r]??"0",10)}:void 0}}async function Ui(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Vi)})}class Hi extends ie{destroy=t.DestroyType.none;load(t){super.load(t),T(t)||Qt(this,"destroy",t.destroy)}}class qi extends me{animation=new Hi;value=3;load(t){if(super.load(t),T(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Wi{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/a*e.retina.reduceFactor,s.sync||(t.size.velocity*=E()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){te(t,"size",qi,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Mi(i,e),t.retina.sizeAnimationSpeed=q(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&xi(t,t.size,0,t.options.size.animation.destroy,e)}}async function $i(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Wi(t)))})}async function Gi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{await Promise.all([li(t),fi(t),Pi(t),Ui(t),bi(t),hi(t),Ai(t),Oi(t),Li(t),$i(t)])})}class Ni{enable=!1;mode=[];load(t){T(t)||(Qt(this,"enable",t.enable),Qt(this,"mode",t.mode))}}var ji,Xi,Yi;!function(t){t.circle="circle",t.rectangle="rectangle"}(ji||(ji={}));class Qi{enable=!1;mode=[];selectors=[];type=ji.circle;load(t){T(t)||(Qt(this,"selectors",t.selectors),Qt(this,"enable",t.enable),Qt(this,"mode",t.mode),Qt(this,"type",t.type))}}class Zi{enable=!1;mode=[];load(t){T(t)||(Qt(this,"enable",t.enable),Qt(this,"mode",t.mode))}}class Ki{onClick=new Ni;onDiv=new Qi;onHover=new Zi;load(t){if(T(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=yt(e,t=>{const e=new Qi;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(Xi||(Xi={}));class Ji{#u;#p;constructor(t,e){this.#p=t,this.#u=e}load(t){if(T(t))return;if(!this.#u)return;const e=this.#p.interactors?.get(this.#u);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class ts{detectsOn=Xi.window;events=new Ki;modes;constructor(t,e){this.modes=new Ji(t,e)}load(t){if(T(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class es{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return an});return new e(this.#p,t)}l