@tsparticles/fireworks 4.0.1 → 4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/fireworks.js +2 -2
- package/browser/fireworks.lazy.js +2 -2
- package/cjs/fireworks.js +2 -2
- package/cjs/fireworks.lazy.js +2 -2
- package/esm/fireworks.js +2 -2
- package/esm/fireworks.lazy.js +2 -2
- package/package.json +12 -12
- package/report.html +1 -1
- package/tsparticles.fireworks.bundle.js +112 -111
- package/tsparticles.fireworks.bundle.min.js +1 -1
- package/tsparticles.fireworks.js +3 -3
- package/tsparticles.fireworks.min.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.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},h="random",u="mid",d=2*Math.PI,p="true",f="false",g="canvas",m=255,y=360,v=100,_=100,w=.25,b=.75;var P;function x(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(P=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",P.bottomLeft="bottom-left",P.bottomRight="bottom-right",P.left="left",P.none="none",P.right="right",P.top="top",P.topLeft="top-left",P.topRight="top-right",P.outside="outside",P.inside="inside";class M{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 M.create(l.x,l.y,l.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this._updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this._updateFromAngle(this.angle,t)}static clone(t){return M.create(t.x,t.y,x(t))}static create(t,e,i){return"number"==typeof t?new M(t,e??l.y,i??l.z):new M(t.x,t.y,x(t))}add(t){return M.create(this.x+t.x,this.y+t.y,this.z+x(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=x(t)}copy(){return M.clone(this)}div(t){return M.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**2+this.y**2}mult(t){return M.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 M.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),l.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=x(t)}sub(t){return M.create(this.x-t.x,this.y-t.y,this.z-x(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=x(t)}_updateFromAngle(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class z extends M{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return z.create(l.x,l.y)}static clone(t){return z.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new z(t,e??l.y):new z(t.x,t.y)}}function C(t){return"boolean"==typeof t}function S(t){return"string"==typeof t}function O(t){return"number"==typeof t}function k(t){return"function"==typeof t}function D(t){return"object"==typeof t&&null!==t}function I(t){return Array.isArray(t)}function F(t){return null==t}const R=Math.PI/180;let E=Math.random;const T={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return U(E(),0,1-Number.EPSILON)}function L(t,e){return A()*(e-t)+t}function B(t){return T.nextFrame(t)}function V(t){T.cancel(t)}function U(t,e,i){return Math.min(Math.max(t,e),i)}function G(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function $(t){const e=W(t);let i=N(t);return e===i&&(i=0),L(i,e)}function q(t){return O(t)?t:$(t)}function N(t){return O(t)?t:t.min}function W(t){return O(t)?t:t.max}function H(t,e){if(t===e||void 0===e&&O(t))return t;const i=N(t),s=W(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:H(i,s)}function j(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function Q(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function X(t,e){return Math.sqrt(Q(t,e))}function Y(t,e,i){return Q(t,e)<=i*i}function Z(t){return t*R}function J(e,i,s){if(O(e))return Z(e);switch(e){case t.MoveDirection.top:return-Math.PI*a;case t.MoveDirection.topRight:return-Math.PI*w;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*w;case t.MoveDirection.bottom:return Math.PI*a;case t.MoveDirection.bottomLeft:return Math.PI*b;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*b;case t.MoveDirection.inside:return Math.atan2(s.y-i.y,s.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-s.y,i.x-s.x);default:return A()*d}}function K(t){const e=z.origin;return e.length=1,e.angle=t,e}function tt(t,e,i,s){return z.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function et(t){return{x:(t.position?.x??A()*o)*t.size.width/o,y:(t.position?.y??A()*o)*t.size.height/o}}function it(t){const e={x:void 0!==t.position?.x?q(t.position.x):void 0,y:void 0!==t.position?.y?q(t.position.y):void 0};return et({size:t.size,position:e})}function st(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}function nt(t){return t?t.endsWith("%")?parseFloat(t)/o:parseFloat(t):1}var ot,at,rt,lt,ct,ht;t.AnimationMode=void 0,(ot=t.AnimationMode||(t.AnimationMode={})).auto="auto",ot.increase="increase",ot.decrease="decrease",ot.random="random",t.AnimationStatus=void 0,(at=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",at.decreasing="decreasing",t.DestroyType=void 0,(rt=t.DestroyType||(t.DestroyType={})).none="none",rt.max="max",rt.min="min",t.OutModeDirection=void 0,(lt=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",lt.left="left",lt.right="right",lt.top="top",t.PixelMode=void 0,(ct=t.PixelMode||(t.PixelMode={})).precise="precise",ct.percent="percent",t.StartValueType=void 0,(ht=t.StartValueType||(t.StartValueType={})).max="max",ht.min="min",ht.random="random";function ut(t,e){const i=new Map,s=e?.maxSize,n=e?.ttlMs,o=e?.keyFn,a=(t,e=new WeakSet)=>{if(null===t)return"null";const i=typeof t;if("undefined"===i)return"undefined";if("number"===i||"boolean"===i||"string"===i)return JSON.stringify(t);if("function"===i)try{return t.toString()}catch{return'"[Function]"'}if("symbol"===i)try{return t.toString()}catch{return'"[Symbol]"'}if(Array.isArray(t))return`[${t.map(t=>a(t,e)).join(",")}]`;if(e.has(t))return'"[Circular]"';e.add(t);return`{${Object.keys(t).sort().map(i=>`${JSON.stringify(i)}:${a(t[i],e)}`).join(",")}}`},r=t=>o?o(t):(t=>a(t))(t);return(...e)=>{const o=r(e),a=Date.now(),l=i.get(o);if(void 0!==l){if(!(n&&a-l.ts>n))return i.delete(o),i.set(o,{value:l.value,ts:l.ts}),l.value;i.delete(o)}const c=t(...e);return i.set(o,{value:c,ts:a}),(()=>{if("number"==typeof s&&s>=0)for(;i.size>s;){const t=i.keys().next().value;if(void 0===t)break;i.delete(t)}})(),c}}function dt(){return"undefined"!=typeof matchMedia}function pt(){return globalThis.document}function ft(t){if(dt())return matchMedia(t)}function gt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function mt(t,e){return t===e||I(e)&&e.includes(t)}function yt(t){return Math.floor(A()*t.length)}function vt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:yt(t)]}function _t(t,e,i,s,n){return wt(bt(t,s??0),e,i,n)}function wt(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 bt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function Pt(t,...e){for(const i of e){if(F(i))continue;if(!D(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):D(t)&&!Array.isArray(t)||(t={});const e=Object.keys(i),s=new Set(["__proto__","constructor","prototype"]);if(!e.some(t=>{const e=i[t];return D(e)||Array.isArray(e)})){const n=i,o=t;for(const t of e)if(!s.has(t)&&t in n){const e=n[t];void 0!==e&&(o[t]=e)}continue}for(const n of e){if(s.has(n))continue;const e=t,o=i[n];e[n]=Array.isArray(o)?o.map(t=>Pt(void 0,t)):Pt(e[n],o)}}return t}function xt(t,e){return I(t)?t.map((t,i)=>e(t,i)):e(t,0)}function Mt(t,e,i){return I(t)?vt(t,e,i):t}function zt(e,i){const s=e.value,n=e.animation,o={delayTime:q(n.delay)*r,enable:n.enable,value:q(e.value)*i,max:W(s)*i,min:N(s)*i,loops:0,maxLoops:q(n.count),time:0};if(n.enable){switch(o.decay=1-q(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 Ct(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}}function St(t,e){return Ct(t,e)}function Ot(t,e){return Ct(t,e)}function kt(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;if(i.time??=0,(i.delayTime??0)>0&&i.time<(i.delayTime??0)&&(i.time+=o.value),!((i.delayTime??0)>0&&i.time<(i.delayTime??0))){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=U(i.value,r,l))}}function Dt(t){const e=pt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||F(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}const It=ut(function(t){const e=pt().createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0","pointer-events":"none"};for(const t in i){const s=i[t];void 0!==s&&e.setProperty(t,s)}return e});function Ft(t,e,i,s,n){if(s){let s={passive:!0};C(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function Rt(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 Et(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 Tt{_listeners;constructor(){this._listeners=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this._listeners.get(t);i||(i=[],this._listeners.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this._listeners.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this._listeners.get(t)}removeAllEventListeners(t){t?this._listeners.delete(t):this._listeners=new Map}removeEventListener(t,e){const i=this._listeners.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this._listeners.delete(t):i.splice(n,1))}}var At;t.EventType=void 0,(At=t.EventType||(t.EventType={})).configAdded="configAdded",At.containerInit="containerInit",At.particlesSetup="particlesSetup",At.containerStarted="containerStarted",At.containerStopped="containerStopped",At.containerDestroyed="containerDestroyed",At.containerPaused="containerPaused",At.containerPlay="containerPlay",At.containerBuilt="containerBuilt",At.particleAdded="particleAdded",At.particleDestroyed="particleDestroyed",At.particleRemoved="particleRemoved";class Lt{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;_allLoadersSet=new Set;_configs=new Map;_engine;_executedSet=new Set;_initialized=!1;_isRunningLoaders=!1;_loadPromises=new Set;constructor(t){this._engine=t}get configs(){const t={};for(const[e,i]of this._configs)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this._configs.set(i,e),this._engine.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 Et(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 Et(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return Rt(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this._initialized&&!this._isRunningLoaders){this._isRunningLoaders=!0,this._executedSet=new Set,this._allLoadersSet=new Set(this._loadPromises);try{for(const t of this._allLoadersSet)await this._runLoader(t,this._executedSet,this._allLoadersSet)}finally{this._loadPromises.clear(),this._isRunningLoaders=!1,this._initialized=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this._initialized)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this._isRunningLoaders?await this._runLoader(e,this._executedSet,this._allLoadersSet):this._loadPromises.add(e)}async _runLoader(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this._engine))}}const Bt=t=>(...e)=>{t(...e)},Vt={debug:Bt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:Bt(console.info),log:Bt(console.log),trace:Bt(console.trace),verbose:Bt(console.log),warning:Bt(console.warn)};function Ut(){return Vt}const Gt="100%";class $t{pluginManager=new Lt(this);_domArray=[];_eventDispatcher=new Tt;_initialized=!1;get items(){return this._domArray}get version(){return"4.0.1"}addEventListener(t,e){this._eventDispatcher.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._eventDispatcher.dispatchEvent(t,e)}async init(){this._initialized||(await this.pluginManager.init(),this._initialized=!0)}item(t){const{items:e}=this,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 bn}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:o,url:a}=t,r=a?await async function(t){const e=Mt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Ut().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:a,index:o}):t.options,l=Mt(r,o),{items:c}=this,h=c.findIndex(t=>t.id.description===n),u=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(u);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,u)}else c.push(u);const d="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=pt();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=Gt,s.style.height||=Gt,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||=Gt,s.style.height||=Gt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=pt();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 u.canvas.loadCanvas(d),await u.start(),u}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this._eventDispatcher.removeEventListener(t,e)}}var qt,Nt,Wt,Ht,jt,Qt,Xt,Yt;!function(t){t.circle="circle",t.rectangle="rectangle"}(qt||(qt={}));class Zt{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 Jt extends Zt{radius;constructor(t,e,i){super(t,e,qt.circle),this.radius=i}contains(t){return Y(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),o=Math.abs(i.y-e.y);if(t instanceof Jt||t.type===qt.circle){return s+t.radius>Math.hypot(n,o)}if(t instanceof Kt||t.type===qt.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 Kt extends Zt{size;constructor(t,e,i,s){super(t,e,qt.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 Jt)return t.intersects(this);if(!(t instanceof Kt))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,(Nt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Nt.counterClockwise="counter-clockwise",Nt.random="random",t.LimitMode=void 0,(Wt=t.LimitMode||(t.LimitMode={})).delete="delete",Wt.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,(jt=t.AlterType||(t.AlterType={})).darken="darken",jt.enlighten="enlighten",t.GradientType=void 0,(Qt=t.GradientType||(t.GradientType={})).linear="linear",Qt.radial="radial",Qt.random="random",t.ParticleOutType=void 0,(Xt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Xt.inside="inside",Xt.outside="outside",t.EasingType=void 0,(Yt=t.EasingType||(t.EasingType={})).easeInBack="ease-in-back",Yt.easeInBounce="ease-in-bounce",Yt.easeInCirc="ease-in-circ",Yt.easeInCubic="ease-in-cubic",Yt.easeInElastic="ease-in-elastic",Yt.easeInExpo="ease-in-expo",Yt.easeInGaussian="ease-in-gaussian",Yt.easeInLinear="ease-in-linear",Yt.easeInQuad="ease-in-quad",Yt.easeInQuart="ease-in-quart",Yt.easeInQuint="ease-in-quint",Yt.easeInSigmoid="ease-in-sigmoid",Yt.easeInSine="ease-in-sine",Yt.easeInSmoothstep="ease-in-smoothstep",Yt.easeOutBack="ease-out-back",Yt.easeOutBounce="ease-out-bounce",Yt.easeOutCirc="ease-out-circ",Yt.easeOutCubic="ease-out-cubic",Yt.easeOutElastic="ease-out-elastic",Yt.easeOutExpo="ease-out-expo",Yt.easeOutGaussian="ease-out-gaussian",Yt.easeOutLinear="ease-out-linear",Yt.easeOutQuad="ease-out-quad",Yt.easeOutQuart="ease-out-quart",Yt.easeOutQuint="ease-out-quint",Yt.easeOutSigmoid="ease-out-sigmoid",Yt.easeOutSine="ease-out-sine",Yt.easeOutSmoothstep="ease-out-smoothstep",Yt.easeInOutBack="ease-in-out-back",Yt.easeInOutBounce="ease-in-out-bounce",Yt.easeInOutCirc="ease-in-out-circ",Yt.easeInOutCubic="ease-in-out-cubic",Yt.easeInOutElastic="ease-in-out-elastic",Yt.easeInOutExpo="ease-in-out-expo",Yt.easeInOutGaussian="ease-in-out-gaussian",Yt.easeInOutLinear="ease-in-out-linear",Yt.easeInOutQuad="ease-in-out-quad",Yt.easeInOutQuart="ease-in-out-quart",Yt.easeInOutQuint="ease-in-out-quint",Yt.easeInOutSigmoid="ease-in-out-sigmoid",Yt.easeInOutSine="ease-in-out-sine",Yt.easeInOutSmoothstep="ease-in-out-smoothstep";class te{count;decay;delay;enable;speed;sync;constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){F(t)||(void 0!==t.count&&(this.count=H(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=H(t.speed)),void 0!==t.decay&&(this.decay=H(t.decay)),void 0!==t.delay&&(this.delay=H(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class ee extends te{mode;startValue;constructor(){super(),this.mode=t.AnimationMode.auto,this.startValue=t.StartValueType.random}load(t){super.load(t),F(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class ie extends te{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),F(t)||(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.offset&&(this.offset=H(t.offset)))}}class se{h=new ie(0,y);l=new ie(0,_);s=new ie(0,v);load(t){F(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class ne{value;constructor(){this.value=""}static create(t,e){const i=new ne;return i.load(t),void 0!==e&&(S(e)||I(e)?i.load({value:e}):i.load(e)),i}load(t){F(t)||F(t.value)||(this.value=t.value)}}class oe extends ne{animation;constructor(){super(),this.animation=new se}static create(t,e){const i=new oe;return i.load(t),void 0!==e&&(S(e)||I(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),F(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class ae{color;image;opacity;position;repeat;size;constructor(){this.color=new ne,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){F(t)||(void 0!==t.color&&(this.color=ne.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class re{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){F(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class le{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(t){F(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class ce{close;options;type;constructor(){this.close=!0,this.options={},this.type=[]}load(t){if(F(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Pt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class he{color;enable;opacity;constructor(){this.enable=!0,this.opacity=1}load(t){F(t)||(void 0!==t.color&&(this.color=oe.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=H(t.opacity)))}}class ue{offset;value;constructor(){this.offset=0,this.value=90}load(t){F(t)||(void 0!==t.offset&&(this.offset=H(t.offset)),void 0!==t.value&&(this.value=H(t.value)))}}class de{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=t.PixelMode.percent,this.radius=0}load(t){F(t)||(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class pe{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){F(t)||(void 0!==t.acceleration&&(this.acceleration=H(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=H(t.maxSpeed)))}}class fe{value;constructor(){this.value=0}load(t){F(t)||F(t.value)||(this.value=H(t.value))}}class ge extends fe{animation=new te;load(t){if(super.load(t),F(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class me extends ge{animation;constructor(){super(),this.animation=new ee}load(t){super.load(t)}}class ye{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new fe,this.enable=!1,this.options={}}load(t){F(t)||(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=Pt(this.options,t.options)))}}class ve{bottom;default;left;right;top;constructor(){this.default=t.OutMode.out}load(t){F(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 _e{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){F(t)||(void 0!==t.acceleration&&(this.acceleration=H(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=Pt({},t.position)))}}class we{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new ue,this.center=new de,this.decay=0,this.distance={},this.direction=t.MoveDirection.none,this.drift=0,this.enable=!1,this.gravity=new pe,this.path=new ye,this.outModes=new ve,this.random=!1,this.size=!1,this.speed=2,this.spin=new _e,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(F(t))return;this.angle.load(O(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),void 0!==t.decay&&(this.decay=H(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=O(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=H(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(D(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=H(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class be extends ee{destroy;constructor(){super(),this.destroy=t.DestroyType.none,this.speed=2}load(t){super.load(t),F(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class Pe extends me{animation;constructor(){super(),this.animation=new be,this.value=1}load(t){if(F(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class xe{color;opacity;width;constructor(){this.width=0}load(t){F(t)||(void 0!==t.color&&(this.color=oe.create(this.color,t.color)),void 0!==t.width&&(this.width=H(t.width)),void 0!==t.opacity&&(this.opacity=H(t.opacity)))}}class Me{color;fill;stroke;load(t){F(t)||(void 0!==t.color&&(this.color=oe.create(this.color,t.color)),void 0!==t.fill&&(this.fill??=new he,this.fill.load(t.fill)),void 0!==t.stroke&&(this.stroke??=new xe,this.stroke.load(t.stroke)))}}class ze extends fe{constructor(){super(),this.value=1}}class Ce{horizontal;vertical;constructor(){this.horizontal=new ze,this.vertical=new ze}load(t){F(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class Se{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(F(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.width;void 0!==e&&(this.width=e);const i=t.height;void 0!==i&&(this.height=i)}}class Oe{mode;value;constructor(){this.mode=t.LimitMode.delete,this.value=0}load(t){F(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class ke{density;limit;value;constructor(){this.density=new Se,this.limit=new Oe,this.value=0}load(t){F(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class De{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(F(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Pt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class Ie extends ee{destroy;constructor(){super(),this.destroy=t.DestroyType.none,this.speed=5}load(t){super.load(t),F(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class Fe extends me{animation;constructor(){super(),this.animation=new Ie,this.value=3}load(t){if(super.load(t),F(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Re extends fe{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),F(t)||(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class Ee{bounce;effect;groups;move;number;opacity;paint;palette;reduceDuplicates;shape;size;zIndex;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.bounce=new Ce,this.effect=new ce,this.groups={},this.move=new we,this.number=new ke,this.opacity=new Pe,this.paint=new Me,this.paint.color=new oe,this.paint.color.value="#fff",this.paint.fill=new he,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new De,this.size=new Fe,this.zIndex=new Re}load(t){if(F(t))return;if(t.palette&&(this.palette=t.palette,this._importPalette(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=Pt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number),this.opacity.load(t.opacity);const e=t.paint;if(e&&(I(e)?this.paint=xt(e,t=>{const e=new Me;return e.load(t),e}):I(this.paint)?(this.paint=new Me,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.size.load(t.size),this.zIndex.load(t.zIndex),this._container){for(const e of this._pluginManager.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this._container,this,t);const e=this._pluginManager.updaters.get(this._container);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}_importPalette=t=>{const e=this._pluginManager.getPalette(t);if(!e)return;const i=e.colors,s=(I(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function Te(t,...e){for(const i of e)t.load(i)}function Ae(t,e,...i){const s=new Ee(t,e);return Te(s,...i),s}class Le{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.autoPlay=!0,this.background=new ae,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new re,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=Ae(this._pluginManager,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new le,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(F(t))return;void 0!==t.preset&&(this.preset=t.preset,xt(this.preset,t=>{this._importPreset(t)})),void 0!==t.palette&&(this.palette=t.palette,this._importPalette(this.palette)),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.clear&&(this.clear=t.clear),void 0!==t.key&&(this.key=t.key),void 0!==t.name&&(this.name=t.name),void 0!==t.delay&&(this.delay=H(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=H(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.hdr&&(this.hdr=t.hdr),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const s=t.fullScreen;C(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=Pt(this.style,t.style),void 0!==t.smooth&&(this.smooth=t.smooth),this._pluginManager.plugins.forEach(e=>{e.loadOptions(this._container,this,t)})}_importPalette=t=>{const e=this._pluginManager.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})};_importPreset=t=>{this.load(this._pluginManager.getPreset(t))}}function Be(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(l.x,l.y,e.width,e.height)}function Ve(t,e,i,s){if(!i)return;const n=t.globalAlpha;t.globalAlpha=s,t.drawImage(i,l.x,l.y,e.width,e.height),t.globalAlpha=n}function Ue(t,e){t.clearRect(l.x,l.y,e.width,e.height)}function Ge(t){const{container:e,context:i,particle:s,delta:n,colorStyles:o,radius:a,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,u=s.getPosition(),d=s.getTransformData(l),p={x:u.x,y:u.y};i.setTransform(d.a,d.b,d.c,d.d,u.x,u.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:d,position:{...u},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;qe(y,m),He(v,m),Ne(v,m),We(v,m),$e(y,m),i.resetTransform()}function $e(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}function qe(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}function Ne(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())}function We(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}function He(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}function je(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const Qe=new Map;function Xe(t,e){let i=Qe.get(t);if(!i){if(i=e(),Qe.size>=1e3){[...Qe.keys()].slice(0,500).forEach(t=>Qe.delete(t))}Qe.set(t,i)}return i}function Ye(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Ze(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return Je(t,n.value,i,s);if(I(n.value)){const e=vt(n.value,i,s);if(!e)return;return Ze(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Je(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return n.value===h?ni():ei(t,n.value);if(I(n.value)){const e=vt(n.value,i,s);if(!e)return;return Je(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ke(t,e,i,s=!0){const n=Ze(t,e,i,s);return n?ti(n):void 0}function ti(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*=_,r.s*=v,r.h*=60,r.h<0&&(r.h+=y),r.h>=y&&(r.h-=y),r}function ei(t,e){return Ye(t,e)}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(_,t.l)),n=e/y,o=i/v,r=s/_;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const l=(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},c=r<a?r*(1+o):r+o-r*o,h=2*r-c,u=1/3,d=Math.min(m,m*l(h,c,n+u)),p=Math.min(m,m*l(h,c,n)),f=Math.min(m,m*l(h,c,n-u));return{r:Math.round(d),g:Math.round(p),b:Math.round(f)}}function si(t){const e=ii(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function ni(t){const e=t??0,i=()=>Math.floor(L(e,256));return{b:i(),g:i(),r:i()}}function oi(t,e,i){const s=i??1;return Xe(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?ai(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function ai(t,e){return`color(display-p3 ${(t.r/m).toString()} ${(t.g/m).toString()} ${(t.b/m).toString()} / ${(e??1).toString()})`}function ri(t,e,i){const s=i??1;return Xe(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e){return ai(ii(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function li(t,e,i,s){let n=t,o=e;return"r"in n||(n=ii(t)),"r"in o||(o=ii(e)),{b:G(n.b,o.b,i,s),g:G(n.g,o.g,i,s),r:G(n.r,o.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 hi(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:_}};return e&&(ui(s.h,e.h,i),ui(s.s,e.s,i),ui(s.l,e.l,i)),s}function ui(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=q(i.speed)/o*s,e.decay=1-q(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=q(i.count),e.time=0,e.delayTime=q(i.delay)*r,i.sync||(e.velocity*=A(),e.value*=A()),e.initialValue=e.value,e.offset=H(i.offset)):e.velocity=0}function di(e,i,s){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const n=e.offset?$(e.offset):0,o=(e.velocity??0)*s.factor+3.6*n,a=e.decay??1,r=e.max,l=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=o,e.value<l&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=o,e.value>r&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=r)),e.velocity&&1!==a&&(e.velocity*=a),e.value=U(e.value,l,r)}function pi(t,e){if(!t)return;const{h:i,s:s,l:n}=t;di(i,!1,e),di(s,!0,e),di(n,!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=new $t;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){F(t)||(void 0!==t.background&&(this.background=t.background),void 0!==t.colors&&(I(t.colors)?this.colors=[...t.colors]:this.colors=t.colors),void 0!==t.brightness&&(this.brightness=H(t.brightness)),void 0!==t.gravity&&(this.gravity=H(t.gravity)),void 0!==t.minHeight&&(this.minHeight=H(t.minHeight)),void 0!==t.rate&&(this.rate=H(t.rate)),void 0!==t.saturation&&(this.saturation=H(t.saturation)),void 0!==t.sounds&&(this.sounds=t.sounds),void 0!==t.speed&&(this.speed=H(t.speed)),void 0!==t.splitCount&&(this.splitCount=H(t.splitCount)))}}const yi=new Map,vi=t=>{const e=t.data;return e?.particle?.options.move.gravity.enable??!1};async function _i(e,i,s,n){const o=yi.get(i);if(o instanceof Promise)return o;if(o)return o;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:O(e.rate)?1/e.rate:{min:1/N(e.rate),max:1/W(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:H(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:H(e.gravity),enable:!0,inverse:!0,maxSpeed:150},speed:H(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 Pn}),c=new l(r);return yi.set(i,c),c})();return yi.set(i,a),a}class wi{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:d};const n=i.circleRange;e.arc(l.x,l.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=D(s)?{min:Z(s.min),max:Z(s.max)}:{min:0,max:Z(s)}}}async function bi(t){t.checkVersion("4.0.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new wi))})}var Pi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Pi||(Pi={}));const xi=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Mi=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class zi{accepts(t){return t.startsWith("#")}handleColor(t){return this._parseString(t.value)}handleRangeColor(t){return this._parseString(t.value)}parseString(t){return this._parseString(t)}_parseString(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(xi,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Mi.exec(e);return i?{a:i[Pi.a]?Number.parseInt(i[Pi.a],16)/255:1,b:Number.parseInt(i[Pi.b]??"0",16),g:Number.parseInt(i[Pi.g]??"0",16),r:Number.parseInt(i[Pi.r]??"0",16)}:void 0}}async function Ci(t){t.checkVersion("4.0.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new zi)})}var Si;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Si||(Si={}));const Oi=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class ki{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:q(e.h),l:q(e.l),s:q(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Oi.exec(t);return e?si({a:e.length>4?nt(e[Si.a]):1,h:Number.parseInt(e[Si.h]??"0",10),l:Number.parseInt(e[Si.l]??"0",10),s:Number.parseInt(e[Si.s]??"0",10)}):void 0}}async function Di(t){t.checkVersion("4.0.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new ki)})}class Ii{id="move";_pluginManager;constructor(t){this._pluginManager=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Mn});return new e(this._pluginManager,t)}loadOptions(){}needsPlugin(){return!0}}async function Fi(t){t.checkVersion("4.0.1"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,Et(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new Ii(t.pluginManager))})}class Ri{container;constructor(t){this.container=t}init(t){const e=t.options.opacity;t.opacity=zt(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=q(i.speed)/o*this.container.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))}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&kt(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function Ei(t){t.checkVersion("4.0.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Ri(t)))})}class Ti{container;modes;_particleBouncePlugins;constructor(e){this.container=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this._particleBouncePlugins=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;const o=this.container;let a=!1;for(const t of this._particleBouncePlugins)if(a=t.particleBounce?.(e,s,i)??!1,a)break;if(a)return;const r=e.getPosition(),l=e.offset,c=e.getRadius(),h=bt(r,c),u=o.canvas.size;!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.direction===t.OutModeDirection.right&&e.bounds.right>=e.canvasSize.width&&i>0||e.direction===t.OutModeDirection.left&&e.bounds.left<=0&&i<0){const t=q(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,s=!0}if(!s)return;const n=e.offset.x+e.size;e.bounds.right>=e.canvasSize.width&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-n:e.bounds.left<=0&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:u,offset:l,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.direction===t.OutModeDirection.bottom&&e.bounds.bottom>=e.canvasSize.height&&i>0||e.direction===t.OutModeDirection.top&&e.bounds.top<=0&&i<0){const t=q(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,s=!0}if(!s)return;const n=e.offset.y+e.size;e.bounds.bottom>=e.canvasSize.height&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-n:e.bounds.top<=0&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:u,offset:l,size:c})}}class Ai{container;modes;constructor(e){this.container=e,this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(!this.modes.includes(n))return;const o=this.container;switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(_t(e.position,o.canvas.size,l,e.getRadius(),i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=j(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 Li{container;modes;constructor(e){this.container=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.container,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;_t(e.position,a.canvas.size,l,c,i)||e.destroy()}}}const Bi=z.origin;class Vi{container;modes;constructor(e){this.container=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const o=this.container;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;Bi.setTo(l),Bi.length=e.moveCenter.radius,Bi.angle=e.velocity.angle+Math.PI,Bi.addTo(e.moveCenter);const{dx:s,dy:n}=j(e.position,Bi);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}=j(e.position,e.moveCenter);e.direction=Math.atan2(-r,-a),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(_t(e.position,o.canvas.size,l,e.getRadius(),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}=j(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=bt(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 Ui{updaters;container;constructor(t){this.container=t,this.updaters=new Map}init(e){this._addUpdaterIfMissing(e,t.OutMode.bounce,t=>new Ti(t)),this._addUpdaterIfMissing(e,t.OutMode.out,t=>new Vi(t)),this._addUpdaterIfMissing(e,t.OutMode.destroy,t=>new Ai(t)),this._addUpdaterIfMissing(e,t.OutMode.none,t=>new Li(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this._updateOutMode(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this._updateOutMode(e,i,s.left??s.default,t.OutModeDirection.left),this._updateOutMode(e,i,s.right??s.default,t.OutModeDirection.right),this._updateOutMode(e,i,s.top??s.default,t.OutModeDirection.top)}_addUpdaterIfMissing=(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.container))};_updateOutMode=(t,e,i,s)=>{for(const n of this.updaters.values())n.update(t,s,e,i)}}async function Gi(t){t.checkVersion("4.0.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Ui(t)))})}class $i{_container;_pluginManager;constructor(t,e){this._container=e,this._pluginManager=t}init(t){const e=this._container,i=t.options,s=Mt(i.paint,t.id,i.reduceDuplicates),n=s?.color,o=n??void 0,a=s?.fill,r=s?.stroke;if(a){const i=oe.create(void 0===o?void 0:oe.create(void 0,o),a.color);t.fillEnabled=a.enable,t.fillOpacity=q(a.opacity),t.fillAnimation=i.animation;const s=Ke(this._pluginManager,i);s&&(t.fillColor=hi(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=oe.create(void 0===o?void 0:oe.create(void 0,o),r.color);t.strokeWidth=q(r.width)*e.retina.pixelRatio,t.strokeOpacity=q(r.opacity??1),t.strokeAnimation=i.animation;const s=Ke(this._pluginManager,i)??t.getFillColor();s&&(t.strokeColor=hi(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),pi(t.strokeColor,e))}}async function qi(t){t.checkVersion("4.0.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new $i(t.pluginManager,e)))})}var Ni;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Ni||(Ni={}));const Wi=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Hi{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:q(e.r),g:q(e.g),b:q(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Wi.exec(t);return e?{a:e.length>4?nt(e[Ni.a]):1,b:parseInt(e[Ni.b]??"0",10),g:parseInt(e[Ni.g]??"0",10),r:parseInt(e[Ni.r]??"0",10)}:void 0}}async function ji(t){t.checkVersion("4.0.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Hi)})}class Qi{_container;constructor(t){this._container=t}init(t){const e=this._container,i=t.options.size.animation;i.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/o*e.retina.reduceFactor,i.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))}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&kt(t,t.size,!0,t.options.size.animation.destroy,e)}}async function Xi(t){t.checkVersion("4.0.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Qi(t)))})}async function Yi(t){t.checkVersion("4.0.1"),await t.pluginManager.register(async t=>{await Promise.all([Ci(t),Di(t),ji(t),Fi(t),bi(t),qi(t),Ei(t),Gi(t),Xi(t)])})}class Zi{enable;mode;constructor(){this.mode="destination-out",this.enable=!1}load(t){F(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.enable&&(this.enable=t.enable))}}class Ji{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return zn});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 Zi),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new Zi,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Ki(t){t.checkVersion("4.0.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Ji)})}class ts{bottom;left;right;top;load(t){F(t)||(void 0!==t.bottom&&(this.bottom=H(t.bottom)),void 0!==t.left&&(this.left=H(t.left)),void 0!==t.right&&(this.right=H(t.right)),void 0!==t.top&&(this.top=H(t.top)))}}var es;!function(t){t.explode="explode",t.none="none",t.split="split"}(es||(es={}));class is{maxSizeFactor;speed;constructor(){this.maxSizeFactor=3,this.speed=2}load(t){F(t)||(void 0!==t.maxSizeFactor&&(this.maxSizeFactor=t.maxSizeFactor),void 0!==t.speed&&(this.speed=t.speed))}}class ss extends fe{constructor(){super(),this.value=3}}class ns extends fe{constructor(){super(),this.value={min:4,max:9}}}class os{count;factor;fillColor;fillColorOffset;particles;rate;sizeOffset;strokeColor;strokeColorOffset;constructor(){this.count=1,this.factor=new ss,this.rate=new ns,this.sizeOffset=!0}load(t){F(t)||(void 0!==t.fillColor&&(this.fillColor=ne.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=ne.create(this.strokeColor,t.strokeColor)),void 0!==t.count&&(this.count=t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=xt(t.particles,t=>Pt({},t)),void 0!==t.sizeOffset&&(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 as{bounds;explode;mode;split;constructor(){this.bounds=new ts,this.explode=new is,this.mode=es.none,this.split=new os}load(t){F(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 rs(t,e,i,s){return t&&s?function(t,e){const i=q(e.h??0),s=q(e.s??0),n=q(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 oe.create(void 0,{value:{hsl:{h:o<0?o+360:o,s:a,l:r}}})}(s,t):e?oe.create(void 0,e):i?oe.create(void 0,i):s?function(t){return oe.create(void 0,{value:{hsl:t}})}(s):void 0}function ls(e,i,s,n){const o=s.options.destroy;if(!o)return;const a=o.split,r=Ae(e,i,s.options),l=Mt(a.fillColor),c=Mt(a.strokeColor),h=s.getFillColor(),u=s.getStrokeColor();r.move.load({center:{x:s.position.x,y:s.position.y,mode:t.PixelMode.precise}});const d=1/q(a.factor.value);O(r.size.value)?r.size.value*=d:(r.size.value.min*=d,r.size.value.max*=d),r.load(n);const p=Mt(r.paint),f=p?.fill,g=p?.stroke,m=rs(a.fillColorOffset,l,f?.color,h),y=rs(a.strokeColorOffset,c,g?.color,u);m&&f&&(f.color=m),y&&g&&(g.color=y);const v=a.sizeOffset?H(-s.size.value,s.size.value):0,_={x:s.position.x+$(v),y:s.position.y+$(v)};return i.particles.addParticle(_,r,s.group,t=>!(t.size.value<.5)&&(t.velocity.length=$(H(s.velocity.length,t.velocity.length)),t.splitCount=(s.splitCount??0)+1,t.unbreakable=!0,t.unbreakableUntil=performance.now()+500,!0))}class cs{_container;_pluginManager;constructor(t,e){this._container=e,this._pluginManager=t}init(t){const e=this._container,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,h=e.canvas.size;n&&(c.bottom=q(n)*h.height/o),a&&(c.left=q(a)*h.width/o),r&&(c.right=q(r)*h.width/o),l&&(c.top=q(l)*h.height/o)}isEnabled(t){const e=t;return!e.destroyed||!!e.exploding}loadOptions(t,...e){t.destroy??=new as;for(const i of e)t.destroy.load(i?.destroy)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;switch(i?.mode){case es.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=q(n.rate.value),a=Mt(n.particles);for(let s=0;s<o;s++)ls(t,e,i,a)}(this._pluginManager,this._container,t);break;case es.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 hs(t){t.checkVersion("4.0.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("destroy",e=>Promise.resolve(new cs(t.pluginManager,e)))})}class us{count;delay;duration;wait;constructor(){this.wait=!1}load(t){F(t)||(void 0!==t.count&&(this.count=t.count),void 0!==t.delay&&(this.delay=H(t.delay)),void 0!==t.duration&&(this.duration=H(t.duration)),void 0!==t.wait&&(this.wait=t.wait))}}class ds{delay;quantity;constructor(){this.quantity=1,this.delay=.1}load(t){F(t)||(void 0!==t.quantity&&(this.quantity=H(t.quantity)),void 0!==t.delay&&(this.delay=H(t.delay)))}}class ps{color;opacity;constructor(){this.color=!1,this.opacity=!1}load(t){F(t)||(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class fs{options;replace;type;constructor(){this.options={},this.replace=new ps,this.type="square"}load(t){F(t)||(void 0!==t.options&&(this.options=Pt({},t.options??{})),this.replace.load(t.replace),void 0!==t.type&&(this.type=t.type))}}class gs{height;mode;width;constructor(){this.mode=t.PixelMode.percent,this.height=0,this.width=0}load(t){F(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.height&&(this.height=t.height),void 0!==t.width&&(this.width=t.width))}}class ms{fill;stroke;load(t){F(t)||(t.fill&&(this.fill??=new he,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new xe,this.stroke.load(t.stroke)))}}class ys{autoPlay;direction;domId;fill;life;name;particles;position;rate;shape;size;spawn;spawnFillColor;spawnStrokeColor;startCount;constructor(){this.autoPlay=!0,this.fill=!0,this.life=new us,this.rate=new ds,this.shape=new fs,this.spawn=new ms,this.startCount=0}load(t){F(t)||(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.size&&(this.size??=new gs,this.size.load(t.size)),void 0!==t.direction&&(this.direction=t.direction),this.domId=t.domId,void 0!==t.fill&&(this.fill=t.fill),this.life.load(t.life),this.name=t.name,this.particles=xt(t.particles,t=>Pt({},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=H(t.position.x)),void 0!==t.position.y&&(this.position.y=H(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new oe,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new oe,this.spawnStrokeColor.load(t.spawnStrokeColor)),void 0!==t.startCount&&(this.startCount=t.startCount))}}class vs{id="emitters";_instancesManager;constructor(t){this._instancesManager=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return Cn});return new e(this._instancesManager,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=xt(i.emitters,t=>{const e=new ys;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return I(e)&&!!e.length||void 0!==e}}const _s=new WeakMap;class ws{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 bs;async function Ps(t){t.checkVersion("4.0.1"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=_s.get(e);return i||(i=Promise.resolve().then(function(){return In}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw _s.delete(e),t}),_s.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return On}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new vs(e))})}!function(t){t.emitter="emitter"}(bs||(bs={}));var xs;function Ms(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"}(xs||(xs={}));class zs extends ws{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:Ms(e.x,i.width),y:Ms(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 xs.TopLeft:return{position:{x:e.x+o*t,y:e.y-s}};case xs.TopRight:return{position:{x:e.x-t,y:e.y+o*s}};case xs.BottomRight:return{position:{x:e.x+o*t,y:e.y+s}};case xs.BottomLeft:default:return{position:{x:e.x+t,y:e.y+o*s}}}}}}class Cs{generate(t,e,i,s,n){return new zs(e,i,s,n)}}async function Ss(t){t.checkVersion("4.0.1"),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 Cs)})}class Os extends fe{sync;constructor(){super(),this.sync=!1}load(t){F(t)||(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class ks extends fe{sync;constructor(){super(),this.sync=!1}load(t){F(t)||(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Ds{count;delay;duration;constructor(){this.count=0,this.delay=new Os,this.duration=new ks}load(t){F(t)||(void 0!==t.count&&(this.count=t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Is{container;constructor(t){this.container=t}init(t){const e=this.container,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?q(i.delay.value)*s/e.retina.reduceFactor*r:0,delayTime:0,duration:e.retina.reduceFactor?q(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){t.life??=new Ds;for(const i of e)t.life.load(i?.life)}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=H(0,i.width),a=H(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=q(l.delay.value)*r,s.duration=q(l.duration.value)*r)}(t,e,this.container.canvas.size)}}async function Fs(t){t.checkVersion("4.0.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new Is(t)))})}class Rs{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 Es(t){t.checkVersion("4.0.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["line"],()=>Promise.resolve(new Rs))})}class Ts{decay;enable;speed;sync;constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){F(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=H(t.speed)),void 0!==t.decay&&(this.decay=H(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class As extends fe{animation;direction;path;constructor(){super(),this.animation=new Ts,this.direction=t.RotateDirection.clockwise,this.path=!1,this.value=0}load(t){F(t)||(super.load(t),void 0!==t.direction&&(this.direction=t.direction),this.animation.load(t.animation),void 0!==t.path&&(this.path=t.path))}}class Ls{container;constructor(t){this.container=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:Z(q(i.value)),min:0,max:d},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-q(n.decay),e.rotate.velocity=q(n.speed)/360*this.container.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){t.rotate??=new As;for(const i of e)t.rotate.load(i?.rotate)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(kt(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function Bs(t){t.checkVersion("4.0.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new Ls(t)))})}const Vs="pointerdown",Us="touchstart";class Gs{loop;source;constructor(){this.loop=!1,this.source=""}load(t){F(t)||(D(t)?(void 0!==t.loop&&(this.loop=t.loop),void 0!==t.source&&(this.source=t.source)):this.source=t)}}class $s{duration;value;constructor(){this.duration=500,this.value=[]}load(t){F(t)||(void 0!==t.duration&&(this.duration=t.duration),void 0!==t.value&&(this.value=t.value))}}class qs{loop;melodies;notes;constructor(){this.loop=!1,this.melodies=[],this.notes=[]}load(t){F(t)||(void 0!==t.loop&&(this.loop=t.loop),void 0!==t.melodies&&(this.melodies=t.melodies.map(t=>{const e=new qs;return e.load(t),e})),void 0!==t.notes&&(this.notes=t.notes.map(t=>{const e=new $s;return e.load(t),e})))}}class Ns{audio;event;filter;melodies;notes;constructor(){this.event=[],this.notes=[]}load(t){if(!F(t)&&(void 0!==t.event&&(this.event=t.event),void 0!==t.audio&&(I(t.audio)?this.audio=t.audio.map(t=>{const e=new Gs;return e.load(t),e}):(this.audio=new Gs,this.audio.load(t.audio))),void 0!==t.notes&&(this.notes=t.notes.map(t=>{const e=new $s;return e.load(t),e})),void 0!==t.melodies&&(this.melodies=t.melodies.map(t=>{const e=new qs;return e.load(t),e})),t.filter))if(S(t.filter)){const e=globalThis[t.filter];k(e)&&(this.filter=e)}else this.filter=t.filter}}class Ws{height;path;style;svg;width;constructor(){this.width=24,this.height=24,this.style=""}load(t){F(t)||(void 0!==t.path&&(this.path=t.path),void 0!==t.svg&&(this.svg=t.svg),void 0!==t.width&&(this.width=t.width),void 0!==t.height&&(this.height=t.height))}}class Hs{enable;mute;unmute;volumeDown;volumeUp;constructor(){this.mute=new Ws,this.unmute=new Ws,this.volumeDown=new Ws,this.volumeUp=new Ws,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){F(t)||(void 0!==t.enable&&(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;min;step;value;constructor(){this.value=100,this.max=100,this.min=0,this.step=10}load(t){F(t)||(D(t)?(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.step&&(this.step=t.step),void 0!==t.value&&(this.value=t.value)):this.value=t)}}class Qs{autoPlay;enable;events;icons;volume;constructor(){this.autoPlay=!0,this.enable=!1,this.events=[],this.icons=new Hs,this.volume=new js}load(t){F(t)||(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.events&&(this.events=t.events.map(t=>{const e=new Ns;return e.load(t),e})),this.icons.load(t.icons),void 0!==t.volume&&this.volume.load(t.volume))}}const Xs=new Map;function Ys(t){const e=/(([A-G]b?)(\d))|pause/i.exec(t);if(!e?.length)return;const i=e[2]??e[0],s=Xs.get(i);return s?s[parseInt(e[3]??"0")]:void 0}Xs.set("C",[16.35,32.7,65.41,130.81,261.63,523.25,1046.5,2093,4186.01]),Xs.set("Db",[17.32,34.65,69.3,138.59,277.18,554.37,1108.73,2217.46,4434.92]),Xs.set("D",[18.35,36.71,73.42,146.83,293.66,587.33,1174.66,2349.32,4698.63]),Xs.set("Eb",[19.45,38.89,77.78,155.56,311.13,622.25,1244.51,2489.02,4978.03]),Xs.set("E",[20.6,41.2,82.41,164.81,329.63,659.25,1318.51,2637.02,5274.04]),Xs.set("F",[21.83,43.65,87.31,174.61,349.23,698.46,1396.91,2793.83,5587.65]),Xs.set("Gb",[23.12,46.25,92.5,185,369.99,739.99,1479.98,2959.96,5919.91]),Xs.set("G",[24.5,49,98,196,392,783.99,1567.98,3135.96,6271.93]),Xs.set("Ab",[25.96,51.91,103.83,207.65,415.3,830.61,1661.22,3322.44,6644.88]),Xs.set("A",[27.5,55,110,220,440,880,1760,3520,7040]),Xs.set("Bb",[29.14,58.27,116.54,233.08,466.16,932.33,1864.66,3729.31,7458.62]),Xs.set("B",[30.87,61.74,123.47,246.94,493.88,987.77,1975.53,3951.07,7902.13]),Xs.set("pause",[0]);let Zs=!0;const Js=()=>Zs,Ks=()=>{Zs=!1},tn=()=>{removeEventListener(Vs,tn),removeEventListener(Us,tn),Ks()};class en{id="sounds";_engine;constructor(t){this._engine=t;const e={capture:!0,once:!0};addEventListener(Vs,tn,e),addEventListener(Us,tn,e)}async getPlugin(t){const{SoundsPluginInstance:e}=await Promise.resolve().then(function(){return En});return new e(t,this._engine)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.sounds;void 0===s?.load&&(e.sounds=s=new Qs),s.load(i?.sounds)}needsPlugin(t){return t?.sounds?.enable??!1}}async function sn(t){t.checkVersion("4.0.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new en(t))})}let nn=null;async function on(t){return nn||(nn=async function(t){t.checkVersion("4.0.1"),await t.pluginManager.register(async t=>{await Promise.all([Yi(t),Es(t),Ki(t),(async t=>{await Ps(t),await Ss(t)})(t),sn(t),Bs(t),hs(t),Fs(t),qi(t)])})}(t),nn)}async function an(t,e){let i,s;return await on(gi),S(t)?(i=t,s=e??{}):(i="fireworks",s=t??{}),_i(gi,i,s)}an.create=async(t,e)=>{await on(gi);return _i(gi,t?.id??"fireworks",e??{},t??void 0)},an.init=async()=>{await on(gi)},an.version="4.0.1",globalThis.fireworks=an;const rn=globalThis;rn.__tsParticlesInternals=rn.__tsParticlesInternals??{},rn.fireworks=an;function ln(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class cn{_canvasClearPlugins;_canvasManager;_canvasPaintPlugins;_clearDrawPlugins;_colorPlugins;_container;_context;_contextSettings;_drawParticlePlugins;_drawParticlesCleanupPlugins;_drawParticlesSetupPlugins;_drawPlugins;_drawSettingsCleanupPlugins;_drawSettingsSetupPlugins;_pluginManager;_postDrawUpdaters;_preDrawUpdaters;_reusableColorStyles={};_reusablePluginColors=[void 0,void 0];_reusableTransform={};constructor(t,e,i){this._pluginManager=t,this._container=e,this._canvasManager=i,this._context=null,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesCleanupPlugins=[],this._drawParticlesSetupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[]}get settings(){return this._contextSettings}canvasClear(){this._container.actualOptions.clear&&this.draw(t=>{Ue(t,this._canvasManager.size)})}clear(){let t=!1;for(const e of this._canvasClearPlugins)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesCleanupPlugins=[],this._drawParticlesSetupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[]}draw(t){const e=this._context;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._getPluginParticleColors(t);if(o??=s,a??=n,!o&&!a)return;const r=this._container,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:u,strokeOpacity:d}=t.getOpacity(),p=this._reusableTransform,f=this._reusableColorStyles,g=o?ri(o,r.hdr,h*u):void 0,m=a?ri(a,r.hdr,d*u):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._drawParticlesSetupPlugins)i.drawParticleSetup?.(s,t,e);this._applyPreDrawUpdaters(s,t,i,u,f,p),Ge({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:u,transform:p}),this._applyPostDrawUpdaters(t);for(const i of this._drawParticlesCleanupPlugins)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this._drawParticlePlugins)je(i,s,t,e)})}drawParticles(t){const{particles:e}=this._container;this.clear(),e.update(t),this.draw(i=>{for(const e of this._drawSettingsSetupPlugins)e.drawSettingsSetup?.(i,t);for(const e of this._drawPlugins)e.draw?.(i,t);e.drawParticles(t);for(const e of this._clearDrawPlugins)e.clearDraw?.(i,t);for(const e of this._drawSettingsCleanupPlugins)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesSetupPlugins=[],this._drawParticlesCleanupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[];for(const t of this._container.plugins)(t.particleFillColor??t.particleStrokeColor)&&this._colorPlugins.push(t),t.canvasClear&&this._canvasClearPlugins.push(t),t.canvasPaint&&this._canvasPaintPlugins.push(t),t.drawParticle&&this._drawParticlePlugins.push(t),t.drawParticleSetup&&this._drawParticlesSetupPlugins.push(t),t.drawParticleCleanup&&this._drawParticlesCleanupPlugins.push(t),t.draw&&this._drawPlugins.push(t),t.drawSettingsSetup&&this._drawSettingsSetupPlugins.push(t),t.drawSettingsCleanup&&this._drawSettingsCleanupPlugins.push(t),t.clearDraw&&this._clearDrawPlugins.push(t)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this._container.particleUpdaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this._preDrawUpdaters.push(t)}paint(){let t=!1;for(const e of this._canvasPaintPlugins)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{Be(e,this._canvasManager.size,t)})}paintImage(t,e){this.draw(i=>{Ve(i,this._canvasManager.size,t,e)})}setContext(t){this._context=t,this._context&&(this._context.globalCompositeOperation=i)}setContextSettings(t){this._contextSettings=t}stop(){this.draw(t=>{Ue(t,this._canvasManager.size)})}_applyPostDrawUpdaters=t=>{for(const e of this._postDrawUpdaters)e.afterDraw?.(t)};_applyPreDrawUpdaters=(t,e,i,s,n,o)=>{for(const a of this._preDrawUpdaters){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)ln(o,t,e)}a.beforeDraw?.(e)}};_getPluginParticleColors=t=>{let e,i;for(const s of this._colorPlugins)if(!e&&s.particleFillColor&&(e=Ke(this._pluginManager,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ke(this._pluginManager,s.particleStrokeColor(t))),e&&i)break;return this._reusablePluginColors[0]=e,this._reusablePluginColors[1]=i,this._reusablePluginColors}}const hn=new WeakMap;function un(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 dn{domElement;render;renderCanvas;size;zoom=1;_container;_generated;_mutationObserver;_originalStyle;_pluginManager;_pointerEvents;_resizePlugins;_standardSize;_zoomCenter;constructor(t,e){this._pluginManager=t,this._container=e,this.render=new cn(t,e,this),this._standardSize={height:0,width:0};const i=e.retina.pixelRatio,s=this._standardSize;this.size={height:s.height*i,width:s.width*i},this._generated=!1,this._resizePlugins=[],this._pointerEvents="none"}get _fullScreen(){return this._container.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this._generated){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this._resetOriginalStyle();this.render.destroy(),this._resizePlugins=[]}getZoomCenter(){const t=this._container.retina.pixelRatio,{width:e,height:i}=this.size;return this._zoomCenter?this._zoomCenter:{x:e*a/t,y:i*a/t}}init(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=gt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this._repairStyle()}),this.resize(),this._initStyle(),this.initBackground(),this._safeMutationObserver(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.render.init()}initBackground(){const{_container:t}=this,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Ze(this._pluginManager,e.color);s.backgroundColor=n?oi(n,t.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this._resizePlugins=[];for(const t of this._container.plugins)t.resize&&this._resizePlugins.push(t)}loadCanvas(t){this._generated&&this.domElement&&this.domElement.remove();const i=this._container,s=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=s,this._generated=!!s&&"true"===s.dataset[e],this.renderCanvas=s?(t=>{const e=hn.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 hn.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(s):t;const n=this.domElement;n&&(n.ariaHidden="true",this._originalStyle=Dt(n.style));const o=this._standardSize,a=this.renderCanvas;n?(o.height=n.offsetHeight,o.width=n.offsetWidth):(o.height=a.height,o.width=a.width);const r=this._container.retina.pixelRatio,l=this.size;a.height=l.height=o.height*r,a.width=l.width=o.width*r;const c=ft("(color-gamut: p3)");this.render.setContextSettings({alpha:!0,colorSpace:c?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this.render.setContext(a.getContext("2d",this.render.settings)),this._safeMutationObserver(t=>{t.disconnect()}),i.retina.init(),this.initBackground(),this._safeMutationObserver(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})})}resize(){const t=this.domElement;if(!t)return!1;const e=this._container,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas._standardSize,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._container.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this._pointerEvents=t,this._repairStyle())}setZoom(t,e){this.zoom=t,this._zoomCenter=e}stop(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this._container,e=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),e&&await t.refresh()}_applyResizePlugins=()=>{for(const t of this._resizePlugins)t.resize?.()};_initStyle=()=>{const t=this.domElement,e=this._container.actualOptions;if(t){this._fullScreen?this._setFullScreenStyle():this._resetOriginalStyle();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")}}};_repairStyle=()=>{const t=this.domElement;if(!t)return;this._safeMutationObserver(t=>{t.disconnect()}),this._initStyle(),this.initBackground();const e=this._pointerEvents;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this._safeMutationObserver(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})};_resetOriginalStyle=()=>{const t=this.domElement,e=this._originalStyle;t&&e&&un(t,e,!0)};_safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)};_setFullScreenStyle=()=>{const t=this.domElement;t&&un(t,It(this._container.actualOptions.fullScreen.zIndex),!0)}}class pn{container;_handlers;_resizeObserver;_resizeTimeout;constructor(t){this.container=t,this._handlers={visibilityChange:()=>{this._handleVisibilityChange()},resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}_handleVisibilityChange=()=>{const t=this.container;t.actualOptions.pauseOnBlur&&(pt().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))};_handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);const t=async()=>{const t=this.container.canvas;await t.windowResize()};this._resizeTimeout=setTimeout(()=>{t()},this.container.actualOptions.resize.delay*r)};_manageListeners=t=>{const e=this._handlers;this._manageResize(t),Ft(document,n,e.visibilityChange,t,!1)};_manageResize=t=>{const e=this._handlers,i=this.container;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Ft(globalThis,s,e.resize,t);const n=i.canvas.domElement;this._resizeObserver&&!t?(n&&this._resizeObserver.unobserve(n),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&n&&(this._resizeObserver=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this._handleWindowResize()}),this._resizeObserver.observe(n))}}function fn(t){if(!mt(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)}class gn{backColor;bubble;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;slow;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;_cachedOpacityData={fillOpacity:1,opacity:1,strokeOpacity:1};_cachedPosition=M.origin;_cachedRotateData={sin:0,cos:0};_cachedTransform={a:1,b:0,c:0,d:1};_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const i=this._container,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._container.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this._container.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this._getRollColor(this.bubble.color??ci(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*a}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??q(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this._cachedOpacityData.fillOpacity=i*s*e,this._cachedOpacityData.opacity=i*e,this._cachedOpacityData.strokeOpacity=i*n*e,this._cachedOpacityData}getPosition(){return this._cachedPosition.x=this.position.x+this.offset.x,this._cachedPosition.y=this.position.y+this.offset.y,this._cachedPosition.z=this.position.z,this._cachedPosition}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this._cachedRotateData.sin=Math.sin(t),this._cachedRotateData.cos=Math.cos(t),this._cachedRotateData}getStrokeColor(){return this._getRollColor(this.bubble.color??ci(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this._cachedTransform.a=e.cos*(t.a??c.a),this._cachedTransform.b=i?e.sin*(t.b??1):t.b??c.b,this._cachedTransform.c=i?-e.sin*(t.c??1):t.c??c.c,this._cachedTransform.d=e.cos*(t.d??c.d),this._cachedTransform}init(e,i,s,n){const o=this._container;this.id=e,this.group=n,this.justWarped=!1,this.effectClose=!0,this.shapeClose=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},this.outType=t.ParticleOutType.normal,this.ignoresResizeRatio=!0;const a=o.retina.pixelRatio,r=o.actualOptions,l=Ae(this._pluginManager,o,r.particles),c=l.reduceDuplicates,u=l.effect.type,d=l.shape.type;this.effect=Mt(u,this.id,c),this.shape=Mt(d,this.id,c);const p=l.effect,f=l.shape;if(s){if(s.effect?.type){const t=Mt(s.effect.type,this.id,c);t&&(this.effect=t,p.load(s.effect))}if(s.shape?.type){const t=Mt(s.shape.type,this.id,c);t&&(this.shape=t,f.load(s.shape))}}if(this.effect===h){const t=[...this._container.effectDrawers.keys()];this.effect=t[Math.floor(A()*t.length)]}if(this.shape===h){const t=[...this._container.shapeDrawers.keys()];this.shape=t[Math.floor(A()*t.length)]}this.effectData=this.effect?function(t,e,i,s){const n=e.options[t];return Pt({close:e.close},Mt(n,i,s))}(this.effect,p,this.id,c):void 0,this.shapeData=this.shape?function(t,e,i,s){const n=e.options[t];return Pt({close:e.close},Mt(n,i,s))}(this.shape,f,this.id,c):void 0,l.load(s);const g=this.effectData;g&&l.load(g.particles);const m=this.shapeData;let y,v;m&&l.load(m.particles),this.effectClose=g?.close??l.effect.close,this.shapeClose=m?.close??l.shape.close,this.options=l,o.retina.initParticle(this),this.size=zt(this.options.size,a),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(i),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/o.zLayers,this.sides=24,this.effect&&(y=o.effectDrawers.get(this.effect)),y?.loadEffect&&y.loadEffect(this),this.shape&&(v=o.shapeDrawers.get(this.shape)),v?.loadShape&&v.loadShape(this);const _=v?.getSidesCount;_&&(this.sides=_(this)),this.spawning=!1;for(const t of o.particleUpdaters)t.init(this);y?.particleInit?.(o,this),v?.particleInit?.(o,this);for(const t of o.particleCreatedPlugins)t.particleCreated?.(this)}isInsideCanvas(){const t=this.getRadius(),e=this._container.canvas.size,i=this.position;return i.x>=-t&&i.y>=-t&&i.y<=e.height+t&&i.x<=e.width+t}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=t%d,i=e<0?e+d:e;return i>=Math.PI*a&&i<3*Math.PI*a}if(this.roll.horizontal){const e=(t+Math.PI*a)%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}if(this.roll.vertical){const e=t%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this._container.particleUpdaters)t.reset?.(this)}_calcPosition=(t,e)=>{let i=0,s=t?M.create(t.x,t.y,e):void 0;const n=this._container,o=n.particlePositionPlugins,a=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size,c=new AbortController,{signal:h}=c;for(;!h.aborted;){for(const t of o){const i=t.particlePosition?.(s,this);if(i)return M.create(i.x,i.y,e)}const t=st({size:l,position:s}),c=M.create(t.x,t.y,e);this._fixHorizontal(c,r,a.left??a.default),this._fixHorizontal(c,r,a.right??a.default),this._fixVertical(c,r,a.top??a.default),this._fixVertical(c,r,a.bottom??a.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}return s};_calculateVelocity=()=>{const e=K(this.direction).copy(),i=this.options.move;if(i.direction===t.MoveDirection.inside||i.direction===t.MoveDirection.outside)return e;const s=Z(q(i.angle.value)),n=Z(q(i.angle.offset)),o={left:n-s*a,right:n+s*a};return i.straight||(e.angle+=$(H(o.left,o.right))),i.random&&"number"==typeof i.speed&&(e.length*=A()),e};_fixHorizontal=(e,i,s)=>{fn({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this._container.canvas.size.width,setCb:t=>e.x+=t,radius:i})};_fixVertical=(e,i,s)=>{fn({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this._container.canvas.size.height,setCb:t=>e.y+=t,radius:i})};_getRollColor=t=>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;_initPosition=e=>{const i=this._container,s=Math.floor(q(this.options.zIndex.value)),n=this._calcPosition(e,U(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={...St(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=z.origin}}class mn{_cellSize;_cells=new Map;_circlePool=[];_circlePoolIdx;_pendingCellSize;_rectanglePool=[];_rectanglePoolIdx;constructor(t){this._cellSize=t,this._circlePoolIdx=0,this._rectanglePoolIdx=0}clear(){this._cells.clear();const t=this._pendingCellSize;t&&(this._cellSize=t),this._pendingCellSize=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this._cellKeyFromCoords(e,i);this._cells.has(s)||this._cells.set(s,[]),this._cells.get(s)?.push(t)}query(t,e,i=[]){const s=this._getRangeBounds(t);if(!s)return i;const n=Math.floor(s.minX/this._cellSize),o=Math.floor(s.maxX/this._cellSize),a=Math.floor(s.minY/this._cellSize),r=Math.floor(s.maxY/this._cellSize);for(let s=n;s<=o;s++)for(let n=a;n<=r;n++){const o=`${s}_${n}`,a=this._cells.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._acquireCircle(t.x,t.y,e),o=this.query(n,i,s);return this._releaseShapes(),o}queryRectangle(t,e,i,s=[]){const n=this._acquireRectangle(t.x,t.y,e.width,e.height),o=this.query(n,i,s);return this._releaseShapes(),o}setCellSize(t){this._pendingCellSize=t}_acquireCircle(t,e,i){return(this._circlePool[this._circlePoolIdx++]??=new Jt(t,e,i)).reset(t,e,i)}_acquireRectangle(t,e,i,s){return(this._rectanglePool[this._rectanglePoolIdx++]??=new Kt(t,e,i,s)).reset(t,e,i,s)}_cellKeyFromCoords(t,e){return`${Math.floor(t/this._cellSize)}_${Math.floor(e/this._cellSize)}`}_getRangeBounds(t){if(t instanceof Jt){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 Kt){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}_releaseShapes(){this._circlePoolIdx=0,this._rectanglePoolIdx=0}}class yn{checkParticlePositionPlugins;grid;_array;_container;_groupLimits;_limit;_nextId;_particleBuckets;_particleResetPlugins;_particleUpdatePlugins;_pluginManager;_pool;_postParticleUpdatePlugins;_postUpdatePlugins;_resizeFactor;_updatePlugins;_zBuckets;constructor(t,e){this._pluginManager=t,this._container=e,this._nextId=0,this._array=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._particleBuckets=new Map,this._zBuckets=this._createBuckets(this._container.zLayers),this.grid=new mn(100),this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}get count(){return this._array.length}addParticle(e,i,s,n){const o=this._container.actualOptions.particles.number.limit.mode,a=void 0===s?this._limit:this._groupLimits.get(s)??this._limit,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._pool.pop()??new gn(this._pluginManager,this._container);o.init(this._nextId,e,i,s);let a=!0;return n&&(a=n(o)),a?(this._array.push(o),this._insertParticleIntoBucket(o),this._nextId++,this._container.dispatchEvent(t.EventType.particleAdded,{particle:o}),o):void this._pool.push(o)}catch(t){Ut().warning(`error adding particle: ${t}`)}}clear(){this._array=[],this._particleBuckets.clear(),this._resetBuckets(this._container.zLayers)}destroy(){this._array=[],this._pool.length=0,this._particleBuckets.clear(),this._zBuckets=[],this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}drawParticles(t){for(let e=this._zBuckets.length-1;e>=0;e--){const i=this._zBuckets[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this._array.filter(t)}find(t){return this._array.find(t)}get(t){return this._array[t]}async init(){const t=this._container,e=t.actualOptions;this.checkParticlePositionPlugins=[],this._updatePlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._particleResetPlugins=[],this._postParticleUpdatePlugins=[],this._particleBuckets.clear(),this._resetBuckets(t.zLayers),this.grid=new mn(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this._updatePlugins.push(e),e.particleUpdate&&this._particleUpdatePlugins.push(e),e.postUpdate&&this._postUpdatePlugins.push(e),e.particleReset&&this._particleResetPlugins.push(e),e.postParticleUpdate&&this._postParticleUpdatePlugins.push(e);await this._container.initDrawersAndUpdaters();for(const e of this._container.effectDrawers.values())await(e.init?.(t));for(const e of this._container.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._container.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this._array.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._removeParticle(o,i,s)&&(o--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this._container.actualOptions,e=t.particles.groups;let i=0;for(const t of this._container.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Ae(this._pluginManager,this._container,s);this._applyDensity(n,i,t)}this._applyDensity(t.particles,i)}setResizeFactor(t){this._resizeFactor=t}update(t){this.grid.clear();for(const e of this._updatePlugins)e.update?.(t);const e=this._updateParticlesPhase1(t);for(const e of this._postUpdatePlugins)e.postUpdate?.(t);if(this._updateParticlesPhase2(t,e),e.size)for(const t of e)this.remove(t);delete this._resizeFactor}_addToPool=(...t)=>{this._pool.push(...t)};_applyDensity=(t,e,i,s)=>{const n=t.number;if(!n.density.enable)return void(void 0===i?this._limit=n.limit.value:(s?.number.limit.value??n.limit.value)&&this._groupLimits.set(i,s?.number.limit.value??n.limit.value));const o=this._initDensityFactor(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._limit=n.limit.value*o:this._groupLimits.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)};_createBuckets=t=>{const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])};_getBucketIndex=t=>{const e=this._zBuckets.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)};_getParticleInsertIndex=(t,e)=>{let i=0,s=t.length;for(;i<s;){const n=Math.floor((i+s)/2),o=t[n];o?o.id<e?i=n+1:s=n:s=n}return i};_initDensityFactor=t=>{const e=this._container;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};_insertParticleIntoBucket=t=>{const e=this._getBucketIndex(t.position.z),i=this._zBuckets[e];i&&(i.splice(this._getParticleInsertIndex(i,t.id),0,t),this._particleBuckets.set(t.id,e))};_removeParticle=(e,i,s)=>{const n=this._array[e];return!!n&&(n.group===i&&(this._array.splice(e,1),this._removeParticleFromBucket(n),n.destroy(s),this._container.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this._addToPool(n),!0))};_removeParticleFromBucket=t=>{const e=this._particleBuckets.get(t.id)??this._getBucketIndex(t.position.z),i=this._zBuckets[e];if(!i)return void this._particleBuckets.delete(t.id);const s=this._getParticleInsertIndex(i,t.id);i[s]?.id===t.id?(i.splice(s,1),this._particleBuckets.delete(t.id)):this._particleBuckets.delete(t.id)};_resetBuckets=t=>{const e=Math.max(Math.floor(t),1);if(this._zBuckets.length===e)for(const t of this._zBuckets)t.length=0;else this._zBuckets=this._createBuckets(e)};_updateParticleBucket=t=>{const e=this._getBucketIndex(t.position.z),i=this._particleBuckets.get(t.id);if(void 0===i)return void this._insertParticleIntoBucket(t);if(i===e)return;const s=this._zBuckets[i];if(s){const e=this._getParticleInsertIndex(s,t.id);s[e]?.id===t.id&&s.splice(e,1)}const n=this._zBuckets[e];n?(n.splice(this._getParticleInsertIndex(n,t.id),0,t),this._particleBuckets.set(t.id,e)):this._particleBuckets.set(t.id,e)};_updateParticlesPhase1=t=>{const e=new Set,i=this._resizeFactor;for(const s of this._array){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._particleResetPlugins)t.particleReset?.(s);for(const e of this._particleUpdatePlugins){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e};_updateParticlesPhase2=(t,e)=>{for(const i of this._array)if(i.destroyed)e.add(i);else{for(const e of this._container.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this._postParticleUpdatePlugins)e.postParticleUpdate?.(i,t);this._updateParticleBucket(i)}}}class vn{container;pixelRatio;reduceFactor;constructor(t){this.container=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.container,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=q(s.gravity.maxSpeed)*i,o.moveDrift=q(s.drift)*i,o.moveSpeed=q(s.speed)*i,o.sizeAnimationSpeed=q(e.size.animation.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 _n(t){return!t.destroyed}function wn(t,e,...i){const s=new Le(t,e);return Te(s,...i),s}var bn=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;_delay;_delayTimeout;_delta={value:0,factor:0};_dispatchCallback;_drawAnimationFrame;_duration;_eventListeners;_firstStart;_initialSourceOptions;_lastFrameTime;_lifeTime;_onDestroy;_options;_paused;_pluginManager;_smooth;_sourceOptions;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:o,sourceOptions:a}=e;this._pluginManager=s,this._dispatchCallback=i,this._onDestroy=o,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this._smooth=!1,this._delay=0,this._duration=0,this._lifeTime=0,this._firstStart=!0,this.started=!1,this.destroyed=!1,this._paused=!0,this._lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._sourceOptions=a,this._initialSourceOptions=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new vn(this),this.canvas=new dn(this._pluginManager,this),this.particles=new yn(this._pluginManager,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this._options=wn(this._pluginManager,this),this.actualOptions=wn(this._pluginManager,this),this._eventListeners=new pn(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this._paused&&!this.pageHidden&&_n(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addLifeTime(t){this._lifeTime+=t}alive(){return!this._duration||this._lifeTime<=this._duration}destroy(e=!0){if(_n(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._pluginManager.clearPlugins(this),this.destroyed=!0,this._onDestroy(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this._dispatchCallback(t,{container:this,data:e})}draw(t){if(!_n(this))return;let e=t;this._drawAnimationFrame=B(t=>{e&&(this._lastFrameTime=void 0,e=!1),this._nextFrame(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}Ut().error(`Export plugin with type ${t} not found`)}async init(){if(!_n(this))return;const e=new Map;for(const t of this._pluginManager.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this._options=wn(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=wn(this._pluginManager,this,this._options),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,hdr:o,smooth:a,zLayers:l}=this.actualOptions;this.hdr=o,this.zLayers=l,this._duration=q(s)*r,this._delay=q(i)*r,this._lifeTime=0,this.fpsLimit=n>0?n:120,this._smooth=a;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._pluginManager;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){if(_n(this)&&(void 0!==this._drawAnimationFrame&&(V(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this._paused=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!_n(this))return;const i=this._paused||e;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this._firstStart=!1}async refresh(){if(_n(this))return this.stop(),this.start()}async reset(t){if(_n(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=wn(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=wn(this._pluginManager,this,this._options),this.refresh()}async start(){_n(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this._eventListeners.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this._delayTimeout=setTimeout(()=>{i()},this._delay)}))}stop(){if(_n(this)&&this.started){this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.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._sourceOptions=this._options,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}_nextFrame=t=>{try{if(!this._smooth&&void 0!==this._lastFrameTime&&t<this._lastFrameTime+r/this.fpsLimit)return void this.draw(!1);if(this._lastFrameTime??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this._delta,t-this._lastFrameTime,this.fpsLimit,this._smooth),this.addLifeTime(this._delta.value),this._lastFrameTime=t,this._delta.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this._delta),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Ut().error("error in animation loop",t)}}}});var Pn=Object.freeze({__proto__:null,FireworksInstance:class{_container;constructor(t){this._container=t}pause(){this._container.pause()}play(){this._container.play()}stop(){this._container.stop()}}});function xn(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=U(t.velocity.x,-1,1),t.velocity.y=U(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 h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=l*s,i&&(t.velocity.y=h.y/i));const u=t.options.zIndex,d=(1-t.zIndexFactor)**u.velocityRate;h.multTo(d),h.multTo(o);const{position:p}=t;p.addTo(h),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 Mn=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=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-q(i.decay),e.pathDelay=q(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:q(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=X(i.getPosition(),o),r=q(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()*d,radius:a,acceleration:i.retina.spinAcceleration}}(this._container,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options,n=s.move;if(!n.enable)return;const o=this._container,r=o.retina.pixelRatio,l=function(t){return t.slow.inRange?t.slow.factor:1}(e),c=o.retina.reduceFactor,h=e.retina.moveSpeed,u=e.retina.moveDrift,d=W(s.size.value)*r,p=h*(n.size?e.getRadius()/d:1)*l*(i.factor||1)*a,f=e.retina.maxSpeed;n.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)}(o,e,p,c):xn(e,n,p,f,u,c,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=j(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._init()}redrawInit(){return this._init()}update(){for(const t of this.pathGenerators.values())t.update()}async _init(){const t=await(this._pluginManager.getPathGenerators?.(this._container,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var zn=Object.freeze({__proto__:null,BlendPluginInstance:class{_container;_defaultCompositeValue;constructor(t){this._container=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._defaultCompositeValue&&(t.globalCompositeOperation=this._defaultCompositeValue)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this._container.actualOptions.blend;this._defaultCompositeValue=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});var Cn=Object.freeze({__proto__:null,EmittersPluginInstance:class{container;_instancesManager;constructor(t,e){this.container=e,this._instancesManager=t,this._instancesManager.initContainer(e)}async init(){const t=this.container.actualOptions.emitters;if(I(t))for(const e of t)await this._instancesManager.addEmitter(this.container,e);else await this._instancesManager.addEmitter(this.container,t)}pause(){for(const t of this._instancesManager.getArray(this.container))t.pause()}play(){for(const t of this._instancesManager.getArray(this.container))t.play()}resize(){for(const t of this._instancesManager.getArray(this.container))t.resize()}stop(){this._instancesManager.clear(this.container)}update(t){this._instancesManager.getArray(this.container).forEach(e=>{e.update(t)})}}});const Sn=new Map;var On=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||Sn.set(t,e)}getShapeGenerator(t){return Sn.get(t)}getSupportedShapeGenerators(){return Sn.keys()}}});var kn,Dn,In=Object.freeze({__proto__:null,EmittersInstancesManager:class{_containerArrays;_pluginManager;constructor(t){this._containerArrays=new Map,this._pluginManager=t}async addEmitter(t,e,i){const s=new ys;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return Ln}),o=new n(this._pluginManager,t,e=>{this.removeEmitter(t,e)},s,i);return await o.init(),this.getArray(t).push(o),o}clear(t){this.initContainer(t),this._containerArrays.set(t,[])}getArray(t){this.initContainer(t);let e=this._containerArrays.get(t);return e||(e=[],this._containerArrays.set(t,e)),e}initContainer(t){this._containerArrays.has(t)||(this._containerArrays.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||O(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"}(kn||(kn={})),function(t){t.Block="block",t.None="none"}(Dn||(Dn={}));function Fn(t){const e=pt().createElement("img"),{clickCb:i,container:s,display:n,iconOptions:o,margin:a,options:r,pos:l,rightOffsets:c}=t,{width:h,path:u,style:d,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)+h+c.reduce((t,e)=>t+e,0)),n,r.fullScreen.zIndex+1,h,a,d),e.src=u??(p?`data:image/svg+xml;base64,${btoa(p)}`:"");return(s.canvas.domElement?.parentNode??pt().body).append(e),e.addEventListener("click",()=>{i()}),e}function Rn(t){t&&t.remove()}var En=Object.freeze({__proto__:null,SoundsPluginInstance:class{_audioMap;_audioSources;_container;_engine;_gain;_muteImg;_unmuteImg;_volume;_volumeDownImg;_volumeUpImg;constructor(t,e){this._container=t,this._engine=e,this._volume=0,this._audioSources=[],this._audioMap=new Map}async init(){const t=this._container.actualOptions.sounds;if(!t?.enable)return;if(t.autoPlay&&Js()){const t=()=>{removeEventListener(Vs,t),removeEventListener(Us,t),Ks(),this.unmute()},e={capture:!0,once:!0};addEventListener(Vs,t,e),addEventListener(Us,t,e)}this._volume=t.volume.value;const e=t.events;this._audioMap=new Map;for(const t of e){if(!t.audio)continue;const e=xt(t.audio,async t=>{const e=await fetch(t.source);if(!e.ok)return;const i=await e.arrayBuffer(),s=this._getAudioContext(),n=await s.decodeAudioData(i);this._audioMap.set(t.source,n)});e instanceof Promise?await e:await Promise.allSettled(e)}}async mute(){this._container.muted||await this.toggleMute()}async start(){const t=this._container,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()},h=i.icons.enable?Dn.Block:Dn.None;this._muteImg=Fn({container:t,options:e,pos:n,display:h,iconOptions:o,margin:10,rightOffsets:[r.width,l.width],clickCb:c}),this._unmuteImg=Fn({container:t,options:e,pos:n,display:Dn.None,iconOptions:a,margin:10,rightOffsets:[r.width,l.width],clickCb:c}),this._volumeDownImg=Fn({container:t,options:e,pos:n,display:h,iconOptions:r,margin:10,rightOffsets:[l.width],clickCb:async()=>{await this.volumeDown()}}),this._volumeUpImg=Fn({container:t,options:e,pos:n,display:h,iconOptions:l,margin:10,rightOffsets:[],clickCb:async()=>{await this.volumeUp()}}),!Js()&&i.autoPlay&&await this.unmute()}stop(){this._container.muted=!0,(async()=>{await this._mute(),Rn(this._muteImg),Rn(this._unmuteImg),Rn(this._volumeDownImg),Rn(this._volumeUpImg)})()}async toggleMute(){const t=this._container;t.muted=!t.muted,this._updateMuteIcons(),await this._updateMuteStatus()}async unmute(){this._container.muted&&await this.toggleMute()}async volumeDown(){const t=this._container,e=t.actualOptions.sounds;e?.enable&&(t.muted&&(this._volume=0),this._volume-=e.volume.step,await this._updateVolume())}async volumeUp(){const t=this._container.actualOptions.sounds;t?.enable&&(this._volume+=t.volume.step,await this._updateVolume())}_addBuffer=t=>{const e=t.createBufferSource();return this._audioSources.push(e),e};_addOscillator=t=>{const e=t.createOscillator();return this._audioSources.push(e),e};_getAudioContext(){const t=this._container;return t.audioContext??=new AudioContext,t.audioContext}_initEvents=()=>{const t=this._container,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._container!==i.container)return;if(this._container.muted||this._container.destroyed)return void xt(t.event,t=>{this._engine.removeEventListener(t,e)});if(s)return;if(t.audio){const e=Mt(t.audio);if(!e)return;this._playBuffer(e)}else if(t.melodies){const e=vt(t.melodies);if(!e)return;e.melodies.length?await Promise.allSettled(e.melodies.map(t=>this._playNote(t.notes,0,e.loop))):await this._playNote(e.notes,0,e.loop)}else if(t.notes){const e=vt(t.notes);if(!e)return;await this._playNote([e],0,!1)}})()};xt(t.event,t=>{this._engine.addEventListener(t,e)})}};_mute=async()=>{const t=this._container,e=this._getAudioContext();for(const t of this._audioSources)this._removeAudioSource(t);this._gain&&this._gain.disconnect(),await e.close(),t.audioContext=void 0,this._container.dispatchEvent(kn.mute)};_playBuffer=t=>{const e=this._audioMap.get(t.source);if(!e)return;const i=this._container.audioContext;if(!i)return;const s=this._addBuffer(i);s.loop=t.loop,s.buffer=e,s.connect(this._gain??i.destination),s.start()};_playFrequency=async(t,e)=>{if(!this._gain||this._container.muted)return;const i=this._getAudioContext(),s=this._addOscillator(i);return s.connect(this._gain),s.type="sine",s.frequency.value=t,s.start(),new Promise(t=>{setTimeout(()=>{this._removeAudioSource(s),t()},e)})};_playMuteSound=()=>{if(this._container.muted)return;const t=this._getAudioContext(),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()})};_playNote=async(t,e,i)=>{if(this._container.muted)return;const s=t[e];if(!s)return;const n=xt(s.value,async(i,s)=>this._playNoteValue(t,e,s));await(I(n)?Promise.allSettled(n):n);let o=e+1;i&&o>=t.length&&(o%=t.length),await this._playNote(t,o,i)};_playNoteValue=async(t,e,i)=>{const s=t[e];if(!s)return;const n=Mt(s.value,i,!0);if(n)try{const t=Ys(n);if(!O(t))return;await this._playFrequency(t,s.duration)}catch(t){Ut().error(t)}};_removeAudioSource=t=>{t.stop(),t.disconnect();this._audioSources.splice(this._audioSources.indexOf(t),1)};_unmute=()=>{const t=this._container.actualOptions.sounds;if(!t)return;const e=this._getAudioContext(),i=e.createGain();i.connect(e.destination),i.gain.value=t.volume.value/o,this._gain=i,this._initEvents(),this._container.dispatchEvent(kn.unmute)};_updateMuteIcons=()=>{const t=this._container,e=t.actualOptions.sounds;if(!e?.enable||!e.icons.enable)return;const i=this._muteImg,s=this._unmuteImg;i&&(i.style.display=t.muted?"block":"none"),s&&(s.style.display=t.muted?"none":"block")};_updateMuteStatus=async()=>{const t=this._container,e=this._getAudioContext();t.muted?(await e.suspend(),await this._mute()):(await e.resume(),this._unmute(),this._playMuteSound())};_updateVolume=async()=>{const t=this._container,e=t.actualOptions.sounds;if(!e?.enable)return;U(this._volume,e.volume.min,e.volume.max);let i=!1;this._volume<=0&&!t.muted?(this._volume=0,t.muted=!0,i=!0):this._volume>0&&t.muted&&(t.muted=!1,i=!0),i&&(this._updateMuteIcons(),await this._updateMuteStatus()),this._gain?.gain&&(this._gain.gain.value=this._volume/o)}}});function Tn(t,e,i,s){(t.paint??=new Me).fill={color:oe.create(void 0,{value:e}),enable:s,opacity:i}}function An(t,e,i,s){(t.paint??=new Me).stroke={color:oe.create(void 0,{value:e}),opacity:i,width:s}}var Ln=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;_container;_currentDuration;_currentEmitDelay;_currentSpawnDelay;_duration;_emitDelay;_firstSpawn;_immortal;_initialPosition;_lifeCount;_mutationObserver;_particlesOptions;_paused;_pluginManager;_removeCallback;_resizeObserver;_shape;_size;_spawnDelay;_startParticlesAdded;constructor(t,e,i,s,n){this._pluginManager=t,this._container=e,this._removeCallback=i,this._currentDuration=0,this._currentEmitDelay=0,this._currentSpawnDelay=0,this._initialPosition=n,s instanceof ys?this.options=s:(this.options=new ys,this.options.load(s)),this._spawnDelay=e.retina.reduceFactor?q(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0,this.position=this._initialPosition??this._calcPosition(),this.name=this.options.name,this.fill=this.options.fill,this._firstSpawn=!this.options.life.wait,this._startParticlesAdded=!1;const o=Pt({},this.options.particles);if(o.move??={},o.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=Ke(this._pluginManager,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=Ke(this._pluginManager,this.options.spawn.stroke.color)),this._paused=!this.options.autoPlay,this._particlesOptions=o,this._size=this._calcSize(),this.size=Ot(this._size,this._container.canvas.size),this._lifeCount=this.options.life.count??-1,this._immortal=this._lifeCount<=0,this.options.domId){const t=pt().getElementById(this.options.domId);t&&(this._mutationObserver=new MutationObserver(()=>{this.resize()}),this._resizeObserver=new ResizeObserver(()=>{this.resize()}),this._mutationObserver.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this._resizeObserver.observe(t))}const a=this.options.shape,l=this._pluginManager.emitterShapeManager?.getShapeGenerator(a.type);l&&(this._shape=l.generate(this._container,this.position,this.size,this.fill,a.options)),this._container.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this._paused=!0,this.pause()}externalPlay(){this._paused=!1,this.play()}async init(){await(this._shape?.init())}pause(){this._paused||delete this._emitDelay}play(){if(this._paused)return;if(!(this._lifeCount>0||this._immortal)&&this.options.life.count||!(this._firstSpawn||this._currentSpawnDelay>=(this._spawnDelay??0)))return;const t=this._container;if(void 0===this._emitDelay){const e=q(this.options.rate.delay);this._emitDelay=t.retina.reduceFactor?e*r/t.retina.reduceFactor:1/0}(this._lifeCount>0||this._immortal)&&this._prepareToDie()}resize(){const t=this._initialPosition,e=this._container;this.position=t&&_t(t,e.canvas.size,z.origin)?t:this._calcPosition(),this._size=this._calcSize(),this.size=Ot(this._size,e.canvas.size),this._shape?.resize(this.position,this.size)}update(t){if(this._paused)return;const e=this._container;this._firstSpawn&&(this._firstSpawn=!1,this._currentSpawnDelay=this._spawnDelay??0,this._currentEmitDelay=this._emitDelay??0),this._startParticlesAdded||(this._startParticlesAdded=!0,this._emitParticles(this.options.startCount)),void 0!==this._duration&&(this._currentDuration+=t.value,this._currentDuration>=this._duration&&(this.pause(),void 0!==this._spawnDelay&&delete this._spawnDelay,this._immortal||this._lifeCount--,this._lifeCount>0||this._immortal?(this.position=this._calcPosition(),this._shape?.resize(this.position,this.size),this._spawnDelay=e.retina.reduceFactor?q(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0):this._destroy(),this._currentDuration-=this._duration,delete this._duration)),void 0!==this._spawnDelay&&(this._currentSpawnDelay+=t.value,this._currentSpawnDelay>=this._spawnDelay&&(this._container.dispatchEvent("emitterPlay"),this.play(),this._currentSpawnDelay-=this._spawnDelay,delete this._spawnDelay)),void 0!==this._emitDelay&&(this._currentEmitDelay+=t.value,this._currentEmitDelay>=this._emitDelay&&(this._emit(),this._currentEmitDelay-=this._emitDelay))}_calcPosition(){const t=this._container;if(this.options.domId){const e=pt().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 it({size:t.canvas.size,position:this.options.position})}_calcSize(){const e=this._container;if(this.options.domId){const i=pt().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 gs;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}_destroy=()=>{this._mutationObserver?.disconnect(),this._mutationObserver=void 0,this._resizeObserver?.disconnect(),this._resizeObserver=void 0,this._removeCallback(this),this._container.dispatchEvent("emitterDestroyed",{emitter:this})};_emit(){if(this._paused)return;const t=q(this.options.rate.quantity);this._emitParticles(t)}_emitParticles(t){const e=Mt(this._particlesOptions)??{},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:q(this.options.spawn.fill.opacity),o=this.options.spawn.stroke?.color?.animation,a=void 0===this.options.spawn.stroke?.opacity?1:q(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:q(this.options.spawn.stroke.width),l=this._container.retina.reduceFactor,c=!!i,h=!!o,u=!!this._shape,d=c||h,p=d||u,f=d?{h:y,s:v,l:_}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?Pt({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=a,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this._setColorAnimation(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this._setColorAnimation(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this._setColorAnimation(i.l,this.spawnFillColor.l,f.l)),Tn(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(o&&f&&(this.spawnStrokeColor.h=this._setColorAnimation(o.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this._setColorAnimation(o.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this._setColorAnimation(o.l,this.spawnStrokeColor.l,f.l)),An(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this._shape){const e=this._shape.randomPosition();if(e){l=e.position;const i=g.replace;i.color&&e.color&&Tn(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this._container.particles.addParticle(l,t)}}_prepareToDie=()=>{if(this._paused)return;const t=void 0!==this.options.life.duration?q(this.options.life.duration):void 0;(this._lifeCount>0||this._immortal)&&void 0!==t&&t>0&&(this._duration=t*r)};_setColorAnimation=(t,e,i,s=1)=>{const n=this._container;if(!t.enable)return e;const o=$(t.offset),a=q(this.options.rate.delay),l=n.retina.reduceFactor?a*r/n.retina.reduceFactor:1/0;return(e+q(t.speed)*n.fpsLimit/l+o*s)%i}}});t.AnimatableColor=oe,t.AnimationOptions=te,t.AnimationValueWithRandom=ge,t.Background=ae,t.BaseRange=Zt,t.Circle=Jt,t.ColorAnimation=ie,t.Fill=he,t.FullScreen=re,t.HslAnimation=se,t.Move=we,t.MoveAngle=ue,t.MoveCenter=de,t.MoveGravity=pe,t.MovePath=ye,t.Opacity=Pe,t.OpacityAnimation=be,t.Options=Le,t.OptionsColor=ne,t.OutModes=ve,t.Paint=Me,t.ParticlesBounce=Ce,t.ParticlesBounceFactor=ze,t.ParticlesDensity=Se,t.ParticlesNumber=ke,t.ParticlesNumberLimit=Oe,t.ParticlesOptions=Ee,t.RangedAnimationOptions=ee,t.RangedAnimationValueWithRandom=me,t.Rectangle=Kt,t.ResizeEvent=le,t.Shape=De,t.Size=Fe,t.SizeAnimation=Ie,t.Spin=_e,t.Stroke=xe,t.ValueWithRandom=fe,t.Vector=z,t.Vector3d=M,t.ZIndex=Re,t.alterHsl=fi,t.animate=B,t.areBoundsInside=wt,t.arrayRandomIndex=yt,t.calcExactPositionOrRandomFromSize=st,t.calcExactPositionOrRandomFromSizeRanged=function(t){const e={x:void 0!==t.position?.x?q(t.position.x):void 0,y:void 0!==t.position?.y?q(t.position.y):void 0};return st({size:t.size,position:e})},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=et,t.calcPositionOrRandomFromSizeRanged=it,t.calculateBounds=bt,t.cancelAnimation=V,t.canvasFirstIndex=0,t.canvasTag=g,t.checkDistance=Y,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}=j(o,n);if(i*a+s*r<0)return;const l=-Math.atan2(r,a),c=t.mass,h=e.mass,u=t.velocity.rotate(l),d=e.velocity.rotate(l),p=tt(u,d,c,h),f=tt(d,u,c,h),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:z.create(q(t.options.bounce.horizontal.value),q(t.options.bounce.vertical.value))}},t.clamp=U,t.clear=Ue,t.cloneStyle=Dt,t.collisionVelocity=tt,t.colorMix=li,t.colorToHsl=function(t,e,i,s=!0){const n=Je(t,e,i,s);return n?ti(n):void 0},t.colorToRgb=Je,t.countOffset=1,t.decayOffset=1,t.deepExtend=Pt,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=Z,t.deleteCount=1,t.double=2,t.doublePI=d,t.drawAfterEffect=$e,t.drawBeforeEffect=qe,t.drawParticle=Ge,t.drawParticlePlugin=je,t.drawShape=Ne,t.drawShapeAfterDraw=We,t.drawShapeBeforeDraw=He,t.empty=0,t.executeOnSingleOrMultiple=xt,t.findItemFromSingleOrMultiple=function(t,e){return I(t)?t.find((t,i)=>e(t,i)):e(t,0)?t:void 0},t.fireworks=an,t.generatedAttribute=e,t.generatedFalse=f,t.generatedTrue=p,t.getDistance=X,t.getDistanceSq=Q,t.getDistances=j,t.getFullScreenStyle=It,t.getHslAnimationFromHsl=hi,t.getHslFromAnimation=ci,t.getItemMapFromInitializer=Et,t.getItemsFromInitializer=Rt,t.getLinkColor=function(t,e,i){if(i===h)return ni();if(i!==u)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return li(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return ii(t)}}},t.getLinkRandomColor=function(t,e,i,s){const n=S(e)?e:e.value;return n===h?s?Ze(t,{value:n}):i?h:u:n===u?u:Ze(t,{value:n})},t.getLogger=Ut,t.getParticleBaseVelocity=K,t.getParticleDirectionAngle=J,t.getPosition=St,t.getRandom=A,t.getRandomInRange=L,t.getRandomRgbColor=ni,t.getRangeMax=W,t.getRangeMin=N,t.getRangeValue=q,t.getSize=Ot,t.getStyleFromHsl=ri,t.getStyleFromRgb=oi,t.hMax=y,t.hMin=0,t.hPhase=60,t.half=a,t.hasMatchMedia=dt,t.hslToRgb=ii,t.hslaToRgba=si,t.identity=1,t.initParticleNumericAnimationValue=zt,t.inverseFactorNumerator=1,t.isArray=I,t.isBoolean=C,t.isFunction=k,t.isInArray=mt,t.isNull=F,t.isNumber=O,t.isObject=D,t.isPointInside=_t,t.isString=S,t.itemFromArray=vt,t.itemFromSingleOrMultiple=Mt,t.lFactor=1,t.lMax=_,t.lMin=0,t.lengthOffset=1,t.loadMinIndex=0,t.loadOptions=Te,t.loadParticlesOptions=Ae,t.loadRandomFactor=1e4,t.manageListener=Ft,t.memoize=ut,t.midColorValue=u,t.millisecondsToSeconds=r,t.minCount=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=G,t.none=0,t.one=1,t.originPoint=l,t.paintBase=Be,t.paintImage=Ve,t.parseAlpha=nt,t.percentDenominator=o,t.phaseNumerator=1,t.quarter=w,t.randomColorValue=h,t.randomInRangeValue=$,t.rangeColorToHsl=Ke,t.rangeColorToRgb=Ze,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=m,t.rgbToHsl=ti,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=pt,t.safeIntersectionObserver=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)},t.safeMatchMedia=ft,t.safeMutationObserver=gt,t.setAnimationFunctions=function(t,e){T.nextFrame=t,T.cancel=e},t.setLogger=function(t){t.debug&&(Vt.debug=Bt(t.debug)),t.error&&(Vt.error=Bt(t.error)),t.info&&(Vt.info=Bt(t.info)),t.log&&(Vt.log=Bt(t.log)),t.trace&&(Vt.trace=Bt(t.trace)),t.verbose&&(Vt.verbose=Bt(t.verbose)),t.warning&&(Vt.warning=Bt(t.warning))},t.setRandom=function(t=Math.random){E=t},t.setRangeValue=H,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Ye(t,e)?.a},t.stringToRgb=ei,t.threeQuarter=b,t.triple=3,t.tryCountIncrement=1,t.tsParticles=gi,t.updateAnimation=kt,t.updateColor=pi,t.updateColorValue=di,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{fireworks:(globalThis.__tsParticlesInternals.bundles.fireworks||{}).fireworks}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|
|
1
|
+
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.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},h="random",u="mid",d=2*Math.PI,p="true",f="false",g="canvas",m=255,y=360,v=100,_=100,w=.25,b=.75;var P;function x(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(P=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",P.bottomLeft="bottom-left",P.bottomRight="bottom-right",P.left="left",P.none="none",P.right="right",P.top="top",P.topLeft="top-left",P.topRight="top-right",P.outside="outside",P.inside="inside";class M{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 M.create(l.x,l.y,l.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this._updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this._updateFromAngle(this.angle,t)}static clone(t){return M.create(t.x,t.y,x(t))}static create(t,e,i){return"number"==typeof t?new M(t,e??l.y,i??l.z):new M(t.x,t.y,x(t))}add(t){return M.create(this.x+t.x,this.y+t.y,this.z+x(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=x(t)}copy(){return M.clone(this)}div(t){return M.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**2+this.y**2}mult(t){return M.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 M.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),l.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=x(t)}sub(t){return M.create(this.x-t.x,this.y-t.y,this.z-x(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=x(t)}_updateFromAngle(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class z extends M{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return z.create(l.x,l.y)}static clone(t){return z.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new z(t,e??l.y):new z(t.x,t.y)}}function C(t){return"boolean"==typeof t}function S(t){return"string"==typeof t}function O(t){return"number"==typeof t}function k(t){return"function"==typeof t}function D(t){return"object"==typeof t&&null!==t}function I(t){return Array.isArray(t)}function F(t){return null==t}const R=Math.PI/180;let E=Math.random;const T={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return U(E(),0,1-Number.EPSILON)}function L(t,e){return A()*(e-t)+t}function B(t){return T.nextFrame(t)}function V(t){T.cancel(t)}function U(t,e,i){return Math.min(Math.max(t,e),i)}function G(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function $(t){const e=W(t);let i=N(t);return e===i&&(i=0),L(i,e)}function q(t){return O(t)?t:$(t)}function N(t){return O(t)?t:t.min}function W(t){return O(t)?t:t.max}function H(t,e){if(t===e||void 0===e&&O(t))return t;const i=N(t),s=W(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:H(i,s)}function j(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function Q(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function X(t,e){return Math.sqrt(Q(t,e))}function Y(t,e,i){return Q(t,e)<=i*i}function Z(t){return t*R}function J(e,i,s){if(O(e))return Z(e);switch(e){case t.MoveDirection.top:return-Math.PI*a;case t.MoveDirection.topRight:return-Math.PI*w;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*w;case t.MoveDirection.bottom:return Math.PI*a;case t.MoveDirection.bottomLeft:return Math.PI*b;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*b;case t.MoveDirection.inside:return Math.atan2(s.y-i.y,s.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-s.y,i.x-s.x);default:return A()*d}}function K(t){const e=z.origin;return e.length=1,e.angle=t,e}function tt(t,e,i,s){return z.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function et(t){return{x:(t.position?.x??A()*o)*t.size.width/o,y:(t.position?.y??A()*o)*t.size.height/o}}function it(t){const e={x:void 0!==t.position?.x?q(t.position.x):void 0,y:void 0!==t.position?.y?q(t.position.y):void 0};return et({size:t.size,position:e})}function st(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}function nt(t){return t?t.endsWith("%")?parseFloat(t)/o:parseFloat(t):1}var ot,at,rt,lt,ct,ht;t.AnimationMode=void 0,(ot=t.AnimationMode||(t.AnimationMode={})).auto="auto",ot.increase="increase",ot.decrease="decrease",ot.random="random",t.AnimationStatus=void 0,(at=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",at.decreasing="decreasing",t.DestroyType=void 0,(rt=t.DestroyType||(t.DestroyType={})).none="none",rt.max="max",rt.min="min",t.OutModeDirection=void 0,(lt=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",lt.left="left",lt.right="right",lt.top="top",t.PixelMode=void 0,(ct=t.PixelMode||(t.PixelMode={})).precise="precise",ct.percent="percent",t.StartValueType=void 0,(ht=t.StartValueType||(t.StartValueType={})).max="max",ht.min="min",ht.random="random";function ut(t,e){const i=new Map,s=e?.maxSize,n=e?.ttlMs,o=e?.keyFn,a=(t,e=new WeakSet)=>{if(null===t)return"null";const i=typeof t;if("undefined"===i)return"undefined";if("number"===i||"boolean"===i||"string"===i)return JSON.stringify(t);if("function"===i)try{return t.toString()}catch{return'"[Function]"'}if("symbol"===i)try{return t.toString()}catch{return'"[Symbol]"'}if(Array.isArray(t))return`[${t.map(t=>a(t,e)).join(",")}]`;if(e.has(t))return'"[Circular]"';e.add(t);return`{${Object.keys(t).sort().map(i=>`${JSON.stringify(i)}:${a(t[i],e)}`).join(",")}}`},r=t=>o?o(t):(t=>a(t))(t);return(...e)=>{const o=r(e),a=Date.now(),l=i.get(o);if(void 0!==l){if(!(n&&a-l.ts>n))return i.delete(o),i.set(o,{value:l.value,ts:l.ts}),l.value;i.delete(o)}const c=t(...e);return i.set(o,{value:c,ts:a}),(()=>{if("number"==typeof s&&s>=0)for(;i.size>s;){const t=i.keys().next().value;if(void 0===t)break;i.delete(t)}})(),c}}function dt(){return"undefined"!=typeof matchMedia}function pt(){return globalThis.document}function ft(t){if(dt())return matchMedia(t)}function gt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function mt(t,e){return t===e||I(e)&&e.includes(t)}function yt(t){return Math.floor(A()*t.length)}function vt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:yt(t)]}function _t(t,e,i,s,n){return wt(bt(t,s??0),e,i,n)}function wt(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 bt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function Pt(t,...e){for(const i of e){if(F(i))continue;if(!D(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):D(t)&&!Array.isArray(t)||(t={});const e=Object.keys(i),s=new Set(["__proto__","constructor","prototype"]);if(!e.some(t=>{const e=i[t];return D(e)||Array.isArray(e)})){const n=i,o=t;for(const t of e)if(!s.has(t)&&t in n){const e=n[t];void 0!==e&&(o[t]=e)}continue}for(const n of e){if(s.has(n))continue;const e=t,o=i[n];e[n]=Array.isArray(o)?o.map(t=>Pt(void 0,t)):Pt(e[n],o)}}return t}function xt(t,e){return I(t)?t.map((t,i)=>e(t,i)):e(t,0)}function Mt(t,e,i){return I(t)?vt(t,e,i):t}function zt(e,i){const s=e.value,n=e.animation,o={delayTime:q(n.delay)*r,enable:n.enable,value:q(e.value)*i,max:W(s)*i,min:N(s)*i,loops:0,maxLoops:q(n.count),time:0};if(n.enable){switch(o.decay=1-q(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 Ct(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}}function St(t,e){return Ct(t,e)}function Ot(t,e){return Ct(t,e)}function kt(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;if(i.time??=0,(i.delayTime??0)>0&&i.time<(i.delayTime??0)&&(i.time+=o.value),!((i.delayTime??0)>0&&i.time<(i.delayTime??0))){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=U(i.value,r,l))}}function Dt(t){const e=pt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||F(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}const It=ut(function(t){const e=pt().createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0","pointer-events":"none"};for(const t in i){const s=i[t];void 0!==s&&e.setProperty(t,s)}return e});function Ft(t,e,i,s,n){if(s){let s={passive:!0};C(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function Rt(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 Et(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 Tt{_listeners;constructor(){this._listeners=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this._listeners.get(t);i||(i=[],this._listeners.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this._listeners.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this._listeners.get(t)}removeAllEventListeners(t){t?this._listeners.delete(t):this._listeners=new Map}removeEventListener(t,e){const i=this._listeners.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this._listeners.delete(t):i.splice(n,1))}}var At;t.EventType=void 0,(At=t.EventType||(t.EventType={})).configAdded="configAdded",At.containerInit="containerInit",At.particlesSetup="particlesSetup",At.containerStarted="containerStarted",At.containerStopped="containerStopped",At.containerDestroyed="containerDestroyed",At.containerPaused="containerPaused",At.containerPlay="containerPlay",At.containerBuilt="containerBuilt",At.particleAdded="particleAdded",At.particleDestroyed="particleDestroyed",At.particleRemoved="particleRemoved";class Lt{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;_allLoadersSet=new Set;_configs=new Map;_engine;_executedSet=new Set;_initialized=!1;_isRunningLoaders=!1;_loadPromises=new Set;constructor(t){this._engine=t}get configs(){const t={};for(const[e,i]of this._configs)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this._configs.set(i,e),this._engine.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 Et(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 Et(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return Rt(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this._initialized&&!this._isRunningLoaders){this._isRunningLoaders=!0,this._executedSet=new Set,this._allLoadersSet=new Set(this._loadPromises);try{for(const t of this._allLoadersSet)await this._runLoader(t,this._executedSet,this._allLoadersSet)}finally{this._loadPromises.clear(),this._isRunningLoaders=!1,this._initialized=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this._initialized)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this._isRunningLoaders?await this._runLoader(e,this._executedSet,this._allLoadersSet):this._loadPromises.add(e)}async _runLoader(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this._engine))}}const Bt=t=>(...e)=>{t(...e)},Vt={debug:Bt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:Bt(console.info),log:Bt(console.log),trace:Bt(console.trace),verbose:Bt(console.log),warning:Bt(console.warn)};function Ut(){return Vt}const Gt="100%";class $t{pluginManager=new Lt(this);_domArray=[];_eventDispatcher=new Tt;_initialized=!1;get items(){return this._domArray}get version(){return"4.0.3"}addEventListener(t,e){this._eventDispatcher.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._eventDispatcher.dispatchEvent(t,e)}async init(){this._initialized||(await this.pluginManager.init(),this._initialized=!0)}item(t){const{items:e}=this,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 bn}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:o,url:a}=t,r=a?await async function(t){const e=Mt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Ut().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:a,index:o}):t.options,l=Mt(r,o),{items:c}=this,h=c.findIndex(t=>t.id.description===n),u=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(u);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,u)}else c.push(u);const d="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=pt();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=Gt,s.style.height||=Gt,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||=Gt,s.style.height||=Gt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=pt();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 u.canvas.loadCanvas(d),await u.start(),u}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this._eventDispatcher.removeEventListener(t,e)}}var qt,Nt,Wt,Ht,jt,Qt,Xt,Yt;!function(t){t.circle="circle",t.rectangle="rectangle"}(qt||(qt={}));class Zt{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 Jt extends Zt{radius;constructor(t,e,i){super(t,e,qt.circle),this.radius=i}contains(t){return Y(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),o=Math.abs(i.y-e.y);if(t instanceof Jt||t.type===qt.circle){return s+t.radius>Math.hypot(n,o)}if(t instanceof Kt||t.type===qt.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 Kt extends Zt{size;constructor(t,e,i,s){super(t,e,qt.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 Jt)return t.intersects(this);if(!(t instanceof Kt))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,(Nt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Nt.counterClockwise="counter-clockwise",Nt.random="random",t.LimitMode=void 0,(Wt=t.LimitMode||(t.LimitMode={})).delete="delete",Wt.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,(jt=t.AlterType||(t.AlterType={})).darken="darken",jt.enlighten="enlighten",t.GradientType=void 0,(Qt=t.GradientType||(t.GradientType={})).linear="linear",Qt.radial="radial",Qt.random="random",t.ParticleOutType=void 0,(Xt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Xt.inside="inside",Xt.outside="outside",t.EasingType=void 0,(Yt=t.EasingType||(t.EasingType={})).easeInBack="ease-in-back",Yt.easeInBounce="ease-in-bounce",Yt.easeInCirc="ease-in-circ",Yt.easeInCubic="ease-in-cubic",Yt.easeInElastic="ease-in-elastic",Yt.easeInExpo="ease-in-expo",Yt.easeInGaussian="ease-in-gaussian",Yt.easeInLinear="ease-in-linear",Yt.easeInQuad="ease-in-quad",Yt.easeInQuart="ease-in-quart",Yt.easeInQuint="ease-in-quint",Yt.easeInSigmoid="ease-in-sigmoid",Yt.easeInSine="ease-in-sine",Yt.easeInSmoothstep="ease-in-smoothstep",Yt.easeOutBack="ease-out-back",Yt.easeOutBounce="ease-out-bounce",Yt.easeOutCirc="ease-out-circ",Yt.easeOutCubic="ease-out-cubic",Yt.easeOutElastic="ease-out-elastic",Yt.easeOutExpo="ease-out-expo",Yt.easeOutGaussian="ease-out-gaussian",Yt.easeOutLinear="ease-out-linear",Yt.easeOutQuad="ease-out-quad",Yt.easeOutQuart="ease-out-quart",Yt.easeOutQuint="ease-out-quint",Yt.easeOutSigmoid="ease-out-sigmoid",Yt.easeOutSine="ease-out-sine",Yt.easeOutSmoothstep="ease-out-smoothstep",Yt.easeInOutBack="ease-in-out-back",Yt.easeInOutBounce="ease-in-out-bounce",Yt.easeInOutCirc="ease-in-out-circ",Yt.easeInOutCubic="ease-in-out-cubic",Yt.easeInOutElastic="ease-in-out-elastic",Yt.easeInOutExpo="ease-in-out-expo",Yt.easeInOutGaussian="ease-in-out-gaussian",Yt.easeInOutLinear="ease-in-out-linear",Yt.easeInOutQuad="ease-in-out-quad",Yt.easeInOutQuart="ease-in-out-quart",Yt.easeInOutQuint="ease-in-out-quint",Yt.easeInOutSigmoid="ease-in-out-sigmoid",Yt.easeInOutSine="ease-in-out-sine",Yt.easeInOutSmoothstep="ease-in-out-smoothstep";class te{count;decay;delay;enable;speed;sync;constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){F(t)||(void 0!==t.count&&(this.count=H(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=H(t.speed)),void 0!==t.decay&&(this.decay=H(t.decay)),void 0!==t.delay&&(this.delay=H(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class ee extends te{mode;startValue;constructor(){super(),this.mode=t.AnimationMode.auto,this.startValue=t.StartValueType.random}load(t){super.load(t),F(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class ie extends te{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),F(t)||(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.offset&&(this.offset=H(t.offset)))}}class se{h=new ie(0,y);l=new ie(0,_);s=new ie(0,v);load(t){F(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class ne{value;constructor(){this.value=""}static create(t,e){const i=new ne;return i.load(t),void 0!==e&&(S(e)||I(e)?i.load({value:e}):i.load(e)),i}load(t){F(t)||F(t.value)||(this.value=t.value)}}class oe extends ne{animation;constructor(){super(),this.animation=new se}static create(t,e){const i=new oe;return i.load(t),void 0!==e&&(S(e)||I(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),F(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class ae{color;image;opacity;position;repeat;size;constructor(){this.color=new ne,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){F(t)||(void 0!==t.color&&(this.color=ne.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class re{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){F(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class le{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(t){F(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class ce{close;options;type;constructor(){this.close=!0,this.options={},this.type=[]}load(t){if(F(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Pt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class he{color;enable;opacity;constructor(){this.enable=!0,this.opacity=1}load(t){F(t)||(void 0!==t.color&&(this.color=oe.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=H(t.opacity)))}}class ue{offset;value;constructor(){this.offset=0,this.value=90}load(t){F(t)||(void 0!==t.offset&&(this.offset=H(t.offset)),void 0!==t.value&&(this.value=H(t.value)))}}class de{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=t.PixelMode.percent,this.radius=0}load(t){F(t)||(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class pe{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){F(t)||(void 0!==t.acceleration&&(this.acceleration=H(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=H(t.maxSpeed)))}}class fe{value;constructor(){this.value=0}load(t){F(t)||F(t.value)||(this.value=H(t.value))}}class ge extends fe{animation=new te;load(t){if(super.load(t),F(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class me extends ge{animation;constructor(){super(),this.animation=new ee}load(t){super.load(t)}}class ye{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new fe,this.enable=!1,this.options={}}load(t){F(t)||(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=Pt(this.options,t.options)))}}class ve{bottom;default;left;right;top;constructor(){this.default=t.OutMode.out}load(t){F(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 _e{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){F(t)||(void 0!==t.acceleration&&(this.acceleration=H(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=Pt({},t.position)))}}class we{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new ue,this.center=new de,this.decay=0,this.distance={},this.direction=t.MoveDirection.none,this.drift=0,this.enable=!1,this.gravity=new pe,this.path=new ye,this.outModes=new ve,this.random=!1,this.size=!1,this.speed=2,this.spin=new _e,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(F(t))return;this.angle.load(O(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),void 0!==t.decay&&(this.decay=H(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=O(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=H(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(D(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=H(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class be extends ee{destroy;constructor(){super(),this.destroy=t.DestroyType.none,this.speed=2}load(t){super.load(t),F(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class Pe extends me{animation;constructor(){super(),this.animation=new be,this.value=1}load(t){if(F(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class xe{color;opacity;width;constructor(){this.width=0}load(t){F(t)||(void 0!==t.color&&(this.color=oe.create(this.color,t.color)),void 0!==t.width&&(this.width=H(t.width)),void 0!==t.opacity&&(this.opacity=H(t.opacity)))}}class Me{color;fill;stroke;load(t){F(t)||(void 0!==t.color&&(this.color=oe.create(this.color,t.color)),void 0!==t.fill&&(this.fill??=new he,this.fill.load(t.fill)),void 0!==t.stroke&&(this.stroke??=new xe,this.stroke.load(t.stroke)))}}class ze extends fe{constructor(){super(),this.value=1}}class Ce{horizontal;vertical;constructor(){this.horizontal=new ze,this.vertical=new ze}load(t){F(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class Se{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(F(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.width;void 0!==e&&(this.width=e);const i=t.height;void 0!==i&&(this.height=i)}}class Oe{mode;value;constructor(){this.mode=t.LimitMode.delete,this.value=0}load(t){F(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class ke{density;limit;value;constructor(){this.density=new Se,this.limit=new Oe,this.value=0}load(t){F(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class De{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(F(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Pt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class Ie extends ee{destroy;constructor(){super(),this.destroy=t.DestroyType.none,this.speed=5}load(t){super.load(t),F(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class Fe extends me{animation;constructor(){super(),this.animation=new Ie,this.value=3}load(t){if(super.load(t),F(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Re extends fe{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),F(t)||(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class Ee{bounce;effect;groups;move;number;opacity;paint;palette;reduceDuplicates;shape;size;zIndex;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.bounce=new Ce,this.effect=new ce,this.groups={},this.move=new we,this.number=new ke,this.opacity=new Pe,this.paint=new Me,this.paint.color=new oe,this.paint.color.value="#fff",this.paint.fill=new he,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new De,this.size=new Fe,this.zIndex=new Re}load(t){if(F(t))return;if(t.palette&&(this.palette=t.palette,this._importPalette(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=Pt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number),this.opacity.load(t.opacity);const e=t.paint;if(e&&(I(e)?this.paint=xt(e,t=>{const e=new Me;return e.load(t),e}):I(this.paint)?(this.paint=new Me,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.size.load(t.size),this.zIndex.load(t.zIndex),this._container){for(const e of this._pluginManager.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this._container,this,t);const e=this._pluginManager.updaters.get(this._container);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}_importPalette=t=>{const e=this._pluginManager.getPalette(t);if(!e)return;const i=e.colors,s=(I(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function Te(t,...e){for(const i of e)t.load(i)}function Ae(t,e,...i){const s=new Ee(t,e);return Te(s,...i),s}class Le{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.autoPlay=!0,this.background=new ae,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new re,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=Ae(this._pluginManager,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new le,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(F(t))return;void 0!==t.preset&&(this.preset=t.preset,xt(this.preset,t=>{this._importPreset(t)})),void 0!==t.palette&&(this.palette=t.palette,this._importPalette(this.palette)),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.clear&&(this.clear=t.clear),void 0!==t.key&&(this.key=t.key),void 0!==t.name&&(this.name=t.name),void 0!==t.delay&&(this.delay=H(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=H(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.hdr&&(this.hdr=t.hdr),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const s=t.fullScreen;C(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=Pt(this.style,t.style),void 0!==t.smooth&&(this.smooth=t.smooth),this._pluginManager.plugins.forEach(e=>{e.loadOptions(this._container,this,t)})}_importPalette=t=>{const e=this._pluginManager.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})};_importPreset=t=>{this.load(this._pluginManager.getPreset(t))}}function Be(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(l.x,l.y,e.width,e.height)}function Ve(t,e,i,s){if(!i)return;const n=t.globalAlpha;t.globalAlpha=s,t.drawImage(i,l.x,l.y,e.width,e.height),t.globalAlpha=n}function Ue(t,e){t.clearRect(l.x,l.y,e.width,e.height)}function Ge(t){const{container:e,context:i,particle:s,delta:n,colorStyles:o,radius:a,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,u=s.getPosition(),d=s.getTransformData(l),p={x:u.x,y:u.y};i.setTransform(d.a,d.b,d.c,d.d,u.x,u.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:d,position:{...u},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;qe(y,m),He(v,m),Ne(v,m),We(v,m),$e(y,m),i.resetTransform()}function $e(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}function qe(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}function Ne(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())}function We(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}function He(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}function je(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const Qe=new Map;function Xe(t,e){let i=Qe.get(t);if(!i){if(i=e(),Qe.size>=1e3){[...Qe.keys()].slice(0,500).forEach(t=>Qe.delete(t))}Qe.set(t,i)}return i}function Ye(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Ze(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return Je(t,n.value,i,s);if(I(n.value)){const e=vt(n.value,i,s);if(!e)return;return Ze(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Je(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return n.value===h?ni():ei(t,n.value);if(I(n.value)){const e=vt(n.value,i,s);if(!e)return;return Je(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ke(t,e,i,s=!0){const n=Ze(t,e,i,s);return n?ti(n):void 0}function ti(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*=_,r.s*=v,r.h*=60,r.h<0&&(r.h+=y),r.h>=y&&(r.h-=y),r}function ei(t,e){return Ye(t,e)}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(_,t.l)),n=e/y,o=i/v,r=s/_;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const l=(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},c=r<a?r*(1+o):r+o-r*o,h=2*r-c,u=1/3,d=Math.min(m,m*l(h,c,n+u)),p=Math.min(m,m*l(h,c,n)),f=Math.min(m,m*l(h,c,n-u));return{r:Math.round(d),g:Math.round(p),b:Math.round(f)}}function si(t){const e=ii(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function ni(t){const e=t??0,i=()=>Math.floor(L(e,256));return{b:i(),g:i(),r:i()}}function oi(t,e,i){const s=i??1;return Xe(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?ai(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function ai(t,e){return`color(display-p3 ${(t.r/m).toString()} ${(t.g/m).toString()} ${(t.b/m).toString()} / ${(e??1).toString()})`}function ri(t,e,i){const s=i??1;return Xe(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e){return ai(ii(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function li(t,e,i,s){let n=t,o=e;return"r"in n||(n=ii(t)),"r"in o||(o=ii(e)),{b:G(n.b,o.b,i,s),g:G(n.g,o.g,i,s),r:G(n.r,o.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 hi(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:_}};return e&&(ui(s.h,e.h,i),ui(s.s,e.s,i),ui(s.l,e.l,i)),s}function ui(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=q(i.speed)/o*s,e.decay=1-q(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=q(i.count),e.time=0,e.delayTime=q(i.delay)*r,i.sync||(e.velocity*=A(),e.value*=A()),e.initialValue=e.value,e.offset=H(i.offset)):e.velocity=0}function di(e,i,s){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const n=e.offset?$(e.offset):0,o=(e.velocity??0)*s.factor+3.6*n,a=e.decay??1,r=e.max,l=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=o,e.value<l&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=o,e.value>r&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=r)),e.velocity&&1!==a&&(e.velocity*=a),e.value=U(e.value,l,r)}function pi(t,e){if(!t)return;const{h:i,s:s,l:n}=t;di(i,!1,e),di(s,!0,e),di(n,!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=new $t;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){F(t)||(void 0!==t.background&&(this.background=t.background),void 0!==t.colors&&(I(t.colors)?this.colors=[...t.colors]:this.colors=t.colors),void 0!==t.brightness&&(this.brightness=H(t.brightness)),void 0!==t.gravity&&(this.gravity=H(t.gravity)),void 0!==t.minHeight&&(this.minHeight=H(t.minHeight)),void 0!==t.rate&&(this.rate=H(t.rate)),void 0!==t.saturation&&(this.saturation=H(t.saturation)),void 0!==t.sounds&&(this.sounds=t.sounds),void 0!==t.speed&&(this.speed=H(t.speed)),void 0!==t.splitCount&&(this.splitCount=H(t.splitCount)))}}const yi=new Map,vi=t=>{const e=t.data;return e?.particle?.options.move.gravity.enable??!1};async function _i(e,i,s,n){const o=yi.get(i);if(o instanceof Promise)return o;if(o)return o;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:O(e.rate)?1/e.rate:{min:1/N(e.rate),max:1/W(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:H(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:H(e.gravity),enable:!0,inverse:!0,maxSpeed:150},speed:H(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 Pn}),c=new l(r);return yi.set(i,c),c})();return yi.set(i,a),a}class wi{enable;mode;constructor(){this.mode="destination-out",this.enable=!1}load(t){F(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.enable&&(this.enable=t.enable))}}class bi{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return xn});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 wi),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new wi,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Pi(t){t.checkVersion("4.0.3"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new bi)})}class xi{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:d};const n=i.circleRange;e.arc(l.x,l.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=D(s)?{min:Z(s.min),max:Z(s.max)}:{min:0,max:Z(s)}}}async function Mi(t){t.checkVersion("4.0.3"),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 Ci=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Si=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Oi{accepts(t){return t.startsWith("#")}handleColor(t){return this._parseString(t.value)}handleRangeColor(t){return this._parseString(t.value)}parseString(t){return this._parseString(t)}_parseString(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Ci,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Si.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 ki(t){t.checkVersion("4.0.3"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Oi)})}var Di;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Di||(Di={}));const Ii=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Fi{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ii(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ii({h:q(e.h),l:q(e.l),s:q(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Ii.exec(t);return e?si({a:e.length>4?nt(e[Di.a]):1,h:Number.parseInt(e[Di.h]??"0",10),l:Number.parseInt(e[Di.l]??"0",10),s:Number.parseInt(e[Di.s]??"0",10)}):void 0}}async function Ri(t){t.checkVersion("4.0.3"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Fi)})}class Ei{id="move";_pluginManager;constructor(t){this._pluginManager=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return zn});return new e(this._pluginManager,t)}loadOptions(){}needsPlugin(){return!0}}async function Ti(t){t.checkVersion("4.0.3"),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,Et(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new Ei(t.pluginManager))})}class Ai{container;constructor(t){this.container=t}init(t){const e=t.options.opacity;t.opacity=zt(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=q(i.speed)/o*this.container.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))}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&kt(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function Li(t){t.checkVersion("4.0.3"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Ai(t)))})}class Bi{container;modes;_particleBouncePlugins;constructor(e){this.container=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this._particleBouncePlugins=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;const o=this.container;let a=!1;for(const t of this._particleBouncePlugins)if(a=t.particleBounce?.(e,s,i)??!1,a)break;if(a)return;const r=e.getPosition(),l=e.offset,c=e.getRadius(),h=bt(r,c),u=o.canvas.size;!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.direction===t.OutModeDirection.right&&e.bounds.right>=e.canvasSize.width&&i>0||e.direction===t.OutModeDirection.left&&e.bounds.left<=0&&i<0){const t=q(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,s=!0}if(!s)return;const n=e.offset.x+e.size;e.bounds.right>=e.canvasSize.width&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-n:e.bounds.left<=0&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:u,offset:l,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.direction===t.OutModeDirection.bottom&&e.bounds.bottom>=e.canvasSize.height&&i>0||e.direction===t.OutModeDirection.top&&e.bounds.top<=0&&i<0){const t=q(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,s=!0}if(!s)return;const n=e.offset.y+e.size;e.bounds.bottom>=e.canvasSize.height&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-n:e.bounds.top<=0&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:u,offset:l,size:c})}}class Vi{container;modes;constructor(e){this.container=e,this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(!this.modes.includes(n))return;const o=this.container;switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(_t(e.position,o.canvas.size,l,e.getRadius(),i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=j(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 Ui{container;modes;constructor(e){this.container=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.container,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;_t(e.position,a.canvas.size,l,c,i)||e.destroy()}}}const Gi=z.origin;class $i{container;modes;constructor(e){this.container=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const o=this.container;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;Gi.setTo(l),Gi.length=e.moveCenter.radius,Gi.angle=e.velocity.angle+Math.PI,Gi.addTo(e.moveCenter);const{dx:s,dy:n}=j(e.position,Gi);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}=j(e.position,e.moveCenter);e.direction=Math.atan2(-r,-a),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(_t(e.position,o.canvas.size,l,e.getRadius(),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}=j(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=bt(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;container;constructor(t){this.container=t,this.updaters=new Map}init(e){this._addUpdaterIfMissing(e,t.OutMode.bounce,t=>new Bi(t)),this._addUpdaterIfMissing(e,t.OutMode.out,t=>new $i(t)),this._addUpdaterIfMissing(e,t.OutMode.destroy,t=>new Vi(t)),this._addUpdaterIfMissing(e,t.OutMode.none,t=>new Ui(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this._updateOutMode(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this._updateOutMode(e,i,s.left??s.default,t.OutModeDirection.left),this._updateOutMode(e,i,s.right??s.default,t.OutModeDirection.right),this._updateOutMode(e,i,s.top??s.default,t.OutModeDirection.top)}_addUpdaterIfMissing=(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.container))};_updateOutMode=(t,e,i,s)=>{for(const n of this.updaters.values())n.update(t,s,e,i)}}async function Ni(t){t.checkVersion("4.0.3"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new qi(t)))})}class Wi{_container;_pluginManager;constructor(t,e){this._container=e,this._pluginManager=t}init(t){const e=this._container,i=t.options,s=Mt(i.paint,t.id,i.reduceDuplicates),n=s?.color,o=n??void 0,a=s?.fill,r=s?.stroke;if(a){const i=oe.create(void 0===o?void 0:oe.create(void 0,o),a.color);t.fillEnabled=a.enable,t.fillOpacity=q(a.opacity),t.fillAnimation=i.animation;const s=Ke(this._pluginManager,i);s&&(t.fillColor=hi(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=oe.create(void 0===o?void 0:oe.create(void 0,o),r.color);t.strokeWidth=q(r.width)*e.retina.pixelRatio,t.strokeOpacity=q(r.opacity??1),t.strokeAnimation=i.animation;const s=Ke(this._pluginManager,i)??t.getFillColor();s&&(t.strokeColor=hi(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),pi(t.strokeColor,e))}}async function Hi(t){t.checkVersion("4.0.3"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Wi(t.pluginManager,e)))})}var ji;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(ji||(ji={}));const Qi=/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 Xi{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:q(e.r),g:q(e.g),b:q(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Qi.exec(t);return e?{a:e.length>4?nt(e[ji.a]):1,b:parseInt(e[ji.b]??"0",10),g:parseInt(e[ji.g]??"0",10),r:parseInt(e[ji.r]??"0",10)}:void 0}}async function Yi(t){t.checkVersion("4.0.3"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Xi)})}class Zi{_container;constructor(t){this._container=t}init(t){const e=this._container,i=t.options.size.animation;i.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/o*e.retina.reduceFactor,i.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))}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&kt(t,t.size,!0,t.options.size.animation.destroy,e)}}async function Ji(t){t.checkVersion("4.0.3"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Zi(t)))})}async function Ki(t){t.checkVersion("4.0.3"),await t.pluginManager.register(async t=>{await Promise.all([Pi(t),ki(t),Ri(t),Yi(t),Ti(t),Mi(t),Hi(t),Li(t),Ni(t),Ji(t)])})}class ts{bottom;left;right;top;load(t){F(t)||(void 0!==t.bottom&&(this.bottom=H(t.bottom)),void 0!==t.left&&(this.left=H(t.left)),void 0!==t.right&&(this.right=H(t.right)),void 0!==t.top&&(this.top=H(t.top)))}}var es;!function(t){t.explode="explode",t.none="none",t.split="split"}(es||(es={}));class is{maxSizeFactor;speed;constructor(){this.maxSizeFactor=3,this.speed=2}load(t){F(t)||(void 0!==t.maxSizeFactor&&(this.maxSizeFactor=t.maxSizeFactor),void 0!==t.speed&&(this.speed=t.speed))}}class ss extends fe{constructor(){super(),this.value=3}}class ns extends fe{constructor(){super(),this.value={min:4,max:9}}}class os{count;factor;fillColor;fillColorOffset;particles;rate;sizeOffset;strokeColor;strokeColorOffset;constructor(){this.count=1,this.factor=new ss,this.rate=new ns,this.sizeOffset=!0}load(t){F(t)||(void 0!==t.fillColor&&(this.fillColor=ne.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=ne.create(this.strokeColor,t.strokeColor)),void 0!==t.count&&(this.count=t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=xt(t.particles,t=>Pt({},t)),void 0!==t.sizeOffset&&(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 as{bounds;explode;mode;split;constructor(){this.bounds=new ts,this.explode=new is,this.mode=es.none,this.split=new os}load(t){F(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 rs(t,e,i,s){return t&&s?function(t,e){const i=q(e.h??0),s=q(e.s??0),n=q(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 oe.create(void 0,{value:{hsl:{h:o<0?o+360:o,s:a,l:r}}})}(s,t):e?oe.create(void 0,e):i?oe.create(void 0,i):s?function(t){return oe.create(void 0,{value:{hsl:t}})}(s):void 0}function ls(e,i,s,n){const o=s.options.destroy;if(!o)return;const a=o.split,r=Ae(e,i,s.options),l=Mt(a.fillColor),c=Mt(a.strokeColor),h=s.getFillColor(),u=s.getStrokeColor();r.move.load({center:{x:s.position.x,y:s.position.y,mode:t.PixelMode.precise}});const d=1/q(a.factor.value);O(r.size.value)?r.size.value*=d:(r.size.value.min*=d,r.size.value.max*=d),r.load(n);const p=Mt(r.paint),f=p?.fill,g=p?.stroke,m=rs(a.fillColorOffset,l,f?.color,h),y=rs(a.strokeColorOffset,c,g?.color,u);m&&f&&(f.color=m),y&&g&&(g.color=y);const v=a.sizeOffset?H(-s.size.value,s.size.value):0,_={x:s.position.x+$(v),y:s.position.y+$(v)};return i.particles.addParticle(_,r,s.group,t=>!(t.size.value<.5)&&(t.velocity.length=$(H(s.velocity.length,t.velocity.length)),t.splitCount=(s.splitCount??0)+1,t.unbreakable=!0,t.unbreakableUntil=performance.now()+500,!0))}class cs{_container;_pluginManager;constructor(t,e){this._container=e,this._pluginManager=t}init(t){const e=this._container,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,h=e.canvas.size;n&&(c.bottom=q(n)*h.height/o),a&&(c.left=q(a)*h.width/o),r&&(c.right=q(r)*h.width/o),l&&(c.top=q(l)*h.height/o)}isEnabled(t){const e=t;return!e.destroyed||!!e.exploding}loadOptions(t,...e){t.destroy??=new as;for(const i of e)t.destroy.load(i?.destroy)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;switch(i?.mode){case es.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=q(n.rate.value),a=Mt(n.particles);for(let s=0;s<o;s++)ls(t,e,i,a)}(this._pluginManager,this._container,t);break;case es.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 hs(t){t.checkVersion("4.0.3"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("destroy",e=>Promise.resolve(new cs(t.pluginManager,e)))})}class us{count;delay;duration;wait;constructor(){this.wait=!1}load(t){F(t)||(void 0!==t.count&&(this.count=t.count),void 0!==t.delay&&(this.delay=H(t.delay)),void 0!==t.duration&&(this.duration=H(t.duration)),void 0!==t.wait&&(this.wait=t.wait))}}class ds{delay;quantity;constructor(){this.quantity=1,this.delay=.1}load(t){F(t)||(void 0!==t.quantity&&(this.quantity=H(t.quantity)),void 0!==t.delay&&(this.delay=H(t.delay)))}}class ps{color;opacity;constructor(){this.color=!1,this.opacity=!1}load(t){F(t)||(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class fs{options;replace;type;constructor(){this.options={},this.replace=new ps,this.type="square"}load(t){F(t)||(void 0!==t.options&&(this.options=Pt({},t.options??{})),this.replace.load(t.replace),void 0!==t.type&&(this.type=t.type))}}class gs{height;mode;width;constructor(){this.mode=t.PixelMode.percent,this.height=0,this.width=0}load(t){F(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.height&&(this.height=t.height),void 0!==t.width&&(this.width=t.width))}}class ms{fill;stroke;load(t){F(t)||(t.fill&&(this.fill??=new he,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new xe,this.stroke.load(t.stroke)))}}class ys{autoPlay;direction;domId;fill;life;name;particles;position;rate;shape;size;spawn;spawnFillColor;spawnStrokeColor;startCount;constructor(){this.autoPlay=!0,this.fill=!0,this.life=new us,this.rate=new ds,this.shape=new fs,this.spawn=new ms,this.startCount=0}load(t){F(t)||(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.size&&(this.size??=new gs,this.size.load(t.size)),void 0!==t.direction&&(this.direction=t.direction),this.domId=t.domId,void 0!==t.fill&&(this.fill=t.fill),this.life.load(t.life),this.name=t.name,this.particles=xt(t.particles,t=>Pt({},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=H(t.position.x)),void 0!==t.position.y&&(this.position.y=H(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new oe,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new oe,this.spawnStrokeColor.load(t.spawnStrokeColor)),void 0!==t.startCount&&(this.startCount=t.startCount))}}class vs{id="emitters";_instancesManager;constructor(t){this._instancesManager=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return Cn});return new e(this._instancesManager,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=xt(i.emitters,t=>{const e=new ys;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return I(e)&&!!e.length||void 0!==e}}const _s=new WeakMap;class ws{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 bs;async function Ps(t){t.checkVersion("4.0.3"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=_s.get(e);return i||(i=Promise.resolve().then(function(){return In}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw _s.delete(e),t}),_s.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return On}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new vs(e))})}!function(t){t.emitter="emitter"}(bs||(bs={}));var xs;function Ms(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"}(xs||(xs={}));class zs extends ws{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:Ms(e.x,i.width),y:Ms(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 xs.TopLeft:return{position:{x:e.x+o*t,y:e.y-s}};case xs.TopRight:return{position:{x:e.x-t,y:e.y+o*s}};case xs.BottomRight:return{position:{x:e.x+o*t,y:e.y+s}};case xs.BottomLeft:default:return{position:{x:e.x+t,y:e.y+o*s}}}}}}class Cs{generate(t,e,i,s,n){return new zs(e,i,s,n)}}async function Ss(t){t.checkVersion("4.0.3"),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 Cs)})}class Os extends fe{sync;constructor(){super(),this.sync=!1}load(t){F(t)||(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class ks extends fe{sync;constructor(){super(),this.sync=!1}load(t){F(t)||(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Ds{count;delay;duration;constructor(){this.count=0,this.delay=new Os,this.duration=new ks}load(t){F(t)||(void 0!==t.count&&(this.count=t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Is{container;constructor(t){this.container=t}init(t){const e=this.container,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?q(i.delay.value)*s/e.retina.reduceFactor*r:0,delayTime:0,duration:e.retina.reduceFactor?q(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){t.life??=new Ds;for(const i of e)t.life.load(i?.life)}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=H(0,i.width),a=H(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=q(l.delay.value)*r,s.duration=q(l.duration.value)*r)}(t,e,this.container.canvas.size)}}async function Fs(t){t.checkVersion("4.0.3"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new Is(t)))})}class Rs{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 Es(t){t.checkVersion("4.0.3"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["line"],()=>Promise.resolve(new Rs))})}class Ts{decay;enable;speed;sync;constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){F(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=H(t.speed)),void 0!==t.decay&&(this.decay=H(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class As extends fe{animation;direction;path;constructor(){super(),this.animation=new Ts,this.direction=t.RotateDirection.clockwise,this.path=!1,this.value=0}load(t){F(t)||(super.load(t),void 0!==t.direction&&(this.direction=t.direction),this.animation.load(t.animation),void 0!==t.path&&(this.path=t.path))}}class Ls{container;constructor(t){this.container=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:Z(q(i.value)),min:0,max:d},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-q(n.decay),e.rotate.velocity=q(n.speed)/360*this.container.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){t.rotate??=new As;for(const i of e)t.rotate.load(i?.rotate)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(kt(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function Bs(t){t.checkVersion("4.0.3"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new Ls(t)))})}const Vs="pointerdown",Us="touchstart";class Gs{loop;source;constructor(){this.loop=!1,this.source=""}load(t){F(t)||(D(t)?(void 0!==t.loop&&(this.loop=t.loop),void 0!==t.source&&(this.source=t.source)):this.source=t)}}class $s{duration;value;constructor(){this.duration=500,this.value=[]}load(t){F(t)||(void 0!==t.duration&&(this.duration=t.duration),void 0!==t.value&&(this.value=t.value))}}class qs{loop;melodies;notes;constructor(){this.loop=!1,this.melodies=[],this.notes=[]}load(t){F(t)||(void 0!==t.loop&&(this.loop=t.loop),void 0!==t.melodies&&(this.melodies=t.melodies.map(t=>{const e=new qs;return e.load(t),e})),void 0!==t.notes&&(this.notes=t.notes.map(t=>{const e=new $s;return e.load(t),e})))}}class Ns{audio;event;filter;melodies;notes;constructor(){this.event=[],this.notes=[]}load(t){if(!F(t)&&(void 0!==t.event&&(this.event=t.event),void 0!==t.audio&&(I(t.audio)?this.audio=t.audio.map(t=>{const e=new Gs;return e.load(t),e}):(this.audio=new Gs,this.audio.load(t.audio))),void 0!==t.notes&&(this.notes=t.notes.map(t=>{const e=new $s;return e.load(t),e})),void 0!==t.melodies&&(this.melodies=t.melodies.map(t=>{const e=new qs;return e.load(t),e})),t.filter))if(S(t.filter)){const e=globalThis[t.filter];k(e)&&(this.filter=e)}else this.filter=t.filter}}class Ws{height;path;style;svg;width;constructor(){this.width=24,this.height=24,this.style=""}load(t){F(t)||(void 0!==t.path&&(this.path=t.path),void 0!==t.svg&&(this.svg=t.svg),void 0!==t.width&&(this.width=t.width),void 0!==t.height&&(this.height=t.height))}}class Hs{enable;mute;unmute;volumeDown;volumeUp;constructor(){this.mute=new Ws,this.unmute=new Ws,this.volumeDown=new Ws,this.volumeUp=new Ws,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){F(t)||(void 0!==t.enable&&(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;min;step;value;constructor(){this.value=100,this.max=100,this.min=0,this.step=10}load(t){F(t)||(D(t)?(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.step&&(this.step=t.step),void 0!==t.value&&(this.value=t.value)):this.value=t)}}class Qs{autoPlay;enable;events;icons;volume;constructor(){this.autoPlay=!0,this.enable=!1,this.events=[],this.icons=new Hs,this.volume=new js}load(t){F(t)||(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.events&&(this.events=t.events.map(t=>{const e=new Ns;return e.load(t),e})),this.icons.load(t.icons),void 0!==t.volume&&this.volume.load(t.volume))}}const Xs=new Map;function Ys(t){const e=/(([A-G]b?)(\d))|pause/i.exec(t);if(!e?.length)return;const i=e[2]??e[0],s=Xs.get(i);return s?s[parseInt(e[3]??"0")]:void 0}Xs.set("C",[16.35,32.7,65.41,130.81,261.63,523.25,1046.5,2093,4186.01]),Xs.set("Db",[17.32,34.65,69.3,138.59,277.18,554.37,1108.73,2217.46,4434.92]),Xs.set("D",[18.35,36.71,73.42,146.83,293.66,587.33,1174.66,2349.32,4698.63]),Xs.set("Eb",[19.45,38.89,77.78,155.56,311.13,622.25,1244.51,2489.02,4978.03]),Xs.set("E",[20.6,41.2,82.41,164.81,329.63,659.25,1318.51,2637.02,5274.04]),Xs.set("F",[21.83,43.65,87.31,174.61,349.23,698.46,1396.91,2793.83,5587.65]),Xs.set("Gb",[23.12,46.25,92.5,185,369.99,739.99,1479.98,2959.96,5919.91]),Xs.set("G",[24.5,49,98,196,392,783.99,1567.98,3135.96,6271.93]),Xs.set("Ab",[25.96,51.91,103.83,207.65,415.3,830.61,1661.22,3322.44,6644.88]),Xs.set("A",[27.5,55,110,220,440,880,1760,3520,7040]),Xs.set("Bb",[29.14,58.27,116.54,233.08,466.16,932.33,1864.66,3729.31,7458.62]),Xs.set("B",[30.87,61.74,123.47,246.94,493.88,987.77,1975.53,3951.07,7902.13]),Xs.set("pause",[0]);let Zs=!0;const Js=()=>Zs,Ks=()=>{Zs=!1},tn=()=>{removeEventListener(Vs,tn),removeEventListener(Us,tn),Ks()};class en{id="sounds";_engine;constructor(t){this._engine=t;const e={capture:!0,once:!0};addEventListener(Vs,tn,e),addEventListener(Us,tn,e)}async getPlugin(t){const{SoundsPluginInstance:e}=await Promise.resolve().then(function(){return En});return new e(t,this._engine)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.sounds;void 0===s?.load&&(e.sounds=s=new Qs),s.load(i?.sounds)}needsPlugin(t){return t?.sounds?.enable??!1}}async function sn(t){t.checkVersion("4.0.3"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new en(t))})}let nn=null;async function on(t){return nn||(nn=async function(t){t.checkVersion("4.0.3"),await t.pluginManager.register(async t=>{await Promise.all([Ki(t),Es(t),Pi(t),(async t=>{await Ps(t),await Ss(t)})(t),sn(t),Bs(t),hs(t),Fs(t),Hi(t)])})}(t),nn)}async function an(t,e){let i,s;return await on(gi),S(t)?(i=t,s=e??{}):(i="fireworks",s=t??{}),_i(gi,i,s)}an.create=async(t,e)=>{await on(gi);return _i(gi,t?.id??"fireworks",e??{},t??void 0)},an.init=async()=>{await on(gi)},an.version="4.0.3",globalThis.fireworks=an;const rn=globalThis;rn.__tsParticlesInternals=rn.__tsParticlesInternals??{},rn.fireworks=an;function ln(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class cn{_canvasClearPlugins;_canvasManager;_canvasPaintPlugins;_clearDrawPlugins;_colorPlugins;_container;_context;_contextSettings;_drawParticlePlugins;_drawParticlesCleanupPlugins;_drawParticlesSetupPlugins;_drawPlugins;_drawSettingsCleanupPlugins;_drawSettingsSetupPlugins;_pluginManager;_postDrawUpdaters;_preDrawUpdaters;_reusableColorStyles={};_reusablePluginColors=[void 0,void 0];_reusableTransform={};constructor(t,e,i){this._pluginManager=t,this._container=e,this._canvasManager=i,this._context=null,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesCleanupPlugins=[],this._drawParticlesSetupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[]}get settings(){return this._contextSettings}canvasClear(){this._container.actualOptions.clear&&this.draw(t=>{Ue(t,this._canvasManager.size)})}clear(){let t=!1;for(const e of this._canvasClearPlugins)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesCleanupPlugins=[],this._drawParticlesSetupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[]}draw(t){const e=this._context;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._getPluginParticleColors(t);if(o??=s,a??=n,!o&&!a)return;const r=this._container,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:u,strokeOpacity:d}=t.getOpacity(),p=this._reusableTransform,f=this._reusableColorStyles,g=o?ri(o,r.hdr,h*u):void 0,m=a?ri(a,r.hdr,d*u):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._drawParticlesSetupPlugins)i.drawParticleSetup?.(s,t,e);this._applyPreDrawUpdaters(s,t,i,u,f,p),Ge({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:u,transform:p}),this._applyPostDrawUpdaters(t);for(const i of this._drawParticlesCleanupPlugins)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this._drawParticlePlugins)je(i,s,t,e)})}drawParticles(t){const{particles:e}=this._container;this.clear(),e.update(t),this.draw(i=>{for(const e of this._drawSettingsSetupPlugins)e.drawSettingsSetup?.(i,t);for(const e of this._drawPlugins)e.draw?.(i,t);e.drawParticles(t);for(const e of this._clearDrawPlugins)e.clearDraw?.(i,t);for(const e of this._drawSettingsCleanupPlugins)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesSetupPlugins=[],this._drawParticlesCleanupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[];for(const t of this._container.plugins)(t.particleFillColor??t.particleStrokeColor)&&this._colorPlugins.push(t),t.canvasClear&&this._canvasClearPlugins.push(t),t.canvasPaint&&this._canvasPaintPlugins.push(t),t.drawParticle&&this._drawParticlePlugins.push(t),t.drawParticleSetup&&this._drawParticlesSetupPlugins.push(t),t.drawParticleCleanup&&this._drawParticlesCleanupPlugins.push(t),t.draw&&this._drawPlugins.push(t),t.drawSettingsSetup&&this._drawSettingsSetupPlugins.push(t),t.drawSettingsCleanup&&this._drawSettingsCleanupPlugins.push(t),t.clearDraw&&this._clearDrawPlugins.push(t)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this._container.particleUpdaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this._preDrawUpdaters.push(t)}paint(){let t=!1;for(const e of this._canvasPaintPlugins)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{Be(e,this._canvasManager.size,t)})}paintImage(t,e){this.draw(i=>{Ve(i,this._canvasManager.size,t,e)})}setContext(t){this._context=t,this._context&&(this._context.globalCompositeOperation=i)}setContextSettings(t){this._contextSettings=t}stop(){this.draw(t=>{Ue(t,this._canvasManager.size)})}_applyPostDrawUpdaters=t=>{for(const e of this._postDrawUpdaters)e.afterDraw?.(t)};_applyPreDrawUpdaters=(t,e,i,s,n,o)=>{for(const a of this._preDrawUpdaters){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)ln(o,t,e)}a.beforeDraw?.(e)}};_getPluginParticleColors=t=>{let e,i;for(const s of this._colorPlugins)if(!e&&s.particleFillColor&&(e=Ke(this._pluginManager,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ke(this._pluginManager,s.particleStrokeColor(t))),e&&i)break;return this._reusablePluginColors[0]=e,this._reusablePluginColors[1]=i,this._reusablePluginColors}}const hn=new WeakMap;function un(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 dn{domElement;render;renderCanvas;size;zoom=1;_container;_generated;_mutationObserver;_originalStyle;_pluginManager;_pointerEvents;_resizePlugins;_standardSize;_zoomCenter;constructor(t,e){this._pluginManager=t,this._container=e,this.render=new cn(t,e,this),this._standardSize={height:0,width:0};const i=e.retina.pixelRatio,s=this._standardSize;this.size={height:s.height*i,width:s.width*i},this._generated=!1,this._resizePlugins=[],this._pointerEvents="none"}get _fullScreen(){return this._container.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this._generated){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this._resetOriginalStyle();this.render.destroy(),this._resizePlugins=[]}getZoomCenter(){const t=this._container.retina.pixelRatio,{width:e,height:i}=this.size;return this._zoomCenter?this._zoomCenter:{x:e*a/t,y:i*a/t}}init(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=gt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this._repairStyle()}),this.resize(),this._initStyle(),this.initBackground(),this._safeMutationObserver(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.render.init()}initBackground(){const{_container:t}=this,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Ze(this._pluginManager,e.color);s.backgroundColor=n?oi(n,t.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this._resizePlugins=[];for(const t of this._container.plugins)t.resize&&this._resizePlugins.push(t)}loadCanvas(t){this._generated&&this.domElement&&this.domElement.remove();const i=this._container,s=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=s,this._generated=!!s&&"true"===s.dataset[e],this.renderCanvas=s?(t=>{const e=hn.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 hn.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(s):t;const n=this.domElement;n&&(n.ariaHidden="true",this._originalStyle=Dt(n.style));const o=this._standardSize,a=this.renderCanvas;n?(o.height=n.offsetHeight,o.width=n.offsetWidth):(o.height=a.height,o.width=a.width);const r=this._container.retina.pixelRatio,l=this.size;a.height=l.height=o.height*r,a.width=l.width=o.width*r;const c=ft("(color-gamut: p3)");this.render.setContextSettings({alpha:!0,colorSpace:c?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this.render.setContext(a.getContext("2d",this.render.settings)),this._safeMutationObserver(t=>{t.disconnect()}),i.retina.init(),this.initBackground(),this._safeMutationObserver(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})})}resize(){const t=this.domElement;if(!t)return!1;const e=this._container,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas._standardSize,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._container.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this._pointerEvents=t,this._repairStyle())}setZoom(t,e){this.zoom=t,this._zoomCenter=e}stop(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this._container,e=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),e&&await t.refresh()}_applyResizePlugins=()=>{for(const t of this._resizePlugins)t.resize?.()};_initStyle=()=>{const t=this.domElement,e=this._container.actualOptions;if(t){this._fullScreen?this._setFullScreenStyle():this._resetOriginalStyle();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")}}};_repairStyle=()=>{const t=this.domElement;if(!t)return;this._safeMutationObserver(t=>{t.disconnect()}),this._initStyle(),this.initBackground();const e=this._pointerEvents;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this._safeMutationObserver(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})};_resetOriginalStyle=()=>{const t=this.domElement,e=this._originalStyle;t&&e&&un(t,e,!0)};_safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)};_setFullScreenStyle=()=>{const t=this.domElement;t&&un(t,It(this._container.actualOptions.fullScreen.zIndex),!0)}}class pn{container;_handlers;_resizeObserver;_resizeTimeout;constructor(t){this.container=t,this._handlers={visibilityChange:()=>{this._handleVisibilityChange()},resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}_handleVisibilityChange=()=>{const t=this.container;t.actualOptions.pauseOnBlur&&(pt().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))};_handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);const t=async()=>{const t=this.container.canvas;await t.windowResize()};this._resizeTimeout=setTimeout(()=>{t()},this.container.actualOptions.resize.delay*r)};_manageListeners=t=>{const e=this._handlers;this._manageResize(t),Ft(document,n,e.visibilityChange,t,!1)};_manageResize=t=>{const e=this._handlers,i=this.container;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Ft(globalThis,s,e.resize,t);const n=i.canvas.domElement;this._resizeObserver&&!t?(n&&this._resizeObserver.unobserve(n),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&n&&(this._resizeObserver=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this._handleWindowResize()}),this._resizeObserver.observe(n))}}function fn(t){if(!mt(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)}class gn{backColor;bubble;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;slow;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;_cachedOpacityData={fillOpacity:1,opacity:1,strokeOpacity:1};_cachedPosition=M.origin;_cachedRotateData={sin:0,cos:0};_cachedTransform={a:1,b:0,c:0,d:1};_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const i=this._container,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._container.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this._container.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this._getRollColor(this.bubble.color??ci(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*a}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??q(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this._cachedOpacityData.fillOpacity=i*s*e,this._cachedOpacityData.opacity=i*e,this._cachedOpacityData.strokeOpacity=i*n*e,this._cachedOpacityData}getPosition(){return this._cachedPosition.x=this.position.x+this.offset.x,this._cachedPosition.y=this.position.y+this.offset.y,this._cachedPosition.z=this.position.z,this._cachedPosition}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this._cachedRotateData.sin=Math.sin(t),this._cachedRotateData.cos=Math.cos(t),this._cachedRotateData}getStrokeColor(){return this._getRollColor(this.bubble.color??ci(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this._cachedTransform.a=e.cos*(t.a??c.a),this._cachedTransform.b=i?e.sin*(t.b??1):t.b??c.b,this._cachedTransform.c=i?-e.sin*(t.c??1):t.c??c.c,this._cachedTransform.d=e.cos*(t.d??c.d),this._cachedTransform}init(e,i,s,n){const o=this._container;this.id=e,this.group=n,this.justWarped=!1,this.effectClose=!0,this.shapeClose=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},this.outType=t.ParticleOutType.normal,this.ignoresResizeRatio=!0;const a=o.retina.pixelRatio,r=o.actualOptions,l=Ae(this._pluginManager,o,r.particles),c=l.reduceDuplicates,u=l.effect.type,d=l.shape.type;this.effect=Mt(u,this.id,c),this.shape=Mt(d,this.id,c);const p=l.effect,f=l.shape;if(s){if(s.effect?.type){const t=Mt(s.effect.type,this.id,c);t&&(this.effect=t,p.load(s.effect))}if(s.shape?.type){const t=Mt(s.shape.type,this.id,c);t&&(this.shape=t,f.load(s.shape))}}if(this.effect===h){const t=[...this._container.effectDrawers.keys()];this.effect=t[Math.floor(A()*t.length)]}if(this.shape===h){const t=[...this._container.shapeDrawers.keys()];this.shape=t[Math.floor(A()*t.length)]}this.effectData=this.effect?function(t,e,i,s){const n=e.options[t];return Pt({close:e.close},Mt(n,i,s))}(this.effect,p,this.id,c):void 0,this.shapeData=this.shape?function(t,e,i,s){const n=e.options[t];return Pt({close:e.close},Mt(n,i,s))}(this.shape,f,this.id,c):void 0,l.load(s);const g=this.effectData;g&&l.load(g.particles);const m=this.shapeData;let y,v;m&&l.load(m.particles),this.effectClose=g?.close??l.effect.close,this.shapeClose=m?.close??l.shape.close,this.options=l,o.retina.initParticle(this),this.size=zt(this.options.size,a),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(i),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/o.zLayers,this.sides=24,this.effect&&(y=o.effectDrawers.get(this.effect)),y?.loadEffect&&y.loadEffect(this),this.shape&&(v=o.shapeDrawers.get(this.shape)),v?.loadShape&&v.loadShape(this);const _=v?.getSidesCount;_&&(this.sides=_(this)),this.spawning=!1;for(const t of o.particleUpdaters)t.init(this);y?.particleInit?.(o,this),v?.particleInit?.(o,this);for(const t of o.particleCreatedPlugins)t.particleCreated?.(this)}isInsideCanvas(){const t=this.getRadius(),e=this._container.canvas.size,i=this.position;return i.x>=-t&&i.y>=-t&&i.y<=e.height+t&&i.x<=e.width+t}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=t%d,i=e<0?e+d:e;return i>=Math.PI*a&&i<3*Math.PI*a}if(this.roll.horizontal){const e=(t+Math.PI*a)%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}if(this.roll.vertical){const e=t%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this._container.particleUpdaters)t.reset?.(this)}_calcPosition=(t,e)=>{let i=0,s=t?M.create(t.x,t.y,e):void 0;const n=this._container,o=n.particlePositionPlugins,a=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size,c=new AbortController,{signal:h}=c;for(;!h.aborted;){for(const t of o){const i=t.particlePosition?.(s,this);if(i)return M.create(i.x,i.y,e)}const t=st({size:l,position:s}),c=M.create(t.x,t.y,e);this._fixHorizontal(c,r,a.left??a.default),this._fixHorizontal(c,r,a.right??a.default),this._fixVertical(c,r,a.top??a.default),this._fixVertical(c,r,a.bottom??a.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}return s};_calculateVelocity=()=>{const e=K(this.direction).copy(),i=this.options.move;if(i.direction===t.MoveDirection.inside||i.direction===t.MoveDirection.outside)return e;const s=Z(q(i.angle.value)),n=Z(q(i.angle.offset)),o={left:n-s*a,right:n+s*a};return i.straight||(e.angle+=$(H(o.left,o.right))),i.random&&"number"==typeof i.speed&&(e.length*=A()),e};_fixHorizontal=(e,i,s)=>{fn({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this._container.canvas.size.width,setCb:t=>e.x+=t,radius:i})};_fixVertical=(e,i,s)=>{fn({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this._container.canvas.size.height,setCb:t=>e.y+=t,radius:i})};_getRollColor=t=>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;_initPosition=e=>{const i=this._container,s=Math.floor(q(this.options.zIndex.value)),n=this._calcPosition(e,U(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={...St(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=z.origin}}class mn{_cellSize;_cells=new Map;_circlePool=[];_circlePoolIdx;_pendingCellSize;_rectanglePool=[];_rectanglePoolIdx;constructor(t){this._cellSize=t,this._circlePoolIdx=0,this._rectanglePoolIdx=0}clear(){this._cells.clear();const t=this._pendingCellSize;t&&(this._cellSize=t),this._pendingCellSize=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this._cellKeyFromCoords(e,i);this._cells.has(s)||this._cells.set(s,[]),this._cells.get(s)?.push(t)}query(t,e,i=[]){const s=this._getRangeBounds(t);if(!s)return i;const n=Math.floor(s.minX/this._cellSize),o=Math.floor(s.maxX/this._cellSize),a=Math.floor(s.minY/this._cellSize),r=Math.floor(s.maxY/this._cellSize);for(let s=n;s<=o;s++)for(let n=a;n<=r;n++){const o=`${s}_${n}`,a=this._cells.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._acquireCircle(t.x,t.y,e),o=this.query(n,i,s);return this._releaseShapes(),o}queryRectangle(t,e,i,s=[]){const n=this._acquireRectangle(t.x,t.y,e.width,e.height),o=this.query(n,i,s);return this._releaseShapes(),o}setCellSize(t){this._pendingCellSize=t}_acquireCircle(t,e,i){return(this._circlePool[this._circlePoolIdx++]??=new Jt(t,e,i)).reset(t,e,i)}_acquireRectangle(t,e,i,s){return(this._rectanglePool[this._rectanglePoolIdx++]??=new Kt(t,e,i,s)).reset(t,e,i,s)}_cellKeyFromCoords(t,e){return`${Math.floor(t/this._cellSize)}_${Math.floor(e/this._cellSize)}`}_getRangeBounds(t){if(t instanceof Jt){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 Kt){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}_releaseShapes(){this._circlePoolIdx=0,this._rectanglePoolIdx=0}}class yn{checkParticlePositionPlugins;grid;_array;_container;_groupLimits;_limit;_nextId;_particleBuckets;_particleResetPlugins;_particleUpdatePlugins;_pluginManager;_pool;_postParticleUpdatePlugins;_postUpdatePlugins;_resizeFactor;_updatePlugins;_zBuckets;constructor(t,e){this._pluginManager=t,this._container=e,this._nextId=0,this._array=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._particleBuckets=new Map,this._zBuckets=this._createBuckets(this._container.zLayers),this.grid=new mn(100),this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}get count(){return this._array.length}addParticle(e,i,s,n){const o=this._container.actualOptions.particles.number.limit.mode,a=void 0===s?this._limit:this._groupLimits.get(s)??this._limit,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._pool.pop()??new gn(this._pluginManager,this._container);o.init(this._nextId,e,i,s);let a=!0;return n&&(a=n(o)),a?(this._array.push(o),this._insertParticleIntoBucket(o),this._nextId++,this._container.dispatchEvent(t.EventType.particleAdded,{particle:o}),o):void this._pool.push(o)}catch(t){Ut().warning(`error adding particle: ${t}`)}}clear(){this._array=[],this._particleBuckets.clear(),this._resetBuckets(this._container.zLayers)}destroy(){this._array=[],this._pool.length=0,this._particleBuckets.clear(),this._zBuckets=[],this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}drawParticles(t){for(let e=this._zBuckets.length-1;e>=0;e--){const i=this._zBuckets[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this._array.filter(t)}find(t){return this._array.find(t)}get(t){return this._array[t]}async init(){const t=this._container,e=t.actualOptions;this.checkParticlePositionPlugins=[],this._updatePlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._particleResetPlugins=[],this._postParticleUpdatePlugins=[],this._particleBuckets.clear(),this._resetBuckets(t.zLayers),this.grid=new mn(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this._updatePlugins.push(e),e.particleUpdate&&this._particleUpdatePlugins.push(e),e.postUpdate&&this._postUpdatePlugins.push(e),e.particleReset&&this._particleResetPlugins.push(e),e.postParticleUpdate&&this._postParticleUpdatePlugins.push(e);await this._container.initDrawersAndUpdaters();for(const e of this._container.effectDrawers.values())await(e.init?.(t));for(const e of this._container.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._container.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this._array.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._removeParticle(o,i,s)&&(o--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this._container.actualOptions,e=t.particles.groups;let i=0;for(const t of this._container.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Ae(this._pluginManager,this._container,s);this._applyDensity(n,i,t)}this._applyDensity(t.particles,i)}setResizeFactor(t){this._resizeFactor=t}update(t){this.grid.clear();for(const e of this._updatePlugins)e.update?.(t);const e=this._updateParticlesPhase1(t);for(const e of this._postUpdatePlugins)e.postUpdate?.(t);if(this._updateParticlesPhase2(t,e),e.size)for(const t of e)this.remove(t);delete this._resizeFactor}_addToPool=(...t)=>{this._pool.push(...t)};_applyDensity=(t,e,i,s)=>{const n=t.number;if(!n.density.enable)return void(void 0===i?this._limit=n.limit.value:(s?.number.limit.value??n.limit.value)&&this._groupLimits.set(i,s?.number.limit.value??n.limit.value));const o=this._initDensityFactor(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._limit=n.limit.value*o:this._groupLimits.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)};_createBuckets=t=>{const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])};_getBucketIndex=t=>{const e=this._zBuckets.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)};_getParticleInsertIndex=(t,e)=>{let i=0,s=t.length;for(;i<s;){const n=Math.floor((i+s)/2),o=t[n];o?o.id<e?i=n+1:s=n:s=n}return i};_initDensityFactor=t=>{const e=this._container;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};_insertParticleIntoBucket=t=>{const e=this._getBucketIndex(t.position.z),i=this._zBuckets[e];i&&(i.splice(this._getParticleInsertIndex(i,t.id),0,t),this._particleBuckets.set(t.id,e))};_removeParticle=(e,i,s)=>{const n=this._array[e];return!!n&&(n.group===i&&(this._array.splice(e,1),this._removeParticleFromBucket(n),n.destroy(s),this._container.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this._addToPool(n),!0))};_removeParticleFromBucket=t=>{const e=this._particleBuckets.get(t.id)??this._getBucketIndex(t.position.z),i=this._zBuckets[e];if(!i)return void this._particleBuckets.delete(t.id);const s=this._getParticleInsertIndex(i,t.id);i[s]?.id===t.id?(i.splice(s,1),this._particleBuckets.delete(t.id)):this._particleBuckets.delete(t.id)};_resetBuckets=t=>{const e=Math.max(Math.floor(t),1);if(this._zBuckets.length===e)for(const t of this._zBuckets)t.length=0;else this._zBuckets=this._createBuckets(e)};_updateParticleBucket=t=>{const e=this._getBucketIndex(t.position.z),i=this._particleBuckets.get(t.id);if(void 0===i)return void this._insertParticleIntoBucket(t);if(i===e)return;const s=this._zBuckets[i];if(s){const e=this._getParticleInsertIndex(s,t.id);s[e]?.id===t.id&&s.splice(e,1)}const n=this._zBuckets[e];n?(n.splice(this._getParticleInsertIndex(n,t.id),0,t),this._particleBuckets.set(t.id,e)):this._particleBuckets.set(t.id,e)};_updateParticlesPhase1=t=>{const e=new Set,i=this._resizeFactor;for(const s of this._array){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._particleResetPlugins)t.particleReset?.(s);for(const e of this._particleUpdatePlugins){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e};_updateParticlesPhase2=(t,e)=>{for(const i of this._array)if(i.destroyed)e.add(i);else{for(const e of this._container.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this._postParticleUpdatePlugins)e.postParticleUpdate?.(i,t);this._updateParticleBucket(i)}}}class vn{container;pixelRatio;reduceFactor;constructor(t){this.container=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.container,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=q(s.gravity.maxSpeed)*i,o.moveDrift=q(s.drift)*i,o.moveSpeed=q(s.speed)*i,o.sizeAnimationSpeed=q(e.size.animation.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 _n(t){return!t.destroyed}function wn(t,e,...i){const s=new Le(t,e);return Te(s,...i),s}var bn=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;_delay;_delayTimeout;_delta={value:0,factor:0};_dispatchCallback;_drawAnimationFrame;_duration;_eventListeners;_firstStart;_initialSourceOptions;_lastFrameTime;_lifeTime;_onDestroy;_options;_paused;_pluginManager;_smooth;_sourceOptions;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:o,sourceOptions:a}=e;this._pluginManager=s,this._dispatchCallback=i,this._onDestroy=o,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this._smooth=!1,this._delay=0,this._duration=0,this._lifeTime=0,this._firstStart=!0,this.started=!1,this.destroyed=!1,this._paused=!0,this._lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._sourceOptions=a,this._initialSourceOptions=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new vn(this),this.canvas=new dn(this._pluginManager,this),this.particles=new yn(this._pluginManager,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this._options=wn(this._pluginManager,this),this.actualOptions=wn(this._pluginManager,this),this._eventListeners=new pn(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this._paused&&!this.pageHidden&&_n(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addLifeTime(t){this._lifeTime+=t}alive(){return!this._duration||this._lifeTime<=this._duration}destroy(e=!0){if(_n(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._pluginManager.clearPlugins(this),this.destroyed=!0,this._onDestroy(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this._dispatchCallback(t,{container:this,data:e})}draw(t){if(!_n(this))return;let e=t;this._drawAnimationFrame=B(t=>{e&&(this._lastFrameTime=void 0,e=!1),this._nextFrame(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}Ut().error(`Export plugin with type ${t} not found`)}async init(){if(!_n(this))return;const e=new Map;for(const t of this._pluginManager.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this._options=wn(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=wn(this._pluginManager,this,this._options),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,hdr:o,smooth:a,zLayers:l}=this.actualOptions;this.hdr=o,this.zLayers=l,this._duration=q(s)*r,this._delay=q(i)*r,this._lifeTime=0,this.fpsLimit=n>0?n:120,this._smooth=a;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._pluginManager;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){if(_n(this)&&(void 0!==this._drawAnimationFrame&&(V(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this._paused=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!_n(this))return;const i=this._paused||e;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this._firstStart=!1}async refresh(){if(_n(this))return this.stop(),this.start()}async reset(t){if(_n(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=wn(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=wn(this._pluginManager,this,this._options),this.refresh()}async start(){_n(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this._eventListeners.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this._delayTimeout=setTimeout(()=>{i()},this._delay)}))}stop(){if(_n(this)&&this.started){this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.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._sourceOptions=this._options,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}_nextFrame=t=>{try{if(!this._smooth&&void 0!==this._lastFrameTime&&t<this._lastFrameTime+r/this.fpsLimit)return void this.draw(!1);if(this._lastFrameTime??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this._delta,t-this._lastFrameTime,this.fpsLimit,this._smooth),this.addLifeTime(this._delta.value),this._lastFrameTime=t,this._delta.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this._delta),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Ut().error("error in animation loop",t)}}}});var Pn=Object.freeze({__proto__:null,FireworksInstance:class{_container;constructor(t){this._container=t}pause(){this._container.pause()}play(){this._container.play()}stop(){this._container.stop()}}});var xn=Object.freeze({__proto__:null,BlendPluginInstance:class{_container;_defaultCompositeValue;constructor(t){this._container=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._defaultCompositeValue&&(t.globalCompositeOperation=this._defaultCompositeValue)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this._container.actualOptions.blend;this._defaultCompositeValue=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function Mn(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=U(t.velocity.x,-1,1),t.velocity.y=U(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 h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=l*s,i&&(t.velocity.y=h.y/i));const u=t.options.zIndex,d=(1-t.zIndexFactor)**u.velocityRate;h.multTo(d),h.multTo(o);const{position:p}=t;p.addTo(h),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 zn=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=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-q(i.decay),e.pathDelay=q(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:q(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=X(i.getPosition(),o),r=q(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()*d,radius:a,acceleration:i.retina.spinAcceleration}}(this._container,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options,n=s.move;if(!n.enable)return;const o=this._container,r=o.retina.pixelRatio,l=function(t){return t.slow.inRange?t.slow.factor:1}(e),c=o.retina.reduceFactor,h=e.retina.moveSpeed,u=e.retina.moveDrift,d=W(s.size.value)*r,p=h*(n.size?e.getRadius()/d:1)*l*(i.factor||1)*a,f=e.retina.maxSpeed;n.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)}(o,e,p,c):Mn(e,n,p,f,u,c,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=j(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._init()}redrawInit(){return this._init()}update(){for(const t of this.pathGenerators.values())t.update()}async _init(){const t=await(this._pluginManager.getPathGenerators?.(this._container,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var Cn=Object.freeze({__proto__:null,EmittersPluginInstance:class{container;_instancesManager;constructor(t,e){this.container=e,this._instancesManager=t,this._instancesManager.initContainer(e)}async init(){const t=this.container.actualOptions.emitters;if(I(t))for(const e of t)await this._instancesManager.addEmitter(this.container,e);else await this._instancesManager.addEmitter(this.container,t)}pause(){for(const t of this._instancesManager.getArray(this.container))t.pause()}play(){for(const t of this._instancesManager.getArray(this.container))t.play()}resize(){for(const t of this._instancesManager.getArray(this.container))t.resize()}stop(){this._instancesManager.clear(this.container)}update(t){this._instancesManager.getArray(this.container).forEach(e=>{e.update(t)})}}});const Sn=new Map;var On=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||Sn.set(t,e)}getShapeGenerator(t){return Sn.get(t)}getSupportedShapeGenerators(){return Sn.keys()}}});var kn,Dn,In=Object.freeze({__proto__:null,EmittersInstancesManager:class{_containerArrays;_pluginManager;constructor(t){this._containerArrays=new Map,this._pluginManager=t}async addEmitter(t,e,i){const s=new ys;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return Ln}),o=new n(this._pluginManager,t,e=>{this.removeEmitter(t,e)},s,i);return await o.init(),this.getArray(t).push(o),o}clear(t){this.initContainer(t),this._containerArrays.set(t,[])}getArray(t){this.initContainer(t);let e=this._containerArrays.get(t);return e||(e=[],this._containerArrays.set(t,e)),e}initContainer(t){this._containerArrays.has(t)||(this._containerArrays.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||O(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"}(kn||(kn={})),function(t){t.Block="block",t.None="none"}(Dn||(Dn={}));function Fn(t){const e=pt().createElement("img"),{clickCb:i,container:s,display:n,iconOptions:o,margin:a,options:r,pos:l,rightOffsets:c}=t,{width:h,path:u,style:d,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)+h+c.reduce((t,e)=>t+e,0)),n,r.fullScreen.zIndex+1,h,a,d),e.src=u??(p?`data:image/svg+xml;base64,${btoa(p)}`:"");return(s.canvas.domElement?.parentNode??pt().body).append(e),e.addEventListener("click",()=>{i()}),e}function Rn(t){t&&t.remove()}var En=Object.freeze({__proto__:null,SoundsPluginInstance:class{_audioMap;_audioSources;_container;_engine;_gain;_muteImg;_unmuteImg;_volume;_volumeDownImg;_volumeUpImg;constructor(t,e){this._container=t,this._engine=e,this._volume=0,this._audioSources=[],this._audioMap=new Map}async init(){const t=this._container.actualOptions.sounds;if(!t?.enable)return;if(t.autoPlay&&Js()){const t=()=>{removeEventListener(Vs,t),removeEventListener(Us,t),Ks(),this.unmute()},e={capture:!0,once:!0};addEventListener(Vs,t,e),addEventListener(Us,t,e)}this._volume=t.volume.value;const e=t.events;this._audioMap=new Map;for(const t of e){if(!t.audio)continue;const e=xt(t.audio,async t=>{const e=await fetch(t.source);if(!e.ok)return;const i=await e.arrayBuffer(),s=this._getAudioContext(),n=await s.decodeAudioData(i);this._audioMap.set(t.source,n)});e instanceof Promise?await e:await Promise.allSettled(e)}}async mute(){this._container.muted||await this.toggleMute()}async start(){const t=this._container,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()},h=i.icons.enable?Dn.Block:Dn.None;this._muteImg=Fn({container:t,options:e,pos:n,display:h,iconOptions:o,margin:10,rightOffsets:[r.width,l.width],clickCb:c}),this._unmuteImg=Fn({container:t,options:e,pos:n,display:Dn.None,iconOptions:a,margin:10,rightOffsets:[r.width,l.width],clickCb:c}),this._volumeDownImg=Fn({container:t,options:e,pos:n,display:h,iconOptions:r,margin:10,rightOffsets:[l.width],clickCb:async()=>{await this.volumeDown()}}),this._volumeUpImg=Fn({container:t,options:e,pos:n,display:h,iconOptions:l,margin:10,rightOffsets:[],clickCb:async()=>{await this.volumeUp()}}),!Js()&&i.autoPlay&&await this.unmute()}stop(){this._container.muted=!0,(async()=>{await this._mute(),Rn(this._muteImg),Rn(this._unmuteImg),Rn(this._volumeDownImg),Rn(this._volumeUpImg)})()}async toggleMute(){const t=this._container;t.muted=!t.muted,this._updateMuteIcons(),await this._updateMuteStatus()}async unmute(){this._container.muted&&await this.toggleMute()}async volumeDown(){const t=this._container,e=t.actualOptions.sounds;e?.enable&&(t.muted&&(this._volume=0),this._volume-=e.volume.step,await this._updateVolume())}async volumeUp(){const t=this._container.actualOptions.sounds;t?.enable&&(this._volume+=t.volume.step,await this._updateVolume())}_addBuffer=t=>{const e=t.createBufferSource();return this._audioSources.push(e),e};_addOscillator=t=>{const e=t.createOscillator();return this._audioSources.push(e),e};_getAudioContext(){const t=this._container;return t.audioContext??=new AudioContext,t.audioContext}_initEvents=()=>{const t=this._container,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._container!==i.container)return;if(this._container.muted||this._container.destroyed)return void xt(t.event,t=>{this._engine.removeEventListener(t,e)});if(s)return;if(t.audio){const e=Mt(t.audio);if(!e)return;this._playBuffer(e)}else if(t.melodies){const e=vt(t.melodies);if(!e)return;e.melodies.length?await Promise.allSettled(e.melodies.map(t=>this._playNote(t.notes,0,e.loop))):await this._playNote(e.notes,0,e.loop)}else if(t.notes){const e=vt(t.notes);if(!e)return;await this._playNote([e],0,!1)}})()};xt(t.event,t=>{this._engine.addEventListener(t,e)})}};_mute=async()=>{const t=this._container,e=this._getAudioContext();for(const t of this._audioSources)this._removeAudioSource(t);this._gain&&this._gain.disconnect(),await e.close(),t.audioContext=void 0,this._container.dispatchEvent(kn.mute)};_playBuffer=t=>{const e=this._audioMap.get(t.source);if(!e)return;const i=this._container.audioContext;if(!i)return;const s=this._addBuffer(i);s.loop=t.loop,s.buffer=e,s.connect(this._gain??i.destination),s.start()};_playFrequency=async(t,e)=>{if(!this._gain||this._container.muted)return;const i=this._getAudioContext(),s=this._addOscillator(i);return s.connect(this._gain),s.type="sine",s.frequency.value=t,s.start(),new Promise(t=>{setTimeout(()=>{this._removeAudioSource(s),t()},e)})};_playMuteSound=()=>{if(this._container.muted)return;const t=this._getAudioContext(),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()})};_playNote=async(t,e,i)=>{if(this._container.muted)return;const s=t[e];if(!s)return;const n=xt(s.value,async(i,s)=>this._playNoteValue(t,e,s));await(I(n)?Promise.allSettled(n):n);let o=e+1;i&&o>=t.length&&(o%=t.length),await this._playNote(t,o,i)};_playNoteValue=async(t,e,i)=>{const s=t[e];if(!s)return;const n=Mt(s.value,i,!0);if(n)try{const t=Ys(n);if(!O(t))return;await this._playFrequency(t,s.duration)}catch(t){Ut().error(t)}};_removeAudioSource=t=>{t.stop(),t.disconnect();this._audioSources.splice(this._audioSources.indexOf(t),1)};_unmute=()=>{const t=this._container.actualOptions.sounds;if(!t)return;const e=this._getAudioContext(),i=e.createGain();i.connect(e.destination),i.gain.value=t.volume.value/o,this._gain=i,this._initEvents(),this._container.dispatchEvent(kn.unmute)};_updateMuteIcons=()=>{const t=this._container,e=t.actualOptions.sounds;if(!e?.enable||!e.icons.enable)return;const i=this._muteImg,s=this._unmuteImg;i&&(i.style.display=t.muted?"block":"none"),s&&(s.style.display=t.muted?"none":"block")};_updateMuteStatus=async()=>{const t=this._container,e=this._getAudioContext();t.muted?(await e.suspend(),await this._mute()):(await e.resume(),this._unmute(),this._playMuteSound())};_updateVolume=async()=>{const t=this._container,e=t.actualOptions.sounds;if(!e?.enable)return;U(this._volume,e.volume.min,e.volume.max);let i=!1;this._volume<=0&&!t.muted?(this._volume=0,t.muted=!0,i=!0):this._volume>0&&t.muted&&(t.muted=!1,i=!0),i&&(this._updateMuteIcons(),await this._updateMuteStatus()),this._gain?.gain&&(this._gain.gain.value=this._volume/o)}}});function Tn(t,e,i,s){(t.paint??=new Me).fill={color:oe.create(void 0,{value:e}),enable:s,opacity:i}}function An(t,e,i,s){(t.paint??=new Me).stroke={color:oe.create(void 0,{value:e}),opacity:i,width:s}}var Ln=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;_container;_currentDuration;_currentEmitDelay;_currentSpawnDelay;_duration;_emitDelay;_firstSpawn;_immortal;_initialPosition;_lifeCount;_mutationObserver;_particlesOptions;_paused;_pluginManager;_removeCallback;_resizeObserver;_shape;_size;_spawnDelay;_startParticlesAdded;constructor(t,e,i,s,n){this._pluginManager=t,this._container=e,this._removeCallback=i,this._currentDuration=0,this._currentEmitDelay=0,this._currentSpawnDelay=0,this._initialPosition=n,s instanceof ys?this.options=s:(this.options=new ys,this.options.load(s)),this._spawnDelay=e.retina.reduceFactor?q(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0,this.position=this._initialPosition??this._calcPosition(),this.name=this.options.name,this.fill=this.options.fill,this._firstSpawn=!this.options.life.wait,this._startParticlesAdded=!1;const o=Pt({},this.options.particles);if(o.move??={},o.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=Ke(this._pluginManager,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=Ke(this._pluginManager,this.options.spawn.stroke.color)),this._paused=!this.options.autoPlay,this._particlesOptions=o,this._size=this._calcSize(),this.size=Ot(this._size,this._container.canvas.size),this._lifeCount=this.options.life.count??-1,this._immortal=this._lifeCount<=0,this.options.domId){const t=pt().getElementById(this.options.domId);t&&(this._mutationObserver=new MutationObserver(()=>{this.resize()}),this._resizeObserver=new ResizeObserver(()=>{this.resize()}),this._mutationObserver.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this._resizeObserver.observe(t))}const a=this.options.shape,l=this._pluginManager.emitterShapeManager?.getShapeGenerator(a.type);l&&(this._shape=l.generate(this._container,this.position,this.size,this.fill,a.options)),this._container.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this._paused=!0,this.pause()}externalPlay(){this._paused=!1,this.play()}async init(){await(this._shape?.init())}pause(){this._paused||delete this._emitDelay}play(){if(this._paused)return;if(!(this._lifeCount>0||this._immortal)&&this.options.life.count||!(this._firstSpawn||this._currentSpawnDelay>=(this._spawnDelay??0)))return;const t=this._container;if(void 0===this._emitDelay){const e=q(this.options.rate.delay);this._emitDelay=t.retina.reduceFactor?e*r/t.retina.reduceFactor:1/0}(this._lifeCount>0||this._immortal)&&this._prepareToDie()}resize(){const t=this._initialPosition,e=this._container;this.position=t&&_t(t,e.canvas.size,z.origin)?t:this._calcPosition(),this._size=this._calcSize(),this.size=Ot(this._size,e.canvas.size),this._shape?.resize(this.position,this.size)}update(t){if(this._paused)return;const e=this._container;this._firstSpawn&&(this._firstSpawn=!1,this._currentSpawnDelay=this._spawnDelay??0,this._currentEmitDelay=this._emitDelay??0),this._startParticlesAdded||(this._startParticlesAdded=!0,this._emitParticles(this.options.startCount)),void 0!==this._duration&&(this._currentDuration+=t.value,this._currentDuration>=this._duration&&(this.pause(),void 0!==this._spawnDelay&&delete this._spawnDelay,this._immortal||this._lifeCount--,this._lifeCount>0||this._immortal?(this.position=this._calcPosition(),this._shape?.resize(this.position,this.size),this._spawnDelay=e.retina.reduceFactor?q(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0):this._destroy(),this._currentDuration-=this._duration,delete this._duration)),void 0!==this._spawnDelay&&(this._currentSpawnDelay+=t.value,this._currentSpawnDelay>=this._spawnDelay&&(this._container.dispatchEvent("emitterPlay"),this.play(),this._currentSpawnDelay-=this._spawnDelay,delete this._spawnDelay)),void 0!==this._emitDelay&&(this._currentEmitDelay+=t.value,this._currentEmitDelay>=this._emitDelay&&(this._emit(),this._currentEmitDelay-=this._emitDelay))}_calcPosition(){const t=this._container;if(this.options.domId){const e=pt().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 it({size:t.canvas.size,position:this.options.position})}_calcSize(){const e=this._container;if(this.options.domId){const i=pt().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 gs;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}_destroy=()=>{this._mutationObserver?.disconnect(),this._mutationObserver=void 0,this._resizeObserver?.disconnect(),this._resizeObserver=void 0,this._removeCallback(this),this._container.dispatchEvent("emitterDestroyed",{emitter:this})};_emit(){if(this._paused)return;const t=q(this.options.rate.quantity);this._emitParticles(t)}_emitParticles(t){const e=Mt(this._particlesOptions)??{},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:q(this.options.spawn.fill.opacity),o=this.options.spawn.stroke?.color?.animation,a=void 0===this.options.spawn.stroke?.opacity?1:q(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:q(this.options.spawn.stroke.width),l=this._container.retina.reduceFactor,c=!!i,h=!!o,u=!!this._shape,d=c||h,p=d||u,f=d?{h:y,s:v,l:_}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?Pt({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=a,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this._setColorAnimation(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this._setColorAnimation(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this._setColorAnimation(i.l,this.spawnFillColor.l,f.l)),Tn(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(o&&f&&(this.spawnStrokeColor.h=this._setColorAnimation(o.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this._setColorAnimation(o.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this._setColorAnimation(o.l,this.spawnStrokeColor.l,f.l)),An(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this._shape){const e=this._shape.randomPosition();if(e){l=e.position;const i=g.replace;i.color&&e.color&&Tn(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this._container.particles.addParticle(l,t)}}_prepareToDie=()=>{if(this._paused)return;const t=void 0!==this.options.life.duration?q(this.options.life.duration):void 0;(this._lifeCount>0||this._immortal)&&void 0!==t&&t>0&&(this._duration=t*r)};_setColorAnimation=(t,e,i,s=1)=>{const n=this._container;if(!t.enable)return e;const o=$(t.offset),a=q(this.options.rate.delay),l=n.retina.reduceFactor?a*r/n.retina.reduceFactor:1/0;return(e+q(t.speed)*n.fpsLimit/l+o*s)%i}}});t.AnimatableColor=oe,t.AnimationOptions=te,t.AnimationValueWithRandom=ge,t.Background=ae,t.BaseRange=Zt,t.Circle=Jt,t.ColorAnimation=ie,t.Fill=he,t.FullScreen=re,t.HslAnimation=se,t.Move=we,t.MoveAngle=ue,t.MoveCenter=de,t.MoveGravity=pe,t.MovePath=ye,t.Opacity=Pe,t.OpacityAnimation=be,t.Options=Le,t.OptionsColor=ne,t.OutModes=ve,t.Paint=Me,t.ParticlesBounce=Ce,t.ParticlesBounceFactor=ze,t.ParticlesDensity=Se,t.ParticlesNumber=ke,t.ParticlesNumberLimit=Oe,t.ParticlesOptions=Ee,t.RangedAnimationOptions=ee,t.RangedAnimationValueWithRandom=me,t.Rectangle=Kt,t.ResizeEvent=le,t.Shape=De,t.Size=Fe,t.SizeAnimation=Ie,t.Spin=_e,t.Stroke=xe,t.ValueWithRandom=fe,t.Vector=z,t.Vector3d=M,t.ZIndex=Re,t.alterHsl=fi,t.animate=B,t.areBoundsInside=wt,t.arrayRandomIndex=yt,t.calcExactPositionOrRandomFromSize=st,t.calcExactPositionOrRandomFromSizeRanged=function(t){const e={x:void 0!==t.position?.x?q(t.position.x):void 0,y:void 0!==t.position?.y?q(t.position.y):void 0};return st({size:t.size,position:e})},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=et,t.calcPositionOrRandomFromSizeRanged=it,t.calculateBounds=bt,t.cancelAnimation=V,t.canvasFirstIndex=0,t.canvasTag=g,t.checkDistance=Y,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}=j(o,n);if(i*a+s*r<0)return;const l=-Math.atan2(r,a),c=t.mass,h=e.mass,u=t.velocity.rotate(l),d=e.velocity.rotate(l),p=tt(u,d,c,h),f=tt(d,u,c,h),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:z.create(q(t.options.bounce.horizontal.value),q(t.options.bounce.vertical.value))}},t.clamp=U,t.clear=Ue,t.cloneStyle=Dt,t.collisionVelocity=tt,t.colorMix=li,t.colorToHsl=function(t,e,i,s=!0){const n=Je(t,e,i,s);return n?ti(n):void 0},t.colorToRgb=Je,t.countOffset=1,t.decayOffset=1,t.deepExtend=Pt,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=Z,t.deleteCount=1,t.double=2,t.doublePI=d,t.drawAfterEffect=$e,t.drawBeforeEffect=qe,t.drawParticle=Ge,t.drawParticlePlugin=je,t.drawShape=Ne,t.drawShapeAfterDraw=We,t.drawShapeBeforeDraw=He,t.empty=0,t.executeOnSingleOrMultiple=xt,t.findItemFromSingleOrMultiple=function(t,e){return I(t)?t.find((t,i)=>e(t,i)):e(t,0)?t:void 0},t.fireworks=an,t.generatedAttribute=e,t.generatedFalse=f,t.generatedTrue=p,t.getDistance=X,t.getDistanceSq=Q,t.getDistances=j,t.getFullScreenStyle=It,t.getHslAnimationFromHsl=hi,t.getHslFromAnimation=ci,t.getItemMapFromInitializer=Et,t.getItemsFromInitializer=Rt,t.getLinkColor=function(t,e,i){if(i===h)return ni();if(i!==u)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return li(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return ii(t)}}},t.getLinkRandomColor=function(t,e,i,s){const n=S(e)?e:e.value;return n===h?s?Ze(t,{value:n}):i?h:u:n===u?u:Ze(t,{value:n})},t.getLogger=Ut,t.getParticleBaseVelocity=K,t.getParticleDirectionAngle=J,t.getPosition=St,t.getRandom=A,t.getRandomInRange=L,t.getRandomRgbColor=ni,t.getRangeMax=W,t.getRangeMin=N,t.getRangeValue=q,t.getSize=Ot,t.getStyleFromHsl=ri,t.getStyleFromRgb=oi,t.hMax=y,t.hMin=0,t.hPhase=60,t.half=a,t.hasMatchMedia=dt,t.hslToRgb=ii,t.hslaToRgba=si,t.identity=1,t.initParticleNumericAnimationValue=zt,t.inverseFactorNumerator=1,t.isArray=I,t.isBoolean=C,t.isFunction=k,t.isInArray=mt,t.isNull=F,t.isNumber=O,t.isObject=D,t.isPointInside=_t,t.isString=S,t.itemFromArray=vt,t.itemFromSingleOrMultiple=Mt,t.lFactor=1,t.lMax=_,t.lMin=0,t.lengthOffset=1,t.loadMinIndex=0,t.loadOptions=Te,t.loadParticlesOptions=Ae,t.loadRandomFactor=1e4,t.manageListener=Ft,t.memoize=ut,t.midColorValue=u,t.millisecondsToSeconds=r,t.minCount=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=G,t.none=0,t.one=1,t.originPoint=l,t.paintBase=Be,t.paintImage=Ve,t.parseAlpha=nt,t.percentDenominator=o,t.phaseNumerator=1,t.quarter=w,t.randomColorValue=h,t.randomInRangeValue=$,t.rangeColorToHsl=Ke,t.rangeColorToRgb=Ze,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=m,t.rgbToHsl=ti,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=pt,t.safeIntersectionObserver=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)},t.safeMatchMedia=ft,t.safeMutationObserver=gt,t.setAnimationFunctions=function(t,e){T.nextFrame=t,T.cancel=e},t.setLogger=function(t){t.debug&&(Vt.debug=Bt(t.debug)),t.error&&(Vt.error=Bt(t.error)),t.info&&(Vt.info=Bt(t.info)),t.log&&(Vt.log=Bt(t.log)),t.trace&&(Vt.trace=Bt(t.trace)),t.verbose&&(Vt.verbose=Bt(t.verbose)),t.warning&&(Vt.warning=Bt(t.warning))},t.setRandom=function(t=Math.random){E=t},t.setRangeValue=H,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Ye(t,e)?.a},t.stringToRgb=ei,t.threeQuarter=b,t.triple=3,t.tryCountIncrement=1,t.tsParticles=gi,t.updateAnimation=kt,t.updateColor=pi,t.updateColorValue=di,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{fireworks:(globalThis.__tsParticlesInternals.bundles.fireworks||{}).fireworks}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|