@tsparticles/slim 4.3.0 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -9
- package/browser/index.js +1 -1
- package/browser/index.lazy.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.lazy.js +1 -1
- package/esm/index.js +1 -1
- package/esm/index.lazy.js +1 -1
- package/package.json +29 -29
- package/tsparticles.slim.bundle.js +41 -41
- package/tsparticles.slim.bundle.min.js +1 -1
- package/tsparticles.slim.js +2 -2
- package/tsparticles.slim.min.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.slim=t.__tsParticlesInternals.bundles.slim||{}))}(this,function(t){"use strict";const e="generated",i="source-over",n="resize",s="visibilitychange",a=100,o=.5,r=1e3,c={x:0,y:0,z:0},l={a:1,b:0,c:0,d:1},d="random",h="mid",u=2*Math.PI,p="true",g="false",f="canvas",m=255,y=360,v=100,b=100,w=.25,x=.75,M=400;var P;function k(t){return"z"in t?t.z:c.z}t.MoveDirection=void 0,(P=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",P.bottomLeft="bottom-left",P.bottomRight="bottom-right",P.left="left",P.none="none",P.right="right",P.top="top",P.topLeft="top-left",P.topRight="top-right",P.outside="outside",P.inside="inside";class C{x;y;z;constructor(t=c.x,e=c.y,i=c.z){this.x=t,this.y=e,this.z=i}static get origin(){return C.create(c.x,c.y,c.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return C.create(t.x,t.y,k(t))}static create(t,e,i){return"number"==typeof t?new C(t,e??c.y,i??c.z):new C(t.x,t.y,k(t))}add(t){return C.create(this.x+t.x,this.y+t.y,this.z+k(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=k(t)}copy(){return C.clone(this)}div(t){return C.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return C.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return C.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),c.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=k(t)}sub(t){return C.create(this.x-t.x,this.y-t.y,this.z-k(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=k(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class D extends C{constructor(t=c.x,e=c.y){super(t,e,c.z)}static get origin(){return D.create(c.x,c.y)}static clone(t){return D.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new D(t,e??c.y):new D(t.x,t.y)}}function O(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 R(t){return null==t}const E=Math.PI/180;let L=Math.random;const _={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function F(){return H(L(),0,1-Number.EPSILON)}function A(t,e){return F()*(e-t)+t}function B(t){return _.nextFrame(t)}function V(t){_.cancel(t)}function H(t,e,i){return Math.min(Math.max(t,e),i)}function U(t,e,i,n){return Math.floor((t*i+e*n)/(i+n))}function q(t){const e=$(t);let i=j(t);return e===i&&(i=0),A(i,e)}function W(t){return S(t)?t:q(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),n=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(n,e)}:G(i,n)}function N(t,e){const i=t.x-e.x,n=t.y-e.y;return{dx:i,dy:n,distance:Math.hypot(i,n)}}function X(t,e){const i=t.x-e.x,n=t.y-e.y;return i*i+n*n}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*E}function Z(e,i,n){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*x;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*x;case t.MoveDirection.inside:return Math.atan2(n.y-i.y,n.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-n.y,i.x-n.x);default:return F()*u}}function J(t){const e=D.origin;return e.length=1,e.angle=t,e}function tt(t,e,i,n){return D.create(t.x*(i-n)/(i+n)+2*e.x*n/(i+n),t.y)}function et(t){return{x:(t.position?.x??F()*a)*t.size.width/a,y:(t.position?.y??F()*a)*t.size.height/a}}function it(t){const{position:e,size:i}=t;return{x:e?.x??F()*i.width,y:e?.y??F()*i.height}}function nt(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1}var st,at;t.OutModeDirection=void 0,(st=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",st.left="left",st.right="right",st.top="top",t.PixelMode=void 0,(at=t.PixelMode||(t.PixelMode={})).precise="precise",at.percent="percent";function ot(){return globalThis.document}function rt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function ct(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function lt(t,e){return t===e||T(e)&&e.includes(t)}function dt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(F()*t.length)]}function ht(t,e,i,n,s){return ut(pt(t,n??0),e,i,s)}function ut(e,i,n,s){let a=!0;return s&&s!==t.OutModeDirection.bottom||(a=e.top<i.height+n.x),!a||s&&s!==t.OutModeDirection.left||(a=e.right>n.x),!a||s&&s!==t.OutModeDirection.right||(a=e.left<i.width+n.y),!a||s&&s!==t.OutModeDirection.top||(a=e.bottom>n.y),a}function pt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function gt(t,...e){for(const i of e){if(R(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 n=i,s=t;for(const t of e){if("__proto__"===t||"constructor"===t||"prototype"===t)continue;const e=n[t];void 0!==e&&(s[t]=e)}continue}for(const n of e){if("__proto__"===n||"constructor"===n||"prototype"===n)continue;const e=t,s=i[n];e[n]=Array.isArray(s)?s.map(t=>gt(void 0,t)):gt(e[n],s)}}return t}function ft(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:D.create(W(t.options.bounce.horizontal.value),W(t.options.bounce.vertical.value))}}function mt(t,e){const{x:i,y:n}=t.velocity.sub(e.velocity),[s,a]=[t.position,e.position],{dx:o,dy:r}=N(a,s);if(i*o+n*r<0)return;const c=-Math.atan2(r,o),l=t.mass,d=e.mass,h=t.velocity.rotate(c),u=e.velocity.rotate(c),p=tt(h,u,l,d),g=tt(u,h,l,d),f=p.rotate(-c),m=g.rotate(-c);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=m.x*e.factor.x,e.velocity.y=m.y*e.factor.y}function yt(t,e){return T(t)?t.map((t,i)=>e(t,i)):e(t,0)}function vt(t,e,i){return T(t)?dt(t,e,i):t}function bt(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 wt(t){const e=ot().createElement("div").style;for(const i in t){const n=t[i];if(!(i in t)||R(n))continue;const s=t.getPropertyValue?.(n);if(!s)continue;const a=t.getPropertyPriority?.(n);a?e.setProperty(n,s,a):e.setProperty(n,s)}return e}let xt,Mt;function Pt(t){if(xt!==t||!Mt){xt=t;const e=ot().createElement("div").style,i=10,n={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in n){const i=n[t];void 0!==i&&e.setProperty(t,i)}Mt=e}return Mt}function kt(t,e,i,n,s){if(n){let n={passive:!0};O(s)?n.capture=s:void 0!==s&&(n=s),t.addEventListener(e,i,n)}else{const n=s;t.removeEventListener(e,i,n)}}async function Ct(t,e,i,n=!1){let s=e.get(t);return s&&!n||(s=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,s)),s}async function Dt(t,e,i,n=!1){let s=e.get(t);if(!s||n){const n=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));s=new Map(n),e.set(t,s)}return s}class Ot{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const n=i.length,s=i.indexOf(e);s<0||(1===n?this.#e.delete(t):i.splice(s,1))}}var zt;t.EventType=void 0,(zt=t.EventType||(t.EventType={})).configAdded="configAdded",zt.containerInit="containerInit",zt.particlesSetup="particlesSetup",zt.containerStarted="containerStarted",zt.containerStopped="containerStopped",zt.containerDestroyed="containerDestroyed",zt.containerPaused="containerPaused",zt.containerPlay="containerPlay",zt.containerBuilt="containerBuilt",zt.particleAdded="particleAdded",zt.particleDestroyed="particleDestroyed",zt.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;#n=new Map;#s;#a=new Set;#o=!1;#r=!1;#c=new Set;constructor(t){this.#s=t}get configs(){const t={};for(const[e,i]of this.#n)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#n.set(i,e),this.#s.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return Dt(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return Dt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return Ct(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#c);try{for(const t of this.#i)await this.#l(t,this.#a,this.#i)}finally{this.#c.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const n=this.updaters.get(t);n&&n.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#l(e,this.#a,this.#i):this.#c.add(e)}async#l(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#s))}}const It=t=>(...e)=>{t(...e)},Tt={debug:It(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:It(console.info),log:It(console.log),trace:It(console.trace),verbose:It(console.log),warning:It(console.warn)};function Rt(){return Tt}const Et="100%";class Lt{pluginManager=new St(this);#d=[];#h=new Ot;#o=!1;get items(){return this.#d}get version(){return"4.3.0"}addEventListener(t,e){this.#h.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#h.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:n}=await Promise.resolve().then(function(){return so}),s=t.id??i?.id??`tsparticles${Math.floor(1e4*F()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=vt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Rt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,c=vt(r,a),{items:l}=this,d=l.findIndex(t=>t.id.description===s),h=new n({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:s,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(h);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:c});if(d>=0){const t=this.item(d),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),l.splice(d,e,h)}else l.push(h);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=ot();let n;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)n=t,n.dataset[e]??=g,n.dataset[e]===p&&(n.style.width||=Et,n.style.height||=Et,n.style.pointerEvents="none",n.style.setProperty("pointer-events","none"));else{const s=t.getElementsByTagName(f).item(0);s?(n=s,n.dataset[e]=g):(n=i.createElement(f),n.dataset[e]=p,t.appendChild(n)),n.style.width||=Et,n.style.height||=Et,n.style.pointerEvents="none",n.style.setProperty("pointer-events","none")}return n})(((t,i)=>{const n=ot();let s=i??n.getElementById(t);return s||(s=n.createElement("canvas"),s.id=t,s.dataset[e]=p,n.body.append(s),s)})(s,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 _t,Ft,At,Bt,Vt,Ht,Ut,qt,Wt,jt,$t,Gt;!function(t){t.circle="circle",t.rectangle="rectangle"}(_t||(_t={}));class Nt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Xt extends Nt{radius;constructor(t,e,i){super(t,e,_t.circle),this.radius=i}contains(t){return K(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,n=this.radius,s=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Xt||t.type===_t.circle){return n+t.radius>Math.hypot(s,a)}if(t instanceof Yt||t.type===_t.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(s-i,2)+Math.pow(a-o,2)<=n**2||s<=n+i&&a<=n+o||s<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Yt extends Nt{size;constructor(t,e,i,n){super(t,e,_t.rectangle),this.size={height:n,width:i}}contains(t){const e=this.size.width,i=this.size.height,n=this.position;return t.x>=n.x&&t.x<=n.x+e&&t.y>=n.y&&t.y<=n.y+i}intersects(t){if(t instanceof Xt)return t.intersects(this);if(!(t instanceof Yt))return!1;const e=this.size.width,i=this.size.height,n=this.position,s=t.position,a=t.size,o=a.width,r=a.height;return s.x<n.x+e&&s.x+o>n.x&&s.y<n.y+i&&s.y+r>n.y}reset(t,e,i,n){return this._resetPosition(t,e),this.size.width=i,this.size.height=n,this}}t.RotateDirection=void 0,(Ft=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Ft.counterClockwise="counter-clockwise",Ft.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,(Bt=t.LimitMode||(t.LimitMode={})).delete="delete",Bt.wait="wait",t.OutMode=void 0,(Vt=t.OutMode||(t.OutMode={})).bounce="bounce",Vt.none="none",Vt.out="out",Vt.destroy="destroy",Vt.split="split",t.AlterType=void 0,(Ht=t.AlterType||(t.AlterType={})).darken="darken",Ht.enlighten="enlighten",t.DestroyType=void 0,(Ut=t.DestroyType||(t.DestroyType={})).none="none",Ut.max="max",Ut.min="min",t.GradientType=void 0,(qt=t.GradientType||(t.GradientType={})).linear="linear",qt.radial="radial",qt.random="random",t.ParticleOutType=void 0,(Wt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Wt.inside="inside",Wt.outside="outside",t.StartValueType=void 0,(jt=t.StartValueType||(t.StartValueType={})).max="max",jt.min="min",jt.random="random",t.AnimationStatus=void 0,($t=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",$t.decreasing="decreasing",t.DrawLayer=void 0,(Gt=t.DrawLayer||(t.DrawLayer={}))[Gt.BackgroundElement=0]="BackgroundElement",Gt[Gt.BackgroundDraw=1]="BackgroundDraw",Gt[Gt.BackgroundMask=2]="BackgroundMask",Gt[Gt.CanvasSetup=3]="CanvasSetup",Gt[Gt.PluginContent=4]="PluginContent",Gt[Gt.Particles=5]="Particles",Gt[Gt.CanvasCleanup=6]="CanvasCleanup",Gt[Gt.Foreground=7]="Foreground";class Kt{load(t){R(t)||this.doLoad(t)}}function Qt(t,...e){for(const i of e)t.load(i)}function Zt(t,e,i){void 0!==i&&(t[e]=i)}function Jt(t,e,i){void 0!==i&&(t[e]=G(i))}function te(t,e,i){void 0!==i&&t[e].load(i)}function ee(t,e,i,n){if(void 0!==i){const s=t;s[e]??=n(),s[e].load(i)}}function ie(t,e,i,...n){const s=t;s[e]??=new i;const a=s[e];for(const t of n)a.load(t?.[e])}class ne extends Kt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Jt(this,"count",t.count),Zt(this,"enable",t.enable),Jt(this,"speed",t.speed),Jt(this,"decay",t.decay),Jt(this,"delay",t.delay),Zt(this,"sync",t.sync)}}class se extends ne{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),Zt(this,"mode",t.mode),Zt(this,"startValue",t.startValue)}}class ae extends ne{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Zt(this,"max",t.max),Zt(this,"min",t.min),Jt(this,"offset",t.offset)}}class oe extends Kt{h=new ae(0,y);l=new ae(0,b);s=new ae(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class re extends Kt{value="";static create(t,e){const i=new re;return i.load(t),void 0!==e&&(z(e)||T(e)?i.load({value:e}):i.load(e)),i}doLoad(t){R(t.value)||(this.value=t.value)}}class ce extends re{animation=new oe;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){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 le extends Kt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new re,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=re.create(this.color,t.color)),Zt(this,"element",t.element),Zt(this,"draw",t.draw),Zt(this,"image",t.image),Zt(this,"position",t.position),Zt(this,"repeat",t.repeat),Zt(this,"size",t.size),Zt(this,"opacity",t.opacity)}}class de extends Kt{enable=!0;zIndex=0;doLoad(t){Zt(this,"enable",t.enable),Zt(this,"zIndex",t.zIndex)}}class he extends Kt{delay=.5;enable=!0;doLoad(t){Zt(this,"delay",t.delay),Zt(this,"enable",t.enable)}}class ue extends Kt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=gt(this.options[t]??{},i))}Zt(this,"close",t.close),Zt(this,"type",t.type)}}class pe extends Kt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),Zt(this,"enable",t.enable),Jt(this,"opacity",t.opacity)}}class ge extends Kt{offset=0;value=90;doLoad(t){Jt(this,"offset",t.offset),Jt(this,"value",t.value)}}class fe extends Kt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){Zt(this,"x",t.x),Zt(this,"y",t.y),Zt(this,"mode",t.mode),Zt(this,"radius",t.radius)}}class me extends Kt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Jt(this,"acceleration",t.acceleration),Zt(this,"enable",t.enable),Zt(this,"inverse",t.inverse),Jt(this,"maxSpeed",t.maxSpeed)}}class ye extends Kt{value=0;doLoad(t){R(t.value)||(this.value=G(t.value))}}class ve extends ye{animation=new ne;doLoad(t){super.doLoad(t),te(this,"animation",t.animation)}}class be extends ve{animation=new se}class we extends Kt{clamp=!0;delay=new ye;enable=!1;generator;options={};doLoad(t){Zt(this,"clamp",t.clamp),this.delay.load(t.delay),Zt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=gt(this.options,t.options))}}class xe extends Kt{bottom;default=t.OutMode.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class Me extends Kt{acceleration=0;enable=!1;position;doLoad(t){Jt(this,"acceleration",t.acceleration),Zt(this,"enable",t.enable),t.position&&(this.position=gt({},t.position))}}class Pe extends Kt{angle=new ge;center=new fe;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new me;outModes=new xe;path=new we;random=!1;size=!1;speed=2;spin=new Me;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Jt(this,"decay",t.decay),Zt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Jt(this,"drift",t.drift),Zt(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),Zt(this,"random",t.random),Zt(this,"size",t.size),Jt(this,"speed",t.speed),this.spin.load(t.spin),Zt(this,"straight",t.straight),Zt(this,"vibrate",t.vibrate),Zt(this,"warp",t.warp)}}class ke extends Kt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),Jt(this,"width",t.width),Jt(this,"opacity",t.opacity)}}class Ce extends Kt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),ee(this,"fill",t.fill,()=>new pe),ee(this,"stroke",t.stroke,()=>new ke)}}class De extends ye{value=1}class Oe extends Kt{horizontal=new De;vertical=new De;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class ze extends Kt{enable=!1;height=1080;width=1920;doLoad(t){Zt(this,"enable",t.enable),Zt(this,"width",t.width),Zt(this,"height",t.height)}}class Se extends Kt{mode=t.LimitMode.delete;value=0;doLoad(t){Zt(this,"mode",t.mode),Zt(this,"value",t.value)}}class Ie extends Kt{density=new ze;limit=new Se;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Zt(this,"value",t.value)}}class Te extends Kt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=gt(this.options[t]??{},i))}Zt(this,"close",t.close),Zt(this,"type",t.type)}}class Re extends ye{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Zt(this,"opacityRate",t.opacityRate),Zt(this,"sizeRate",t.sizeRate),Zt(this,"velocityRate",t.velocityRate)}}class Ee extends Kt{bounce=new Oe;effect=new ue;groups={};move=new Pe;number=new Ie;paint;palette;reduceDuplicates=!1;shape=new Te;zIndex=new Re;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Ce,this.paint.color=new ce,this.paint.color.value="#fff",this.paint.fill=new pe,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#g(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=gt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(T(e)?this.paint=yt(e,t=>{const e=new Ce;return e.load(t),e}):T(this.paint)?(this.paint=new Ce,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,n=(T(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,n=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:n,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:n}]}),s=n.length>1?n:n[0]??{};this.load({paint:s,blend:{enable:!0,mode:e.blendMode}})}}function Le(t,e,...i){const n=new Ee(t,e);return Qt(n,...i),n}class _e extends Kt{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 le,this.fullScreen=new de,this.particles=Le(this.#p,this.#u),this.resize=new he}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)),Zt(this,"autoPlay",t.autoPlay),Zt(this,"clear",t.clear),Zt(this,"key",t.key),Zt(this,"name",t.name),Jt(this,"delay",t.delay),Zt(this,"detectRetina",t.detectRetina),Jt(this,"duration",t.duration),Zt(this,"fpsLimit",t.fpsLimit),Zt(this,"hdr",t.hdr),Zt(this,"pauseOnBlur",t.pauseOnBlur),Zt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Zt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;O(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=gt(this.style,t.style),Zt(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 Fe=new Map;function Ae(t,e){let i=Fe.get(t);return i||(i=e(),Fe.size>2e3&&Fe.clear(),Fe.set(t,i)),i}function Be(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Ve(t,e,i,n=!0){if(!e)return;const s=z(e)?{value:e}:e;if(z(s.value))return He(t,s.value,i,n);if(T(s.value)){const e=dt(s.value,i,n);if(!e)return;return Ve(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(s);if(t)return t}}function He(t,e,i,n=!0){if(!e)return;const s=z(e)?{value:e}:e;if(z(s.value))return s.value===d?Xe():We(t,s.value);if(T(s.value)){const e=dt(s.value,i,n);if(!e)return;return He(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(s);if(t)return t}}function Ue(t,e,i,n=!0){const s=Ve(t,e,i,n);return s?qe(s):void 0}function qe(t){const e=t.r/m,i=t.g/m,n=t.b/m,s=Math.max(e,i,n),a=Math.min(e,i,n),r={h:0,l:(s+a)*o,s:0};return s!==a&&(r.s=r.l<o?(s-a)/(s+a):(s-a)/(2-s-a),r.h=e===s?(i-n)/(s-a):i===s?2+(n-e)/(s-a):4+(e-i)/(s-a)),r.l*=b,r.s*=v,r.h*=60,r.h<0&&(r.h+=y),r.h>=y&&(r.h-=y),r}function We(t,e){return Be(t,e)}function je(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 $e(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),n=Math.max(0,Math.min(b,t.l)),s=e/y,a=i/v,r=n/b;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const c=r<o?r*(1+a):r+a-r*a,l=2*r-c,d=1/3,h=Math.min(m,m*je(l,c,s+d)),u=Math.min(m,m*je(l,c,s)),p=Math.min(m,m*je(l,c,s-d));return{r:Math.round(h),g:Math.round(u),b:Math.round(p)}}function Ge(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),n=Math.max(0,Math.min(b,t.l)),s=e/y,a=i/v,r=n/b;if(0===i){const t=r*m;return{r:t,g:t,b:t}}const c=r<o?r*(1+a):r+a-r*a,l=2*r-c,d=1/3;return{r:Math.min(m,m*je(l,c,s+d)),g:Math.min(m,m*je(l,c,s)),b:Math.min(m,m*je(l,c,s-d))}}function Ne(t){const e=$e(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Xe(t,e){const i=t??0;if(e)return{r:A(i,m),g:A(i,m),b:A(i,m)};const n=()=>Math.floor(A(i,256));return{b:n(),g:n(),r:n()}}function Ye(t,e,i){const n=e?4:2,s=i??1;return Ae(`rgb-${t.r.toFixed(n)}-${t.g.toFixed(n)}-${t.b.toFixed(n)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e,i=400){const n=i/203;return`color(display-p3 ${(t.r/m*n).toString()} ${(t.g/m*n).toString()} ${(t.b/m*n).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 Ke(t,e,i){const n=e?4:2,s=i??1;return Ae(`hsl-${t.h.toFixed(n)}-${t.s.toFixed(n)}-${t.l.toFixed(n)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?Ye(Ge(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${s.toString()})`)}function Qe(t,e,i,n){let s=t,a=e;return"r"in s||(s=$e(t)),"r"in a||(a=$e(e)),{b:U(s.b,a.b,i,n),g:U(s.g,a.g,i,n),r:U(s.r,a.r,i,n)}}function Ze(t,e,i){if(i===d)return Xe();if(i!==h)return i;{const i=t.getFillColor()??t.getStrokeColor(),n=e?.getFillColor()??e?.getStrokeColor();if(i&&n&&e)return Qe(i,n,t.getRadius(),e.getRadius());{const t=i??n;if(t)return $e(t)}}}function Je(t,e,i,n){const s=z(e)?e:e.value;return s===d?n?Ve(t,{value:s}):i?d:h:s===h?h:Ve(t,{value:s})}function ti(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function ei(t,e,i){const n={h:{enable:!1,value:t.h,min:0,max:y},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:b}};return e&&(ii(n.h,e.h,i),ii(n.s,e.s,i),ii(n.l,e.l,i)),n}function ii(e,i,n){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=W(i.speed)/a*n,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*=F(),e.value*=F()),e.initialValue=e.value,e.offset=G(i.offset)):e.velocity=0}function ni(e,i,n,s){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=n.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const a=e.offset?q(e.offset):0,o=((e.velocity??0)*n.factor+3.6*a)*(s?.5075:1),r=e.decay??1,c=e.max,l=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=o,e.value<l&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=o,e.value>c&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=c)),e.velocity&&1!==r&&(e.velocity*=r),e.value=H(e.value,l,c)}function si(t,e,i){if(!t)return;const{h:n,s:s,l:a}=t;ni(n,!1,e,i),ni(s,!0,e,i),ni(a,!0,e,i)}function ai(e,i,n){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*n}}const oi=new Lt;class ri{enable=!1;mode="destination-out";load(t){R(t)||(Zt(this,"mode",t.mode),Zt(this,"enable",t.enable))}}class ci{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return ao});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let n=e.blend;n?.load||(e.blend=n=new ri),n.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new ri,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function li(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new ci)})}class di{draw(t){!function(t){const{context:e,particle:i,radius:n}=t;i.circleRange??={min:0,max:u};const s=i.circleRange;e.arc(c.x,c.y,n,s.min,s.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,n=i?.angle??{max:360,min:0};e.circleRange=I(n)?{min:Q(n.min),max:Q(n.max)}:{min:0,max:Q(n)}}}async function hi(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new di))})}var ui;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(ui||(ui={}));const pi=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,gi=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class fi{accepts(t){return t.startsWith("#")}handleColor(t){return this.#m(t.value)}handleRangeColor(t){return this.#m(t.value)}parseString(t){return this.#m(t)}#m(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(pi,(t,e,i,n,s)=>e+e+i+i+n+n+(void 0===s?"":s+s)),i=gi.exec(e);return i?{a:i[ui.a]?Number.parseInt(i[ui.a],16)/255:1,b:Number.parseInt(i[ui.b]??"0",16),g:Number.parseInt(i[ui.g]??"0",16),r:Number.parseInt(i[ui.r]??"0",16)}:void 0}}async function mi(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new fi)})}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 vi=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class bi{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return $e(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return $e({h:W(e.h),l:W(e.l),s:W(e.s)})}parseString(t){if(!this.accepts(t))return;const e=vi.exec(t);return e?Ne({a:e.length>4?nt(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 wi(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new bi)})}class xi{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return ro});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Mi(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,Dt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new xi(t.pluginManager))})}function Pi(e,i){const n=e.value,s=e.animation,a={delayTime:W(s.delay)*r,enable:s.enable,value:W(e.value)*i,max:$(n)*i,min:j(n)*i,loops:0,maxLoops:W(s.count),time:0};if(s.enable){switch(a.decay=1-W(s.decay),s.mode){case t.AnimationMode.increase:a.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:a.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:a.status=F()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=s.mode===t.AnimationMode.auto;switch(s.startValue){case t.StartValueType.min:a.value=a.min,e&&(a.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:a.value=a.max,e&&(a.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:a.value=q(a),e&&(a.status=F()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function ki(e,i,n,s,a){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const o=(i.velocity??0)*a.factor,r=i.min,c=i.max,l=i.decay??1;i.time??=0;const d=i.delayTime??0;if(!(d>0&&i.time<d&&(i.time+=a.value,i.time<d))){switch(i.status){case t.AnimationStatus.increasing:i.value+=o;break;case t.AnimationStatus.decreasing:i.value-=o}switch(i.velocity&&1!==l&&(i.velocity*=l),i.status){case t.AnimationStatus.increasing:i.value>=c&&(n?i.status=t.AnimationStatus.decreasing:i.value-=c,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(n?i.status=t.AnimationStatus.increasing:i.value+=c,i.loops??=0,i.loops++)}!function(e,i,n,s,a){switch(i){case t.DestroyType.max:n>=a&&e.destroy();break;case t.DestroyType.min:n<=s&&e.destroy()}}(e,s,i.value,r,c),e.destroyed||(i.value=H(i.value,r,c))}}class Ci extends se{destroy=t.DestroyType.none;load(t){super.load(t),R(t)||Zt(this,"destroy",t.destroy)}}class Di extends be{animation=new Ci;value=1;load(t){if(R(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Oi{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Pi(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=W(i.speed)/a*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){ie(t,"opacity",Di,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&ki(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function zi(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Oi(t)))})}class Si{modes;#u;#y;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#y=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,n,s){if(!this.modes.includes(s))return;const a=this.#u;let o=!1;for(const t of this.#y)if(o=t.particleBounce?.(e,n,i)??!1,o)break;if(o)return;const r=e.getPosition(),c=e.offset,l=e.getRadius(),d=pt(r,l),h=a.canvas.size,u=!e.isInsideCanvasForOutMode(s,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 n=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.right&&i>0||e.direction===t.OutModeDirection.left&&i<0)){const t=W(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,n=!0}if(!n)return;const s=e.offset.x+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-s:e.outOfCanvas&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=s),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:s,direction:i,bounds:d,canvasSize:h,offset:c,outOfCanvas:u,size:l}),function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.bottom&&e.direction!==t.OutModeDirection.top)return;e.bounds.bottom<0&&e.direction===t.OutModeDirection.top?e.particle.position.y=e.size+e.offset.y:e.bounds.top>e.canvasSize.height&&e.direction===t.OutModeDirection.bottom&&(e.particle.position.y=e.canvasSize.height-e.size-e.offset.y);const i=e.particle.velocity.y;let n=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.bottom&&i>0||e.direction===t.OutModeDirection.top&&i<0)){const t=W(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,n=!0}if(!n)return;const s=e.offset.y+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-s:e.outOfCanvas&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=s),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:s,direction:i,bounds:d,canvasSize:h,offset:c,outOfCanvas:u,size:l})}}class Ii{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,n,s){if(this.modes.includes(s)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(s,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=N(e.position,e.moveCenter),{x:n,y:s}=e.velocity;if(n<0&&t>e.moveCenter.radius||s<0&&i>e.moveCenter.radius||n>=0&&t<-e.moveCenter.radius||s>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class Ti{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,n,s){if(!this.modes.includes(s))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const a=e.options.move.gravity,o=this.#u,r=o.canvas.size,l=e.getRadius();if(a.enable){const n=e.position;(!a.inverse&&n.y>r.height+l&&i===t.OutModeDirection.bottom||a.inverse&&n.y<-l&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+l||e.velocity.y<0&&e.position.y>=-l||e.velocity.x>0&&e.position.x<=r.width+l||e.velocity.x<0&&e.position.x>=-l)return;ht(e.position,o.canvas.size,c,l,i)||e.destroy()}}}const Ri=D.origin;class Ei{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,n,s){if(!this.modes.includes(s))return;const a=this.#u;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;Ri.setTo(c),Ri.length=e.moveCenter.radius,Ri.angle=e.velocity.angle+Math.PI,Ri.addTo(e.moveCenter);const{dx:n,dy:s}=N(e.position,Ri);if(t<=0&&n>=0||i<=0&&s>=0||t>=0&&n<=0||i>=0&&s<=0)return;e.position.x=Math.floor(q({min:0,max:a.canvas.size.width})),e.position.y=Math.floor(q({min:0,max:a.canvas.size.height}));const{dx:o,dy:r}=N(e.position,e.moveCenter);e.direction=Math.atan2(-r,-o),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(e.isInsideCanvasForOutMode(s,i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor(q({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(q({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=N(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction),e.justWarped=!0;break}case t.ParticleOutType.normal:{const n=e.options.move.warp,s=a.canvas.size,o={bottom:s.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:s.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),c=pt(e.position,r);i===t.OutModeDirection.right&&c.left>s.width+e.offset.x?(e.position.x=o.left,e.initialPosition.x=e.position.x,n||(e.position.y=F()*s.height,e.initialPosition.y=e.position.y),e.justWarped=!0):i===t.OutModeDirection.left&&c.right<-e.offset.x&&(e.position.x=o.right,e.initialPosition.x=e.position.x,n||(e.position.y=F()*s.height,e.initialPosition.y=e.position.y),e.justWarped=!0),i===t.OutModeDirection.bottom&&c.top>s.height+e.offset.y?(n||(e.position.x=F()*s.width,e.initialPosition.x=e.position.x),e.position.y=o.top,e.initialPosition.y=e.position.y,e.justWarped=!0):i===t.OutModeDirection.top&&c.bottom<-e.offset.y&&(n||(e.position.x=F()*s.width,e.initialPosition.x=e.position.x),e.position.y=o.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0);break}}}}}class Li{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 Ei(t)),this.#v(e,t.OutMode.destroy,t=>new Ii(t)),this.#v(e,t.OutMode.none,t=>new Ti(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const n=e.options.move.outModes;e.justWarped=!1,this.#b(e,i,n.bottom??n.default,t.OutModeDirection.bottom),this.#b(e,i,n.left??n.default,t.OutModeDirection.left),this.#b(e,i,n.right??n.default,t.OutModeDirection.right),this.#b(e,i,n.top??n.default,t.OutModeDirection.top)}#v(t,e,i){const n=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(n,e)&&this.updaters.set(e,i(this.#u))}#b(t,e,i,n){for(const s of this.updaters.values())s.update(t,n,e,i)}}async function _i(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Li(t)))})}class Fi{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,n=vt(i.paint,t.id,i.reduceDuplicates),s=n?.color,a=s??void 0,o=n?.fill,r=n?.stroke;if(o){const i=ce.create(void 0===a?void 0:ce.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=W(o.opacity),t.fillAnimation=i.animation;const n=Ue(this.#p,i);n&&(t.fillColor=ei(n,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=ce.create(void 0===a?void 0:ce.create(void 0,a),r.color);t.strokeWidth=W(r.width)*e.retina.pixelRatio,t.strokeOpacity=W(r.opacity??1),t.strokeAnimation=i.animation;const n=Ue(this.#p,i)??t.getFillColor();n&&(t.strokeColor=ei(n,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:n,strokeColor:s}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!n&&(void 0!==s?.h.value&&s.h.enable||void 0!==s?.s.value&&s.s.enable||void 0!==s?.l.value&&s.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(si(t.fillColor,e,this.#u.hdr),si(t.strokeColor,e,this.#u.hdr))}}async function Ai(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Fi(t.pluginManager,e)))})}var Bi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Bi||(Bi={}));const Vi=/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 Hi{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:W(e.r),g:W(e.g),b:W(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Vi.exec(t);return e?{a:e.length>4?nt(e[Bi.a]):1,b:parseInt(e[Bi.b]??"0",10),g:parseInt(e[Bi.g]??"0",10),r:parseInt(e[Bi.r]??"0",10)}:void 0}}async function Ui(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Hi)})}class qi extends se{destroy=t.DestroyType.none;load(t){super.load(t),R(t)||Zt(this,"destroy",t.destroy)}}class Wi extends be{animation=new qi;value=3;load(t){if(super.load(t),R(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class ji{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const n=i.animation;n.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/a*e.retina.reduceFactor,n.sync||(t.size.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){ie(t,"size",Wi,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Pi(i,e),t.retina.sizeAnimationSpeed=W(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&ki(t,t.size,!0,t.options.size.animation.destroy,e)}}async function $i(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new ji(t)))})}async function Gi(t){t.checkVersion("4.3.0"),await t.pluginManager.register(async t=>{await Promise.all([li(t),mi(t),wi(t),Ui(t),Mi(t),hi(t),Ai(t),zi(t),_i(t),$i(t)])})}const Ni=new Map;async function Xi(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{for(const[e,i]of Ni)t.pluginManager.addEasing(e,i)})}Ni.set("ease-in-quad",t=>t**2),Ni.set("ease-out-quad",t=>1-(1-t)**2),Ni.set("ease-in-out-quad",t=>t<.5?2*t**2:1-(-2*t+2)**2/2);const Yi=["emoji"];function Ki(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}async function Qi(t,e){try{await ot().fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}const Zi='"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';class Ji{#w=new Map;destroy(){for(const[t,e]of this.#w)e instanceof ImageBitmap&&e.close(),this.#w.delete(t)}draw(t){const e=t.particle.emojiDataKey;if(!e)return;const i=this.#w.get(e);i&&function(t,e){const{context:i,opacity:n}=t,s=i.globalAlpha,a=e.width,r=a*o;i.globalAlpha=n,i.drawImage(e,-r,-r,a,a),i.globalAlpha=s}(t,i)}async init(t){const e=t.actualOptions.particles.shape;if(!Yi.some(t=>lt(t,e.type)))return;const i=[Qi(Zi)];yt(Yi.map(t=>e.options[t])[0],t=>{t.font&&i.push(Qi(t.font))}),await Promise.all(i)}particleDestroy(t){t.emojiDataKey=void 0}particleInit(t,e){const i=e.shapeData;if(!i.value)return;const n=vt(i.value,e.randomIndexData);if(!n)return;const s="string"==typeof n?{font:i.font??Zi,padding:i.padding??0,value:n}:{font:Zi,padding:0,...i,...n},a=s.font,o=s.value,r=`${o}_${a}`;if(this.#w.has(r))return void(e.emojiDataKey=r);const c=2*s.padding,l=$(e.size.value),d=l+c,h=2*d,u=new OffscreenCanvas(h,h),p=u.getContext("2d",t.canvas.render.settings);if(!p)return;p.font=`400 ${(2*l).toString()}px ${a}`,p.textBaseline="middle",p.textAlign="center",p.fillText(o,d,d);const g=u instanceof HTMLCanvasElement?u:u.transferToImageBitmap();this.#w.set(r,g),e.emojiDataKey=r}}async function tn(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(Yi,()=>Promise.resolve(new Ji))})}class en{enable=!1;mode=[];load(t){R(t)||(Zt(this,"enable",t.enable),Zt(this,"mode",t.mode))}}var nn,sn,an;!function(t){t.circle="circle",t.rectangle="rectangle"}(nn||(nn={}));class on{enable=!1;mode=[];selectors=[];type=nn.circle;load(t){R(t)||(Zt(this,"selectors",t.selectors),Zt(this,"enable",t.enable),Zt(this,"mode",t.mode),Zt(this,"type",t.type))}}class rn{enable=!1;mode=[];load(t){R(t)||(Zt(this,"enable",t.enable),Zt(this,"mode",t.mode))}}class cn{onClick=new en;onDiv=new on;onHover=new rn;load(t){if(R(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=yt(e,t=>{const e=new on;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(sn||(sn={}));class ln{#u;#p;constructor(t,e){this.#p=t,this.#u=e}load(t){if(R(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 dn{detectsOn=sn.window;events=new cn;modes;constructor(t,e){this.modes=new ln(t,e)}load(t){if(R(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class hn{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return ho});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let n=e.interactivity;n?.load||(e.interactivity=n=new dn(this.#p,t)),n.load(i?.interactivity);const s=this.#p.interactors?.get(t);if(s)for(const t of s)t.loadOptions&&t.loadOptions(e,i)}loadParticlesOptions(t,e,i){i?.interactivity&&(e.interactivity=gt({},i.interactivity));const n=this.#p.interactors?.get(t);if(n)for(const t of n)t.loadParticlesOptions?.(e,i)}needsPlugin(){return!0}}!function(t){t.external="external",t.particles="particles"}(an||(an={}));class un{type=an.external;container;constructor(t){this.container=t}}class pn{type=an.particles;container;constructor(t){this.container=t}}const gn="pointerdown",fn="pointerup",mn="pointerleave",yn="pointermove",vn="touchstart",bn="touchend",wn="touchmove",xn="touchcancel";function Mn(t,e){if(T(t))return t.find((t,i)=>e(t,i));return e(t,0)?t:void 0}function Pn(t,e){return!!Mn(e,e=>e.enable&<(t,e.mode))}function kn(t,e,i){yt(e,e=>{const n=e.mode;e.enable&<(t,n)&&function(t,e){const i=t.selectors;yt(i,i=>{e(i,t)})}(e,i)})}function Cn(t,e){if(e&&t)return Mn(t,t=>function(t,e){const i=yt(e,e=>t.matches(e));return T(i)?i.some(t=>t):i}(e,t.selectors))}function Dn(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}const On=D.origin;function zn(t,e,i,n,s,a,o){const r=e.actualOptions.interactivity?.modes.attract;if(!r)return;const c=e.particles.grid.query(s,a);for(const e of c){const{dx:s,dy:a,distance:c}=N(e.position,i),l=r.speed*r.factor,d=H(t.getEasing(r.easing)(1-c/n)*l,1,r.maxSpeed);On.x=c?s/c*d:l,On.y=c?a/c*d:l,o?.(e),e.position.subFrom(On)}}let Sn=class{distance=200;duration=.4;easing="ease-out-quad";factor=1;maxSpeed=50;restore;speed=1;constructor(){this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){R(t)||(Zt(this,"distance",t.distance),Zt(this,"duration",t.duration),void 0!==t.easing&&(this.easing=t.easing),Zt(this,"factor",t.factor),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed),Zt(this,"speed",t.speed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}};const In="attract";let Tn=class extends un{handleClickMode;#x;#M;#p;#P;constructor(t,e){super(e),this.#p=t,this.#M=0,this.#x=new Set,this.#P=new Map,e.attract??={particles:[]},this.handleClickMode=(t,i)=>{const n=this.container.actualOptions,s=n.interactivity?.modes.attract;if(s&&t===In){e.attract??={particles:[]},e.attract.clicking=!0,e.attract.count=0;for(const t of e.attract.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);e.attract.particles=[],e.attract.finish=!1,setTimeout(()=>{e.destroyed||(e.attract??={particles:[]},e.attract.clicking=!1)},s.duration*r)}}}get maxDistance(){return this.#M}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.attract;e&&(this.#M=e.distance,t.retina.attractModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#x.clear();const e=this.container.actualOptions,i=t.status===yn,n=e.interactivity?.events;if(!n)return;const{enable:s,mode:a}=n.onHover,{enable:o,mode:r}=n.onClick;i&&s&<(In,a)?function(t,e,i,n,s){const a=i.mouse.position,o=e.retina.attractModeDistance;!o||o<0||!a||zn(t,e,a,o,new Xt(a.x,a.y,o),t=>n(t),s)}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#k(t)}):o&<(In,r)&&function(t,e,i,n,s){e.attract??={particles:[]};const{attract:a}=e;if(a.finish||(a.count??=0,a.count++,a.count===e.particles.count&&(a.finish=!0)),a.clicking){const a=i.mouse.clickPosition,o=e.retina.attractModeDistance;if(!o||o<0||!a)return;zn(t,e,a,o,new Xt(a.x,a.y,o),t=>n(t),s)}else!1===a.clicking&&(a.particles=[])}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#k(t)}),this.#C()}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!(n.position&&s?.onHover.enable||n.clickPosition&&s?.onClick.enable))return!1;const a=s.onHover.mode,o=s.onClick.mode;return lt(In,a)||lt(In,o)}loadModeOptions(t,...e){ie(t,"attract",Sn,...e)}reset(){}#C(){const t=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!t?.enable||!this.#P.size)return;const e=Date.now(),i=t.delay*r,n=Math.max(.001,Math.min(1,t.speed));for(const[s,a]of this.#P){if(this.#x.has(s))continue;if(s.destroyed){this.#P.delete(s);continue}const o=a.target;if(e-a.lastInteractionTime<i)continue;let r=o.x-s.position.x,c=o.y-s.position.y,l=o.z-s.position.z;if(t.follow&&s.options.move.enable){const{x:t,y:e,z:i}=s.velocity,n=t*t+e*e+i*i;if(n>0){const s=(r*t+c*e+l*i)/n;r-=t*s,c-=e*s,l-=i*s}}s.position.x+=r*n,s.position.y+=c*n,s.position.z+=l*n,Math.abs(r)<=.5&&Math.abs(c)<=.5&&(s.position.x=o.x,s.position.y=o.y,s.position.z=o.z,this.#P.delete(s))}}#k(t){this.#x.add(t);const e=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!e?.enable)return;const i=Date.now();let n=this.#P.get(t);n||(n={target:t.position.copy(),lastInteractionTime:i},this.#P.set(t,n)),n.lastInteractionTime=i}};async function Rn(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalAttract",e=>Promise.resolve(new Tn(t.pluginManager,e)))})}const En=Math.PI*o;function Ln(t,e,i,n,s){const a=t.particles.grid.query(n,s);for(const t of a)n instanceof Xt?mt(ft(t),{position:e,mass:i**2*En,velocity:D.origin,factor:D.origin}):n instanceof Yt&&An(t,pt(e,i))}function _n(t,e,i,n){kn(i,e,(e,i)=>{!function(t,e,i,n){const s=ot().querySelectorAll(e);s.length&&s.forEach(e=>{const s=e,a=t.retina.pixelRatio,r={x:(s.offsetLeft+s.offsetWidth*o)*a,y:(s.offsetTop+s.offsetHeight*o)*a},c=s.offsetWidth*o*a,l=10*a,d=i.type===nn.circle?new Xt(r.x,r.y,c+l):new Yt(s.offsetLeft*a-l,s.offsetTop*a-l,s.offsetWidth*a+2*l,s.offsetHeight*a+2*l);n(r,c,d)})}(t,e,i,(e,i,s)=>{Ln(t,e,i,s,n)})})}function Fn(t){const e={bounced:!1},{pSide:i,pOtherSide:n,rectSide:s,rectOtherSide:a,velocity:r,factor:c}=t;return n.min<a.min||n.min>a.max||n.max<a.min||n.max>a.max||(i.max>=s.min&&i.max<=(s.max+s.min)*o&&r>0||i.min<=s.max&&i.min>(s.max+s.min)*o&&r<0)&&(e.velocity=r*-c,e.bounced=!0),e}function An(t,e){const i=pt(t.getPosition(),t.getRadius()),n=t.options.bounce,s=Fn({pSide:{min:i.left,max:i.right},pOtherSide:{min:i.top,max:i.bottom},rectSide:{min:e.left,max:e.right},rectOtherSide:{min:e.top,max:e.bottom},velocity:t.velocity.x,factor:W(n.horizontal.value)});s.bounced&&(void 0!==s.velocity&&(t.velocity.x=s.velocity),void 0!==s.position&&(t.position.x=s.position));const a=Fn({pSide:{min:i.top,max:i.bottom},pOtherSide:{min:i.left,max:i.right},rectSide:{min:e.top,max:e.bottom},rectOtherSide:{min:e.left,max:e.right},velocity:t.velocity.y,factor:W(n.vertical.value)});a.bounced&&(void 0!==a.velocity&&(t.velocity.y=a.velocity),void 0!==a.position&&(t.position.y=a.position))}class Bn{distance=200;load(t){R(t)||Zt(this,"distance",t.distance)}}const Vn="bounce";class Hn extends un{#M;constructor(t){super(t),this.#M=0}get maxDistance(){return this.#M}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bounce;e&&(this.#M=e.distance,t.retina.bounceModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,n=t.status===yn;if(!i)return;const s=i.onHover.enable,a=i.onHover.mode,o=i.onDiv;n&&s&<(Vn,a)?function(t,e,i){const n=10*t.retina.pixelRatio,s=e.mouse.position,a=t.retina.bounceModeDistance;!a||a<0||!s||Ln(t,s,a,new Xt(s.x,s.y,a+n),i)}(this.container,t,e=>this.isEnabled(t,e)):_n(this.container,o,Vn,e=>this.isEnabled(t,e))}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const a=s.onDiv;return!!n.position&&s.onHover.enable&<(Vn,s.onHover.mode)||Pn(Vn,a)}loadModeOptions(t,...e){ie(t,"bounce",Bn,...e)}reset(){}}async function Un(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalBounce",t=>Promise.resolve(new Hn(t)))})}class qn{color;distance=200;duration=.4;mix=!1;opacity;size;load(t){if(!R(t)){if(Zt(this,"distance",t.distance),Zt(this,"duration",t.duration),Zt(this,"mix",t.mix),Jt(this,"opacity",t.opacity),void 0!==t.color){const e=T(this.color)?void 0:this.color;this.color=yt(t.color,t=>re.create(e,t))}Zt(this,"size",t.size)}}}class Wn extends qn{selectors=[];load(t){super.load(t),R(t)||Zt(this,"selectors",t.selectors)}}class jn extends qn{divs;load(t){super.load(t),R(t)||(this.divs=yt(t.divs,t=>{const e=new Wn;return e.load(t),e}))}}class $n{div;enabled=!1;fillColor;finalColor;id="bubble";inRange=!1;opacity;priority=100;radius;strokeColor}var Gn;function Nn(t,e,i,n){if(e>=i){return H(t+(e-i)*n,t,e)}if(e<i){return H(t-(i-e)*n,e,t)}}!function(t){t.color="color",t.opacity="opacity",t.size="size"}(Gn||(Gn={}));const Xn="bubble";class Yn extends un{handleClickMode;#M;#D=new WeakMap;#p;constructor(t,e){super(e),this.#p=t,this.#M=0,e.bubble??={},this.handleClickMode=t=>{t===Xn&&(e.bubble??={},e.bubble.clicking=!0)}}get maxDistance(){return this.#M}clear(t,e,i){const n=this.#D.get(t);n?.inRange&&!i||(t.removeModifier(Xn),this.#D.delete(t))}getOrCreateModifier(t){let e=this.#D.get(t);return e||(e=new $n,this.#D.set(t,e),t.addModifier(e)),e}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bubble;e&&(this.#M=e.distance,t.retina.bubbleModeDistance=e.distance*t.retina.pixelRatio,void 0!==e.size&&(t.retina.bubbleModeSize=e.size*t.retina.pixelRatio))}interact(t,e){const i=this.container.actualOptions,n=i.interactivity?.events;if(!n)return;const s=n.onHover,a=n.onClick,o=s.enable,r=s.mode,c=a.enable,l=a.mode,d=n.onDiv;o&<(Xn,r)?this.#O(t):c&<(Xn,l)?this.#z(t):kn(Xn,d,(i,n)=>{this.#S(t,e,i,n)})}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const{onClick:a,onDiv:o,onHover:r}=s,c=Pn(Xn,o);return!!(c||r.enable&&n.position||a.enable&&n.clickPosition)&&(lt(Xn,r.mode)||lt(Xn,a.mode)||c)}loadModeOptions(t,...e){ie(t,"bubble",jn,...e)}reset(t,e){const i=this.#D.get(e);i&&(i.enabled=!1,i.inRange=!1)}#z(t){const e=this.container,i=e.actualOptions,n=t.mouse.clickPosition,s=i.interactivity?.modes.bubble;if(!s||!n)return;e.bubble??={};const a=e.retina.bubbleModeDistance;if(!a||a<0)return;const o=e.particles.grid.queryCircle(n,a,e=>this.isEnabled(t,e)),{bubble:c}=e;for(const i of o){if(!c.clicking)continue;const o=this.getOrCreateModifier(i);o.enabled=!c.durationEnd,o.inRange=!c.durationEnd;const l=Y(i.getPosition(),n),d=(performance.now()-(t.mouse.clickTime??0))/r;d>s.duration&&(c.durationEnd=!0),d>2*s.duration&&(c.clicking=!1,c.durationEnd=!1);const h={bubbleObj:{optValue:e.retina.bubbleModeSize,value:o.radius},particlesObj:{optValue:i.size.max,value:i.size.value},type:Gn.size};this.#I(i,l,d,h);const u={bubbleObj:{optValue:s.opacity,value:o.opacity},particlesObj:{optValue:i.opacity?.max??1,value:i.opacity?.value??1},type:Gn.opacity};this.#I(i,l,d,u),!c.durationEnd&&l<=a?this.#T(i,l):(o.fillColor=void 0,o.strokeColor=void 0)}}#O(t){const e=this.container,i=t.mouse.position,n=e.retina.bubbleModeDistance;if(!n||n<0||!i)return;const s=e.particles.grid.queryCircle(i,n,e=>this.isEnabled(t,e));for(const e of s){const s=this.getOrCreateModifier(e);s.enabled=!0,s.inRange=!0;const a=Y(e.getPosition(),i),o=1-a/n;a<=n?o>=0&&t.status===yn&&(this.#R(e,o),this.#E(e,o),this.#T(e,o)):this.reset(t,e),t.status===mn&&this.reset(t,e)}}#T(t,e,i){const n=this.container.actualOptions,s=i??n.interactivity?.modes.bubble,a=this.getOrCreateModifier(t);if(s){if(!a.finalColor){const t=s.color;if(!t)return;const e=vt(t);a.finalColor=Ue(this.#p,e)}if(a.finalColor)if(s.mix){a.fillColor=void 0,a.strokeColor=void 0;const i=t.getFillColor();if(i){const t=qe(Qe(i,a.finalColor,1-e,e));a.fillColor=t,a.strokeColor=t}else a.fillColor=a.finalColor,a.strokeColor=a.finalColor}else a.fillColor=a.finalColor,a.strokeColor=a.finalColor}}#E(t,e,i){const n=this.container.actualOptions,s=i?.opacity??n.interactivity?.modes.bubble?.opacity;if(!s)return;const a=Nn(t.opacity?.value??1,s,t.opacity?.max??1,e);if(void 0!==a){this.getOrCreateModifier(t).opacity=a}}#R(t,e,i){const n=this.container,s=i?.size?i.size*n.retina.pixelRatio:n.retina.bubbleModeSize;if(void 0===s)return;const a=Nn(t.size.value,s,t.size.max,e);if(void 0!==a){this.getOrCreateModifier(t).radius=a}}#I(t,e,i,n){const s=this.container,a=n.bubbleObj.optValue,o=s.actualOptions,r=o.interactivity?.modes.bubble;if(!r||void 0===a)return;const c=r.duration,l=s.retina.bubbleModeDistance,d=n.particlesObj.optValue,h=n.bubbleObj.value,u=n.particlesObj.value??0,p=n.type;if(!l||l<0||a===d)return;s.bubble??={};const g=this.getOrCreateModifier(t);if(s.bubble.durationEnd)h&&(p===Gn.size&&(g.radius=void 0),p===Gn.opacity&&(g.opacity=void 0));else if(e<=l){if((h??u)!==a){const t=u-i*(u-a)/c;p===Gn.size&&(g.radius=t),p===Gn.opacity&&(g.opacity=t)}}else p===Gn.size&&(g.radius=void 0),p===Gn.opacity&&(g.opacity=void 0)}#S(t,e,i,n){const s=this.container,a=ot().querySelectorAll(i),r=s.actualOptions.interactivity?.modes.bubble;r&&a.length&&a.forEach(i=>{const a=i,c=s.retina.pixelRatio,l={x:(a.offsetLeft+a.offsetWidth*o)*c,y:(a.offsetTop+a.offsetHeight*o)*c},d=a.offsetWidth*o*c,h=n.type===nn.circle?new Xt(l.x,l.y,d):new Yt(a.offsetLeft*c,a.offsetTop*c,a.offsetWidth*c,a.offsetHeight*c),u=s.particles.grid.query(h,e=>this.isEnabled(t,e));for(const t of u){if(!h.contains(t.getPosition()))continue;const i=this.getOrCreateModifier(t);i.enabled=!0,i.inRange=!0;const n=Cn(r.divs,a);i.div&&i.div===a||(this.clear(t,e,!0),i.div=a),this.#R(t,1,n),this.#E(t,1,n),this.#T(t,1,n)}})}}async function Kn(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalBubble",e=>Promise.resolve(new Yn(t.pluginManager,e)))})}class Qn{opacity=.5;load(t){R(t)||Jt(this,"opacity",t.opacity)}}class Zn{distance=80;links=new Qn;radius=60;load(t){R(t)||(Zt(this,"distance",t.distance),this.links.load(t.links),Zt(this,"radius",t.radius))}}function Jn(t,e,i,n){const s=t.actualOptions,a=s.interactivity?.modes.connect;if(a)return function(t,e,i,n,s){const a=Math.floor(n.getRadius()/i.getRadius()),o=i.getFillColor(),r=n.getFillColor();if(!o||!r)return;const c=i.getPosition(),l=n.getPosition(),d=Qe(o,r,i.getRadius(),n.getRadius()),h=e.createLinearGradient(c.x,c.y,l.x,l.y);return h.addColorStop(0,Ke(o,t.hdr,s)),h.addColorStop(H(a,0,1),Ye(d,t.hdr,s)),h.addColorStop(1,Ke(r,t.hdr,s)),h}(t,e,i,n,a.links.opacity)}function ts(t,e,i){t.canvas.render.draw(n=>{const s=Jn(t,n,e,i);if(!s)return;const a=e.getPosition(),o=i.getPosition();!function(t,e,i,n,s){Ki(t,n,s),t.lineWidth=e,t.strokeStyle=i,t.stroke()}(n,e.retina.linksWidth??0,s,a,o)})}class es extends un{#M;constructor(t){super(t),this.#M=0}get maxDistance(){return this.#M}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.connect;e&&(this.#M=e.distance,t.retina.connectModeDistance=e.distance*t.retina.pixelRatio,t.retina.connectModeRadius=e.radius*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions;if(i.interactivity?.events.onHover.enable&&"pointermove"===t.status){const i=t.mouse.position,{connectModeDistance:n,connectModeRadius:s}=e.retina;if(!n||n<0||!s||s<0||!i)return;const a=Math.abs(s),o=e.particles.grid.queryCircle(i,a,e=>this.isEnabled(t,e));o.forEach((t,i)=>{const s=t.getPosition();for(const a of o.slice(i+1)){const i=a.getPosition(),o=Math.abs(n),r=Math.abs(s.x-i.x),c=Math.abs(s.y-i.y);r<o&&c<o&&ts(e,t,a)}})}}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!(!s?.onHover.enable||!n.position)&<("connect",s.onHover.mode)}loadModeOptions(t,...e){ie(t,"connect",Zn,...e)}reset(){}}async function is(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalConnect",t=>Promise.resolve(new es(t)))})}function ns(t,e){const i=t.particles.grid.query(e);for(const t of i)t.destroy()}function ss(t,e,i){kn(i,e,(e,i)=>{!function(t,e,i){const n=ot().querySelectorAll(e);n.length&&n.forEach(e=>{const n=e,s=t.retina.pixelRatio,a={x:(n.offsetLeft+n.offsetWidth*o)*s,y:(n.offsetTop+n.offsetHeight*o)*s},r=n.offsetWidth*o*s,c=10*s,l=i.type===nn.circle?new Xt(a.x,a.y,r+c):new Yt(n.offsetLeft*s-c,n.offsetTop*s-c,n.offsetWidth*s+2*c,n.offsetHeight*s+2*c);ns(t,l)})}(t,e,i)})}class as{distance=200;load(t){R(t)||Zt(this,"distance",t.distance)}}const os="destroy";class rs extends un{#M;constructor(t){super(t),this.#M=0}get maxDistance(){return this.#M}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.destroy;e&&(this.#M=e.distance,t.retina.destroyModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,n=t.status===yn;if(!i)return;const s=i.onHover.enable,a=i.onHover.mode,o=i.onDiv;n&&s&<(os,a)?function(t,e){const i=10*t.retina.pixelRatio,n=e.mouse.position,s=t.retina.destroyModeDistance;!s||s<0||!n||ns(t,new Xt(n.x,n.y,s+i))}(this.container,t):ss(this.container,o,os)}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const a=s.onDiv;return!!n.position&&s.onHover.enable&<(os,s.onHover.mode)||Pn(os,a)}loadModeOptions(t,...e){ie(t,"destroy",as,...e)}reset(){}}async function cs(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalDestroy",async t=>Promise.resolve(new rs(t)))})}class ls{blink=!1;color;consent=!1;opacity=1;load(t){R(t)||(Zt(this,"blink",t.blink),void 0!==t.color&&(this.color=re.create(this.color,t.color)),Zt(this,"consent",t.consent),Jt(this,"opacity",t.opacity))}}class ds{distance=100;links=new ls;load(t){R(t)||(Zt(this,"distance",t.distance),this.links.load(t.links))}}function hs(t,e,i,n,s){t.canvas.render.draw(a=>{const o=e.getPosition();!function(t,e,i,n,s,a,o=!1){Ki(t,i,n),t.strokeStyle=Ye(s,o,a),t.lineWidth=e,t.stroke()}(a,e.retina.linksWidth??0,o,s,i,n,t.hdr)})}class us extends un{#M;#p;constructor(t,e){super(e),this.#p=t,this.#M=0}get maxDistance(){return this.#M}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.grab;e&&(this.#M=e.distance,t.retina.grabModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions.interactivity;if(!i?.modes.grab||!i.events.onHover.enable||t.status!==yn)return;const n=t.mouse.position;if(!n)return;const s=e.retina.grabModeDistance;if(!s||s<0)return;const a=e.particles.grid.queryCircle(n,s,e=>this.isEnabled(t,e));for(const t of a){const a=Y(t.getPosition(),n);if(a>s)continue;const o=i.modes.grab.links,r=o.opacity,c=r-a*r/s;if(c<=0)continue;const l=o.color??t.options.links?.color;if(!e.particles.grabLineColor&&l){const t=i.modes.grab.links;e.particles.grabLineColor=Je(this.#p,l,t.blink,t.consent)}const d=Ze(t,void 0,e.particles.grabLineColor);d&&hs(e,t,d,c,n)}}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!s?.onHover.enable&&!!n.position&<("grab",s.onHover.mode)}loadModeOptions(t,...e){ie(t,"grab",ds,...e)}reset(){}}async function ps(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalGrab",e=>Promise.resolve(new us(t.pluginManager,e)))})}class gs{force=2;smooth=10;load(t){R(t)||(Zt(this,"force",t.force),Zt(this,"smooth",t.smooth))}}class fs extends un{maxDistance=0;constructor(t){super(t)}clear(){}init(){}interact(t){for(const e of this.container.particles.filter(e=>this.isEnabled(t,e)))this.#L(t,e)}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!s?.onHover.enable&&!!n.position&<("parallax",s.onHover.mode)}loadModeOptions(t,...e){ie(t,"parallax",gs,...e)}reset(){}#L(t,e){if(!this.isEnabled(t,e))return;const i=this.container,n=i.actualOptions,s=n.interactivity?.modes.parallax;if(!s)return;const a=s.force,r=t.mouse.position;if(!r)return;const c=i.canvas.size,l=c.width*o,d=c.height*o,h=s.smooth,u=e.getRadius()/a,p=(r.x-l)*u,g=(r.y-d)*u,{offset:f}=e;f.x+=(p-f.x)/h,f.y+=(g-f.y)/h}}async function ms(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalParallax",t=>Promise.resolve(new fs(t)))})}const ys="pause";class vs extends un{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{if(t!==ys)return;const e=this.container;e.animationStatus?e.pause():e.play()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,n=(e?.interactivity??i.interactivity)?.events;return!!n&<(ys,n.onClick.mode)}reset(){}}async function bs(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalPause",t=>Promise.resolve(new vs(t)))})}class ws{default=!0;groups=[];particles;quantity=4;load(t){R(t)||(Zt(this,"default",t.default),void 0!==t.groups&&(this.groups=t.groups.map(t=>t)),this.groups.length||(this.default=!0),Jt(this,"quantity",t.quantity),this.particles=yt(t.particles,t=>gt({},t)))}}const xs="push";class Ms extends un{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=(t,e)=>{if(t!==xs)return;const i=this.container,n=i.actualOptions,s=n.interactivity?.modes.push;if(!s)return;const a=W(s.quantity);if(a<=0)return;const o=dt([void 0,...s.groups]),r=gt(void 0!==o?i.actualOptions.particles.groups[o]:void 0,vt(s.particles));i.particles.push(a,e.mouse.position,r,o)}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;return!!s&&n.clicking&&n.inside&&!!n.position&<(xs,s.onClick.mode)}loadModeOptions(t,...e){ie(t,"push",ws,...e)}reset(){}}async function Ps(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalPush",t=>Promise.resolve(new Ms(t)))})}class ks{quantity=2;load(t){R(t)||Jt(this,"quantity",t.quantity)}}const Cs="remove";class Ds extends un{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{const e=this.container,i=e.actualOptions;if(!i.interactivity?.modes.remove||t!==Cs)return;const n=W(i.interactivity.modes.remove.quantity);for(let t=0;t<n;t++)e.particles.get(t)?.destroy()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;return!!s&&n.clicking&&n.inside&&!!n.position&<(Cs,s.onClick.mode)}loadModeOptions(t,...e){ie(t,"remove",ks,...e)}reset(){}}async function Os(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalRemove",t=>Promise.resolve(new Ds(t)))})}class zs{distance=200;duration=.4;easing="ease-out-quad";factor=100;maxSpeed=50;restore;speed=1;constructor(){this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){R(t)||(Zt(this,"distance",t.distance),Zt(this,"duration",t.duration),Zt(this,"easing",t.easing),Zt(this,"factor",t.factor),Zt(this,"speed",t.speed),Zt(this,"maxSpeed",t.maxSpeed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}}class Ss extends zs{selectors=[];load(t){super.load(t),R(t)||Zt(this,"selectors",t.selectors)}}class Is extends zs{divs;load(t){super.load(t),R(t)||(this.divs=yt(t.divs,t=>{const e=new Ss;return e.load(t),e}))}}const Ts="repulse";class Rs extends un{handleClickMode;#_;#x;#M;#F;#p;#P;constructor(t,e){super(e),this.#p=t,this.#M=0,this.#F=D.origin,this.#x=new Set,this.#_=D.origin,this.#P=new Map,e.repulse??={particles:[]},this.handleClickMode=(t,i)=>{const n=this.container.actualOptions,s=n.interactivity?.modes.repulse;if(!s||t!==Ts)return;e.repulse??={particles:[]};const a=e.repulse;a.clicking=!0,a.count=0;for(const t of e.repulse.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);a.particles=[],a.finish=!1,setTimeout(()=>{e.destroyed||(a.clicking=!1)},s.duration*r)}}get maxDistance(){return this.#M}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.repulse;e&&(this.#M=e.distance,t.retina.repulseModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#x.clear();const e=this.container.actualOptions,i=t.status===yn,n=e.interactivity?.events;if(!n)return;const s=n.onHover,a=s.enable,o=s.mode,r=n.onClick,c=r.enable,l=r.mode,d=n.onDiv;i&&a&<(Ts,o)?this.#A(t):c&<(Ts,l)?this.#B(t):kn(Ts,d,(e,i)=>{this.#V(t,e,i)}),this.#C()}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const a=s.onDiv,o=s.onHover,r=s.onClick,c=Pn(Ts,a);if(!(c||o.enable&&n.position||r.enable&&n.clickPosition))return!1;const l=o.mode,d=r.mode;return lt(Ts,l)||lt(Ts,d)||c}loadModeOptions(t,...e){ie(t,"repulse",Is,...e)}reset(){}#B(t){const e=this.container,i=e.actualOptions.interactivity?.modes.repulse;if(!i)return;const n=e.repulse??{particles:[]};if(n.finish||(n.count??=0,n.count++,n.count===e.particles.count&&(n.finish=!0)),n.clicking){const s=e.retina.repulseModeDistance;if(!s||s<0)return;const a=Math.pow(s/6,3),o=t.mouse.clickPosition;if(void 0===o)return;const r=new Xt(o.x,o.y,a),c=e.particles.grid.query(r,e=>this.isEnabled(t,e));for(const t of c){const{dx:e,dy:s,distance:r}=N(o,t.position),c=r**2,l=-a*i.speed/c;c<=a&&(this.#k(t),n.particles.push(t),this.#_.x=e,this.#_.y=s,this.#_.length=l,t.velocity.setTo(this.#_))}}else if(!1===n.clicking){for(const t of n.particles)t.velocity.setTo(t.initialVelocity);n.particles=[]}}#A(t){const e=this.container,i=t.mouse.position,n=e.retina.repulseModeDistance;!n||n<0||!i||this.#H(t,i,n,new Xt(i.x,i.y,n))}#H(t,e,i,n,s){const a=this.container,o=a.particles.grid.query(n,e=>this.isEnabled(t,e)),r=a.actualOptions.interactivity?.modes.repulse;if(!r)return;const{easing:c,speed:l,factor:d,maxSpeed:h}=r,u=this.#p.getEasing(c),p=(s?.speed??l)*d;for(const t of o){const{dx:n,dy:s,distance:a}=N(t.position,e),o=H(u(1-a/i)*p,0,h);this.#F.x=a?n/a*o:p,this.#F.y=a?s/a*o:p,this.#k(t),t.position.addTo(this.#F)}}#C(){const t=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!t?.enable||!this.#P.size)return;const e=Date.now(),i=t.delay*r,n=Math.max(.001,Math.min(1,t.speed));for(const[s,a]of this.#P){if(this.#x.has(s))continue;if(s.destroyed){this.#P.delete(s);continue}const o=a.target;if(e-a.lastInteractionTime<i)continue;t.follow&&s.options.move.enable&&(o.x+=s.velocity.x,o.y+=s.velocity.y,o.z+=s.velocity.z);const r=o.x-s.position.x,c=o.y-s.position.y,l=o.z-s.position.z;s.position.x+=r*n,s.position.y+=c*n,s.position.z+=l*n,Math.abs(r)<=.5&&Math.abs(c)<=.5&&(s.position.x=o.x,s.position.y=o.y,s.position.z=o.z,this.#P.delete(s))}}#V(t,e,i){const n=this.container,s=n.actualOptions.interactivity?.modes.repulse;if(!s)return;const a=ot().querySelectorAll(e);a.length&&a.forEach(e=>{const a=e,r=n.retina.pixelRatio,c={x:(a.offsetLeft+a.offsetWidth*o)*r,y:(a.offsetTop+a.offsetHeight*o)*r},l=a.offsetWidth*o*r,d=i.type===nn.circle?new Xt(c.x,c.y,l):new Yt(a.offsetLeft*r,a.offsetTop*r,a.offsetWidth*r,a.offsetHeight*r),h=Cn(s.divs,a);this.#H(t,c,l,d,h)})}#k(t){this.#x.add(t);const e=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!e?.enable)return;const i=Date.now();let n=this.#P.get(t);n||(n={target:t.position.copy(),lastInteractionTime:i},this.#P.set(t,n)),n.lastInteractionTime=i,e.follow&&t.options.move.enable&&(n.target.x+=t.velocity.x,n.target.y+=t.velocity.y,n.target.z+=t.velocity.z)}}async function Es(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Dn(t);const e=t.pluginManager;e.addInteractor?.("externalRepulse",t=>Promise.resolve(new Rs(e,t)))})}class Ls{factor=3;radius=200;load(t){R(t)||(Zt(this,"factor",t.factor),Zt(this,"radius",t.radius))}}class _s{enabled=!1;id="slow";priority=100;speedFactor=1}const Fs="slow";class As extends un{#M;#D=new WeakMap;constructor(t){super(t),this.#M=0}get maxDistance(){return this.#M}clear(t,e,i){const n=this.#D.get(t);n?.enabled&&!i||(t.removeModifier(Fs),this.#D.delete(t))}getOrCreateModifier(t){let e=this.#D.get(t);return e||(e=new _s,this.#D.set(t,e),t.addModifier(e)),e}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.slow;e&&(this.#M=e.radius,t.retina.slowModeRadius=e.radius*t.retina.pixelRatio)}interact(){}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!s?.onHover.enable&&!!n.position&<(Fs,s.onHover.mode)}loadModeOptions(t,...e){ie(t,"slow",Ls,...e)}reset(t,e){const i=this.#D.get(e);i&&(i.enabled=!1);const n=this.container,s=n.actualOptions,a=t.mouse.position,o=n.retina.slowModeRadius,r=s.interactivity?.modes.slow;if(!r||!o||o<0||!a)return;const c=Y(a,e.getPosition()),l=c/o,d=r.factor;if(c>o)return;const h=this.getOrCreateModifier(e);h.enabled=!0,h.speedFactor=l/d}}async function Bs(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalSlow",t=>Promise.resolve(new As(t)))})}const Vs=["image","images"],Hs=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function Us(t){return new Promise(e=>{t.loading=!0;const i=new Image;t.element=i,i.addEventListener("load",()=>{t.loading=!1,e()}),i.addEventListener("error",()=>{t.element=void 0,t.error=!0,t.loading=!1,Rt().error(`Error loading image: ${t.source}`),e()}),i.src=t.source})}async function qs(t){if("svg"!==t.type)return void await Us(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(Rt().error("Image not found"),t.error=!0),t.loading=!1}function Ws(t,e,i,n,s=!1){const a=function(t,e,i,n=!1){const{svgData:s}=t;if(!s)return"";const a=Ke(e,n,i);if(s.includes("fill"))return s.replaceAll(Hs,()=>a);const o=s.indexOf(">");return`${s.substring(0,o)} fill="${a}"${s.substring(o)}`}(t,i,n.opacity?.value??1,s),o={color:i,data:{...t,svgData:a},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise(e=>{const i=new Blob([a],{type:"image/svg+xml"}),n=URL.createObjectURL(i),s=new Image;s.addEventListener("load",()=>{o.loaded=!0,o.element=s,e(o),URL.revokeObjectURL(n)});s.addEventListener("error",()=>{(async()=>{URL.revokeObjectURL(n);const i={...t,error:!1,loading:!0};await Us(i),o.loaded=!0,o.element=i.element,e(o)})()}),s.src=n})}class js{#u;#s;constructor(t,e){this.#s=t,this.#u=e}draw(t){const{context:e,radius:i,particle:n,opacity:s}=t,a=n.image,o=a?.element;if(a){if(e.globalAlpha=s,o){const t=a.ratio,n={x:-i,y:-i},s=2*i;e.drawImage(o,n.x,n.y,s,s/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(!e.preload||!this.#s.loadImage)return;const i=[];for(const n of e.preload)i.push(this.#s.loadImage(t,n));await Promise.all(i)}loadShape(t){const e=this.#u;if(!t.shape||!Vs.includes(t.shape))return;const i=t.shapeData;if(!i)return;const n=this.#s.getImages?.(e),s=n?.find(t=>t.name===i.name||t.source===i.src);s||this.#U(e,i).then(()=>{this.loadShape(t)})}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;const i=this.#s.getImages?.(t),n=e.shapeData;if(!n)return;const s=e.getFillColor(),a=i?.find(t=>t.name===n.name||t.source===n.src);if(!a)return;const o=n.replaceColor;a.loading?setTimeout(()=>{this.particleInit(t,e)}):(async()=>{let i;i=a.svgData&&s?await Ws(a,n,s,e,t.hdr):{color:s,data:a,element:a.element,loaded:!0,ratio:n.width&&n.height?n.width/n.height:a.ratio??1,replaceColor:o,source:n.src},i.ratio||(i.ratio=1);const r={image:i,close:n.close??e.shapeClose};e.image=r.image,e.shapeClose=r.close})()}#U=async(t,e)=>{if(!this.#s.loadImage)throw new Error("Image shape not initialized");await this.#s.loadImage(t,{name:e.name,replaceColor:e.replaceColor,src:e.src})}}class $s{height;name;replaceColor;src="";width;load(t){R(t)||(Zt(this,"height",t.height),Zt(this,"name",t.name),Zt(this,"replaceColor",t.replaceColor),Zt(this,"src",t.src),Zt(this,"width",t.width))}}class Gs{id="image-preloader";#s;constructor(t){this.#s=t}async getPlugin(t){const{ImagePreloaderInstance:e}=await Promise.resolve().then(function(){return uo});return new e(this.#s,t)}loadOptions(t,e,i){if(!i?.preload)return;e.preload??=[];const n=e.preload;for(const t of i.preload){const e=n.find(e=>e.name===t.name||e.src===t.src);if(e)e.load(t);else{const e=new $s;e.load(t),n.push(e)}}}needsPlugin(){return!0}}async function Ns(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{!function(t){t.getImages??=e=>{t.images??=new Map;let i=t.images.get(e);return i||(i=[],t.images.set(e,i)),i},t.loadImage??=async(e,i)=>{if(!t.getImages)throw new Error("No images collection found");if(!i.name&&!i.src)throw new Error("No image source provided");t.images??=new Map;const n=t.getImages(e);if(!n.some(t=>t.name===i.name||t.source===i.src))try{const s={name:i.name??i.src,source:i.src,type:i.src.substring(i.src.length-3),error:!1,loading:!0,replaceColor:i.replaceColor,ratio:i.width&&i.height?i.width/i.height:void 0};let a;n.push(s),t.images.set(e,n),a=i.replaceColor?qs:Us,await a(s)}catch{throw new Error(`${i.name??i.src} not found`)}}}(t),t.pluginManager.addPlugin(new Gs(t)),t.pluginManager.addShape(Vs,e=>Promise.resolve(new js(t,e)))})}class Xs extends ye{sync=!1;load(t){R(t)||(super.load(t),Zt(this,"sync",t.sync))}}class Ys extends ye{sync=!1;load(t){R(t)||(super.load(t),Zt(this,"sync",t.sync))}}class Ks{count=0;delay=new Xs;duration=new Ys;load(t){R(t)||(Zt(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Qs{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const n=i.delay.sync?1:F(),s=i.duration.sync?1:F();t.life={delay:e.retina.reduceFactor?W(i.delay.value)*n/e.retina.reduceFactor*r:0,delayTime:0,duration:e.retina.reduceFactor?W(i.duration.value)*s/e.retina.reduceFactor*r:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){ie(t,"life",Ks,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const n=t.life;let s=!1;if(t.spawning){if(n.delayTime+=e.value,!(n.delayTime>=t.life.delay))return;s=!0,t.spawning=!1,n.delayTime=0,n.time=0}if(-1===n.duration)return;if(s?n.time=0:n.time+=e.value,n.time<n.duration)return;if(n.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const a=G(0,i.width),o=G(0,i.width);t.position.x=q(a),t.position.y=q(o),t.spawning=!0,n.delayTime=0,n.time=0,t.reset();const c=t.options.life;c&&(n.delay=W(c.delay.value)*r,n.duration=W(c.duration.value)*r)}(t,e,this.#u.canvas.size)}}async function Zs(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new Qs(t)))})}class Js{draw(t){!function(t){const{context:e,particle:i,radius:n}=t,s=i.shapeData;e.moveTo(-n,0),e.lineTo(n,0),e.lineCap=s?.cap??"butt"}(t)}getSidesCount(){return 1}}async function ta(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["line"],()=>Promise.resolve(new Js))})}class ea{distance=200;enable=!1;rotate;constructor(){this.rotate={x:3e3,y:3e3}}load(t){if(!R(t)&&(Jt(this,"distance",t.distance),Zt(this,"enable",t.enable),t.rotate)){const e=t.rotate.x;void 0!==e&&(this.rotate.x=e);const i=t.rotate.y;void 0!==i&&(this.rotate.y=i)}}}class ia extends pn{#M;constructor(t){super(t),this.#M=0}get maxDistance(){return this.#M}clear(){}init(){}interact(t){if(!t.options.attract?.enable)return;const e=this.container;if(R(t.attractDistance)){const i=W(t.options.attract.distance);i>this.#M&&(this.#M=i),t.attractDistance=i*e.retina.pixelRatio}const i=t.attractDistance,n=t.getPosition(),s=e.particles.grid.queryCircle(n,i);for(const e of s){if(t===e||!e.options.attract?.enable||e.destroyed||e.spawning)continue;const i=e.getPosition(),{dx:s,dy:a}=N(n,i),o=t.options.attract.rotate,r=s/(1e3*o.x),c=a/(1e3*o.y),l=e.size.value/t.size.value,d=1/l;t.velocity.x-=r*l,t.velocity.y-=c*l,e.velocity.x+=r*d,e.velocity.y+=c*d}}isEnabled(t){return t.options.attract?.enable??!1}loadParticlesOptions(t,...e){ie(t,"attract",ea,...e)}reset(){}}async function na(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("particlesAttract",t=>Promise.resolve(new ia(t)))})}var sa;!function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy"}(sa||(sa={}));class aa{speed=2;load(t){R(t)||Zt(this,"speed",t.speed)}}class oa{enable=!0;retries=0;load(t){R(t)||(Zt(this,"enable",t.enable),Zt(this,"retries",t.retries))}}class ra{absorb=new aa;bounce=new Oe;enable=!1;maxSpeed=50;mode=sa.bounce;overlap=new oa;load(t){R(t)||(this.absorb.load(t.absorb),this.bounce.load(t.bounce),Zt(this,"enable",t.enable),Jt(this,"maxSpeed",t.maxSpeed),Zt(this,"mode",t.mode),this.overlap.load(t.overlap))}}function ca(t,e,i,n,s,a){if(!t.options.collisions||!i.options.collisions)return;const o=H(t.options.collisions.absorb.speed*s.factor,0,n);t.size.value=Math.sqrt(e*e+o*o),i.size.value-=o,i.size.value<=a&&(i.size.value=0,i.destroy())}const la=t=>{t.options.collisions&&(t.collisionMaxSpeed??=W(t.options.collisions.maxSpeed),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed))};function da(t,e){const i=t.getMass(),n=e.getMass(),s=t.velocity.length,a=e.velocity.length,o=i*s*s+n*a*a;mt(ft(t),ft(e));const r=t.velocity.length,c=e.velocity.length,l=i*r*r+n*c*c;if(l>1e-6*o){const i=Math.sqrt(o/l);Math.abs(i-1)>1e-4&&(t.velocity.length=r*i,e.velocity.length=c*i)}la(t),la(e)}function ha(t,e,i,n){if(t.options.collisions&&e.options.collisions)switch(t.options.collisions.mode){case sa.absorb:!function(t,e,i,n){const s=t.getRadius(),a=e.getRadius();!s&&a?t.destroy():s&&!a?e.destroy():s&&a&&(s>=a?ca(t,s,e,a,i,n):ca(e,a,t,s,i,n))}(t,e,i,n);break;case sa.bounce:da(t,e);break;case sa.destroy:!function(t,e){t.unbreakable||e.unbreakable||da(t,e);const i=t.getRadius(),n=e.getRadius();!i&&n?t.destroy():i&&!n?e.destroy():i&&n&&(t.getRadius()>=e.getRadius()?e:t).destroy()}(t,e)}}class ua extends pn{maxDistance;constructor(t){super(t),this.maxDistance=0}clear(){}init(){}interact(t,e,i){if(t.destroyed||t.spawning)return;const n=this.container,s=t.getPosition(),a=t.getRadius(),o=n.particles.grid.queryCircle(s,2*a);for(const e of o){if(t===e||t.id>=e.id||!t.options.collisions?.enable||!e.options.collisions?.enable||t.options.collisions.mode!==e.options.collisions.mode||e.destroyed||e.spawning)continue;const o=e.getPosition(),r=e.getRadius();if(Math.abs(Math.round(s.z)-Math.round(o.z))>a+r)continue;Y(s,o)>a+r||ha(t,e,i,n.retina.pixelRatio)}}isEnabled(t){return!!t.options.collisions?.enable}loadParticlesOptions(t,...e){ie(t,"collisions",ra,...e)}reset(){}}class pa{id="overlap";async getPlugin(t){const{OverlapPluginInstance:e}=await Promise.resolve().then(function(){return po});return new e(t)}loadOptions(){}needsPlugin(){return!0}}async function ga(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addPlugin(new pa),t.pluginManager.addInteractor?.("particlesCollisions",t=>Promise.resolve(new ua(t)))})}class fa extends Xt{#q;constructor(t,e,i,n){super(t,e,i),this.#q=n}contains(t){if(super.contains(t))return!0;const{width:e,height:i}=this.#q,{x:n,y:s}=t;return super.contains({x:n-e,y:s})||super.contains({x:n+e,y:s})||super.contains({x:n,y:s-i})||super.contains({x:n,y:s+i})||super.contains({x:n-e,y:s-i})||super.contains({x:n+e,y:s+i})||super.contains({x:n-e,y:s+i})||super.contains({x:n+e,y:s-i})}intersects(t){if(super.intersects(t))return!0;const{width:e,height:i}=this.#q,n=t.position,s=[{x:-e,y:0},{x:e,y:0},{x:0,y:-i},{x:0,y:i},{x:-e,y:-i},{x:e,y:i},{x:-e,y:i},{x:e,y:-i}];for(const e of s){const i={x:n.x+e.x,y:n.y+e.y};let s;if(t instanceof Xt)s=new Xt(i.x,i.y,t.radius);else{const e=t;s=new Yt(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(s))return!0}return!1}}class ma{blur=5;color=new re;enable=!1;constructor(){this.color.value="#000"}load(t){R(t)||(Zt(this,"blur",t.blur),this.color=re.create(this.color,t.color),Zt(this,"enable",t.enable))}}class ya{color;enable=!1;frequency=1;opacity;load(t){R(t)||(void 0!==t.color&&(this.color=re.create(this.color,t.color)),Zt(this,"enable",t.enable),Zt(this,"frequency",t.frequency),Zt(this,"opacity",t.opacity))}}class va{blink=!1;color=new re;consent=!1;distance=100;enable=!1;frequency=1;id;opacity=1;shadow=new ma;triangles=new ya;warp=!1;width=1;constructor(){this.color.value="#fff"}load(t){R(t)||(Zt(this,"id",t.id),Zt(this,"blink",t.blink),this.color=re.create(this.color,t.color),Zt(this,"consent",t.consent),Zt(this,"distance",t.distance),Zt(this,"enable",t.enable),Zt(this,"frequency",t.frequency),Zt(this,"opacity",t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),Zt(this,"width",t.width),Zt(this,"warp",t.warp))}}function ba(t,e,i){const{dx:n,dy:s}=N(t,e),a={x:Math.abs(n),y:Math.abs(s)},o={x:Math.min(a.x,i.width-a.x),y:Math.min(a.y,i.height-a.y)};return Math.hypot(o.x,o.y)}class wa extends pn{#M;#p;constructor(t,e){super(e),this.#p=t,this.#M=0}get maxDistance(){return this.#M}clear(){}init(){this.container.particles.linksColor=void 0,this.container.particles.linksColors=new Map}interact(t){if(!t.options.links)return;t.links=[],t.linksDistance&&t.linksDistance>this.#M&&(this.#M=t.linksDistance);const e=t.getPosition(),i=this.container,n=i.canvas.size;if(e.x<c.x||e.y<c.y||e.x>n.width||e.y>n.height)return;const s=t.options.links,a=s.opacity,o=t.retina.linksDistance??0,r=s.warp,l=r?new fa(e.x,e.y,o,n):new Xt(e.x,e.y,o),d=i.particles.grid.query(l);for(const i of d){const l=i.options.links;if(t===i||!l?.enable||s.id!==l.id||i.spawning||i.destroyed||!i.links||t.links.some(t=>t.destination===i)||i.links.some(e=>e.destination===t))continue;const d=i.getPosition();if(d.x<c.x||d.y<c.y||d.x>n.width||d.y>n.height)continue;const h=N(e,d).distance,u=r&&l.warp?ba(e,d,n):h,p=Math.min(h,u);if(p>o)continue;const g=(1-p/o)*a;this.#W(t),t.links.push({destination:i,opacity:g,color:this.#j(t,i),isWarped:u<h})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){ie(t,"links",va,...e)}reset(){}#j(t,e){const i=this.container,n=t.options.links;if(!n)return;return Ze(t,e,void 0!==n.id?i.particles.linksColors.get(n.id):i.particles.linksColor)}#W(t){if(!t.options.links)return;const e=this.container,i=t.options.links;let n=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);n||(n=Je(this.#p,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=n:e.particles.linksColors.set(i.id,n))}}class xa{id="links";#p;constructor(t){this.#p=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return fo});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Ma(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;Dn(t),e.addPlugin(new xa(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new wa(e,t)))})}const Pa=new Map;function ka(t,e){const{context:i,radius:n}=t,s=function(t){const e=Pa.get(t);if(e)return e;const i=u/t,n=!!(t%2),s=(-Math.PI+(n?0:i))*o,a=[];for(let e=0;e<t;e++){const t=s+e*i;a[e]={x:Math.cos(t),y:Math.sin(t)}}return Pa.set(t,a),a}(e.count.numerator/e.count.denominator);i.beginPath();for(let t=0;t<s.length;t++){const e=s[t];if(!e)continue;const a=e.x*n,o=e.y*n;t?i.lineTo(a,o):i.moveTo(a,o)}i.closePath()}class Ca{draw(t){const{particle:e,radius:i}=t;ka(t,this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round(W(e?.sides??5))}}class Da extends Ca{getSidesData(t,e){const{sides:i}=t;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class Oa extends Ca{getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:1,numerator:3},length:2.66*e/1}}}async function za(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["polygon"],()=>Promise.resolve(new Da))})}async function Sa(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["triangle"],()=>Promise.resolve(new Oa))})}async function Ia(t){t.checkVersion("4.3.0"),await Promise.all([za(t),Sa(t)])}class Ta{decay=0;enable=!1;speed=0;sync=!1;load(t){R(t)||(Zt(this,"enable",t.enable),Jt(this,"speed",t.speed),Jt(this,"decay",t.decay),Zt(this,"sync",t.sync))}}class Ra extends ye{animation=new Ta;direction=t.RotateDirection.clockwise;path=!1;load(t){R(t)||(super.load(t),Zt(this,"direction",t.direction),this.animation.load(t.animation),Zt(this,"path",t.path))}}class Ea{#u;constructor(t){this.#u=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:Q(W(i.value)),min:0,max:u},e.pathRotation=i.path;let n=i.direction;if(n===t.RotateDirection.random){n=Math.floor(2*F())>0?t.RotateDirection.counterClockwise:t.RotateDirection.clockwise}switch(n){case t.RotateDirection.counterClockwise:case"counterClockwise":e.rotate.status=t.AnimationStatus.decreasing;break;case t.RotateDirection.clockwise:e.rotate.status=t.AnimationStatus.increasing}const s=i.animation;s.enable&&(e.rotate.decay=1-W(s.decay),e.rotate.velocity=W(s.speed)/360*this.#u.retina.reduceFactor,s.sync||(e.rotate.velocity*=F())),e.rotation=e.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){ie(t,"rotate",Ra,...e)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(ki(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function La(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new Ea(t)))})}class _a{draw(t){!function(t){const{context:e,radius:i}=t,n=i*Math.SQRT1_2,s=2*n;e.rect(-n,-n,s,s)}(t)}getSidesCount(){return 4}}async function Fa(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new _a))})}const Aa=0,Ba=0;class Va{draw(t){!function(t){const{context:e,particle:i,radius:n}=t,s=i.sides,a=i.starInset??2;e.moveTo(Aa,Ba-n);for(let t=0;t<s;t++)e.rotate(Math.PI/s),e.lineTo(Aa,Ba-n*a),e.rotate(Math.PI/s),e.lineTo(Aa,Ba-n)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round(W(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=W(i?.inset??2)}}async function Ha(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["star"],()=>Promise.resolve(new Va))})}async function Ua(t){t.checkVersion("4.3.0"),await t.pluginManager.register(async t=>{await Promise.all([Gi(t),(async t=>{await async function(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new hn(i)),i.initializers.interactors??=new Map,i.interactors??=new Map,i.addInteractor=(t,e)=>{i.initializers.interactors??=new Map,i.initializers.interactors.set(t,e)},i.getInteractors=async(t,e=!1)=>(i.interactors??=new Map,i.initializers.interactors??=new Map,Ct(t,i.interactors,i.initializers.interactors,e)),i.setOnClickHandler=t=>{const{items:i}=e;if(!i.length)throw new Error("Click handlers can only be set after calling tsParticles.load()");i.forEach(e=>{const i=e;i.addClickHandler?.(t)})}})}(t),await Promise.all([ms(t),Rn(t),Un(t),Kn(t),is(t),cs(t),ps(t),bs(t),Ps(t),Os(t),Es(t),Bs(t),na(t),ga(t),Ma(t)])})(t),Xi(t),tn(t),Ns(t),ta(t),Ia(t),Fa(t),Ha(t),Zs(t),Ai(t),La(t)])})}const qa=globalThis;qa.loadSlim=Ua,qa.tsParticles=oi;function Wa(t,e,i){const n=e[i];void 0!==n&&(t[i]=(t[i]??1)*n)}class ja{#$;#G;#N;#X;#Y;#u;#K;#Q;#Z;#J;#tt;#et;#p;#it;#nt;#st={};#at=[void 0,void 0];#ot={};constructor(t,e,i){this.#p=t,this.#u=e,this.#X=i,this.#K=null,this.#$=null,this.#G=new Set,this.#nt=[],this.#it=[],this.#N=[],this.#Y=[],this.#Z=[],this.#J=[],this.#tt=[],this.#et={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#Q}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(c.x,c.y,this.#X.size.width,this.#X.size.height)})}clear(){for(const t of this.#N)if(t.canvasClear?.())return;for(const e of Object.values(t.DrawLayer))if("number"==typeof e)for(const t of this.#rt(e))if(t.canvasClear?.())return;this.canvasClear()}destroy(){this.stop(),this.#$=null,this.#G.clear(),this.#nt=[],this.#it=[],this.#N=[],this.#Y=[],this.#Z=[],this.#J=[],this.#tt=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#et[e]=[])}draw(t){const e=this.#K;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const n=t.getFillColor(),s=t.getStrokeColor();let[a,o]=this.#ct(t);if(a??=n,o??=s,!a&&!o)return;const r=this.#u,c=t.options.zIndex,l=1-t.zIndexFactor,{fillOpacity:d,opacity:h,strokeOpacity:u}=t.getOpacity(),p=this.#ot,g=this.#st,f=a?Ke(a,r.hdr,d*h):void 0,m=o?Ke(o,r.hdr,u*h):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=m,this.draw(n=>{for(const i of this.#tt)i.drawParticleSetup?.(n,t,e);this.#lt(n,t,i,h,g,p),this.#dt({container:r,context:n,particle:t,delta:e,colorStyles:g,radius:i*l**c.sizeRate,opacity:h,transform:p}),this.#ht(t);for(const i of this.#J)i.drawParticleCleanup?.(n,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const n of this.#Z)this.#ut(i,n,t,e)})}drawParticles(e){const{particles:i,actualOptions:n}=this.#u;this.clear(),i.update(e),this.draw(s=>{const a=this.#X.size.width,o=this.#X.size.height;if(this.#$)try{s.drawImage(this.#$,c.x,c.y,a,o)}catch{this.#pt("background-element-draw-error","Error drawing background element onto canvas")}const r=n.background;if(r.draw)try{r.draw(s,e)}catch{this.#pt("background-draw-error","Error in background.draw callback")}for(const e of this.#rt(t.DrawLayer.BackgroundMask))e.canvasPaint?.();for(const i of this.#rt(t.DrawLayer.CanvasSetup))i.drawSettingsSetup?.(s,e);for(const i of this.#rt(t.DrawLayer.PluginContent))i.draw?.(s,e);i.drawParticles(e);for(const i of this.#rt(t.DrawLayer.CanvasCleanup))i.clearDraw?.(s,e),i.drawSettingsCleanup?.(s,e)})}init(){this.initUpdaters(),this.initPlugins(),this.#gt(),this.paint()}initPlugins(){this.#N=[],this.#Y=[],this.#Z=[],this.#tt=[],this.#J=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#et[e]=[]);for(const e of this.#u.plugins)(e.particleFillColor??e.particleStrokeColor)&&this.#Y.push(e),e.drawParticle&&this.#Z.push(e),e.drawParticleSetup&&this.#tt.push(e),e.drawParticleCleanup&&this.#J.push(e),e.canvasClear&&this.#N.push(e),e.canvasPaint&&this.#rt(t.DrawLayer.BackgroundMask).push(e),e.drawSettingsSetup&&this.#rt(t.DrawLayer.CanvasSetup).push(e),e.draw&&this.#rt(t.DrawLayer.PluginContent).push(e),(e.clearDraw??e.drawSettingsCleanup)&&this.#rt(t.DrawLayer.CanvasCleanup).push(e)}initUpdaters(){this.#nt=[],this.#it=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#it.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#nt.push(t)}paint(){let e=!1;for(const i of this.#rt(t.DrawLayer.BackgroundMask))if(e=i.canvasPaint?.()??!1,e)break;e||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(c.x,c.y,this.#X.size.width,this.#X.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const n=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,c.x,c.y,this.#X.size.width,this.#X.size.height),i.globalAlpha=n})}setContext(t){this.#K=t,this.#K&&(this.#K.globalCompositeOperation=i)}setContextSettings(t){this.#Q=t}stop(){this.draw(t=>{t.clearRect(c.x,c.y,this.#X.size.width,this.#X.size.height)})}#ht(t){for(const e of this.#it)e.afterDraw?.(t)}#lt(t,e,i,n,s,a){for(const o of this.#nt){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,n);a&&(s.fill=a),r&&(s.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)Wa(a,t,e)}o.beforeDraw?.(e)}}#ft(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#mt(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#dt(t){const{container:e,context:i,particle:n,delta:s,colorStyles:a,radius:o,opacity:r,transform:c}=t,{effectDrawers:l,shapeDrawers:d}=e,h=n.getPosition(),u=n.getTransformData(c),p={x:h.x,y:h.y};i.setTransform(u.a,u.b,u.c,u.d,h.x,h.y),a.fill&&(i.fillStyle=a.fill);const g=!!n.fillEnabled,f=n.strokeWidth??0;i.lineWidth=f,a.stroke&&(i.strokeStyle=a.stroke);const m={context:i,particle:n,radius:o,drawRadius:1*o,opacity:r,delta:s,pixelRatio:e.retina.pixelRatio,fill:g,stroke:f>0,transformData:u,position:{...h},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=n.effect?l.get(n.effect):void 0,v=n.shape?d.get(n.shape):void 0;this.#mt(y,m),this.#yt(v,m),this.#vt(v,m),this.#bt(v,m),this.#ft(y,m),i.resetTransform()}#ut(t,e,i,n){e.drawParticle&&e.drawParticle(t,i,n)}#vt(t,e){if(!t)return;const{context:i,fill:n,particle:s,stroke:a}=e;s.shape&&(i.beginPath(),t.draw(e),s.shapeClose&&i.closePath(),n&&i.fill(),a&&i.stroke())}#bt(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#yt(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#rt(t){return this.#et[t]}#ct(t){let e,i;for(const n of this.#Y)if(!e&&n.particleFillColor&&(e=Ue(this.#p,n.particleFillColor(t))),!i&&n.particleStrokeColor&&(i=Ue(this.#p,n.particleStrokeColor(t))),e&&i)break;return this.#at[0]=e,this.#at[1]=i,this.#at}#gt(){const t=this.#u.actualOptions.background;if(this.#$=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof HTMLImageElement?this.#$=e:e?this.#pt("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#pt("background-element-not-found",`Background element selector "${t.element}" not found`)}}else(t.element instanceof HTMLCanvasElement||t.element instanceof OffscreenCanvas||t.element instanceof HTMLVideoElement||t.element instanceof HTMLImageElement)&&(this.#$=t.element)}#pt(t,e){this.#G.has(t)||(this.#G.add(t),Rt().warning(e))}}const $a=new WeakMap;function Ga(t,e,i=!1){if(!e)return;const n=t.style,s=new Set;for(let t=0;t<n.length;t++){const e=n.item(t);e&&s.add(e)}for(let t=0;t<e.length;t++){const i=e.item(t);i&&s.add(i)}for(const t of s){const s=e.getPropertyValue(t);s?n.setProperty(t,s,i?"important":""):n.removeProperty(t)}}class Na{domElement;render;renderCanvas;size;zoom=1;#u;#wt;#xt;#Mt;#p;#Pt;#kt;#Ct;#Dt;constructor(t,e){this.#p=t,this.#u=e,this.render=new ja(t,e,this),this.#Ct={height:0,width:0};const i=e.retina.pixelRatio,n=this.#Ct;this.size={height:n.height*i,width:n.width*i},this.#wt=!1,this.#kt=[],this.#Pt="none"}get#Ot(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#wt){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#zt();this.render.destroy(),this.#kt=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#Dt?this.#Dt:{x:e*o/t,y:i*o/t}}init(){this.#St(t=>{t.disconnect()}),this.#xt=ct(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#It()}),this.resize(),this.#Tt(),this.initBackground(),this.#St(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#Rt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const n=i.style,s=Ve(this.#p,e.color);n.backgroundColor=s?Ye(s,t.actualOptions.hdr,e.opacity):"",n.backgroundImage=e.image||"",n.backgroundPosition=e.position||"",n.backgroundRepeat=e.repeat||"",n.backgroundSize=e.size||""}initPlugins(){this.#kt=[];for(const t of this.#u.plugins)t.resize&&this.#kt.push(t)}loadCanvas(t){this.#wt&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#wt=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=$a.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return $a.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const n=this.domElement;n&&(n.ariaHidden="true",this.#Mt=wt(n.style));const s=this.#Ct,a=this.renderCanvas;n?(s.height=n.offsetHeight,s.width=n.offsetWidth):(s.height=a.height,s.width=a.width);const o=this.#u.retina.pixelRatio,r=this.size;a.height=r.height=s.height*o,a.width=r.width=s.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const n=e.canvas.#Ct,s={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:s.width*a,height:s.height*a};if(s.height===n.height&&s.width===n.width&&o.height===i.height&&o.width===i.width)return!1;const r={...n};n.height=s.height,n.width=s.width;const c=this.size;return i.width=c.width=o.width,i.height=c.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:n.width/r.width,height:n.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#Pt=t,this.#It())}setZoom(t,e){this.zoom=t,this.#Dt=e}stop(){this.#St(t=>{t.disconnect()}),this.#xt=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#Et(),e&&await t.refresh()}#Et(){for(const t of this.#kt)t.resize?.()}#Rt(){const t=this.#u.actualOptions.hdr&&rt("(color-gamut: p3)")?.matches&&rt("(dynamic-range: high)")?.matches;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...t?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});const e=this.renderCanvas;e&&this.render.setContext(e.getContext("2d",this.render.settings))}#Tt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#Ot?this.#Lt():this.#zt();for(const i in e.style){if(!i||!(i in e.style))continue;const n=e.style[i];n&&t.style.setProperty(i,n,"important")}}}#It(){const t=this.domElement;if(!t)return;this.#St(t=>{t.disconnect()}),this.#Tt(),this.initBackground();const e=this.#Pt;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#St(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#zt(){const t=this.domElement,e=this.#Mt;t&&e&&Ga(t,e,!0)}#St(t){this.#xt&&t(this.#xt)}#Lt(){const t=this.domElement;t&&Ga(t,Pt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Xa{#u;#_t;#Ft;#At;constructor(t){this.#u=t,this.#_t={visibilityChange:()=>{this.#Bt()},resize:()=>{this.#Vt()}}}addListeners(){this.#Ht(!0)}removeListeners(){this.#Ht(!1)}#Bt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(ot().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#Vt(){this.#At&&(clearTimeout(this.#At),this.#At=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#At=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*r)}#Ht(t){const e=this.#_t;this.#Ut(t),kt(document,s,e.visibilityChange,t,!1)}#Ut(t){const e=this.#_t,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void kt(globalThis,n,e.resize,t);const s=i.canvas.domElement;this.#Ft&&!t?(s&&this.#Ft.unobserve(s),this.#Ft.disconnect(),this.#Ft=void 0):!this.#Ft&&t&&s&&(this.#Ft=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this.#Vt()}),this.#Ft.observe(s))}}function Ya(t){if(!lt(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}function Ka(t,e){const i=t%e;return i<0?i+e:i}function Qa(t,e,i,n){const s=Le(i,e,e.actualOptions.particles),a=s.reduceDuplicates;t.effect=vt(s.effect.type,t.id,a),t.shape=vt(s.shape.type,t.id,a);const o=s.effect,r=s.shape;if(n){if(n.effect){const e=n.effect.type;if(e&&e!==t.effect){const i=vt(e,t.id,a);i&&(t.effect=i)}o.load(n.effect)}if(n.shape){const e=n.shape.type;if(e&&e!==t.shape){const i=vt(e,t.id,a);i&&(t.shape=i)}r.load(n.shape)}}if(t.effect===d){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(F()*i.length)]}if(t.shape===d){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(F()*i.length)]}t.effectData=t.effect?function(t,e,i,n){const s=e.options[t];return gt({close:e.close},vt(s,i,n))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,n){const s=e.options[t];return gt({close:e.close},vt(s,i,n))}(t.shape,r,t.id,a):void 0,s.load(n);const c=t.effectData,l=t.shapeData;return c&&s.load(c.particles),l&&s.load(l.particles),t.effectClose=c?.close??s.effect.close,t.shapeClose=l?.close??s.shape.close,s}class Za{backColor;destroyed;direction;effect;effectClose;effectData;fillColor;fillEnabled;fillOpacity;group;id;ignoresResizeRatio;initialPosition;initialVelocity;isRotating;justWarped;lastPathTime;misplaced;moveCenter;offset;opacity;options;outType;pathRotation;position;randomIndexData;retina;roll;rotation;shape;shapeClose;shapeData;sides;size;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;#qt={fillOpacity:1,opacity:1,strokeOpacity:1};#Wt=C.origin;#jt={sin:0,cos:0};#$t={a:1,b:0,c:0,d:1};#u;#D=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#D.push(t),this.#D.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#D.length=0}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const i=this.#u,n=this.shape?i.shapeDrawers.get(this.shape):void 0;n?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this.#u.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#Gt(this.#Nt(ti(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*o}getModifier(t){return this.#D.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=W(this.opacity?.value??1),n=this.#Nt(void 0,t=>t.opacity)??i,s=this.fillOpacity??1,a=this.strokeOpacity??1;return this.#qt.fillOpacity=n*s*e,this.#qt.opacity=n*e,this.#qt.strokeOpacity=n*a*e,this.#qt}getPosition(){return this.#Wt.x=this.position.x+this.offset.x,this.#Wt.y=this.position.y+this.offset.y,this.#Wt.z=this.position.z,this.#Wt}getRadius(){return this.#Nt(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#jt.sin=Math.sin(t),this.#jt.cos=Math.cos(t),this.#jt}getStrokeColor(){return this.#Gt(this.#Nt(ti(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#$t.a=e.cos*(t.a??l.a),this.#$t.b=i?e.sin*(t.b??1):t.b??l.b,this.#$t.c=i?-e.sin*(t.c??1):t.c??l.c,this.#$t.d=e.cos*(t.d??l.d),this.#$t}init(e,i,n,s){const a=this.#u;!function(e,i,n){e.id=i,e.group=n,e.justWarped=!1,e.effectClose=!0,e.shapeClose=!0,e.pathRotation=!1,e.lastPathTime=0,e.destroyed=!1,e.unbreakable=!1,e.isRotating=!1,e.rotation=0,e.misplaced=!1,e.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},e.size={value:1,max:1,min:1,enable:!1},e.outType=t.ParticleOutType.normal,e.ignoresResizeRatio=!0}(this,e,s),this.options=Qa(this,a,this.#p,n),a.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(a.particleUpdaters,this),this.#Xt(i),this.initialVelocity=this.#Yt(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,function(t,e){let i,n;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(n=e.shapeDrawers.get(t.shape)),n?.loadShape&&n.loadShape(t);const s=n?.getSidesCount;s&&(t.sides=s(t))}(this,a),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(a.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,n=e.effect?t.effectDrawers.get(e.effect):void 0;n?.particleInit?.(t,e),i?.particleInit?.(t,e)}(a,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(a,this)}isInsideCanvas(t){return this.#Kt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#Kt({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=Ka(t,u);return e>=Math.PI*o&&e<3*Math.PI*o}if(this.roll.horizontal){const e=Ka(t+Math.PI*o,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Ka(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}removeModifier(t){const e=this.#D.findIndex(e=>e.id===t);e>=0&&this.#D.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Nt(t,e){let i=t;for(const t of this.#D)if(t.enabled){const n=e(t);void 0!==n&&(i=n)}return i}#Qt(t,e){let i=0,n=t?C.create(t.x,t.y,e):void 0;const s=this.#u,a=s.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),c=s.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(n,this);if(i)return C.create(i.x,i.y,e)}const t=it({size:c,position:n}),l=C.create(t.x,t.y,e);this.#Zt(l,r,o.left??o.default),this.#Zt(l,r,o.right??o.default),this.#Jt(l,r,o.top??o.default),this.#Jt(l,r,o.bottom??o.default);let d=!0;for(const t of s.particles.checkParticlePositionPlugins)if(d=t.checkParticlePosition?.(this,l,i)??!0,!d)break;if(d)return l;i+=1,n=void 0}}#Yt(){const e=this.options.move,i=J(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const n=Q(W(e.angle.value)),s=Q(W(e.angle.offset)),a={left:s-n*o,right:s+n*o};return e.straight||(i.angle+=q(G(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=F()),i}#Zt(e,i,n){Ya({outMode:n,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#Jt(e,i,n){Ya({outMode:n,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#te(e,i){const n=this.getRadius(),s=this.#u.canvas.size,a=this.position,o=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:o?a.y+n<s.height:a.y-n<s.height,reason:"default"}:e===t.OutModeDirection.left?{inside:o?a.x-n>0:a.x+n>0,reason:"default"}:e===t.OutModeDirection.right?{inside:o?a.x+n<s.width:a.x-n<s.width,reason:"default"}:e===t.OutModeDirection.top?{inside:o?a.y-n>0:a.y+n>0,reason:"default"}:{inside:a.x>=-n&&a.y>=-n&&a.y<=s.height+n&&a.x<=s.width+n,reason:"default"}}#ee(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Kt(t){const e=this.#te(t.direction,t.outMode),i=this.#u,n=this.shape?i.shapeDrawers.get(this.shape):void 0,s=this.effect?i.effectDrawers.get(this.effect):void 0,a=n?.isInsideCanvas,o=s?.isInsideCanvas;if(!a&&!o)return e;const r=this.#ee(t.direction,t.outMode),c=a?this.#ie(a(r),"shape"):void 0,l=o?this.#ie(o(r),"effect"):void 0;if(c&&l){const t=Math.max(c.margin??0,l.margin??0);return{inside:c.inside&&l.inside,margin:t>0?t:void 0,reason:"combined"}}return c??l??e}#Gt(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?ai(t,this.roll.alter.type,this.roll.alter.value):t:t}#Xt(e){const i=this.#u,n=Math.floor(W(this.options.zIndex.value)),s=this.#Qt(e,H(n,0,i.zLayers));if(!s)throw new Error("a valid position cannot be found for particle");this.position=s,this.initialPosition=this.position.copy();const a=i.canvas.size;switch(this.moveCenter={...bt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=Z(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case t.MoveDirection.inside:this.outType=t.ParticleOutType.inside;break;case t.MoveDirection.outside:this.outType=t.ParticleOutType.outside}this.offset=D.origin}#ie(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Ja{#ne;#se=new Map;#ae=[];#oe;#re;#ce=[];#le;constructor(t){this.#ne=t,this.#oe=0,this.#le=0}clear(){this.#se.clear();const t=this.#re;t&&(this.#ne=t),this.#re=void 0}insert(t){const{x:e,y:i}=t.getPosition(),n=this.#de(e,i);this.#se.has(n)||this.#se.set(n,[]),this.#se.get(n)?.push(t)}query(t,e,i=[]){const n=this.#he(t);if(!n)return i;const s=Math.floor(n.minX/this.#ne),a=Math.floor(n.maxX/this.#ne),o=Math.floor(n.minY/this.#ne),r=Math.floor(n.maxY/this.#ne);for(let n=s;n<=a;n++)for(let s=o;s<=r;s++){const a=`${n}_${s}`,o=this.#se.get(a);if(o)for(const n of o)e&&!e(n)||t.contains(n.getPosition())&&i.push(n)}return i}queryCircle(t,e,i,n=[]){const s=this.#ue(t.x,t.y,e),a=this.query(s,i,n);return this.#pe(),a}queryRectangle(t,e,i,n=[]){const s=this.#ge(t.x,t.y,e.width,e.height),a=this.query(s,i,n);return this.#pe(),a}setCellSize(t){this.#re=t}#ue(t,e,i){return(this.#ae[this.#oe++]??=new Xt(t,e,i)).reset(t,e,i)}#ge(t,e,i,n){return(this.#ce[this.#le++]??=new Yt(t,e,i,n)).reset(t,e,i,n)}#de(t,e){return`${Math.floor(t/this.#ne)}_${Math.floor(e/this.#ne)}`}#he(t){if(t instanceof Xt){const e=t.radius,{x:i,y:n}=t.position;return{minX:i-e,maxX:i+e,minY:n-e,maxY:n+e}}if(t instanceof Yt){const{x:e,y:i}=t.position,{width:n,height:s}=t.size;return{minX:e,maxX:e+n,minY:i,maxY:i+s}}return null}#pe(){this.#oe=0,this.#le=0}}class to{checkParticlePositionPlugins;grid;#fe;#u;#me;#ye;#ve;#be;#we;#xe;#p;#Me;#Pe;#ke;#Ce;#De;#Oe;constructor(t,e){this.#p=t,this.#u=e,this.#ve=0,this.#fe=[],this.#Me=[],this.#ye=0,this.#me=new Map,this.#be=new Map,this.#Oe=this.#ze(this.#u.zLayers),this.grid=new Ja(100),this.checkParticlePositionPlugins=[],this.#we=[],this.#xe=[],this.#ke=[],this.#Pe=[],this.#De=[]}get count(){return this.#fe.length}addParticle(e,i,n,s){const a=this.#u.actualOptions.particles.number.limit.mode,o=void 0===n?this.#ye:this.#me.get(n)??this.#ye,r=this.count;if(o>0)switch(a){case t.LimitMode.delete:{const t=r+1-o;t>0&&this.removeQuantity(t);break}case t.LimitMode.wait:if(r>=o)return}try{const a=this.#Me.pop()??new Za(this.#p,this.#u);a.init(this.#ve,e,i,n);let o=!0;return s&&(o=s(a)),o?(this.#fe.push(a),this.#Se(a),this.#ve++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this.#Me.push(a)}catch(t){Rt().warning(`error adding particle: ${t}`)}}clear(){this.#fe=[],this.#be.clear(),this.#Ie(this.#u.zLayers)}destroy(){this.#fe=[],this.#Me.length=0,this.#be.clear(),this.#Oe=[],this.checkParticlePositionPlugins=[],this.#we=[],this.#xe=[],this.#ke=[],this.#Pe=[],this.#De=[]}drawParticles(t){for(let e=this.#Oe.length-1;e>=0;e--){const i=this.#Oe[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#fe.filter(t)}find(t){return this.#fe.find(t)}get(t){return this.#fe[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#De=[],this.#xe=[],this.#ke=[],this.#we=[],this.#Pe=[],this.#be.clear(),this.#Ie(t.zLayers),this.grid=new Ja(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#De.push(e),e.particleUpdate&&this.#xe.push(e),e.postUpdate&&this.#ke.push(e),e.particleReset&&this.#we.push(e),e.postParticleUpdate&&this.#Pe.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const n=i[e];if(n)for(let i=this.count,s=0;s<n.number.value&&i<t.number.value;i++,s++)this.addParticle(void 0,n,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,n){for(let s=0;s<t;s++)this.addParticle(e,i,n)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#fe.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,n){if(t<0||t>this.count)return;let s=0;for(let a=t;s<e&&a<this.count;a++)this.#Te(a,i,n)&&(a--,s++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const n=e[t];if(!n)continue;const s=Le(this.#p,this.#u,n);this.#Re(s,i,t)}this.#Re(t.particles,i)}setResizeFactor(t){this.#Ce=t}update(t){this.grid.clear();for(const e of this.#De)e.update?.(t);const e=this.#Ee(t);for(const e of this.#ke)e.postUpdate?.(t);if(this.#Le(t,e),e.size)for(const t of e)this.remove(t);this.#Ce=void 0}#_e(...t){this.#Me.push(...t)}#Re(t,e,i,n){const s=t.number;if(!s.density.enable)return void(void 0===i?this.#ye=s.limit.value:(n?.number.limit.value??s.limit.value)&&this.#me.set(i,n?.number.limit.value??s.limit.value));const a=this.#Fe(s.density),o=s.value,r=s.limit.value>0?s.limit.value:o,c=Math.min(o,r)*a+e,l=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#ye=s.limit.value*a:this.#me.set(i,s.limit.value*a),l<c?this.push(Math.abs(c-l),void 0,t,i):l>c&&this.removeQuantity(l-c,i)}#ze(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#Ae(t){const e=this.#Oe.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#Fe(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,n=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*n**2):1}#Se(t){const e=this.#Ae(t.position.z),i=this.#Oe[e];i&&(i.push(t),this.#be.set(t.id,e))}#Te(e,i,n){const s=this.#fe[e];return!!s&&(s.group===i&&(this.#fe.splice(e,1),this.#Be(s),s.destroy(n),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:s}),this.#_e(s),!0))}#Be(t){const e=this.#be.get(t.id)??this.#Ae(t.position.z),i=this.#Oe[e];if(!i)return void this.#be.delete(t.id);const n=i.findIndex(e=>e.id===t.id);n>=0&&i.splice(n,1),this.#be.delete(t.id)}#Ie(t){const e=Math.max(Math.floor(t),1);if(this.#Oe.length===e)for(const t of this.#Oe)t.length=0;else this.#Oe=this.#ze(e)}#Ve(t){const e=this.#Ae(t.position.z),i=this.#be.get(t.id);if(void 0===i)return void this.#Se(t);if(i===e)return;const n=this.#Oe[i];if(n){const e=n.findIndex(e=>e.id===t.id);e>=0&&n.splice(e,1)}const s=this.#Oe[e];if(s){if(s.push(t),s.length>=2){const e=s[s.length-2];e&&t.id<e.id&&s.sort((t,e)=>t.id-e.id)}this.#be.set(t.id,e)}else this.#be.set(t.id,e)}#Ee(t){const e=new Set,i=this.#Ce;for(const n of this.#fe){i&&!n.ignoresResizeRatio&&(n.position.x*=i.width,n.position.y*=i.height,n.initialPosition.x*=i.width,n.initialPosition.y*=i.height),n.ignoresResizeRatio=!1;for(const t of this.#we)t.particleReset?.(n);for(const e of this.#xe){if(n.destroyed)break;e.particleUpdate?.(n,t)}n.destroyed?e.add(n):this.grid.insert(n)}return e}#Le(t,e){for(const i of this.#fe)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#Pe)e.postParticleUpdate?.(i,t);this.#Ve(i)}}}class eo{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,n=t.canvas,s=n.domElement;s&&(n.size.width=s.offsetWidth*i,n.size.height=s.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,n=e.move,s=n.distance,a=t.retina;a.maxSpeed=W(n.gravity.maxSpeed)*i,a.moveDrift=W(n.drift)*i,a.moveSpeed=W(n.speed)*i;const o=a.maxDistance;o.horizontal=void 0===s.horizontal?void 0:s.horizontal*i,o.vertical=void 0===s.vertical?void 0:s.vertical*i}}function io(t){return!t.destroyed}function no(t,e,...i){const n=new _e(t,e);return Qt(n,...i),n}var so=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#He;#Ue;#qe={value:0,factor:0};#We;#je;#$e;#Ge;#Ne;#Xe;#Ye;#Ke;#Qe;#Ze;#Je;#p;#ti;#ei;constructor(e){const{dispatchCallback:i,pluginManager:n,id:s,onDestroy:a,sourceOptions:o}=e;this.#p=n,this.#We=i,this.#Qe=a,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.#ti=!1,this.#He=0,this.#$e=0,this.#Ke=0,this.#Ne=!0,this.started=!1,this.destroyed=!1,this.#Je=!0,this.#Ye=0,this.zLayers=100,this.pageHidden=!1,this.#ei=o,this.#Xe=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new eo(this),this.canvas=new Na(this.#p,this),this.particles=new to(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Ze=no(this.#p,this),this.actualOptions=no(this.#p,this),this.#Ge=new Xa(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#Je&&!this.pageHidden&&io(this)}get options(){return this.#Ze}get sourceOptions(){return this.#ei}addLifeTime(t){this.#Ke+=t}alive(){return!this.#$e||this.#Ke<=this.#$e}destroy(e=!0){if(io(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#Qe(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#We(t,{container:this,data:e})}draw(t){if(!io(this))return;let e=t;this.#je=B(t=>{e&&(this.#Ye=void 0,e=!1),this.#ii(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const n=await i.export(t,e);if(n.supported)return n.blob}Rt().error(`Export plugin with type ${t} not found`)}async init(){if(!io(this))return;const e=new Map;for(const t of this.#p.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this.#Ze=no(this.#p,this,this.#Xe,this.sourceOptions),this.actualOptions=no(this.#p,this,this.#Ze),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[t,i]of e)t.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:i,duration:n,fpsLimit:s,hdr:a,smooth:o,zLayers:c}=this.actualOptions;this.hdr=a,this.zLayers=c,this.#$e=W(n)*r,this.#He=W(i)*r,this.#Ke=0,this.fpsLimit=s>0?s:120,this.#ti=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(t.EventType.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(t.EventType.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){if(io(this)&&(void 0!==this.#je&&(V(this.#je),this.#je=void 0),!this.#Je)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Je=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!io(this))return;const i=this.#Je||e;if(!this.#Ne||this.actualOptions.autoPlay){if(this.#Je&&(this.#Je=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#Ne=!1}async refresh(){if(io(this))return this.stop(),this.start()}async reset(t){if(io(this))return this.#Xe=t,this.#ei=t,this.#Ze=no(this.#p,this,this.#Xe,this.sourceOptions),this.actualOptions=no(this.#p,this,this.#Ze),this.refresh()}async start(){io(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#Ge.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#Ue=setTimeout(()=>{i()},this.#He)}))}stop(){if(io(this)&&this.started){this.#Ue&&(clearTimeout(this.#Ue),this.#Ue=void 0),this.#Ne=!0,this.started=!1,this.#Ge.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this.#ei=this.#Ze,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#ii(t){try{if(!this.#ti&&void 0!==this.#Ye&&t<this.#Ye+r/this.fpsLimit)return void this.draw(!1);if(this.#Ye??=t,function(t,e,i=60,n=!1){t.value=e,t.factor=n?60/i:60*e/r}(this.#qe,t-this.#Ye,this.fpsLimit,this.#ti),this.addLifeTime(this.#qe.value),this.#Ye=t,this.#qe.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#qe),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Rt().error("error in animation loop",t)}}}});var ao=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=t.DrawLayer.CanvasSetup;#u;#ni;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#ni&&(t.globalCompositeOperation=this.#ni)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#ni=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function oo(t,e,i,n,s,a,o){!function(t,e){const i=t.options,n=i.move.path;if(!n.enable)return;const s=t.pathDelay??0;if(t.lastPathTime<=s)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);n.clamp&&(t.velocity.x=H(t.velocity.x,-1,1),t.velocity.y=H(t.velocity.y,-1,1));t.lastPathTime-=s}(t,o);const r=t.gravity,c=r?.enable&&r.inverse?-1:1;s&&i&&(t.velocity.x+=s*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=c*(r.acceleration*o.factor)/(60*i));const l=t.moveDecay;t.velocity.multTo(l??1);const d=t.velocity.mult(i);r?.enable&&n>0&&(!r.inverse&&d.y>=0&&d.y>=n||r.inverse&&d.y<=0&&d.y<=-n)&&(d.y=c*n,i&&(t.velocity.y=d.y/i));const h=t.options.zIndex,u=(1-t.zIndexFactor)**h.velocityRate;d.multTo(u),d.multTo(a);const{position:p}=t;p.addTo(d),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}var ro=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(e){const i=e.options.move,n=i.gravity,s=i.path;if(e.moveDecay=1-W(i.decay),e.pathDelay=W(s.delay.value)*r,s.generator){let t=this.pathGenerators.get(s.generator);t||(t=this.availablePathGenerators.get(s.generator),t&&(this.pathGenerators.set(s.generator,t),t.init())),e.pathGenerator=t}e.gravity={enable:n.enable,acceleration:W(n.acceleration),inverse:n.inverse},function(e,i){const n=i.options.move.spin;if(!n.enable)return;const s=n.position??{x:50,y:50},a={x:.01*s.x*e.canvas.size.width,y:.01*s.y*e.canvas.size.height},o=Y(i.getPosition(),a),r=W(n.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:a,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:F()*u,radius:o,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const n=e.options.move;if(!n.enable)return;const s=this.#u,a=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(e),r=s.retina.reduceFactor,c=e.retina.moveSpeed,l=e.retina.moveDrift,d=e.size.max,h=c*(n.size?e.getRadius()/d:1)*a*(i.factor||1)*o,u=e.retina.maxSpeed;n.spin.enable?function(e,i,n,s){if(!i.spin)return;const a=i.spin.direction===t.RotateDirection.clockwise,r={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*r.x(i.spin.angle)*s,i.position.y=i.spin.center.y+i.spin.radius*r.y(i.spin.angle)*s,i.spin.radius+=i.spin.acceleration*s;const c=Math.max(e.canvas.size.width,e.canvas.size.height),l=c*o;i.spin.radius>l?(i.spin.radius=l,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*n*(1-i.spin.radius/c)}(s,e,h,r):oo(e,n,h,u,l,r,i),function(t){const e=t.initialPosition,{dx:i,dy:n}=N(e,t.position),s=Math.abs(i),a=Math.abs(n),{maxDistance:r}=t.retina,c=r.horizontal,l=r.vertical;if(!c&&!l)return;if((c&&s>=c||l&&a>=l)&&!t.misplaced)t.misplaced=!!c&&s>c||!!l&&a>l,c&&(t.velocity.x=t.velocity.y*o-t.velocity.x),l&&(t.velocity.y=t.velocity.x*o-t.velocity.y);else if((!c||s<c)&&(!l||a<l)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,n=t.velocity;c&&(i.x<e.x&&n.x<0||i.x>e.x&&n.x>0)&&(n.x*=-F()),l&&(i.y<e.y&&n.y<0||i.y>e.y&&n.y>0)&&(n.y*=-F())}}(e)}preInit(){return this.#si()}redrawInit(){return this.#si()}update(){for(const t of this.pathGenerators.values())t.update()}async#si(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});class co{#ai=!0;#oi;#u;#_t;#ri;#ci;constructor(t,e){this.#u=t,this.#oi=[],this.#ri=e,this.#ci=new Map,this.#_t={mouseDown:()=>{this.#li()},mouseLeave:()=>{this.#di()},mouseMove:t=>{this.#hi(t)},mouseUp:t=>{this.#ui(t)},touchStart:t=>{this.#pi(t)},touchMove:t=>{this.#hi(t)},touchEnd:t=>{this.#gi(t)},touchCancel:t=>{this.#gi(t)},touchEndClick:t=>{this.#fi(t)},visibilityChange:()=>{this.#Bt()}}}addListeners(){this.#Ht(!0)}init(){this.#oi.length=0;for(const t of this.#u.plugins.filter(t=>!!t.clickPositionValid))this.#oi.push(t)}removeListeners(){this.#Ht(!1)}#mi(t){const e=this.#u,i=this.#ri,n=e.actualOptions;if(this.#ai){const t=i.interactivityData.mouse,e=t.position;if(!e)return;t.clickPosition={...e},t.clickTime=performance.now();const s=n.interactivity?.events.onClick;if(!s?.mode)return;yt(s.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this.#di()},500)}#Bt(){this.#di()}#yi(t){const e=this.#_t,i=this.#u,n=this.#ri,s=i.actualOptions,a=n.interactivityData.element;if(!a)return;const o=a,r=i.canvas;r.setPointerEvents(o===r.domElement?"initial":"none"),(!t||s.interactivity?.events.onHover.enable||s.interactivity?.events.onClick.enable)&&(kt(a,yn,e.mouseMove,t),kt(a,vn,e.touchStart,t),kt(a,wn,e.touchMove,t),t?s.interactivity?.events.onClick.enable?(kt(a,bn,e.touchEndClick,t),kt(a,fn,e.mouseUp,t),kt(a,gn,e.mouseDown,t)):kt(a,bn,e.touchEnd,t):(kt(a,bn,e.touchEndClick,t),kt(a,fn,e.mouseUp,t),kt(a,gn,e.mouseDown,t),kt(a,bn,e.touchEnd,t)),kt(a,mn,e.mouseLeave,t),kt(a,xn,e.touchCancel,t))}#Ht(t){const e=this.#_t,i=this.#u,n=this.#ri,a=i.actualOptions,o=a.interactivity?.detectsOn,r=i.canvas.domElement;o===sn.window?n.interactivityData.element=ot():o===sn.parent&&r?n.interactivityData.element=r.parentElement??r.parentNode:n.interactivityData.element=r,this.#yi(t),kt(document,s,e.visibilityChange,t,!1)}#li(){const{interactivityData:t}=this.#ri,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position}#ui(t){const e=this.#u,i=this.#ri,n=e.actualOptions,{mouse:s}=i.interactivityData;s.inside=!0;let a=!1;const o=s.position;if(o&&n.interactivity?.events.onClick.enable){for(const t of this.#oi)if(a=t.clickPositionValid?.(o)??!1,a)break;a||this.#mi(t),s.clicking=!1}}#di(){const{interactivityData:t}=this.#ri,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=mn,e.inside=!1,e.clicking=!1}#hi(t){const e=this.#u,i=this.#ri,n=e.actualOptions,s=i.interactivityData,a=e.canvas.domElement;if(!s.element)return;let o;if(s.mouse.inside=!0,t.type.startsWith("pointer")){this.#ai=!0;const e=t;if(s.element===ot()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(n.interactivity?.detectsOn===sn.parent){const t=e.target,i=e.currentTarget;if(a){const n=t.getBoundingClientRect(),s=i.getBoundingClientRect(),r=a.getBoundingClientRect();o={x:e.offsetX+2*n.left-(s.left+r.left),y:e.offsetY+2*n.top-(s.top+r.top)}}else o={x:e.offsetX,y:e.offsetY}}else e.target===a&&(o={x:e.offsetX,y:e.offsetY})}else if(this.#ai="touchmove"!==t.type,a){const e=t,i=e.touches[e.touches.length-1],n=a.getBoundingClientRect();if(!i)return;o={x:i.clientX-n.left,y:i.clientY-n.top}}const r=e.retina.pixelRatio;o&&(o.x*=r,o.y*=r),s.mouse.position=o,s.status=yn}#gi(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#ci.delete(t.identifier);this.#di()}#fi(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#ci.delete(t.identifier);this.#ui(t)}#pi(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#ci.set(t.identifier,performance.now());this.#hi(t)}}class lo{interactivityData;#vi;#u;#Ge;#bi;#wi;#xi;#Mi;#p;constructor(t,e){this.#u=e,this.#p=t,this.#wi=[],this.#bi=[],this.#Mi=[],this.#vi=new Map,this.#Ge=new co(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this.#xi=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(t=>{this.#Pi(t)})}addClickHandler(t){const e=this.#u,i=this.interactivityData;if(e.destroyed)return;const n=i.element;if(!n)return;const s=(i,n,s)=>{if(e.destroyed)return;const a=e.retina.pixelRatio,o={x:n.x*a,y:n.y*a},r=e.particles.grid.queryCircle(o,s*a);t(i,r)};let a=!1,o=!1;this.#vi.set("click",t=>{if(e.destroyed)return;const i=t,n={x:i.offsetX,y:i.offsetY};s(t,n,1)}),this.#vi.set(vn,()=>{e.destroyed||(a=!0,o=!1)}),this.#vi.set(wn,()=>{e.destroyed||(o=!0)}),this.#vi.set(bn,t=>{if(!e.destroyed){if(a&&!o){const i=t,n=i.touches[i.touches.length-1];if(!n)return;const a=e.canvas.domElement,o=a?a.getBoundingClientRect():void 0,r={x:n.clientX-(o?o.left:0),y:n.clientY-(o?o.top:0)};s(t,r,Math.max(n.radiusX,n.radiusY))}a=!1,o=!1}}),this.#vi.set(xn,()=>{e.destroyed||(a=!1,o=!1)});for(const[t,e]of this.#vi)n.addEventListener(t,e)}addListeners(){this.#Ge.addListeners()}clearClickHandlers(){const t=this.#u,e=this.interactivityData;if(!t.destroyed){for(const[t,i]of this.#vi)e.element?.removeEventListener(t,i);this.#vi.clear()}}externalInteract(t){for(const e of this.#bi){const i=this.interactivityData;e.isEnabled(i)&&e.interact(i,t)}}handleClickMode(t){if(this.#u.destroyed)return;const e=this.interactivityData;for(const i of this.#bi)i.handleClickMode?.(t,e)}init(){this.#Ge.init();for(const t of this.#wi){switch(t.type){case an.external:this.#bi.push(t);break;case an.particles:this.#Mi.push(t)}t.init()}}async initInteractors(){const t=await(this.#p.getInteractors?.(this.#u,!0));t&&(this.#wi=t,this.#bi=[],this.#Mi=[])}particlesInteract(t,e){const i=this.interactivityData;for(const i of this.#bi)i.clear(t,e);for(const n of this.#Mi)n.isEnabled(t,i)&&n.interact(t,i,e)}removeListeners(){this.#Ge.removeListeners()}reset(t){const e=this.interactivityData;for(const i of this.#bi)i.isEnabled(e)&&i.reset(e,t);for(const i of this.#Mi)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#xi&&this.#xi.observe(t.element)}stopObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#xi&&this.#xi.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this.#wi)e.maxDistance>t&&(t=e.maxDistance);const e=this.#u;e.particles.grid.setCellSize(t*e.retina.pixelRatio)}#Pi(t){const e=this.#u;if(!e.destroyed&&e.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivityData.element&&(i.isIntersecting?e.play():e.pause())}}var ho=Object.freeze({__proto__:null,InteractivityPluginInstance:class{interactionManager;#u;#p;constructor(t,e){this.#u=e,this.#p=t,this.interactionManager=new lo(t,e),this.#u.addClickHandler=t=>{this.interactionManager.addClickHandler(t)}}addClickHandler(t){this.interactionManager.addClickHandler(t)}clearClickHandlers(){this.interactionManager.clearClickHandlers()}destroy(){this.clearClickHandlers(),this.#p.interactors?.delete(this.#u)}particleCreated(t){const e=t,i=new dn(this.#p,this.#u);i.load(this.#u.actualOptions.interactivity),i.load(e.options.interactivity),e.interactivity=i}particleReset(t){this.interactionManager.reset(t)}postParticleUpdate(t,e){this.interactionManager.particlesInteract(t,e)}postUpdate(t){this.interactionManager.externalInteract(t),this.interactionManager.updateMaxDistance()}async preInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}async redrawInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}start(){return this.interactionManager.addListeners(),this.interactionManager.startObserving(),Promise.resolve()}stop(){this.interactionManager.removeListeners(),this.interactionManager.stopObserving()}}});var uo=Object.freeze({__proto__:null,ImagePreloaderInstance:class{#u;#s;constructor(t,e){this.#s=t,this.#u=e}destroy(){this.#s.images?.delete(this.#u)}}});var po=Object.freeze({__proto__:null,OverlapPluginInstance:class{#u;constructor(t){this.#u=t}checkParticlePosition(t,e,i){return!this.#ki(t,e,i)}#ki(t,e,i){const n=t.options.collisions;if(!n?.enable)return!1;const s=n.overlap;if(s.enable)return!1;const a=s.retries;if(a>=0&&i>a)throw new Error("Particle is overlapping and can't be placed");return!!this.#u.particles.find(i=>Y(e,i.position)<t.getRadius()+i.getRadius())}}});function go(t,e){const i=(n=t.map(t=>t.id),[...n].sort((t,e)=>t-e).join("_"));var n;let s=e.get(i);return void 0===s&&(s=F(),e.set(i,s)),s}var fo=Object.freeze({__proto__:null,LinkInstance:class{#Ci=new Map;#u;#Di;#p;constructor(t,e){this.#p=t,this.#u=e,this.#Di={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:n}=e;if(!i?.length||!n.links)return;const s=n.links,a=e.retina.linksWidth??0,r=e.getPosition(),l=e.options.twinkle?.links,d=s.triangles.enable,h=d?new Set(i.map(t=>t.destination.id)):null,u=t.globalAlpha;let p="",g=-1,f=-1,m=!1;const y=()=>{m&&(t.stroke(),m=!1)};for(const u of i){if(s.frequency<1&&this.#Oi(e,u.destination)>s.frequency)continue;const i=u.destination.getPosition();if(d&&!u.isWarped&&h&&(y(),this.#zi(n,e,u,h,r,i,t)),u.opacity<=0||a<=0)continue;if(!s.enable)continue;let v=u.opacity,b=u.color;const w=l?.enable&&F()<l.frequency?Ve(this.#p,l.color):void 0;if(l&&w&&(b=w,v=W(l.opacity)),!b){const t=void 0!==s.id?this.#u.particles.linksColors.get(s.id):this.#u.particles.linksColor;b=Ze(e,u.destination,t)}if(!b)continue;const x=this.#Si(b);if(x===p&&a===g&&v===f||(y(),t.strokeStyle=x,t.lineWidth=a,t.globalAlpha=v,p=x,g=a,f=v,t.beginPath(),m=!0),u.isWarped){const e=this.#u.canvas.size,n=i.x-r.x,s=i.y-r.y;let a=c.x,l=c.y;Math.abs(n)>e.width*o&&(a=n>0?-e.width:e.width),Math.abs(s)>e.height*o&&(l=s>0?-e.height:e.height),t.moveTo(r.x,r.y),t.lineTo(i.x+a,i.y+l),t.moveTo(r.x-a,r.y-l),t.lineTo(i.x,i.y)}else t.moveTo(r.x,r.y),t.lineTo(i.x,i.y)}y(),t.globalAlpha=u}init(){return this.#Di.links.clear(),this.#Di.triangles.clear(),this.#Ci.clear(),Promise.resolve()}particleCreated(t){if(t.links=[],!t.options.links)return;t.linksDistance=t.options.links.distance,t.linksWidth=t.options.links.width;const e=this.#u.retina.pixelRatio;t.retina.linksDistance=t.linksDistance*e,t.retina.linksWidth=t.linksWidth*e}particleDestroyed(t){t.links=[]}#zi(t,e,i,n,s,a,r){const c=i.destination,l=t.links?.triangles;if(!l?.enable||!c.options.links?.triangles.enable)return;const d=c.links;if(d?.length)for(const h of d){if(h.isWarped||this.#Oi(c,h.destination)>c.options.links.frequency||!n.has(h.destination.id))continue;const d=h.destination;if(this.#Ii(e,c,d)>(t.links?.triangles.frequency??0))continue;const u=l.opacity??(i.opacity+h.opacity)*o,p=Ve(this.#p,l.color)??i.color;if(!p||u<=0)continue;const g=d.getPosition();r.save(),r.fillStyle=this.#Si(p),r.globalAlpha=u,r.beginPath(),r.moveTo(s.x,s.y),r.lineTo(a.x,a.y),r.lineTo(g.x,g.y),r.closePath(),r.fill(),r.restore()}}#Si(t){const e=`${t.r},${t.g},${t.b}`;let i=this.#Ci.get(e);return i||(i=Ye(t,this.#u.hdr),this.#Ci.set(e,i)),i}#Oi(t,e){return go([t,e],this.#Di.links)}#Ii(t,e,i){return go([t,e,i],this.#Di.triangles)}}});t.AnimatableColor=ce,t.AnimationOptions=ne,t.AnimationValueWithRandom=ve,t.Background=le,t.BaseRange=Nt,t.Circle=Xt,t.ColorAnimation=ae,t.Fill=pe,t.FullScreen=de,t.HslAnimation=oe,t.Move=Pe,t.MoveAngle=ge,t.MoveCenter=fe,t.MoveGravity=me,t.MovePath=we,t.OptionLoader=Kt,t.Options=_e,t.OptionsColor=re,t.OutModes=xe,t.Paint=Ce,t.ParticlesBounce=Oe,t.ParticlesBounceFactor=De,t.ParticlesDensity=ze,t.ParticlesNumber=Ie,t.ParticlesNumberLimit=Se,t.ParticlesOptions=Ee,t.RangedAnimationOptions=se,t.RangedAnimationValueWithRandom=be,t.Rectangle=Yt,t.ResizeEvent=he,t.Shape=Te,t.Spin=Me,t.Stroke=ke,t.ValueWithRandom=ye,t.Vector=D,t.Vector3d=C,t.ZIndex=Re,t.alterHsl=ai,t.animate=B,t.areBoundsInside=ut,t.calcExactPositionOrRandomFromSize=it,t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/a,y:t.position.y*t.size.height/a}:void 0},t.calcPositionOrRandomFromSize=et,t.calcPositionOrRandomFromSizeRanged=function(t){const e={x:void 0!==t.position?.x?W(t.position.x):void 0,y:void 0!==t.position?.y?W(t.position.y):void 0};return et({size:t.size,position:e})},t.calculateBounds=pt,t.cancelAnimation=V,t.canvasFirstIndex=0,t.canvasTag=f,t.checkDistance=K,t.circleBounce=mt,t.circleBounceDataFromParticle=ft,t.clamp=H,t.cloneStyle=wt,t.collisionVelocity=tt,t.colorMix=Qe,t.colorToRgb=He,t.countOffset=1,t.decayOffset=1,t.deepExtend=gt,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=i,t.defaultDensityFactor=1,t.defaultFps=60,t.defaultFpsLimit=120,t.defaultLoops=0,t.defaultOpacity=1,t.defaultRatio=1,t.defaultReduceFactor=1,t.defaultRemoveQuantity=1,t.defaultRetryCount=0,t.defaultRgbMin=0,t.defaultTime=0,t.defaultTransform=l,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=Q,t.deleteCount=1,t.double=2,t.doublePI=u,t.empty=0,t.executeOnSingleOrMultiple=yt,t.generatedAttribute=e,t.generatedFalse=g,t.generatedTrue=p,t.getDistance=Y,t.getDistanceSq=X,t.getDistances=N,t.getFullScreenStyle=Pt,t.getHslAnimationFromHsl=ei,t.getHslFromAnimation=ti,t.getItemMapFromInitializer=Dt,t.getItemsFromInitializer=Ct,t.getLinkColor=Ze,t.getLinkRandomColor=Je,t.getLogger=Rt,t.getParticleBaseVelocity=J,t.getParticleDirectionAngle=Z,t.getPosition=bt,t.getRandom=F,t.getRandomFn=function(){return L},t.getRandomInRange=A,t.getRandomRgbColor=Xe,t.getRangeMax=$,t.getRangeMin=j,t.getRangeValue=W,t.getStyleFromHsl=Ke,t.getStyleFromRgb=Ye,t.hMax=y,t.hMin=0,t.hPhase=60,t.half=o,t.hslToRgb=$e,t.hslToRgbFloat=Ge,t.hslaToRgba=Ne,t.identity=1,t.inverseFactorNumerator=1,t.isArray=T,t.isBoolean=O,t.isFunction=function(t){return"function"==typeof t},t.isInArray=lt,t.isNull=R,t.isNumber=S,t.isObject=I,t.isPointInside=ht,t.isString=z,t.itemFromArray=dt,t.itemFromSingleOrMultiple=vt,t.lFactor=1,t.lMax=b,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){void 0!==i&&(t[e]=gt(t[e]??{},i))},t.loadLazyProperty=ee,t.loadMinIndex=0,t.loadNestedProperty=te,t.loadOptionProperty=ie,t.loadOptions=Qt,t.loadParticlesOptions=Le,t.loadProperty=Zt,t.loadRandomFactor=1e4,t.loadRangeProperty=Jt,t.loadSlim=Ua,t.manageListener=kt,t.maxNits=M,t.midColorValue=h,t.millisecondsToSeconds=r,t.minCount=0,t.minDistance=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minRadius=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=U,t.none=0,t.one=1,t.originPoint=c,t.parseAlpha=nt,t.percentDenominator=a,t.phaseNumerator=1,t.quarter=w,t.randomColorValue=d,t.randomInRangeValue=q,t.rangeColorToHsl=Ue,t.rangeColorToRgb=Ve,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=n,t.rgbMax=m,t.rgbToHsl=qe,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=ot,t.safeMatchMedia=rt,t.safeMutationObserver=ct,t.setAnimationFunctions=function(t,e){_.nextFrame=t,_.cancel=e},t.setLogger=function(t){t.debug&&(Tt.debug=It(t.debug)),t.error&&(Tt.error=It(t.error)),t.info&&(Tt.info=It(t.info)),t.log&&(Tt.log=It(t.log)),t.trace&&(Tt.trace=It(t.trace)),t.verbose&&(Tt.verbose=It(t.verbose)),t.warning&&(Tt.warning=It(t.warning))},t.setRandom=function(t=Math.random){L=t},t.setRangeValue=G,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Be(t,e)?.a},t.stringToRgb=We,t.threeQuarter=x,t.triple=3,t.tryCountIncrement=1,t.tsParticles=oi,t.updateColor=si,t.updateColorValue=ni,t.visibilityChangeEvent=s,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{loadExtendProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadExtendProperty,loadLazyProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadLazyProperty,loadMinIndex:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadMinIndex,loadNestedProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadNestedProperty,loadOptionProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadOptionProperty,loadOptions:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadOptions,loadParticlesOptions:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadParticlesOptions,loadProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadProperty,loadRandomFactor:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadRandomFactor,loadRangeProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadRangeProperty,loadSlim:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadSlim,tsParticles:(globalThis.__tsParticlesInternals.bundles.slim||{}).tsParticles}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.slim||{}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|
|
1
|
+
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.slim=t.__tsParticlesInternals.bundles.slim||{}))}(this,function(t){"use strict";const e="generated",i="source-over",n="resize",s="visibilitychange",a=100,o=.5,r=1e3,c={x:0,y:0,z:0},l={a:1,b:0,c:0,d:1},d="random",h="mid",u=2*Math.PI,p="true",g="false",f="canvas",m=255,y=360,v=100,b=100,w=.25,x=.75,M=400;var P;function k(t){return"z"in t?t.z:c.z}t.MoveDirection=void 0,(P=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",P.bottomLeft="bottom-left",P.bottomRight="bottom-right",P.left="left",P.none="none",P.right="right",P.top="top",P.topLeft="top-left",P.topRight="top-right",P.outside="outside",P.inside="inside";class C{x;y;z;constructor(t=c.x,e=c.y,i=c.z){this.x=t,this.y=e,this.z=i}static get origin(){return C.create(c.x,c.y,c.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return C.create(t.x,t.y,k(t))}static create(t,e,i){return"number"==typeof t?new C(t,e??c.y,i??c.z):new C(t.x,t.y,k(t))}add(t){return C.create(this.x+t.x,this.y+t.y,this.z+k(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=k(t)}copy(){return C.clone(this)}div(t){return C.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return C.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return C.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),c.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=k(t)}sub(t){return C.create(this.x-t.x,this.y-t.y,this.z-k(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=k(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class D extends C{constructor(t=c.x,e=c.y){super(t,e,c.z)}static get origin(){return D.create(c.x,c.y)}static clone(t){return D.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new D(t,e??c.y):new D(t.x,t.y)}}function O(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 R(t){return null==t}const E=Math.PI/180;let L=Math.random;const _={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function F(){return H(L(),0,1-Number.EPSILON)}function A(t,e){return F()*(e-t)+t}function B(t){return _.nextFrame(t)}function V(t){_.cancel(t)}function H(t,e,i){return Math.min(Math.max(t,e),i)}function U(t,e,i,n){return Math.floor((t*i+e*n)/(i+n))}function q(t){const e=$(t);let i=j(t);return e===i&&(i=0),A(i,e)}function W(t){return S(t)?t:q(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),n=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(n,e)}:G(i,n)}function N(t,e){const i=t.x-e.x,n=t.y-e.y;return{dx:i,dy:n,distance:Math.hypot(i,n)}}function X(t,e){const i=t.x-e.x,n=t.y-e.y;return i*i+n*n}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*E}function Z(e,i,n){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*x;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*x;case t.MoveDirection.inside:return Math.atan2(n.y-i.y,n.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-n.y,i.x-n.x);default:return F()*u}}function J(t){const e=D.origin;return e.length=1,e.angle=t,e}function tt(t,e,i,n){return D.create(t.x*(i-n)/(i+n)+2*e.x*n/(i+n),t.y)}function et(t){return{x:(t.position?.x??F()*a)*t.size.width/a,y:(t.position?.y??F()*a)*t.size.height/a}}function it(t){const{position:e,size:i}=t;return{x:e?.x??F()*i.width,y:e?.y??F()*i.height}}function nt(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1}var st,at;t.OutModeDirection=void 0,(st=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",st.left="left",st.right="right",st.top="top",t.PixelMode=void 0,(at=t.PixelMode||(t.PixelMode={})).precise="precise",at.percent="percent";function ot(){return globalThis.document}function rt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function ct(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function lt(t,e){return t===e||T(e)&&e.includes(t)}function dt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(F()*t.length)]}function ht(t,e,i,n,s){return ut(pt(t,n??0),e,i,s)}function ut(e,i,n,s){let a=!0;return s&&s!==t.OutModeDirection.bottom||(a=e.top<i.height+n.x),!a||s&&s!==t.OutModeDirection.left||(a=e.right>n.x),!a||s&&s!==t.OutModeDirection.right||(a=e.left<i.width+n.y),!a||s&&s!==t.OutModeDirection.top||(a=e.bottom>n.y),a}function pt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function gt(t,...e){for(const i of e){if(R(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 n=i,s=t;for(const t of e){if("__proto__"===t||"constructor"===t||"prototype"===t)continue;const e=n[t];void 0!==e&&(s[t]=e)}continue}for(const n of e){if("__proto__"===n||"constructor"===n||"prototype"===n)continue;const e=t,s=i[n];e[n]=Array.isArray(s)?s.map(t=>gt(void 0,t)):gt(e[n],s)}}return t}function ft(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:D.create(W(t.options.bounce.horizontal.value),W(t.options.bounce.vertical.value))}}function mt(t,e){const{x:i,y:n}=t.velocity.sub(e.velocity),[s,a]=[t.position,e.position],{dx:o,dy:r}=N(a,s);if(i*o+n*r<0)return;const c=-Math.atan2(r,o),l=t.mass,d=e.mass,h=t.velocity.rotate(c),u=e.velocity.rotate(c),p=tt(h,u,l,d),g=tt(u,h,l,d),f=p.rotate(-c),m=g.rotate(-c);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=m.x*e.factor.x,e.velocity.y=m.y*e.factor.y}function yt(t,e){return T(t)?t.map((t,i)=>e(t,i)):e(t,0)}function vt(t,e,i){return T(t)?dt(t,e,i):t}function bt(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 wt(t){const e=ot().createElement("div").style;for(const i in t){const n=t[i];if(!(i in t)||R(n))continue;const s=t.getPropertyValue?.(n);if(!s)continue;const a=t.getPropertyPriority?.(n);a?e.setProperty(n,s,a):e.setProperty(n,s)}return e}let xt,Mt;function Pt(t){if(xt!==t||!Mt){xt=t;const e=ot().createElement("div").style,i=10,n={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in n){const i=n[t];void 0!==i&&e.setProperty(t,i)}Mt=e}return Mt}function kt(t,e,i,n,s){if(n){let n={passive:!0};O(s)?n.capture=s:void 0!==s&&(n=s),t.addEventListener(e,i,n)}else{const n=s;t.removeEventListener(e,i,n)}}async function Ct(t,e,i,n=!1){let s=e.get(t);return s&&!n||(s=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,s)),s}async function Dt(t,e,i,n=!1){let s=e.get(t);if(!s||n){const n=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));s=new Map(n),e.set(t,s)}return s}class Ot{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const n=i.length,s=i.indexOf(e);s<0||(1===n?this.#e.delete(t):i.splice(s,1))}}var zt;t.EventType=void 0,(zt=t.EventType||(t.EventType={})).configAdded="configAdded",zt.containerInit="containerInit",zt.particlesSetup="particlesSetup",zt.containerStarted="containerStarted",zt.containerStopped="containerStopped",zt.containerDestroyed="containerDestroyed",zt.containerPaused="containerPaused",zt.containerPlay="containerPlay",zt.containerBuilt="containerBuilt",zt.particleAdded="particleAdded",zt.particleDestroyed="particleDestroyed",zt.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;#n=new Map;#s;#a=new Set;#o=!1;#r=!1;#c=new Set;constructor(t){this.#s=t}get configs(){const t={};for(const[e,i]of this.#n)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#n.set(i,e),this.#s.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return Dt(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return Dt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return Ct(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#c);try{for(const t of this.#i)await this.#l(t,this.#a,this.#i)}finally{this.#c.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const n=this.updaters.get(t);n&&n.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#l(e,this.#a,this.#i):this.#c.add(e)}async#l(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#s))}}const It=t=>(...e)=>{t(...e)},Tt={debug:It(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:It(console.info),log:It(console.log),trace:It(console.trace),verbose:It(console.log),warning:It(console.warn)};function Rt(){return Tt}const Et="100%";class Lt{pluginManager=new St(this);#d=[];#h=new Ot;#o=!1;get items(){return this.#d}get version(){return"4.3.1"}addEventListener(t,e){this.#h.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#h.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:n}=await Promise.resolve().then(function(){return so}),s=t.id??i?.id??`tsparticles${Math.floor(1e4*F()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=vt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Rt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,c=vt(r,a),{items:l}=this,d=l.findIndex(t=>t.id.description===s),h=new n({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:s,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(h);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:c});if(d>=0){const t=this.item(d),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),l.splice(d,e,h)}else l.push(h);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=ot();let n;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)n=t,n.dataset[e]??=g,n.dataset[e]===p&&(n.style.width||=Et,n.style.height||=Et,n.style.pointerEvents="none",n.style.setProperty("pointer-events","none"));else{const s=t.getElementsByTagName(f).item(0);s?(n=s,n.dataset[e]=g):(n=i.createElement(f),n.dataset[e]=p,t.appendChild(n)),n.style.width||=Et,n.style.height||=Et,n.style.pointerEvents="none",n.style.setProperty("pointer-events","none")}return n})(((t,i)=>{const n=ot();let s=i??n.getElementById(t);return s||(s=n.createElement("canvas"),s.id=t,s.dataset[e]=p,n.body.append(s),s)})(s,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 _t,Ft,At,Bt,Vt,Ht,Ut,qt,Wt,jt,$t,Gt;!function(t){t.circle="circle",t.rectangle="rectangle"}(_t||(_t={}));class Nt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Xt extends Nt{radius;constructor(t,e,i){super(t,e,_t.circle),this.radius=i}contains(t){return K(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,n=this.radius,s=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Xt||t.type===_t.circle){return n+t.radius>Math.hypot(s,a)}if(t instanceof Yt||t.type===_t.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(s-i,2)+Math.pow(a-o,2)<=n**2||s<=n+i&&a<=n+o||s<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Yt extends Nt{size;constructor(t,e,i,n){super(t,e,_t.rectangle),this.size={height:n,width:i}}contains(t){const e=this.size.width,i=this.size.height,n=this.position;return t.x>=n.x&&t.x<=n.x+e&&t.y>=n.y&&t.y<=n.y+i}intersects(t){if(t instanceof Xt)return t.intersects(this);if(!(t instanceof Yt))return!1;const e=this.size.width,i=this.size.height,n=this.position,s=t.position,a=t.size,o=a.width,r=a.height;return s.x<n.x+e&&s.x+o>n.x&&s.y<n.y+i&&s.y+r>n.y}reset(t,e,i,n){return this._resetPosition(t,e),this.size.width=i,this.size.height=n,this}}t.RotateDirection=void 0,(Ft=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Ft.counterClockwise="counter-clockwise",Ft.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,(Bt=t.LimitMode||(t.LimitMode={})).delete="delete",Bt.wait="wait",t.OutMode=void 0,(Vt=t.OutMode||(t.OutMode={})).bounce="bounce",Vt.none="none",Vt.out="out",Vt.destroy="destroy",Vt.split="split",t.AlterType=void 0,(Ht=t.AlterType||(t.AlterType={})).darken="darken",Ht.enlighten="enlighten",t.DestroyType=void 0,(Ut=t.DestroyType||(t.DestroyType={})).none="none",Ut.max="max",Ut.min="min",t.GradientType=void 0,(qt=t.GradientType||(t.GradientType={})).linear="linear",qt.radial="radial",qt.random="random",t.ParticleOutType=void 0,(Wt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Wt.inside="inside",Wt.outside="outside",t.StartValueType=void 0,(jt=t.StartValueType||(t.StartValueType={})).max="max",jt.min="min",jt.random="random",t.AnimationStatus=void 0,($t=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",$t.decreasing="decreasing",t.DrawLayer=void 0,(Gt=t.DrawLayer||(t.DrawLayer={}))[Gt.BackgroundElement=0]="BackgroundElement",Gt[Gt.BackgroundDraw=1]="BackgroundDraw",Gt[Gt.BackgroundMask=2]="BackgroundMask",Gt[Gt.CanvasSetup=3]="CanvasSetup",Gt[Gt.PluginContent=4]="PluginContent",Gt[Gt.Particles=5]="Particles",Gt[Gt.CanvasCleanup=6]="CanvasCleanup",Gt[Gt.Foreground=7]="Foreground";class Kt{load(t){R(t)||this.doLoad(t)}}function Qt(t,...e){for(const i of e)t.load(i)}function Zt(t,e,i){void 0!==i&&(t[e]=i)}function Jt(t,e,i){void 0!==i&&(t[e]=G(i))}function te(t,e,i){void 0!==i&&t[e].load(i)}function ee(t,e,i,n){if(void 0!==i){const s=t;s[e]??=n(),s[e].load(i)}}function ie(t,e,i,...n){const s=t;s[e]??=new i;const a=s[e];for(const t of n)a.load(t?.[e])}class ne extends Kt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Jt(this,"count",t.count),Zt(this,"enable",t.enable),Jt(this,"speed",t.speed),Jt(this,"decay",t.decay),Jt(this,"delay",t.delay),Zt(this,"sync",t.sync)}}class se extends ne{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),Zt(this,"mode",t.mode),Zt(this,"startValue",t.startValue)}}class ae extends ne{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Zt(this,"max",t.max),Zt(this,"min",t.min),Jt(this,"offset",t.offset)}}class oe extends Kt{h=new ae(0,y);l=new ae(0,b);s=new ae(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class re extends Kt{value="";static create(t,e){const i=new re;return i.load(t),void 0!==e&&(z(e)||T(e)?i.load({value:e}):i.load(e)),i}doLoad(t){R(t.value)||(this.value=t.value)}}class ce extends re{animation=new oe;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){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 le extends Kt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new re,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=re.create(this.color,t.color)),Zt(this,"element",t.element),Zt(this,"draw",t.draw),Zt(this,"image",t.image),Zt(this,"position",t.position),Zt(this,"repeat",t.repeat),Zt(this,"size",t.size),Zt(this,"opacity",t.opacity)}}class de extends Kt{enable=!0;zIndex=0;doLoad(t){Zt(this,"enable",t.enable),Zt(this,"zIndex",t.zIndex)}}class he extends Kt{delay=.5;enable=!0;doLoad(t){Zt(this,"delay",t.delay),Zt(this,"enable",t.enable)}}class ue extends Kt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=gt(this.options[t]??{},i))}Zt(this,"close",t.close),Zt(this,"type",t.type)}}class pe extends Kt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),Zt(this,"enable",t.enable),Jt(this,"opacity",t.opacity)}}class ge extends Kt{offset=0;value=90;doLoad(t){Jt(this,"offset",t.offset),Jt(this,"value",t.value)}}class fe extends Kt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){Zt(this,"x",t.x),Zt(this,"y",t.y),Zt(this,"mode",t.mode),Zt(this,"radius",t.radius)}}class me extends Kt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Jt(this,"acceleration",t.acceleration),Zt(this,"enable",t.enable),Zt(this,"inverse",t.inverse),Jt(this,"maxSpeed",t.maxSpeed)}}class ye extends Kt{value=0;doLoad(t){R(t.value)||(this.value=G(t.value))}}class ve extends ye{animation=new ne;doLoad(t){super.doLoad(t),te(this,"animation",t.animation)}}class be extends ve{animation=new se}class we extends Kt{clamp=!0;delay=new ye;enable=!1;generator;options={};doLoad(t){Zt(this,"clamp",t.clamp),this.delay.load(t.delay),Zt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=gt(this.options,t.options))}}class xe extends Kt{bottom;default=t.OutMode.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class Me extends Kt{acceleration=0;enable=!1;position;doLoad(t){Jt(this,"acceleration",t.acceleration),Zt(this,"enable",t.enable),t.position&&(this.position=gt({},t.position))}}class Pe extends Kt{angle=new ge;center=new fe;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new me;outModes=new xe;path=new we;random=!1;size=!1;speed=2;spin=new Me;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Jt(this,"decay",t.decay),Zt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Jt(this,"drift",t.drift),Zt(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),Zt(this,"random",t.random),Zt(this,"size",t.size),Jt(this,"speed",t.speed),this.spin.load(t.spin),Zt(this,"straight",t.straight),Zt(this,"vibrate",t.vibrate),Zt(this,"warp",t.warp)}}class ke extends Kt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),Jt(this,"width",t.width),Jt(this,"opacity",t.opacity)}}class Ce extends Kt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),ee(this,"fill",t.fill,()=>new pe),ee(this,"stroke",t.stroke,()=>new ke)}}class De extends ye{value=1}class Oe extends Kt{horizontal=new De;vertical=new De;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class ze extends Kt{enable=!1;height=1080;width=1920;doLoad(t){Zt(this,"enable",t.enable),Zt(this,"width",t.width),Zt(this,"height",t.height)}}class Se extends Kt{mode=t.LimitMode.delete;value=0;doLoad(t){Zt(this,"mode",t.mode),Zt(this,"value",t.value)}}class Ie extends Kt{density=new ze;limit=new Se;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Zt(this,"value",t.value)}}class Te extends Kt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=gt(this.options[t]??{},i))}Zt(this,"close",t.close),Zt(this,"type",t.type)}}class Re extends ye{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Zt(this,"opacityRate",t.opacityRate),Zt(this,"sizeRate",t.sizeRate),Zt(this,"velocityRate",t.velocityRate)}}class Ee extends Kt{bounce=new Oe;effect=new ue;groups={};move=new Pe;number=new Ie;paint;palette;reduceDuplicates=!1;shape=new Te;zIndex=new Re;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Ce,this.paint.color=new ce,this.paint.color.value="#fff",this.paint.fill=new pe,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#g(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=gt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(T(e)?this.paint=yt(e,t=>{const e=new Ce;return e.load(t),e}):T(this.paint)?(this.paint=new Ce,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,n=(T(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,n=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:n,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:n}]}),s=n.length>1?n:n[0]??{};this.load({paint:s,blend:{enable:!0,mode:e.blendMode}})}}function Le(t,e,...i){const n=new Ee(t,e);return Qt(n,...i),n}class _e extends Kt{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 le,this.fullScreen=new de,this.particles=Le(this.#p,this.#u),this.resize=new he}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)),Zt(this,"autoPlay",t.autoPlay),Zt(this,"clear",t.clear),Zt(this,"key",t.key),Zt(this,"name",t.name),Jt(this,"delay",t.delay),Zt(this,"detectRetina",t.detectRetina),Jt(this,"duration",t.duration),Zt(this,"fpsLimit",t.fpsLimit),Zt(this,"hdr",t.hdr),Zt(this,"pauseOnBlur",t.pauseOnBlur),Zt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Zt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;O(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=gt(this.style,t.style),Zt(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 Fe=new Map;function Ae(t,e){let i=Fe.get(t);return i||(i=e(),Fe.size>2e3&&Fe.clear(),Fe.set(t,i)),i}function Be(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Ve(t,e,i,n=!0){if(!e)return;const s=z(e)?{value:e}:e;if(z(s.value))return He(t,s.value,i,n);if(T(s.value)){const e=dt(s.value,i,n);if(!e)return;return Ve(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(s);if(t)return t}}function He(t,e,i,n=!0){if(!e)return;const s=z(e)?{value:e}:e;if(z(s.value))return s.value===d?Xe():We(t,s.value);if(T(s.value)){const e=dt(s.value,i,n);if(!e)return;return He(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(s);if(t)return t}}function Ue(t,e,i,n=!0){const s=Ve(t,e,i,n);return s?qe(s):void 0}function qe(t){const e=t.r/m,i=t.g/m,n=t.b/m,s=Math.max(e,i,n),a=Math.min(e,i,n),r={h:0,l:(s+a)*o,s:0};return s!==a&&(r.s=r.l<o?(s-a)/(s+a):(s-a)/(2-s-a),r.h=e===s?(i-n)/(s-a):i===s?2+(n-e)/(s-a):4+(e-i)/(s-a)),r.l*=b,r.s*=v,r.h*=60,r.h<0&&(r.h+=y),r.h>=y&&(r.h-=y),r}function We(t,e){return Be(t,e)}function je(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 $e(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),n=Math.max(0,Math.min(b,t.l)),s=e/y,a=i/v,r=n/b;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const c=r<o?r*(1+a):r+a-r*a,l=2*r-c,d=1/3,h=Math.min(m,m*je(l,c,s+d)),u=Math.min(m,m*je(l,c,s)),p=Math.min(m,m*je(l,c,s-d));return{r:Math.round(h),g:Math.round(u),b:Math.round(p)}}function Ge(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),n=Math.max(0,Math.min(b,t.l)),s=e/y,a=i/v,r=n/b;if(0===i){const t=r*m;return{r:t,g:t,b:t}}const c=r<o?r*(1+a):r+a-r*a,l=2*r-c,d=1/3;return{r:Math.min(m,m*je(l,c,s+d)),g:Math.min(m,m*je(l,c,s)),b:Math.min(m,m*je(l,c,s-d))}}function Ne(t){const e=$e(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Xe(t,e){const i=t??0;if(e)return{r:A(i,m),g:A(i,m),b:A(i,m)};const n=()=>Math.floor(A(i,256));return{b:n(),g:n(),r:n()}}function Ye(t,e,i){const n=e?4:2,s=i??1;return Ae(`rgb-${t.r.toFixed(n)}-${t.g.toFixed(n)}-${t.b.toFixed(n)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e,i=400){const n=i/203;return`color(display-p3 ${(t.r/m*n).toString()} ${(t.g/m*n).toString()} ${(t.b/m*n).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 Ke(t,e,i){const n=e?4:2,s=i??1;return Ae(`hsl-${t.h.toFixed(n)}-${t.s.toFixed(n)}-${t.l.toFixed(n)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?Ye(Ge(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${s.toString()})`)}function Qe(t,e,i,n){let s=t,a=e;return"r"in s||(s=$e(t)),"r"in a||(a=$e(e)),{b:U(s.b,a.b,i,n),g:U(s.g,a.g,i,n),r:U(s.r,a.r,i,n)}}function Ze(t,e,i){if(i===d)return Xe();if(i!==h)return i;{const i=t.getFillColor()??t.getStrokeColor(),n=e?.getFillColor()??e?.getStrokeColor();if(i&&n&&e)return Qe(i,n,t.getRadius(),e.getRadius());{const t=i??n;if(t)return $e(t)}}}function Je(t,e,i,n){const s=z(e)?e:e.value;return s===d?n?Ve(t,{value:s}):i?d:h:s===h?h:Ve(t,{value:s})}function ti(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function ei(t,e,i){const n={h:{enable:!1,value:t.h,min:0,max:y},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:b}};return e&&(ii(n.h,e.h,i),ii(n.s,e.s,i),ii(n.l,e.l,i)),n}function ii(e,i,n){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=W(i.speed)/a*n,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*=F(),e.value*=F()),e.initialValue=e.value,e.offset=G(i.offset)):e.velocity=0}function ni(e,i,n,s){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=n.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const a=e.offset?q(e.offset):0,o=((e.velocity??0)*n.factor+3.6*a)*(s?.5075:1),r=e.decay??1,c=e.max,l=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=o,e.value<l&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=o,e.value>c&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=c)),e.velocity&&1!==r&&(e.velocity*=r),e.value=H(e.value,l,c)}function si(t,e,i){if(!t)return;const{h:n,s:s,l:a}=t;ni(n,!1,e,i),ni(s,!0,e,i),ni(a,!0,e,i)}function ai(e,i,n){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*n}}const oi=new Lt;class ri{enable=!1;mode="destination-out";load(t){R(t)||(Zt(this,"mode",t.mode),Zt(this,"enable",t.enable))}}class ci{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return ao});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let n=e.blend;n?.load||(e.blend=n=new ri),n.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new ri,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function li(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new ci)})}class di{draw(t){!function(t){const{context:e,particle:i,radius:n}=t;i.circleRange??={min:0,max:u};const s=i.circleRange;e.arc(c.x,c.y,n,s.min,s.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,n=i?.angle??{max:360,min:0};e.circleRange=I(n)?{min:Q(n.min),max:Q(n.max)}:{min:0,max:Q(n)}}}async function hi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new di))})}var ui;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(ui||(ui={}));const pi=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,gi=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class fi{accepts(t){return t.startsWith("#")}handleColor(t){return this.#m(t.value)}handleRangeColor(t){return this.#m(t.value)}parseString(t){return this.#m(t)}#m(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(pi,(t,e,i,n,s)=>e+e+i+i+n+n+(void 0===s?"":s+s)),i=gi.exec(e);return i?{a:i[ui.a]?Number.parseInt(i[ui.a],16)/255:1,b:Number.parseInt(i[ui.b]??"0",16),g:Number.parseInt(i[ui.g]??"0",16),r:Number.parseInt(i[ui.r]??"0",16)}:void 0}}async function mi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new fi)})}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 vi=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class bi{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return $e(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return $e({h:W(e.h),l:W(e.l),s:W(e.s)})}parseString(t){if(!this.accepts(t))return;const e=vi.exec(t);return e?Ne({a:e.length>4?nt(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 wi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new bi)})}class xi{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return ro});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Mi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,Dt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new xi(t.pluginManager))})}function Pi(e,i){const n=e.value,s=e.animation,a={delayTime:W(s.delay)*r,enable:s.enable,value:W(e.value)*i,max:$(n)*i,min:j(n)*i,loops:0,maxLoops:W(s.count),time:0};if(s.enable){switch(a.decay=1-W(s.decay),s.mode){case t.AnimationMode.increase:a.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:a.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:a.status=F()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=s.mode===t.AnimationMode.auto;switch(s.startValue){case t.StartValueType.min:a.value=a.min,e&&(a.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:a.value=a.max,e&&(a.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:a.value=q(a),e&&(a.status=F()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function ki(e,i,n,s,a){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const o=(i.velocity??0)*a.factor,r=i.min,c=i.max,l=i.decay??1;i.time??=0;const d=i.delayTime??0;if(!(d>0&&i.time<d&&(i.time+=a.value,i.time<d))){switch(i.status){case t.AnimationStatus.increasing:i.value+=o;break;case t.AnimationStatus.decreasing:i.value-=o}switch(i.velocity&&1!==l&&(i.velocity*=l),i.status){case t.AnimationStatus.increasing:i.value>=c&&(n?i.status=t.AnimationStatus.decreasing:i.value-=c,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(n?i.status=t.AnimationStatus.increasing:i.value+=c,i.loops??=0,i.loops++)}!function(e,i,n,s,a){switch(i){case t.DestroyType.max:n>=a&&e.destroy();break;case t.DestroyType.min:n<=s&&e.destroy()}}(e,s,i.value,r,c),e.destroyed||(i.value=H(i.value,r,c))}}class Ci extends se{destroy=t.DestroyType.none;load(t){super.load(t),R(t)||Zt(this,"destroy",t.destroy)}}class Di extends be{animation=new Ci;value=1;load(t){if(R(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Oi{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Pi(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=W(i.speed)/a*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){ie(t,"opacity",Di,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&ki(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function zi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Oi(t)))})}class Si{modes;#u;#y;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#y=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,n,s){if(!this.modes.includes(s))return;const a=this.#u;let o=!1;for(const t of this.#y)if(o=t.particleBounce?.(e,n,i)??!1,o)break;if(o)return;const r=e.getPosition(),c=e.offset,l=e.getRadius(),d=pt(r,l),h=a.canvas.size,u=!e.isInsideCanvasForOutMode(s,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 n=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.right&&i>0||e.direction===t.OutModeDirection.left&&i<0)){const t=W(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,n=!0}if(!n)return;const s=e.offset.x+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-s:e.outOfCanvas&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=s),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:s,direction:i,bounds:d,canvasSize:h,offset:c,outOfCanvas:u,size:l}),function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.bottom&&e.direction!==t.OutModeDirection.top)return;e.bounds.bottom<0&&e.direction===t.OutModeDirection.top?e.particle.position.y=e.size+e.offset.y:e.bounds.top>e.canvasSize.height&&e.direction===t.OutModeDirection.bottom&&(e.particle.position.y=e.canvasSize.height-e.size-e.offset.y);const i=e.particle.velocity.y;let n=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.bottom&&i>0||e.direction===t.OutModeDirection.top&&i<0)){const t=W(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,n=!0}if(!n)return;const s=e.offset.y+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-s:e.outOfCanvas&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=s),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:s,direction:i,bounds:d,canvasSize:h,offset:c,outOfCanvas:u,size:l})}}class Ii{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,n,s){if(this.modes.includes(s)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(s,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=N(e.position,e.moveCenter),{x:n,y:s}=e.velocity;if(n<0&&t>e.moveCenter.radius||s<0&&i>e.moveCenter.radius||n>=0&&t<-e.moveCenter.radius||s>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class Ti{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,n,s){if(!this.modes.includes(s))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const a=e.options.move.gravity,o=this.#u,r=o.canvas.size,l=e.getRadius();if(a.enable){const n=e.position;(!a.inverse&&n.y>r.height+l&&i===t.OutModeDirection.bottom||a.inverse&&n.y<-l&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+l||e.velocity.y<0&&e.position.y>=-l||e.velocity.x>0&&e.position.x<=r.width+l||e.velocity.x<0&&e.position.x>=-l)return;ht(e.position,o.canvas.size,c,l,i)||e.destroy()}}}const Ri=D.origin;class Ei{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,n,s){if(!this.modes.includes(s))return;const a=this.#u;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;Ri.setTo(c),Ri.length=e.moveCenter.radius,Ri.angle=e.velocity.angle+Math.PI,Ri.addTo(e.moveCenter);const{dx:n,dy:s}=N(e.position,Ri);if(t<=0&&n>=0||i<=0&&s>=0||t>=0&&n<=0||i>=0&&s<=0)return;e.position.x=Math.floor(q({min:0,max:a.canvas.size.width})),e.position.y=Math.floor(q({min:0,max:a.canvas.size.height}));const{dx:o,dy:r}=N(e.position,e.moveCenter);e.direction=Math.atan2(-r,-o),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(e.isInsideCanvasForOutMode(s,i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor(q({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(q({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=N(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction),e.justWarped=!0;break}case t.ParticleOutType.normal:{const n=e.options.move.warp,s=a.canvas.size,o={bottom:s.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:s.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),c=pt(e.position,r);i===t.OutModeDirection.right&&c.left>s.width+e.offset.x?(e.position.x=o.left,e.initialPosition.x=e.position.x,n||(e.position.y=F()*s.height,e.initialPosition.y=e.position.y),e.justWarped=!0):i===t.OutModeDirection.left&&c.right<-e.offset.x&&(e.position.x=o.right,e.initialPosition.x=e.position.x,n||(e.position.y=F()*s.height,e.initialPosition.y=e.position.y),e.justWarped=!0),i===t.OutModeDirection.bottom&&c.top>s.height+e.offset.y?(n||(e.position.x=F()*s.width,e.initialPosition.x=e.position.x),e.position.y=o.top,e.initialPosition.y=e.position.y,e.justWarped=!0):i===t.OutModeDirection.top&&c.bottom<-e.offset.y&&(n||(e.position.x=F()*s.width,e.initialPosition.x=e.position.x),e.position.y=o.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0);break}}}}}class Li{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 Ei(t)),this.#v(e,t.OutMode.destroy,t=>new Ii(t)),this.#v(e,t.OutMode.none,t=>new Ti(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const n=e.options.move.outModes;e.justWarped=!1,this.#b(e,i,n.bottom??n.default,t.OutModeDirection.bottom),this.#b(e,i,n.left??n.default,t.OutModeDirection.left),this.#b(e,i,n.right??n.default,t.OutModeDirection.right),this.#b(e,i,n.top??n.default,t.OutModeDirection.top)}#v(t,e,i){const n=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(n,e)&&this.updaters.set(e,i(this.#u))}#b(t,e,i,n){for(const s of this.updaters.values())s.update(t,n,e,i)}}async function _i(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Li(t)))})}class Fi{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,n=vt(i.paint,t.id,i.reduceDuplicates),s=n?.color,a=s??void 0,o=n?.fill,r=n?.stroke;if(o){const i=ce.create(void 0===a?void 0:ce.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=W(o.opacity),t.fillAnimation=i.animation;const n=Ue(this.#p,i);n&&(t.fillColor=ei(n,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=ce.create(void 0===a?void 0:ce.create(void 0,a),r.color);t.strokeWidth=W(r.width)*e.retina.pixelRatio,t.strokeOpacity=W(r.opacity??1),t.strokeAnimation=i.animation;const n=Ue(this.#p,i)??t.getFillColor();n&&(t.strokeColor=ei(n,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:n,strokeColor:s}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!n&&(void 0!==s?.h.value&&s.h.enable||void 0!==s?.s.value&&s.s.enable||void 0!==s?.l.value&&s.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(si(t.fillColor,e,this.#u.hdr),si(t.strokeColor,e,this.#u.hdr))}}async function Ai(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Fi(t.pluginManager,e)))})}var Bi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Bi||(Bi={}));const Vi=/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 Hi{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:W(e.r),g:W(e.g),b:W(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Vi.exec(t);return e?{a:e.length>4?nt(e[Bi.a]):1,b:parseInt(e[Bi.b]??"0",10),g:parseInt(e[Bi.g]??"0",10),r:parseInt(e[Bi.r]??"0",10)}:void 0}}async function Ui(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Hi)})}class qi extends se{destroy=t.DestroyType.none;load(t){super.load(t),R(t)||Zt(this,"destroy",t.destroy)}}class Wi extends be{animation=new qi;value=3;load(t){if(super.load(t),R(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class ji{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const n=i.animation;n.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/a*e.retina.reduceFactor,n.sync||(t.size.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){ie(t,"size",Wi,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Pi(i,e),t.retina.sizeAnimationSpeed=W(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&ki(t,t.size,!0,t.options.size.animation.destroy,e)}}async function $i(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new ji(t)))})}async function Gi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(async t=>{await Promise.all([li(t),mi(t),wi(t),Ui(t),Mi(t),hi(t),Ai(t),zi(t),_i(t),$i(t)])})}const Ni=new Map;async function Xi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{for(const[e,i]of Ni)t.pluginManager.addEasing(e,i)})}Ni.set("ease-in-quad",t=>t**2),Ni.set("ease-out-quad",t=>1-(1-t)**2),Ni.set("ease-in-out-quad",t=>t<.5?2*t**2:1-(-2*t+2)**2/2);const Yi=["emoji"];function Ki(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}async function Qi(t,e){try{await ot().fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}const Zi='"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';class Ji{#w=new Map;destroy(){for(const[t,e]of this.#w)e instanceof ImageBitmap&&e.close(),this.#w.delete(t)}draw(t){const e=t.particle.emojiDataKey;if(!e)return;const i=this.#w.get(e);i&&function(t,e){const{context:i,opacity:n}=t,s=i.globalAlpha,a=e.width,r=a*o;i.globalAlpha=n,i.drawImage(e,-r,-r,a,a),i.globalAlpha=s}(t,i)}async init(t){const e=t.actualOptions.particles.shape;if(!Yi.some(t=>lt(t,e.type)))return;const i=[Qi(Zi)];yt(Yi.map(t=>e.options[t])[0],t=>{t.font&&i.push(Qi(t.font))}),await Promise.all(i)}particleDestroy(t){t.emojiDataKey=void 0}particleInit(t,e){const i=e.shapeData;if(!i.value)return;const n=vt(i.value,e.randomIndexData);if(!n)return;const s="string"==typeof n?{font:i.font??Zi,padding:i.padding??0,value:n}:{font:Zi,padding:0,...i,...n},a=s.font,o=s.value,r=`${o}_${a}`;if(this.#w.has(r))return void(e.emojiDataKey=r);const c=2*s.padding,l=$(e.size.value),d=l+c,h=2*d,u=new OffscreenCanvas(h,h),p=u.getContext("2d",t.canvas.render.settings);if(!p)return;p.font=`400 ${(2*l).toString()}px ${a}`,p.textBaseline="middle",p.textAlign="center",p.fillText(o,d,d);const g=u instanceof HTMLCanvasElement?u:u.transferToImageBitmap();this.#w.set(r,g),e.emojiDataKey=r}}async function tn(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(Yi,()=>Promise.resolve(new Ji))})}class en{enable=!1;mode=[];load(t){R(t)||(Zt(this,"enable",t.enable),Zt(this,"mode",t.mode))}}var nn,sn,an;!function(t){t.circle="circle",t.rectangle="rectangle"}(nn||(nn={}));class on{enable=!1;mode=[];selectors=[];type=nn.circle;load(t){R(t)||(Zt(this,"selectors",t.selectors),Zt(this,"enable",t.enable),Zt(this,"mode",t.mode),Zt(this,"type",t.type))}}class rn{enable=!1;mode=[];load(t){R(t)||(Zt(this,"enable",t.enable),Zt(this,"mode",t.mode))}}class cn{onClick=new en;onDiv=new on;onHover=new rn;load(t){if(R(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=yt(e,t=>{const e=new on;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(sn||(sn={}));class ln{#u;#p;constructor(t,e){this.#p=t,this.#u=e}load(t){if(R(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 dn{detectsOn=sn.window;events=new cn;modes;constructor(t,e){this.modes=new ln(t,e)}load(t){if(R(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class hn{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return ho});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let n=e.interactivity;n?.load||(e.interactivity=n=new dn(this.#p,t)),n.load(i?.interactivity);const s=this.#p.interactors?.get(t);if(s)for(const t of s)t.loadOptions&&t.loadOptions(e,i)}loadParticlesOptions(t,e,i){i?.interactivity&&(e.interactivity=gt({},i.interactivity));const n=this.#p.interactors?.get(t);if(n)for(const t of n)t.loadParticlesOptions?.(e,i)}needsPlugin(){return!0}}!function(t){t.external="external",t.particles="particles"}(an||(an={}));class un{type=an.external;container;constructor(t){this.container=t}}class pn{type=an.particles;container;constructor(t){this.container=t}}const gn="pointerdown",fn="pointerup",mn="pointerleave",yn="pointermove",vn="touchstart",bn="touchend",wn="touchmove",xn="touchcancel";function Mn(t,e){if(T(t))return t.find((t,i)=>e(t,i));return e(t,0)?t:void 0}function Pn(t,e){return!!Mn(e,e=>e.enable&<(t,e.mode))}function kn(t,e,i){yt(e,e=>{const n=e.mode;e.enable&<(t,n)&&function(t,e){const i=t.selectors;yt(i,i=>{e(i,t)})}(e,i)})}function Cn(t,e){if(e&&t)return Mn(t,t=>function(t,e){const i=yt(e,e=>t.matches(e));return T(i)?i.some(t=>t):i}(e,t.selectors))}function Dn(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}const On=D.origin;function zn(t,e,i,n,s,a,o){const r=e.actualOptions.interactivity?.modes.attract;if(!r)return;const c=e.particles.grid.query(s,a);for(const e of c){const{dx:s,dy:a,distance:c}=N(e.position,i),l=r.speed*r.factor,d=H(t.getEasing(r.easing)(1-c/n)*l,1,r.maxSpeed);On.x=c?s/c*d:l,On.y=c?a/c*d:l,o?.(e),e.position.subFrom(On)}}let Sn=class{distance=200;duration=.4;easing="ease-out-quad";factor=1;maxSpeed=50;restore;speed=1;constructor(){this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){R(t)||(Zt(this,"distance",t.distance),Zt(this,"duration",t.duration),void 0!==t.easing&&(this.easing=t.easing),Zt(this,"factor",t.factor),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed),Zt(this,"speed",t.speed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}};const In="attract";let Tn=class extends un{handleClickMode;#x;#M;#p;#P;constructor(t,e){super(e),this.#p=t,this.#M=0,this.#x=new Set,this.#P=new Map,e.attract??={particles:[]},this.handleClickMode=(t,i)=>{const n=this.container.actualOptions,s=n.interactivity?.modes.attract;if(s&&t===In){e.attract??={particles:[]},e.attract.clicking=!0,e.attract.count=0;for(const t of e.attract.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);e.attract.particles=[],e.attract.finish=!1,setTimeout(()=>{e.destroyed||(e.attract??={particles:[]},e.attract.clicking=!1)},s.duration*r)}}}get maxDistance(){return this.#M}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.attract;e&&(this.#M=e.distance,t.retina.attractModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#x.clear();const e=this.container.actualOptions,i=t.status===yn,n=e.interactivity?.events;if(!n)return;const{enable:s,mode:a}=n.onHover,{enable:o,mode:r}=n.onClick;i&&s&<(In,a)?function(t,e,i,n,s){const a=i.mouse.position,o=e.retina.attractModeDistance;!o||o<0||!a||zn(t,e,a,o,new Xt(a.x,a.y,o),t=>n(t),s)}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#k(t)}):o&<(In,r)&&function(t,e,i,n,s){e.attract??={particles:[]};const{attract:a}=e;if(a.finish||(a.count??=0,a.count++,a.count===e.particles.count&&(a.finish=!0)),a.clicking){const a=i.mouse.clickPosition,o=e.retina.attractModeDistance;if(!o||o<0||!a)return;zn(t,e,a,o,new Xt(a.x,a.y,o),t=>n(t),s)}else!1===a.clicking&&(a.particles=[])}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#k(t)}),this.#C()}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!(n.position&&s?.onHover.enable||n.clickPosition&&s?.onClick.enable))return!1;const a=s.onHover.mode,o=s.onClick.mode;return lt(In,a)||lt(In,o)}loadModeOptions(t,...e){ie(t,"attract",Sn,...e)}reset(){}#C(){const t=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!t?.enable||!this.#P.size)return;const e=Date.now(),i=t.delay*r,n=Math.max(.001,Math.min(1,t.speed));for(const[s,a]of this.#P){if(this.#x.has(s))continue;if(s.destroyed){this.#P.delete(s);continue}const o=a.target;if(e-a.lastInteractionTime<i)continue;let r=o.x-s.position.x,c=o.y-s.position.y,l=o.z-s.position.z;if(t.follow&&s.options.move.enable){const{x:t,y:e,z:i}=s.velocity,n=t*t+e*e+i*i;if(n>0){const s=(r*t+c*e+l*i)/n;r-=t*s,c-=e*s,l-=i*s}}s.position.x+=r*n,s.position.y+=c*n,s.position.z+=l*n,Math.abs(r)<=.5&&Math.abs(c)<=.5&&(s.position.x=o.x,s.position.y=o.y,s.position.z=o.z,this.#P.delete(s))}}#k(t){this.#x.add(t);const e=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!e?.enable)return;const i=Date.now();let n=this.#P.get(t);n||(n={target:t.position.copy(),lastInteractionTime:i},this.#P.set(t,n)),n.lastInteractionTime=i}};async function Rn(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalAttract",e=>Promise.resolve(new Tn(t.pluginManager,e)))})}const En=Math.PI*o;function Ln(t,e,i,n,s){const a=t.particles.grid.query(n,s);for(const t of a)n instanceof Xt?mt(ft(t),{position:e,mass:i**2*En,velocity:D.origin,factor:D.origin}):n instanceof Yt&&An(t,pt(e,i))}function _n(t,e,i,n){kn(i,e,(e,i)=>{!function(t,e,i,n){const s=ot().querySelectorAll(e);s.length&&s.forEach(e=>{const s=e,a=t.retina.pixelRatio,r={x:(s.offsetLeft+s.offsetWidth*o)*a,y:(s.offsetTop+s.offsetHeight*o)*a},c=s.offsetWidth*o*a,l=10*a,d=i.type===nn.circle?new Xt(r.x,r.y,c+l):new Yt(s.offsetLeft*a-l,s.offsetTop*a-l,s.offsetWidth*a+2*l,s.offsetHeight*a+2*l);n(r,c,d)})}(t,e,i,(e,i,s)=>{Ln(t,e,i,s,n)})})}function Fn(t){const e={bounced:!1},{pSide:i,pOtherSide:n,rectSide:s,rectOtherSide:a,velocity:r,factor:c}=t;return n.min<a.min||n.min>a.max||n.max<a.min||n.max>a.max||(i.max>=s.min&&i.max<=(s.max+s.min)*o&&r>0||i.min<=s.max&&i.min>(s.max+s.min)*o&&r<0)&&(e.velocity=r*-c,e.bounced=!0),e}function An(t,e){const i=pt(t.getPosition(),t.getRadius()),n=t.options.bounce,s=Fn({pSide:{min:i.left,max:i.right},pOtherSide:{min:i.top,max:i.bottom},rectSide:{min:e.left,max:e.right},rectOtherSide:{min:e.top,max:e.bottom},velocity:t.velocity.x,factor:W(n.horizontal.value)});s.bounced&&(void 0!==s.velocity&&(t.velocity.x=s.velocity),void 0!==s.position&&(t.position.x=s.position));const a=Fn({pSide:{min:i.top,max:i.bottom},pOtherSide:{min:i.left,max:i.right},rectSide:{min:e.top,max:e.bottom},rectOtherSide:{min:e.left,max:e.right},velocity:t.velocity.y,factor:W(n.vertical.value)});a.bounced&&(void 0!==a.velocity&&(t.velocity.y=a.velocity),void 0!==a.position&&(t.position.y=a.position))}class Bn{distance=200;load(t){R(t)||Zt(this,"distance",t.distance)}}const Vn="bounce";class Hn extends un{#M;constructor(t){super(t),this.#M=0}get maxDistance(){return this.#M}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bounce;e&&(this.#M=e.distance,t.retina.bounceModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,n=t.status===yn;if(!i)return;const s=i.onHover.enable,a=i.onHover.mode,o=i.onDiv;n&&s&<(Vn,a)?function(t,e,i){const n=10*t.retina.pixelRatio,s=e.mouse.position,a=t.retina.bounceModeDistance;!a||a<0||!s||Ln(t,s,a,new Xt(s.x,s.y,a+n),i)}(this.container,t,e=>this.isEnabled(t,e)):_n(this.container,o,Vn,e=>this.isEnabled(t,e))}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const a=s.onDiv;return!!n.position&&s.onHover.enable&<(Vn,s.onHover.mode)||Pn(Vn,a)}loadModeOptions(t,...e){ie(t,"bounce",Bn,...e)}reset(){}}async function Un(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalBounce",t=>Promise.resolve(new Hn(t)))})}class qn{color;distance=200;duration=.4;mix=!1;opacity;size;load(t){if(!R(t)){if(Zt(this,"distance",t.distance),Zt(this,"duration",t.duration),Zt(this,"mix",t.mix),Jt(this,"opacity",t.opacity),void 0!==t.color){const e=T(this.color)?void 0:this.color;this.color=yt(t.color,t=>re.create(e,t))}Zt(this,"size",t.size)}}}class Wn extends qn{selectors=[];load(t){super.load(t),R(t)||Zt(this,"selectors",t.selectors)}}class jn extends qn{divs;load(t){super.load(t),R(t)||(this.divs=yt(t.divs,t=>{const e=new Wn;return e.load(t),e}))}}class $n{div;enabled=!1;fillColor;finalColor;id="bubble";inRange=!1;opacity;priority=100;radius;strokeColor}var Gn;function Nn(t,e,i,n){if(e>=i){return H(t+(e-i)*n,t,e)}if(e<i){return H(t-(i-e)*n,e,t)}}!function(t){t.color="color",t.opacity="opacity",t.size="size"}(Gn||(Gn={}));const Xn="bubble";class Yn extends un{handleClickMode;#M;#D=new WeakMap;#p;constructor(t,e){super(e),this.#p=t,this.#M=0,e.bubble??={},this.handleClickMode=t=>{t===Xn&&(e.bubble??={},e.bubble.clicking=!0)}}get maxDistance(){return this.#M}clear(t,e,i){const n=this.#D.get(t);n?.inRange&&!i||(t.removeModifier(Xn),this.#D.delete(t))}getOrCreateModifier(t){let e=this.#D.get(t);return e||(e=new $n,this.#D.set(t,e),t.addModifier(e)),e}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bubble;e&&(this.#M=e.distance,t.retina.bubbleModeDistance=e.distance*t.retina.pixelRatio,void 0!==e.size&&(t.retina.bubbleModeSize=e.size*t.retina.pixelRatio))}interact(t,e){const i=this.container.actualOptions,n=i.interactivity?.events;if(!n)return;const s=n.onHover,a=n.onClick,o=s.enable,r=s.mode,c=a.enable,l=a.mode,d=n.onDiv;o&<(Xn,r)?this.#O(t):c&<(Xn,l)?this.#z(t):kn(Xn,d,(i,n)=>{this.#S(t,e,i,n)})}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const{onClick:a,onDiv:o,onHover:r}=s,c=Pn(Xn,o);return!!(c||r.enable&&n.position||a.enable&&n.clickPosition)&&(lt(Xn,r.mode)||lt(Xn,a.mode)||c)}loadModeOptions(t,...e){ie(t,"bubble",jn,...e)}reset(t,e){const i=this.#D.get(e);i&&(i.enabled=!1,i.inRange=!1)}#z(t){const e=this.container,i=e.actualOptions,n=t.mouse.clickPosition,s=i.interactivity?.modes.bubble;if(!s||!n)return;e.bubble??={};const a=e.retina.bubbleModeDistance;if(!a||a<0)return;const o=e.particles.grid.queryCircle(n,a,e=>this.isEnabled(t,e)),{bubble:c}=e;for(const i of o){if(!c.clicking)continue;const o=this.getOrCreateModifier(i);o.enabled=!c.durationEnd,o.inRange=!c.durationEnd;const l=Y(i.getPosition(),n),d=(performance.now()-(t.mouse.clickTime??0))/r;d>s.duration&&(c.durationEnd=!0),d>2*s.duration&&(c.clicking=!1,c.durationEnd=!1);const h={bubbleObj:{optValue:e.retina.bubbleModeSize,value:o.radius},particlesObj:{optValue:i.size.max,value:i.size.value},type:Gn.size};this.#I(i,l,d,h);const u={bubbleObj:{optValue:s.opacity,value:o.opacity},particlesObj:{optValue:i.opacity?.max??1,value:i.opacity?.value??1},type:Gn.opacity};this.#I(i,l,d,u),!c.durationEnd&&l<=a?this.#T(i,l):(o.fillColor=void 0,o.strokeColor=void 0)}}#O(t){const e=this.container,i=t.mouse.position,n=e.retina.bubbleModeDistance;if(!n||n<0||!i)return;const s=e.particles.grid.queryCircle(i,n,e=>this.isEnabled(t,e));for(const e of s){const s=this.getOrCreateModifier(e);s.enabled=!0,s.inRange=!0;const a=Y(e.getPosition(),i),o=1-a/n;a<=n?o>=0&&t.status===yn&&(this.#R(e,o),this.#E(e,o),this.#T(e,o)):this.reset(t,e),t.status===mn&&this.reset(t,e)}}#T(t,e,i){const n=this.container.actualOptions,s=i??n.interactivity?.modes.bubble,a=this.getOrCreateModifier(t);if(s){if(!a.finalColor){const t=s.color;if(!t)return;const e=vt(t);a.finalColor=Ue(this.#p,e)}if(a.finalColor)if(s.mix){a.fillColor=void 0,a.strokeColor=void 0;const i=t.getFillColor();if(i){const t=qe(Qe(i,a.finalColor,1-e,e));a.fillColor=t,a.strokeColor=t}else a.fillColor=a.finalColor,a.strokeColor=a.finalColor}else a.fillColor=a.finalColor,a.strokeColor=a.finalColor}}#E(t,e,i){const n=this.container.actualOptions,s=i?.opacity??n.interactivity?.modes.bubble?.opacity;if(!s)return;const a=Nn(t.opacity?.value??1,s,t.opacity?.max??1,e);if(void 0!==a){this.getOrCreateModifier(t).opacity=a}}#R(t,e,i){const n=this.container,s=i?.size?i.size*n.retina.pixelRatio:n.retina.bubbleModeSize;if(void 0===s)return;const a=Nn(t.size.value,s,t.size.max,e);if(void 0!==a){this.getOrCreateModifier(t).radius=a}}#I(t,e,i,n){const s=this.container,a=n.bubbleObj.optValue,o=s.actualOptions,r=o.interactivity?.modes.bubble;if(!r||void 0===a)return;const c=r.duration,l=s.retina.bubbleModeDistance,d=n.particlesObj.optValue,h=n.bubbleObj.value,u=n.particlesObj.value??0,p=n.type;if(!l||l<0||a===d)return;s.bubble??={};const g=this.getOrCreateModifier(t);if(s.bubble.durationEnd)h&&(p===Gn.size&&(g.radius=void 0),p===Gn.opacity&&(g.opacity=void 0));else if(e<=l){if((h??u)!==a){const t=u-i*(u-a)/c;p===Gn.size&&(g.radius=t),p===Gn.opacity&&(g.opacity=t)}}else p===Gn.size&&(g.radius=void 0),p===Gn.opacity&&(g.opacity=void 0)}#S(t,e,i,n){const s=this.container,a=ot().querySelectorAll(i),r=s.actualOptions.interactivity?.modes.bubble;r&&a.length&&a.forEach(i=>{const a=i,c=s.retina.pixelRatio,l={x:(a.offsetLeft+a.offsetWidth*o)*c,y:(a.offsetTop+a.offsetHeight*o)*c},d=a.offsetWidth*o*c,h=n.type===nn.circle?new Xt(l.x,l.y,d):new Yt(a.offsetLeft*c,a.offsetTop*c,a.offsetWidth*c,a.offsetHeight*c),u=s.particles.grid.query(h,e=>this.isEnabled(t,e));for(const t of u){if(!h.contains(t.getPosition()))continue;const i=this.getOrCreateModifier(t);i.enabled=!0,i.inRange=!0;const n=Cn(r.divs,a);i.div&&i.div===a||(this.clear(t,e,!0),i.div=a),this.#R(t,1,n),this.#E(t,1,n),this.#T(t,1,n)}})}}async function Kn(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalBubble",e=>Promise.resolve(new Yn(t.pluginManager,e)))})}class Qn{opacity=.5;load(t){R(t)||Jt(this,"opacity",t.opacity)}}class Zn{distance=80;links=new Qn;radius=60;load(t){R(t)||(Zt(this,"distance",t.distance),this.links.load(t.links),Zt(this,"radius",t.radius))}}function Jn(t,e,i,n){const s=t.actualOptions,a=s.interactivity?.modes.connect;if(a)return function(t,e,i,n,s){const a=Math.floor(n.getRadius()/i.getRadius()),o=i.getFillColor(),r=n.getFillColor();if(!o||!r)return;const c=i.getPosition(),l=n.getPosition(),d=Qe(o,r,i.getRadius(),n.getRadius()),h=e.createLinearGradient(c.x,c.y,l.x,l.y);return h.addColorStop(0,Ke(o,t.hdr,s)),h.addColorStop(H(a,0,1),Ye(d,t.hdr,s)),h.addColorStop(1,Ke(r,t.hdr,s)),h}(t,e,i,n,a.links.opacity)}function ts(t,e,i){t.canvas.render.draw(n=>{const s=Jn(t,n,e,i);if(!s)return;const a=e.getPosition(),o=i.getPosition();!function(t,e,i,n,s){Ki(t,n,s),t.lineWidth=e,t.strokeStyle=i,t.stroke()}(n,e.retina.linksWidth??0,s,a,o)})}class es extends un{#M;constructor(t){super(t),this.#M=0}get maxDistance(){return this.#M}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.connect;e&&(this.#M=e.distance,t.retina.connectModeDistance=e.distance*t.retina.pixelRatio,t.retina.connectModeRadius=e.radius*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions;if(i.interactivity?.events.onHover.enable&&"pointermove"===t.status){const i=t.mouse.position,{connectModeDistance:n,connectModeRadius:s}=e.retina;if(!n||n<0||!s||s<0||!i)return;const a=Math.abs(s),o=e.particles.grid.queryCircle(i,a,e=>this.isEnabled(t,e));o.forEach((t,i)=>{const s=t.getPosition();for(const a of o.slice(i+1)){const i=a.getPosition(),o=Math.abs(n),r=Math.abs(s.x-i.x),c=Math.abs(s.y-i.y);r<o&&c<o&&ts(e,t,a)}})}}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!(!s?.onHover.enable||!n.position)&<("connect",s.onHover.mode)}loadModeOptions(t,...e){ie(t,"connect",Zn,...e)}reset(){}}async function is(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalConnect",t=>Promise.resolve(new es(t)))})}function ns(t,e){const i=t.particles.grid.query(e);for(const t of i)t.destroy()}function ss(t,e,i){kn(i,e,(e,i)=>{!function(t,e,i){const n=ot().querySelectorAll(e);n.length&&n.forEach(e=>{const n=e,s=t.retina.pixelRatio,a={x:(n.offsetLeft+n.offsetWidth*o)*s,y:(n.offsetTop+n.offsetHeight*o)*s},r=n.offsetWidth*o*s,c=10*s,l=i.type===nn.circle?new Xt(a.x,a.y,r+c):new Yt(n.offsetLeft*s-c,n.offsetTop*s-c,n.offsetWidth*s+2*c,n.offsetHeight*s+2*c);ns(t,l)})}(t,e,i)})}class as{distance=200;load(t){R(t)||Zt(this,"distance",t.distance)}}const os="destroy";class rs extends un{#M;constructor(t){super(t),this.#M=0}get maxDistance(){return this.#M}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.destroy;e&&(this.#M=e.distance,t.retina.destroyModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,n=t.status===yn;if(!i)return;const s=i.onHover.enable,a=i.onHover.mode,o=i.onDiv;n&&s&<(os,a)?function(t,e){const i=10*t.retina.pixelRatio,n=e.mouse.position,s=t.retina.destroyModeDistance;!s||s<0||!n||ns(t,new Xt(n.x,n.y,s+i))}(this.container,t):ss(this.container,o,os)}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const a=s.onDiv;return!!n.position&&s.onHover.enable&<(os,s.onHover.mode)||Pn(os,a)}loadModeOptions(t,...e){ie(t,"destroy",as,...e)}reset(){}}async function cs(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalDestroy",async t=>Promise.resolve(new rs(t)))})}class ls{blink=!1;color;consent=!1;opacity=1;load(t){R(t)||(Zt(this,"blink",t.blink),void 0!==t.color&&(this.color=re.create(this.color,t.color)),Zt(this,"consent",t.consent),Jt(this,"opacity",t.opacity))}}class ds{distance=100;links=new ls;load(t){R(t)||(Zt(this,"distance",t.distance),this.links.load(t.links))}}function hs(t,e,i,n,s){t.canvas.render.draw(a=>{const o=e.getPosition();!function(t,e,i,n,s,a,o=!1){Ki(t,i,n),t.strokeStyle=Ye(s,o,a),t.lineWidth=e,t.stroke()}(a,e.retina.linksWidth??0,o,s,i,n,t.hdr)})}class us extends un{#M;#p;constructor(t,e){super(e),this.#p=t,this.#M=0}get maxDistance(){return this.#M}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.grab;e&&(this.#M=e.distance,t.retina.grabModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions.interactivity;if(!i?.modes.grab||!i.events.onHover.enable||t.status!==yn)return;const n=t.mouse.position;if(!n)return;const s=e.retina.grabModeDistance;if(!s||s<0)return;const a=e.particles.grid.queryCircle(n,s,e=>this.isEnabled(t,e));for(const t of a){const a=Y(t.getPosition(),n);if(a>s)continue;const o=i.modes.grab.links,r=o.opacity,c=r-a*r/s;if(c<=0)continue;const l=o.color??t.options.links?.color;if(!e.particles.grabLineColor&&l){const t=i.modes.grab.links;e.particles.grabLineColor=Je(this.#p,l,t.blink,t.consent)}const d=Ze(t,void 0,e.particles.grabLineColor);d&&hs(e,t,d,c,n)}}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!s?.onHover.enable&&!!n.position&<("grab",s.onHover.mode)}loadModeOptions(t,...e){ie(t,"grab",ds,...e)}reset(){}}async function ps(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalGrab",e=>Promise.resolve(new us(t.pluginManager,e)))})}class gs{force=2;smooth=10;load(t){R(t)||(Zt(this,"force",t.force),Zt(this,"smooth",t.smooth))}}class fs extends un{maxDistance=0;constructor(t){super(t)}clear(){}init(){}interact(t){for(const e of this.container.particles.filter(e=>this.isEnabled(t,e)))this.#L(t,e)}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!s?.onHover.enable&&!!n.position&<("parallax",s.onHover.mode)}loadModeOptions(t,...e){ie(t,"parallax",gs,...e)}reset(){}#L(t,e){if(!this.isEnabled(t,e))return;const i=this.container,n=i.actualOptions,s=n.interactivity?.modes.parallax;if(!s)return;const a=s.force,r=t.mouse.position;if(!r)return;const c=i.canvas.size,l=c.width*o,d=c.height*o,h=s.smooth,u=e.getRadius()/a,p=(r.x-l)*u,g=(r.y-d)*u,{offset:f}=e;f.x+=(p-f.x)/h,f.y+=(g-f.y)/h}}async function ms(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalParallax",t=>Promise.resolve(new fs(t)))})}const ys="pause";class vs extends un{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{if(t!==ys)return;const e=this.container;e.animationStatus?e.pause():e.play()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,n=(e?.interactivity??i.interactivity)?.events;return!!n&<(ys,n.onClick.mode)}reset(){}}async function bs(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalPause",t=>Promise.resolve(new vs(t)))})}class ws{default=!0;groups=[];particles;quantity=4;load(t){R(t)||(Zt(this,"default",t.default),void 0!==t.groups&&(this.groups=t.groups.map(t=>t)),this.groups.length||(this.default=!0),Jt(this,"quantity",t.quantity),this.particles=yt(t.particles,t=>gt({},t)))}}const xs="push";class Ms extends un{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=(t,e)=>{if(t!==xs)return;const i=this.container,n=i.actualOptions,s=n.interactivity?.modes.push;if(!s)return;const a=W(s.quantity);if(a<=0)return;const o=dt([void 0,...s.groups]),r=gt(void 0!==o?i.actualOptions.particles.groups[o]:void 0,vt(s.particles));i.particles.push(a,e.mouse.position,r,o)}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;return!!s&&n.clicking&&n.inside&&!!n.position&<(xs,s.onClick.mode)}loadModeOptions(t,...e){ie(t,"push",ws,...e)}reset(){}}async function Ps(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalPush",t=>Promise.resolve(new Ms(t)))})}class ks{quantity=2;load(t){R(t)||Jt(this,"quantity",t.quantity)}}const Cs="remove";class Ds extends un{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{const e=this.container,i=e.actualOptions;if(!i.interactivity?.modes.remove||t!==Cs)return;const n=W(i.interactivity.modes.remove.quantity);for(let t=0;t<n;t++)e.particles.get(t)?.destroy()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;return!!s&&n.clicking&&n.inside&&!!n.position&<(Cs,s.onClick.mode)}loadModeOptions(t,...e){ie(t,"remove",ks,...e)}reset(){}}async function Os(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalRemove",t=>Promise.resolve(new Ds(t)))})}class zs{distance=200;duration=.4;easing="ease-out-quad";factor=100;maxSpeed=50;restore;speed=1;constructor(){this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){R(t)||(Zt(this,"distance",t.distance),Zt(this,"duration",t.duration),Zt(this,"easing",t.easing),Zt(this,"factor",t.factor),Zt(this,"speed",t.speed),Zt(this,"maxSpeed",t.maxSpeed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}}class Ss extends zs{selectors=[];load(t){super.load(t),R(t)||Zt(this,"selectors",t.selectors)}}class Is extends zs{divs;load(t){super.load(t),R(t)||(this.divs=yt(t.divs,t=>{const e=new Ss;return e.load(t),e}))}}const Ts="repulse";class Rs extends un{handleClickMode;#_;#x;#M;#F;#p;#P;constructor(t,e){super(e),this.#p=t,this.#M=0,this.#F=D.origin,this.#x=new Set,this.#_=D.origin,this.#P=new Map,e.repulse??={particles:[]},this.handleClickMode=(t,i)=>{const n=this.container.actualOptions,s=n.interactivity?.modes.repulse;if(!s||t!==Ts)return;e.repulse??={particles:[]};const a=e.repulse;a.clicking=!0,a.count=0;for(const t of e.repulse.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);a.particles=[],a.finish=!1,setTimeout(()=>{e.destroyed||(a.clicking=!1)},s.duration*r)}}get maxDistance(){return this.#M}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.repulse;e&&(this.#M=e.distance,t.retina.repulseModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#x.clear();const e=this.container.actualOptions,i=t.status===yn,n=e.interactivity?.events;if(!n)return;const s=n.onHover,a=s.enable,o=s.mode,r=n.onClick,c=r.enable,l=r.mode,d=n.onDiv;i&&a&<(Ts,o)?this.#A(t):c&<(Ts,l)?this.#B(t):kn(Ts,d,(e,i)=>{this.#V(t,e,i)}),this.#C()}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const a=s.onDiv,o=s.onHover,r=s.onClick,c=Pn(Ts,a);if(!(c||o.enable&&n.position||r.enable&&n.clickPosition))return!1;const l=o.mode,d=r.mode;return lt(Ts,l)||lt(Ts,d)||c}loadModeOptions(t,...e){ie(t,"repulse",Is,...e)}reset(){}#B(t){const e=this.container,i=e.actualOptions.interactivity?.modes.repulse;if(!i)return;const n=e.repulse??{particles:[]};if(n.finish||(n.count??=0,n.count++,n.count===e.particles.count&&(n.finish=!0)),n.clicking){const s=e.retina.repulseModeDistance;if(!s||s<0)return;const a=Math.pow(s/6,3),o=t.mouse.clickPosition;if(void 0===o)return;const r=new Xt(o.x,o.y,a),c=e.particles.grid.query(r,e=>this.isEnabled(t,e));for(const t of c){const{dx:e,dy:s,distance:r}=N(o,t.position),c=r**2,l=-a*i.speed/c;c<=a&&(this.#k(t),n.particles.push(t),this.#_.x=e,this.#_.y=s,this.#_.length=l,t.velocity.setTo(this.#_))}}else if(!1===n.clicking){for(const t of n.particles)t.velocity.setTo(t.initialVelocity);n.particles=[]}}#A(t){const e=this.container,i=t.mouse.position,n=e.retina.repulseModeDistance;!n||n<0||!i||this.#H(t,i,n,new Xt(i.x,i.y,n))}#H(t,e,i,n,s){const a=this.container,o=a.particles.grid.query(n,e=>this.isEnabled(t,e)),r=a.actualOptions.interactivity?.modes.repulse;if(!r)return;const{easing:c,speed:l,factor:d,maxSpeed:h}=r,u=this.#p.getEasing(c),p=(s?.speed??l)*d;for(const t of o){const{dx:n,dy:s,distance:a}=N(t.position,e),o=H(u(1-a/i)*p,0,h);this.#F.x=a?n/a*o:p,this.#F.y=a?s/a*o:p,this.#k(t),t.position.addTo(this.#F)}}#C(){const t=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!t?.enable||!this.#P.size)return;const e=Date.now(),i=t.delay*r,n=Math.max(.001,Math.min(1,t.speed));for(const[s,a]of this.#P){if(this.#x.has(s))continue;if(s.destroyed){this.#P.delete(s);continue}const o=a.target;if(e-a.lastInteractionTime<i)continue;t.follow&&s.options.move.enable&&(o.x+=s.velocity.x,o.y+=s.velocity.y,o.z+=s.velocity.z);const r=o.x-s.position.x,c=o.y-s.position.y,l=o.z-s.position.z;s.position.x+=r*n,s.position.y+=c*n,s.position.z+=l*n,Math.abs(r)<=.5&&Math.abs(c)<=.5&&(s.position.x=o.x,s.position.y=o.y,s.position.z=o.z,this.#P.delete(s))}}#V(t,e,i){const n=this.container,s=n.actualOptions.interactivity?.modes.repulse;if(!s)return;const a=ot().querySelectorAll(e);a.length&&a.forEach(e=>{const a=e,r=n.retina.pixelRatio,c={x:(a.offsetLeft+a.offsetWidth*o)*r,y:(a.offsetTop+a.offsetHeight*o)*r},l=a.offsetWidth*o*r,d=i.type===nn.circle?new Xt(c.x,c.y,l):new Yt(a.offsetLeft*r,a.offsetTop*r,a.offsetWidth*r,a.offsetHeight*r),h=Cn(s.divs,a);this.#H(t,c,l,d,h)})}#k(t){this.#x.add(t);const e=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!e?.enable)return;const i=Date.now();let n=this.#P.get(t);n||(n={target:t.position.copy(),lastInteractionTime:i},this.#P.set(t,n)),n.lastInteractionTime=i,e.follow&&t.options.move.enable&&(n.target.x+=t.velocity.x,n.target.y+=t.velocity.y,n.target.z+=t.velocity.z)}}async function Es(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{Dn(t);const e=t.pluginManager;e.addInteractor?.("externalRepulse",t=>Promise.resolve(new Rs(e,t)))})}class Ls{factor=3;radius=200;load(t){R(t)||(Zt(this,"factor",t.factor),Zt(this,"radius",t.radius))}}class _s{enabled=!1;id="slow";priority=100;speedFactor=1}const Fs="slow";class As extends un{#M;#D=new WeakMap;constructor(t){super(t),this.#M=0}get maxDistance(){return this.#M}clear(t,e,i){const n=this.#D.get(t);n?.enabled&&!i||(t.removeModifier(Fs),this.#D.delete(t))}getOrCreateModifier(t){let e=this.#D.get(t);return e||(e=new _s,this.#D.set(t,e),t.addModifier(e)),e}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.slow;e&&(this.#M=e.radius,t.retina.slowModeRadius=e.radius*t.retina.pixelRatio)}interact(){}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!s?.onHover.enable&&!!n.position&<(Fs,s.onHover.mode)}loadModeOptions(t,...e){ie(t,"slow",Ls,...e)}reset(t,e){const i=this.#D.get(e);i&&(i.enabled=!1);const n=this.container,s=n.actualOptions,a=t.mouse.position,o=n.retina.slowModeRadius,r=s.interactivity?.modes.slow;if(!r||!o||o<0||!a)return;const c=Y(a,e.getPosition()),l=c/o,d=r.factor;if(c>o)return;const h=this.getOrCreateModifier(e);h.enabled=!0,h.speedFactor=l/d}}async function Bs(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("externalSlow",t=>Promise.resolve(new As(t)))})}const Vs=["image","images"],Hs=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function Us(t){return new Promise(e=>{t.loading=!0;const i=new Image;t.element=i,i.addEventListener("load",()=>{t.loading=!1,e()}),i.addEventListener("error",()=>{t.element=void 0,t.error=!0,t.loading=!1,Rt().error(`Error loading image: ${t.source}`),e()}),i.src=t.source})}async function qs(t){if("svg"!==t.type)return void await Us(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(Rt().error("Image not found"),t.error=!0),t.loading=!1}function Ws(t,e,i,n,s=!1){const a=function(t,e,i,n=!1){const{svgData:s}=t;if(!s)return"";const a=Ke(e,n,i);if(s.includes("fill"))return s.replaceAll(Hs,()=>a);const o=s.indexOf(">");return`${s.substring(0,o)} fill="${a}"${s.substring(o)}`}(t,i,n.opacity?.value??1,s),o={color:i,data:{...t,svgData:a},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise(e=>{const i=new Blob([a],{type:"image/svg+xml"}),n=URL.createObjectURL(i),s=new Image;s.addEventListener("load",()=>{o.loaded=!0,o.element=s,e(o),URL.revokeObjectURL(n)});s.addEventListener("error",()=>{(async()=>{URL.revokeObjectURL(n);const i={...t,error:!1,loading:!0};await Us(i),o.loaded=!0,o.element=i.element,e(o)})()}),s.src=n})}class js{#u;#s;constructor(t,e){this.#s=t,this.#u=e}draw(t){const{context:e,radius:i,particle:n,opacity:s}=t,a=n.image,o=a?.element;if(a){if(e.globalAlpha=s,o){const t=a.ratio,n={x:-i,y:-i},s=2*i;e.drawImage(o,n.x,n.y,s,s/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(!e.preload||!this.#s.loadImage)return;const i=[];for(const n of e.preload)i.push(this.#s.loadImage(t,n));await Promise.all(i)}loadShape(t){const e=this.#u;if(!t.shape||!Vs.includes(t.shape))return;const i=t.shapeData;if(!i)return;const n=this.#s.getImages?.(e),s=n?.find(t=>t.name===i.name||t.source===i.src);s||this.#U(e,i).then(()=>{this.loadShape(t)})}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;const i=this.#s.getImages?.(t),n=e.shapeData;if(!n)return;const s=e.getFillColor(),a=i?.find(t=>t.name===n.name||t.source===n.src);if(!a)return;const o=n.replaceColor;a.loading?setTimeout(()=>{this.particleInit(t,e)}):(async()=>{let i;i=a.svgData&&s?await Ws(a,n,s,e,t.hdr):{color:s,data:a,element:a.element,loaded:!0,ratio:n.width&&n.height?n.width/n.height:a.ratio??1,replaceColor:o,source:n.src},i.ratio||(i.ratio=1);const r={image:i,close:n.close??e.shapeClose};e.image=r.image,e.shapeClose=r.close})()}#U=async(t,e)=>{if(!this.#s.loadImage)throw new Error("Image shape not initialized");await this.#s.loadImage(t,{name:e.name,replaceColor:e.replaceColor,src:e.src})}}class $s{height;name;replaceColor;src="";width;load(t){R(t)||(Zt(this,"height",t.height),Zt(this,"name",t.name),Zt(this,"replaceColor",t.replaceColor),Zt(this,"src",t.src),Zt(this,"width",t.width))}}class Gs{id="image-preloader";#s;constructor(t){this.#s=t}async getPlugin(t){const{ImagePreloaderInstance:e}=await Promise.resolve().then(function(){return uo});return new e(this.#s,t)}loadOptions(t,e,i){if(!i?.preload)return;e.preload??=[];const n=e.preload;for(const t of i.preload){const e=n.find(e=>e.name===t.name||e.src===t.src);if(e)e.load(t);else{const e=new $s;e.load(t),n.push(e)}}}needsPlugin(){return!0}}async function Ns(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{!function(t){t.getImages??=e=>{t.images??=new Map;let i=t.images.get(e);return i||(i=[],t.images.set(e,i)),i},t.loadImage??=async(e,i)=>{if(!t.getImages)throw new Error("No images collection found");if(!i.name&&!i.src)throw new Error("No image source provided");t.images??=new Map;const n=t.getImages(e);if(!n.some(t=>t.name===i.name||t.source===i.src))try{const s={name:i.name??i.src,source:i.src,type:i.src.substring(i.src.length-3),error:!1,loading:!0,replaceColor:i.replaceColor,ratio:i.width&&i.height?i.width/i.height:void 0};let a;n.push(s),t.images.set(e,n),a=i.replaceColor?qs:Us,await a(s)}catch{throw new Error(`${i.name??i.src} not found`)}}}(t),t.pluginManager.addPlugin(new Gs(t)),t.pluginManager.addShape(Vs,e=>Promise.resolve(new js(t,e)))})}class Xs extends ye{sync=!1;load(t){R(t)||(super.load(t),Zt(this,"sync",t.sync))}}class Ys extends ye{sync=!1;load(t){R(t)||(super.load(t),Zt(this,"sync",t.sync))}}class Ks{count=0;delay=new Xs;duration=new Ys;load(t){R(t)||(Zt(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Qs{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const n=i.delay.sync?1:F(),s=i.duration.sync?1:F();t.life={delay:e.retina.reduceFactor?W(i.delay.value)*n/e.retina.reduceFactor*r:0,delayTime:0,duration:e.retina.reduceFactor?W(i.duration.value)*s/e.retina.reduceFactor*r:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){ie(t,"life",Ks,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const n=t.life;let s=!1;if(t.spawning){if(n.delayTime+=e.value,!(n.delayTime>=t.life.delay))return;s=!0,t.spawning=!1,n.delayTime=0,n.time=0}if(-1===n.duration)return;if(s?n.time=0:n.time+=e.value,n.time<n.duration)return;if(n.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const a=G(0,i.width),o=G(0,i.width);t.position.x=q(a),t.position.y=q(o),t.spawning=!0,n.delayTime=0,n.time=0,t.reset();const c=t.options.life;c&&(n.delay=W(c.delay.value)*r,n.duration=W(c.duration.value)*r)}(t,e,this.#u.canvas.size)}}async function Zs(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new Qs(t)))})}class Js{draw(t){!function(t){const{context:e,particle:i,radius:n}=t,s=i.shapeData;e.moveTo(-n,0),e.lineTo(n,0),e.lineCap=s?.cap??"butt"}(t)}getSidesCount(){return 1}}async function ta(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["line"],()=>Promise.resolve(new Js))})}class ea{distance=200;enable=!1;rotate;constructor(){this.rotate={x:3e3,y:3e3}}load(t){if(!R(t)&&(Jt(this,"distance",t.distance),Zt(this,"enable",t.enable),t.rotate)){const e=t.rotate.x;void 0!==e&&(this.rotate.x=e);const i=t.rotate.y;void 0!==i&&(this.rotate.y=i)}}}class ia extends pn{#M;constructor(t){super(t),this.#M=0}get maxDistance(){return this.#M}clear(){}init(){}interact(t){if(!t.options.attract?.enable)return;const e=this.container;if(R(t.attractDistance)){const i=W(t.options.attract.distance);i>this.#M&&(this.#M=i),t.attractDistance=i*e.retina.pixelRatio}const i=t.attractDistance,n=t.getPosition(),s=e.particles.grid.queryCircle(n,i);for(const e of s){if(t===e||!e.options.attract?.enable||e.destroyed||e.spawning)continue;const i=e.getPosition(),{dx:s,dy:a}=N(n,i),o=t.options.attract.rotate,r=s/(1e3*o.x),c=a/(1e3*o.y),l=e.size.value/t.size.value,d=1/l;t.velocity.x-=r*l,t.velocity.y-=c*l,e.velocity.x+=r*d,e.velocity.y+=c*d}}isEnabled(t){return t.options.attract?.enable??!1}loadParticlesOptions(t,...e){ie(t,"attract",ea,...e)}reset(){}}async function na(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addInteractor?.("particlesAttract",t=>Promise.resolve(new ia(t)))})}var sa;!function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy"}(sa||(sa={}));class aa{speed=2;load(t){R(t)||Zt(this,"speed",t.speed)}}class oa{enable=!0;retries=0;load(t){R(t)||(Zt(this,"enable",t.enable),Zt(this,"retries",t.retries))}}class ra{absorb=new aa;bounce=new Oe;enable=!1;maxSpeed=50;mode=sa.bounce;overlap=new oa;load(t){R(t)||(this.absorb.load(t.absorb),this.bounce.load(t.bounce),Zt(this,"enable",t.enable),Jt(this,"maxSpeed",t.maxSpeed),Zt(this,"mode",t.mode),this.overlap.load(t.overlap))}}function ca(t,e,i,n,s,a){if(!t.options.collisions||!i.options.collisions)return;const o=H(t.options.collisions.absorb.speed*s.factor,0,n);t.size.value=Math.sqrt(e*e+o*o),i.size.value-=o,i.size.value<=a&&(i.size.value=0,i.destroy())}const la=t=>{t.options.collisions&&(t.collisionMaxSpeed??=W(t.options.collisions.maxSpeed),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed))};function da(t,e){const i=t.getMass(),n=e.getMass(),s=t.velocity.length,a=e.velocity.length,o=i*s*s+n*a*a;mt(ft(t),ft(e));const r=t.velocity.length,c=e.velocity.length,l=i*r*r+n*c*c;if(l>1e-6*o){const i=Math.sqrt(o/l);Math.abs(i-1)>1e-4&&(t.velocity.length=r*i,e.velocity.length=c*i)}la(t),la(e)}function ha(t,e,i,n){if(t.options.collisions&&e.options.collisions)switch(t.options.collisions.mode){case sa.absorb:!function(t,e,i,n){const s=t.getRadius(),a=e.getRadius();!s&&a?t.destroy():s&&!a?e.destroy():s&&a&&(s>=a?ca(t,s,e,a,i,n):ca(e,a,t,s,i,n))}(t,e,i,n);break;case sa.bounce:da(t,e);break;case sa.destroy:!function(t,e){t.unbreakable||e.unbreakable||da(t,e);const i=t.getRadius(),n=e.getRadius();!i&&n?t.destroy():i&&!n?e.destroy():i&&n&&(t.getRadius()>=e.getRadius()?e:t).destroy()}(t,e)}}class ua extends pn{maxDistance;constructor(t){super(t),this.maxDistance=0}clear(){}init(){}interact(t,e,i){if(t.destroyed||t.spawning)return;const n=this.container,s=t.getPosition(),a=t.getRadius(),o=n.particles.grid.queryCircle(s,2*a);for(const e of o){if(t===e||t.id>=e.id||!t.options.collisions?.enable||!e.options.collisions?.enable||t.options.collisions.mode!==e.options.collisions.mode||e.destroyed||e.spawning)continue;const o=e.getPosition(),r=e.getRadius();if(Math.abs(Math.round(s.z)-Math.round(o.z))>a+r)continue;Y(s,o)>a+r||ha(t,e,i,n.retina.pixelRatio)}}isEnabled(t){return!!t.options.collisions?.enable}loadParticlesOptions(t,...e){ie(t,"collisions",ra,...e)}reset(){}}class pa{id="overlap";async getPlugin(t){const{OverlapPluginInstance:e}=await Promise.resolve().then(function(){return po});return new e(t)}loadOptions(){}needsPlugin(){return!0}}async function ga(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{Dn(t),t.pluginManager.addPlugin(new pa),t.pluginManager.addInteractor?.("particlesCollisions",t=>Promise.resolve(new ua(t)))})}class fa extends Xt{#q;constructor(t,e,i,n){super(t,e,i),this.#q=n}contains(t){if(super.contains(t))return!0;const{width:e,height:i}=this.#q,{x:n,y:s}=t;return super.contains({x:n-e,y:s})||super.contains({x:n+e,y:s})||super.contains({x:n,y:s-i})||super.contains({x:n,y:s+i})||super.contains({x:n-e,y:s-i})||super.contains({x:n+e,y:s+i})||super.contains({x:n-e,y:s+i})||super.contains({x:n+e,y:s-i})}intersects(t){if(super.intersects(t))return!0;const{width:e,height:i}=this.#q,n=t.position,s=[{x:-e,y:0},{x:e,y:0},{x:0,y:-i},{x:0,y:i},{x:-e,y:-i},{x:e,y:i},{x:-e,y:i},{x:e,y:-i}];for(const e of s){const i={x:n.x+e.x,y:n.y+e.y};let s;if(t instanceof Xt)s=new Xt(i.x,i.y,t.radius);else{const e=t;s=new Yt(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(s))return!0}return!1}}class ma{blur=5;color=new re;enable=!1;constructor(){this.color.value="#000"}load(t){R(t)||(Zt(this,"blur",t.blur),this.color=re.create(this.color,t.color),Zt(this,"enable",t.enable))}}class ya{color;enable=!1;frequency=1;opacity;load(t){R(t)||(void 0!==t.color&&(this.color=re.create(this.color,t.color)),Zt(this,"enable",t.enable),Zt(this,"frequency",t.frequency),Zt(this,"opacity",t.opacity))}}class va{blink=!1;color=new re;consent=!1;distance=100;enable=!1;frequency=1;id;opacity=1;shadow=new ma;triangles=new ya;warp=!1;width=1;constructor(){this.color.value="#fff"}load(t){R(t)||(Zt(this,"id",t.id),Zt(this,"blink",t.blink),this.color=re.create(this.color,t.color),Zt(this,"consent",t.consent),Zt(this,"distance",t.distance),Zt(this,"enable",t.enable),Zt(this,"frequency",t.frequency),Zt(this,"opacity",t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),Zt(this,"width",t.width),Zt(this,"warp",t.warp))}}function ba(t,e,i){const{dx:n,dy:s}=N(t,e),a={x:Math.abs(n),y:Math.abs(s)},o={x:Math.min(a.x,i.width-a.x),y:Math.min(a.y,i.height-a.y)};return Math.hypot(o.x,o.y)}class wa extends pn{#M;#p;constructor(t,e){super(e),this.#p=t,this.#M=0}get maxDistance(){return this.#M}clear(){}init(){this.container.particles.linksColor=void 0,this.container.particles.linksColors=new Map}interact(t){if(!t.options.links)return;t.links=[],t.linksDistance&&t.linksDistance>this.#M&&(this.#M=t.linksDistance);const e=t.getPosition(),i=this.container,n=i.canvas.size;if(e.x<c.x||e.y<c.y||e.x>n.width||e.y>n.height)return;const s=t.options.links,a=s.opacity,o=t.retina.linksDistance??0,r=s.warp,l=r?new fa(e.x,e.y,o,n):new Xt(e.x,e.y,o),d=i.particles.grid.query(l);for(const i of d){const l=i.options.links;if(t===i||!l?.enable||s.id!==l.id||i.spawning||i.destroyed||!i.links||t.links.some(t=>t.destination===i)||i.links.some(e=>e.destination===t))continue;const d=i.getPosition();if(d.x<c.x||d.y<c.y||d.x>n.width||d.y>n.height)continue;const h=N(e,d).distance,u=r&&l.warp?ba(e,d,n):h,p=Math.min(h,u);if(p>o)continue;const g=(1-p/o)*a;this.#W(t),t.links.push({destination:i,opacity:g,color:this.#j(t,i),isWarped:u<h})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){ie(t,"links",va,...e)}reset(){}#j(t,e){const i=this.container,n=t.options.links;if(!n)return;return Ze(t,e,void 0!==n.id?i.particles.linksColors.get(n.id):i.particles.linksColor)}#W(t){if(!t.options.links)return;const e=this.container,i=t.options.links;let n=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);n||(n=Je(this.#p,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=n:e.particles.linksColors.set(i.id,n))}}class xa{id="links";#p;constructor(t){this.#p=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return fo});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Ma(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{const e=t.pluginManager;Dn(t),e.addPlugin(new xa(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new wa(e,t)))})}const Pa=new Map;function ka(t,e){const{context:i,radius:n}=t,s=function(t){const e=Pa.get(t);if(e)return e;const i=u/t,n=!!(t%2),s=(-Math.PI+(n?0:i))*o,a=[];for(let e=0;e<t;e++){const t=s+e*i;a[e]={x:Math.cos(t),y:Math.sin(t)}}return Pa.set(t,a),a}(e.count.numerator/e.count.denominator);i.beginPath();for(let t=0;t<s.length;t++){const e=s[t];if(!e)continue;const a=e.x*n,o=e.y*n;t?i.lineTo(a,o):i.moveTo(a,o)}i.closePath()}class Ca{draw(t){const{particle:e,radius:i}=t;ka(t,this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round(W(e?.sides??5))}}class Da extends Ca{getSidesData(t,e){const{sides:i}=t;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class Oa extends Ca{getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:1,numerator:3},length:2.66*e/1}}}async function za(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["polygon"],()=>Promise.resolve(new Da))})}async function Sa(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["triangle"],()=>Promise.resolve(new Oa))})}async function Ia(t){t.checkVersion("4.3.1"),await Promise.all([za(t),Sa(t)])}class Ta{decay=0;enable=!1;speed=0;sync=!1;load(t){R(t)||(Zt(this,"enable",t.enable),Jt(this,"speed",t.speed),Jt(this,"decay",t.decay),Zt(this,"sync",t.sync))}}class Ra extends ye{animation=new Ta;direction=t.RotateDirection.clockwise;path=!1;load(t){R(t)||(super.load(t),Zt(this,"direction",t.direction),this.animation.load(t.animation),Zt(this,"path",t.path))}}class Ea{#u;constructor(t){this.#u=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:Q(W(i.value)),min:0,max:u},e.pathRotation=i.path;let n=i.direction;if(n===t.RotateDirection.random){n=Math.floor(2*F())>0?t.RotateDirection.counterClockwise:t.RotateDirection.clockwise}switch(n){case t.RotateDirection.counterClockwise:case"counterClockwise":e.rotate.status=t.AnimationStatus.decreasing;break;case t.RotateDirection.clockwise:e.rotate.status=t.AnimationStatus.increasing}const s=i.animation;s.enable&&(e.rotate.decay=1-W(s.decay),e.rotate.velocity=W(s.speed)/360*this.#u.retina.reduceFactor,s.sync||(e.rotate.velocity*=F())),e.rotation=e.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){ie(t,"rotate",Ra,...e)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(ki(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function La(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new Ea(t)))})}class _a{draw(t){!function(t){const{context:e,radius:i}=t,n=i*Math.SQRT1_2,s=2*n;e.rect(-n,-n,s,s)}(t)}getSidesCount(){return 4}}async function Fa(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new _a))})}const Aa=0,Ba=0;class Va{draw(t){!function(t){const{context:e,particle:i,radius:n}=t,s=i.sides,a=i.starInset??2;e.moveTo(Aa,Ba-n);for(let t=0;t<s;t++)e.rotate(Math.PI/s),e.lineTo(Aa,Ba-n*a),e.rotate(Math.PI/s),e.lineTo(Aa,Ba-n)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round(W(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=W(i?.inset??2)}}async function Ha(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["star"],()=>Promise.resolve(new Va))})}async function Ua(t){t.checkVersion("4.3.1"),await t.pluginManager.register(async t=>{await Promise.all([Gi(t),(async t=>{await async function(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new hn(i)),i.initializers.interactors??=new Map,i.interactors??=new Map,i.addInteractor=(t,e)=>{i.initializers.interactors??=new Map,i.initializers.interactors.set(t,e)},i.getInteractors=async(t,e=!1)=>(i.interactors??=new Map,i.initializers.interactors??=new Map,Ct(t,i.interactors,i.initializers.interactors,e)),i.setOnClickHandler=t=>{const{items:i}=e;if(!i.length)throw new Error("Click handlers can only be set after calling tsParticles.load()");i.forEach(e=>{const i=e;i.addClickHandler?.(t)})}})}(t),await Promise.all([ms(t),Rn(t),Un(t),Kn(t),is(t),cs(t),ps(t),bs(t),Ps(t),Os(t),Es(t),Bs(t),na(t),ga(t),Ma(t)])})(t),Xi(t),tn(t),Ns(t),ta(t),Ia(t),Fa(t),Ha(t),Zs(t),Ai(t),La(t)])})}const qa=globalThis;qa.loadSlim=Ua,qa.tsParticles=oi;function Wa(t,e,i){const n=e[i];void 0!==n&&(t[i]=(t[i]??1)*n)}class ja{#$;#G;#N;#X;#Y;#u;#K;#Q;#Z;#J;#tt;#et;#p;#it;#nt;#st={};#at=[void 0,void 0];#ot={};constructor(t,e,i){this.#p=t,this.#u=e,this.#X=i,this.#K=null,this.#$=null,this.#G=new Set,this.#nt=[],this.#it=[],this.#N=[],this.#Y=[],this.#Z=[],this.#J=[],this.#tt=[],this.#et={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#Q}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(c.x,c.y,this.#X.size.width,this.#X.size.height)})}clear(){for(const t of this.#N)if(t.canvasClear?.())return;for(const e of Object.values(t.DrawLayer))if("number"==typeof e)for(const t of this.#rt(e))if(t.canvasClear?.())return;this.canvasClear()}destroy(){this.stop(),this.#$=null,this.#G.clear(),this.#nt=[],this.#it=[],this.#N=[],this.#Y=[],this.#Z=[],this.#J=[],this.#tt=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#et[e]=[])}draw(t){const e=this.#K;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const n=t.getFillColor(),s=t.getStrokeColor();let[a,o]=this.#ct(t);if(a??=n,o??=s,!a&&!o)return;const r=this.#u,c=t.options.zIndex,l=1-t.zIndexFactor,{fillOpacity:d,opacity:h,strokeOpacity:u}=t.getOpacity(),p=this.#ot,g=this.#st,f=a?Ke(a,r.hdr,d*h):void 0,m=o?Ke(o,r.hdr,u*h):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=m,this.draw(n=>{for(const i of this.#tt)i.drawParticleSetup?.(n,t,e);this.#lt(n,t,i,h,g,p),this.#dt({container:r,context:n,particle:t,delta:e,colorStyles:g,radius:i*l**c.sizeRate,opacity:h,transform:p}),this.#ht(t);for(const i of this.#J)i.drawParticleCleanup?.(n,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const n of this.#Z)this.#ut(i,n,t,e)})}drawParticles(e){const{particles:i,actualOptions:n}=this.#u;this.clear(),i.update(e),this.draw(s=>{const a=this.#X.size.width,o=this.#X.size.height;if(this.#$)try{s.drawImage(this.#$,c.x,c.y,a,o)}catch{this.#pt("background-element-draw-error","Error drawing background element onto canvas")}const r=n.background;if(r.draw)try{r.draw(s,e)}catch{this.#pt("background-draw-error","Error in background.draw callback")}for(const e of this.#rt(t.DrawLayer.BackgroundMask))e.canvasPaint?.();for(const i of this.#rt(t.DrawLayer.CanvasSetup))i.drawSettingsSetup?.(s,e);for(const i of this.#rt(t.DrawLayer.PluginContent))i.draw?.(s,e);i.drawParticles(e);for(const i of this.#rt(t.DrawLayer.CanvasCleanup))i.clearDraw?.(s,e),i.drawSettingsCleanup?.(s,e)})}init(){this.initUpdaters(),this.initPlugins(),this.#gt(),this.paint()}initPlugins(){this.#N=[],this.#Y=[],this.#Z=[],this.#tt=[],this.#J=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#et[e]=[]);for(const e of this.#u.plugins)(e.particleFillColor??e.particleStrokeColor)&&this.#Y.push(e),e.drawParticle&&this.#Z.push(e),e.drawParticleSetup&&this.#tt.push(e),e.drawParticleCleanup&&this.#J.push(e),e.canvasClear&&this.#N.push(e),e.canvasPaint&&this.#rt(t.DrawLayer.BackgroundMask).push(e),e.drawSettingsSetup&&this.#rt(t.DrawLayer.CanvasSetup).push(e),e.draw&&this.#rt(t.DrawLayer.PluginContent).push(e),(e.clearDraw??e.drawSettingsCleanup)&&this.#rt(t.DrawLayer.CanvasCleanup).push(e)}initUpdaters(){this.#nt=[],this.#it=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#it.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#nt.push(t)}paint(){let e=!1;for(const i of this.#rt(t.DrawLayer.BackgroundMask))if(e=i.canvasPaint?.()??!1,e)break;e||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(c.x,c.y,this.#X.size.width,this.#X.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const n=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,c.x,c.y,this.#X.size.width,this.#X.size.height),i.globalAlpha=n})}setContext(t){this.#K=t,this.#K&&(this.#K.globalCompositeOperation=i)}setContextSettings(t){this.#Q=t}stop(){this.draw(t=>{t.clearRect(c.x,c.y,this.#X.size.width,this.#X.size.height)})}#ht(t){for(const e of this.#it)e.afterDraw?.(t)}#lt(t,e,i,n,s,a){for(const o of this.#nt){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,n);a&&(s.fill=a),r&&(s.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)Wa(a,t,e)}o.beforeDraw?.(e)}}#ft(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#mt(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#dt(t){const{container:e,context:i,particle:n,delta:s,colorStyles:a,radius:o,opacity:r,transform:c}=t,{effectDrawers:l,shapeDrawers:d}=e,h=n.getPosition(),u=n.getTransformData(c),p={x:h.x,y:h.y};i.setTransform(u.a,u.b,u.c,u.d,h.x,h.y),a.fill&&(i.fillStyle=a.fill);const g=!!n.fillEnabled,f=n.strokeWidth??0;i.lineWidth=f,a.stroke&&(i.strokeStyle=a.stroke);const m={context:i,particle:n,radius:o,drawRadius:1*o,opacity:r,delta:s,pixelRatio:e.retina.pixelRatio,fill:g,stroke:f>0,transformData:u,position:{...h},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=n.effect?l.get(n.effect):void 0,v=n.shape?d.get(n.shape):void 0;this.#mt(y,m),this.#yt(v,m),this.#vt(v,m),this.#bt(v,m),this.#ft(y,m),i.resetTransform()}#ut(t,e,i,n){e.drawParticle&&e.drawParticle(t,i,n)}#vt(t,e){if(!t)return;const{context:i,fill:n,particle:s,stroke:a}=e;s.shape&&(i.beginPath(),t.draw(e),s.shapeClose&&i.closePath(),n&&i.fill(),a&&i.stroke())}#bt(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#yt(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#rt(t){return this.#et[t]}#ct(t){let e,i;for(const n of this.#Y)if(!e&&n.particleFillColor&&(e=Ue(this.#p,n.particleFillColor(t))),!i&&n.particleStrokeColor&&(i=Ue(this.#p,n.particleStrokeColor(t))),e&&i)break;return this.#at[0]=e,this.#at[1]=i,this.#at}#gt(){const t=this.#u.actualOptions.background;if(this.#$=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof HTMLImageElement?this.#$=e:e?this.#pt("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#pt("background-element-not-found",`Background element selector "${t.element}" not found`)}}else(t.element instanceof HTMLCanvasElement||t.element instanceof OffscreenCanvas||t.element instanceof HTMLVideoElement||t.element instanceof HTMLImageElement)&&(this.#$=t.element)}#pt(t,e){this.#G.has(t)||(this.#G.add(t),Rt().warning(e))}}const $a=new WeakMap;function Ga(t,e,i=!1){if(!e)return;const n=t.style,s=new Set;for(let t=0;t<n.length;t++){const e=n.item(t);e&&s.add(e)}for(let t=0;t<e.length;t++){const i=e.item(t);i&&s.add(i)}for(const t of s){const s=e.getPropertyValue(t);s?n.setProperty(t,s,i?"important":""):n.removeProperty(t)}}class Na{domElement;render;renderCanvas;size;zoom=1;#u;#wt;#xt;#Mt;#p;#Pt;#kt;#Ct;#Dt;constructor(t,e){this.#p=t,this.#u=e,this.render=new ja(t,e,this),this.#Ct={height:0,width:0};const i=e.retina.pixelRatio,n=this.#Ct;this.size={height:n.height*i,width:n.width*i},this.#wt=!1,this.#kt=[],this.#Pt="none"}get#Ot(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#wt){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#zt();this.render.destroy(),this.#kt=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#Dt?this.#Dt:{x:e*o/t,y:i*o/t}}init(){this.#St(t=>{t.disconnect()}),this.#xt=ct(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#It()}),this.resize(),this.#Tt(),this.initBackground(),this.#St(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#Rt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const n=i.style,s=Ve(this.#p,e.color);n.backgroundColor=s?Ye(s,t.actualOptions.hdr,e.opacity):"",n.backgroundImage=e.image||"",n.backgroundPosition=e.position||"",n.backgroundRepeat=e.repeat||"",n.backgroundSize=e.size||""}initPlugins(){this.#kt=[];for(const t of this.#u.plugins)t.resize&&this.#kt.push(t)}loadCanvas(t){this.#wt&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#wt=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=$a.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return $a.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const n=this.domElement;n&&(n.ariaHidden="true",this.#Mt=wt(n.style));const s=this.#Ct,a=this.renderCanvas;n?(s.height=n.offsetHeight,s.width=n.offsetWidth):(s.height=a.height,s.width=a.width);const o=this.#u.retina.pixelRatio,r=this.size;a.height=r.height=s.height*o,a.width=r.width=s.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const n=e.canvas.#Ct,s={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:s.width*a,height:s.height*a};if(s.height===n.height&&s.width===n.width&&o.height===i.height&&o.width===i.width)return!1;const r={...n};n.height=s.height,n.width=s.width;const c=this.size;return i.width=c.width=o.width,i.height=c.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:n.width/r.width,height:n.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#Pt=t,this.#It())}setZoom(t,e){this.zoom=t,this.#Dt=e}stop(){this.#St(t=>{t.disconnect()}),this.#xt=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#Et(),e&&await t.refresh()}#Et(){for(const t of this.#kt)t.resize?.()}#Rt(){const t=this.#u.actualOptions.hdr&&rt("(color-gamut: p3)")?.matches&&rt("(dynamic-range: high)")?.matches;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...t?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});const e=this.renderCanvas;e&&this.render.setContext(e.getContext("2d",this.render.settings))}#Tt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#Ot?this.#Lt():this.#zt();for(const i in e.style){if(!i||!(i in e.style))continue;const n=e.style[i];n&&t.style.setProperty(i,n,"important")}}}#It(){const t=this.domElement;if(!t)return;this.#St(t=>{t.disconnect()}),this.#Tt(),this.initBackground();const e=this.#Pt;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#St(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#zt(){const t=this.domElement,e=this.#Mt;t&&e&&Ga(t,e,!0)}#St(t){this.#xt&&t(this.#xt)}#Lt(){const t=this.domElement;t&&Ga(t,Pt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Xa{#u;#_t;#Ft;#At;constructor(t){this.#u=t,this.#_t={visibilityChange:()=>{this.#Bt()},resize:()=>{this.#Vt()}}}addListeners(){this.#Ht(!0)}removeListeners(){this.#Ht(!1)}#Bt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(ot().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#Vt(){this.#At&&(clearTimeout(this.#At),this.#At=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#At=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*r)}#Ht(t){const e=this.#_t;this.#Ut(t),kt(document,s,e.visibilityChange,t,!1)}#Ut(t){const e=this.#_t,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void kt(globalThis,n,e.resize,t);const s=i.canvas.domElement;this.#Ft&&!t?(s&&this.#Ft.unobserve(s),this.#Ft.disconnect(),this.#Ft=void 0):!this.#Ft&&t&&s&&(this.#Ft=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this.#Vt()}),this.#Ft.observe(s))}}function Ya(t){if(!lt(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}function Ka(t,e){const i=t%e;return i<0?i+e:i}function Qa(t,e,i,n){const s=Le(i,e,e.actualOptions.particles),a=s.reduceDuplicates;t.effect=vt(s.effect.type,t.id,a),t.shape=vt(s.shape.type,t.id,a);const o=s.effect,r=s.shape;if(n){if(n.effect){const e=n.effect.type;if(e&&e!==t.effect){const i=vt(e,t.id,a);i&&(t.effect=i)}o.load(n.effect)}if(n.shape){const e=n.shape.type;if(e&&e!==t.shape){const i=vt(e,t.id,a);i&&(t.shape=i)}r.load(n.shape)}}if(t.effect===d){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(F()*i.length)]}if(t.shape===d){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(F()*i.length)]}t.effectData=t.effect?function(t,e,i,n){const s=e.options[t];return gt({close:e.close},vt(s,i,n))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,n){const s=e.options[t];return gt({close:e.close},vt(s,i,n))}(t.shape,r,t.id,a):void 0,s.load(n);const c=t.effectData,l=t.shapeData;return c&&s.load(c.particles),l&&s.load(l.particles),t.effectClose=c?.close??s.effect.close,t.shapeClose=l?.close??s.shape.close,s}class Za{backColor;destroyed;direction;effect;effectClose;effectData;fillColor;fillEnabled;fillOpacity;group;id;ignoresResizeRatio;initialPosition;initialVelocity;isRotating;justWarped;lastPathTime;misplaced;moveCenter;offset;opacity;options;outType;pathRotation;position;randomIndexData;retina;roll;rotation;shape;shapeClose;shapeData;sides;size;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;#qt={fillOpacity:1,opacity:1,strokeOpacity:1};#Wt=C.origin;#jt={sin:0,cos:0};#$t={a:1,b:0,c:0,d:1};#u;#D=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#D.push(t),this.#D.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#D.length=0}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const i=this.#u,n=this.shape?i.shapeDrawers.get(this.shape):void 0;n?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this.#u.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#Gt(this.#Nt(ti(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*o}getModifier(t){return this.#D.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=W(this.opacity?.value??1),n=this.#Nt(void 0,t=>t.opacity)??i,s=this.fillOpacity??1,a=this.strokeOpacity??1;return this.#qt.fillOpacity=n*s*e,this.#qt.opacity=n*e,this.#qt.strokeOpacity=n*a*e,this.#qt}getPosition(){return this.#Wt.x=this.position.x+this.offset.x,this.#Wt.y=this.position.y+this.offset.y,this.#Wt.z=this.position.z,this.#Wt}getRadius(){return this.#Nt(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#jt.sin=Math.sin(t),this.#jt.cos=Math.cos(t),this.#jt}getStrokeColor(){return this.#Gt(this.#Nt(ti(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#$t.a=e.cos*(t.a??l.a),this.#$t.b=i?e.sin*(t.b??1):t.b??l.b,this.#$t.c=i?-e.sin*(t.c??1):t.c??l.c,this.#$t.d=e.cos*(t.d??l.d),this.#$t}init(e,i,n,s){const a=this.#u;!function(e,i,n){e.id=i,e.group=n,e.justWarped=!1,e.effectClose=!0,e.shapeClose=!0,e.pathRotation=!1,e.lastPathTime=0,e.destroyed=!1,e.unbreakable=!1,e.isRotating=!1,e.rotation=0,e.misplaced=!1,e.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},e.size={value:1,max:1,min:1,enable:!1},e.outType=t.ParticleOutType.normal,e.ignoresResizeRatio=!0}(this,e,s),this.options=Qa(this,a,this.#p,n),a.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(a.particleUpdaters,this),this.#Xt(i),this.initialVelocity=this.#Yt(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,function(t,e){let i,n;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(n=e.shapeDrawers.get(t.shape)),n?.loadShape&&n.loadShape(t);const s=n?.getSidesCount;s&&(t.sides=s(t))}(this,a),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(a.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,n=e.effect?t.effectDrawers.get(e.effect):void 0;n?.particleInit?.(t,e),i?.particleInit?.(t,e)}(a,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(a,this)}isInsideCanvas(t){return this.#Kt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#Kt({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=Ka(t,u);return e>=Math.PI*o&&e<3*Math.PI*o}if(this.roll.horizontal){const e=Ka(t+Math.PI*o,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Ka(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}removeModifier(t){const e=this.#D.findIndex(e=>e.id===t);e>=0&&this.#D.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Nt(t,e){let i=t;for(const t of this.#D)if(t.enabled){const n=e(t);void 0!==n&&(i=n)}return i}#Qt(t,e){let i=0,n=t?C.create(t.x,t.y,e):void 0;const s=this.#u,a=s.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),c=s.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(n,this);if(i)return C.create(i.x,i.y,e)}const t=it({size:c,position:n}),l=C.create(t.x,t.y,e);this.#Zt(l,r,o.left??o.default),this.#Zt(l,r,o.right??o.default),this.#Jt(l,r,o.top??o.default),this.#Jt(l,r,o.bottom??o.default);let d=!0;for(const t of s.particles.checkParticlePositionPlugins)if(d=t.checkParticlePosition?.(this,l,i)??!0,!d)break;if(d)return l;i+=1,n=void 0}}#Yt(){const e=this.options.move,i=J(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const n=Q(W(e.angle.value)),s=Q(W(e.angle.offset)),a={left:s-n*o,right:s+n*o};return e.straight||(i.angle+=q(G(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=F()),i}#Zt(e,i,n){Ya({outMode:n,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#Jt(e,i,n){Ya({outMode:n,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#te(e,i){const n=this.getRadius(),s=this.#u.canvas.size,a=this.position,o=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:o?a.y+n<s.height:a.y-n<s.height,reason:"default"}:e===t.OutModeDirection.left?{inside:o?a.x-n>0:a.x+n>0,reason:"default"}:e===t.OutModeDirection.right?{inside:o?a.x+n<s.width:a.x-n<s.width,reason:"default"}:e===t.OutModeDirection.top?{inside:o?a.y-n>0:a.y+n>0,reason:"default"}:{inside:a.x>=-n&&a.y>=-n&&a.y<=s.height+n&&a.x<=s.width+n,reason:"default"}}#ee(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Kt(t){const e=this.#te(t.direction,t.outMode),i=this.#u,n=this.shape?i.shapeDrawers.get(this.shape):void 0,s=this.effect?i.effectDrawers.get(this.effect):void 0,a=n?.isInsideCanvas,o=s?.isInsideCanvas;if(!a&&!o)return e;const r=this.#ee(t.direction,t.outMode),c=a?this.#ie(a(r),"shape"):void 0,l=o?this.#ie(o(r),"effect"):void 0;if(c&&l){const t=Math.max(c.margin??0,l.margin??0);return{inside:c.inside&&l.inside,margin:t>0?t:void 0,reason:"combined"}}return c??l??e}#Gt(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?ai(t,this.roll.alter.type,this.roll.alter.value):t:t}#Xt(e){const i=this.#u,n=Math.floor(W(this.options.zIndex.value)),s=this.#Qt(e,H(n,0,i.zLayers));if(!s)throw new Error("a valid position cannot be found for particle");this.position=s,this.initialPosition=this.position.copy();const a=i.canvas.size;switch(this.moveCenter={...bt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=Z(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case t.MoveDirection.inside:this.outType=t.ParticleOutType.inside;break;case t.MoveDirection.outside:this.outType=t.ParticleOutType.outside}this.offset=D.origin}#ie(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Ja{#ne;#se=new Map;#ae=[];#oe;#re;#ce=[];#le;constructor(t){this.#ne=t,this.#oe=0,this.#le=0}clear(){this.#se.clear();const t=this.#re;t&&(this.#ne=t),this.#re=void 0}insert(t){const{x:e,y:i}=t.getPosition(),n=this.#de(e,i);this.#se.has(n)||this.#se.set(n,[]),this.#se.get(n)?.push(t)}query(t,e,i=[]){const n=this.#he(t);if(!n)return i;const s=Math.floor(n.minX/this.#ne),a=Math.floor(n.maxX/this.#ne),o=Math.floor(n.minY/this.#ne),r=Math.floor(n.maxY/this.#ne);for(let n=s;n<=a;n++)for(let s=o;s<=r;s++){const a=`${n}_${s}`,o=this.#se.get(a);if(o)for(const n of o)e&&!e(n)||t.contains(n.getPosition())&&i.push(n)}return i}queryCircle(t,e,i,n=[]){const s=this.#ue(t.x,t.y,e),a=this.query(s,i,n);return this.#pe(),a}queryRectangle(t,e,i,n=[]){const s=this.#ge(t.x,t.y,e.width,e.height),a=this.query(s,i,n);return this.#pe(),a}setCellSize(t){this.#re=t}#ue(t,e,i){return(this.#ae[this.#oe++]??=new Xt(t,e,i)).reset(t,e,i)}#ge(t,e,i,n){return(this.#ce[this.#le++]??=new Yt(t,e,i,n)).reset(t,e,i,n)}#de(t,e){return`${Math.floor(t/this.#ne)}_${Math.floor(e/this.#ne)}`}#he(t){if(t instanceof Xt){const e=t.radius,{x:i,y:n}=t.position;return{minX:i-e,maxX:i+e,minY:n-e,maxY:n+e}}if(t instanceof Yt){const{x:e,y:i}=t.position,{width:n,height:s}=t.size;return{minX:e,maxX:e+n,minY:i,maxY:i+s}}return null}#pe(){this.#oe=0,this.#le=0}}class to{checkParticlePositionPlugins;grid;#fe;#u;#me;#ye;#ve;#be;#we;#xe;#p;#Me;#Pe;#ke;#Ce;#De;#Oe;constructor(t,e){this.#p=t,this.#u=e,this.#ve=0,this.#fe=[],this.#Me=[],this.#ye=0,this.#me=new Map,this.#be=new Map,this.#Oe=this.#ze(this.#u.zLayers),this.grid=new Ja(100),this.checkParticlePositionPlugins=[],this.#we=[],this.#xe=[],this.#ke=[],this.#Pe=[],this.#De=[]}get count(){return this.#fe.length}addParticle(e,i,n,s){const a=this.#u.actualOptions.particles.number.limit.mode,o=void 0===n?this.#ye:this.#me.get(n)??this.#ye,r=this.count;if(o>0)switch(a){case t.LimitMode.delete:{const t=r+1-o;t>0&&this.removeQuantity(t);break}case t.LimitMode.wait:if(r>=o)return}try{const a=this.#Me.pop()??new Za(this.#p,this.#u);a.init(this.#ve,e,i,n);let o=!0;return s&&(o=s(a)),o?(this.#fe.push(a),this.#Se(a),this.#ve++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this.#Me.push(a)}catch(t){Rt().warning(`error adding particle: ${t}`)}}clear(){this.#fe=[],this.#be.clear(),this.#Ie(this.#u.zLayers)}destroy(){this.#fe=[],this.#Me.length=0,this.#be.clear(),this.#Oe=[],this.checkParticlePositionPlugins=[],this.#we=[],this.#xe=[],this.#ke=[],this.#Pe=[],this.#De=[]}drawParticles(t){for(let e=this.#Oe.length-1;e>=0;e--){const i=this.#Oe[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#fe.filter(t)}find(t){return this.#fe.find(t)}get(t){return this.#fe[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#De=[],this.#xe=[],this.#ke=[],this.#we=[],this.#Pe=[],this.#be.clear(),this.#Ie(t.zLayers),this.grid=new Ja(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#De.push(e),e.particleUpdate&&this.#xe.push(e),e.postUpdate&&this.#ke.push(e),e.particleReset&&this.#we.push(e),e.postParticleUpdate&&this.#Pe.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const n=i[e];if(n)for(let i=this.count,s=0;s<n.number.value&&i<t.number.value;i++,s++)this.addParticle(void 0,n,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,n){for(let s=0;s<t;s++)this.addParticle(e,i,n)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#fe.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,n){if(t<0||t>this.count)return;let s=0;for(let a=t;s<e&&a<this.count;a++)this.#Te(a,i,n)&&(a--,s++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const n=e[t];if(!n)continue;const s=Le(this.#p,this.#u,n);this.#Re(s,i,t)}this.#Re(t.particles,i)}setResizeFactor(t){this.#Ce=t}update(t){this.grid.clear();for(const e of this.#De)e.update?.(t);const e=this.#Ee(t);for(const e of this.#ke)e.postUpdate?.(t);if(this.#Le(t,e),e.size)for(const t of e)this.remove(t);this.#Ce=void 0}#_e(...t){this.#Me.push(...t)}#Re(t,e,i,n){const s=t.number;if(!s.density.enable)return void(void 0===i?this.#ye=s.limit.value:(n?.number.limit.value??s.limit.value)&&this.#me.set(i,n?.number.limit.value??s.limit.value));const a=this.#Fe(s.density),o=s.value,r=s.limit.value>0?s.limit.value:o,c=Math.min(o,r)*a+e,l=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#ye=s.limit.value*a:this.#me.set(i,s.limit.value*a),l<c?this.push(Math.abs(c-l),void 0,t,i):l>c&&this.removeQuantity(l-c,i)}#ze(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#Ae(t){const e=this.#Oe.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#Fe(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,n=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*n**2):1}#Se(t){const e=this.#Ae(t.position.z),i=this.#Oe[e];i&&(i.push(t),this.#be.set(t.id,e))}#Te(e,i,n){const s=this.#fe[e];return!!s&&(s.group===i&&(this.#fe.splice(e,1),this.#Be(s),s.destroy(n),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:s}),this.#_e(s),!0))}#Be(t){const e=this.#be.get(t.id)??this.#Ae(t.position.z),i=this.#Oe[e];if(!i)return void this.#be.delete(t.id);const n=i.findIndex(e=>e.id===t.id);n>=0&&i.splice(n,1),this.#be.delete(t.id)}#Ie(t){const e=Math.max(Math.floor(t),1);if(this.#Oe.length===e)for(const t of this.#Oe)t.length=0;else this.#Oe=this.#ze(e)}#Ve(t){const e=this.#Ae(t.position.z),i=this.#be.get(t.id);if(void 0===i)return void this.#Se(t);if(i===e)return;const n=this.#Oe[i];if(n){const e=n.findIndex(e=>e.id===t.id);e>=0&&n.splice(e,1)}const s=this.#Oe[e];if(s){if(s.push(t),s.length>=2){const e=s[s.length-2];e&&t.id<e.id&&s.sort((t,e)=>t.id-e.id)}this.#be.set(t.id,e)}else this.#be.set(t.id,e)}#Ee(t){const e=new Set,i=this.#Ce;for(const n of this.#fe){i&&!n.ignoresResizeRatio&&(n.position.x*=i.width,n.position.y*=i.height,n.initialPosition.x*=i.width,n.initialPosition.y*=i.height),n.ignoresResizeRatio=!1;for(const t of this.#we)t.particleReset?.(n);for(const e of this.#xe){if(n.destroyed)break;e.particleUpdate?.(n,t)}n.destroyed?e.add(n):this.grid.insert(n)}return e}#Le(t,e){for(const i of this.#fe)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#Pe)e.postParticleUpdate?.(i,t);this.#Ve(i)}}}class eo{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,n=t.canvas,s=n.domElement;s&&(n.size.width=s.offsetWidth*i,n.size.height=s.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,n=e.move,s=n.distance,a=t.retina;a.maxSpeed=W(n.gravity.maxSpeed)*i,a.moveDrift=W(n.drift)*i,a.moveSpeed=W(n.speed)*i;const o=a.maxDistance;o.horizontal=void 0===s.horizontal?void 0:s.horizontal*i,o.vertical=void 0===s.vertical?void 0:s.vertical*i}}function io(t){return!t.destroyed}function no(t,e,...i){const n=new _e(t,e);return Qt(n,...i),n}var so=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#He;#Ue;#qe={value:0,factor:0};#We;#je;#$e;#Ge;#Ne;#Xe;#Ye;#Ke;#Qe;#Ze;#Je;#p;#ti;#ei;constructor(e){const{dispatchCallback:i,pluginManager:n,id:s,onDestroy:a,sourceOptions:o}=e;this.#p=n,this.#We=i,this.#Qe=a,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.#ti=!1,this.#He=0,this.#$e=0,this.#Ke=0,this.#Ne=!0,this.started=!1,this.destroyed=!1,this.#Je=!0,this.#Ye=0,this.zLayers=100,this.pageHidden=!1,this.#ei=o,this.#Xe=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new eo(this),this.canvas=new Na(this.#p,this),this.particles=new to(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Ze=no(this.#p,this),this.actualOptions=no(this.#p,this),this.#Ge=new Xa(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#Je&&!this.pageHidden&&io(this)}get options(){return this.#Ze}get sourceOptions(){return this.#ei}addLifeTime(t){this.#Ke+=t}alive(){return!this.#$e||this.#Ke<=this.#$e}destroy(e=!0){if(io(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#Qe(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#We(t,{container:this,data:e})}draw(t){if(!io(this))return;let e=t;this.#je=B(t=>{e&&(this.#Ye=void 0,e=!1),this.#ii(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const n=await i.export(t,e);if(n.supported)return n.blob}Rt().error(`Export plugin with type ${t} not found`)}async init(){if(!io(this))return;const e=new Map;for(const t of this.#p.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this.#Ze=no(this.#p,this,this.#Xe,this.sourceOptions),this.actualOptions=no(this.#p,this,this.#Ze),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[t,i]of e)t.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:i,duration:n,fpsLimit:s,hdr:a,smooth:o,zLayers:c}=this.actualOptions;this.hdr=a,this.zLayers=c,this.#$e=W(n)*r,this.#He=W(i)*r,this.#Ke=0,this.fpsLimit=s>0?s:120,this.#ti=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(t.EventType.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(t.EventType.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){if(io(this)&&(void 0!==this.#je&&(V(this.#je),this.#je=void 0),!this.#Je)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Je=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!io(this))return;const i=this.#Je||e;if(!this.#Ne||this.actualOptions.autoPlay){if(this.#Je&&(this.#Je=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#Ne=!1}async refresh(){if(io(this))return this.stop(),this.start()}async reset(t){if(io(this))return this.#Xe=t,this.#ei=t,this.#Ze=no(this.#p,this,this.#Xe,this.sourceOptions),this.actualOptions=no(this.#p,this,this.#Ze),this.refresh()}async start(){io(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#Ge.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#Ue=setTimeout(()=>{i()},this.#He)}))}stop(){if(io(this)&&this.started){this.#Ue&&(clearTimeout(this.#Ue),this.#Ue=void 0),this.#Ne=!0,this.started=!1,this.#Ge.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this.#ei=this.#Ze,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#ii(t){try{if(!this.#ti&&void 0!==this.#Ye&&t<this.#Ye+r/this.fpsLimit)return void this.draw(!1);if(this.#Ye??=t,function(t,e,i=60,n=!1){t.value=e,t.factor=n?60/i:60*e/r}(this.#qe,t-this.#Ye,this.fpsLimit,this.#ti),this.addLifeTime(this.#qe.value),this.#Ye=t,this.#qe.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#qe),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Rt().error("error in animation loop",t)}}}});var ao=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=t.DrawLayer.CanvasSetup;#u;#ni;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#ni&&(t.globalCompositeOperation=this.#ni)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#ni=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function oo(t,e,i,n,s,a,o){!function(t,e){const i=t.options,n=i.move.path;if(!n.enable)return;const s=t.pathDelay??0;if(t.lastPathTime<=s)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);n.clamp&&(t.velocity.x=H(t.velocity.x,-1,1),t.velocity.y=H(t.velocity.y,-1,1));t.lastPathTime-=s}(t,o);const r=t.gravity,c=r?.enable&&r.inverse?-1:1;s&&i&&(t.velocity.x+=s*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=c*(r.acceleration*o.factor)/(60*i));const l=t.moveDecay;t.velocity.multTo(l??1);const d=t.velocity.mult(i);r?.enable&&n>0&&(!r.inverse&&d.y>=0&&d.y>=n||r.inverse&&d.y<=0&&d.y<=-n)&&(d.y=c*n,i&&(t.velocity.y=d.y/i));const h=t.options.zIndex,u=(1-t.zIndexFactor)**h.velocityRate;d.multTo(u),d.multTo(a);const{position:p}=t;p.addTo(d),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}var ro=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(e){const i=e.options.move,n=i.gravity,s=i.path;if(e.moveDecay=1-W(i.decay),e.pathDelay=W(s.delay.value)*r,s.generator){let t=this.pathGenerators.get(s.generator);t||(t=this.availablePathGenerators.get(s.generator),t&&(this.pathGenerators.set(s.generator,t),t.init())),e.pathGenerator=t}e.gravity={enable:n.enable,acceleration:W(n.acceleration),inverse:n.inverse},function(e,i){const n=i.options.move.spin;if(!n.enable)return;const s=n.position??{x:50,y:50},a={x:.01*s.x*e.canvas.size.width,y:.01*s.y*e.canvas.size.height},o=Y(i.getPosition(),a),r=W(n.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:a,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:F()*u,radius:o,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const n=e.options.move;if(!n.enable)return;const s=this.#u,a=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(e),r=s.retina.reduceFactor,c=e.retina.moveSpeed,l=e.retina.moveDrift,d=e.size.max,h=c*(n.size?e.getRadius()/d:1)*a*(i.factor||1)*o,u=e.retina.maxSpeed;n.spin.enable?function(e,i,n,s){if(!i.spin)return;const a=i.spin.direction===t.RotateDirection.clockwise,r={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*r.x(i.spin.angle)*s,i.position.y=i.spin.center.y+i.spin.radius*r.y(i.spin.angle)*s,i.spin.radius+=i.spin.acceleration*s;const c=Math.max(e.canvas.size.width,e.canvas.size.height),l=c*o;i.spin.radius>l?(i.spin.radius=l,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*n*(1-i.spin.radius/c)}(s,e,h,r):oo(e,n,h,u,l,r,i),function(t){const e=t.initialPosition,{dx:i,dy:n}=N(e,t.position),s=Math.abs(i),a=Math.abs(n),{maxDistance:r}=t.retina,c=r.horizontal,l=r.vertical;if(!c&&!l)return;if((c&&s>=c||l&&a>=l)&&!t.misplaced)t.misplaced=!!c&&s>c||!!l&&a>l,c&&(t.velocity.x=t.velocity.y*o-t.velocity.x),l&&(t.velocity.y=t.velocity.x*o-t.velocity.y);else if((!c||s<c)&&(!l||a<l)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,n=t.velocity;c&&(i.x<e.x&&n.x<0||i.x>e.x&&n.x>0)&&(n.x*=-F()),l&&(i.y<e.y&&n.y<0||i.y>e.y&&n.y>0)&&(n.y*=-F())}}(e)}preInit(){return this.#si()}redrawInit(){return this.#si()}update(){for(const t of this.pathGenerators.values())t.update()}async#si(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});class co{#ai=!0;#oi;#u;#_t;#ri;#ci;constructor(t,e){this.#u=t,this.#oi=[],this.#ri=e,this.#ci=new Map,this.#_t={mouseDown:()=>{this.#li()},mouseLeave:()=>{this.#di()},mouseMove:t=>{this.#hi(t)},mouseUp:t=>{this.#ui(t)},touchStart:t=>{this.#pi(t)},touchMove:t=>{this.#hi(t)},touchEnd:t=>{this.#gi(t)},touchCancel:t=>{this.#gi(t)},touchEndClick:t=>{this.#fi(t)},visibilityChange:()=>{this.#Bt()}}}addListeners(){this.#Ht(!0)}init(){this.#oi.length=0;for(const t of this.#u.plugins.filter(t=>!!t.clickPositionValid))this.#oi.push(t)}removeListeners(){this.#Ht(!1)}#mi(t){const e=this.#u,i=this.#ri,n=e.actualOptions;if(this.#ai){const t=i.interactivityData.mouse,e=t.position;if(!e)return;t.clickPosition={...e},t.clickTime=performance.now();const s=n.interactivity?.events.onClick;if(!s?.mode)return;yt(s.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this.#di()},500)}#Bt(){this.#di()}#yi(t){const e=this.#_t,i=this.#u,n=this.#ri,s=i.actualOptions,a=n.interactivityData.element;if(!a)return;const o=a,r=i.canvas;r.setPointerEvents(o===r.domElement?"initial":"none"),(!t||s.interactivity?.events.onHover.enable||s.interactivity?.events.onClick.enable)&&(kt(a,yn,e.mouseMove,t),kt(a,vn,e.touchStart,t),kt(a,wn,e.touchMove,t),t?s.interactivity?.events.onClick.enable?(kt(a,bn,e.touchEndClick,t),kt(a,fn,e.mouseUp,t),kt(a,gn,e.mouseDown,t)):kt(a,bn,e.touchEnd,t):(kt(a,bn,e.touchEndClick,t),kt(a,fn,e.mouseUp,t),kt(a,gn,e.mouseDown,t),kt(a,bn,e.touchEnd,t)),kt(a,mn,e.mouseLeave,t),kt(a,xn,e.touchCancel,t))}#Ht(t){const e=this.#_t,i=this.#u,n=this.#ri,a=i.actualOptions,o=a.interactivity?.detectsOn,r=i.canvas.domElement;o===sn.window?n.interactivityData.element=ot():o===sn.parent&&r?n.interactivityData.element=r.parentElement??r.parentNode:n.interactivityData.element=r,this.#yi(t),kt(document,s,e.visibilityChange,t,!1)}#li(){const{interactivityData:t}=this.#ri,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position}#ui(t){const e=this.#u,i=this.#ri,n=e.actualOptions,{mouse:s}=i.interactivityData;s.inside=!0;let a=!1;const o=s.position;if(o&&n.interactivity?.events.onClick.enable){for(const t of this.#oi)if(a=t.clickPositionValid?.(o)??!1,a)break;a||this.#mi(t),s.clicking=!1}}#di(){const{interactivityData:t}=this.#ri,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=mn,e.inside=!1,e.clicking=!1}#hi(t){const e=this.#u,i=this.#ri,n=e.actualOptions,s=i.interactivityData,a=e.canvas.domElement;if(!s.element)return;let o;if(s.mouse.inside=!0,t.type.startsWith("pointer")){this.#ai=!0;const e=t;if(s.element===ot()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(n.interactivity?.detectsOn===sn.parent){const t=e.target,i=e.currentTarget;if(a){const n=t.getBoundingClientRect(),s=i.getBoundingClientRect(),r=a.getBoundingClientRect();o={x:e.offsetX+2*n.left-(s.left+r.left),y:e.offsetY+2*n.top-(s.top+r.top)}}else o={x:e.offsetX,y:e.offsetY}}else e.target===a&&(o={x:e.offsetX,y:e.offsetY})}else if(this.#ai="touchmove"!==t.type,a){const e=t,i=e.touches[e.touches.length-1],n=a.getBoundingClientRect();if(!i)return;o={x:i.clientX-n.left,y:i.clientY-n.top}}const r=e.retina.pixelRatio;o&&(o.x*=r,o.y*=r),s.mouse.position=o,s.status=yn}#gi(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#ci.delete(t.identifier);this.#di()}#fi(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#ci.delete(t.identifier);this.#ui(t)}#pi(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#ci.set(t.identifier,performance.now());this.#hi(t)}}class lo{interactivityData;#vi;#u;#Ge;#bi;#wi;#xi;#Mi;#p;constructor(t,e){this.#u=e,this.#p=t,this.#wi=[],this.#bi=[],this.#Mi=[],this.#vi=new Map,this.#Ge=new co(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this.#xi=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(t=>{this.#Pi(t)})}addClickHandler(t){const e=this.#u,i=this.interactivityData;if(e.destroyed)return;const n=i.element;if(!n)return;const s=(i,n,s)=>{if(e.destroyed)return;const a=e.retina.pixelRatio,o={x:n.x*a,y:n.y*a},r=e.particles.grid.queryCircle(o,s*a);t(i,r)};let a=!1,o=!1;this.#vi.set("click",t=>{if(e.destroyed)return;const i=t,n={x:i.offsetX,y:i.offsetY};s(t,n,1)}),this.#vi.set(vn,()=>{e.destroyed||(a=!0,o=!1)}),this.#vi.set(wn,()=>{e.destroyed||(o=!0)}),this.#vi.set(bn,t=>{if(!e.destroyed){if(a&&!o){const i=t,n=i.touches[i.touches.length-1];if(!n)return;const a=e.canvas.domElement,o=a?a.getBoundingClientRect():void 0,r={x:n.clientX-(o?o.left:0),y:n.clientY-(o?o.top:0)};s(t,r,Math.max(n.radiusX,n.radiusY))}a=!1,o=!1}}),this.#vi.set(xn,()=>{e.destroyed||(a=!1,o=!1)});for(const[t,e]of this.#vi)n.addEventListener(t,e)}addListeners(){this.#Ge.addListeners()}clearClickHandlers(){const t=this.#u,e=this.interactivityData;if(!t.destroyed){for(const[t,i]of this.#vi)e.element?.removeEventListener(t,i);this.#vi.clear()}}externalInteract(t){for(const e of this.#bi){const i=this.interactivityData;e.isEnabled(i)&&e.interact(i,t)}}handleClickMode(t){if(this.#u.destroyed)return;const e=this.interactivityData;for(const i of this.#bi)i.handleClickMode?.(t,e)}init(){this.#Ge.init();for(const t of this.#wi){switch(t.type){case an.external:this.#bi.push(t);break;case an.particles:this.#Mi.push(t)}t.init()}}async initInteractors(){const t=await(this.#p.getInteractors?.(this.#u,!0));t&&(this.#wi=t,this.#bi=[],this.#Mi=[])}particlesInteract(t,e){const i=this.interactivityData;for(const i of this.#bi)i.clear(t,e);for(const n of this.#Mi)n.isEnabled(t,i)&&n.interact(t,i,e)}removeListeners(){this.#Ge.removeListeners()}reset(t){const e=this.interactivityData;for(const i of this.#bi)i.isEnabled(e)&&i.reset(e,t);for(const i of this.#Mi)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#xi&&this.#xi.observe(t.element)}stopObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#xi&&this.#xi.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this.#wi)e.maxDistance>t&&(t=e.maxDistance);const e=this.#u;e.particles.grid.setCellSize(t*e.retina.pixelRatio)}#Pi(t){const e=this.#u;if(!e.destroyed&&e.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivityData.element&&(i.isIntersecting?e.play():e.pause())}}var ho=Object.freeze({__proto__:null,InteractivityPluginInstance:class{interactionManager;#u;#p;constructor(t,e){this.#u=e,this.#p=t,this.interactionManager=new lo(t,e),this.#u.addClickHandler=t=>{this.interactionManager.addClickHandler(t)}}addClickHandler(t){this.interactionManager.addClickHandler(t)}clearClickHandlers(){this.interactionManager.clearClickHandlers()}destroy(){this.clearClickHandlers(),this.#p.interactors?.delete(this.#u)}particleCreated(t){const e=t,i=new dn(this.#p,this.#u);i.load(this.#u.actualOptions.interactivity),i.load(e.options.interactivity),e.interactivity=i}particleReset(t){this.interactionManager.reset(t)}postParticleUpdate(t,e){this.interactionManager.particlesInteract(t,e)}postUpdate(t){this.interactionManager.externalInteract(t),this.interactionManager.updateMaxDistance()}async preInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}async redrawInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}start(){return this.interactionManager.addListeners(),this.interactionManager.startObserving(),Promise.resolve()}stop(){this.interactionManager.removeListeners(),this.interactionManager.stopObserving()}}});var uo=Object.freeze({__proto__:null,ImagePreloaderInstance:class{#u;#s;constructor(t,e){this.#s=t,this.#u=e}destroy(){this.#s.images?.delete(this.#u)}}});var po=Object.freeze({__proto__:null,OverlapPluginInstance:class{#u;constructor(t){this.#u=t}checkParticlePosition(t,e,i){return!this.#ki(t,e,i)}#ki(t,e,i){const n=t.options.collisions;if(!n?.enable)return!1;const s=n.overlap;if(s.enable)return!1;const a=s.retries;if(a>=0&&i>a)throw new Error("Particle is overlapping and can't be placed");return!!this.#u.particles.find(i=>Y(e,i.position)<t.getRadius()+i.getRadius())}}});function go(t,e){const i=(n=t.map(t=>t.id),[...n].sort((t,e)=>t-e).join("_"));var n;let s=e.get(i);return void 0===s&&(s=F(),e.set(i,s)),s}var fo=Object.freeze({__proto__:null,LinkInstance:class{#Ci=new Map;#u;#Di;#p;constructor(t,e){this.#p=t,this.#u=e,this.#Di={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:n}=e;if(!i?.length||!n.links)return;const s=n.links,a=e.retina.linksWidth??0,r=e.getPosition(),l=e.options.twinkle?.links,d=s.triangles.enable,h=d?new Set(i.map(t=>t.destination.id)):null,u=t.globalAlpha;let p="",g=-1,f=-1,m=!1;const y=()=>{m&&(t.stroke(),m=!1)};for(const u of i){if(s.frequency<1&&this.#Oi(e,u.destination)>s.frequency)continue;const i=u.destination.getPosition();if(d&&!u.isWarped&&h&&(y(),this.#zi(n,e,u,h,r,i,t)),u.opacity<=0||a<=0)continue;if(!s.enable)continue;let v=u.opacity,b=u.color;const w=l?.enable&&F()<l.frequency?Ve(this.#p,l.color):void 0;if(l&&w&&(b=w,v=W(l.opacity)),!b){const t=void 0!==s.id?this.#u.particles.linksColors.get(s.id):this.#u.particles.linksColor;b=Ze(e,u.destination,t)}if(!b)continue;const x=this.#Si(b);if(x===p&&a===g&&v===f||(y(),t.strokeStyle=x,t.lineWidth=a,t.globalAlpha=v,p=x,g=a,f=v,t.beginPath(),m=!0),u.isWarped){const e=this.#u.canvas.size,n=i.x-r.x,s=i.y-r.y;let a=c.x,l=c.y;Math.abs(n)>e.width*o&&(a=n>0?-e.width:e.width),Math.abs(s)>e.height*o&&(l=s>0?-e.height:e.height),t.moveTo(r.x,r.y),t.lineTo(i.x+a,i.y+l),t.moveTo(r.x-a,r.y-l),t.lineTo(i.x,i.y)}else t.moveTo(r.x,r.y),t.lineTo(i.x,i.y)}y(),t.globalAlpha=u}init(){return this.#Di.links.clear(),this.#Di.triangles.clear(),this.#Ci.clear(),Promise.resolve()}particleCreated(t){if(t.links=[],!t.options.links)return;t.linksDistance=t.options.links.distance,t.linksWidth=t.options.links.width;const e=this.#u.retina.pixelRatio;t.retina.linksDistance=t.linksDistance*e,t.retina.linksWidth=t.linksWidth*e}particleDestroyed(t){t.links=[]}#zi(t,e,i,n,s,a,r){const c=i.destination,l=t.links?.triangles;if(!l?.enable||!c.options.links?.triangles.enable)return;const d=c.links;if(d?.length)for(const h of d){if(h.isWarped||this.#Oi(c,h.destination)>c.options.links.frequency||!n.has(h.destination.id))continue;const d=h.destination;if(this.#Ii(e,c,d)>(t.links?.triangles.frequency??0))continue;const u=l.opacity??(i.opacity+h.opacity)*o,p=Ve(this.#p,l.color)??i.color;if(!p||u<=0)continue;const g=d.getPosition();r.save(),r.fillStyle=this.#Si(p),r.globalAlpha=u,r.beginPath(),r.moveTo(s.x,s.y),r.lineTo(a.x,a.y),r.lineTo(g.x,g.y),r.closePath(),r.fill(),r.restore()}}#Si(t){const e=`${t.r},${t.g},${t.b}`;let i=this.#Ci.get(e);return i||(i=Ye(t,this.#u.hdr),this.#Ci.set(e,i)),i}#Oi(t,e){return go([t,e],this.#Di.links)}#Ii(t,e,i){return go([t,e,i],this.#Di.triangles)}}});t.AnimatableColor=ce,t.AnimationOptions=ne,t.AnimationValueWithRandom=ve,t.Background=le,t.BaseRange=Nt,t.Circle=Xt,t.ColorAnimation=ae,t.Fill=pe,t.FullScreen=de,t.HslAnimation=oe,t.Move=Pe,t.MoveAngle=ge,t.MoveCenter=fe,t.MoveGravity=me,t.MovePath=we,t.OptionLoader=Kt,t.Options=_e,t.OptionsColor=re,t.OutModes=xe,t.Paint=Ce,t.ParticlesBounce=Oe,t.ParticlesBounceFactor=De,t.ParticlesDensity=ze,t.ParticlesNumber=Ie,t.ParticlesNumberLimit=Se,t.ParticlesOptions=Ee,t.RangedAnimationOptions=se,t.RangedAnimationValueWithRandom=be,t.Rectangle=Yt,t.ResizeEvent=he,t.Shape=Te,t.Spin=Me,t.Stroke=ke,t.ValueWithRandom=ye,t.Vector=D,t.Vector3d=C,t.ZIndex=Re,t.alterHsl=ai,t.animate=B,t.areBoundsInside=ut,t.calcExactPositionOrRandomFromSize=it,t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/a,y:t.position.y*t.size.height/a}:void 0},t.calcPositionOrRandomFromSize=et,t.calcPositionOrRandomFromSizeRanged=function(t){const e={x:void 0!==t.position?.x?W(t.position.x):void 0,y:void 0!==t.position?.y?W(t.position.y):void 0};return et({size:t.size,position:e})},t.calculateBounds=pt,t.cancelAnimation=V,t.canvasFirstIndex=0,t.canvasTag=f,t.checkDistance=K,t.circleBounce=mt,t.circleBounceDataFromParticle=ft,t.clamp=H,t.cloneStyle=wt,t.collisionVelocity=tt,t.colorMix=Qe,t.colorToRgb=He,t.countOffset=1,t.decayOffset=1,t.deepExtend=gt,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=i,t.defaultDensityFactor=1,t.defaultFps=60,t.defaultFpsLimit=120,t.defaultLoops=0,t.defaultOpacity=1,t.defaultRatio=1,t.defaultReduceFactor=1,t.defaultRemoveQuantity=1,t.defaultRetryCount=0,t.defaultRgbMin=0,t.defaultTime=0,t.defaultTransform=l,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=Q,t.deleteCount=1,t.double=2,t.doublePI=u,t.empty=0,t.executeOnSingleOrMultiple=yt,t.generatedAttribute=e,t.generatedFalse=g,t.generatedTrue=p,t.getDistance=Y,t.getDistanceSq=X,t.getDistances=N,t.getFullScreenStyle=Pt,t.getHslAnimationFromHsl=ei,t.getHslFromAnimation=ti,t.getItemMapFromInitializer=Dt,t.getItemsFromInitializer=Ct,t.getLinkColor=Ze,t.getLinkRandomColor=Je,t.getLogger=Rt,t.getParticleBaseVelocity=J,t.getParticleDirectionAngle=Z,t.getPosition=bt,t.getRandom=F,t.getRandomFn=function(){return L},t.getRandomInRange=A,t.getRandomRgbColor=Xe,t.getRangeMax=$,t.getRangeMin=j,t.getRangeValue=W,t.getStyleFromHsl=Ke,t.getStyleFromRgb=Ye,t.hMax=y,t.hMin=0,t.hPhase=60,t.half=o,t.hslToRgb=$e,t.hslToRgbFloat=Ge,t.hslaToRgba=Ne,t.identity=1,t.inverseFactorNumerator=1,t.isArray=T,t.isBoolean=O,t.isFunction=function(t){return"function"==typeof t},t.isInArray=lt,t.isNull=R,t.isNumber=S,t.isObject=I,t.isPointInside=ht,t.isString=z,t.itemFromArray=dt,t.itemFromSingleOrMultiple=vt,t.lFactor=1,t.lMax=b,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){void 0!==i&&(t[e]=gt(t[e]??{},i))},t.loadLazyProperty=ee,t.loadMinIndex=0,t.loadNestedProperty=te,t.loadOptionProperty=ie,t.loadOptions=Qt,t.loadParticlesOptions=Le,t.loadProperty=Zt,t.loadRandomFactor=1e4,t.loadRangeProperty=Jt,t.loadSlim=Ua,t.manageListener=kt,t.maxNits=M,t.midColorValue=h,t.millisecondsToSeconds=r,t.minCount=0,t.minDistance=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minRadius=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=U,t.none=0,t.one=1,t.originPoint=c,t.parseAlpha=nt,t.percentDenominator=a,t.phaseNumerator=1,t.quarter=w,t.randomColorValue=d,t.randomInRangeValue=q,t.rangeColorToHsl=Ue,t.rangeColorToRgb=Ve,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=n,t.rgbMax=m,t.rgbToHsl=qe,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=ot,t.safeMatchMedia=rt,t.safeMutationObserver=ct,t.setAnimationFunctions=function(t,e){_.nextFrame=t,_.cancel=e},t.setLogger=function(t){t.debug&&(Tt.debug=It(t.debug)),t.error&&(Tt.error=It(t.error)),t.info&&(Tt.info=It(t.info)),t.log&&(Tt.log=It(t.log)),t.trace&&(Tt.trace=It(t.trace)),t.verbose&&(Tt.verbose=It(t.verbose)),t.warning&&(Tt.warning=It(t.warning))},t.setRandom=function(t=Math.random){L=t},t.setRangeValue=G,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Be(t,e)?.a},t.stringToRgb=We,t.threeQuarter=x,t.triple=3,t.tryCountIncrement=1,t.tsParticles=oi,t.updateColor=si,t.updateColorValue=ni,t.visibilityChangeEvent=s,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{loadExtendProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadExtendProperty,loadLazyProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadLazyProperty,loadMinIndex:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadMinIndex,loadNestedProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadNestedProperty,loadOptionProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadOptionProperty,loadOptions:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadOptions,loadParticlesOptions:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadParticlesOptions,loadProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadProperty,loadRandomFactor:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadRandomFactor,loadRangeProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadRangeProperty,loadSlim:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadSlim,tsParticles:(globalThis.__tsParticlesInternals.bundles.slim||{}).tsParticles}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.slim||{}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|