@tsparticles/fireworks
Version:
tsParticles fireworks bundle — easily create spectacular fireworks and fountain particle effects with built-in presets. Ready to use components available for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.
2 lines • 135 kB
JavaScript
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.fireworks=t.__tsParticlesInternals.bundles.fireworks||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",o=100,a=.5,r=1e3,l={x:0,y:0,z:0},c={a:1,b:0,c:0,d:1},d="random",h="mid",u=2*Math.PI,p="true",f="false",g="canvas",m=255,y=360,v=100,w=100,b=.25,M=.75,P=400;var x;function C(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(x=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",x.bottomLeft="bottom-left",x.bottomRight="bottom-right",x.left="left",x.none="none",x.right="right",x.top="top",x.topLeft="top-left",x.topRight="top-right",x.outside="outside",x.inside="inside";class z{x;y;z;constructor(t=l.x,e=l.y,i=l.z){this.x=t,this.y=e,this.z=i}static get origin(){return z.create(l.x,l.y,l.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return z.create(t.x,t.y,C(t))}static create(t,e,i){return"number"==typeof t?new z(t,e??l.y,i??l.z):new z(t.x,t.y,C(t))}add(t){return z.create(this.x+t.x,this.y+t.y,this.z+C(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=C(t)}copy(){return z.clone(this)}div(t){return z.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return z.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return z.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),l.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=C(t)}sub(t){return z.create(this.x-t.x,this.y-t.y,this.z-C(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=C(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class k extends z{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return k.create(l.x,l.y)}static clone(t){return k.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new k(t,e??l.y):new k(t.x,t.y)}}function O(t){return"boolean"==typeof t}function S(t){return"string"==typeof t}function D(t){return"number"==typeof t}function I(t){return"function"==typeof t}function F(t){return"object"==typeof t&&null!==t}function E(t){return Array.isArray(t)}function L(t){return null==t}const R=Math.PI/180;let T=Math.random;const _={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return H(T(),0,1-Number.EPSILON)}function B(t,e){return A()*(e-t)+t}function V(t){return _.nextFrame(t)}function U(t){_.cancel(t)}function H(t,e,i){return Math.min(Math.max(t,e),i)}function N(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function $(t){const e=j(t);let i=W(t);return e===i&&(i=0),B(i,e)}function G(t){return D(t)?t:$(t)}function W(t){return D(t)?t:t.min}function j(t){return D(t)?t:t.max}function q(t,e){if(t===e||void 0===e&&D(t))return t;const i=W(t),s=j(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:q(i,s)}function X(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function Y(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function Q(t,e){return Math.sqrt(Y(t,e))}function Z(t,e,i){return Y(t,e)<=i*i}function K(t){return t*R}function J(e,i,s){if(D(e))return K(e);switch(e){case t.MoveDirection.top:return-Math.PI*a;case t.MoveDirection.topRight:return-Math.PI*b;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*b;case t.MoveDirection.bottom:return Math.PI*a;case t.MoveDirection.bottomLeft:return Math.PI*M;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*M;case t.MoveDirection.inside:return Math.atan2(s.y-i.y,s.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-s.y,i.x-s.x);default:return A()*u}}function tt(t){const e=k.origin;return e.length=1,e.angle=t,e}function et(t,e,i,s){return k.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function it(t){return{x:(t.position?.x??A()*o)*t.size.width/o,y:(t.position?.y??A()*o)*t.size.height/o}}function st(t){const e={x:void 0!==t.position?.x?G(t.position.x):void 0,y:void 0!==t.position?.y?G(t.position.y):void 0};return it({size:t.size,position:e})}function nt(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}function ot(t){return t?t.endsWith("%")?parseFloat(t)/o:parseFloat(t):1}var at,rt;t.OutModeDirection=void 0,(at=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",at.left="left",at.right="right",at.top="top",t.PixelMode=void 0,(rt=t.PixelMode||(t.PixelMode={})).precise="precise",rt.percent="percent";function lt(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function ct(){return globalThis.document}function dt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function ht(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function ut(t,e){return t===e||E(e)&&e.includes(t)}function pt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(A()*t.length)]}function ft(t,e,i,s,n){return gt(mt(t,s??0),e,i,n)}function gt(e,i,s,n){let o=!0;return n&&n!==t.OutModeDirection.bottom||(o=e.top<i.height+s.x),!o||n&&n!==t.OutModeDirection.left||(o=e.right>s.x),!o||n&&n!==t.OutModeDirection.right||(o=e.left<i.width+s.y),!o||n&&n!==t.OutModeDirection.top||(o=e.bottom>s.y),o}function mt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function yt(t,...e){for(const i of e){if(L(i))continue;if(!F(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):F(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return F(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if(lt(t))continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if(lt(s))continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>yt(void 0,t)):yt(e[s],n)}}return t}function vt(t,e){return E(t)?t.map((t,i)=>e(t,i)):e(t,0)}function wt(t,e,i){return E(t)?pt(t,e,i):t}function bt(e,i){return function(e,i){if(e.mode!==t.PixelMode.percent){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/o*i.width,y:e.y/o*i.height}:{width:e.width/o*i.width,height:e.height/o*i.height}}(e,i)}function Mt(t){const e=ct().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||L(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const o=t.getPropertyPriority?.(s);o?e.setProperty(s,n,o):e.setProperty(s,n)}return e}let Pt,xt;function Ct(t){if(Pt!==t||!xt){Pt=t;const e=ct().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)}xt=e}return xt}function zt(t,e,i,s,n){if(s){let s={passive:!0};O(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 kt(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,n)),n}async function Ot(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class St{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var Dt;t.EventType=void 0,(Dt=t.EventType||(t.EventType={})).configAdded="configAdded",Dt.containerInit="containerInit",Dt.particlesSetup="particlesSetup",Dt.containerStarted="containerStarted",Dt.containerStopped="containerStopped",Dt.containerDestroyed="containerDestroyed",Dt.containerPaused="containerPaused",Dt.containerPlay="containerPlay",Dt.containerBuilt="containerBuilt",Dt.particleAdded="particleAdded",Dt.particleDestroyed="particleDestroyed",Dt.particleRemoved="particleRemoved";class It{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#o=new Set;#a=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#s.set(i,e),this.#n.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return Ot(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return Ot(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return kt(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#a&&!this.#r){this.#r=!0,this.#o=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#o,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#a=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#a)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#o,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const Ft=t=>(...e)=>{t(...e)},Et={debug:Ft(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:Ft(console.info),log:Ft(console.log),trace:Ft(console.trace),verbose:Ft(console.log),warning:Ft(console.warn)};function Lt(){return Et}const Rt="100%";class Tt{pluginManager=new It(this);#d=[];#h=new St;#a=!1;get items(){return this.#d}get version(){return"4.4.0"}addEventListener(t,e){this.#h.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#h.dispatchEvent(t,e)}async init(){this.#a||(await this.pluginManager.init(),this.#a=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return Dn}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:o,url:a}=t,r=a?await async function(t){const e=wt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Lt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:a,index:o}):t.options,l=wt(r,o),{items:c}=this,d=c.findIndex(t=>t.id.description===n),h=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(h);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(d>=0){const t=this.item(d),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(d,e,h)}else c.push(h);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=ct();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=Rt,s.style.height||=Rt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(g).item(0);n?(s=n,s.dataset[e]=f):(s=i.createElement(g),s.dataset[e]=p,t.appendChild(s)),s.style.width||=Rt,s.style.height||=Rt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=ct();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return h.canvas.loadCanvas(u),await h.start(),h}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#h.removeEventListener(t,e)}}var _t,At,Bt,Vt,Ut,Ht,Nt,$t,Gt,Wt,jt,qt,Xt;!function(t){t.circle="circle",t.rectangle="rectangle"}(_t||(_t={}));class Yt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Qt extends Yt{radius;constructor(t,e,i){super(t,e,_t.circle),this.radius=i}contains(t){return Z(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),o=Math.abs(i.y-e.y);if(t instanceof Qt||t.type===_t.circle){return s+t.radius>Math.hypot(n,o)}if(t instanceof Zt||t.type===_t.rectangle){const e=t,{width:i,height:a}=e.size;return Math.pow(n-i,2)+Math.pow(o-a,2)<=s**2||n<=s+i&&o<=s+a||n<=i||o<=a}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Zt extends Yt{size;constructor(t,e,i,s){super(t,e,_t.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 Zt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,o=t.size,a=o.width,r=o.height;return n.x<s.x+e&&n.x+a>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}t.RotateDirection=void 0,(At=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",At.counterClockwise="counter-clockwise",At.random="random",t.AnimationMode=void 0,(Bt=t.AnimationMode||(t.AnimationMode={})).auto="auto",Bt.increase="increase",Bt.decrease="decrease",Bt.random="random",t.HdrMode=void 0,(Vt=t.HdrMode||(t.HdrMode={})).standard="standard",Vt.natural="natural",Vt.vivid="vivid",Vt.cinematic="cinematic",Vt.dynamic="dynamic",t.LimitMode=void 0,(Ut=t.LimitMode||(t.LimitMode={})).delete="delete",Ut.wait="wait",t.OutMode=void 0,(Ht=t.OutMode||(t.OutMode={})).bounce="bounce",Ht.none="none",Ht.out="out",Ht.destroy="destroy",Ht.split="split",t.AlterType=void 0,(Nt=t.AlterType||(t.AlterType={})).darken="darken",Nt.enlighten="enlighten",t.DestroyType=void 0,($t=t.DestroyType||(t.DestroyType={})).none="none",$t.max="max",$t.min="min",t.GradientType=void 0,(Gt=t.GradientType||(t.GradientType={})).linear="linear",Gt.radial="radial",Gt.random="random",t.ParticleOutType=void 0,(Wt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Wt.inside="inside",Wt.outside="outside",t.StartValueType=void 0,(jt=t.StartValueType||(t.StartValueType={})).max="max",jt.min="min",jt.random="random",t.AnimationStatus=void 0,(qt=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",qt.decreasing="decreasing",t.DrawLayer=void 0,(Xt=t.DrawLayer||(t.DrawLayer={}))[Xt.BackgroundElement=0]="BackgroundElement",Xt[Xt.BackgroundDraw=1]="BackgroundDraw",Xt[Xt.BackgroundMask=2]="BackgroundMask",Xt[Xt.CanvasSetup=3]="CanvasSetup",Xt[Xt.PluginContent=4]="PluginContent",Xt[Xt.Particles=5]="Particles",Xt[Xt.CanvasCleanup=6]="CanvasCleanup",Xt[Xt.Foreground=7]="Foreground";class Kt{load(t){L(t)||this.doLoad(t)}}function Jt(t,...e){for(const i of e)t.load(i)}function te(t,e,i){void 0!==i&&(t[e]=i)}function ee(t,e,i){void 0!==i&&(t[e]=q(i))}function ie(t,e,i){void 0!==i&&t[e].load(i)}function se(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function ne(t,e,i,...s){const n=t;n[e]??=new i;const o=n[e];for(const t of s)o.load(t?.[e])}class oe extends Kt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){ee(this,"count",t.count),te(this,"enable",t.enable),ee(this,"speed",t.speed),ee(this,"decay",t.decay),ee(this,"delay",t.delay),te(this,"sync",t.sync)}}class ae extends oe{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),te(this,"mode",t.mode),te(this,"startValue",t.startValue)}}class re extends oe{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),te(this,"max",t.max),te(this,"min",t.min),ee(this,"offset",t.offset)}}class le extends Kt{h=new re(0,y);l=new re(0,w);s=new re(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class ce extends Kt{value="";static create(t,e){const i=new ce;return i.load(t),void 0!==e&&(S(e)||E(e)?i.load({value:e}):i.load(e)),i}doLoad(t){L(t.value)||(this.value=t.value)}}class de extends ce{animation=new le;static create(t,e){const i=new de;return i.load(t),void 0!==e&&(S(e)||E(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class he extends Kt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new ce,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),te(this,"element",t.element),te(this,"draw",t.draw),te(this,"image",t.image),te(this,"position",t.position),te(this,"repeat",t.repeat),te(this,"size",t.size),te(this,"opacity",t.opacity)}}class ue extends Kt{enable=!0;zIndex=0;doLoad(t){te(this,"enable",t.enable),te(this,"zIndex",t.zIndex)}}class pe extends Kt{enable=!0;mode=t.HdrMode.standard;peakNits=400;doLoad(e){if(void 0!==e.enable&&!O(e.enable))throw new Error(`Invalid HDR "enable" value: expected a boolean, got "${String(e.enable)}"`);if(void 0!==e.mode&&("string"!=typeof e.mode||!Object.values(t.HdrMode).includes(e.mode)))throw new Error(`Invalid HDR "mode" value: expected one of ${Object.values(t.HdrMode).join(", ")}, got "${i=e.mode,String(i)}"`);var i;if(void 0!==e.peakNits&&(!D(e.peakNits)||!Number.isFinite(e.peakNits)||e.peakNits<=0))throw new Error(`Invalid HDR "peakNits" value: expected a positive number, got "${String(e.peakNits)}"`);te(this,"enable",e.enable),te(this,"mode",e.mode),te(this,"peakNits",e.peakNits)}}class fe extends Kt{delay=.5;enable=!0;doLoad(t){te(this,"delay",t.delay),te(this,"enable",t.enable)}}class ge extends Kt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=yt(this.options[t]??{},i))}te(this,"close",t.close),te(this,"type",t.type)}}class me extends Kt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=de.create(this.color,t.color)),te(this,"enable",t.enable),ee(this,"opacity",t.opacity)}}class ye extends Kt{offset=0;value=90;doLoad(t){ee(this,"offset",t.offset),ee(this,"value",t.value)}}class ve extends Kt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){te(this,"x",t.x),te(this,"y",t.y),te(this,"mode",t.mode),te(this,"radius",t.radius)}}class we extends Kt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){ee(this,"acceleration",t.acceleration),te(this,"enable",t.enable),te(this,"inverse",t.inverse),ee(this,"maxSpeed",t.maxSpeed)}}class be extends Kt{value=0;doLoad(t){L(t.value)||(this.value=q(t.value))}}class Me extends be{animation=new oe;doLoad(t){super.doLoad(t),ie(this,"animation",t.animation)}}class Pe extends Me{animation=new ae}class xe extends Kt{clamp=!0;delay=new be;enable=!1;generator;options={};doLoad(t){te(this,"clamp",t.clamp),this.delay.load(t.delay),te(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=yt(this.options,t.options))}}class Ce extends Kt{bottom;default=t.OutMode.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class ze extends Kt{acceleration=0;enable=!1;position;doLoad(t){ee(this,"acceleration",t.acceleration),te(this,"enable",t.enable),t.position&&(this.position=yt({},t.position))}}class ke extends Kt{angle=new ye;center=new ve;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new we;outModes=new Ce;path=new xe;random=!1;size=!1;speed=2;spin=new ze;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(D(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),ee(this,"decay",t.decay),te(this,"direction",t.direction),void 0!==t.distance&&(this.distance=D(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),ee(this,"drift",t.drift),te(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(F(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),te(this,"random",t.random),te(this,"size",t.size),ee(this,"speed",t.speed),this.spin.load(t.spin),te(this,"straight",t.straight),te(this,"vibrate",t.vibrate),te(this,"warp",t.warp)}}class Oe extends Kt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=de.create(this.color,t.color)),ee(this,"width",t.width),ee(this,"opacity",t.opacity)}}class Se extends Kt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=de.create(this.color,t.color)),se(this,"fill",t.fill,()=>new me),se(this,"stroke",t.stroke,()=>new Oe)}}class De extends be{value=1}class Ie extends Kt{horizontal=new De;vertical=new De;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Fe extends Kt{enable=!1;height=1080;width=1920;doLoad(t){te(this,"enable",t.enable),te(this,"width",t.width),te(this,"height",t.height)}}class Ee extends Kt{mode=t.LimitMode.delete;value=0;doLoad(t){te(this,"mode",t.mode),te(this,"value",t.value)}}class Le extends Kt{density=new Fe;limit=new Ee;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),te(this,"value",t.value)}}class Re extends Kt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=yt(this.options[t]??{},i))}te(this,"close",t.close),te(this,"type",t.type)}}class Te extends be{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),te(this,"opacityRate",t.opacityRate),te(this,"sizeRate",t.sizeRate),te(this,"velocityRate",t.velocityRate)}}class _e extends Kt{bounce=new Ie;effect=new ge;groups={};move=new ke;number=new Le;paint;palette;reduceDuplicates=!1;shape=new Re;zIndex=new Te;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Se,this.paint.color=new de,this.paint.color.value="#fff",this.paint.fill=new me,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]=yt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(E(e)?this.paint=vt(e,t=>{const e=new Se;return e.load(t),e}):E(this.paint)?(this.paint=new Se,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(E(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function Ae(t,e,...i){const s=new _e(t,e);return Jt(s,...i),s}class Be extends Kt{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 he,this.fullScreen=new ue,this.hdr=new pe,this.particles=Ae(this.#p,this.#u),this.resize=new fe}doLoad(e){void 0!==e.preset&&(this.preset=e.preset,vt(this.preset,t=>{this.#g(t)})),void 0!==e.palette&&(this.palette=e.palette,this.#f(this.palette)),te(this,"autoPlay",e.autoPlay),te(this,"clear",e.clear),te(this,"key",e.key),te(this,"name",e.name),ee(this,"delay",e.delay),te(this,"detectRetina",e.detectRetina),ee(this,"duration",e.duration),te(this,"fpsLimit",e.fpsLimit);const i=e.hdr;O(i)?(this.hdr.enable=i,this.hdr.mode=t.HdrMode.standard,this.hdr.peakNits=400):this.hdr.load(i),te(this,"pauseOnBlur",e.pauseOnBlur),te(this,"pauseOnOutsideViewport",e.pauseOnOutsideViewport),te(this,"zLayers",e.zLayers),this.background.load(e.background);const s=e.fullScreen;O(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(e.particles),this.resize.load(e.resize),this.style=yt(this.style,e.style),te(this,"smooth",e.smooth),this.#p.plugins.forEach(t=>{t.loadOptions(this.#u,this,e)})}#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 Ve=new Map,Ue=1.15,He=1.05,Ne=.2126,$e=.7152,Ge=.0722;function We(t,e){let i=Ve.get(t);return i||(i=e(),Ve.size>2e3&&Ve.clear(),Ve.set(t,i)),i}function je(t){return H(t*(2.51*t+.03)/(t*(2.43*t+.59)+.14),0,1)}function qe(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Xe(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055}function Ye(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Qe(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return Ze(t,n.value,i,s);if(E(n.value)){const e=pt(n.value,i,s);if(!e)return;return Qe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Ze(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return n.value===d?oi():ti(t,n.value);if(E(n.value)){const e=pt(n.value,i,s);if(!e)return;return Ze(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ke(t,e,i,s=!0){const n=Qe(t,e,i,s);return n?Je(n):void 0}function Je(t){const e=t.r/m,i=t.g/m,s=t.b/m,n=Math.max(e,i,s),o=Math.min(e,i,s),r={h:0,l:(n+o)*a,s:0};return n!==o&&(r.s=r.l<a?(n-o)/(n+o):(n-o)/(2-n-o),r.h=e===n?(i-s)/(n-o):i===n?2+(s-e)/(n-o):4+(e-i)/(n-o)),r.l*=w,r.s*=v,r.h*=60,r.h<0&&(r.h+=y),r.h>=y&&(r.h-=y),r}function ti(t,e){return Ye(t,e)}function ei(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 ii(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),n=e/y,o=i/v,r=s/w;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const l=r<a?r*(1+o):r+o-r*o,c=2*r-l,d=1/3,h=Math.min(m,m*ei(c,l,n+d)),u=Math.min(m,m*ei(c,l,n)),p=Math.min(m,m*ei(c,l,n-d));return{r:Math.round(h),g:Math.round(u),b:Math.round(p)}}function si(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),n=e/y,o=i/v,r=s/w;if(0===i){const t=r*m;return{r:t,g:t,b:t}}const l=r<a?r*(1+o):r+o-r*o,c=2*r-l,d=1/3;return{r:Math.min(m,m*ei(c,l,n+d)),g:Math.min(m,m*ei(c,l,n)),b:Math.min(m,m*ei(c,l,n-d))}}function ni(t){const e=ii(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function oi(t,e){const i=t??0;if(e)return{r:B(i,m),g:B(i,m),b:B(i,m)};const s=()=>Math.floor(B(i,256));return{b:s(),g:s(),r:s()}}function ai(e,i,s,n,o){const a=i?4:2,r=s??1;return We(i?`rgb-${e.r.toFixed(a)}-${e.g.toFixed(a)}-${e.b.toFixed(a)}-hdr-${r.toString()}-${(n??P).toString()}-${o??t.HdrMode.standard}`:`rgb-${e.r.toFixed(a)}-${e.g.toFixed(a)}-${e.b.toFixed(a)}-sdr-${r.toString()}`,()=>i?function(e,i,s=400,n=t.HdrMode.standard){const o=s/203,a=function(e,i,s,n){const o=e.r/m,a=e.g/m,r=e.b/m;if(n!==t.HdrMode.natural&&n!==t.HdrMode.vivid&&n!==t.HdrMode.cinematic&&n!==t.HdrMode.dynamic)return{b:r,g:a,r:o};const l=Math.max(1,i),c=Ne*o+$e*a+Ge*r,d=function(t,e,i){if(t<=i)return je(t);const s=t+(t-i)*(e-1);return je(s)}(c,i,s),h=c>0?d/c:1;return function(e,i,s,n,o){switch(n){case t.HdrMode.vivid:{const t=(e+i+s)/3;return{b:H(H(t+(s-t)*Ue,0,o)*He,0,o),g:H(H(t+(i-t)*Ue,0,o)*He,0,o),r:H(H(t+(e-t)*Ue,0,o)*He,0,o)}}case t.HdrMode.cinematic:{const t=1.05*e,n=.95*s,a=(t+i+n)/3;return{b:H(a+1.1*(n-a),0,o),g:H(a+1.1*(i-a),0,o),r:H(a+1.1*(t-a),0,o)}}case t.HdrMode.dynamic:{const t=Ne*e+$e*i+Ge*s,n=Math.min(1,2*t),a=1-n,r=(e+i+s)/3,l=H(r+(e-r)*Ue,0,o)*He,c=H(r+(i-r)*Ue,0,o)*He,d=H(r+(s-r)*Ue,0,o)*He;return{b:H(s*a+d*n,0,o),g:H(i*a+c*n,0,o),r:H(e*a+l*n,0,o)}}case t.HdrMode.standard:case t.HdrMode.natural:default:return{b:s,g:i,r:e}}}(H(o*h,0,l),H(a*h,0,l),H(r*h,0,l),n,l)}(e,o,.18,n);return`color(display-p3 ${a.r.toString()} ${a.g.toString()} ${a.b.toString()} / ${(i??1).toString()})`}(e,s,n,o):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(e,s))}function ri(e,i,s,n,o){const a=i?4:2,r=s??1;return We(i?`hsl-${e.h.toFixed(a)}-${e.s.toFixed(a)}-${e.l.toFixed(a)}-hdr-${r.toString()}-${(n??P).toString()}-${o??t.HdrMode.standard}`:`hsl-${e.h.toFixed(a)}-${e.s.toFixed(a)}-${e.l.toFixed(a)}-sdr-${r.toString()}`,()=>i?ai(si(e),!0,s,n,o):`hsla(${e.h.toString()}, ${e.s.toString()}%, ${e.l.toString()}%, ${r.toString()})`)}function li(t,e,i,s,n){let o=t,a=e;if("r"in o||(o=n?si(t):ii(t)),"r"in a||(a=n?si(e):ii(e)),n){const t={b:qe(o.b/m),g:qe(o.g/m),r:qe(o.r/m)},e={b:qe(a.b/m),g:qe(a.g/m),r:qe(a.r/m)},n=i+s;return{b:Xe((t.b*i+e.b*s)/n)*m,g:Xe((t.g*i+e.g*s)/n)*m,r:Xe((t.r*i+e.r*s)/n)*m}}return{b:N(o.b,a.b,i,s),g:N(o.g,a.g,i,s),r:N(o.r,a.r,i,s)}}function ci(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function di(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:y},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:w}};return e&&(hi(s.h,e.h,i),hi(s.s,e.s,i),hi(s.l,e.l,i)),s}function hi(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=G(i.speed)/o*s,e.decay=1-G(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=G(i.count),e.time=0,e.delayTime=G(i.delay)*r,i.sync||(e.velocity*=A(),e.value*=A()),e.initialValue=e.value,e.offset=q(i.offset)):e.velocity=0}function ui(e,i,s,n){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const o=e.offset?$(e.offset):0,a=(e.velocity??0)*s.factor+3.6*o,r=e.decay??1,l=e.max,c=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=a,e.value<c&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=a,e.value>l&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=l)),e.velocity&&1!==r&&(e.velocity*=r),e.value=H(e.value,c,l)}function pi(t,e,i){if(!t)return;const{h:s,s:n,l:o}=t;ui(s,!1,e),ui(n,!0,e),ui(o,!0,e)}function fi(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const gi=function(){const t=globalThis.tsParticles;return t?.pluginManager?t:new Tt}();class mi{background;brightness;colors;gravity;minHeight;rate;saturation;sounds;speed;splitCount;constructor(){this.background="none",this.brightness={min:-30,max:30},this.colors=["#FF0000","#FF2A00","#FF5500","#FF8000","#FFAA00","#FFD400","#FFFF00","#D4FF00","#AAFF00","#80FF00","#55FF00","#2AFF00","#00FF00","#00FF2A","#00FF55","#00FF80","#00FFAA","#00FFD4","#00FFFF","#00D4FF","#00AAFF","#0080FF","#0055FF","#002AFF","#0000FF","#2A00FF","#5500FF","#8000FF","#AA00FF","#D400FF","#FF00FF","#FF00D4","#FF00AA","#FF0080","#FF0055","#FF002A"],this.gravity=30,this.minHeight={min:10,max:30},this.rate=10,this.saturation={min:-30,max:30},this.sounds=!0,this.speed={min:20,max:40},this.splitCount=100}load(t){L(t)||(void 0!==t.colors&&(E(t.colors)?this.colors=[...t.colors]:this.colors=t.colors),te(this,"background",t.background),ee(this,"brightness",t.brightness),ee(this,"gravity",t.gravity),ee(this,"minHeight",t.minHeight),ee(this,"rate",t.rate),ee(this,"saturation",t.saturation),te(this,"sounds",t.sounds),ee(this,"speed",t.speed),ee(this,"splitCount",t.splitCount))}}const yi=new Map;const vi=t=>{const e=t.data;return e?.particle?.options.move.gravity.enable??!1};async function wi(e,i,s,n){const o=yi.get(i);if(o instanceof Promise)return o;if(o){if(!o.destroyed)return o;yi.delete(i)}const a=(async()=>{const o=new mi;o.load(s);const a=function(e,i){return{detectRetina:!0,background:{color:e.background},blend:{enable:!0,mode:"lighter"},fullScreen:{enable:!i},fpsLimit:60,emitters:{direction:t.MoveDirection.top,life:{count:0,duration:.1,delay:.1},rate:{delay:D(e.rate)?1/e.rate:{min:1/W(e.rate),max:1/j(e.rate)},quantity:1},size:{width:100,height:0},position:{y:100,x:50}},particles:{number:{value:0},paint:{fill:{enable:!1},stroke:{color:{value:e.colors},width:2}},destroy:{mode:"split",bounds:{top:q(e.minHeight)},split:{count:1,factor:{value:.333333},rate:{value:e.splitCount},strokeColorOffset:{s:e.saturation,l:e.brightness},particles:{group:"split",number:{value:0},opacity:{value:{min:.1,max:1},animation:{enable:!0,speed:{min:2,max:4},sync:!0,startValue:t.StartValueType.max,destroy:t.DestroyType.min,count:1}},size:{value:{min:5,max:10}},life:{count:1,duration:{value:{min:.5,max:1}}},move:{decay:.05,enable:!0,gravity:{enable:!1},speed:{min:10,max:25},direction:"outside",outModes:t.OutMode.destroy}}}},life:{count:1},shape:{type:"line",options:{line:{cap:"round"}}},size:{value:{min:10,max:20}},rotate:{path:!0},move:{enable:!0,gravity:{acceleration:q(e.gravity),enable:!0,inverse:!0,maxSpeed:150},speed:q(e.speed),outModes:{default:t.OutMode.destroy,top:t.OutMode.none}}},sounds:{enable:e.sounds,events:[{event:t.EventType.particleRemoved,filter:vi,audio:["https://particles.js.org/audio/explosion0.mp3","https://particles.js.org/audio/explosion1.mp3","https://particles.js.org/audio/explosion2.mp3"]}],volume:50}}}(o,n),r=await e.load({id:i,element:n,options:a});if(!r)return void yi.delete(i);const{FireworksInstance:l}=await Promise.resolve().then(function(){return In}),c=new l(r,i);return yi.set(i,c),c})();return yi.set(i,a),a}class bi{enable=!1;mode="destination-out";load(t){L(t)||(te(this,"mode",t.mode),te(this,"enable",t.enable))}}class Mi{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Fn});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 bi),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new bi,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Pi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Mi)})}class xi{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(l.x,l.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=F(s)?{min:K(s.min),max:K(s.max)}:{min:0,max:K(s)}}}async function Ci(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new xi))})}var zi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(zi||(zi={}));const ki=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Oi=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Si{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(ki,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Oi.exec(e);return i?{a:i[zi.a]?Number.parseInt(i[zi.a],16)/255:1,b:Number.parseInt(i[zi.b]??"0",16),g:Number.parseInt(i[zi.g]??"0",16),r:Number.parseInt(i[zi.r]??"0",16)}:void 0}}async function Di(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Si)})}var Ii;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Ii||(Ii={}));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 Ei{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 ii(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ii({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?ni({a:e.length>4?ot(e[Ii.a]):1,h:Number.parseInt(e[Ii.h]??"0",10),l:Number.parseInt(e[Ii.l]??"0",10),s:Number.parseInt(e[Ii.s]??"0",10)}):void 0}}async function Li(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Ei)})}class Ri{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Ln});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Ti(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,Ot(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new Ri(t.pluginManager))})}function _i(e,i){const s=e.value,n=e.animation,o={delayTime:G(n.delay)*r,enable:n.enable,value:G(e.value)*i,max:j(s)*i,min:W(s)*i,loops:0,maxLoops:G(n.count),time:0};if(n.enable){switch(o.decay=1-G(n.decay),n.mode){case t.AnimationMode.increase:o.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:o.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:o.status=A()>=a?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:o.value=o.min,e&&(o.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:o.value=o.max,e&&(o.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:o.value=$(o),e&&(o.status=A()>=a?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return o.initialValue=o.value,o}function Ai(e,i,s,n,o){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const a=(i.velocity??0)*o.factor,r=i.min,l=i.max,c=i.decay??1;i.time??=0;const d=i.delayTime??0;if(!(d>0&&i.time<d&&(i.time+=o.value,i.time<d))){switch(i.status){case t.AnimationStatus.increasing:i.value+=a;break;case t.AnimationStatus.decreasing:i.value-=a}switch(i.velocity&&1!==c&&(i.velocity*=c),i.status){case t.AnimationStatus.increasing:i.value>=l&&(s?i.status=t.AnimationStatus.decreasing:i.value-=l,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(s?i.status=t.AnimationStatus.increasing:i.value+=l,i.loops??=0,i.loops++)}!function(e,i,s,n,o){switch(i){case t.DestroyType.max:s>=o&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,l),e.destroyed||(i.value=H(i.value,r,l))}}class Bi extends ae{destroy=t.DestroyType.none;load(t){super.load(t),L(t)||te(this,"destroy",t.destroy)}}class Vi extends Pe{animation=new Bi;value=1;load(t){if(L(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Ui{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=_i(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=G(i.speed)/o*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=A()))}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){ne(t,"opacity",Vi,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&Ai(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function Hi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Ui(t)))})}class Ni{modes;#u;#y;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#y=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;const o=this.#u;let a=!1;for(const t of this.#y)if(a=t.particleBounce?.(e,s,i)??!1,a)break;if(a)return;const r=e.getPosition(),l=e.offset,c=e.getRadius(),d=mt(r,c),h=o.canvas.size,u=!e.isInsideCanvasForOutMode(n,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.left&&e.direction!==t.OutModeDirection.right)return;e.bounds.right<0&&e.direction===t.OutModeDirection.left?e.particle.position.x=e.size+e.offset.x:e.bounds.left>e.canvasSize.width&&e.direction===t.OutModeDirection.right&&(e.particle.position.x=e.canvasSize.width-e.size-e.offset.x);const i=e.particle.velocity.x;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.right&&i>0||e.direction===t.OutModeDirection.left&&i<0)){const t=G(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,s=!0}if(!s)return;const n=e.offset.x+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-n:e.outOfCanvas&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:d,canvasSize:h,offset:l,outOfCanvas:u,size:c}),function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.bottom&&e.direction!==t.OutModeDirection.top)return;e.bounds.bottom<0&&e.direction===t.OutModeDirection.top?e.particle.position.y=e.size+e.offset.y:e.bounds.top>e.canvasSize.height&&e.direction===t.OutModeDirection.bottom&&(e.particle.position.y=e.canvasSize.height-e.size-e.offset.y);const i=e.particle.velocity.y;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.bottom&&i>0||e.direction===t.OutModeDirection.top&&i<0)){const t=G(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,s=!0}if(!s)return;const n=e.offset.y+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-n:e.outOfCanvas&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:d,canvasSize:h,offset:l,outOfCanvas:u,size:c})}}class $i{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(this.modes.includes(n)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(n,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=X(e.position,e.moveCenter),{x:s,y:n}=e.velocity;if(s<0&&t>e.moveCenter.radius||n<0&&i>e.moveCenter.radius||s>=0&&t<-e.moveCenter.radius||n>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class Gi{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,s,n){if(!this.modes.includes(n))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const o=e.options.move.gravity,a=this.#u,r=a.canvas.size,c=e.getRadius();if(o.enable){const s=e.position;(!o.inverse&&s.y>r.height+c&&i===t.OutModeDirection.bottom||o.inverse&&s.y<-c&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+c||e.velocity.y<0&&e.position.y>=-c||e.velocity.x>0&&e.position.x<=r.width+c||e.velocity.x<0&&e.position.x>=-c)return;ft(e.position,a.canvas.size,l,c,i)||e.destroy()}}}const Wi=k.origin;class ji{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const o=this.#u;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;Wi.setTo(l),Wi.length=e.moveCenter.radius,Wi.angle=e.velocity.angle+Math.PI,Wi.addTo(e.moveCenter);const{dx:s,dy:n}=X(e.position,Wi);if(t<=0&&s>=0||i<=0&&n>=0||t>=0&&s<=0||i>=0&&n<=0)return;e.position.x=Math.floor($({min:0,max:o.canvas.size.width})),e.position.y=Math.floor($({min:0,max:o.canvas.size.height}));const{dx:a,dy:r}=X(e.position,e.moveCenter);e.direction=Math.atan2(-r,-a),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(e.isInsideCanvasForOutMode(n,i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor($({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor($({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=X(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction),e.justWarped=!0;break}case t.ParticleOutType.normal:{const s=e.options.move.warp,n=o.canvas.size,a={bottom:n.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:n.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),l=mt(e.position,r);i===t.OutModeDirection.right&&l.left>n.width+e.offset.x?(e.position.x=a.left,e.initialPosition.x=e.position.x,s||(e.position.y=A()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0):i===t.OutModeDirection.left&&l.right<-e.offset.x&&(e.position.x=a.right,e.initialPosition.x=e.position.x,s||(e.position.y=A()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0),i===t.OutModeDirection.bottom&&l.top>n.height+e.offset.y?(s||(e.position.x=A()*n.width,e.initialPosition.x=e.position.x),e.position.y=a.top,e.initialPosition.y=e.position.y,e.justWarped=!0):i===t.OutModeDirection.top&&l.bottom<-e.offset.y&&(s||(e.position.x=A()*n.width,e.initialPosition.x=e.position.x),e.position.y=a.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0);break}}}}}class qi{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#v(e,t.OutMode.bounce,t=>new Ni(t)),this.#v(e,t.OutMode.out,t=>new ji(t)),this.#v(e,t.OutMode.destroy,t=>new $i(t)),this.#v(e,t.OutMode.none,t=>new Gi(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#w(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#w(e,i,s.left??s.default,t.OutModeDirection.left),this.#w(e,i,s.right??s.default,t.OutModeDirection.right),this.#w(e,i,s.top??s.default,t.OutModeDirection.top)}#v(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#w(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function Xi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new qi(t)))})}class Yi{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=wt(i.paint,t.id,i.reduceDuplicates),n=s?.color,o=n??void 0,a=s?.fill,r=s?.stroke;if(a){const i=de.create(void 0===o?void 0:de.create(void 0,o),a.color);t.fillEnabled=a.enable,t.fillOpacity=G(a.opacity),t.fillAnimation=i.animation;const s=Ke(this.#p,i);s&&(t.fillColor=di(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=de.create(void 0===o?void 0:de.create(void 0,o),r.color);t.strokeWidth=G(r.width)*e.retina.pixelRatio,t.strokeOpacity=G(r.opacity??1),t.strokeAnimation=i.animation;const s=Ke(this.#p,i)??t.getFillColor();s&&(t.strokeColor=di(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,o=!!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),a=!!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&&(o||a)}update(t,e){this.isEnabled(t)&&(pi(t.fillColor,e,this.#u.hdr),pi(t.strokeColor,e,this.#u.hdr))}}async function Qi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Yi(t.pluginManager,e)))})}var Zi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Zi||(Zi={}));const Ki=/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 Ji{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=Ki.exec(t);return e?{a:e.length>4?ot(e[Zi.a]):1,b:parseInt(e[Zi.b]??"0",10),g:parseInt(e[Zi.g]??"0",10),r:parseInt(e[Zi.r]??"0",10)}:void 0}}async function ts(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Ji)})}class es extends ae{destroy=t.DestroyType.none;load(t){super.load(t),L(t)||te(this,"destroy",t.destroy)}}class is extends Pe{animation=new es;value=3;load(t){if(super.load(t),L(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class ss{#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/o*e.retina.reduceFactor,s.sync||(t.size.velocity*=A()))}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){ne(t,"size",is,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=_i(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&&Ai(t,t.size,!0,t.options.size.animation.destroy,e)}}async function ns(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new ss(t)))})}async function os(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{await Promise.all([Pi(t),Di(t),Li(t),ts(t),Ti(t),Ci(t),Qi(t),Hi(t),Xi(t),ns(t)])})}class as{bottom;left;right;top;load(t){L(t)||(ee(this,"bottom",t.bottom),ee(this,"left",t.left),ee(this,"right",t.right),ee(this,"top",t.top))}}var rs;!function(t){t.explode="explode",t.none="none",t.split="split"}(rs||(rs={}));class ls{maxSizeFactor=3;speed=2;load(t){L(t)||(te(this,"maxSizeFactor",t.maxSizeFactor),te(this,"speed",t.speed))}}class cs extends be{value=3}class ds extends be{value={min:4,max:9}}class hs{count=1;factor=new cs;fillColor;fillColorOffset;particles;rate=new ds;sizeOffset=!0;strokeColor;strokeColorOffset;load(t){L(t)||(void 0!==t.fillColor&&(this.fillColor=ce.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=ce.create(this.strokeColor,t.strokeColor)),te(this,"count",t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=vt(t.particles,t=>yt({},t)),te(this,"sizeOffset",t.sizeOffset),t.fillColorOffset&&(this.fillColorOffset=this.fillColorOffset??{},void 0!==t.fillColorOffset.h&&(this.fillColorOffset.h=t.fillColorOffset.h),void 0!==t.fillColorOffset.s&&(this.fillColorOffset.s=t.fillColorOffset.s),void 0!==t.fillColorOffset.l&&(this.fillColorOffset.l=t.fillColorOffset.l)),t.strokeColorOffset&&(this.strokeColorOffset=this.strokeColorOffset??{},void 0!==t.strokeColorOffset.h&&(this.strokeColorOffset.h=t.strokeColorOffset.h),void 0!==t.strokeColorOffset.s&&(this.strokeColorOffset.s=t.strokeColorOffset.s),void 0!==t.strokeColorOffset.l&&(this.strokeColorOffset.l=t.strokeColorOffset.l)))}}class us{bounds=new as;explode=new ls;mode=rs.none;split=new hs;load(t){L(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.explode.load(t.explode),this.split.load(t.split))}}function ps(t,e,i,s){return t&&s?function(t,e){const i=G(e.h??0),s=G(e.s??0),n=G(e.l??0),o=(t.h+i)%360,a=Math.max(0,Math.min(100,t.s+s)),r=Math.max(0,Math.min(100,t.l+n));return de.create(void 0,{value:{hsl:{h:o<0?o+360:o,s:a,l:r}}})}(s,t):e?de.create(void 0,e):i?de.create(void 0,i):s?function(t){return de.create(void 0,{value:{hsl:t}})}(s):void 0}function fs(e,i,s,n){const o=s.options.destroy;if(!o)return;const a=o.split,r=Ae(e,i,s.options),l=wt(a.fillColor),c=wt(a.strokeColor),d=s.getFillColor(),h=s.getStrokeColor();r.move.load({center:{x:s.position.x,y:s.position.y,mode:t.PixelMode.precise}});const u=1/G(a.factor.value),p=r.size;p&&(D(p.value)?p.value*=u:(p.value.min*=u,p.value.max*=u)),r.load(n);const f=wt(r.paint),g=f?.fill,m=f?.stroke,y=ps(a.fillColorOffset,l,g?.color,d),v=ps(a.strokeColorOffset,c,m?.color,h);y&&g&&(g.color=y),v&&m&&(m.color=v);const w=a.sizeOffset?q(-s.size.value,s.size.value):0,b={x:s.position.x+$(w),y:s.position.y+$(w)};return i.particles.addParticle(b,r,s.group,t=>!(t.size.value<.5)&&(t.velocity.length=$(q(s.velocity.length,t.velocity.length)),t.splitCount=(s.splitCount??0)+1,t.unbreakable=!0,t.unbreakableUntil=performance.now()+500,!0))}class gs{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options.destroy;if(!i)return;t.exploding=void 0,t.splitCount=0;const s=i.bounds;t.destroyBounds??={};const{bottom:n,left:a,right:r,top:l}=s,{destroyBounds:c}=t,d=e.canvas.size;n&&(c.bottom=G(n)*d.height/o),a&&(c.left=G(a)*d.width/o),r&&(c.right=G(r)*d.width/o),l&&(c.top=G(l)*d.height/o)}isEnabled(t){const e=t;return!e.destroyed||!!e.exploding}loadOptions(t,...e){ne(t,"destroy",us,...e)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;switch(i?.mode){case rs.split:!function(t,e,i){const s=i.options.destroy;if(!s)return;const n=s.split;if(n.count>=0){if(void 0===i.splitCount||i.splitCount>n.count)return;i.splitCount++}const o=G(n.rate.value),a=wt(n.particles);for(let s=0;s<o;s++)fs(t,e,i,a)}(this.#p,this.#u,t);break;case rs.explode:{if(t.exploding){t.destroyed=!1;break}const{explode:e}=i,s=t.size.value,n=s*e.maxSizeFactor,o=t.getOpacity();t.exploding={initialFillOpacity:o.fillOpacity,initialSize:s,initialStrokeOpacity:o.strokeOpacity,maxSize:n,progress:0,speed:Math.max(e.speed,.01)},t.fillOpacity=o.fillOpacity,t.strokeOpacity=o.strokeOpacity,t.destroyed=!1;break}}}update(t,e){if(t.exploding){const i=t.exploding,s=e.factor||1;i.progress=Math.min(1,i.progress+i.speed*s/60);const n=i.progress;return t.size.value=i.initialSize+(i.maxSize-i.initialSize)*n,t.fillOpacity=i.initialFillOpacity*(1-n),t.strokeOpacity=i.initialStrokeOpacity*(1-n),void(n>=1&&(t.exploding=void 0,t.destroy(!0)))}void 0!==t.unbreakableUntil&&performance.now()>=t.unbreakableUntil&&(t.unbreakable=!1,t.unbreakableUntil=void 0);const i=t.getPosition(),s=t.destroyBounds;s&&(void 0!==s.bottom&&i.y>=s.bottom||void 0!==s.left&&i.x<=s.left||void 0!==s.right&&i.x>=s.right||void 0!==s.top&&i.y<=s.top)&&t.destroy()}}async function ms(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("destroy",e=>Promise.resolve(new gs(t.pluginManager,e)))})}class ys{count;delay;duration;wait=!1;load(t){L(t)||(te(this,"count",t.count),ee(this,"delay",t.delay),ee(this,"duration",t.duration),te(this,"wait",t.wait))}}class vs{delay=.1;quantity=1;load(t){L(t)||(ee(this,"quantity",t.quantity),ee(this,"delay",t.delay))}}class ws{color=!1;opacity=!1;load(t){L(t)||(te(this,"color",t.color),te(this,"opacity",t.opacity))}}class bs{options={};replace=new ws;type="square";load(t){L(t)||(void 0!==t.options&&(this.options=yt({},t.options??{})),this.replace.load(t.replace),te(this,"type",t.type))}}class Ms{height=0;mode=t.PixelMode.percent;width=0;load(t){L(t)||(te(this,"mode",t.mode),te(this,"height",t.height),te(this,"width",t.width))}}class Ps{fill;stroke;load(t){L(t)||(t.fill&&(this.fill??=new me,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new Oe,this.stroke.load(t.stroke)))}}class xs{autoPlay=!0;direction;domId;fill=!0;life=new ys;name;particles;position;rate=new vs;shape=new bs;size;spawn=new Ps;spawnFillColor;spawnStrokeColor;startCount=0;load(t){L(t)||(te(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new Ms,this.size.load(t.size)),te(this,"direction",t.direction),te(this,"domId",t.domId),te(this,"fill",t.fill),this.life.load(t.life),te(this,"name",t.name),this.particles=vt(t.particles,t=>yt({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=q(t.position.x)),void 0!==t.position.y&&(this.position.y=q(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new de,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new de,this.spawnStrokeColor.load(t.spawnStrokeColor)),te(this,"startCount",t.startCount))}}class Cs{id="emitters";#b;constructor(t){this.#b=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return Rn});return new e(this.#b,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=vt(i.emitters,t=>{const e=new xs;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return E(e)&&!!e.length||void 0!==e}}const zs=new WeakMap;class ks{fill;options;position;size;constructor(t,e,i,s){this.position=t,this.size=e,this.fill=i,this.options=s}resize(t,e){this.position=t,this.size=e}}var Os;async function Ss(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=zs.get(e);return i||(i=Promise.resolve().then(function(){return Vn}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw zs.delete(e),t}),zs.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return _n}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new Cs(e))})}!function(t){t.emitter="emitter"}(Os||(Os={}));var Ds;function Is(t,e){return t+e*(A()-a)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}(Ds||(Ds={}));class Fs extends ks{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:Is(e.x,i.width),y:Is(e.y,i.height)}};{const t=i.width*a,s=i.height*a,n=function(t){return Math.floor(A()*t)}(4),o=2*(A()-a);switch(n){case Ds.TopLeft:return{position:{x:e.x+o*t,y:e.y-s}};case Ds.TopRight:return{position:{x:e.x-t,y:e.y+o*s}};case Ds.BottomRight:return{position:{x:e.x+o*t,y:e.y+s}};case Ds.BottomLeft:default:return{position:{x:e.x+t,y:e.y+o*s}}}}}}class Es{generate(t,e,i,s,n){return new Fs(e,i,s,n)}}async function Ls(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{!function(t){if(!t.pluginManager.addEmitterShapeGenerator)throw new Error("tsParticles Emitters Plugin is not loaded")}(t),t.pluginManager.addEmitterShapeGenerator?.("square",new Es)})}class Rs extends be{sync=!1;load(t){L(t)||(super.load(t),te(this,"sync",t.sync))}}class Ts extends be{sync=!1;load(t){L(t)||(super.load(t),te(this,"sync",t.sync))}}class _s{count=0;delay=new Rs;duration=new Ts;load(t){L(t)||(te(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class As{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const s=i.delay.sync?1:A(),n=i.duration.sync?1:A();t.life={delay:e.retina.reduceFactor?G(i.delay.value)*s/e.retina.reduceFactor*r:0,delayTime:0,duration:e.retina.reduceFactor?G(i.duration.value)*n/e.retina.reduceFactor*r:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){ne(t,"life",_s,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const o=q(0,i.width),a=q(0,i.width);t.position.x=$(o),t.position.y=$(a),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const l=t.options.life;l&&(s.delay=G(l.delay.value)*r,s.duration=G(l.duration.value)*r)}(t,e,this.#u.canvas.size)}}async function Bs(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new As(t)))})}class Vs{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.shapeData;e.moveTo(-s,0),e.lineTo(s,0),e.lineCap=n?.cap??"butt"}(t)}getSidesCount(){return 1}}async function Us(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["line"],()=>Promise.resolve(new Vs))})}class Hs{decay=0;enable=!1;speed=0;sync=!1;load(t){L(t)||(te(this,"enable",t.enable),ee(this,"speed",t.speed),ee(this,"decay",t.decay),te(this,"sync",t.sync))}}class Ns extends be{animation=new Hs;direction=t.RotateDirection.clockwise;path=!1;load(t){L(t)||(super.load(t),te(this,"direction",t.direction),this.animation.load(t.animation),te(this,"path",t.path))}}class $s{#u;constructor(t){this.#u=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:K(G(i.value)),min:0,max:u},e.pathRotation=i.path;let s=i.direction;if(s===t.RotateDirection.random){s=Math.floor(2*A())>0?t.RotateDirection.counterClockwise:t.RotateDirection.clockwise}switch(s){case t.RotateDirection.counterClockwise:case"counterClockwise":e.rotate.status=t.AnimationStatus.decreasing;break;case t.RotateDirection.clockwise:e.rotate.status=t.AnimationStatus.increasing}const n=i.animation;n.enable&&(e.rotate.decay=1-G(n.decay),e.rotate.velocity=G(n.speed)/360*this.#u.retina.reduceFactor,n.sync||(e.rotate.velocity*=A())),e.rotation=e.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){ne(t,"rotate",Ns,...e)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(Ai(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function Gs(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new $s(t)))})}const Ws="pointerdown",js="touchstart";class qs{loop=!1;source="";load(t){L(t)||(F(t)?(te(this,"loop",t.loop),void 0!==t.source&&(this.source=t.source)):this.source=t)}}class Xs{duration=500;value=[];load(t){L(t)||(te(this,"duration",t.duration),te(this,"value",t.value))}}class Ys{loop=!1;melodies=[];notes=[];load(t){L(t)||(te(this,"loop",t.loop),void 0!==t.melodies&&(this.melodies=t.melodies.map(t=>{const e=new Ys;return e.load(t),e})),void 0!==t.notes&&(this.notes=t.notes.map(t=>{const e=new Xs;return e.load(t),e})))}}class Qs{audio;event=[];filter;melodies;notes=[];load(t){if(!L(t)&&(te(this,"event",t.event),void 0!==t.audio&&(E(t.audio)?this.audio=t.audio.map(t=>{const e=new qs;return e.load(t),e}):(this.audio=new qs,this.audio.load(t.audio))),void 0!==t.notes&&(this.notes=t.notes.map(t=>{const e=new Xs;return e.load(t),e})),void 0!==t.melodies&&(this.melodies=t.melodies.map(t=>{const e=new Ys;return e.load(t),e})),t.filter))if(S(t.filter)){const e=globalThis[t.filter];I(e)&&(this.filter=e)}else this.filter=t.filter}}class Zs{height=24;path;style="";svg;width=24;load(t){L(t)||(te(this,"path",t.path),te(this,"svg",t.svg),te(this,"width",t.width),te(this,"height",t.height))}}class Ks{enable;mute;unmute;volumeDown;volumeUp;constructor(){this.mute=new Zs,this.unmute=new Zs,this.volumeDown=new Zs,this.volumeUp=new Zs,this.enable=!1,this.mute.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M19.707,5.293c-0.391-0.391-1.023-0.391-1.414,0l-1.551,1.551c-0.345-0.688-0.987-1.02-1.604-1.02c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.237,0.754,2.302,1.826,2.76l-1.533,1.533c-0.391,0.391-0.391,1.023,0,1.414C5.488,19.902,5.744,20,6,20s0.512-0.098,0.707-0.293l2.527-2.527c0.697,0.174,1.416,0.455,1.875,0.762l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V9.414l2.707-2.707C20.098,6.316,20.098,5.684,19.707,5.293z M14.891,7.941c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8v1.293l-2,2V9.202L14.891,7.941z M7,12c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v2.439l-2.83,2.83C8.757,15.046,8.356,15,8,15c-0.552,0-1-0.448-1-1V12z M10.301,15.406L12,13.707v2.439C11.519,15.859,10.925,15.604,10.301,15.406z M14.994,18.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798v-4.091l2-2V18C15,18.046,14.998,18.086,14.994,18.12z"/>\n </g>\n</svg>',this.unmute.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M17.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C12.357,8.561,10.904,9,10,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C18.035,20.176,19,19.495,19,18V8C19,6.505,18.035,5.824,17.138,5.824z M14,16.146C12.907,15.495,11.211,15,10,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146V16.146z M17,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L15,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C16.998,7.914,17,7.954,17,8V18z"/>\n </g>\n</svg>',this.volumeDown.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M15.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V8C17,6.505,16.035,5.824,15.138,5.824z M8,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C10.907,15.495,9.211,15,8,15z M15,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8V18z"/>\n <path fill="#fff" d="M18.292,10.294c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C18.488,15.902,18.744,16,19,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708s-0.398-1.984-1.123-2.707C19.317,9.903,18.683,9.901,18.292,10.294z"/>\n </g>\n</svg>',this.volumeUp.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M16.706,10.292c-0.389-0.389-1.023-0.391-1.414,0.002c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C15.488,15.902,15.744,16,16,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708S17.431,11.015,16.706,10.292z"/>\n <path fill="#fff" d="M18.706,8.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c0.879,0.877,1.363,2.044,1.364,3.287c0.001,1.246-0.484,2.417-1.365,3.298c-0.391,0.391-0.391,1.023,0,1.414C17.488,17.902,17.744,18,18,18s0.512-0.098,0.707-0.293c1.259-1.259,1.952-2.933,1.951-4.713C20.657,11.217,19.964,9.547,18.706,8.292z"/>\n <path fill="#fff" d="M20.706,6.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c1.412,1.409,2.191,3.285,2.192,5.284c0.002,2.002-0.777,3.885-2.193,5.301c-0.391,0.391-0.391,1.023,0,1.414C19.488,19.902,19.744,20,20,20s0.512-0.098,0.707-0.293c1.794-1.794,2.781-4.18,2.779-6.717C23.485,10.457,22.497,8.078,20.706,6.292z"/>\n <path fill="#fff" d="M12.138,5.824c-0.449,0-0.905,0.152-1.356,0.453L8.109,8.059C7.357,8.561,5.904,9,5,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C13.035,20.176,14,19.495,14,18V8C14,6.505,13.035,5.824,12.138,5.824z M5,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C7.907,15.495,6.211,15,5,15z M12,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L10,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C11.998,7.914,12,7.954,12,8V18z"/>\n </g>\n</svg>'}load(t){L(t)||(te(this,"enable",t.enable),this.mute.load(t.mute),this.unmute.load(t.unmute),this.volumeDown.load(t.volumeDown),this.volumeUp.load(t.volumeUp))}}class Js{max=100;min=0;step=10;value=100;load(t){L(t)||(F(t)?(te(this,"max",t.max),te(this,"min",t.min),te(this,"step",t.step),void 0!==t.value&&(this.value=t.value)):this.value=t)}}class tn{autoPlay=!0;enable=!1;events=[];icons=new Ks;volume=new Js;load(t){L(t)||(te(this,"autoPlay",t.autoPlay),te(this,"enable",t.enable),void 0!==t.events&&(this.events=t.events.map(t=>{const e=new Qs;return e.load(t),e})),this.icons.load(t.icons),void 0!==t.volume&&this.volume.load(t.volume))}}const en=new Map;function sn(t){const e=/(([A-G]b?)(\d))|pause/i.exec(t);if(!e?.length)return;const i=e[2]??e[0],s=en.get(i);return s?s[parseInt(e[3]??"0")]:void 0}en.set("C",[16.35,32.7,65.41,130.81,261.63,523.25,1046.5,2093,4186.01]),en.set("Db",[17.32,34.65,69.3,138.59,277.18,554.37,1108.73,2217.46,4434.92]),en.set("D",[18.35,36.71,73.42,146.83,293.66,587.33,1174.66,2349.32,4698.63]),en.set("Eb",[19.45,38.89,77.78,155.56,311.13,622.25,1244.51,2489.02,4978.03]),en.set("E",[20.6,41.2,82.41,164.81,329.63,659.25,1318.51,2637.02,5274.04]),en.set("F",[21.83,43.65,87.31,174.61,349.23,698.46,1396.91,2793.83,5587.65]),en.set("Gb",[23.12,46.25,92.5,185,369.99,739.99,1479.98,2959.96,5919.91]),en.set("G",[24.5,49,98,196,392,783.99,1567.98,3135.96,6271.93]),en.set("Ab",[25.96,51.91,103.83,207.65,415.3,830.61,1661.22,3322.44,6644.88]),en.set("A",[27.5,55,110,220,440,880,1760,3520,7040]),en.set("Bb",[29.14,58.27,116.54,233.08,466.16,932.33,1864.66,3729.31,7458.62]),en.set("B",[30.87,61.74,123.47,246.94,493.88,987.77,1975.53,3951.07,7902.13]),en.set("pause",[0]);let nn=!0;const on=()=>nn,an=()=>{nn=!1},rn=()=>{removeEventListener(Ws,rn),removeEventListener(js,rn),an()};class ln{id="sounds";#n;constructor(t){this.#n=t;const e={capture:!0,once:!0};addEventListener(Ws,rn,e),addEventListener(js,rn,e)}async getPlugin(t){const{SoundsPluginInstance:e}=await Promise.resolve().then(function(){return Nn});return new e(t,this.#n)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.sounds;void 0===s?.load&&(e.sounds=s=new tn),s.load(i?.sounds)}needsPlugin(t){return t?.sounds?.enable??!1}}async function cn(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new ln(t))})}let dn=null;async function hn(t){return dn||(dn=async function(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{await Promise.all([os(t),Us(t),Pi(t),(async t=>{await Ss(t),await Ls(t)})(t),cn(t),Gs(t),ms(t),Bs(t),Qi(t)])})}(t),dn)}async function un(t,e){let i,s;return await hn(gi),S(t)?(i=t,s=e??{}):(i="fireworks",s=t??{}),wi(gi,i,s)}un.create=async(t,e)=>{await hn(gi);return wi(gi,t?.id??"fireworks",e??{},t??void 0)},un.init=async()=>{await hn(gi)},un.version="4.4.0",globalThis.fireworks=un;const pn=globalThis;pn.fireworks=un,pn.tsParticles=gi;function fn(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class gn{#M;#P;#x;#C;#z;#u;#k;#O;#S;#D;#I;#F;#p;#E;#L;#R={};#T=[void 0,void 0];#_={};constructor(t,e,i){this.#p=t,this.#u=e,this.#C=i,this.#k=null,this.#M=null,this.#P=new Set,this.#L=[],this.#E=[],this.#x=[],this.#z=[],this.#S=[],this.#D=[],this.#I=[],this.#F={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#O}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(l.x,l.y,this.#C.size.width,this.#C.size.height)})}clear(){for(const t of this.#x)if(t.canvasClear?.())return;for(const e of Object.values(t.DrawLayer))if("number"==typeof e)for(const t of this.#A(e))if(t.canvasClear?.())return;this.canvasClear()}destroy(){this.stop(),this.#M=null,this.#P.clear(),this.#L=[],this.#E=[],this.#x=[],this.#z=[],this.#S=[],this.#D=[],this.#I=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#F[e]=[])}draw(t){const e=this.#k;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[o,a]=this.#B(t);if(o??=s,a??=n,!o&&!a)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:d,opacity:h,strokeOpacity:u}=t.getOpacity(),p=this.#_,f=this.#R,g=o?ri(o,r.hdr,d*h,r.peakNits,r.hdrMode):void 0,m=a?ri(a,r.hdr,u*h,r.peakNits,r.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.#I)i.drawParticleSetup?.(s,t,e);this.#V(s,t,i,h,f,p),this.#U({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:h,transform:p}),this.#H(t);for(const i of this.#D)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#S)this.#N(i,s,t,e)})}drawParticles(e){const{particles:i,actualOptions:s}=this.#u;this.clear(),i.update(e),this.draw(n=>{const o=this.#C.size.width,a=this.#C.size.height;if(this.#M)try{n.drawImage(this.#M,l.x,l.y,o,a)}catch{this.#$("background-element-draw-error","Error drawing background element onto canvas")}const r=s.background;if(r.draw)try{r.draw(n,e)}catch{this.#$("background-draw-error","Error in background.draw callback")}for(const e of this.#A(t.DrawLayer.BackgroundMask))e.canvasPaint?.();for(const i of this.#A(t.DrawLayer.CanvasSetup))i.drawSettingsSetup?.(n,e);for(const i of this.#A(t.DrawLayer.PluginContent))i.draw?.(n,e);i.drawParticles(e);for(const i of this.#A(t.DrawLayer.CanvasCleanup))i.clearDraw?.(n,e),i.drawSettingsCleanup?.(n,e)})}init(){this.initUpdaters(),this.initPlugins(),this.#G(),this.paint()}initPlugins(){this.#x=[],this.#z=[],this.#S=[],this.#I=[],this.#D=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#F[e]=[]);for(const e of this.#u.plugins)(e.particleFillColor??e.particleStrokeColor)&&this.#z.push(e),e.drawParticle&&this.#S.push(e),e.drawParticleSetup&&this.#I.push(e),e.drawParticleCleanup&&this.#D.push(e),e.canvasClear&&this.#x.push(e),e.canvasPaint&&this.#A(t.DrawLayer.BackgroundMask).push(e),e.drawSettingsSetup&&this.#A(t.DrawLayer.CanvasSetup).push(e),e.draw&&this.#A(t.DrawLayer.PluginContent).push(e),(e.clearDraw??e.drawSettingsCleanup)&&this.#A(t.DrawLayer.CanvasCleanup).push(e)}initUpdaters(){this.#L=[],this.#E=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#E.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#L.push(t)}paint(){let e=!1;for(const i of this.#A(t.DrawLayer.BackgroundMask))if(e=i.canvasPaint?.()??!1,e)break;e||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(l.x,l.y,this.#C.size.width,this.#C.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,l.x,l.y,this.#C.size.width,this.#C.size.height),i.globalAlpha=s})}setContext(t){this.#k=t,this.#k&&(this.#k.globalCompositeOperation=i)}setContextSettings(t){this.#O=t}stop(){this.draw(t=>{t.clearRect(l.x,l.y,this.#C.size.width,this.#C.size.height)})}#H(t){for(const e of this.#E)e.afterDraw?.(t)}#V(t,e,i,s,n,o){for(const a of this.#L){if(a.getColorStyles){const{fill:o,stroke:r}=a.getColorStyles(e,t,i,s);o&&(n.fill=o),r&&(n.stroke=r)}if(a.getTransformValues){const t=a.getTransformValues(e);for(const e in t)fn(o,t,e)}a.beforeDraw?.(e)}}#W(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)}#U(t){const{container:e,context:i,particle:s,delta:n,colorStyles:o,radius:a,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:d}=e,h=s.getPosition(),u=s.getTransformData(l),p={x:h.x,y:h.y};i.setTransform(u.a,u.b,u.c,u.d,h.x,h.y),o.fill&&(i.fillStyle=o.fill);const f=!!s.fillEnabled,g=s.strokeWidth??0;i.lineWidth=g,o.stroke&&(i.strokeStyle=o.stroke);const m={context:i,particle:s,radius:a,drawRadius:1*a,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:f,stroke:g>0,transformData:u,position:{...h},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?d.get(s.shape):void 0;this.#j(y,m),this.#q(v,m),this.#X(v,m),this.#Y(v,m),this.#W(y,m),i.resetTransform()}#N(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#X(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:o}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),o&&i.stroke())}#Y(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#q(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#A(t){return this.#F[t]}#B(t){let e,i;for(const s of this.#z)if(!e&&s.particleFillColor&&(e=Ke(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ke(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#T[0]=e,this.#T[1]=i,this.#T}#G(){const t=this.#u.actualOptions.background;if(this.#M=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement||"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?this.#M=e:e?this.#$("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#$("background-element-not-found",`Background element selector "${t.element}" not found`)}}else("undefined"!=typeof HTMLCanvasElement&&t.element instanceof HTMLCanvasElement||"undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas||"undefined"!=typeof HTMLVideoElement&&t.element instanceof HTMLVideoElement||"undefined"!=typeof HTMLImageElement&&t.element instanceof HTMLImageElement)&&(this.#M=t.element)}#$(t,e){this.#P.has(t)||(this.#P.add(t),Lt().warning(e))}}const mn=new WeakMap;function yn(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 vn{domElement;render;renderCanvas;size;zoom=1;#u;#Q;#Z;#K;#J;#p;#tt;#et;#it;#st;constructor(t,e){this.#p=t,this.#u=e,this.render=new gn(t,e,this),this.#it={height:0,width:0};const i=e.retina.pixelRatio,s=this.#it;this.size={height:s.height*i,width:s.width*i},this.#Q=!1,this.#et=[],this.#tt="none"}get#nt(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#Q){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#ot();this.render.destroy(),this.#et=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#st?this.#st:{x:e*a/t,y:i*a/t}}init(){this.#at(t=>{t.disconnect()}),this.#K=ht(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#rt()}),this.resize(),this.#lt(),this.#at(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#ct(),this.initBackground(),this.#dt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Qe(this.#p,e.color);if(n){const i=t.actualOptions.hdr;s.backgroundColor=ai(n,t.hdr,e.opacity,i.peakNits,i.mode)}else s.backgroundColor="";s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#et=[];for(const t of this.#u.plugins)t.resize&&this.#et.push(t)}loadCanvas(t){this.#Q&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#Q=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=mn.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return mn.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#J=Mt(s.style));const n=this.#it,o=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=o.height,n.width=o.width);const a=this.#u.retina.pixelRatio,r=this.size;o.height=r.height=n.height*a,o.width=r.width=n.width*a}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#it,n={width:t.offsetWidth,height:t.offsetHeight},o=e.retina.pixelRatio,a={width:n.width*o,height:n.height*o};if(n.height===s.height&&n.width===s.width&&a.height===i.height&&a.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=a.width,i.height=l.height=a.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#tt=t,this.#rt())}setZoom(t,e){this.zoom=t,this.#st=e}stop(){this.#at(t=>{t.disconnect()}),this.#K=void 0,this.#ht(),this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#ut(),e&&await t.refresh()}#ut(){for(const t of this.#et)t.resize?.()}#ct(){const t=this.#u,e=t.actualOptions.hdr.enable&&dt("(color-gamut: p3)")?.matches&&dt("(dynamic-range: high)")?.matches;t.hdr=e??!1,t.hdrMode=t.actualOptions.hdr.mode,t.peakNits=t.actualOptions.hdr.peakNits;const i=this.renderCanvas;if(!i)return;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){t.hdr=!1;const e={alpha:!0,desynchronized:!0,willReadFrequently:!1,colorSpace:"srgb"};this.render.setContextSettings(e);try{s=i.getContext("2d",e)}catch{s=null}}this.render.setContext(s)}#dt(){this.#ht();const t=dt("(color-gamut: p3)"),e=dt("(dynamic-range: high)"),i=()=>{this.#pt(),this.#ct(),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.#Z=s}#lt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#nt?this.#ft():this.#ot();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(){const t=this.renderCanvas;t&&(this.domElement||(this.renderCanvas=new OffscreenCanvas(t.width,t.height)))}#ht(){if(this.#Z){for(const{handler:t,mql:e}of this.#Z)e.removeEventListener("change",t);this.#Z=void 0}}#rt(){const t=this.domElement;if(!t)return;this.#at(t=>{t.disconnect()}),this.#lt(),this.initBackground();const e=this.#tt;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#at(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#ot(){const t=this.domElement,e=this.#J;t&&e&&yn(t,e,!0)}#at(t){this.#K&&t(this.#K)}#ft(){const t=this.domElement;t&&yn(t,Ct(this.#u.actualOptions.fullScreen.zIndex),!0)}}class wn{#u;#gt;#mt;#yt;constructor(t){this.#u=t,this.#gt={visibilityChange:()=>{this.#vt()},resize:()=>{this.#wt()}}}addListeners(){this.#bt(!0)}removeListeners(){this.#bt(!1)}#vt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(ct().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#wt(){this.#yt&&(clearTimeout(this.#yt),this.#yt=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#yt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*r)}#bt(t){const e=this.#gt;this.#Mt(t),zt(document,n,e.visibilityChange,t,!1)}#Mt(t){const e=this.#gt,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void zt(globalThis,s,e.resize,t);const n=i.canvas.domElement;this.#mt&&!t?(n&&this.#mt.unobserve(n),this.#mt.disconnect(),this.#mt=void 0):!this.#mt&&t&&n&&(this.#mt=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this.#wt()}),this.#mt.observe(n))}}function bn(t){if(!ut(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}function Mn(t,e){const i=t%e;return i<0?i+e:i}function Pn(t,e,i,s){const n=Ae(i,e,e.actualOptions.particles),o=n.reduceDuplicates;t.effect=wt(n.effect.type,t.id,o),t.shape=wt(n.shape.type,t.id,o);const a=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=wt(e,t.id,o);i&&(t.effect=i)}a.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=wt(e,t.id,o);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===d){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(A()*i.length)]}if(t.shape===d){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(A()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return yt({close:e.close},wt(n,i,s))}(t.effect,a,t.id,o):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return yt({close:e.close},wt(n,i,s))}(t.shape,r,t.id,o):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 xn{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;#Pt={fillOpacity:1,opacity:1,strokeOpacity:1};#xt=z.origin;#Ct={sin:0,cos:0};#zt={a:1,b:0,c:0,d:1};#u;#kt=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#kt.push(t),this.#kt.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#kt.length=0}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0;s?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this.#u.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#Ot(this.#St(ci(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*a}getModifier(t){return this.#kt.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.#St(void 0,t=>t.opacity)??i,n=this.fillOpacity??1,o=this.strokeOpacity??1;return this.#Pt.fillOpacity=n,this.#Pt.opacity=s*e,this.#Pt.strokeOpacity=o,this.#Pt}getPosition(){return this.#xt.x=this.position.x+this.offset.x,this.#xt.y=this.position.y+this.offset.y,this.#xt.z=this.position.z,this.#xt}getRadius(){return this.#St(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#Ct.sin=Math.sin(t),this.#Ct.cos=Math.cos(t),this.#Ct}getStrokeColor(){return this.#Ot(this.#St(ci(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#zt.a=e.cos*(t.a??c.a),this.#zt.b=i?e.sin*(t.b??1):t.b??c.b,this.#zt.c=i?-e.sin*(t.c??1):t.c??c.c,this.#zt.d=e.cos*(t.d??c.d),this.#zt}init(e,i,s,n){const o=this.#u;!function(e,i,s){e.id=i,e.group=s,e.justWarped=!1,e.effectClose=!0,e.shapeClose=!0,e.pathRotation=!1,e.lastPathTime=0,e.destroyed=!1,e.unbreakable=!1,e.isRotating=!1,e.rotation=0,e.misplaced=!1,e.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},e.size={value:1,max:1,min:1,enable:!1},e.outType=t.ParticleOutType.normal,e.ignoresResizeRatio=!0}(this,e,n),this.options=Pn(this,o,this.#p,s),o.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(o.particleUpdaters,this),this.#Dt(i),this.initialVelocity=this.#It(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/o.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,o),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(o.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)}(o,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(o,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=Mn(t,u);return e>=Math.PI*a&&e<3*Math.PI*a}if(this.roll.horizontal){const e=Mn(t+Math.PI*a,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Mn(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}removeModifier(t){const e=this.#kt.findIndex(e=>e.id===t);e>=0&&this.#kt.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#St(t,e){let i=t;for(const t of this.#kt)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#Et(t,e){let i=0,s=t?z.create(t.x,t.y,e):void 0;const n=this.#u,o=n.particlePositionPlugins,a=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size;for(;;){for(const t of o){const i=t.particlePosition?.(s,this);if(i)return z.create(i.x,i.y,e)}const t=nt({size:l,position:s}),c=z.create(t.x,t.y,e);this.#Lt(c,r,a.left??a.default),this.#Lt(c,r,a.right??a.default),this.#Rt(c,r,a.top??a.default),this.#Rt(c,r,a.bottom??a.default);let d=!0;for(const t of n.particles.checkParticlePositionPlugins)if(d=t.checkParticlePosition?.(this,c,i)??!0,!d)break;if(d)return c;i+=1,s=void 0}}#It(){const e=this.options.move,i=tt(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=K(G(e.angle.value)),n=K(G(e.angle.offset)),o={left:n-s*a,right:n+s*a};return e.straight||(i.angle+=$(q(o.left,o.right))),e.random&&"number"==typeof e.speed&&(i.length*=A()),i}#Lt(e,i,s){bn({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#Rt(e,i,s){bn({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#Tt(e,i){const s=this.getRadius(),n=this.#u.canvas.size,o=this.position,a=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:a?o.y+s<n.height:o.y-s<n.height,reason:"default"}:e===t.OutModeDirection.left?{inside:a?o.x-s>0:o.x+s>0,reason:"default"}:e===t.OutModeDirection.right?{inside:a?o.x+s<n.width:o.x-s<n.width,reason:"default"}:e===t.OutModeDirection.top?{inside:a?o.y-s>0:o.y+s>0,reason:"default"}:{inside:o.x>=-s&&o.y>=-s&&o.y<=n.height+s&&o.x<=n.width+s,reason:"default"}}#_t(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Ft(t){const e=this.#Tt(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,o=s?.isInsideCanvas,a=n?.isInsideCanvas;if(!o&&!a)return e;const r=this.#_t(t.direction,t.outMode),l=o?this.#At(o(r),"shape"):void 0,c=a?this.#At(a(r),"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}#Ot(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?fi(t,this.roll.alter.type,this.roll.alter.value):t:t}#Dt(e){const i=this.#u,s=Math.floor(G(this.options.zIndex.value)),n=this.#Et(e,H(s,0,i.zLayers));if(!n)throw new Error("a valid position cannot be found for particle");this.position=n,this.initialPosition=this.position.copy();const o=i.canvas.size;switch(this.moveCenter={...bt(this.options.move.center,o),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=J(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case t.MoveDirection.inside:this.outType=t.ParticleOutType.inside;break;case t.MoveDirection.outside:this.outType=t.ParticleOutType.outside}this.offset=k.origin}#At(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Cn{#Bt;#Vt=new Map;#Ut=[];#Ht;#Nt;#$t=[];#Gt;constructor(t){this.#Bt=t,this.#Ht=0,this.#Gt=0}clear(){this.#Vt.clear();const t=this.#Nt;t&&(this.#Bt=t),this.#Nt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Wt(e,i);this.#Vt.has(s)||this.#Vt.set(s,[]),this.#Vt.get(s)?.push(t)}query(t,e,i=[]){const s=this.#jt(t);if(!s)return i;const n=Math.floor(s.minX/this.#Bt),o=Math.floor(s.maxX/this.#Bt),a=Math.floor(s.minY/this.#Bt),r=Math.floor(s.maxY/this.#Bt);for(let s=n;s<=o;s++)for(let n=a;n<=r;n++){const o=`${s}_${n}`,a=this.#Vt.get(o);if(a)for(const s of a)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this.#qt(t.x,t.y,e),o=this.query(n,i,s);return this.#Xt(),o}queryRectangle(t,e,i,s=[]){const n=this.#Yt(t.x,t.y,e.width,e.height),o=this.query(n,i,s);return this.#Xt(),o}setCellSize(t){this.#Nt=t}#qt(t,e,i){return(this.#Ut[this.#Ht++]??=new Qt(t,e,i)).reset(t,e,i)}#Yt(t,e,i,s){return(this.#$t[this.#Gt++]??=new Zt(t,e,i,s)).reset(t,e,i,s)}#Wt(t,e){return`${Math.floor(t/this.#Bt)}_${Math.floor(e/this.#Bt)}`}#jt(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 Zt){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}#Xt(){this.#Ht=0,this.#Gt=0}}class zn{checkParticlePositionPlugins;grid;#Qt;#u;#Zt;#Kt;#Jt;#te;#ee;#ie;#p;#se;#ne;#oe;#ae;#re;#le;constructor(t,e){this.#p=t,this.#u=e,this.#Jt=0,this.#Qt=[],this.#se=[],this.#Kt=0,this.#Zt=new Map,this.#te=new Map,this.#le=this.#ce(this.#u.zLayers),this.grid=new Cn(100),this.checkParticlePositionPlugins=[],this.#ee=[],this.#ie=[],this.#oe=[],this.#ne=[],this.#re=[]}get count(){return this.#Qt.length}addParticle(e,i,s,n){const o=this.#u.actualOptions.particles.number.limit.mode,a=void 0===s?this.#Kt:this.#Zt.get(s)??this.#Kt,r=this.count;if(a>0)switch(o){case t.LimitMode.delete:{const t=r+1-a;t>0&&this.removeQuantity(t);break}case t.LimitMode.wait:if(r>=a)return}try{const o=this.#se.pop()??new xn(this.#p,this.#u);o.init(this.#Jt,e,i,s);let a=!0;return n&&(a=n(o)),a?(this.#Qt.push(o),this.#de(o),this.#Jt++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:o}),o):void this.#se.push(o)}catch(t){Lt().warning(`error adding particle: ${t}`)}}clear(){this.#Qt=[],this.#te.clear(),this.#he(this.#u.zLayers)}destroy(){this.#Qt=[],this.#se.length=0,this.#te.clear(),this.#le=[],this.checkParticlePositionPlugins=[],this.#ee=[],this.#ie=[],this.#oe=[],this.#ne=[],this.#re=[]}drawParticles(t){for(let e=this.#le.length-1;e>=0;e--){const i=this.#le[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Qt.filter(t)}find(t){return this.#Qt.find(t)}get(t){return this.#Qt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#re=[],this.#ie=[],this.#oe=[],this.#ee=[],this.#ne=[],this.#te.clear(),this.#he(t.zLayers),this.grid=new Cn(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#re.push(e),e.particleUpdate&&this.#ie.push(e),e.postUpdate&&this.#oe.push(e),e.particleReset&&this.#ee.push(e),e.postParticleUpdate&&this.#ne.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}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.#Qt.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let o=t;n<e&&o<this.count;o++)this.#ue(o,i,s)&&(o--,n++)}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=Ae(this.#p,this.#u,s);this.#pe(n,i,t)}this.#pe(t.particles,i)}setResizeFactor(t){this.#ae=t}update(t){this.grid.clear();for(const e of this.#re)e.update?.(t);const e=this.#fe(t);for(const e of this.#oe)e.postUpdate?.(t);if(this.#ge(t,e),e.size)for(const t of e)this.remove(t);this.#ae=void 0}#me(...t){this.#se.push(...t)}#pe(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Kt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Zt.set(i,s?.number.limit.value??n.limit.value));const o=this.#ye(n.density),a=n.value,r=n.limit.value>0?n.limit.value:a,l=Math.min(a,r)*o+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#Kt=n.limit.value*o:this.#Zt.set(i,n.limit.value*o),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)}#ce(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#ve(t){const e=this.#le.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#ye(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}#de(t){const e=this.#ve(t.position.z),i=this.#le[e];i&&(i.push(t),this.#te.set(t.id,e))}#ue(e,i,s){const n=this.#Qt[e];return!!n&&(n.group===i&&(this.#Qt.splice(e,1),this.#we(n),n.destroy(s),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this.#me(n),!0))}#we(t){const e=this.#te.get(t.id)??this.#ve(t.position.z),i=this.#le[e];if(!i)return void this.#te.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#te.delete(t.id)}#he(t){const e=Math.max(Math.floor(t),1);if(this.#le.length===e)for(const t of this.#le)t.length=0;else this.#le=this.#ce(e)}#be(t){const e=this.#ve(t.position.z),i=this.#te.get(t.id);if(void 0===i)return void this.#de(t);if(i===e)return;const s=this.#le[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#le[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.#te.set(t.id,e)}else this.#te.set(t.id,e)}#fe(t){const e=new Set,i=this.#ae;for(const s of this.#Qt){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.#ee)t.particleReset?.(s);for(const e of this.#ie){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#ge(t,e){for(const i of this.#Qt)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.#ne)e.postParticleUpdate?.(i,t);this.#be(i)}}}class kn{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,o=t.retina;o.maxSpeed=G(s.gravity.maxSpeed)*i,o.moveDrift=G(s.drift)*i,o.moveSpeed=G(s.speed)*i;const a=o.maxDistance;a.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,a.vertical=void 0===n.vertical?void 0:n.vertical*i}}function On(t){return!t.destroyed}function Sn(t,e,...i){const s=new Be(t,e);return Jt(s,...i),s}var Dn=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;#Me;#Pe;#xe={value:0,factor:0};#Ce;#ze;#ke;#Oe;#Se;#De;#Ie;#Fe;#Ee;#Le;#Re;#p;#Te;#_e;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:o,sourceOptions:a}=e;this.#p=s,this.#Ce=i,this.#Ee=o,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.hdrMode=t.HdrMode.standard,this.peakNits=400,this.#Te=!1,this.#Me=0,this.#ke=0,this.#Fe=0,this.#Se=!0,this.started=!1,this.destroyed=!1,this.#Re=!0,this.#Ie=0,this.zLayers=100,this.pageHidden=!1,this.#_e=a,this.#De=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new kn(this),this.canvas=new vn(this.#p,this),this.particles=new zn(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Le=Sn(this.#p,this),this.actualOptions=Sn(this.#p,this),this.#Oe=new wn(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#Re&&!this.pageHidden&&On(this)}get options(){return this.#Le}get sourceOptions(){return this.#_e}addLifeTime(t){this.#Fe+=t}alive(){return!this.#ke||this.#Fe<=this.#ke}destroy(e=!0){if(On(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#Ee(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#Ce(t,{container:this,data:e})}draw(t){if(!On(this))return;let e=t;this.#ze=V(t=>{e&&(this.#Ie=void 0,e=!1),this.#Ae(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}Lt().error(`Export plugin with type ${t} not found`)}async init(){if(!On(this))return;const e=new Map;for(const t of this.#p.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this.#Le=Sn(this.#p,this,this.#De,this.sourceOptions),this.actualOptions=Sn(this.#p,this,this.#Le),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[t,i]of e)t.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:i,duration:s,fpsLimit:n,smooth:o,zLayers:a}=this.actualOptions,l=this.actualOptions.hdr;this.hdrMode=l.mode,this.peakNits=l.peakNits,this.zLayers=a,this.#ke=G(s)*r,this.#Me=G(i)*r,this.#Fe=0,this.fpsLimit=n>0?n:120,this.#Te=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(t.EventType.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(t.EventType.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){if(On(this)&&(void 0!==this.#ze&&(U(this.#ze),this.#ze=void 0),!this.#Re)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Re=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!On(this))return;const i=this.#Re||e;if(!this.#Se||this.actualOptions.autoPlay){if(this.#Re&&(this.#Re=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#Se=!1}async refresh(){if(On(this))return this.stop(),this.start()}async reset(t){if(On(this))return this.#De=t,this.#_e=t,this.#Le=Sn(this.#p,this,this.#De,this.sourceOptions),this.actualOptions=Sn(this.#p,this,this.#Le),this.refresh()}async start(){On(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#Oe.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#Pe=setTimeout(()=>{i()},this.#Me)}))}stop(){if(On(this)&&this.started){this.#Pe&&(clearTimeout(this.#Pe),this.#Pe=void 0),this.#Se=!0,this.started=!1,this.#Oe.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.#_e=this.#Le,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Ae(t){try{if(!this.#Te&&void 0!==this.#Ie&&t<this.#Ie+r/this.fpsLimit)return void this.draw(!1);if(this.#Ie??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this.#xe,t-this.#Ie,this.fpsLimit,this.#Te),this.addLifeTime(this.#xe.value),this.#Ie=t,this.#xe.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#xe),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Lt().error("error in animation loop",t)}}}});var In=Object.freeze({__proto__:null,FireworksInstance:class{#u;#Be;constructor(t,e){this.#u=t,this.#Be=e}get destroyed(){return this.#u.destroyed}destroy(){var t;this.#u.destroy(),t=this.#Be,yi.delete(t)}pause(){this.#u.pause()}play(){this.#u.play()}stop(){this.#u.stop()}}});var Fn=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=t.DrawLayer.CanvasSetup;#u;#Ve;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#Ve&&(t.globalCompositeOperation=this.#Ve)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Ve=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function En(t,e,i,s,n,o,a){!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 o=t.pathGenerator?.generate(t,e);o&&t.velocity.addTo(o);s.clamp&&(t.velocity.x=H(t.velocity.x,-1,1),t.velocity.y=H(t.velocity.y,-1,1));t.lastPathTime-=n}(t,a);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*a.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*a.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const d=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&d.y>=0&&d.y>=s||r.inverse&&d.y<=0&&d.y<=-s)&&(d.y=l*s,i&&(t.velocity.y=d.y/i));const h=t.options.zIndex,u=(1-t.zIndexFactor)**h.velocityRate;d.multTo(u),d.multTo(o);const{position:p}=t;p.addTo(d),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*o,p.y+=Math.cos(p.y*Math.sin(p.x))*o)}var Ln=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(e){const i=e.options.move,s=i.gravity,n=i.path;if(e.moveDecay=1-G(i.decay),e.pathDelay=G(n.delay.value)*r,n.generator){let t=this.pathGenerators.get(n.generator);t||(t=this.availablePathGenerators.get(n.generator),t&&(this.pathGenerators.set(n.generator,t),t.init())),e.pathGenerator=t}e.gravity={enable:s.enable,acceleration:G(s.acceleration),inverse:s.inverse},function(e,i){const s=i.options.move.spin;if(!s.enable)return;const n=s.position??{x:50,y:50},o={x:.01*n.x*e.canvas.size.width,y:.01*n.y*e.canvas.size.height},a=Q(i.getPosition(),o),r=G(s.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:o,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:A()*u,radius:a,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options.move;if(!s.enable)return;const n=this.#u,o=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(e),r=n.retina.reduceFactor,l=e.retina.moveSpeed,c=e.retina.moveDrift,d=e.size.max,h=l*(s.size?e.getRadius()/d:1)*o*(i.factor||1)*a,u=e.retina.maxSpeed;s.spin.enable?function(e,i,s,n){if(!i.spin)return;const o=i.spin.direction===t.RotateDirection.clockwise,r={x:o?Math.cos:Math.sin,y:o?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*r.x(i.spin.angle)*n,i.position.y=i.spin.center.y+i.spin.radius*r.y(i.spin.angle)*n,i.spin.radius+=i.spin.acceleration*n;const l=Math.max(e.canvas.size.width,e.canvas.size.height),c=l*a;i.spin.radius>c?(i.spin.radius=c,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*s*(1-i.spin.radius/l)}(n,e,h,r):En(e,s,h,u,c,r,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=X(e,t.position),n=Math.abs(i),o=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&n>=l||c&&o>=c)&&!t.misplaced)t.misplaced=!!l&&n>l||!!c&&o>c,l&&(t.velocity.x=t.velocity.y*a-t.velocity.x),c&&(t.velocity.y=t.velocity.x*a-t.velocity.y);else if((!l||n<l)&&(!c||o<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-A()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-A())}}(e)}preInit(){return this.#Ue()}redrawInit(){return this.#Ue()}update(){for(const t of this.pathGenerators.values())t.update()}async#Ue(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var Rn=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#b;constructor(t,e){this.#b=t,this.#u=e,this.#b.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(E(t))for(const e of t)await this.#b.addEmitter(this.#u,e);else await this.#b.addEmitter(this.#u,t)}pause(){for(const t of this.#b.getArray(this.#u))t.pause()}play(){for(const t of this.#b.getArray(this.#u))t.play()}resize(){for(const t of this.#b.getArray(this.#u))t.resize()}stop(){this.#b.clear(this.#u)}update(t){this.#b.getArray(this.#u).forEach(e=>{e.update(t)})}}});const Tn=new Map;var _n=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||Tn.set(t,e)}getShapeGenerator(t){return Tn.get(t)}getSupportedShapeGenerators(){return Tn.keys()}}});var An,Bn,Vn=Object.freeze({__proto__:null,EmittersInstancesManager:class{#He;#p;constructor(t){this.#He=new Map,this.#p=t}async addEmitter(t,e,i){const s=new xs;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return Wn}),o=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await o.init(),this.getArray(t).push(o),o}clear(t){this.initContainer(t),this.#He.set(t,[])}getArray(t){this.initContainer(t);let e=this.#He.get(t);return e||(e=[],this.#He.set(t,e)),e}initContainer(t){this.#He.has(t)||(this.#He.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||D(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});!function(t){t.mute="soundsMuted",t.unmute="soundsUnmuted"}(An||(An={})),function(t){t.Block="block",t.None="none"}(Bn||(Bn={}));function Un(t){const e=ct().createElement("img"),{clickCb:i,container:s,display:n,iconOptions:o,margin:a,options:r,pos:l,rightOffsets:c}=t,{width:d,path:h,style:u,svg:p}=o;!function(t,e,i,s,n,o,a,r){t.style.userSelect="none",t.style.position="absolute",t.style.top=`${(e+a).toString()}px`,t.style.left=`${(i-a-o).toString()}px`,t.style.display=s,t.style.zIndex=(n+1).toString(),t.style.cssText+=r}(e,l.top+a,l.right-(a*(c.length+1)+d+c.reduce((t,e)=>t+e,0)),n,r.fullScreen.zIndex+1,d,a,u),e.src=h??(p?`data:image/svg+xml;base64,${btoa(p)}`:"");return(s.canvas.domElement?.parentNode??ct().body).append(e),e.addEventListener("click",()=>{i()}),e}function Hn(t){t&&t.remove()}var Nn=Object.freeze({__proto__:null,SoundsPluginInstance:class{#Ne;#$e;#u;#n;#Ge;#We;#je;#qe;#Xe;#Ye;constructor(t,e){this.#u=t,this.#n=e,this.#qe=0,this.#$e=[],this.#Ne=new Map}async init(){const t=this.#u.actualOptions.sounds;if(!t?.enable)return;if(t.autoPlay&&on()){const t=()=>{removeEventListener(Ws,t),removeEventListener(js,t),an(),this.unmute()},e={capture:!0,once:!0};addEventListener(Ws,t,e),addEventListener(js,t,e)}this.#qe=t.volume.value;const e=t.events;this.#Ne=new Map;for(const t of e){if(!t.audio)continue;const e=vt(t.audio,async t=>{const e=await fetch(t.source);if(!e.ok)return;const i=await e.arrayBuffer(),s=this.#Qe(),n=await s.decodeAudioData(i);this.#Ne.set(t.source,n)});e instanceof Promise?await e:await Promise.allSettled(e)}}async mute(){this.#u.muted||await this.toggleMute()}async start(){const t=this.#u,e=t.actualOptions,i=e.sounds;if(!i?.enable||!t.canvas.domElement)return;t.muted=!0;const s=t.canvas.domElement,n={top:s.offsetTop,right:s.offsetLeft+s.offsetWidth},{mute:o,unmute:a,volumeDown:r,volumeUp:l}=i.icons,c=async()=>{await this.toggleMute()},d=i.icons.enable?Bn.Block:Bn.None;this.#We=Un({container:t,options:e,pos:n,display:d,iconOptions:o,margin:10,rightOffsets:[r.width,l.width],clickCb:c}),this.#je=Un({container:t,options:e,pos:n,display:Bn.None,iconOptions:a,margin:10,rightOffsets:[r.width,l.width],clickCb:c}),this.#Xe=Un({container:t,options:e,pos:n,display:d,iconOptions:r,margin:10,rightOffsets:[l.width],clickCb:async()=>{await this.volumeDown()}}),this.#Ye=Un({container:t,options:e,pos:n,display:d,iconOptions:l,margin:10,rightOffsets:[],clickCb:async()=>{await this.volumeUp()}}),!on()&&i.autoPlay&&await this.unmute()}stop(){this.#u.muted=!0,(async()=>{await this.#Ze(),Hn(this.#We),Hn(this.#je),Hn(this.#Xe),Hn(this.#Ye)})()}async toggleMute(){const t=this.#u;t.muted=!t.muted,this.#Ke(),await this.#Je()}async unmute(){this.#u.muted&&await this.toggleMute()}async volumeDown(){const t=this.#u,e=t.actualOptions.sounds;e?.enable&&(t.muted&&(this.#qe=0),this.#qe-=e.volume.step,await this.#ti())}async volumeUp(){const t=this.#u.actualOptions.sounds;t?.enable&&(this.#qe+=t.volume.step,await this.#ti())}#ei(t){const e=t.createBufferSource();return this.#$e.push(e),e}#ii(t){const e=t.createOscillator();return this.#$e.push(e),e}#Qe(){const t=this.#u;return t.audioContext??=new AudioContext,t.audioContext}#si(){const t=this.#u,e=t.actualOptions.sounds;if(e?.enable&&t.canvas.domElement)for(const t of e.events){const e=i=>{i&&(async()=>{const s=t.filter&&!t.filter(i);if(this.#u!==i.container)return;if(this.#u.muted||this.#u.destroyed)return void vt(t.event,t=>{this.#n.removeEventListener(t,e)});if(s)return;if(t.audio){const e=wt(t.audio);if(!e)return;this.#ni(e)}else if(t.melodies){const e=pt(t.melodies);if(!e)return;e.melodies.length?await Promise.allSettled(e.melodies.map(t=>this.#oi(t.notes,0,e.loop))):await this.#oi(e.notes,0,e.loop)}else if(t.notes){const e=pt(t.notes);if(!e)return;await this.#oi([e],0,!1)}})()};vt(t.event,t=>{this.#n.addEventListener(t,e)})}}async#Ze(){const t=this.#u,e=this.#Qe();for(const t of this.#$e)this.#ai(t);this.#Ge&&this.#Ge.disconnect(),await e.close(),t.audioContext=void 0,this.#u.dispatchEvent(An.mute)}#ni(t){const e=this.#Ne.get(t.source);if(!e)return;const i=this.#u.audioContext;if(!i)return;const s=this.#ei(i);s.loop=t.loop,s.buffer=e,s.connect(this.#Ge??i.destination),s.start()}async#ri(t,e){if(!this.#Ge||this.#u.muted)return;const i=this.#Qe(),s=this.#ii(i);return s.connect(this.#Ge),s.type="sine",s.frequency.value=t,s.start(),new Promise(t=>{setTimeout(()=>{this.#ai(s),t()},e)})}#li(){if(this.#u.muted)return;const t=this.#Qe(),e=t.createGain();e.connect(t.destination),e.gain.value=0;const i=t.createOscillator();i.connect(e),i.type="sine",i.frequency.value=1,i.start(),setTimeout(()=>{i.stop(),i.disconnect(),e.disconnect()})}async#oi(t,e,i){if(this.#u.muted)return;const s=t[e];if(!s)return;const n=vt(s.value,async(i,s)=>this.#ci(t,e,s));await(E(n)?Promise.allSettled(n):n);let o=e+1;i&&o>=t.length&&(o%=t.length),await this.#oi(t,o,i)}async#ci(t,e,i){const s=t[e];if(!s)return;const n=wt(s.value,i,!0);if(n)try{const t=sn(n);if(!D(t))return;await this.#ri(t,s.duration)}catch(t){Lt().error(t)}}#ai(t){t.stop(),t.disconnect();this.#$e.splice(this.#$e.indexOf(t),1)}#di(){const t=this.#u.actualOptions.sounds;if(!t)return;const e=this.#Qe(),i=e.createGain();i.connect(e.destination),i.gain.value=t.volume.value/o,this.#Ge=i,this.#si(),this.#u.dispatchEvent(An.unmute)}#Ke(){const t=this.#u,e=t.actualOptions.sounds;if(!e?.enable||!e.icons.enable)return;const i=this.#We,s=this.#je;i&&(i.style.display=t.muted?"block":"none"),s&&(s.style.display=t.muted?"none":"block")}async#Je(){const t=this.#u,e=this.#Qe();t.muted?(await e.suspend(),await this.#Ze()):(await e.resume(),this.#di(),this.#li())}async#ti(){const t=this.#u,e=t.actualOptions.sounds;if(!e?.enable)return;H(this.#qe,e.volume.min,e.volume.max);let i=!1;this.#qe<=0&&!t.muted?(this.#qe=0,t.muted=!0,i=!0):this.#qe>0&&t.muted&&(t.muted=!1,i=!0),i&&(this.#Ke(),await this.#Je()),this.#Ge?.gain&&(this.#Ge.gain.value=this.#qe/o)}}});function $n(t,e,i,s){(t.paint??=new Se).fill={color:de.create(void 0,{value:e}),enable:s,opacity:i}}function Gn(t,e,i,s){(t.paint??=new Se).stroke={color:de.create(void 0,{value:e}),opacity:i,width:s}}var Wn=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#hi;#ui;#pi;#ke;#fi;#gi;#mi;#yi;#vi;#K;#wi;#Re;#p;#bi;#mt;#Mi;#Pi;#xi;#Ci;constructor(e,i,s,n,a){this.#p=e,this.#u=i,this.#bi=s,this.#hi=0,this.#ui=0,this.#pi=0,this.#yi=a,n instanceof xs?this.options=n:(this.options=new xs,this.options.load(n)),this.#xi=i.retina.reduceFactor?G(this.options.life.delay??0)*r/i.retina.reduceFactor:1/0,this.position=this.#yi??this.#Et(),this.name=this.options.name,this.fill=this.options.fill,this.#gi=!this.options.life.wait,this.#Ci=!1;const l=yt({},this.options.particles);if(l.move??={},l.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=Ke(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=Ke(this.#p,this.options.spawn.stroke.color)),this.#Re=!this.options.autoPlay,this.#wi=l,this.#Pi=this.#zi(),this.size=this.#Pi.mode===t.PixelMode.percent?{width:this.#Pi.width/o*this.#u.canvas.size.width,height:this.#Pi.height/o*this.#u.canvas.size.height}:{width:this.#Pi.width,height:this.#Pi.height},this.#vi=this.options.life.count??-1,this.#mi=this.#vi<=0,this.options.domId){const t=ct().getElementById(this.options.domId);t&&(this.#K=new MutationObserver(()=>{this.resize()}),this.#mt=new ResizeObserver(()=>{this.resize()}),this.#K.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#mt.observe(t))}const c=this.options.shape,d=this.#p.emitterShapeManager?.getShapeGenerator(c.type);d&&(this.#Mi=d.generate(this.#u,this.position,this.size,this.fill,c.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#Re=!0,this.pause()}externalPlay(){this.#Re=!1,this.play()}async init(){await(this.#Mi?.init())}pause(){this.#Re||(this.#fi=void 0)}play(){if(this.#Re)return;if(!(this.#vi>0||this.#mi)&&this.options.life.count||!(this.#gi||this.#pi>=(this.#xi??0)))return;const t=this.#u;if(void 0===this.#fi){const e=G(this.options.rate.delay);this.#fi=t.retina.reduceFactor?e*r/t.retina.reduceFactor:1/0}(this.#vi>0||this.#mi)&&this.#ki()}resize(){const e=this.#yi,i=this.#u;this.position=e&&ft(e,i.canvas.size,k.origin)?e:this.#Et(),this.#Pi=this.#zi(),this.size=this.#Pi.mode===t.PixelMode.percent?{width:this.#Pi.width/o*i.canvas.size.width,height:this.#Pi.height/o*i.canvas.size.height}:{width:this.#Pi.width,height:this.#Pi.height},this.#Mi?.resize(this.position,this.size)}update(t){if(this.#Re)return;const e=this.#u;this.#gi&&(this.#gi=!1,this.#pi=this.#xi??0,this.#ui=this.#fi??0),this.#Ci||(this.#Ci=!0,this.#Oi(this.options.startCount)),void 0!==this.#ke&&(this.#hi+=t.value,this.#hi>=this.#ke&&(this.pause(),void 0!==this.#xi&&(this.#xi=void 0),this.#mi||this.#vi--,this.#vi>0||this.#mi?(this.position=this.#Et(),this.#Mi?.resize(this.position,this.size),this.#xi=e.retina.reduceFactor?G(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0):this.#Si(),this.#hi-=this.#ke,this.#ke=void 0)),void 0!==this.#xi&&(this.#pi+=t.value,this.#pi>=this.#xi&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#pi-=this.#xi,this.#xi=void 0)),void 0!==this.#fi&&(this.#ui+=t.value,this.#ui>=this.#fi&&(this.#Di(),this.#ui-=this.#fi))}#Et(){const t=this.#u;if(this.options.domId){const e=ct().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*a)*s,y:(i.y+i.height*a)*s}}}return st({size:t.canvas.size,position:this.options.position})}#zi(){const e=this.#u;if(this.options.domId){const i=ct().getElementById(this.options.domId);if(i){const s=i.getBoundingClientRect();return{width:s.width*e.retina.pixelRatio,height:s.height*e.retina.pixelRatio,mode:t.PixelMode.precise}}}return this.options.size??(()=>{const e=new Ms;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}#Si(){this.#K?.disconnect(),this.#K=void 0,this.#mt?.disconnect(),this.#mt=void 0,this.#bi(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#Di(){if(this.#Re)return;const t=G(this.options.rate.quantity);this.#Oi(t)}#Oi(t){const e=wt(this.#wi)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:G(this.options.spawn.fill.opacity),o=this.options.spawn.stroke?.color?.animation,a=void 0===this.options.spawn.stroke?.opacity?1:G(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:G(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,d=!!o,h=!!this.#Mi,u=c||d,p=u||h,f=u?{h:y,s:v,l:w}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?yt({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=a,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this.#Ii(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this.#Ii(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this.#Ii(i.l,this.spawnFillColor.l,f.l)),$n(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(o&&f&&(this.spawnStrokeColor.h=this.#Ii(o.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this.#Ii(o.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this.#Ii(o.l,this.spawnStrokeColor.l,f.l)),Gn(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#Mi){const e=this.#Mi.randomPosition();if(e){l=e.position;const i=g.replace;i.color&&e.color&&$n(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#ki(){if(this.#Re)return;const t=void 0!==this.options.life.duration?G(this.options.life.duration):void 0;(this.#vi>0||this.#mi)&&void 0!==t&&t>0&&(this.#ke=t*r)}#Ii(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const o=$(t.offset),a=G(this.options.rate.delay),l=n.retina.reduceFactor?a*r/n.retina.reduceFactor:1/0;return(e+G(t.speed)*n.fpsLimit/l+o*s)%i}}});t.AnimatableColor=de,t.AnimationOptions=oe,t.AnimationValueWithRandom=Me,t.Background=he,t.BaseRange=Yt,t.Circle=Qt,t.ColorAnimation=re,t.Fill=me,t.FullScreen=ue,t.HDROptions=pe,t.HslAnimation=le,t.Move=ke,t.MoveAngle=ye,t.MoveCenter=ve,t.MoveGravity=we,t.MovePath=xe,t.OptionLoader=Kt,t.Options=Be,t.OptionsColor=ce,t.OutModes=Ce,t.Paint=Se,t.ParticlesBounce=Ie,t.ParticlesBounceFactor=De,t.ParticlesDensity=Fe,t.ParticlesNumber=Le,t.ParticlesNumberLimit=Ee,t.ParticlesOptions=_e,t.RangedAnimationOptions=ae,t.RangedAnimationValueWithRandom=Pe,t.Rectangle=Zt,t.ResizeEvent=fe,t.Shape=Re,t.Spin=ze,t.Stroke=Oe,t.ValueWithRandom=be,t.Vector=k,t.Vector3d=z,t.ZIndex=Te,t.alterHsl=fi,t.animate=V,t.areBoundsInside=gt,t.calcExactPositionOrRandomFromSize=nt,t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/o,y:t.position.y*t.size.height/o}:void 0},t.calcPositionOrRandomFromSize=it,t.calcPositionOrRandomFromSizeRanged=st,t.calculateBounds=mt,t.cancelAnimation=U,t.canvasFirstIndex=0,t.canvasTag=g,t.checkDistance=Z,t.circleBounce=function(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,o]=[t.position,e.position],{dx:a,dy:r}=X(o,n);if(i*a+s*r<0)return;const l=-Math.atan2(r,a),c=t.mass,d=e.mass,h=t.velocity.rotate(l),u=e.velocity.rotate(l),p=et(h,u,c,d),f=et(u,h,c,d),g=p.rotate(-l),m=f.rotate(-l);t.velocity.x=g.x*t.factor.x,t.velocity.y=g.y*t.factor.y,e.velocity.x=m.x*e.factor.x,e.velocity.y=m.y*e.factor.y},t.circleBounceDataFromParticle=function(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:k.create(G(t.options.bounce.horizontal.value),G(t.options.bounce.vertical.value))}},t.clamp=H,t.cloneStyle=Mt,t.collisionVelocity=et,t.colorMix=li,t.colorToRgb=Ze,t.countOffset=1,t.decayOffset=1,t.deepExtend=yt,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=i,t.defaultDensityFactor=1,t.defaultFps=60,t.defaultFpsLimit=120,t.defaultLoops=0,t.defaultOpacity=1,t.defaultRatio=1,t.defaultReduceFactor=1,t.defaultRemoveQuantity=1,t.defaultRetryCount=0,t.defaultRgbMin=0,t.defaultTime=0,t.defaultTransform=c,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=K,t.deleteCount=1,t.double=2,t.doublePI=u,t.empty=0,t.executeOnSingleOrMultiple=vt,t.fireworks=un,t.generatedAttribute=e,t.generatedFalse=f,t.generatedTrue=p,t.getDistance=Q,t.getDistanceSq=Y,t.getDistances=X,t.getFullScreenStyle=Ct,t.getHslAnimationFromHsl=di,t.getHslFromAnimation=ci,t.getItemMapFromInitializer=Ot,t.getItemsFromInitializer=kt,t.getLinkColor=function(t,e,i,s){if(i===d)return oi();if(i!==h)return i;{const i=t.getFillColor()??t.getStrokeColor(),n=e?.getFillColor()??e?.getStrokeColor();if(i&&n&&e)return li(i,n,t.getRadius(),e.getRadius(),s);{const t=i??n;if(t)return ii(t)}}},t.getLinkRandomColor=function(t,e,i,s){const n=S(e)?e:e.value;return n===d?s?Qe(t,{value:n}):i?d:h:n===h?h:Qe(t,{value:n})},t.getLogger=Lt,t.getParticleBaseVelocity=tt,t.getParticleDirectionAngle=J,t.getPosition=bt,t.getRandom=A,t.getRandomFn=function(){return T},t.getRandomInRange=B,t.getRandomRgbColor=oi,t.getRangeMax=j,t.getRangeMin=W,t.getRangeValue=G,t.getStyleFromHsl=ri,t.getStyleFromRgb=ai,t.hMax=y,t.hMin=0,t.hPhase=60,t.half=a,t.hslToRgb=ii,t.hslToRgbFloat=si,t.hslaToRgba=ni,t.identity=1,t.inverseFactorNumerator=1,t.isArray=E,t.isBoolean=O,t.isFunction=I,t.isInArray=ut,t.isNull=L,t.isNumber=D,t.isObject=F,t.isPointInside=ft,t.isString=S,t.itemFromArray=pt,t.itemFromSingleOrMultiple=wt,t.lFactor=1,t.lMax=w,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){if(void 0!==i){const s=e;if("__proto__"===s||"constructor"===s||"prototype"===s)return;const n=t,o=Object.prototype.hasOwnProperty.call(n,s)?n[s]:{};n[s]=yt(o,i)}},t.loadLazyProperty=se,t.loadMinIndex=0,t.loadNestedProperty=ie,t.loadOptionProperty=ne,t.loadOptions=Jt,t.loadParticlesOptions=Ae,t.loadProperty=te,t.loadRandomFactor=1e4,t.loadRangeProperty=ee,t.manageListener=zt,t.maxNits=P,t.midColorValue=h,t.millisecondsToSeconds=r,t.minCount=0,t.minDistance=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minRadius=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=N,t.none=0,t.one=1,t.originPoint=l,t.parseAlpha=ot,t.percentDenominator=o,t.phaseNumerator=1,t.quarter=b,t.randomColorValue=d,t.randomInRangeValue=$,t.rangeColorToHsl=Ke,t.rangeColorToRgb=Qe,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=m,t.rgbToHsl=Je,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=ct,t.safeMatchMedia=dt,t.safeMutationObserver=ht,t.setAnimationFunctions=function(t,e){_.nextFrame=t,_.cancel=e},t.setLogger=function(t){t.debug&&(Et.debug=Ft(t.debug)),t.error&&(Et.error=Ft(t.error)),t.info&&(Et.info=Ft(t.info)),t.log&&(Et.log=Ft(t.log)),t.trace&&(Et.trace=Ft(t.trace)),t.verbose&&(Et.verbose=Ft(t.verbose)),t.warning&&(Et.warning=Ft(t.warning))},t.setRandom=function(t=Math.random){T=t},t.setRangeValue=q,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Ye(t,e)?.a},t.stringToRgb=ti,t.threeQuarter=M,t.triple=3,t.tryCountIncrement=1,t.tsParticles=gi,t.updateColor=pi,t.updateColorValue=ui,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{fireworks:(globalThis.__tsParticlesInternals.bundles.fireworks||{}).fireworks}),delete(globalThis.window||globalThis).tsparticlesInternalExports;