@tsparticles/preset-matrix 4.5.1 → 4.5.2
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.
|
@@ -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)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},function(t){"use strict";const e=/^\[tsParticles Error (TSP-\d+)\]\s*/,i=t=>(...e)=>{t(...e)},s={debug:i(console.debug),error:(t,...i)=>{if("string"==typeof t){const s=e.exec(t);if(s?.[1])return void console.error(`tsParticles - ${s[1]} - ${t.slice(s[0].length)}`,...i)}console.error(`tsParticles - Error - ${t}`,...i)},info:i(console.info),log:i(console.log),trace:i(console.trace),verbose:i(console.log),warning:i(console.warn)};function n(){return s}var a;!function(t){t.bottom="bottom",t.bottomLeft="bottom-left",t.bottomRight="bottom-right",t.left="left",t.none="none",t.right="right",t.top="top",t.topLeft="top-left",t.topRight="top-right",t.outside="outside",t.inside="inside"}(a||(a={}));const r="generated",o="100%",l="source-over",c=100,h=.5,d=1e3,u={x:0,y:0,z:0},p=1,f=0,g=0,m=1,y="random",v=2*Math.PI,w="true",P="false",b="canvas",x=255,M=360,z=100,k=100,C=.25,S=400;function I(t){return"z"in t?t.z:u.z}class O{x;y;z;constructor(t=u.x,e=u.y,i=u.z){this.x=t,this.y=e,this.z=i}static get origin(){return O.create(u.x,u.y,u.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 O.create(t.x,t.y,I(t))}static create(t,e,i){return"number"==typeof t?new O(t,e??u.y,i??u.z):new O(t.x,t.y,I(t))}add(t){return O.create(this.x+t.x,this.y+t.y,this.z+I(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=I(t)}copy(){return O.clone(this)}div(t){return O.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return O.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 O.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),u.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=I(t)}sub(t){return O.create(this.x-t.x,this.y-t.y,this.z-I(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=I(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class _ extends O{constructor(t=u.x,e=u.y){super(t,e,u.z)}static get origin(){return _.create(u.x,u.y)}static clone(t){return _.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new _(t,e??u.y):new _(t.x,t.y)}}function L(t){return"boolean"==typeof t}function D(t){return"string"==typeof t}function E(t){return"number"==typeof t}function R(t,e){return Object.values(t).some(t=>t===e)}function T(t,e,i){return R(t,e)?e:i}function B(t){return"object"==typeof t&&null!==t}function F(t){return Array.isArray(t)}function A(t){return null==t}const U=Math.PI/180;let $=Math.random;const V=t=>requestAnimationFrame(t),N=t=>{cancelAnimationFrame(t)};function W(){return j($(),0,1-Number.EPSILON)}function H(t,e){return W()*(e-t)+t}function j(t,e,i){return Math.min(Math.max(t,e),i)}function G(t){const e=Y(t);let i=X(t);return e===i&&(i=0),H(i,e)}function q(t){return E(t)?t:G(t)}function X(t){return E(t)?t:t.min}function Y(t){return E(t)?t:t.max}function Q(t,e){if(t===e||void 0===e&&E(t))return t;const i=X(t),s=Y(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:Q(i,s)}function K(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function Z(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function J(t,e){return Math.sqrt(Z(t,e))}function tt(t){return t*U}function et(t){const{position:e,size:i}=t;return{x:e?.x??W()*i.width,y:e?.y??W()*i.height}}function it(t){return t?t.endsWith("%")?Number.parseFloat(t)/c:Number.parseFloat(t):1}const st="TSP-1001",nt="TSP-1002",at="TSP-1003",rt="TSP-1101",ot="TSP-1102",lt="TSP-1201",ct="TSP-1202",ht="TSP-1203";function dt(t,...e){return`[tsParticles Error ${t}] https://particles.js.org/errors/#${t}`}var ut,pt;function ft(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function gt(){return globalThis.document}function mt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function yt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(W()*t.length)]}function vt(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==ut.bottom||(n=t.top<e.height+i.x);!n||s&&s!==ut.left||(n=t.right>i.x);!n||s&&s!==ut.right||(n=t.left<e.width+i.y);!n||s&&s!==ut.top||(n=t.bottom>i.y);return n}(wt(t,s??0),e,i,n)}function wt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function Pt(t,...e){for(const i of e){if(A(i))continue;if(!B(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):B(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return B(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if(ft(t))continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if(ft(s))continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>Pt(void 0,t)):Pt(e[s],n)}}return t}function bt(t,e){return F(t)?t.map((t,i)=>e(t,i)):e(t,0)}function xt(t,e,i){return F(t)?yt(t,e,i):t}function Mt(t,e){return function(t,e){if(t.mode!==pt.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/c*e.width,y:t.y/c*e.height}:{width:t.width/c*e.width,height:t.height/c*e.height}}(t,e)}let zt,kt;function Ct(t,e,i,s,n){if(s){let s={passive:!0};L(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function St(t,e){const i=await Promise.all([...e.entries()].map(([e,i])=>i(t).then(t=>[e,t])));return new Map(i)}async function It(t){const e=xt(t.url,t.index);if(!e)return t.fallback;try{const t=await fetch(e);if(t.ok){const e=await t.json();if(function(t){if(F(t))return t.every(t=>B(t)&&!F(t));return B(t)&&!F(t)}(e))return e;n().error("invalid configuration data while retrieving config file")}else n().error(`${t.status.toString()} while retrieving config file`)}catch(t){n().error(`error while retrieving config file: ${t}`)}return t.fallback}!function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(ut||(ut={})),function(t){t.precise="precise",t.percent="percent"}(pt||(pt={}));class Ot{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);const i=this.#e.get(t);this.#e.set(t,i?[...i,e]:[e])}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):this.#e.set(t,[...i.slice(0,n),...i.slice(n+1)]))}}var _t,Lt,Dt,Et,Rt,Tt,Bt,Ft,At,Ut,$t,Vt,Nt,Wt;!function(t){t.configAdded="configAdded",t.containerInit="containerInit",t.particlesSetup="particlesSetup",t.containerStarted="containerStarted",t.containerStopped="containerStopped",t.containerDestroyed="containerDestroyed",t.containerPaused="containerPaused",t.containerPlay="containerPlay",t.containerBuilt="containerBuilt",t.particleAdded="particleAdded",t.particleDestroyed="particleDestroyed",t.particleRemoved="particleRemoved"}(_t||(_t={}));class Ht{colorManagers=new Map;easingFunctions=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#r=!1;#o=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}get initialized(){return this.#r}addColorManager(t,e){this.#r||this.colorManagers.set(t,e)}addConfig(t){if(this.#r)return;const e=t.key??t.name??"default";this.#s.set(e,t),this.#n.dispatchEvent(_t.configAdded,{data:{name:e,config:t}})}addEasing(t,e){this.#r||this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.#r||this.initializers.effects.set(t,e)}addPalette(t,e){this.#r||this.palettes.set(t,e)}addParticleUpdater(t,e){this.#r||this.initializers.updaters.set(t,e)}addPlugin(t){this.#r||this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){this.#r||!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){if(!this.#r)for(const i of t)this.initializers.shapes.set(i,e)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async init(){if(!this.#r&&!this.#o){this.#o=!0,this.#a=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#a,this.#i)}finally{this.#l.clear(),this.#o=!1,this.#r=!0}}}async register(...t){if(this.#r)throw new Error(dt(at));for(const e of t)this.#o?await this.#c(e,this.#a,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}class jt{pluginManager=new Ht(this);#h=[];#d=new Ot;#r=!1;get items(){return this.#h}get version(){return"4.5.1"}addEventListener(t,e){this.#d.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(dt(st,this.version))}dispatchEvent(t,e){this.#d.dispatchEvent(t,e)}async init(){this.#r||(await this.pluginManager.init(),this.#r=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let e;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(e=t.element);const{Container:i}=await Promise.resolve().then(function(){return zs}),s=t.id??e?.id??`tsparticles${Math.floor(1e4*W()).toString()}`,{index:n,url:a}=t,l=xt(a?await It({fallback:t.options,url:a,index:n}):t.options,n),{items:c}=this,h=c.findIndex(t=>t.id.description===s),d=new i({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:s,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,d)}else c.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:function(t){let e;const i=gt();if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===b)e=t,e.dataset[r]??=P,e.dataset[r]===w&&(e.style.width||=o,e.style.height||=o,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none"));else{const s=t.getElementsByTagName(b).item(0);s?(e=s,e.dataset[r]=P):(e=i.createElement(b),e.dataset[r]=w,t.appendChild(e)),e.style.width||=o,e.style.height||=o,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none")}return e}(function(t,e){const i=gt();let s=e??i.getElementById(t);return s||(s=i.createElement("canvas"),s.id=t,s.dataset[r]=w,i.body.append(s),s)}(s,e));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}!function(t){t.circle="circle",t.rectangle="rectangle"}(Lt||(Lt={}));class Gt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class qt extends Gt{radius;constructor(t,e,i){super(t,e,Lt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,Z(e,i)<=s*s;var e,i,s}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof qt||t.type===Lt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Xt||t.type===Lt.rectangle){const e=t,{width:i,height:r}=e.size;return Math.pow(n-i,2)+Math.pow(a-r,2)<=s**2||n<=s+i&&a<=s+r||n<=i||a<=r}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Xt extends Gt{size;constructor(t,e,i,s){super(t,e,Lt.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof qt)return t.intersects(this);if(!(t instanceof Xt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,r=a.width,o=a.height;return n.x<s.x+e&&n.x+r>s.x&&n.y<s.y+i&&n.y+o>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}function Yt(t,e,i){void 0!==i&&(t[e]=i)}function Qt(t,e,i){void 0!==i&&(t[e]=Q(i))}function Kt(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function Zt(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(Dt||(Dt={})),function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(Et||(Et={})),function(t){t.standard="standard",t.natural="natural",t.vivid="vivid",t.cinematic="cinematic",t.dynamic="dynamic"}(Rt||(Rt={})),function(t){t.delete="delete",t.wait="wait"}(Tt||(Tt={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(Bt||(Bt={})),function(t){t.darken="darken",t.enlighten="enlighten"}(Ft||(Ft={})),function(t){t.none="none",t.max="max",t.min="min"}(At||(At={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(Ut||(Ut={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}($t||($t={})),function(t){t.max="max",t.min="min",t.random="random"}(Vt||(Vt={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(Nt||(Nt={})),function(t){t[t.BackgroundElement=0]="BackgroundElement",t[t.BackgroundDraw=1]="BackgroundDraw",t[t.BackgroundMask=2]="BackgroundMask",t[t.CanvasSetup=3]="CanvasSetup",t[t.PluginContent=4]="PluginContent",t[t.Particles=5]="Particles",t[t.CanvasCleanup=6]="CanvasCleanup",t[t.Foreground=7]="Foreground"}(Wt||(Wt={}));class Jt{load(t){A(t)||this.doLoad(t)}}function te(t,...e){for(const i of e)t.load(i)}class ee extends Jt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Qt(this,"count",t.count),Yt(this,"enable",t.enable),Qt(this,"speed",t.speed),Qt(this,"decay",t.decay),Qt(this,"delay",t.delay),Yt(this,"sync",t.sync)}}class ie extends ee{mode=Et.auto;startValue=Vt.random;doLoad(t){super.doLoad(t),Yt(this,"mode",t.mode),Yt(this,"startValue",t.startValue)}}class se extends ee{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Yt(this,"max",t.max),Yt(this,"min",t.min),Qt(this,"offset",t.offset)}}class ne extends Jt{h=new se(0,M);l=new se(0,k);s=new se(0,z);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class ae extends Jt{value="";static create(t,e){const i=new ae;return i.load(t),void 0!==e&&(D(e)||F(e)?i.load({value:e}):i.load(e)),i}doLoad(t){A(t.value)||(this.value=t.value)}}class re extends ae{animation=new ne;static create(t,e){const i=new re;return i.load(t),void 0!==e&&(D(e)||F(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 oe extends Jt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new ae,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=ae.create(this.color,t.color)),Yt(this,"element",t.element),Yt(this,"draw",t.draw),Yt(this,"image",t.image),Yt(this,"position",t.position),Yt(this,"repeat",t.repeat),Yt(this,"size",t.size),Yt(this,"opacity",t.opacity)}}class le extends Jt{enable=!0;zIndex=0;doLoad(t){Yt(this,"enable",t.enable),Yt(this,"zIndex",t.zIndex)}}class ce extends Jt{enable=!0;mode=Rt.standard;peakNits=400;doLoad(t){if(void 0!==t.enable&&!L(t.enable))throw new Error(dt(lt,String(t.enable)));if(void 0!==t.mode&&!R(Rt,t.mode))throw new Error(dt(ct,Object.values(Rt).join(", "),(e=t.mode,String(e))));var e;if(void 0!==t.peakNits&&(!E(t.peakNits)||!Number.isFinite(t.peakNits)||t.peakNits<=0))throw new Error(dt(ht,String(t.peakNits)));Yt(this,"enable",t.enable),Yt(this,"mode",t.mode),Yt(this,"peakNits",t.peakNits)}}class he extends Jt{delay=.5;enable=!0;doLoad(t){Yt(this,"delay",t.delay),Yt(this,"enable",t.enable)}}class de extends Jt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Pt(this.options[t]??{},i))}Yt(this,"close",t.close),Yt(this,"type",t.type)}}class ue extends Jt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=re.create(this.color,t.color)),Yt(this,"enable",t.enable),Qt(this,"opacity",t.opacity)}}class pe extends Jt{offset=0;value=90;doLoad(t){Qt(this,"offset",t.offset),Qt(this,"value",t.value)}}class fe extends Jt{mode=pt.percent;radius=0;x=50;y=50;doLoad(t){Yt(this,"x",t.x),Yt(this,"y",t.y),Yt(this,"mode",t.mode),Yt(this,"radius",t.radius)}}class ge extends Jt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Qt(this,"acceleration",t.acceleration),Yt(this,"enable",t.enable),Yt(this,"inverse",t.inverse),Qt(this,"maxSpeed",t.maxSpeed)}}class me extends Jt{value=0;doLoad(t){A(t.value)||(this.value=Q(t.value))}}class ye extends me{animation=new ee;doLoad(t){var e,i,s;super.doLoad(t),e=this,i="animation",void 0!==(s=t.animation)&&e[i].load(s)}}class ve extends ye{animation=new ie}class we extends Jt{clamp=!0;delay=new me;enable=!1;generator;options={};doLoad(t){Yt(this,"clamp",t.clamp),this.delay.load(t.delay),Yt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=Pt(this.options,t.options))}}class Pe extends Jt{bottom;default=Bt.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 be extends Jt{acceleration=0;enable=!1;position;doLoad(t){Qt(this,"acceleration",t.acceleration),Yt(this,"enable",t.enable),t.position&&(this.position=Pt({},t.position))}}class xe extends Jt{angle=new pe;center=new fe;decay=0;direction=a.none;distance={};drift=0;enable=!1;gravity=new ge;outModes=new Pe;path=new we;random=!1;size=!1;speed=2;spin=new be;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(E(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Qt(this,"decay",t.decay),Yt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=E(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Qt(this,"drift",t.drift),Yt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(B(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Yt(this,"random",t.random),Yt(this,"size",t.size),Qt(this,"speed",t.speed),this.spin.load(t.spin),Yt(this,"straight",t.straight),Yt(this,"vibrate",t.vibrate),Yt(this,"warp",t.warp)}}class Me extends Jt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=re.create(this.color,t.color)),Qt(this,"width",t.width),Qt(this,"opacity",t.opacity)}}class ze extends Jt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=re.create(this.color,t.color)),Kt(this,"fill",t.fill,()=>new ue),Kt(this,"stroke",t.stroke,()=>new Me)}}class ke extends me{value=1}class Ce extends Jt{horizontal=new ke;vertical=new ke;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Se extends Jt{enable=!1;height=1080;width=1920;doLoad(t){Yt(this,"enable",t.enable),Yt(this,"width",t.width),Yt(this,"height",t.height)}}class Ie extends Jt{mode=Tt.delete;value=0;doLoad(t){Yt(this,"mode",t.mode),Yt(this,"value",t.value)}}class Oe extends Jt{density=new Se;limit=new Ie;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Yt(this,"value",t.value)}}class _e extends Jt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Pt(this.options[t]??{},i))}Yt(this,"close",t.close),Yt(this,"type",t.type)}}class Le extends me{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Yt(this,"opacityRate",t.opacityRate),Yt(this,"sizeRate",t.sizeRate),Yt(this,"velocityRate",t.velocityRate)}}class De extends Jt{bounce=new Ce;effect=new de;groups={};move=new xe;number=new Oe;paint;palette;reduceDuplicates=!1;shape=new _e;zIndex=new Le;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new ze,this.paint.color=new re,this.paint.color.value="#fff",this.paint.fill=new ue,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#f(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=Pt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(F(e)?this.paint=bt(e,t=>{const e=new ze;return e.load(t),e}):F(this.paint)?(this.paint=new ze,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#u.particleUpdaters;for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(F(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function Ee(t,e,...i){const s=new De(t,e);return te(s,...i),s}class Re extends Jt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new oe,this.fullScreen=new le,this.hdr=new ce,this.particles=Ee(this.#p,this.#u),this.resize=new he}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,bt(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),Yt(this,"autoPlay",t.autoPlay),Yt(this,"clear",t.clear),Yt(this,"key",t.key),Yt(this,"name",t.name),Qt(this,"delay",t.delay),Yt(this,"detectRetina",t.detectRetina),Qt(this,"duration",t.duration),Yt(this,"fpsLimit",t.fpsLimit);const e=t.hdr;L(e)?(this.hdr.enable=e,this.hdr.mode=Rt.standard,this.hdr.peakNits=400):this.hdr.load(e),Yt(this,"pauseOnBlur",t.pauseOnBlur),Yt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Yt(this,"zLayers",t.zLayers),this.background.load(t.background);const i=t.fullScreen;L(i)?this.fullScreen.enable=i:this.fullScreen.load(i),this.particles.load(t.particles),this.resize.load(t.resize),this.style=Pt(this.style,t.style),Yt(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#f(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#g(t){this.load(this.#p.getPreset(t))}}const Te=new Map,Be=1.15,Fe=1.05,Ae=.2126,Ue=.7152,$e=.0722;function Ve(t,e){let i=Te.get(t);return i||(i=e(),Te.size>2e3&&Te.clear(),Te.set(t,i)),i}function Ne(t){return j(t*(2.51*t+.03)/(t*(2.43*t+.59)+.14),0,1)}function We(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return He(t,n.value,i,s);if(F(n.value)){const e=yt(n.value,i,s);if(!e)return;return We(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function He(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return n.value===y?function(){const t=0,e=256,i=()=>Math.floor(H(t,e));return{b:i(),g:i(),r:i()}}():function(t,e){return function(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}(t,e)}(t,n.value);if(F(n.value)){const e=yt(n.value,i,s);if(!e)return;return He(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function je(t,e,i,s=!0){const n=We(t,e,i,s);return n?function(t){const e=t.r/x,i=t.g/x,s=t.b/x,n=Math.max(e,i,s),a=Math.min(e,i,s),r={h:0,l:(n+a)*h,s:0};n!==a&&(r.s=r.l<h?(n-a)/(n+a):(n-a)/(2-n-a),r.h=e===n?(i-s)/(n-a):i===n?2+(s-e)/(n-a):4+(e-i)/(n-a));r.l*=k,r.s*=z,r.h*=60,r.h<0&&(r.h+=M);r.h>=M&&(r.h-=M);return r}(n):void 0}function Ge(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function qe(t){const e=(t.h%M+M)%M,i=Math.max(0,Math.min(z,t.s)),s=Math.max(0,Math.min(k,t.l)),n=e/M,a=i/z,r=s/k;if(0===i){const t=Math.round(r*x);return{r:t,g:t,b:t}}const o=r<h?r*(1+a):r+a-r*a,l=2*r-o,c=1/3,d=Math.min(x,x*Ge(l,o,n+c)),u=Math.min(x,x*Ge(l,o,n)),p=Math.min(x,x*Ge(l,o,n-c));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function Xe(t,e,i,s,n){const a=e?4:2,r=i??1;return Ve(e?`rgb-${t.r.toFixed(a)}-${t.g.toFixed(a)}-${t.b.toFixed(a)}-hdr-${r.toString()}-${(s??400).toString()}-${n??Rt.standard}`:`rgb-${t.r.toFixed(a)}-${t.g.toFixed(a)}-${t.b.toFixed(a)}-sdr-${r.toString()}`,()=>e?function(t,e,i=400,s=Rt.standard){const n=i/203,a=function(t,e,i,s){const n=t.r/x,a=t.g/x,r=t.b/x;if(s!==Rt.natural&&s!==Rt.vivid&&s!==Rt.cinematic&&s!==Rt.dynamic)return{b:r,g:a,r:n};const o=Math.max(1,e),l=Ae*n+Ue*a+$e*r,c=function(t,e,i){if(t<=i)return Ne(t);const s=t+(t-i)*(e-1);return Ne(s)}(l,e,i),h=l>0?c/l:1;return function(t,e,i,s,n){switch(s){case Rt.vivid:{const s=(t+e+i)/3;return{b:j(j(s+(i-s)*Be,0,n)*Fe,0,n),g:j(j(s+(e-s)*Be,0,n)*Fe,0,n),r:j(j(s+(t-s)*Be,0,n)*Fe,0,n)}}case Rt.cinematic:{const s=1.05*t,a=.95*i,r=(s+e+a)/3;return{b:j(r+1.1*(a-r),0,n),g:j(r+1.1*(e-r),0,n),r:j(r+1.1*(s-r),0,n)}}case Rt.dynamic:{const s=Ae*t+Ue*e+$e*i,a=Math.min(1,2*s),r=1-a,o=(t+e+i)/3,l=j(o+(t-o)*Be,0,n)*Fe,c=j(o+(e-o)*Be,0,n)*Fe,h=j(o+(i-o)*Be,0,n)*Fe;return{b:j(i*r+h*a,0,n),g:j(e*r+c*a,0,n),r:j(t*r+l*a,0,n)}}case Rt.standard:case Rt.natural:default:return{b:i,g:e,r:t}}}(j(n*h,0,o),j(a*h,0,o),j(r*h,0,o),s,o)}(t,n,.18,s);return`color(display-p3 ${a.r.toString()} ${a.g.toString()} ${a.b.toString()} / ${(e??1).toString()})`}(t,i,s,n):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Ye(t,e,i,s,n){const a=e?4:2,r=i??1;return Ve(e?`hsl-${t.h.toFixed(a)}-${t.s.toFixed(a)}-${t.l.toFixed(a)}-hdr-${r.toString()}-${(s??S).toString()}-${n??Rt.standard}`:`hsl-${t.h.toFixed(a)}-${t.s.toFixed(a)}-${t.l.toFixed(a)}-sdr-${r.toString()}`,()=>e?Xe(function(t){const e=(t.h%M+M)%M,i=Math.max(0,Math.min(z,t.s)),s=Math.max(0,Math.min(k,t.l)),n=e/M,a=i/z,r=s/k;if(0===i){const t=r*x;return{r:t,g:t,b:t}}const o=r<h?r*(1+a):r+a-r*a,l=2*r-o,c=1/3;return{r:Math.min(x,x*Ge(l,o,n+c)),g:Math.min(x,x*Ge(l,o,n)),b:Math.min(x,x*Ge(l,o,n-c))}}(t),!0,i,s,n):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${r.toString()})`)}function Qe(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Ke(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:M},s:{enable:!1,value:t.s,min:0,max:z},l:{enable:!1,value:t.l,min:0,max:k}};return e&&(Ze(s.h,e.h,i),Ze(s.s,e.s,i),Ze(s.l,e.l,i)),s}function Ze(t,e,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=q(e.speed)/c*i,t.decay=1-q(e.decay),t.status=Nt.increasing,t.loops=0,t.maxLoops=q(e.count),t.time=0,t.delayTime=q(e.delay)*d,e.sync||(t.velocity*=W(),t.value*=W()),t.initialValue=t.value,t.offset=Q(e.offset)):t.velocity=0}function Je(t,e,i,s){if(!t.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0))return;if(t.time??=0,(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=i.value),(t.delayTime??0)>0&&t.time<(t.delayTime??0))return;const n=t.offset?G(t.offset):0,a=(t.velocity??0)*i.factor+3.6*n,r=t.decay??1,o=t.max,l=t.min;e&&t.status!==Nt.increasing?(t.value-=a,t.value<l&&(t.loops??=0,t.loops++,t.status=Nt.increasing)):(t.value+=a,t.value>o&&(t.loops??=0,t.loops++,e?t.status=Nt.decreasing:t.value-=o)),t.velocity&&1!==r&&(t.velocity*=r),t.value=j(t.value,l,o)}function ti(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;Je(s,!1,e),Je(n,!0,e),Je(a,!0,e)}const ei=function(){const t=globalThis.tsParticles;return t?.pluginManager?t:new jt}();class ii{enable=!1;mode="destination-out";load(t){A(t)||(Yt(this,"mode",t.mode),Yt(this,"enable",t.enable))}}class si{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return ks});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new ii),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new ii,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function ni(t){t.checkVersion("4.5.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new si)})}class ai{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:v};const n=i.circleRange;e.arc(u.x,u.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=B(s)?{min:tt(s.min),max:tt(s.max)}:{min:0,max:tt(s)}}}async function ri(t){t.checkVersion("4.5.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new ai))})}var oi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(oi||(oi={}));const li=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,ci=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class hi{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(li,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=ci.exec(e);return i?{a:i[oi.a]?Number.parseInt(i[oi.a],16)/255:1,b:Number.parseInt(i[oi.b]??"0",16),g:Number.parseInt(i[oi.g]??"0",16),r:Number.parseInt(i[oi.r]??"0",16)}:void 0}}async function di(t){t.checkVersion("4.5.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new hi)})}var ui;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(ui||(ui={}));const pi=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class fi{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 qe(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return qe({h:q(e.h),l:q(e.l),s:q(e.s)})}parseString(t){if(!this.accepts(t))return;const e=pi.exec(t);return e?function(t){const e=qe(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?it(e[ui.a]):1,h:Number.parseInt(e[ui.h]??"0",10),l:Number.parseInt(e[ui.l]??"0",10),s:Number.parseInt(e[ui.s]??"0",10)}):void 0}}async function gi(t){t.checkVersion("4.5.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new fi)})}class mi{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Ss});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function yi(t){t.checkVersion("4.5.1"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initialized||(e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i))},t.pluginManager.addPlugin(new mi(t.pluginManager))})}function vi(t,e){const i=t.value,s=t.animation,n={delayTime:q(s.delay)*d,enable:s.enable,value:q(t.value)*e,max:Y(i)*e,min:X(i)*e,loops:0,maxLoops:q(s.count),time:0};if(s.enable){switch(n.decay=1-q(s.decay),s.mode){case Et.increase:n.status=Nt.increasing;break;case Et.decrease:n.status=Nt.decreasing;break;case Et.random:n.status=W()>=h?Nt.increasing:Nt.decreasing}const t=s.mode===Et.auto;switch(s.startValue){case Vt.min:n.value=n.min,t&&(n.status=Nt.increasing);break;case Vt.max:n.value=n.max,t&&(n.status=Nt.decreasing);break;case Vt.random:default:n.value=G(n),t&&(n.status=W()>=h?Nt.increasing:Nt.decreasing)}}return n.initialValue=n.value,n}function wi(t,e,i,s,n){if(t.destroyed||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const a=(e.velocity??0)*n.factor,r=e.min,o=e.max,l=e.decay??1;e.time??=0;const c=e.delayTime??0;if(!(c>0&&e.time<c&&(e.time+=n.value,e.time<c))){switch(e.status){case Nt.increasing:e.value+=a;break;case Nt.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case Nt.increasing:e.value>=o&&(e.status=Nt.decreasing,e.loops??=0,e.loops++);break;case Nt.decreasing:e.value<=r&&(e.status=Nt.increasing,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case At.max:i>=n&&t.destroy();break;case At.min:i<=s&&t.destroy()}}(t,s,e.value,r,o),t.destroyed||(e.value=j(e.value,r,o))}}class Pi extends ie{destroy=At.none;load(t){super.load(t),A(t)||Yt(this,"destroy",t.destroy)}}class bi extends ve{animation=new Pi;value=1;load(t){if(A(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class xi{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=vi(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=q(i.speed)/c*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=W()))}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){Zt(t,"opacity",bi,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&wi(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function Mi(t){t.checkVersion("4.5.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new xi(t)))})}const zi={[ut.left]:{axis:"x",canvas:"width",bounce:"horizontal",negativeEdge:"right",positiveEdge:"left",negative:!0},[ut.right]:{axis:"x",canvas:"width",bounce:"horizontal",negativeEdge:"right",positiveEdge:"left",negative:!1},[ut.top]:{axis:"y",canvas:"height",bounce:"vertical",negativeEdge:"bottom",positiveEdge:"top",negative:!0},[ut.bottom]:{axis:"y",canvas:"height",bounce:"vertical",negativeEdge:"bottom",positiveEdge:"top",negative:!1}};class ki{modes;#u;#y;constructor(t){this.#u=t,this.modes=[Bt.bounce,Bt.split],this.#y=t.plugins.filter(t=>!!t.particleBounce)}update(t,e,i,s){if(!this.modes.includes(s))return;for(const s of this.#y)if(s.particleBounce?.(t,i,e))return;const n=t.getPosition(),a=t.offset,r=t.getRadius(),o=wt(n,r),l=this.#u.canvas.size,c=!t.isInsideCanvasForOutMode(s,e);!function(t){if(t.outMode!==Bt.bounce&&t.outMode!==Bt.split||!(t.direction in zi))return;const e=zi[t.direction],i=t.bounds,s=t.canvasSize[e.canvas],n=t.particle.position,a=t.particle.velocity[e.axis];if(e.negative&&i[e.negativeEdge]<0?n[e.axis]=t.size+t.offset[e.axis]:!e.negative&&i[e.positiveEdge]>s&&(n[e.axis]=s-t.size-t.offset[e.axis]),!t.outOfCanvas||!(e.negative&&a<0||!e.negative&&a>0))return;t.particle.velocity[e.axis]*=-q(t.particle.options.bounce[e.bounce].value);const r=t.offset[e.axis]+t.size;n[e.axis]=e.negative?r:s-r,t.outMode===Bt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:o,canvasSize:l,offset:a,outOfCanvas:c,size:r})}}class Ci{modes;constructor(t){this.modes=[Bt.destroy]}update(t,e,i,s){if(this.modes.includes(s)){switch(t.outType){case $t.normal:case $t.outside:if(t.isInsideCanvasForOutMode(s,e))return;break;case $t.inside:{const{dx:e,dy:i}=K(t.position,t.moveCenter),{x:s,y:n}=t.velocity;if(s<0&&e>t.moveCenter.radius||n<0&&i>t.moveCenter.radius||s>=0&&e<-t.moveCenter.radius||n>=0&&i<-t.moveCenter.radius)return;break}}t.destroy(!0)}}}class Si{modes;#u;constructor(t){this.#u=t,this.modes=[Bt.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===ut.left||e===ut.right))??(t.options.move.distance.vertical&&(e===ut.top||e===ut.bottom)))return;const n=t.options.move.gravity,a=this.#u,r=a.canvas.size,o=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>r.height+o&&e===ut.bottom||n.inverse&&i.y<-o&&e===ut.top)&&t.destroy()}else{if(t.velocity.y>0&&t.position.y<=r.height+o||t.velocity.y<0&&t.position.y>=-o||t.velocity.x>0&&t.position.x<=r.width+o||t.velocity.x<0&&t.position.x>=-o)return;vt(t.position,a.canvas.size,u,o,e)||t.destroy()}}}const Ii=_.origin;class Oi{modes;#u;constructor(t){this.#u=t,this.modes=[Bt.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;if(t.outType===$t.inside)this.#v(t,n);else{if(t.isInsideCanvasForOutMode(s,e))return;t.outType===$t.outside?this.#w(t):this.#P(t,n,e)}}#v(t,e){const{x:i,y:s}=t.velocity;Ii.setTo(u),Ii.length=t.moveCenter.radius,Ii.angle=t.velocity.angle+Math.PI,Ii.addTo(t.moveCenter);const{dx:n,dy:a}=K(t.position,Ii);if(i<=0&&n>=0||s<=0&&a>=0||i>=0&&n<=0||s>=0&&a<=0)return;t.position.x=Math.floor(G({min:0,max:e.canvas.size.width})),t.position.y=Math.floor(G({min:0,max:e.canvas.size.height}));const{dx:r,dy:o}=K(t.position,t.moveCenter);t.direction=Math.atan2(-o,-r),t.velocity.angle=t.direction,t.justWarped=!0}#P(t,e,i){const s=t.options.move.warp,n=e.canvas.size,a=t.getRadius(),r={bottom:n.height+a+t.offset.y,left:-a-t.offset.x,right:n.width+a+t.offset.x,top:-a-t.offset.y},o=wt(t.position,a);i===ut.right&&o.left>n.width+t.offset.x?(t.position.x=r.left,t.initialPosition.x=t.position.x,s||(t.position.y=W()*n.height,t.initialPosition.y=t.position.y),t.justWarped=!0):i===ut.left&&o.right<-t.offset.x&&(t.position.x=r.right,t.initialPosition.x=t.position.x,s||(t.position.y=W()*n.height,t.initialPosition.y=t.position.y),t.justWarped=!0),i===ut.bottom&&o.top>n.height+t.offset.y?(s||(t.position.x=W()*n.width,t.initialPosition.x=t.position.x),t.position.y=r.top,t.initialPosition.y=t.position.y,t.justWarped=!0):i===ut.top&&o.bottom<-t.offset.y&&(s||(t.position.x=W()*n.width,t.initialPosition.x=t.position.x),t.position.y=r.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0)}#w(t){t.position.x=Math.floor(G({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(G({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=K(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0}}class _i{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(t){this.#b(t,Bt.bounce,t=>new ki(t)),this.#b(t,Bt.out,t=>new Oi(t)),this.#b(t,Bt.destroy,t=>new Ci(t)),this.#b(t,Bt.none,t=>new Si(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;t.justWarped=!1,this.#x(t,e,i.bottom??i.default,ut.bottom),this.#x(t,e,i.left??i.default,ut.left),this.#x(t,e,i.right??i.default,ut.right),this.#x(t,e,i.top??i.default,ut.top)}#b(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#x(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function Li(t){t.checkVersion("4.5.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new _i(t)))})}class Di{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=xt(i.paint,t.id,i.reduceDuplicates);this.#M(s,t,e),this.#z(s,t,e)}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),r=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||r)}update(t,e){this.isEnabled(t)&&(ti(t.fillColor,e,this.#u.hdr),ti(t.strokeColor,e,this.#u.hdr))}#M(t,e,i){const s=t?.fill,n=t?.color,a=n??void 0;if(!s)return e.fillEnabled=!1,e.fillAnimation=void 0,e.fillColor=void 0,void(e.fillOpacity=1);const r=re.create(void 0===a?void 0:re.create(void 0,a),s.color);e.fillEnabled=s.enable,e.fillOpacity=q(s.opacity),e.fillAnimation=r.animation;const o=je(this.#p,r);o&&(e.fillColor=Ke(o,e.fillAnimation,i.retina.reduceFactor))}#z(t,e,i){const s=t?.stroke,n=t?.color,a=n??void 0;if(!s)return e.strokeAnimation=void 0,e.strokeColor=void 0,e.strokeOpacity=1,void(e.strokeWidth=0);const r=re.create(void 0===a?void 0:re.create(void 0,a),s.color);e.strokeWidth=q(s.width)*i.retina.pixelRatio,e.strokeOpacity=q(s.opacity??1),e.strokeAnimation=r.animation;const o=je(this.#p,r)??e.getFillColor();o&&(e.strokeColor=Ke(o,e.strokeAnimation,i.retina.reduceFactor))}}async function Ei(t){t.checkVersion("4.5.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Di(t.pluginManager,e)))})}var Ri;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Ri||(Ri={}));const Ti=/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 Bi{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:q(e.r),g:q(e.g),b:q(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Ti.exec(t);return e?{a:e.length>4?it(e[Ri.a]):1,b:parseInt(e[Ri.b]??"0",10),g:parseInt(e[Ri.g]??"0",10),r:parseInt(e[Ri.r]??"0",10)}:void 0}}async function Fi(t){t.checkVersion("4.5.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Bi)})}class Ai extends ie{destroy=At.none;load(t){super.load(t),A(t)||Yt(this,"destroy",t.destroy)}}class Ui extends ve{animation=new Ai;value=3;load(t){if(super.load(t),A(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class $i{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/c*e.retina.reduceFactor,s.sync||(t.size.velocity*=W()))}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){Zt(t,"size",Ui,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=vi(i,e),t.retina.sizeAnimationSpeed=q(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&wi(t,t.size,0,t.options.size.animation.destroy,e)}}async function Vi(t){t.checkVersion("4.5.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new $i(t)))})}async function Ni(t){t.checkVersion("4.5.1"),await t.pluginManager.register(async t=>{await Promise.all([ni(t),di(t),gi(t),Fi(t),yi(t),ri(t),Ei(t),Mi(t),Li(t),Vi(t)])})}const Wi=["ア","イ","ウ","エ","オ","カ","キ","ク","ケ","コ","サ","シ","ス","セ","ソ","タ","チ","ツ","テ","ト","ナ","ニ","ヌ","ネ","ノ","ハ","ヒ","フ","ヘ","ホ","マ","ミ","ム","メ","モ","ヤ","ユ","ヨ","ラ","リ","ル","レ","ロ","ワ","ヲ","ン","ガ","ギ","グ","ゲ","ゴ","ザ","ジ","ズ","ゼ","ゾ","ダ","ヂ","ヅ","デ","ド","バ","ビ","ブ","ベ","ボ","パ","ピ","プ","ペ","ポ","ァ","ィ","ゥ","ェ","ォ","ャ","ュ","ョ","ッ","ー","ヴ","0","1","2","3","4","5","6","7","8","9","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","日","本","人","大","中","小","上","下","左","右","力","時","空","生","死","無","有","!","@","#","$","%","&","*","+","-","=","?","/","\\","|","<",">","{","}","[","]","(",")"],Hi=new WeakMap;function ji(){return Wi[Math.floor(W()*Wi.length)]??" "}function Gi(t,e){return t+W()*(e-t)}function qi(t){const{context:e,radius:i,particle:s,delta:n,fill:a,stroke:r}=t,o=s.shapeData,l=X(o?.interval??100),c=Y(o?.interval??2e3),h=function(t,e,i){let s=Hi.get(t);return s||(s={char:ji(),elapsed:0,interval:Gi(e,i)},Hi.set(t,s)),s}(s,l,c);h.elapsed+=n.value,h.elapsed>=h.interval&&(h.char=ji(),h.elapsed-=h.interval,h.interval=Gi(l,c));const d=Math.round(2*i);e.font=`bold ${d}px "Courier New", Courier, monospace`,e.textAlign="center",e.textBaseline="middle",a&&e.fillText(h.char,u.x,u.y),r&&e.strokeText(h.char,u.x,u.y)}class Xi{draw(t){qi(t)}}async function Yi(t){t.checkVersion("4.5.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["matrix"],()=>Promise.resolve(new Xi))})}class Qi{dimensions=2;enable=!1;radius=0;retries=30;steps=0;load(t){A(t)||(Yt(this,"enable",t.enable),Yt(this,"dimensions",t.dimensions),Yt(this,"radius",t.radius),Yt(this,"retries",t.retries))}}class Ki{id="poisson";async getPlugin(t){const{PoissonDiscPluginInstance:e}=await Promise.resolve().then(function(){return Is});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.poisson;void 0===s?.load&&(e.poisson=s=new Qi),s.load(i?.poisson)}needsPlugin(t){return t?.poisson?.enable??!1}}async function Zi(t){t.checkVersion("4.5.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Ki)})}const Ji=globalThis;Ji.__tsParticlesInternals=Ji.__tsParticlesInternals??{},Ji.loadPoissonDiscPlugin=Zi;class ts{#u;#p;constructor(t,e){this.#p=t,this.#u=e}drawAfter(t){const{context:e}=t;e.restore()}drawBefore(t){const{particle:e,context:i}=t,s=this.#u,n=e,a=n.shadowColor,r=n.shadowOffset;a&&(i.save(),i.shadowBlur=n.shadowBlur??0,i.shadowColor=Xe(a,s.hdr,void 0,s.peakNits,s.hdrMode),i.shadowOffsetX=r?.x??0,i.shadowOffsetY=r?.y??0)}particleInit(t,e){const i=e.effectData,s=ae.create(new ae,i?.color);e.shadowColor=We(this.#p,s),e.shadowBlur=i?.blur??0,e.shadowOffset=i?.offset??u}}async function es(t){t.checkVersion("4.5.1"),await t.pluginManager.register(t=>{t.pluginManager.addEffect("shadow",e=>Promise.resolve(new ts(t.pluginManager,e)))})}class is{color;image;load(t){A(t)||(void 0!==t.color&&(this.color=ae.create(this.color,t.color)),Yt(this,"image",t.image))}}class ss{enable=!1;fill=new is;length=10;load(t){A(t)||(Yt(this,"enable",t.enable),void 0!==t.fill&&this.fill.load(t.fill),Yt(this,"length",t.length))}}class ns{id="trail";#p;constructor(t){this.#p=t}async getPlugin(t){const{TrailPluginInstance:e}=await Promise.resolve().then(function(){return Os});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.trail;s?.load||(e.trail=s=new ss),s.load(i?.trail)}needsPlugin(){return!0}}async function as(t){t.checkVersion("4.5.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new ns(t.pluginManager))})}const rs={fpsLimit:30,particles:{number:{value:300,density:{enable:!0}},paint:{fill:{color:{value:{h:120,s:100,l:50},animation:{l:{enable:!0,speed:70,sync:!1,min:30,max:100}}},enable:!0}},shape:{type:"matrix",options:{matrix:{interval:{min:30,max:60}}}},effect:{type:"shadow",options:{shadow:{color:"#00ff41",blur:7}}},size:{value:10},move:{enable:!0,direction:"bottom",straight:!0,speed:{min:8,max:15}}},trail:{enable:!0,length:10,fill:{color:"#000"}},poisson:{enable:!0},background:{color:"#000000"}};async function os(t){await t.pluginManager.register(async t=>{await Promise.all([Ni(t),es(t),as(t),Zi(t),Yi(t)]),t.pluginManager.addPreset("matrix",rs)})}const ls=globalThis;ls.loadMatrixPreset=os,ls.tsParticles=ei;function cs(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class hs{#k;#C;#S;#I;#O;#u;#_;#L;#D;#E;#R;#T;#p;#B;#F;#A={};#U=[void 0,void 0];#$={};constructor(t,e,i){this.#p=t,this.#u=e,this.#I=i,this.#_=null,this.#k=null,this.#C=new Set,this.#F=[],this.#B=[],this.#S=[],this.#O=[],this.#D=[],this.#E=[],this.#R=[],this.#T={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#L}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(u.x,u.y,this.#I.size.width,this.#I.size.height)})}clear(){const t=new Set;for(const e of this.#S)if(t.add(e),e.canvasClear?.())return e;for(const e of Object.values(Wt))if("number"==typeof e)for(const i of this.#V(e))if(!t.has(i)&&(t.add(i),i.canvasClear?.()))return i;this.canvasClear()}destroy(){this.stop(),this.#k=null,this.#C.clear(),this.#F=[],this.#B=[],this.#S=[],this.#O=[],this.#D=[],this.#E=[],this.#R=[];for(const t of Object.values(Wt))"number"==typeof t&&(this.#T[t]=[])}draw(t){const e=this.#_;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[a,r]=this.#N(t);if(a??=s,r??=n,!a&&!r)return;const o=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#$,f=this.#A,g=a?Ye(a,o.hdr,h*d,o.peakNits,o.hdrMode):void 0,m=r?Ye(r,o.hdr,u*d,o.peakNits,o.hdrMode):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=m,this.draw(s=>{for(const i of this.#R)i.drawParticleSetup?.(s,t,e);this.#W(s,t,i,d,f,p),this.#H({container:o,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#j(t);for(const i of this.#E)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#D)this.#G(i,s,t,e)})}drawParticles(t){const{particles:e,actualOptions:i}=this.#u,s=this.clear();e.update(t),this.draw(n=>{const a=this.#I.size.width,r=this.#I.size.height;if(this.#k)try{n.drawImage(this.#k,u.x,u.y,a,r)}catch{this.#q("background-element-draw-error","Error drawing background element onto canvas")}const o=i.background;if(o.draw)try{o.draw(n,t)}catch{this.#q("background-draw-error","Error in background.draw callback")}for(const t of this.#V(Wt.BackgroundMask))t!==s&&t.canvasPaint?.();for(const e of this.#V(Wt.CanvasSetup))e.drawSettingsSetup?.(n,t);for(const e of this.#V(Wt.PluginContent))e.draw?.(n,t);e.drawParticles(t);for(const e of this.#V(Wt.CanvasCleanup))e.clearDraw?.(n,t),e.drawSettingsCleanup?.(n,t)})}init(){this.initUpdaters(),this.initPlugins(),this.#X(),this.paint()}initPlugins(){this.#S=[],this.#O=[],this.#D=[],this.#R=[],this.#E=[];for(const t of Object.values(Wt))"number"==typeof t&&(this.#T[t]=[]);this.#Y()}initUpdaters(){this.#F=[],this.#B=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#B.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#F.push(t)}paint(){let t=!1;for(const e of this.#V(Wt.BackgroundMask))if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(u.x,u.y,this.#I.size.width,this.#I.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,u.x,u.y,this.#I.size.width,this.#I.size.height),i.globalAlpha=s})}setContext(t){this.#_=t,this.#_&&(this.#_.globalCompositeOperation=l)}setContextSettings(t){this.#L=t}stop(){this.draw(t=>{t.clearRect(u.x,u.y,this.#I.size.width,this.#I.size.height)})}#j(t){for(const e of this.#B)e.afterDraw?.(t)}#W(t,e,i,s,n,a){for(const r of this.#F){if(r.getColorStyles){const{fill:a,stroke:o}=r.getColorStyles(e,t,i,s);a&&(n.fill=a),o&&(n.stroke=o)}if(r.getTransformValues){const t=r.getTransformValues(e);for(const e in t)cs(a,t,e)}r.beforeDraw?.(e)}}#Q(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#K(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#H(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:r,opacity:o,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(l),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.y),a.fill&&(i.fillStyle=a.fill);const f=!!s.fillEnabled,g=s.strokeWidth??0;i.lineWidth=g,a.stroke&&(i.strokeStyle=a.stroke);const m={context:i,particle:s,radius:r,drawRadius:1*r,opacity:o,delta:n,pixelRatio:e.retina.pixelRatio,fill:f,stroke:g>0,transformData:u,position:{...d},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;this.#K(y,m),this.#Z(v,m),this.#J(v,m),this.#tt(v,m),this.#Q(y,m),i.resetTransform()}#G(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#J(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:a}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),a&&i.stroke())}#tt(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#Z(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#V(t){return this.#T[t]}#N(t){let e,i;for(const s of this.#O)if(!e&&s.particleFillColor&&(e=je(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=je(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#U[0]=e,this.#U[1]=i,this.#U}#et(t){const e=[[Wt.BackgroundMask,!!t.canvasPaint],[Wt.CanvasSetup,!!t.drawSettingsSetup],[Wt.PluginContent,!!t.draw],[Wt.CanvasCleanup,!!(t.clearDraw??t.drawSettingsCleanup)]];for(const[i,s]of e)s&&this.#T[i].push(t)}#Y(){for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#O.push(t),t.drawParticle&&this.#D.push(t),t.drawParticleSetup&&this.#R.push(t),t.drawParticleCleanup&&this.#E.push(t),t.canvasClear&&this.#S.push(t),this.#et(t)}#it(t){return"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas||"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement}#X(){const t=this.#u.actualOptions.background;if(this.#k=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);e&&this.#it(e)?this.#k=e:e?this.#q("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#q("background-element-not-found",`Background element selector "${t.element}" not found`)}}else this.#it(t.element)&&(this.#k=t.element)}#q(t,e){this.#C.has(t)||(this.#C.add(t),n().warning(e))}}const ds=new WeakMap;function us(t,e,i=!1){if(!e)return;const s=t.style,n=new Set;for(let t=0;t<s.length;t++){const e=s.item(t);e&&n.add(e)}for(let t=0;t<e.length;t++){const i=e.item(t);i&&n.add(i)}for(const t of n){const n=e.getPropertyValue(t);n?s.setProperty(t,n,i?"important":""):s.removeProperty(t)}}class ps{domElement;render;renderCanvas;size;zoom=1;#u;#st;#nt;#at;#rt;#p;#ot;#lt;#ct;#ht;constructor(t,e){this.#p=t,this.#u=e,this.render=new hs(t,e,this),this.#ct={height:0,width:0};const i=e.retina.pixelRatio,s=this.#ct;this.size={height:s.height*i,width:s.width*i},this.#st=!1,this.#lt=[],this.#ot="none"}get#dt(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#st){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#ut();this.render.destroy(),this.#lt=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#ht?this.#ht:{x:e*h/t,y:i*h/t}}init(){this.#pt(t=>{t.disconnect()}),this.#at=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#ft()}),this.resize(),this.#gt(),this.#pt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#mt(),this.initBackground(),this.#yt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=We(this.#p,e.color);if(n){const i=t.actualOptions.hdr;s.backgroundColor=Xe(n,t.hdr,e.opacity,i.peakNits,T(Rt,i.mode,Rt.standard))}else s.backgroundColor="";s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#lt=[];for(const t of this.#u.plugins)t.resize&&this.#lt.push(t)}loadCanvas(t){this.#st&&this.domElement&&this.domElement.remove();const e=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=e,this.#st=!!e&&"true"===e.dataset[r],this.renderCanvas=e?(t=>{const e=ds.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError(dt(rt));try{const e=t.transferControlToOffscreen();return ds.set(t,e),e}catch{throw new TypeError(dt(ot))}})(e):t;const i=this.domElement;i&&(i.ariaHidden="true",this.#rt=function(t){const e=gt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||A(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}(i.style));const s=this.#ct,n=this.renderCanvas;i?(s.height=i.offsetHeight,s.width=i.offsetWidth):(s.height=n.height,s.width=n.width);const a=this.#u.retina.pixelRatio,o=this.size;n.height=o.height=s.height*a,n.width=o.width=s.width*a}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#ct,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,r={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&r.height===i.height&&r.width===i.width)return!1;const o={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=r.width,i.height=l.height=r.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/o.width,height:s.height/o.height}),!0}setPointerEvents(t){this.domElement&&(this.#ot=t,this.#ft())}setZoom(t,e){this.zoom=t,this.#ht=e}stop(){this.#pt(t=>{t.disconnect()}),this.#at=void 0,this.#vt(),this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#wt(),e&&await t.refresh()}#wt(){for(const t of this.#lt)t.resize?.()}#mt(){const t=this.#u,e=t.actualOptions.hdr.enable&&mt("(color-gamut: p3)")?.matches&&mt("(dynamic-range: high)")?.matches;t.hdrMode=T(Rt,t.actualOptions.hdr.mode,Rt.standard),t.peakNits=t.actualOptions.hdr.peakNits;const i=this.renderCanvas;if(!i)return void(t.hdr=e??!1);let s;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...e?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});try{s=i.getContext("2d",this.render.settings)}catch{s=null}if(e&&!s){const t={alpha:!0,desynchronized:!0,willReadFrequently:!1,colorSpace:"srgb"};this.render.setContextSettings(t);try{s=i.getContext("2d",t)}catch{s=null}}if(this.render.setContext(s),s){const e=(t=>{if(!t)return;const e=t;return e.getContextAttributes?.().colorSpace??void 0})(s);void 0!==e&&(t.hdr="display-p3"===e)}}#yt(){this.#vt();const t=mt("(color-gamut: p3)"),e=mt("(dynamic-range: high)"),i=()=>{this.#mt(),this.initBackground()},s=[];t&&(t.addEventListener("change",i),s.push({handler:i,mql:t})),e&&(e.addEventListener("change",i),s.push({handler:i,mql:e})),this.#nt=s}#gt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#dt?this.#Pt():this.#ut();for(const i in e.style){if(!i||!(i in e.style))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}}#vt(){if(this.#nt){for(const{handler:t,mql:e}of this.#nt)e.removeEventListener("change",t);this.#nt=void 0}}#ft(){const t=this.domElement;if(!t)return;this.#pt(t=>{t.disconnect()}),this.#gt(),this.initBackground();const e=this.#ot;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#pt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#ut(){const t=this.domElement,e=this.#rt;t&&e&&us(t,e,!0)}#pt(t){this.#at&&t(this.#at)}#Pt(){const t=this.domElement;t&&us(t,function(t){if(zt!==t||!kt){zt=t;const e=gt().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}kt=e}return kt}(this.#u.actualOptions.fullScreen.zIndex),!0)}}class fs{#u;#bt;#xt;#Mt;constructor(t){this.#u=t,this.#bt={visibilityChange:()=>{this.#zt()},resize:()=>{this.#kt()}}}addListeners(){this.#Ct(!0)}removeListeners(){void 0!==this.#Mt&&(clearTimeout(this.#Mt),this.#Mt=void 0),this.#Ct(!1)}#zt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(gt().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#kt(){this.#Mt&&(clearTimeout(this.#Mt),this.#Mt=void 0);const t=async()=>{await this.#u.canvas.windowResize()};this.#Mt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*d)}#Ct(t){const e=this.#bt;this.#St(t),Ct(document,"visibilitychange",e.visibilityChange,t,!1)}#St(t){const e=this.#bt,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Ct(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#xt&&!t?(s&&this.#xt.unobserve(s),this.#xt.disconnect(),this.#xt=void 0):!this.#xt&&t&&s&&(this.#xt=new ResizeObserver(t=>{t.some(t=>t.target===s)&&this.#kt()}),this.#xt.observe(s))}}function gs(t){if(e=t.outMode,i=t.checkModes,!(e===i||F(i)&&i.includes(e)))return;var e,i;const s=2*t.radius;t.coord>t.maxCoord-s?t.setCb(-t.radius):t.coord<s&&t.setCb(t.radius)}function ms(t,e){const i=t%e;return i<0?i+e:i}function ys(t,e,i,s){const n=Ee(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=xt(n.effect.type,t.id,a),t.shape=xt(n.shape.type,t.id,a);const r=n.effect,o=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=xt(e,t.id,a);i&&(t.effect=i)}r.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=xt(e,t.id,a);i&&(t.shape=i)}o.load(s.shape)}}if(t.effect===y){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(W()*i.length)]}if(t.shape===y){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(W()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return Pt({close:e.close},xt(n,i,s))}(t.effect,r,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return Pt({close:e.close},xt(n,i,s))}(t.shape,o,t.id,a):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class vs{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;#It={fillOpacity:1,opacity:1,strokeOpacity:1};#Ot=O.origin;#_t={sin:0,cos:0};#Lt={a:1,b:0,c:0,d:1};#u;#Dt=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#Dt.push(t),this.#Dt.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#Dt.length=0}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const e=this.#u,i=this.shape?e.shapeDrawers.get(this.shape):void 0;i?.particleDestroy?.(this);for(const i of e.particleDestroyedPlugins)i.particleDestroyed?.(this,t);for(const i of e.particleUpdaters)i.particleDestroyed?.(this,t);this.#u.dispatchEvent(_t.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.#Et(this.#Rt(Qe(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*h}getModifier(t){return this.#Dt.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=q(this.opacity?.value??1),s=this.#Rt(void 0,t=>t.opacity)??i;return this.#It.fillOpacity=this.fillOpacity??1,this.#It.opacity=s*e,this.#It.strokeOpacity=this.strokeOpacity??1,this.#It}getPosition(){return this.#Ot.x=this.position.x+this.offset.x,this.#Ot.y=this.position.y+this.offset.y,this.#Ot.z=this.position.z,this.#Ot}getRadius(){return this.#Rt(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#_t.sin=Math.sin(t),this.#_t.cos=Math.cos(t),this.#_t}getStrokeColor(){return this.#Et(this.#Rt(Qe(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#Lt.a=e.cos*(t.a??p),this.#Lt.b=i?e.sin*(t.b??1):t.b??f,this.#Lt.c=i?-e.sin*(t.c??1):t.c??g,this.#Lt.d=e.cos*(t.d??m),this.#Lt}init(t,e,i,s){const n=this.#u;!function(t,e,i){t.id=e,t.group=i,t.justWarped=!1,t.effectClose=!0,t.shapeClose=!0,t.pathRotation=!1,t.lastPathTime=0,t.destroyed=!1,t.unbreakable=!1,t.isRotating=!1,t.rotation=0,t.misplaced=!1,t.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},t.size={value:1,max:1,min:1,enable:!1},t.outType=$t.normal,t.ignoresResizeRatio=!0}(this,t,s),this.options=ys(this,n,this.#p,i),n.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(n.particleUpdaters,this),this.#Tt(e),this.initialVelocity=this.#Bt(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,n),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(n.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(n,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(n,this)}isInsideCanvas(t){return this.#Ft({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#Ft({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=ms(t,v);return e>=Math.PI*h&&e<3*Math.PI*h}if(this.roll.horizontal){const e=ms(t+Math.PI*h,v);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=ms(t,v);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}removeModifier(t){const e=this.#Dt.findIndex(e=>e.id===t);e>=0&&this.#Dt.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Rt(t,e){let i=t;for(const t of this.#Dt)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#At(t,e){let i=0,s=t?O.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,r=this.options.move.outModes,o=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return O.create(i.x,i.y,e)}const t=et({size:l,position:s}),c=O.create(t.x,t.y,e);this.#Ut(c,o,r.left??r.default),this.#Ut(c,o,r.right??r.default),this.#$t(c,o,r.top??r.default),this.#$t(c,o,r.bottom??r.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}}#Bt(){const t=this.options.move,e=function(t){const e=_.origin;return e.length=1,e.angle=t,e}(this.direction).copy();if(t.direction===a.inside||t.direction===a.outside)return e;const i=tt(q(t.angle.value)),s=tt(q(t.angle.offset)),n={left:s-i*h,right:s+i*h};return t.straight||(e.angle+=G(Q(n.left,n.right))),t.random&&"number"==typeof t.speed&&(e.length*=W()),e}#Ut(t,e,i){gs({outMode:i,checkModes:[Bt.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})}#$t(t,e,i){gs({outMode:i,checkModes:[Bt.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})}#Vt(t,e){const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===Bt.bounce;return t===ut.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===ut.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===ut.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===ut.top?{inside:a?n.y-i>0:n.y+i>0,reason:"default"}:{inside:n.x>=-i&&n.y>=-i&&n.y<=s.height+i&&n.x<=s.width+i,reason:"default"}}#Nt(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Ft(t){const e=this.#Vt(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,r=n?.isInsideCanvas;if(!a&&!r)return e;const o=this.#Nt(t.direction,t.outMode),l=a?this.#Wt(a(o),"shape"):void 0,c=r?this.#Wt(r(o),"effect"):void 0;if(l&&c){const t=Math.max(l.margin??0,c.margin??0);return{inside:l.inside&&c.inside,margin:t>0?t:void 0,reason:"combined"}}return l??c??e}#Et(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?function(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===Ft.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t}#Tt(t){const e=this.#u,i=Math.floor(q(this.options.zIndex.value)),s=this.#At(t,j(i,0,e.zLayers));if(!s)throw new Error(dt(nt));this.position=s,this.initialPosition=this.position.copy();const n=e.canvas.size;switch(this.moveCenter={...Mt(this.options.move.center,n),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(E(t))return tt(t);switch(t){case a.top:return-Math.PI*h;case a.topRight:return-Math.PI*C;case a.right:return 0;case a.bottomRight:return Math.PI*C;case a.bottom:return Math.PI*h;case a.bottomLeft:return.75*Math.PI;case a.left:return Math.PI;case a.topLeft:return.75*-Math.PI;case a.inside:return Math.atan2(i.y-e.y,i.x-e.x);case a.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return W()*v}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case a.inside:this.outType=$t.inside;break;case a.outside:this.outType=$t.outside}this.offset=_.origin}#Wt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class ws{#Ht;#jt=new Map;#Gt=[];#qt;#Xt;#Yt=[];#Qt;constructor(t){this.#Ht=t,this.#qt=0,this.#Qt=0}get cellSize(){return this.#Ht}set cellSize(t){this.#Xt=t}clear(){this.#jt.clear();const t=this.#Xt;t&&(this.#Ht=t),this.#Xt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Kt(e,i);this.#jt.has(s)||this.#jt.set(s,[]),this.#jt.get(s)?.push(t)}query(t,e,i=[]){const s=this.#Zt(t);if(!s)return i;const n=Math.floor(s.minX/this.#Ht),a=Math.floor(s.maxX/this.#Ht),r=Math.floor(s.minY/this.#Ht),o=Math.floor(s.maxY/this.#Ht);for(let s=n;s<=a;s++)for(let n=r;n<=o;n++)this.#Jt(s,n,t,e,i);return i}queryCircle(t,e,i,s=[]){const n=this.#te(t.x,t.y,e);try{return this.query(n,i,s)}finally{this.#qt--}}queryRectangle(t,e,i,s=[]){const n=this.#ee(t.x,t.y,e.width,e.height);try{return this.query(n,i,s)}finally{this.#Qt--}}#te(t,e,i){const s=this.#qt++;let n=this.#Gt[s];return n||(n=new qt(t,e,i),this.#Gt[s]=n),n.reset(t,e,i)}#ee(t,e,i,s){const n=this.#Qt++;let a=this.#Yt[n];return a||(a=new Xt(t,e,i,s),this.#Yt[n]=a),a.reset(t,e,i,s)}#Kt(t,e){return`${Math.floor(t/this.#Ht)}_${Math.floor(e/this.#Ht)}`}#Zt(t){if(t instanceof qt){const e=t.radius,{x:i,y:s}=t.position;return{minX:i-e,maxX:i+e,minY:s-e,maxY:s+e}}if(t instanceof Xt){const{x:e,y:i}=t.position,{width:s,height:n}=t.size;return{minX:e,maxX:e+s,minY:i,maxY:i+n}}return null}#Jt(t,e,i,s,n){const a=this.#jt.get(`${t}_${e}`);if(a)for(const t of a)s&&!s(t)||i.contains(t.getPosition())&&n.push(t)}}class Ps{checkParticlePositionPlugins;#ie;#u;#se;#ne;#ae;#re;#oe;#le;#ce;#p;#he;#de;#ue;#pe;#fe;#ge;constructor(t,e){this.#p=t,this.#u=e,this.#re=0,this.#ie=[],this.#he=[],this.#ae=0,this.#ne=new Map,this.#oe=new Map,this.#ge=this.#me(this.#u.zLayers),this.#se=new ws(100),this.checkParticlePositionPlugins=[],this.#le=[],this.#ce=[],this.#ue=[],this.#de=[],this.#fe=[]}get count(){return this.#ie.length}get grid(){return this.#se}addParticle(t,e,i,s){if(!this.#ye(i,this.count))try{const n=this.#he.pop()??new vs(this.#p,this.#u);n.init(this.#re,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#ie.push(n),this.#ve(n),this.#re++,this.#u.dispatchEvent(_t.particleAdded,{particle:n}),n):void this.#he.push(n)}catch(t){n().warning(`error adding particle: ${t}`)}}clear(){this.#ie=[],this.#oe.clear(),this.#we(this.#u.zLayers)}destroy(){this.#ie=[],this.#he.length=0,this.#oe.clear(),this.#ge=[],this.checkParticlePositionPlugins=[],this.#le=[],this.#ce=[],this.#ue=[],this.#de=[],this.#fe=[]}drawParticles(t){for(let e=this.#ge.length-1;e>=0;e--){const i=this.#ge[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#ie.filter(t)}find(t){return this.#ie.find(t)}get(t){return this.#ie[t]}async init(){const t=this.#u;this.checkParticlePositionPlugins=[],this.#fe=[],this.#ce=[],this.#ue=[],this.#le=[],this.#de=[],this.#oe.clear(),this.#we(t.zLayers),this.#se=new ws(100*t.retina.pixelRatio),this.#Pe(t.actualOptions.particles);const e=t.actualOptions.particles.groups;for(const t in e){const i=e[t];i&&this.#Pe(Ee(this.#p,this.#u,i),t,i)}await this.#be()}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#ie.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s,n=!0){if(t<0||t>this.count)return;let a=0;for(let r=t;a<e&&r<this.count;r++)this.#xe(r,i,s,n)&&(r--,a++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Ee(this.#p,this.#u,s);this.#Me(n,i,t)}this.#Me(t.particles,i)}setResizeFactor(t){this.#pe=t}update(t){this.#se.clear();for(const e of this.#fe)e.update?.(t);const e=this.#ze(t);for(const e of this.#ue)e.postUpdate?.(t);if(this.#ke(t,e),e.size)for(const t of e)this.remove(t,t.group);this.#pe=void 0}#Ce(...t){this.#he.push(...t)}#Me(t,e,i,s){const n=t.number;if(!n.density.enable)return void this.#Pe(t,i,s);const a=this.#Se(n.density),r=n.value,o=n.limit.value>0?n.limit.value:r,l=Math.min(r,o)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#ae=n.limit.value*a:this.#ne.set(i,{limit:n.limit.value*a,mode:T(Tt,n.limit.mode,Tt.delete)}),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)}#Pe(t,e,i){if(void 0===e){this.#ae=t.number.limit.value;const e=this.#u.actualOptions.particles.groups;for(const t of this.#ne.keys())t in e||this.#ne.delete(t)}else{const s=i?.number?.limit?.value??t.number.limit.value;s>0?this.#ne.set(e,{limit:s,mode:T(Tt,i?.number?.limit?.mode??t.number.limit.mode,Tt.delete)}):this.#ne.delete(e)}}#ye(t,e){const i=this.#ae,s=this.#u.actualOptions.particles.number.limit.mode;if(i>0&&s===Tt.wait&&e>=i)return!0;const n=void 0===t?void 0:this.#ne.get(t);if(n&&n.limit>0&&n.mode===Tt.wait){if(this.filter(e=>e.group===t).length>=n.limit)return!0}if(n&&n.limit>0&&n.mode===Tt.delete){const e=this.filter(e=>e.group===t).length+1-n.limit;e>0&&this.removeQuantity(e,t)}if(i>0&&s===Tt.delete){const t=this.count+1-i;t>0&&this.#Ie(t)}return!1}#me(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#Oe(t){const e=this.#ge.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#Se(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1}async#_e(){const t=this.#u;await t.initDrawersAndUpdaters();for(const e of t.effectDrawers.values())await(e.init?.(t));for(const e of t.shapeDrawers.values())await(e.init?.(t))}async#be(){await this.#Le(),await this.#_e();let t=!1;const e=this.#u;for(const i of e.plugins)if(t=i.particlesInitialization?.()??t,t)break;if(t)return;const i=e.actualOptions.particles,s=i.groups;for(const t in s){const e=s[t];if(e)for(let s=this.count,n=0;n<e.number.value&&s<i.number.value;s++,n++)this.addParticle(void 0,e,t)}for(let t=this.count;t<i.number.value;t++)this.addParticle()}async#Le(){const t=this.#u;for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#fe.push(e),e.particleUpdate&&this.#ce.push(e),e.postUpdate&&this.#ue.push(e),e.particleReset&&this.#le.push(e),e.postParticleUpdate&&this.#de.push(e)}#ve(t){const e=this.#Oe(t.position.z),i=this.#ge[e];i&&(i.push(t),this.#oe.set(t.id,e))}#Ie(t){this.removeAt(0,t,void 0,void 0,!1)}#xe(t,e,i,s=!0){const n=this.#ie[t];return!!n&&((!s||n.group===e)&&(this.#ie.splice(t,1),this.#De(n),n.destroy(i),this.#u.dispatchEvent(_t.particleRemoved,{particle:n}),this.#Ce(n),!0))}#De(t){const e=this.#oe.get(t.id)??this.#Oe(t.position.z),i=this.#ge[e];if(!i)return void this.#oe.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#oe.delete(t.id)}#we(t){const e=Math.max(Math.floor(t),1);if(this.#ge.length===e)for(const t of this.#ge)t.length=0;else this.#ge=this.#me(e)}#Ee(t){const e=this.#Oe(t.position.z),i=this.#oe.get(t.id);if(void 0===i)return void this.#ve(t);if(i===e)return;const s=this.#ge[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#ge[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#oe.set(t.id,e)}else this.#oe.set(t.id,e)}#ze(t){const e=new Set,i=this.#pe;for(const s of this.#ie){i&&!s.ignoresResizeRatio&&(s.position.x*=i.width,s.position.y*=i.height,s.initialPosition.x*=i.width,s.initialPosition.y*=i.height),s.ignoresResizeRatio=!1;for(const t of this.#le)t.particleReset?.(s);for(const e of this.#ce){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.#se.insert(s)}return e}#ke(t,e){for(const i of this.#ie)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.#de)e.postParticleUpdate?.(i,t);this.#Ee(i)}}}class bs{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=q(s.gravity.maxSpeed)*i,a.moveDrift=q(s.drift)*i,a.moveSpeed=q(s.speed)*i;const r=a.maxDistance;r.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,r.vertical=void 0===n.vertical?void 0:n.vertical*i}}function xs(t){return!t.destroyed}function Ms(t,e,...i){const s=new Re(t,e);return te(s,...i),s}var zs=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;hdrMode;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;peakNits;plugins;retina;shapeDrawers;started;zLayers;#Re;#Te;#Be;#Fe={value:0,factor:0};#Ae;#Ue;#$e;#Ve;#Ne;#We;#He;#je;#Ge;#qe;#Xe;#p;#Ye;#Qe;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#Ae=e,this.#Ge=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.hdrMode=Rt.standard,this.peakNits=400,this.#Ye=!1,this.#Re=0,this.#$e=0,this.#je=0,this.#Ne=!0,this.started=!1,this.destroyed=!1,this.#Xe=!0,this.#He=0,this.zLayers=100,this.pageHidden=!1,this.#Qe=a,this.#We=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new bs(this),this.canvas=new ps(this.#p,this),this.particles=new Ps(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#qe=Ms(this.#p,this),this.actualOptions=Ms(this.#p,this),this.#Ve=new fs(this),this.dispatchEvent(_t.containerBuilt)}get animationStatus(){return!this.#Xe&&!this.pageHidden&&xs(this)}get options(){return this.#qe}get sourceOptions(){return this.#Qe}addLifeTime(t){this.#je+=t}alive(){return!this.#$e||this.#je<=this.#$e}destroy(t=!0){if(xs(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.destroyed=!0,this.#Ge(t),this.dispatchEvent(_t.containerDestroyed)}}dispatchEvent(t,e){this.#Ae(t,{container:this,data:e})}draw(t){if(!xs(this))return;let e=t;this.#Ue=V(t=>{e&&(this.#He=void 0,e=!1),this.#Ke(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}n().error(`Export plugin with type ${t} not found`)}async init(){if(!xs(this))return;const t=new Map;for(const e of this.#p.plugins){const i=await e.getPlugin(this);i.preInit&&await i.preInit(),t.set(e,i)}await this.initDrawersAndUpdaters(),this.#qe=Ms(this.#p,this,this.#We,this.sourceOptions),this.actualOptions=Ms(this.#p,this,this.#qe),this.#be(t),this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:e,duration:i,fpsLimit:s,smooth:n,zLayers:a}=this.actualOptions,r=this.actualOptions.hdr;this.hdrMode=T(Rt,r.mode,Rt.standard),this.peakNits=r.peakNits,this.zLayers=a,this.#$e=q(i)*d,this.#Re=q(e)*d,this.#je=0,this.fpsLimit=s>0?s:120,this.#Ye=n;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(_t.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(_t.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await St(this,t.initializers.effects),this.shapeDrawers=await St(this,t.initializers.shapes),this.particleUpdaters=await async function(t,e){return await Promise.all([...e.values()].map(e=>e(t)))}(this,t.initializers.updaters)}pause(){var t;if(xs(this)&&(void 0!==this.#Ue&&(t=this.#Ue,N(t),this.#Ue=void 0),!this.#Xe)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Xe=!0),this.dispatchEvent(_t.containerPaused)}}play(t){if(!xs(this))return;const e=this.#Xe||t;if(!this.#Ne||this.actualOptions.autoPlay){if(this.#Xe&&(this.#Xe=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(_t.containerPlay),this.draw(e??!1)}else this.#Ne=!1}async refresh(){if(xs(this))return this.stop(),this.start()}async reset(t){if(xs(this))return this.#We=t,this.#Qe=t,this.#qe=Ms(this.#p,this,this.#We,this.sourceOptions),this.actualOptions=Ms(this.#p,this,this.#qe),this.refresh()}async start(){xs(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{this.#Te=t;const e=async()=>{this.#Be=void 0,this.#Te=void 0,this.#Ve.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(_t.containerStarted),this.play(),t()};this.#Be=setTimeout(()=>{e()},this.#Re)}))}stop(){if(xs(this)&&this.started){void 0!==this.#Be&&(clearTimeout(this.#Be),this.#Be=void 0,this.#Te?.(),this.#Te=void 0),this.#Ne=!0,this.started=!1,this.#Ve.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.#Qe=this.#qe,this.dispatchEvent(_t.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#be(t){this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[e,i]of t)e.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i))}#Ke(t){try{if(!this.#Ye&&void 0!==this.#He&&t<this.#He+d/this.fpsLimit)return void this.draw(!1);if(this.#He??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/d}(this.#Fe,t-this.#He,this.fpsLimit,this.#Ye),this.addLifeTime(this.#Fe.value),this.#He=t,this.#Fe.value>d)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#Fe),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){n().error("error in animation loop",t)}}}});var ks=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=Wt.CanvasSetup;#u;#Ze;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??l,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#Ze&&(t.globalCompositeOperation=this.#Ze)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Ze=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function Cs(t,e,i,s,n,a,r){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=j(t.velocity.x,-1,1),t.velocity.y=j(t.velocity.y,-1,1));t.lastPathTime-=n}(t,r);const o=t.gravity,l=o?.enable&&o.inverse?-1:1;n&&i&&(t.velocity.x+=n*r.factor/(60*i)),o?.enable&&i&&(t.velocity.y+=l*(o.acceleration*r.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const h=t.velocity.mult(i);o?.enable&&s>0&&(!o.inverse&&h.y>=0&&h.y>=s||o.inverse&&h.y<=0&&h.y<=-s)&&(h.y=l*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(a);const{position:p}=t;p.addTo(h),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 Ss=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(t){const e=t.options.move,i=e.gravity,s=e.path;if(t.moveDecay=1-q(e.decay),t.pathDelay=q(s.delay.value)*d,s.generator){let e=this.pathGenerators.get(s.generator);e||(e=this.availablePathGenerators.get(s.generator),e&&(this.pathGenerators.set(s.generator,e),e.init())),t.pathGenerator=e}t.gravity={enable:i.enable,acceleration:q(i.acceleration),inverse:i.inverse},function(t,e){const i=e.options.move.spin;if(!i.enable)return;const s=i.position??{x:50,y:50},n={x:.01*s.x*t.canvas.size.width,y:.01*s.y*t.canvas.size.height},a=J(e.getPosition(),n),r=q(i.acceleration);e.retina.spinAcceleration=r*t.retina.pixelRatio,e.spin={center:n,direction:e.velocity.x>=0?Dt.clockwise:Dt.counterClockwise,angle:W()*v,radius:a,acceleration:e.retina.spinAcceleration}}(this.#u,t)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(t,e){const i=t.options.move;if(!i.enable)return;const s=this.#u,n=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(t),a=s.retina.reduceFactor,r=t.retina.moveSpeed,o=t.retina.moveDrift,l=t.size.max,c=r*(i.size?t.getRadius()/l:1)*n*(e.factor||1)*h,d=t.retina.maxSpeed;i.spin.enable?function(t,e,i,s){if(!e.spin)return;const n=e.spin.direction===Dt.clockwise,a={x:n?Math.cos:Math.sin,y:n?Math.sin:Math.cos};e.position.x=e.spin.center.x+e.spin.radius*a.x(e.spin.angle)*s,e.position.y=e.spin.center.y+e.spin.radius*a.y(e.spin.angle)*s,e.spin.radius+=e.spin.acceleration*s;const r=Math.max(t.canvas.size.width,t.canvas.size.height),o=r*h;e.spin.radius>o?(e.spin.radius=o,e.spin.acceleration*=-1):e.spin.radius<0&&(e.spin.radius=0,e.spin.acceleration*=-1),e.spin.angle+=.01*i*(1-e.spin.radius/r)}(s,t,c,a):Cs(t,i,c,d,o,a,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=K(e,t.position),n=Math.abs(i),a=Math.abs(s),{maxDistance:r}=t.retina,o=r.horizontal,l=r.vertical;if(!o&&!l)return;if((o&&n>=o||l&&a>=l)&&!t.misplaced)t.misplaced=!!o&&n>o||!!l&&a>l,o&&(t.velocity.x=t.velocity.y*h-t.velocity.x),l&&(t.velocity.y=t.velocity.x*h-t.velocity.y);else if((!o||n<o)&&(!l||a<l)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;o&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-W()),l&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-W())}}(t)}preInit(){return this.#Je()}redrawInit(){return this.#Je()}update(){for(const t of this.pathGenerators.values())t.update()}async#Je(){const t=this.#p;if(t.initializers.pathGenerators){this.availablePathGenerators=await St(this.#u,t.initializers.pathGenerators),this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var Is=Object.freeze({__proto__:null,PoissonDiscPluginInstance:class{poissonDisc;redrawTimeout;#u;#ti;constructor(t){this.#u=t,this.#ti=0}async init(){await this.#ei()}particlePosition(t){const e=this.#u.actualOptions.poisson;if(this.poissonDisc&&e?.enable&&!(this.#ti>=this.poissonDisc.points.length))return t??this.poissonDisc.points[this.#ti++]?.position}resize(){const t=this.#u,e=t.actualOptions.poisson;if(!e?.enable)return;this.redrawTimeout&&clearTimeout(this.redrawTimeout);this.redrawTimeout=setTimeout(()=>{(async()=>{this.#u.destroyed||(await this.#ei(),await t.particles.redraw())})()},250)}stop(){delete this.poissonDisc}async#ei(){const t=this.#u,e=t.actualOptions.poisson,i=t.actualOptions.particles,s=t.canvas.size,n=t.retina.pixelRatio;if(!e?.enable)return;this.#ti=0;const{PoissonDisc:a}=await Promise.resolve().then(function(){return _s});this.poissonDisc=new a(s,e.radius?e.radius*n:Math.max(Y(i["size.value"]??1)*n,Math.sqrt(s.width*s.height/i.number.value)),e.retries,e.dimensions);e.steps>0?this.poissonDisc.steps(e.steps):await this.poissonDisc.run()}}});var Os=Object.freeze({__proto__:null,TrailPluginInstance:class{layer=Wt.PluginContent;#u;#p;#ii;constructor(t,e){this.#u=e,this.#p=t}canvasClear(){const t=this.#u,e=t.actualOptions.trail,i=this.#ii;if(!e?.enable||!i||e.length<=0)return!1;let s=!1;const n=t.canvas;return i.color?(n.render.paintBase(Xe(i.color,t.hdr,i.opacity,t.peakNits,t.hdrMode)),s=!0):i.image&&(n.render.paintImage(i.image,i.opacity),s=!0),s}async init(){try{await this.#si()}catch(t){n().error(t)}}async#si(){const t=this.#u.actualOptions.trail;if(!t?.enable)return;const e=t.fill,i=1/t.length;if(e.color){const t=We(this.#p,e.color);if(!t)return;this.#ii={color:{...t},opacity:i}}else await new Promise((t,s)=>{if(!e.image)return;const a=gt().createElement("img");a.addEventListener("load",()=>{this.#ii={image:a,opacity:i},t()}),a.addEventListener("error",t=>{n().error(t),s(new Error("Error loading image"))}),a.src=e.image})}}});var _s=Object.freeze({__proto__:null,PoissonDisc:class{active;cellSize;cols;dimensions;firstPoint;grid;points;radius;retries;rows;size;constructor(t,e,i,s,n){this.size={...t},this.radius=e,this.retries=i,this.dimensions=s,this.cellSize=Math.floor(this.radius/Math.sqrt(this.dimensions)),this.cols=Math.floor(this.size.width/this.cellSize),this.rows=Math.floor(this.size.height/this.cellSize),this.points=[],this.active=[],this.grid=[],this.firstPoint=n?{...n}:void 0,this.reset()}addPoint(t){const e={position:{...t},gridPosition:{x:Math.floor(t.x/this.cellSize),y:Math.floor(t.y/this.cellSize)}},i=this.points.length,s=this.grid[e.gridPosition.y];s&&(this.points.push(e),s[e.gridPosition.x]=i,this.active.push(i))}getRandom(t,e){return Math.floor(W()*(e-t))+t}initialiseGrid(){for(let t=0;t<=this.rows;t++){this.grid[t]=[];const e=this.grid[t];if(e)for(let t=0;t<=this.cols;t++)e[t]=-1}}reset(){if(this.points=[],this.active=[],this.grid=[],this.initialiseGrid(),this.firstPoint)this.addPoint(this.firstPoint);else{const t=0;this.addPoint({x:this.getRandom(t,this.size.width),y:this.getRandom(t,this.size.height)})}}async run(){this.reset();let t=0;for(;this.active.length>0;)this.steps(1),++t%100==0&&await new Promise(t=>setTimeout(t))}steps(t){for(let e=0;e<t;e++)this.active.length<=0||this.#ni()}#ai(t,e){const i=e*(v/this.retries),s=this.getRandom(this.radius,2*this.radius),n=Math.cos(i)*s,a=Math.sin(i)*s,r={x:Math.floor(t.position.x+n),y:Math.floor(t.position.y+a)},o=Math.floor(r.x/this.cellSize),l=Math.floor(r.y/this.cellSize);if(r.x<=0||r.x>=this.size.width||r.y<=0||r.y>=this.size.height)return;const c=this.grid[l];if(!c)return;const h=c[o];if(void 0!==h&&!(h>=0)){for(let t=-1;t<=1;t++)for(let e=-1;e<=1;e++){if(!t&&!e)continue;const i={x:o+e,y:l+t};if(i.x<0||i.y<0||i.x>=this.cols||i.y>=this.rows)continue;const s=this.grid[i.y]?.[i.x];if(void 0===s||s<0)continue;const n=this.points[s];if(n&&J(r,n.position)<this.radius)return}return r}}#ni(){const t=this.getRandom(0,this.active.length);let e=!1;for(let i=0;i<this.retries;i++){const s=this.active[t];if(void 0===s)continue;const n=this.points[s];if(!n)continue;const a=this.#ai(n,i);if(a){e=!0,this.addPoint(a);break}}if(!e){const e=1;this.active.splice(t,e)}}}});t.loadMatrixPreset=os,t.tsParticles=ei}(t.__tsParticlesInternals.presets.matrix=t.__tsParticlesInternals.presets.matrix||{})}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:self),Object.assign(globalThis.window||globalThis,{loadMatrixPreset:(globalThis.__tsParticlesInternals.presets.matrix||{}).loadMatrixPreset});
|
|
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)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},function(t){"use strict";const e=/^\[tsParticles Error (TSP-\d+)\]\s*/,i=t=>(...e)=>{t(...e)},s={debug:i(console.debug),error:(t,...i)=>{if("string"==typeof t){const s=e.exec(t);if(s?.[1])return void console.error(`tsParticles - ${s[1]} - ${t.slice(s[0].length)}`,...i)}console.error(`tsParticles - Error - ${t}`,...i)},info:i(console.info),log:i(console.log),trace:i(console.trace),verbose:i(console.log),warning:i(console.warn)};function n(){return s}var a;!function(t){t.bottom="bottom",t.bottomLeft="bottom-left",t.bottomRight="bottom-right",t.left="left",t.none="none",t.right="right",t.top="top",t.topLeft="top-left",t.topRight="top-right",t.outside="outside",t.inside="inside"}(a||(a={}));const r="generated",o="100%",l="source-over",c=100,h=.5,d=1e3,u={x:0,y:0,z:0},p=1,f=0,g=0,m=1,y="random",v=2*Math.PI,w="true",P="false",b="canvas",x=255,M=360,z=100,k=100,C=.25,S=400;function I(t){return"z"in t?t.z:u.z}class O{x;y;z;constructor(t=u.x,e=u.y,i=u.z){this.x=t,this.y=e,this.z=i}static get origin(){return O.create(u.x,u.y,u.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 O.create(t.x,t.y,I(t))}static create(t,e,i){return"number"==typeof t?new O(t,e??u.y,i??u.z):new O(t.x,t.y,I(t))}add(t){return O.create(this.x+t.x,this.y+t.y,this.z+I(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=I(t)}copy(){return O.clone(this)}div(t){return O.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return O.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 O.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),u.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=I(t)}sub(t){return O.create(this.x-t.x,this.y-t.y,this.z-I(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=I(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class _ extends O{constructor(t=u.x,e=u.y){super(t,e,u.z)}static get origin(){return _.create(u.x,u.y)}static clone(t){return _.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new _(t,e??u.y):new _(t.x,t.y)}}function L(t){return"boolean"==typeof t}function D(t){return"string"==typeof t}function E(t){return"number"==typeof t}function R(t,e){return Object.values(t).some(t=>t===e)}function T(t,e,i){return R(t,e)?e:i}function B(t){return"object"==typeof t&&null!==t}function F(t){return Array.isArray(t)}function A(t){return null==t}const U=Math.PI/180;let $=Math.random;const V=t=>requestAnimationFrame(t),N=t=>{cancelAnimationFrame(t)};function W(){return q($(),0,1-Number.EPSILON)}function j(t,e){return W()*(e-t)+t}function q(t,e,i){return Math.min(Math.max(t,e),i)}function H(t){const e=Y(t);let i=X(t);return e===i&&(i=0),j(i,e)}function G(t){return E(t)?t:H(t)}function X(t){return E(t)?t:t.min}function Y(t){return E(t)?t:t.max}function Q(t,e){if(t===e||void 0===e&&E(t))return t;const i=X(t),s=Y(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:Q(i,s)}function K(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function Z(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function J(t,e){return Math.sqrt(Z(t,e))}function tt(t){return t*U}function et(t){const{position:e,size:i}=t;return{x:e?.x??W()*i.width,y:e?.y??W()*i.height}}function it(t){return t?t.endsWith("%")?Number.parseFloat(t)/c:Number.parseFloat(t):1}const st="TSP-1001",nt="TSP-1002",at="TSP-1003",rt="TSP-1101",ot="TSP-1102",lt="TSP-1201",ct="TSP-1202",ht="TSP-1203";function dt(t,...e){return`[tsParticles Error ${t}] https://particles.js.org/errors/#${t}`}var ut,pt;function ft(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function gt(){return globalThis.document}function mt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function yt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(W()*t.length)]}function vt(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==ut.bottom||(n=t.top<e.height+i.x);!n||s&&s!==ut.left||(n=t.right>i.x);!n||s&&s!==ut.right||(n=t.left<e.width+i.y);!n||s&&s!==ut.top||(n=t.bottom>i.y);return n}(wt(t,s??0),e,i,n)}function wt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function Pt(t,...e){for(const i of e){if(A(i))continue;if(!B(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):B(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return B(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if(ft(t))continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if(ft(s))continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>Pt(void 0,t)):Pt(e[s],n)}}return t}function bt(t,e){return F(t)?t.map((t,i)=>e(t,i)):e(t,0)}function xt(t,e,i){return F(t)?yt(t,e,i):t}function Mt(t,e){return function(t,e){if(t.mode!==pt.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/c*e.width,y:t.y/c*e.height}:{width:t.width/c*e.width,height:t.height/c*e.height}}(t,e)}let zt,kt;function Ct(t,e,i,s,n){if(s){let s={passive:!0};L(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function St(t,e){const i=await Promise.all([...e.entries()].map(([e,i])=>i(t).then(t=>[e,t])));return new Map(i)}async function It(t){const e=xt(t.url,t.index);if(!e)return t.fallback;try{const t=await fetch(e);if(t.ok){const e=await t.json();if(function(t){if(F(t))return t.every(t=>B(t)&&!F(t));return B(t)&&!F(t)}(e))return e;n().error("invalid configuration data while retrieving config file")}else n().error(`${t.status.toString()} while retrieving config file`)}catch(t){n().error(`error while retrieving config file: ${t}`)}return t.fallback}!function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(ut||(ut={})),function(t){t.precise="precise",t.percent="percent"}(pt||(pt={}));class Ot{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);const i=this.#e.get(t);this.#e.set(t,i?[...i,e]:[e])}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):this.#e.set(t,[...i.slice(0,n),...i.slice(n+1)]))}}var _t,Lt,Dt,Et,Rt,Tt,Bt,Ft,At,Ut,$t,Vt,Nt,Wt;!function(t){t.configAdded="configAdded",t.containerInit="containerInit",t.particlesSetup="particlesSetup",t.containerStarted="containerStarted",t.containerStopped="containerStopped",t.containerDestroyed="containerDestroyed",t.containerPaused="containerPaused",t.containerPlay="containerPlay",t.containerBuilt="containerBuilt",t.particleAdded="particleAdded",t.particleDestroyed="particleDestroyed",t.particleRemoved="particleRemoved"}(_t||(_t={}));class jt{colorManagers=new Map;easingFunctions=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#r=!1;#o=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}get initialized(){return this.#r}addColorManager(t,e){this.#r||this.colorManagers.set(t,e)}addConfig(t){if(this.#r)return;const e=t.key??t.name??"default";this.#s.set(e,t),this.#n.dispatchEvent(_t.configAdded,{data:{name:e,config:t}})}addEasing(t,e){this.#r||this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.#r||this.initializers.effects.set(t,e)}addPalette(t,e){this.#r||this.palettes.set(t,e)}addParticleUpdater(t,e){this.#r||this.initializers.updaters.set(t,e)}addPlugin(t){this.#r||this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){this.#r||!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){if(!this.#r)for(const i of t)this.initializers.shapes.set(i,e)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async init(){if(!this.#r&&!this.#o){this.#o=!0,this.#a=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#a,this.#i)}finally{this.#l.clear(),this.#o=!1,this.#r=!0}}}async register(...t){if(this.#r)throw new Error(dt(at));for(const e of t)this.#o?await this.#c(e,this.#a,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}class qt{pluginManager=new jt(this);#h=[];#d=new Ot;#r=!1;#u=0;#p=new Map;get items(){return this.#h}get version(){return"4.5.2"}addEventListener(t,e){this.#d.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(dt(st,this.version))}dispatchEvent(t,e){this.#d.dispatchEvent(t,e)}async init(){this.#r||(await this.pluginManager.init(),this.#r=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let e;"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(e=t.element);const i=t.id??e?.id??`tsparticles${Math.floor(1e4*W()).toString()}`,s=++this.#u;this.#p.set(i,s);try{await this.init();const{Container:n}=await Promise.resolve().then(function(){return ks}),{index:a,url:l}=t,c=l?await It({fallback:t.options,url:l,index:a}):t.options;if(this.#p.get(i)!==s)return;const h=xt(c,a),{items:d}=this,u=d.findIndex(t=>t.id.description===i),p=new n({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:i,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(p);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:h});if(u>=0){const t=this.item(u),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),d.splice(u,e,p)}else d.push(p);const f="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:function(t){let e;const i=gt();if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===b)e=t,e.dataset[r]??=P,e.dataset[r]===w&&(e.style.width||=o,e.style.height||=o,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none"));else{const s=t.getElementsByTagName(b).item(0);s?(e=s,e.dataset[r]=P):(e=i.createElement(b),e.dataset[r]=w,t.appendChild(e)),e.style.width||=o,e.style.height||=o,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none")}return e}(function(t,e){const i=gt();let s=e??i.getElementById(t);return s||(s=i.createElement("canvas"),s.id=t,s.dataset[r]=w,i.body.append(s),s)}(i,e));if(p.canvas.loadCanvas(f),await p.start(),p.destroyed)return;return p}finally{this.#p.get(i)===s&&this.#p.delete(i)}}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}!function(t){t.circle="circle",t.rectangle="rectangle"}(Lt||(Lt={}));class Ht{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 Gt extends Ht{radius;constructor(t,e,i){super(t,e,Lt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,Z(e,i)<=s*s;var e,i,s}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Gt||t.type===Lt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Xt||t.type===Lt.rectangle){const e=t,{width:i,height:r}=e.size;return Math.pow(n-i,2)+Math.pow(a-r,2)<=s**2||n<=s+i&&a<=s+r||n<=i||a<=r}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Xt extends Ht{size;constructor(t,e,i,s){super(t,e,Lt.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof Gt)return t.intersects(this);if(!(t instanceof Xt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,r=a.width,o=a.height;return n.x<s.x+e&&n.x+r>s.x&&n.y<s.y+i&&n.y+o>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}function Yt(t,e,i){void 0!==i&&(t[e]=i)}function Qt(t,e,i){void 0!==i&&(t[e]=Q(i))}function Kt(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function Zt(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(Dt||(Dt={})),function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(Et||(Et={})),function(t){t.standard="standard",t.natural="natural",t.vivid="vivid",t.cinematic="cinematic",t.dynamic="dynamic"}(Rt||(Rt={})),function(t){t.delete="delete",t.wait="wait"}(Tt||(Tt={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(Bt||(Bt={})),function(t){t.darken="darken",t.enlighten="enlighten"}(Ft||(Ft={})),function(t){t.none="none",t.max="max",t.min="min"}(At||(At={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(Ut||(Ut={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}($t||($t={})),function(t){t.max="max",t.min="min",t.random="random"}(Vt||(Vt={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(Nt||(Nt={})),function(t){t[t.BackgroundElement=0]="BackgroundElement",t[t.BackgroundDraw=1]="BackgroundDraw",t[t.BackgroundMask=2]="BackgroundMask",t[t.CanvasSetup=3]="CanvasSetup",t[t.PluginContent=4]="PluginContent",t[t.Particles=5]="Particles",t[t.CanvasCleanup=6]="CanvasCleanup",t[t.Foreground=7]="Foreground"}(Wt||(Wt={}));class Jt{load(t){A(t)||this.doLoad(t)}}function te(t,...e){for(const i of e)t.load(i)}class ee extends Jt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Qt(this,"count",t.count),Yt(this,"enable",t.enable),Qt(this,"speed",t.speed),Qt(this,"decay",t.decay),Qt(this,"delay",t.delay),Yt(this,"sync",t.sync)}}class ie extends ee{mode=Et.auto;startValue=Vt.random;doLoad(t){super.doLoad(t),Yt(this,"mode",t.mode),Yt(this,"startValue",t.startValue)}}class se extends ee{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Yt(this,"max",t.max),Yt(this,"min",t.min),Qt(this,"offset",t.offset)}}class ne extends Jt{h=new se(0,M);l=new se(0,k);s=new se(0,z);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class ae extends Jt{value="";static create(t,e){const i=new ae;return i.load(t),void 0!==e&&(D(e)||F(e)?i.load({value:e}):i.load(e)),i}doLoad(t){A(t.value)||(this.value=t.value)}}class re extends ae{animation=new ne;static create(t,e){const i=new re;return i.load(t),void 0!==e&&(D(e)||F(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 oe extends Jt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new ae,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=ae.create(this.color,t.color)),Yt(this,"element",t.element),Yt(this,"draw",t.draw),Yt(this,"image",t.image),Yt(this,"position",t.position),Yt(this,"repeat",t.repeat),Yt(this,"size",t.size),Yt(this,"opacity",t.opacity)}}class le extends Jt{enable=!0;zIndex=0;doLoad(t){Yt(this,"enable",t.enable),Yt(this,"zIndex",t.zIndex)}}class ce extends Jt{enable=!0;mode=Rt.standard;peakNits=400;doLoad(t){if(void 0!==t.enable&&!L(t.enable))throw new Error(dt(lt,String(t.enable)));if(void 0!==t.mode&&!R(Rt,t.mode))throw new Error(dt(ct,Object.values(Rt).join(", "),(e=t.mode,String(e))));var e;if(void 0!==t.peakNits&&(!E(t.peakNits)||!Number.isFinite(t.peakNits)||t.peakNits<=0))throw new Error(dt(ht,String(t.peakNits)));Yt(this,"enable",t.enable),Yt(this,"mode",t.mode),Yt(this,"peakNits",t.peakNits)}}class he extends Jt{delay=.5;enable=!0;doLoad(t){Yt(this,"delay",t.delay),Yt(this,"enable",t.enable)}}class de extends Jt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Pt(this.options[t]??{},i))}Yt(this,"close",t.close),Yt(this,"type",t.type)}}class ue extends Jt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=re.create(this.color,t.color)),Yt(this,"enable",t.enable),Qt(this,"opacity",t.opacity)}}class pe extends Jt{offset=0;value=90;doLoad(t){Qt(this,"offset",t.offset),Qt(this,"value",t.value)}}class fe extends Jt{mode=pt.percent;radius=0;x=50;y=50;doLoad(t){Yt(this,"x",t.x),Yt(this,"y",t.y),Yt(this,"mode",t.mode),Yt(this,"radius",t.radius)}}class ge extends Jt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Qt(this,"acceleration",t.acceleration),Yt(this,"enable",t.enable),Yt(this,"inverse",t.inverse),Qt(this,"maxSpeed",t.maxSpeed)}}class me extends Jt{value=0;doLoad(t){A(t.value)||(this.value=Q(t.value))}}class ye extends me{animation=new ee;doLoad(t){var e,i,s;super.doLoad(t),e=this,i="animation",void 0!==(s=t.animation)&&e[i].load(s)}}class ve extends ye{animation=new ie}class we extends Jt{clamp=!0;delay=new me;enable=!1;generator;options={};doLoad(t){Yt(this,"clamp",t.clamp),this.delay.load(t.delay),Yt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=Pt(this.options,t.options))}}class Pe extends Jt{bottom;default=Bt.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 be extends Jt{acceleration=0;enable=!1;position;doLoad(t){Qt(this,"acceleration",t.acceleration),Yt(this,"enable",t.enable),t.position&&(this.position=Pt({},t.position))}}class xe extends Jt{angle=new pe;center=new fe;decay=0;direction=a.none;distance={};drift=0;enable=!1;gravity=new ge;outModes=new Pe;path=new we;random=!1;size=!1;speed=2;spin=new be;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(E(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Qt(this,"decay",t.decay),Yt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=E(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Qt(this,"drift",t.drift),Yt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(B(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Yt(this,"random",t.random),Yt(this,"size",t.size),Qt(this,"speed",t.speed),this.spin.load(t.spin),Yt(this,"straight",t.straight),Yt(this,"vibrate",t.vibrate),Yt(this,"warp",t.warp)}}class Me extends Jt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=re.create(this.color,t.color)),Qt(this,"width",t.width),Qt(this,"opacity",t.opacity)}}class ze extends Jt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=re.create(this.color,t.color)),Kt(this,"fill",t.fill,()=>new ue),Kt(this,"stroke",t.stroke,()=>new Me)}}class ke extends me{value=1}class Ce extends Jt{horizontal=new ke;vertical=new ke;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Se extends Jt{enable=!1;height=1080;width=1920;doLoad(t){Yt(this,"enable",t.enable),Yt(this,"width",t.width),Yt(this,"height",t.height)}}class Ie extends Jt{mode=Tt.delete;value=0;doLoad(t){Yt(this,"mode",t.mode),Yt(this,"value",t.value)}}class Oe extends Jt{density=new Se;limit=new Ie;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Yt(this,"value",t.value)}}class _e extends Jt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Pt(this.options[t]??{},i))}Yt(this,"close",t.close),Yt(this,"type",t.type)}}class Le extends me{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Yt(this,"opacityRate",t.opacityRate),Yt(this,"sizeRate",t.sizeRate),Yt(this,"velocityRate",t.velocityRate)}}class De extends Jt{bounce=new Ce;effect=new de;groups={};move=new xe;number=new Oe;paint;palette;reduceDuplicates=!1;shape=new _e;zIndex=new Le;#f;#g;constructor(t,e){super(),this.#g=t,this.#f=e,this.paint=new ze,this.paint.color=new re,this.paint.color.value="#fff",this.paint.fill=new ue,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#m(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=Pt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(F(e)?this.paint=bt(e,t=>{const e=new ze;return e.load(t),e}):F(this.paint)?(this.paint=new ze,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#f){for(const e of this.#g.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#f,this,t);const e=this.#f.particleUpdaters;for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#m(t){const e=this.#g.getPalette(t);if(!e)return;const i=e.colors,s=(F(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function Ee(t,e,...i){const s=new De(t,e);return te(s,...i),s}class Re extends Jt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#f;#g;constructor(t,e){super(),this.#g=t,this.#f=e,this.background=new oe,this.fullScreen=new le,this.hdr=new ce,this.particles=Ee(this.#g,this.#f),this.resize=new he}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,bt(this.preset,t=>{this.#y(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#m(this.palette)),Yt(this,"autoPlay",t.autoPlay),Yt(this,"clear",t.clear),Yt(this,"key",t.key),Yt(this,"name",t.name),Qt(this,"delay",t.delay),Yt(this,"detectRetina",t.detectRetina),Qt(this,"duration",t.duration),Yt(this,"fpsLimit",t.fpsLimit);const e=t.hdr;L(e)?(this.hdr.enable=e,this.hdr.mode=Rt.standard,this.hdr.peakNits=400):this.hdr.load(e),Yt(this,"pauseOnBlur",t.pauseOnBlur),Yt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Yt(this,"zLayers",t.zLayers),this.background.load(t.background);const i=t.fullScreen;L(i)?this.fullScreen.enable=i:this.fullScreen.load(i),this.particles.load(t.particles),this.resize.load(t.resize),this.style=Pt(this.style,t.style),Yt(this,"smooth",t.smooth),this.#g.plugins.forEach(e=>{e.loadOptions(this.#f,this,t)})}#m(t){const e=this.#g.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#y(t){this.load(this.#g.getPreset(t))}}const Te=new Map,Be=1.15,Fe=1.05,Ae=.2126,Ue=.7152,$e=.0722;function Ve(t,e){let i=Te.get(t);return i||(i=e(),Te.size>2e3&&Te.clear(),Te.set(t,i)),i}function Ne(t){return q(t*(2.51*t+.03)/(t*(2.43*t+.59)+.14),0,1)}function We(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return je(t,n.value,i,s);if(F(n.value)){const e=yt(n.value,i,s);if(!e)return;return We(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function je(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return n.value===y?function(){const t=0,e=256,i=()=>Math.floor(j(t,e));return{b:i(),g:i(),r:i()}}():function(t,e){return function(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}(t,e)}(t,n.value);if(F(n.value)){const e=yt(n.value,i,s);if(!e)return;return je(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function qe(t,e,i,s=!0){const n=We(t,e,i,s);return n?function(t){const e=t.r/x,i=t.g/x,s=t.b/x,n=Math.max(e,i,s),a=Math.min(e,i,s),r={h:0,l:(n+a)*h,s:0};n!==a&&(r.s=r.l<h?(n-a)/(n+a):(n-a)/(2-n-a),r.h=e===n?(i-s)/(n-a):i===n?2+(s-e)/(n-a):4+(e-i)/(n-a));r.l*=k,r.s*=z,r.h*=60,r.h<0&&(r.h+=M);r.h>=M&&(r.h-=M);return r}(n):void 0}function He(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 Ge(t){const e=(t.h%M+M)%M,i=Math.max(0,Math.min(z,t.s)),s=Math.max(0,Math.min(k,t.l)),n=e/M,a=i/z,r=s/k;if(0===i){const t=Math.round(r*x);return{r:t,g:t,b:t}}const o=r<h?r*(1+a):r+a-r*a,l=2*r-o,c=1/3,d=Math.min(x,x*He(l,o,n+c)),u=Math.min(x,x*He(l,o,n)),p=Math.min(x,x*He(l,o,n-c));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function Xe(t,e,i,s,n){const a=e?4:2,r=i??1;return Ve(e?`rgb-${t.r.toFixed(a)}-${t.g.toFixed(a)}-${t.b.toFixed(a)}-hdr-${r.toString()}-${(s??400).toString()}-${n??Rt.standard}`:`rgb-${t.r.toFixed(a)}-${t.g.toFixed(a)}-${t.b.toFixed(a)}-sdr-${r.toString()}`,()=>e?function(t,e,i=400,s=Rt.standard){const n=i/203,a=function(t,e,i,s){const n=t.r/x,a=t.g/x,r=t.b/x;if(s!==Rt.natural&&s!==Rt.vivid&&s!==Rt.cinematic&&s!==Rt.dynamic)return{b:r,g:a,r:n};const o=Math.max(1,e),l=Ae*n+Ue*a+$e*r,c=function(t,e,i){if(t<=i)return Ne(t);const s=t+(t-i)*(e-1);return Ne(s)}(l,e,i),h=l>0?c/l:1;return function(t,e,i,s,n){switch(s){case Rt.vivid:{const s=(t+e+i)/3;return{b:q(q(s+(i-s)*Be,0,n)*Fe,0,n),g:q(q(s+(e-s)*Be,0,n)*Fe,0,n),r:q(q(s+(t-s)*Be,0,n)*Fe,0,n)}}case Rt.cinematic:{const s=1.05*t,a=.95*i,r=(s+e+a)/3;return{b:q(r+1.1*(a-r),0,n),g:q(r+1.1*(e-r),0,n),r:q(r+1.1*(s-r),0,n)}}case Rt.dynamic:{const s=Ae*t+Ue*e+$e*i,a=Math.min(1,2*s),r=1-a,o=(t+e+i)/3,l=q(o+(t-o)*Be,0,n)*Fe,c=q(o+(e-o)*Be,0,n)*Fe,h=q(o+(i-o)*Be,0,n)*Fe;return{b:q(i*r+h*a,0,n),g:q(e*r+c*a,0,n),r:q(t*r+l*a,0,n)}}case Rt.standard:case Rt.natural:default:return{b:i,g:e,r:t}}}(q(n*h,0,o),q(a*h,0,o),q(r*h,0,o),s,o)}(t,n,.18,s);return`color(display-p3 ${a.r.toString()} ${a.g.toString()} ${a.b.toString()} / ${(e??1).toString()})`}(t,i,s,n):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Ye(t,e,i,s,n){const a=e?4:2,r=i??1;return Ve(e?`hsl-${t.h.toFixed(a)}-${t.s.toFixed(a)}-${t.l.toFixed(a)}-hdr-${r.toString()}-${(s??S).toString()}-${n??Rt.standard}`:`hsl-${t.h.toFixed(a)}-${t.s.toFixed(a)}-${t.l.toFixed(a)}-sdr-${r.toString()}`,()=>e?Xe(function(t){const e=(t.h%M+M)%M,i=Math.max(0,Math.min(z,t.s)),s=Math.max(0,Math.min(k,t.l)),n=e/M,a=i/z,r=s/k;if(0===i){const t=r*x;return{r:t,g:t,b:t}}const o=r<h?r*(1+a):r+a-r*a,l=2*r-o,c=1/3;return{r:Math.min(x,x*He(l,o,n+c)),g:Math.min(x,x*He(l,o,n)),b:Math.min(x,x*He(l,o,n-c))}}(t),!0,i,s,n):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${r.toString()})`)}function Qe(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Ke(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:M},s:{enable:!1,value:t.s,min:0,max:z},l:{enable:!1,value:t.l,min:0,max:k}};return e&&(Ze(s.h,e.h,i),Ze(s.s,e.s,i),Ze(s.l,e.l,i)),s}function Ze(t,e,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=G(e.speed)/c*i,t.decay=1-G(e.decay),t.status=Nt.increasing,t.loops=0,t.maxLoops=G(e.count),t.time=0,t.delayTime=G(e.delay)*d,e.sync||(t.velocity*=W(),t.value*=W()),t.initialValue=t.value,t.offset=Q(e.offset)):t.velocity=0}function Je(t,e,i,s){if(!t.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0))return;if(t.time??=0,(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=i.value),(t.delayTime??0)>0&&t.time<(t.delayTime??0))return;const n=t.offset?H(t.offset):0,a=(t.velocity??0)*i.factor+3.6*n,r=t.decay??1,o=t.max,l=t.min;e&&t.status!==Nt.increasing?(t.value-=a,t.value<l&&(t.loops??=0,t.loops++,t.status=Nt.increasing)):(t.value+=a,t.value>o&&(t.loops??=0,t.loops++,e?t.status=Nt.decreasing:t.value-=o)),t.velocity&&1!==r&&(t.velocity*=r),t.value=q(t.value,l,o)}function ti(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;Je(s,!1,e),Je(n,!0,e),Je(a,!0,e)}const ei=function(){const t=globalThis.tsParticles;return t?.pluginManager?t:new qt}();class ii{enable=!1;mode="destination-out";load(t){A(t)||(Yt(this,"mode",t.mode),Yt(this,"enable",t.enable))}}function si(t){if(!t||"object"!=typeof t||!("blend"in t))return!1;const e=t.blend;return!!e&&"object"==typeof e&&"enable"in e&&!!e.enable}class ni{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Cs});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new ii),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new ii,e.blend.load(i?.blend)}needsPlugin(t){if(t?.blend?.enable||t?.particles?.blend?.enable||Object.values(t?.particles?.groups??{}).some(si))return!0;const e=t?.emitters;let i=[];return Array.isArray(e)?i=e:e&&(i=[e]),i.some(t=>{if(!t||"object"!=typeof t||!("particles"in t))return!1;const e=t.particles;return Array.isArray(e)?e.some(si):si(e)})}}async function ai(t){t.checkVersion("4.5.2"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new ni)})}class ri{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:v};const n=i.circleRange;e.arc(u.x,u.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=B(s)?{min:tt(s.min),max:tt(s.max)}:{min:0,max:tt(s)}}}async function oi(t){t.checkVersion("4.5.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new ri))})}var li;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(li||(li={}));const ci=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,hi=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class di{accepts(t){return t.startsWith("#")}handleColor(t){return this.#v(t.value)}handleRangeColor(t){return this.#v(t.value)}parseString(t){return this.#v(t)}#v(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(ci,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=hi.exec(e);return i?{a:i[li.a]?Number.parseInt(i[li.a],16)/255:1,b:Number.parseInt(i[li.b]??"0",16),g:Number.parseInt(i[li.g]??"0",16),r:Number.parseInt(i[li.r]??"0",16)}:void 0}}async function ui(t){t.checkVersion("4.5.2"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new di)})}var pi;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(pi||(pi={}));const fi=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class gi{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 Ge(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Ge({h:G(e.h),l:G(e.l),s:G(e.s)})}parseString(t){if(!this.accepts(t))return;const e=fi.exec(t);return e?function(t){const e=Ge(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?it(e[pi.a]):1,h:Number.parseInt(e[pi.h]??"0",10),l:Number.parseInt(e[pi.l]??"0",10),s:Number.parseInt(e[pi.s]??"0",10)}):void 0}}async function mi(t){t.checkVersion("4.5.2"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new gi)})}class yi{id="move";#g;constructor(t){this.#g=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Is});return new e(this.#g,t)}loadOptions(){}needsPlugin(){return!0}}async function vi(t){t.checkVersion("4.5.2"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initialized||(e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i))},t.pluginManager.addPlugin(new yi(t.pluginManager))})}function wi(t,e){const i=t.value,s=t.animation,n={delayTime:G(s.delay)*d,enable:s.enable,value:G(t.value)*e,max:Y(i)*e,min:X(i)*e,loops:0,maxLoops:G(s.count),time:0};if(s.enable){switch(n.decay=1-G(s.decay),s.mode){case Et.increase:n.status=Nt.increasing;break;case Et.decrease:n.status=Nt.decreasing;break;case Et.random:n.status=W()>=h?Nt.increasing:Nt.decreasing}const t=s.mode===Et.auto;switch(s.startValue){case Vt.min:n.value=n.min,t&&(n.status=Nt.increasing);break;case Vt.max:n.value=n.max,t&&(n.status=Nt.decreasing);break;case Vt.random:default:n.value=H(n),t&&(n.status=W()>=h?Nt.increasing:Nt.decreasing)}}return n.initialValue=n.value,n}function Pi(t,e,i,s,n){if(t.destroyed||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const a=(e.velocity??0)*n.factor,r=e.min,o=e.max,l=e.decay??1;e.time??=0;const c=e.delayTime??0;if(!(c>0&&e.time<c&&(e.time+=n.value,e.time<c))){switch(e.status){case Nt.increasing:e.value+=a;break;case Nt.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case Nt.increasing:e.value>=o&&(e.status=Nt.decreasing,e.loops??=0,e.loops++);break;case Nt.decreasing:e.value<=r&&(e.status=Nt.increasing,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case At.max:i>=n&&t.destroy();break;case At.min:i<=s&&t.destroy()}}(t,s,e.value,r,o),t.destroyed||(e.value=q(e.value,r,o))}}class bi extends ie{destroy=At.none;load(t){super.load(t),A(t)||Yt(this,"destroy",t.destroy)}}class xi extends ve{animation=new bi;value=1;load(t){if(A(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Mi{#f;constructor(t){this.#f=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=wi(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=G(i.speed)/c*this.#f.retina.reduceFactor,i.sync||(t.opacity.velocity*=W()))}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){Zt(t,"opacity",xi,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&Pi(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function zi(t){t.checkVersion("4.5.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Mi(t)))})}const ki={[ut.left]:{axis:"x",canvas:"width",bounce:"horizontal",negativeEdge:"right",positiveEdge:"left",negative:!0},[ut.right]:{axis:"x",canvas:"width",bounce:"horizontal",negativeEdge:"right",positiveEdge:"left",negative:!1},[ut.top]:{axis:"y",canvas:"height",bounce:"vertical",negativeEdge:"bottom",positiveEdge:"top",negative:!0},[ut.bottom]:{axis:"y",canvas:"height",bounce:"vertical",negativeEdge:"bottom",positiveEdge:"top",negative:!1}};class Ci{modes;#f;#w;constructor(t){this.#f=t,this.modes=[Bt.bounce,Bt.split],this.#w=t.plugins.filter(t=>!!t.particleBounce)}update(t,e,i,s){if(!this.modes.includes(s))return;for(const s of this.#w)if(s.particleBounce?.(t,i,e))return;const n=t.getPosition(),a=t.offset,r=t.getRadius(),o=wt(n,r),l=this.#f.canvas.size,c=!t.isInsideCanvasForOutMode(s,e);!function(t){if(t.outMode!==Bt.bounce&&t.outMode!==Bt.split||!(t.direction in ki))return;const e=ki[t.direction],i=t.bounds,s=t.canvasSize[e.canvas],n=t.particle.position,a=t.particle.velocity[e.axis];if(e.negative&&i[e.negativeEdge]<0?n[e.axis]=t.size+t.offset[e.axis]:!e.negative&&i[e.positiveEdge]>s&&(n[e.axis]=s-t.size-t.offset[e.axis]),!t.outOfCanvas||!(e.negative&&a<0||!e.negative&&a>0))return;t.particle.velocity[e.axis]*=-G(t.particle.options.bounce[e.bounce].value);const r=t.offset[e.axis]+t.size;n[e.axis]=e.negative?r:s-r,t.outMode===Bt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:o,canvasSize:l,offset:a,outOfCanvas:c,size:r})}}class Si{modes;constructor(t){this.modes=[Bt.destroy]}update(t,e,i,s){if(this.modes.includes(s)){switch(t.outType){case $t.normal:case $t.outside:if(t.isInsideCanvasForOutMode(s,e))return;break;case $t.inside:{const{dx:e,dy:i}=K(t.position,t.moveCenter),{x:s,y:n}=t.velocity;if(s<0&&e>t.moveCenter.radius||n<0&&i>t.moveCenter.radius||s>=0&&e<-t.moveCenter.radius||n>=0&&i<-t.moveCenter.radius)return;break}}t.destroy(!0)}}}class Ii{modes;#f;constructor(t){this.#f=t,this.modes=[Bt.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===ut.left||e===ut.right))??(t.options.move.distance.vertical&&(e===ut.top||e===ut.bottom)))return;const n=t.options.move.gravity,a=this.#f,r=a.canvas.size,o=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>r.height+o&&e===ut.bottom||n.inverse&&i.y<-o&&e===ut.top)&&t.destroy()}else{if(t.velocity.y>0&&t.position.y<=r.height+o||t.velocity.y<0&&t.position.y>=-o||t.velocity.x>0&&t.position.x<=r.width+o||t.velocity.x<0&&t.position.x>=-o)return;vt(t.position,a.canvas.size,u,o,e)||t.destroy()}}}const Oi=_.origin;class _i{modes;#f;constructor(t){this.#f=t,this.modes=[Bt.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#f;if(t.outType===$t.inside)this.#P(t,n);else{if(t.isInsideCanvasForOutMode(s,e))return;t.outType===$t.outside?this.#b(t):this.#x(t,n,e)}}#P(t,e){const{x:i,y:s}=t.velocity;Oi.setTo(u),Oi.length=t.moveCenter.radius,Oi.angle=t.velocity.angle+Math.PI,Oi.addTo(t.moveCenter);const{dx:n,dy:a}=K(t.position,Oi);if(i<=0&&n>=0||s<=0&&a>=0||i>=0&&n<=0||s>=0&&a<=0)return;t.position.x=Math.floor(H({min:0,max:e.canvas.size.width})),t.position.y=Math.floor(H({min:0,max:e.canvas.size.height}));const{dx:r,dy:o}=K(t.position,t.moveCenter);t.direction=Math.atan2(-o,-r),t.velocity.angle=t.direction,t.justWarped=!0}#x(t,e,i){const s=t.options.move.warp,n=e.canvas.size,a=t.getRadius(),r={bottom:n.height+a+t.offset.y,left:-a-t.offset.x,right:n.width+a+t.offset.x,top:-a-t.offset.y},o=wt(t.position,a);i===ut.right&&o.left>n.width+t.offset.x?(t.position.x=r.left,t.initialPosition.x=t.position.x,s||(t.position.y=W()*n.height,t.initialPosition.y=t.position.y),t.justWarped=!0):i===ut.left&&o.right<-t.offset.x&&(t.position.x=r.right,t.initialPosition.x=t.position.x,s||(t.position.y=W()*n.height,t.initialPosition.y=t.position.y),t.justWarped=!0),i===ut.bottom&&o.top>n.height+t.offset.y?(s||(t.position.x=W()*n.width,t.initialPosition.x=t.position.x),t.position.y=r.top,t.initialPosition.y=t.position.y,t.justWarped=!0):i===ut.top&&o.bottom<-t.offset.y&&(s||(t.position.x=W()*n.width,t.initialPosition.x=t.position.x),t.position.y=r.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0)}#b(t){t.position.x=Math.floor(H({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(H({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=K(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0}}class Li{updaters;#f;constructor(t){this.#f=t,this.updaters=new Map}init(t){this.#M(t,Bt.bounce,t=>new Ci(t)),this.#M(t,Bt.out,t=>new _i(t)),this.#M(t,Bt.destroy,t=>new Si(t)),this.#M(t,Bt.none,t=>new Ii(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;t.justWarped=!1,this.#z(t,e,i.bottom??i.default,ut.bottom),this.#z(t,e,i.left??i.default,ut.left),this.#z(t,e,i.right??i.default,ut.right),this.#z(t,e,i.top??i.default,ut.top)}#M(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#f))}#z(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function Di(t){t.checkVersion("4.5.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Li(t)))})}class Ei{#f;#g;constructor(t,e){this.#f=e,this.#g=t}init(t){const e=this.#f,i=t.options,s=xt(i.paint,t.id,i.reduceDuplicates);this.#k(s,t,e),this.#C(s,t,e)}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),r=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||r)}update(t,e){this.isEnabled(t)&&(ti(t.fillColor,e,this.#f.hdr),ti(t.strokeColor,e,this.#f.hdr))}#k(t,e,i){const s=t?.fill,n=t?.color,a=n??void 0;if(!s)return e.fillEnabled=!1,e.fillAnimation=void 0,e.fillColor=void 0,void(e.fillOpacity=1);const r=re.create(void 0===a?void 0:re.create(void 0,a),s.color);e.fillEnabled=s.enable,e.fillOpacity=G(s.opacity),e.fillAnimation=r.animation;const o=qe(this.#g,r);o&&(e.fillColor=Ke(o,e.fillAnimation,i.retina.reduceFactor))}#C(t,e,i){const s=t?.stroke,n=t?.color,a=n??void 0;if(!s)return e.strokeAnimation=void 0,e.strokeColor=void 0,e.strokeOpacity=1,void(e.strokeWidth=0);const r=re.create(void 0===a?void 0:re.create(void 0,a),s.color);e.strokeWidth=G(s.width)*i.retina.pixelRatio,e.strokeOpacity=G(s.opacity??1),e.strokeAnimation=r.animation;const o=qe(this.#g,r)??e.getFillColor();o&&(e.strokeColor=Ke(o,e.strokeAnimation,i.retina.reduceFactor))}}async function Ri(t){t.checkVersion("4.5.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Ei(t.pluginManager,e)))})}var Ti;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Ti||(Ti={}));const Bi=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Fi{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:G(e.r),g:G(e.g),b:G(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Bi.exec(t);return e?{a:e.length>4?it(e[Ti.a]):1,b:parseInt(e[Ti.b]??"0",10),g:parseInt(e[Ti.g]??"0",10),r:parseInt(e[Ti.r]??"0",10)}:void 0}}async function Ai(t){t.checkVersion("4.5.2"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Fi)})}class Ui extends ie{destroy=At.none;load(t){super.load(t),A(t)||Yt(this,"destroy",t.destroy)}}class $i extends ve{animation=new Ui;value=3;load(t){if(super.load(t),A(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Vi{#f;constructor(t){this.#f=t}init(t){const e=this.#f,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/c*e.retina.reduceFactor,s.sync||(t.size.velocity*=W()))}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){Zt(t,"size",$i,...e)}preInit(t){const e=this.#f.retina.pixelRatio,i=t.options.size;i&&(t.size=wi(i,e),t.retina.sizeAnimationSpeed=G(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&Pi(t,t.size,0,t.options.size.animation.destroy,e)}}async function Ni(t){t.checkVersion("4.5.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Vi(t)))})}async function Wi(t){t.checkVersion("4.5.2"),await t.pluginManager.register(async t=>{await Promise.all([ai(t),ui(t),mi(t),Ai(t),vi(t),oi(t),Ri(t),zi(t),Di(t),Ni(t)])})}const ji=["ア","イ","ウ","エ","オ","カ","キ","ク","ケ","コ","サ","シ","ス","セ","ソ","タ","チ","ツ","テ","ト","ナ","ニ","ヌ","ネ","ノ","ハ","ヒ","フ","ヘ","ホ","マ","ミ","ム","メ","モ","ヤ","ユ","ヨ","ラ","リ","ル","レ","ロ","ワ","ヲ","ン","ガ","ギ","グ","ゲ","ゴ","ザ","ジ","ズ","ゼ","ゾ","ダ","ヂ","ヅ","デ","ド","バ","ビ","ブ","ベ","ボ","パ","ピ","プ","ペ","ポ","ァ","ィ","ゥ","ェ","ォ","ャ","ュ","ョ","ッ","ー","ヴ","0","1","2","3","4","5","6","7","8","9","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","日","本","人","大","中","小","上","下","左","右","力","時","空","生","死","無","有","!","@","#","$","%","&","*","+","-","=","?","/","\\","|","<",">","{","}","[","]","(",")"],qi=new WeakMap;function Hi(){return ji[Math.floor(W()*ji.length)]??" "}function Gi(t,e){return t+W()*(e-t)}function Xi(t){const{context:e,radius:i,particle:s,delta:n,fill:a,stroke:r}=t,o=s.shapeData,l=X(o?.interval??100),c=Y(o?.interval??2e3),h=function(t,e,i){let s=qi.get(t);return s||(s={char:Hi(),elapsed:0,interval:Gi(e,i)},qi.set(t,s)),s}(s,l,c);h.elapsed+=n.value,h.elapsed>=h.interval&&(h.char=Hi(),h.elapsed-=h.interval,h.interval=Gi(l,c));const d=Math.round(2*i);e.font=`bold ${d}px "Courier New", Courier, monospace`,e.textAlign="center",e.textBaseline="middle",a&&e.fillText(h.char,u.x,u.y),r&&e.strokeText(h.char,u.x,u.y)}class Yi{draw(t){Xi(t)}}async function Qi(t){t.checkVersion("4.5.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["matrix"],()=>Promise.resolve(new Yi))})}class Ki{dimensions=2;enable=!1;radius=0;retries=30;steps=0;load(t){A(t)||(Yt(this,"enable",t.enable),Yt(this,"dimensions",t.dimensions),Yt(this,"radius",t.radius),Yt(this,"retries",t.retries))}}class Zi{id="poisson";async getPlugin(t){const{PoissonDiscPluginInstance:e}=await Promise.resolve().then(function(){return Os});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.poisson;void 0===s?.load&&(e.poisson=s=new Ki),s.load(i?.poisson)}needsPlugin(t){return t?.poisson?.enable??!1}}async function Ji(t){t.checkVersion("4.5.2"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Zi)})}const ts=globalThis;ts.__tsParticlesInternals=ts.__tsParticlesInternals??{},ts.loadPoissonDiscPlugin=Ji;class es{#f;#g;constructor(t,e){this.#g=t,this.#f=e}drawAfter(t){const{context:e}=t;e.restore()}drawBefore(t){const{particle:e,context:i}=t,s=this.#f,n=e,a=n.shadowColor,r=n.shadowOffset;a&&(i.save(),i.shadowBlur=n.shadowBlur??0,i.shadowColor=Xe(a,s.hdr,void 0,s.peakNits,s.hdrMode),i.shadowOffsetX=r?.x??0,i.shadowOffsetY=r?.y??0)}particleInit(t,e){const i=e.effectData,s=ae.create(new ae,i?.color);e.shadowColor=We(this.#g,s),e.shadowBlur=i?.blur??0,e.shadowOffset=i?.offset??u}}async function is(t){t.checkVersion("4.5.2"),await t.pluginManager.register(t=>{t.pluginManager.addEffect("shadow",e=>Promise.resolve(new es(t.pluginManager,e)))})}class ss{color;image;load(t){A(t)||(void 0!==t.color&&(this.color=ae.create(this.color,t.color)),Yt(this,"image",t.image))}}class ns{enable=!1;fill=new ss;length=10;load(t){A(t)||(Yt(this,"enable",t.enable),void 0!==t.fill&&this.fill.load(t.fill),Yt(this,"length",t.length))}}class as{id="trail";#g;constructor(t){this.#g=t}async getPlugin(t){const{TrailPluginInstance:e}=await Promise.resolve().then(function(){return _s});return new e(this.#g,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.trail;s?.load||(e.trail=s=new ns),s.load(i?.trail)}needsPlugin(){return!0}}async function rs(t){t.checkVersion("4.5.2"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new as(t.pluginManager))})}const os={fpsLimit:30,particles:{number:{value:300,density:{enable:!0}},paint:{fill:{color:{value:{h:120,s:100,l:50},animation:{l:{enable:!0,speed:70,sync:!1,min:30,max:100}}},enable:!0}},shape:{type:"matrix",options:{matrix:{interval:{min:30,max:60}}}},effect:{type:"shadow",options:{shadow:{color:"#00ff41",blur:7}}},size:{value:10},move:{enable:!0,direction:"bottom",straight:!0,speed:{min:8,max:15}}},trail:{enable:!0,length:10,fill:{color:"#000"}},poisson:{enable:!0},background:{color:"#000000"}};async function ls(t){await t.pluginManager.register(async t=>{await Promise.all([Wi(t),is(t),rs(t),Ji(t),Qi(t)]),t.pluginManager.addPreset("matrix",os)})}const cs=globalThis;cs.loadMatrixPreset=ls,cs.tsParticles=ei;function hs(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class ds{#S;#I;#O;#_;#L;#f;#D;#E;#R;#T;#B;#F;#g;#A;#U;#$={};#V=[void 0,void 0];#N={};constructor(t,e,i){this.#g=t,this.#f=e,this.#_=i,this.#D=null,this.#S=null,this.#I=new Set,this.#U=[],this.#A=[],this.#O=[],this.#L=[],this.#R=[],this.#T=[],this.#B=[],this.#F={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#E}canvasClear(){this.#f.actualOptions.clear&&this.draw(t=>{t.clearRect(u.x,u.y,this.#_.size.width,this.#_.size.height)})}clear(){const t=new Set;for(const e of this.#O)if(t.add(e),e.canvasClear?.())return e;for(const e of Object.values(Wt))if("number"==typeof e)for(const i of this.#W(e))if(!t.has(i)&&(t.add(i),i.canvasClear?.()))return i;this.canvasClear()}destroy(){this.stop(),this.#S=null,this.#I.clear(),this.#U=[],this.#A=[],this.#O=[],this.#L=[],this.#R=[],this.#T=[],this.#B=[];for(const t of Object.values(Wt))"number"==typeof t&&(this.#F[t]=[])}draw(t){const e=this.#D;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[a,r]=this.#j(t);if(a??=s,r??=n,!a&&!r)return;const o=this.#f,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#N,f=this.#$,g=a?Ye(a,o.hdr,h*d,o.peakNits,o.hdrMode):void 0,m=r?Ye(r,o.hdr,u*d,o.peakNits,o.hdrMode):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=m,this.draw(s=>{for(const i of this.#B)i.drawParticleSetup?.(s,t,e);this.#q(s,t,i,d,f,p),this.#H({container:o,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#G(t);for(const i of this.#T)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#R)this.#X(i,s,t,e)})}drawParticles(t){const{particles:e,actualOptions:i}=this.#f;this.clear(),e.update(t),this.draw(s=>{const n=this.#_.size.width,a=this.#_.size.height;if(this.#S)try{s.drawImage(this.#S,u.x,u.y,n,a)}catch{this.#Y("background-element-draw-error","Error drawing background element onto canvas")}const r=i.background;if(r.draw)try{r.draw(s,t)}catch{this.#Y("background-draw-error","Error in background.draw callback")}for(const t of this.#W(Wt.BackgroundMask))t.canvasPaint?.();for(const e of this.#W(Wt.CanvasSetup))e.drawSettingsSetup?.(s,t);for(const e of this.#W(Wt.PluginContent))e.draw?.(s,t);e.drawParticles(t);for(const e of this.#W(Wt.CanvasCleanup))e.clearDraw?.(s,t),e.drawSettingsCleanup?.(s,t)})}init(){this.initUpdaters(),this.initPlugins(),this.#Q(),this.paint()}initPlugins(){this.#O=[],this.#L=[],this.#R=[],this.#B=[],this.#T=[];for(const t of Object.values(Wt))"number"==typeof t&&(this.#F[t]=[]);this.#K()}initUpdaters(){this.#U=[],this.#A=[];for(const t of this.#f.particleUpdaters)t.afterDraw&&this.#A.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#U.push(t)}paint(){let t=!1;for(const e of this.#W(Wt.BackgroundMask))if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(u.x,u.y,this.#_.size.width,this.#_.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,u.x,u.y,this.#_.size.width,this.#_.size.height),i.globalAlpha=s})}setContext(t){this.#D=t,this.#D&&(this.#D.globalCompositeOperation=l)}setContextSettings(t){this.#E=t}stop(){this.draw(t=>{t.clearRect(u.x,u.y,this.#_.size.width,this.#_.size.height)})}updateBackgroundElement(){this.#Q()}#G(t){for(const e of this.#A)e.afterDraw?.(t)}#q(t,e,i,s,n,a){for(const r of this.#U){if(r.getColorStyles){const{fill:a,stroke:o}=r.getColorStyles(e,t,i,s);a&&(n.fill=a),o&&(n.stroke=o)}if(r.getTransformValues){const t=r.getTransformValues(e);for(const e in t)hs(a,t,e)}r.beforeDraw?.(e)}}#Z(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#J(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#H(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:r,opacity:o,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(l),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.y),a.fill&&(i.fillStyle=a.fill);const f=!!s.fillEnabled,g=s.strokeWidth??0;i.lineWidth=g,a.stroke&&(i.strokeStyle=a.stroke);const m={context:i,particle:s,radius:r,drawRadius:1*r,opacity:o,delta:n,pixelRatio:e.retina.pixelRatio,fill:f,stroke:g>0,transformData:u,position:{...d},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;this.#J(y,m),this.#tt(v,m),this.#et(v,m),this.#it(v,m),this.#Z(y,m),i.resetTransform()}#X(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#et(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:a}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),a&&i.stroke())}#it(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#tt(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#W(t){return this.#F[t]}#j(t){let e,i;for(const s of this.#L)if(!e&&s.particleFillColor&&(e=qe(this.#g,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=qe(this.#g,s.particleStrokeColor(t))),e&&i)break;return this.#V[0]=e,this.#V[1]=i,this.#V}#st(t){const e=[[Wt.BackgroundMask,!!t.canvasPaint],[Wt.CanvasSetup,!!t.drawSettingsSetup],[Wt.PluginContent,!!t.draw],[Wt.CanvasCleanup,!!(t.clearDraw??t.drawSettingsCleanup)]];for(const[i,s]of e)s&&this.#F[i].push(t)}#K(){for(const t of this.#f.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#L.push(t),t.drawParticle&&this.#R.push(t),t.drawParticleSetup&&this.#B.push(t),t.drawParticleCleanup&&this.#T.push(t),t.canvasClear&&this.#O.push(t),this.#st(t)}#nt(t){return"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas||"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement}#Q(){const t=this.#f.actualOptions.background;if(this.#S=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){let e;try{e=document.querySelector(t.element)}catch{return void this.#Y("background-element-invalid-selector",`Background element selector "${t.element}" is invalid`)}e&&this.#nt(e)?this.#S=e:e?this.#Y("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#Y("background-element-not-found",`Background element selector "${t.element}" not found`)}}else this.#nt(t.element)&&(this.#S=t.element)}#Y(t,e){this.#I.has(t)||(this.#I.add(t),n().warning(e))}}const us=new WeakMap;function ps(t,e,i=!1){if(!e)return;const s=t.style,n=new Set;for(let t=0;t<s.length;t++){const e=s.item(t);e&&n.add(e)}for(let t=0;t<e.length;t++){const i=e.item(t);i&&n.add(i)}for(const t of n){const n=e.getPropertyValue(t);n?s.setProperty(t,n,i?"important":""):s.removeProperty(t)}}class fs{domElement;render;renderCanvas;size;zoom=1;#f;#at;#rt;#ot;#lt;#g;#ct;#ht;#dt;#ut;constructor(t,e){this.#g=t,this.#f=e,this.render=new ds(t,e,this),this.#dt={height:0,width:0};const i=e.retina.pixelRatio,s=this.#dt;this.size={height:s.height*i,width:s.width*i},this.#at=!1,this.#ht=[],this.#ct="none"}get#pt(){return this.#f.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#at){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#ft();this.render.destroy(),this.#ht=[]}getZoomCenter(){const t=this.#f.retina.pixelRatio,{width:e,height:i}=this.size;return this.#ut?this.#ut:{x:e*h/t,y:i*h/t}}init(){this.#gt(t=>{t.disconnect()}),this.#ot=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#mt()}),this.resize(),this.#yt(),this.#gt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#vt(),this.initBackground(),this.#wt(),this.render.init()}initBackground(){const t=this.#f,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=We(this.#g,e.color);if(n){const i=t.actualOptions.hdr;s.backgroundColor=Xe(n,t.hdr,e.opacity,i.peakNits,T(Rt,i.mode,Rt.standard))}else s.backgroundColor="";s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#ht=[];for(const t of this.#f.plugins)t.resize&&this.#ht.push(t)}loadCanvas(t){this.#at&&this.domElement&&this.domElement.remove();const e=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=e,this.#at=!!e&&"true"===e.dataset[r],this.renderCanvas=e?(t=>{const e=us.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError(dt(rt));try{const e=t.transferControlToOffscreen();return us.set(t,e),e}catch{throw new TypeError(dt(ot))}})(e):t;const i=this.domElement;i&&(i.ariaHidden="true",this.#lt=function(t){const e=gt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||A(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}(i.style));const s=this.#dt,n=this.renderCanvas;i?(s.height=i.offsetHeight,s.width=i.offsetWidth):(s.height=n.height,s.width=n.width);const a=this.#f.retina.pixelRatio,o=this.size;n.height=o.height=s.height*a,n.width=o.width=s.width*a}resize(){const t=this.domElement;if(!t)return!1;const e=this.#f,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#dt,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,r={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&r.height===i.height&&r.width===i.width)return!1;const o={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=r.width,i.height=l.height=r.height,this.#f.started&&e.particles.setResizeFactor({width:s.width/o.width,height:s.height/o.height}),!0}setPointerEvents(t){this.domElement&&(this.#ct=t,this.#mt())}setZoom(t,e){this.zoom=t,this.#ut=e}stop(){this.#gt(t=>{t.disconnect()}),this.#ot=void 0,this.#Pt(),this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#f,e=t.updateActualOptions();t.particles.setDensity(),this.#bt(),e&&await t.refresh()}#bt(){for(const t of this.#ht)t.resize?.()}#vt(){const t=this.#f,e=t.actualOptions.hdr.enable&&mt("(color-gamut: p3)")?.matches&&mt("(dynamic-range: high)")?.matches;t.hdrMode=T(Rt,t.actualOptions.hdr.mode,Rt.standard),t.peakNits=t.actualOptions.hdr.peakNits;const i=this.renderCanvas;if(!i)return void(t.hdr=e??!1);let s;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...e?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});try{s=i.getContext("2d",this.render.settings)}catch{s=null}if(e&&!s){const t={alpha:!0,desynchronized:!0,willReadFrequently:!1,colorSpace:"srgb"};this.render.setContextSettings(t);try{s=i.getContext("2d",t)}catch{s=null}}if(this.render.setContext(s),s){const e=(t=>{if(!t)return;const e=t;return e.getContextAttributes?.().colorSpace??void 0})(s);void 0!==e&&(t.hdr="display-p3"===e)}}#wt(){this.#Pt();const t=mt("(color-gamut: p3)"),e=mt("(dynamic-range: high)"),i=()=>{this.#vt(),this.initBackground()},s=[];t&&(t.addEventListener("change",i),s.push({handler:i,mql:t})),e&&(e.addEventListener("change",i),s.push({handler:i,mql:e})),this.#rt=s}#yt(){const t=this.domElement,e=this.#f.actualOptions;if(t){this.#pt?this.#xt():this.#ft();for(const i in e.style){if(!i||!(i in e.style))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}}#Pt(){if(this.#rt){for(const{handler:t,mql:e}of this.#rt)e.removeEventListener("change",t);this.#rt=void 0}}#mt(){const t=this.domElement;if(!t)return;this.#gt(t=>{t.disconnect()}),this.#yt(),this.initBackground();const e=this.#ct;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#gt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#ft(){const t=this.domElement,e=this.#lt;t&&e&&ps(t,e,!0)}#gt(t){this.#ot&&t(this.#ot)}#xt(){const t=this.domElement;t&&ps(t,function(t){if(zt!==t||!kt){zt=t;const e=gt().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}kt=e}return kt}(this.#f.actualOptions.fullScreen.zIndex),!0)}}class gs{#f;#Mt;#zt;#kt;constructor(t){this.#f=t,this.#Mt={visibilityChange:()=>{this.#Ct()},resize:()=>{this.#St()}}}addListeners(){this.#It(!0)}removeListeners(){void 0!==this.#kt&&(clearTimeout(this.#kt),this.#kt=void 0),this.#It(!1)}#Ct(){const t=this.#f;t.actualOptions.pauseOnBlur&&(gt().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#St(){this.#kt&&(clearTimeout(this.#kt),this.#kt=void 0);const t=async()=>{await this.#f.canvas.windowResize()};this.#kt=setTimeout(()=>{t()},this.#f.actualOptions.resize.delay*d)}#It(t){const e=this.#Mt;this.#Ot(t),Ct(document,"visibilitychange",e.visibilityChange,t,!1)}#Ot(t){const e=this.#Mt,i=this.#f;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Ct(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#zt&&!t?(s&&this.#zt.unobserve(s),this.#zt.disconnect(),this.#zt=void 0):!this.#zt&&t&&s&&(this.#zt=new ResizeObserver(t=>{t.some(t=>t.target===s)&&this.#St()}),this.#zt.observe(s))}}function ms(t){if(e=t.outMode,i=t.checkModes,!(e===i||F(i)&&i.includes(e)))return;var e,i;const s=2*t.radius;t.coord>t.maxCoord-s?t.setCb(-t.radius):t.coord<s&&t.setCb(t.radius)}function ys(t,e){const i=t%e;return i<0?i+e:i}function vs(t,e,i,s){const n=Ee(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=xt(n.effect.type,t.id,a),t.shape=xt(n.shape.type,t.id,a);const r=n.effect,o=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=xt(e,t.id,a);i&&(t.effect=i)}r.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=xt(e,t.id,a);i&&(t.shape=i)}o.load(s.shape)}}if(t.effect===y){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(W()*i.length)]}if(t.shape===y){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(W()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return Pt({close:e.close},xt(n,i,s))}(t.effect,r,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return Pt({close:e.close},xt(n,i,s))}(t.shape,o,t.id,a):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class ws{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;#_t={fillOpacity:1,opacity:1,strokeOpacity:1};#Lt=O.origin;#Dt={sin:0,cos:0};#Et={a:1,b:0,c:0,d:1};#f;#Rt=[];#g;constructor(t,e){this.#g=t,this.#f=e}addModifier(t){this.#Rt.push(t),this.#Rt.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#Rt.length=0}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const e=this.#f,i=this.shape?e.shapeDrawers.get(this.shape):void 0;i?.particleDestroy?.(this);for(const i of e.particleDestroyedPlugins)i.particleDestroyed?.(this,t);for(const i of e.particleUpdaters)i.particleDestroyed?.(this,t);this.#f.dispatchEvent(_t.particleDestroyed,{particle:this})}draw(t){const e=this.#f.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#Tt(this.#Bt(Qe(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*h}getModifier(t){return this.#Rt.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=G(this.opacity?.value??1),s=this.#Bt(void 0,t=>t.opacity)??i;return this.#_t.fillOpacity=this.fillOpacity??1,this.#_t.opacity=s*e,this.#_t.strokeOpacity=this.strokeOpacity??1,this.#_t}getPosition(){return this.#Lt.x=this.position.x+this.offset.x,this.#Lt.y=this.position.y+this.offset.y,this.#Lt.z=this.position.z,this.#Lt}getRadius(){return this.#Bt(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#Dt.sin=Math.sin(t),this.#Dt.cos=Math.cos(t),this.#Dt}getStrokeColor(){return this.#Tt(this.#Bt(Qe(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#Et.a=e.cos*(t.a??p),this.#Et.b=i?e.sin*(t.b??1):t.b??f,this.#Et.c=i?-e.sin*(t.c??1):t.c??g,this.#Et.d=e.cos*(t.d??m),this.#Et}init(t,e,i,s){const n=this.#f;!function(t,e,i){t.id=e,t.group=i,t.justWarped=!1,t.effectClose=!0,t.shapeClose=!0,t.pathRotation=!1,t.lastPathTime=0,t.destroyed=!1,t.unbreakable=!1,t.isRotating=!1,t.rotation=0,t.misplaced=!1,t.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},t.size={value:1,max:1,min:1,enable:!1},t.outType=$t.normal,t.ignoresResizeRatio=!0}(this,t,s),this.options=vs(this,n,this.#g,i),n.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(n.particleUpdaters,this),this.#Ft(e),this.initialVelocity=this.#At(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,n),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(n.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(n,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(n,this)}isInsideCanvas(t){return this.#Ut(t).inside}isInsideCanvasForOutMode(t,e){return this.#Ut(e,t).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=ys(t,v);return e>=Math.PI*h&&e<3*Math.PI*h}if(this.roll.horizontal){const e=ys(t+Math.PI*h,v);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=ys(t,v);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}removeModifier(t){const e=this.#Rt.findIndex(e=>e.id===t);e>=0&&this.#Rt.splice(e,1)}reset(){for(const t of this.#f.particleUpdaters)t.reset?.(this)}#Bt(t,e){let i=t;for(const t of this.#Rt)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#$t(t,e){let i=0,s=t?O.create(t.x,t.y,e):void 0;const n=this.#f,a=n.particlePositionPlugins,r=this.options.move.outModes,o=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return O.create(i.x,i.y,e)}const t=et({size:l,position:s}),c=O.create(t.x,t.y,e);this.#Vt(c,o,r.left??r.default),this.#Vt(c,o,r.right??r.default),this.#Nt(c,o,r.top??r.default),this.#Nt(c,o,r.bottom??r.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}}#At(){const t=this.options.move,e=function(t){const e=_.origin;return e.length=1,e.angle=t,e}(this.direction).copy();if(t.direction===a.inside||t.direction===a.outside)return e;const i=tt(G(t.angle.value)),s=tt(G(t.angle.offset)),n={left:s-i*h,right:s+i*h};return t.straight||(e.angle+=H(Q(n.left,n.right))),t.random&&"number"==typeof t.speed&&(e.length*=W()),e}#Vt(t,e,i){ms({outMode:i,checkModes:[Bt.bounce],coord:t.x,maxCoord:this.#f.canvas.size.width,setCb:e=>t.x+=e,radius:e})}#Nt(t,e,i){ms({outMode:i,checkModes:[Bt.bounce],coord:t.y,maxCoord:this.#f.canvas.size.height,setCb:e=>t.y+=e,radius:e})}#Wt(t,e){const i=this.getRadius(),s=this.#f.canvas.size,n=this.position,a=e===Bt.bounce||e===Bt.split;return t===ut.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===ut.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===ut.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===ut.top?{inside:a?n.y-i>0:n.y+i>0,reason:"default"}:{inside:n.x>=-i&&n.y>=-i&&n.y<=s.height+i&&n.x<=s.width+i,reason:"default"}}#jt(t,e){return{canvasSize:this.#f.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Ut(t,e){const i=this.#Wt(t,e),s=this.#f,n=this.shape?s.shapeDrawers.get(this.shape):void 0,a=this.effect?s.effectDrawers.get(this.effect):void 0;if(!n?.isInsideCanvas&&!a?.isInsideCanvas)return i;const r=this.#jt(t,e),o=n?.isInsideCanvas?this.#qt(n.isInsideCanvas(r),"shape"):void 0,l=a?.isInsideCanvas?this.#qt(a.isInsideCanvas(r),"effect"):void 0;if(o&&l){const t=Math.max(o.margin??0,l.margin??0);return{inside:o.inside&&l.inside,margin:t>0?t:void 0,reason:"combined"}}return o??l??i}#Tt(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?function(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===Ft.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t}#Ft(t){const e=this.#f,i=Math.floor(G(this.options.zIndex.value)),s=this.#$t(t,q(i,0,e.zLayers));if(!s)throw new Error(dt(nt));this.position=s,this.initialPosition=this.position.copy();const n=e.canvas.size;switch(this.moveCenter={...Mt(this.options.move.center,n),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(E(t))return tt(t);switch(t){case a.top:return-Math.PI*h;case a.topRight:return-Math.PI*C;case a.right:return 0;case a.bottomRight:return Math.PI*C;case a.bottom:return Math.PI*h;case a.bottomLeft:return.75*Math.PI;case a.left:return Math.PI;case a.topLeft:return.75*-Math.PI;case a.inside:return Math.atan2(i.y-e.y,i.x-e.x);case a.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return W()*v}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case a.inside:this.outType=$t.inside;break;case a.outside:this.outType=$t.outside}this.offset=_.origin}#qt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Ps{#Ht=new Map;#Gt;#Xt=[];#Yt;#Qt;#Kt=[];#Zt;constructor(t){this.#Gt=t,this.#Yt=0,this.#Zt=0}get cellSize(){return this.#Gt}set cellSize(t){this.#Qt=t}clear(){this.#Ht.clear();const t=this.#Qt;t&&(this.#Gt=t),this.#Qt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Jt(e,i);this.#Ht.has(s)||this.#Ht.set(s,[]),this.#Ht.get(s)?.push(t)}query(t,e,i=[]){const s=this.#te(t);if(!s)return i;const n=Math.floor(s.minX/this.#Gt),a=Math.floor(s.maxX/this.#Gt),r=Math.floor(s.minY/this.#Gt),o=Math.floor(s.maxY/this.#Gt);for(let s=n;s<=a;s++)for(let n=r;n<=o;n++)this.#ee(s,n,t,e,i);return i}queryCircle(t,e,i,s=[]){const n=this.#ie(t.x,t.y,e);try{return this.query(n,i,s)}finally{this.#Yt--}}queryRectangle(t,e,i,s=[]){const n=this.#se(t.x,t.y,e.width,e.height);try{return this.query(n,i,s)}finally{this.#Zt--}}#ie(t,e,i){const s=this.#Yt++;let n=this.#Xt[s];return n||(n=new Gt(t,e,i),this.#Xt[s]=n),n.reset(t,e,i)}#se(t,e,i,s){const n=this.#Zt++;let a=this.#Kt[n];return a||(a=new Xt(t,e,i,s),this.#Kt[n]=a),a.reset(t,e,i,s)}#Jt(t,e){return`${Math.floor(t/this.#Gt)}_${Math.floor(e/this.#Gt)}`}#te(t){if(t instanceof Gt){const e=t.radius,{x:i,y:s}=t.position;return{minX:i-e,maxX:i+e,minY:s-e,maxY:s+e}}if(t instanceof Xt){const{x:e,y:i}=t.position,{width:s,height:n}=t.size;return{minX:e,maxX:e+s,minY:i,maxY:i+n}}return null}#ee(t,e,i,s,n){const a=this.#Ht.get(`${t}_${e}`);if(a)for(const t of a)s&&!s(t)||i.contains(t.getPosition())&&n.push(t)}}class bs{checkParticlePositionPlugins;#ne;#f;#ae;#re;#oe;#le;#ce;#he;#de;#g;#ue;#pe;#fe;#ge;#me;#ye;constructor(t,e){this.#g=t,this.#f=e,this.#le=0,this.#ne=[],this.#ue=[],this.#oe=0,this.#re=new Map,this.#ce=new Map,this.#ye=this.#ve(this.#f.zLayers),this.#ae=new Ps(100),this.checkParticlePositionPlugins=[],this.#he=[],this.#de=[],this.#fe=[],this.#pe=[],this.#me=[]}get count(){return this.#ne.length}get grid(){return this.#ae}addParticle(t,e,i,s){if(!this.#we(i,this.count))try{const n=this.#ue.pop()??new ws(this.#g,this.#f);n.init(this.#le,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#ne.push(n),this.#Pe(n),this.#le++,this.#f.dispatchEvent(_t.particleAdded,{particle:n}),n):void this.#ue.push(n)}catch(t){n().warning(`error adding particle: ${t}`)}}clear(){this.#ne=[],this.#ce.clear(),this.#be(this.#f.zLayers)}destroy(){this.#ne=[],this.#ue.length=0,this.#ce.clear(),this.#ye=[],this.checkParticlePositionPlugins=[],this.#he=[],this.#de=[],this.#fe=[],this.#pe=[],this.#me=[]}drawParticles(t){for(let e=this.#ye.length-1;e>=0;e--){const i=this.#ye[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#ne.filter(t)}find(t){return this.#ne.find(t)}get(t){return this.#ne[t]}async init(){const t=this.#f;this.checkParticlePositionPlugins=[],this.#me=[],this.#de=[],this.#fe=[],this.#he=[],this.#pe=[],this.#ce.clear(),this.#be(t.zLayers),this.#ae=new Ps(100*t.retina.pixelRatio),this.#xe(t.actualOptions.particles);const e=t.actualOptions.particles.groups;for(const t in e){const i=e[t];i&&this.#xe(Ee(this.#g,this.#f,i),t,i)}await this.#Me()}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#f.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#ne.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s,n=!0){if(t<0||t>this.count)return;let a=0;for(let r=t;a<e&&r<this.count;r++)this.#ze(r,i,s,n)&&(r--,a++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#f.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#f.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Ee(this.#g,this.#f,s);this.#ke(n,i,t)}this.#ke(t.particles,i)}setResizeFactor(t){this.#ge=t}update(t){this.#ae.clear();for(const e of this.#me)e.update?.(t);const e=this.#Ce(t);for(const e of this.#fe)e.postUpdate?.(t);if(this.#Se(t,e),e.size)for(const t of e)this.remove(t,t.group);this.#ge=void 0}#Ie(...t){this.#ue.push(...t)}#ke(t,e,i,s){const n=t.number;if(!n.density.enable)return void this.#xe(t,i,s);const a=this.#Oe(n.density),r=n.value,o=n.limit.value>0?n.limit.value:r,l=Math.min(r,o)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#oe=n.limit.value*a:this.#re.set(i,{limit:n.limit.value*a,mode:T(Tt,n.limit.mode,Tt.delete)}),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)}#xe(t,e,i){if(void 0===e){this.#oe=t.number.limit.value;const e=this.#f.actualOptions.particles.groups;for(const t of this.#re.keys())t in e||this.#re.delete(t)}else{const s=i?.number?.limit?.value??t.number.limit.value;s>0?this.#re.set(e,{limit:s,mode:T(Tt,i?.number?.limit?.mode??t.number.limit.mode,Tt.delete)}):this.#re.delete(e)}}#we(t,e){const i=this.#oe,s=this.#f.actualOptions.particles.number.limit.mode;if(i>0&&s===Tt.wait&&e>=i)return!0;const n=void 0===t?void 0:this.#re.get(t);if(n&&n.limit>0&&n.mode===Tt.wait){if(this.filter(e=>e.group===t).length>=n.limit)return!0}if(n&&n.limit>0&&n.mode===Tt.delete){const e=this.filter(e=>e.group===t).length+1-n.limit;e>0&&this.removeQuantity(e,t)}if(i>0&&s===Tt.delete){const t=this.count+1-i;t>0&&this.#_e(t)}return!1}#ve(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#Le(t){const e=this.#ye.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#Oe(t){const e=this.#f;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1}async#De(){const t=this.#f;await t.initDrawersAndUpdaters();for(const e of t.effectDrawers.values())await(e.init?.(t));for(const e of t.shapeDrawers.values())await(e.init?.(t))}async#Me(){await this.#Ee(),await this.#De();let t=!1;const e=this.#f;for(const i of e.plugins)if(t=i.particlesInitialization?.()??t,t)break;if(t)return;const i=e.actualOptions.particles,s=i.groups;for(const t in s){const e=s[t];if(e)for(let s=this.count,n=0;n<e.number.value&&s<i.number.value;s++,n++)this.addParticle(void 0,e,t)}for(let t=this.count;t<i.number.value;t++)this.addParticle()}async#Ee(){const t=this.#f;for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#me.push(e),e.particleUpdate&&this.#de.push(e),e.postUpdate&&this.#fe.push(e),e.particleReset&&this.#he.push(e),e.postParticleUpdate&&this.#pe.push(e)}#Pe(t){const e=this.#Le(t.position.z),i=this.#ye[e];i&&(i.push(t),this.#ce.set(t.id,e))}#_e(t){this.removeAt(0,t,void 0,void 0,!1)}#ze(t,e,i,s=!0){const n=this.#ne[t];return!!n&&((!s||n.group===e)&&(this.#ne.splice(t,1),this.#Re(n),n.destroy(i),this.#f.dispatchEvent(_t.particleRemoved,{particle:n}),this.#Ie(n),!0))}#Re(t){const e=this.#ce.get(t.id)??this.#Le(t.position.z),i=this.#ye[e];if(!i)return void this.#ce.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#ce.delete(t.id)}#be(t){const e=Math.max(Math.floor(t),1);if(this.#ye.length===e)for(const t of this.#ye)t.length=0;else this.#ye=this.#ve(e)}#Te(t){const e=this.#Le(t.position.z),i=this.#ce.get(t.id);if(void 0===i)return void this.#Pe(t);if(i===e)return;const s=this.#ye[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#ye[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#ce.set(t.id,e)}else this.#ce.set(t.id,e)}#Ce(t){const e=new Set,i=this.#ge;for(const s of this.#ne){i&&!s.ignoresResizeRatio&&(s.position.x*=i.width,s.position.y*=i.height,s.initialPosition.x*=i.width,s.initialPosition.y*=i.height),s.ignoresResizeRatio=!1;for(const t of this.#he)t.particleReset?.(s);for(const e of this.#de){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.#ae.insert(s)}return e}#Se(t,e){for(const i of this.#ne)if(i.destroyed)e.add(i);else{for(const e of this.#f.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#pe)e.postParticleUpdate?.(i,t);this.#Te(i)}}}class xs{pixelRatio;reduceFactor;#f;constructor(t){this.#f=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#f,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=G(s.gravity.maxSpeed)*i,a.moveDrift=G(s.drift)*i,a.moveSpeed=G(s.speed)*i;const r=a.maxDistance;r.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,r.vertical=void 0===n.vertical?void 0:n.vertical*i}}function Ms(t){return!t.destroyed}function zs(t,e,...i){const s=new Re(t,e);return te(s,...i),s}var ks=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;hdrMode;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particles;particleUpdaters;peakNits;plugins;retina;shapeDrawers;started;zLayers;#Be;#Fe;#Ae;#Ue={value:0,factor:0};#$e;#Ve;#Ne;#We;#je;#qe;#He;#Ge;#Xe;#Ye;#Qe;#g;#Ke;#Ze;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#g=i,this.#$e=e,this.#Xe=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.hdrMode=Rt.standard,this.peakNits=400,this.#Ke=!1,this.#Be=0,this.#Ne=0,this.#Ge=0,this.#je=!0,this.started=!1,this.destroyed=!1,this.#Qe=!0,this.#He=0,this.zLayers=100,this.pageHidden=!1,this.#Ze=a,this.#qe=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new xs(this),this.canvas=new fs(this.#g,this),this.particles=new bs(this.#g,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Ye=zs(this.#g,this),this.actualOptions=zs(this.#g,this),this.#We=new gs(this),this.dispatchEvent(_t.containerBuilt)}get animationStatus(){return!this.#Qe&&!this.pageHidden&&Ms(this)}get options(){return this.#Ye}get sourceOptions(){return this.#Ze}addLifeTime(t){this.#Ge+=t}alive(){return!this.#Ne||this.#Ge<=this.#Ne}destroy(t=!0){if(Ms(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.destroyed=!0,this.#Xe(t),this.dispatchEvent(_t.containerDestroyed)}}dispatchEvent(t,e){this.#$e(t,{container:this,data:e})}draw(t){if(!Ms(this))return;let e=t;this.#Ve=V(t=>{e&&(this.#He=void 0,e=!1),this.#Je(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}n().error(`Export plugin with type ${t} not found`)}async init(){if(!Ms(this))return;const t=new Map;for(const e of this.#g.plugins){const i=await e.getPlugin(this);i.preInit&&await i.preInit(),t.set(e,i)}await this.initDrawersAndUpdaters(),this.#Ye=zs(this.#g,this,this.#qe,this.sourceOptions),this.actualOptions=zs(this.#g,this,this.#Ye),this.#Me(t),this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:e,duration:i,fpsLimit:s,smooth:n,zLayers:a}=this.actualOptions,r=this.actualOptions.hdr;this.hdrMode=T(Rt,r.mode,Rt.standard),this.peakNits=r.peakNits,this.zLayers=a,this.#Ne=G(i)*d,this.#Be=G(e)*d,this.#Ge=0,this.fpsLimit=s>0?s:120,this.#Ke=n;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(_t.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(_t.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#g;this.effectDrawers=await St(this,t.initializers.effects),this.shapeDrawers=await St(this,t.initializers.shapes),this.particleUpdaters=await async function(t,e){return await Promise.all([...e.values()].map(e=>e(t)))}(this,t.initializers.updaters)}pause(){var t;if(Ms(this)&&(void 0!==this.#Ve&&(t=this.#Ve,N(t),this.#Ve=void 0),!this.#Qe)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Qe=!0),this.dispatchEvent(_t.containerPaused)}}play(t){if(!Ms(this))return;const e=this.#Qe||t;if(!this.#je||this.actualOptions.autoPlay){if(this.#Qe&&(this.#Qe=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(_t.containerPlay),this.draw(e??!1)}else this.#je=!1}async refresh(){if(Ms(this))return this.stop(),this.start()}async reset(t){if(Ms(this))return this.#qe=t,this.#Ze=t,this.#Ye=zs(this.#g,this,this.#qe,this.sourceOptions),this.actualOptions=zs(this.#g,this,this.#Ye),this.refresh()}async start(){Ms(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{this.#Fe=t;const e=async()=>{this.#Ae=void 0,this.#Fe=void 0,this.#We.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(_t.containerStarted),this.play(),t()};this.#Ae=setTimeout(()=>{e()},this.#Be)}))}stop(){if(Ms(this)&&this.started){void 0!==this.#Ae&&(clearTimeout(this.#Ae),this.#Ae=void 0,this.#Fe?.(),this.#Fe=void 0),this.#je=!0,this.started=!1,this.#We.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.#Ze=this.#Ye,this.dispatchEvent(_t.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return this.canvas.render.updateBackgroundElement(),t}#Me(t){this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[e,i]of t)e.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i))}#Je(t){try{if(!this.#Ke&&void 0!==this.#He&&t<this.#He+d/this.fpsLimit)return void this.draw(!1);if(this.#He??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/d}(this.#Ue,t-this.#He,this.fpsLimit,this.#Ke),this.addLifeTime(this.#Ue.value),this.#He=t,this.#Ue.value>d)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#Ue),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){n().error("error in animation loop",t)}}}});var Cs=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=Wt.CanvasSetup;#f;#ti;constructor(t){this.#f=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??l,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#ti&&(t.globalCompositeOperation=this.#ti)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#f.actualOptions.blend;this.#ti=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function Ss(t,e,i,s,n,a,r){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=q(t.velocity.x,-1,1),t.velocity.y=q(t.velocity.y,-1,1));t.lastPathTime-=n}(t,r);const o=t.gravity,l=o?.enable&&o.inverse?-1:1;n&&i&&(t.velocity.x+=n*r.factor/(60*i)),o?.enable&&i&&(t.velocity.y+=l*(o.acceleration*r.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const h=t.velocity.mult(i);o?.enable&&s>0&&(!o.inverse&&h.y>=0&&h.y>=s||o.inverse&&h.y<=0&&h.y<=-s)&&(h.y=l*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(a);const{position:p}=t;p.addTo(h),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 Is=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#f;#g;constructor(t,e){this.#g=t,this.#f=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(t){const e=t.options.move,i=e.gravity,s=e.path;if(t.moveDecay=1-G(e.decay),t.pathDelay=G(s.delay.value)*d,s.generator){let e=this.pathGenerators.get(s.generator);e||(e=this.availablePathGenerators.get(s.generator),e&&(this.pathGenerators.set(s.generator,e),e.init())),t.pathGenerator=e}t.gravity={enable:i.enable,acceleration:G(i.acceleration),inverse:i.inverse},function(t,e){const i=e.options.move.spin;if(!i.enable)return;const s=i.position??{x:50,y:50},n={x:.01*s.x*t.canvas.size.width,y:.01*s.y*t.canvas.size.height},a=J(e.getPosition(),n),r=G(i.acceleration);e.retina.spinAcceleration=r*t.retina.pixelRatio,e.spin={center:n,direction:e.velocity.x>=0?Dt.clockwise:Dt.counterClockwise,angle:W()*v,radius:a,acceleration:e.retina.spinAcceleration}}(this.#f,t)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(t,e){const i=t.options.move;if(!i.enable)return;const s=this.#f,n=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(t),a=s.retina.reduceFactor,r=t.retina.moveSpeed,o=t.retina.moveDrift,l=t.size.max,c=r*(i.size?t.getRadius()/l:1)*n*(e.factor||1)*h,d=t.retina.maxSpeed;i.spin.enable?function(t,e,i,s){if(!e.spin)return;const n=e.spin.direction===Dt.clockwise,a={x:n?Math.cos:Math.sin,y:n?Math.sin:Math.cos};e.position.x=e.spin.center.x+e.spin.radius*a.x(e.spin.angle)*s,e.position.y=e.spin.center.y+e.spin.radius*a.y(e.spin.angle)*s,e.spin.radius+=e.spin.acceleration*s;const r=Math.max(t.canvas.size.width,t.canvas.size.height),o=r*h;e.spin.radius>o?(e.spin.radius=o,e.spin.acceleration*=-1):e.spin.radius<0&&(e.spin.radius=0,e.spin.acceleration*=-1),e.spin.angle+=.01*i*(1-e.spin.radius/r)}(s,t,c,a):Ss(t,i,c,d,o,a,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=K(e,t.position),n=Math.abs(i),a=Math.abs(s),{maxDistance:r}=t.retina,o=r.horizontal,l=r.vertical;if(!o&&!l)return;if((o&&n>=o||l&&a>=l)&&!t.misplaced)t.misplaced=!!o&&n>o||!!l&&a>l,o&&(t.velocity.x=t.velocity.y*h-t.velocity.x),l&&(t.velocity.y=t.velocity.x*h-t.velocity.y);else if((!o||n<o)&&(!l||a<l)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;o&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-W()),l&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-W())}}(t)}preInit(){return this.#ei()}redrawInit(){return this.#ei()}update(){for(const t of this.pathGenerators.values())t.update()}async#ei(){const t=this.#g;if(t.initializers.pathGenerators){this.availablePathGenerators=await St(this.#f,t.initializers.pathGenerators),this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var Os=Object.freeze({__proto__:null,PoissonDiscPluginInstance:class{poissonDisc;redrawTimeout;#f;#ii;constructor(t){this.#f=t,this.#ii=0}async init(){await this.#si()}particlePosition(t){const e=this.#f.actualOptions.poisson;if(this.poissonDisc&&e?.enable&&!(this.#ii>=this.poissonDisc.points.length))return t??this.poissonDisc.points[this.#ii++]?.position}resize(){const t=this.#f,e=t.actualOptions.poisson;if(!e?.enable)return;this.redrawTimeout&&clearTimeout(this.redrawTimeout);this.redrawTimeout=setTimeout(()=>{(async()=>{this.#f.destroyed||(await this.#si(),await t.particles.redraw())})()},250)}stop(){delete this.poissonDisc}async#si(){const t=this.#f,e=t.actualOptions.poisson,i=t.actualOptions.particles,s=t.canvas.size,n=t.retina.pixelRatio;if(!e?.enable)return;this.#ii=0;const{PoissonDisc:a}=await Promise.resolve().then(function(){return Ls});this.poissonDisc=new a(s,e.radius?e.radius*n:Math.max(Y(i["size.value"]??1)*n,Math.sqrt(s.width*s.height/i.number.value)),e.retries,e.dimensions);e.steps>0?this.poissonDisc.steps(e.steps):await this.poissonDisc.run()}}});var _s=Object.freeze({__proto__:null,TrailPluginInstance:class{layer=Wt.PluginContent;#f;#g;#ni;constructor(t,e){this.#f=e,this.#g=t}canvasClear(){const t=this.#f,e=t.actualOptions.trail,i=this.#ni;if(!e?.enable||!i||e.length<=0)return!1;let s=!1;const n=t.canvas;return i.color?(n.render.paintBase(Xe(i.color,t.hdr,i.opacity,t.peakNits,t.hdrMode)),s=!0):i.image&&(n.render.paintImage(i.image,i.opacity),s=!0),s}async init(){try{await this.#ai()}catch(t){n().error(t)}}async#ai(){const t=this.#f.actualOptions.trail;if(!t?.enable)return;const e=t.fill,i=1/t.length;if(e.color){const t=We(this.#g,e.color);if(!t)return;this.#ni={color:{...t},opacity:i}}else await new Promise((t,s)=>{if(!e.image)return;const a=gt().createElement("img");a.addEventListener("load",()=>{this.#ni={image:a,opacity:i},t()}),a.addEventListener("error",t=>{n().error(t),s(new Error("Error loading image"))}),a.src=e.image})}}});var Ls=Object.freeze({__proto__:null,PoissonDisc:class{active;cellSize;cols;dimensions;firstPoint;grid;points;radius;retries;rows;size;constructor(t,e,i,s,n){this.size={...t},this.radius=e,this.retries=i,this.dimensions=s,this.cellSize=Math.floor(this.radius/Math.sqrt(this.dimensions)),this.cols=Math.floor(this.size.width/this.cellSize),this.rows=Math.floor(this.size.height/this.cellSize),this.points=[],this.active=[],this.grid=[],this.firstPoint=n?{...n}:void 0,this.reset()}addPoint(t){const e={position:{...t},gridPosition:{x:Math.floor(t.x/this.cellSize),y:Math.floor(t.y/this.cellSize)}},i=this.points.length,s=this.grid[e.gridPosition.y];s&&(this.points.push(e),s[e.gridPosition.x]=i,this.active.push(i))}getRandom(t,e){return Math.floor(W()*(e-t))+t}initialiseGrid(){for(let t=0;t<=this.rows;t++){this.grid[t]=[];const e=this.grid[t];if(e)for(let t=0;t<=this.cols;t++)e[t]=-1}}reset(){if(this.points=[],this.active=[],this.grid=[],this.initialiseGrid(),this.firstPoint)this.addPoint(this.firstPoint);else{const t=0;this.addPoint({x:this.getRandom(t,this.size.width),y:this.getRandom(t,this.size.height)})}}async run(){this.reset();let t=0;for(;this.active.length>0;)this.steps(1),++t%100==0&&await new Promise(t=>setTimeout(t))}steps(t){for(let e=0;e<t;e++)this.active.length<=0||this.#ri()}#oi(t,e){const i=e*(v/this.retries),s=this.getRandom(this.radius,2*this.radius),n=Math.cos(i)*s,a=Math.sin(i)*s,r={x:Math.floor(t.position.x+n),y:Math.floor(t.position.y+a)},o=Math.floor(r.x/this.cellSize),l=Math.floor(r.y/this.cellSize);if(r.x<=0||r.x>=this.size.width||r.y<=0||r.y>=this.size.height)return;const c=this.grid[l];if(!c)return;const h=c[o];if(void 0!==h&&!(h>=0)){for(let t=-1;t<=1;t++)for(let e=-1;e<=1;e++){if(!t&&!e)continue;const i={x:o+e,y:l+t};if(i.x<0||i.y<0||i.x>=this.cols||i.y>=this.rows)continue;const s=this.grid[i.y]?.[i.x];if(void 0===s||s<0)continue;const n=this.points[s];if(n&&J(r,n.position)<this.radius)return}return r}}#ri(){const t=this.getRandom(0,this.active.length);let e=!1;for(let i=0;i<this.retries;i++){const s=this.active[t];if(void 0===s)continue;const n=this.points[s];if(!n)continue;const a=this.#oi(n,i);if(a){e=!0,this.addPoint(a);break}}if(!e){const e=1;this.active.splice(t,e)}}}});t.loadMatrixPreset=ls,t.tsParticles=ei}(t.__tsParticlesInternals.presets.matrix=t.__tsParticlesInternals.presets.matrix||{})}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:self),Object.assign(globalThis.window||globalThis,{loadMatrixPreset:(globalThis.__tsParticlesInternals.presets.matrix||{}).loadMatrixPreset});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
|
|
2
2
|
(function (g) {
|
|
3
|
-
/* Preset v4.5.
|
|
3
|
+
/* Preset v4.5.2 */
|
|
4
4
|
g.__tsParticlesInternals = g.__tsParticlesInternals || {};
|
|
5
5
|
g.__tsParticlesInternals.presets = g.__tsParticlesInternals.presets || {};
|
|
6
6
|
(function (exports, basic, shapeMatrix, pluginPoissonDisc, effectShadow, pluginTrail) {
|