@tsparticles/confetti 4.3.2 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),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.confetti=t.__tsParticlesInternals.bundles.confetti||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",a=100,o=.5,r=1e3,l={x:0,y:0,z:0},c={a:1,b:0,c:0,d:1},d="random",h="mid",u=2*Math.PI,p="true",g="false",f="canvas",y=255,m=360,v=100,w=100,b=.25,P=.75,x=400;var M;function z(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(M=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",M.bottomLeft="bottom-left",M.bottomRight="bottom-right",M.left="left",M.none="none",M.right="right",M.top="top",M.topLeft="top-left",M.topRight="top-right",M.outside="outside",M.inside="inside";class C{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 C.create(l.x,l.y,l.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return C.create(t.x,t.y,z(t))}static create(t,e,i){return"number"==typeof t?new C(t,e??l.y,i??l.z):new C(t.x,t.y,z(t))}add(t){return C.create(this.x+t.x,this.y+t.y,this.z+z(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=z(t)}copy(){return C.clone(this)}div(t){return C.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return C.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return C.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),l.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=z(t)}sub(t){return C.create(this.x-t.x,this.y-t.y,this.z-z(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=z(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class S extends C{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return S.create(l.x,l.y)}static clone(t){return S.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new S(t,e??l.y):new S(t.x,t.y)}}function k(t){return"boolean"==typeof t}function D(t){return"string"==typeof t}function O(t){return"number"==typeof t}function I(t){return"object"==typeof t&&null!==t}function T(t){return Array.isArray(t)}function E(t){return null==t}const R=Math.PI/180;let _=Math.random;const L={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return U(_(),0,1-Number.EPSILON)}function F(t,e){return A()*(e-t)+t}function B(t){return L.nextFrame(t)}function V(t){L.cancel(t)}function U(t,e,i){return Math.min(Math.max(t,e),i)}function $(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function j(t){const e=W(t);let i=G(t);return e===i&&(i=0),F(i,e)}function q(t){return O(t)?t:j(t)}function G(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=G(t),s=W(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:H(i,s)}function N(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function K(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function Q(t,e){return Math.sqrt(K(t,e))}function X(t,e,i){return K(t,e)<=i*i}function Y(t){return t*R}function Z(e,i,s){if(O(e))return Y(e);switch(e){case t.MoveDirection.top:return-Math.PI*o;case t.MoveDirection.topRight:return-Math.PI*b;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*b;case t.MoveDirection.bottom:return Math.PI*o;case t.MoveDirection.bottomLeft:return Math.PI*P;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*P;case t.MoveDirection.inside:return Math.atan2(s.y-i.y,s.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-s.y,i.x-s.x);default:return A()*u}}function J(t){const e=S.origin;return e.length=1,e.angle=t,e}function tt(t,e,i,s){return S.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function et(t){return{x:(t.position?.x??A()*a)*t.size.width/a,y:(t.position?.y??A()*a)*t.size.height/a}}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)/a:parseFloat(t):1}var at,ot;t.OutModeDirection=void 0,(at=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",at.left="left",at.right="right",at.top="top",t.PixelMode=void 0,(ot=t.PixelMode||(t.PixelMode={})).precise="precise",ot.percent="percent";function rt(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function lt(){return globalThis.document}function ct(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function dt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function ht(t,e){return t===e||T(e)&&e.includes(t)}function ut(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(A()*t.length)]}function pt(t,e,i,s,n){return gt(ft(t,s??0),e,i,n)}function gt(e,i,s,n){let a=!0;return n&&n!==t.OutModeDirection.bottom||(a=e.top<i.height+s.x),!a||n&&n!==t.OutModeDirection.left||(a=e.right>s.x),!a||n&&n!==t.OutModeDirection.right||(a=e.left<i.width+s.y),!a||n&&n!==t.OutModeDirection.top||(a=e.bottom>s.y),a}function ft(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function yt(t,...e){for(const i of e){if(E(i))continue;if(!I(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):I(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return I(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if(rt(t))continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if(rt(s))continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>yt(void 0,t)):yt(e[s],n)}}return t}function mt(t,e){return T(t)?t.map((t,i)=>e(t,i)):e(t,0)}function vt(t,e,i){return T(t)?ut(t,e,i):t}function wt(e,i){return function(e,i){if(e.mode!==t.PixelMode.percent){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/a*i.width,y:e.y/a*i.height}:{width:e.width/a*i.width,height:e.height/a*i.height}}(e,i)}function bt(t){const e=lt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||E(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}let Pt,xt;function Mt(t){if(Pt!==t||!xt){Pt=t;const e=lt().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}xt=e}return xt}function zt(t,e,i,s,n){if(s){let s={passive:!0};k(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 Ct(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 St(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 kt{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var Dt;t.EventType=void 0,(Dt=t.EventType||(t.EventType={})).configAdded="configAdded",Dt.containerInit="containerInit",Dt.particlesSetup="particlesSetup",Dt.containerStarted="containerStarted",Dt.containerStopped="containerStopped",Dt.containerDestroyed="containerDestroyed",Dt.containerPaused="containerPaused",Dt.containerPlay="containerPlay",Dt.containerBuilt="containerBuilt",Dt.particleAdded="particleAdded",Dt.particleDestroyed="particleDestroyed",Dt.particleRemoved="particleRemoved";class Ot{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#s.set(i,e),this.#n.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return St(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 St(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return Ct(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#a,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#a,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const It=t=>(...e)=>{t(...e)},Tt={debug:It(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:It(console.info),log:It(console.log),trace:It(console.trace),verbose:It(console.log),warning:It(console.warn)};function Et(){return Tt}const Rt="100%";class _t{pluginManager=new Ot(this);#d=[];#h=new kt;#o=!1;get items(){return this.#d}get version(){return"4.3.2"}addEventListener(t,e){this.#h.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#h.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return Yn}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=vt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Et().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=vt(r,a),{items:c}=this,d=c.findIndex(t=>t.id.description===n),h=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(h);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(d>=0){const t=this.item(d),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(d,e,h)}else c.push(h);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=lt();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)s=t,s.dataset[e]??=g,s.dataset[e]===p&&(s.style.width||=Rt,s.style.height||=Rt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(f).item(0);n?(s=n,s.dataset[e]=g):(s=i.createElement(f),s.dataset[e]=p,t.appendChild(s)),s.style.width||=Rt,s.style.height||=Rt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=lt();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return h.canvas.loadCanvas(u),await h.start(),h}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#h.removeEventListener(t,e)}}var Lt,At,Ft,Bt,Vt,Ut,$t,jt,qt,Gt,Wt,Ht;!function(t){t.circle="circle",t.rectangle="rectangle"}(Lt||(Lt={}));class Nt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Kt extends Nt{radius;constructor(t,e,i){super(t,e,Lt.circle),this.radius=i}contains(t){return X(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Kt||t.type===Lt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Qt||t.type===Lt.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(n-i,2)+Math.pow(a-o,2)<=s**2||n<=s+i&&a<=s+o||n<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Qt extends Nt{size;constructor(t,e,i,s){super(t,e,Lt.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof Kt)return t.intersects(this);if(!(t instanceof Qt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,o=a.width,r=a.height;return n.x<s.x+e&&n.x+o>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}t.RotateDirection=void 0,(At=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",At.counterClockwise="counter-clockwise",At.random="random",t.AnimationMode=void 0,(Ft=t.AnimationMode||(t.AnimationMode={})).auto="auto",Ft.increase="increase",Ft.decrease="decrease",Ft.random="random",t.LimitMode=void 0,(Bt=t.LimitMode||(t.LimitMode={})).delete="delete",Bt.wait="wait",t.OutMode=void 0,(Vt=t.OutMode||(t.OutMode={})).bounce="bounce",Vt.none="none",Vt.out="out",Vt.destroy="destroy",Vt.split="split",t.AlterType=void 0,(Ut=t.AlterType||(t.AlterType={})).darken="darken",Ut.enlighten="enlighten",t.DestroyType=void 0,($t=t.DestroyType||(t.DestroyType={})).none="none",$t.max="max",$t.min="min",t.GradientType=void 0,(jt=t.GradientType||(t.GradientType={})).linear="linear",jt.radial="radial",jt.random="random",t.ParticleOutType=void 0,(qt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",qt.inside="inside",qt.outside="outside",t.StartValueType=void 0,(Gt=t.StartValueType||(t.StartValueType={})).max="max",Gt.min="min",Gt.random="random",t.AnimationStatus=void 0,(Wt=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",Wt.decreasing="decreasing",t.DrawLayer=void 0,(Ht=t.DrawLayer||(t.DrawLayer={}))[Ht.BackgroundElement=0]="BackgroundElement",Ht[Ht.BackgroundDraw=1]="BackgroundDraw",Ht[Ht.BackgroundMask=2]="BackgroundMask",Ht[Ht.CanvasSetup=3]="CanvasSetup",Ht[Ht.PluginContent=4]="PluginContent",Ht[Ht.Particles=5]="Particles",Ht[Ht.CanvasCleanup=6]="CanvasCleanup",Ht[Ht.Foreground=7]="Foreground";class Xt{load(t){E(t)||this.doLoad(t)}}function Yt(t,...e){for(const i of e)t.load(i)}function Zt(t,e,i){void 0!==i&&(t[e]=i)}function Jt(t,e,i){void 0!==i&&(t[e]=H(i))}function te(t,e,i){void 0!==i&&t[e].load(i)}function ee(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function ie(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class se extends Xt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Jt(this,"count",t.count),Zt(this,"enable",t.enable),Jt(this,"speed",t.speed),Jt(this,"decay",t.decay),Jt(this,"delay",t.delay),Zt(this,"sync",t.sync)}}class ne extends se{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),Zt(this,"mode",t.mode),Zt(this,"startValue",t.startValue)}}class ae extends se{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Zt(this,"max",t.max),Zt(this,"min",t.min),Jt(this,"offset",t.offset)}}class oe extends Xt{h=new ae(0,m);l=new ae(0,w);s=new ae(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class re extends Xt{value="";static create(t,e){const i=new re;return i.load(t),void 0!==e&&(D(e)||T(e)?i.load({value:e}):i.load(e)),i}doLoad(t){E(t.value)||(this.value=t.value)}}class le extends re{animation=new oe;static create(t,e){const i=new le;return i.load(t),void 0!==e&&(D(e)||T(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class ce extends Xt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new re,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=re.create(this.color,t.color)),Zt(this,"element",t.element),Zt(this,"draw",t.draw),Zt(this,"image",t.image),Zt(this,"position",t.position),Zt(this,"repeat",t.repeat),Zt(this,"size",t.size),Zt(this,"opacity",t.opacity)}}class de extends Xt{enable=!0;zIndex=0;doLoad(t){Zt(this,"enable",t.enable),Zt(this,"zIndex",t.zIndex)}}class he extends Xt{delay=.5;enable=!0;doLoad(t){Zt(this,"delay",t.delay),Zt(this,"enable",t.enable)}}class ue extends Xt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=yt(this.options[t]??{},i))}Zt(this,"close",t.close),Zt(this,"type",t.type)}}class pe extends Xt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=le.create(this.color,t.color)),Zt(this,"enable",t.enable),Jt(this,"opacity",t.opacity)}}class ge extends Xt{offset=0;value=90;doLoad(t){Jt(this,"offset",t.offset),Jt(this,"value",t.value)}}class fe extends Xt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){Zt(this,"x",t.x),Zt(this,"y",t.y),Zt(this,"mode",t.mode),Zt(this,"radius",t.radius)}}class ye extends Xt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Jt(this,"acceleration",t.acceleration),Zt(this,"enable",t.enable),Zt(this,"inverse",t.inverse),Jt(this,"maxSpeed",t.maxSpeed)}}class me extends Xt{value=0;doLoad(t){E(t.value)||(this.value=H(t.value))}}class ve extends me{animation=new se;doLoad(t){super.doLoad(t),te(this,"animation",t.animation)}}class we extends ve{animation=new ne}class be extends Xt{clamp=!0;delay=new me;enable=!1;generator;options={};doLoad(t){Zt(this,"clamp",t.clamp),this.delay.load(t.delay),Zt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=yt(this.options,t.options))}}class Pe extends Xt{bottom;default=t.OutMode.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class xe extends Xt{acceleration=0;enable=!1;position;doLoad(t){Jt(this,"acceleration",t.acceleration),Zt(this,"enable",t.enable),t.position&&(this.position=yt({},t.position))}}class Me extends Xt{angle=new ge;center=new fe;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new ye;outModes=new Pe;path=new be;random=!1;size=!1;speed=2;spin=new xe;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(O(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Jt(this,"decay",t.decay),Zt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=O(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Jt(this,"drift",t.drift),Zt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(I(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Zt(this,"random",t.random),Zt(this,"size",t.size),Jt(this,"speed",t.speed),this.spin.load(t.spin),Zt(this,"straight",t.straight),Zt(this,"vibrate",t.vibrate),Zt(this,"warp",t.warp)}}class ze extends Xt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=le.create(this.color,t.color)),Jt(this,"width",t.width),Jt(this,"opacity",t.opacity)}}class Ce extends Xt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=le.create(this.color,t.color)),ee(this,"fill",t.fill,()=>new pe),ee(this,"stroke",t.stroke,()=>new ze)}}class Se extends me{value=1}class ke extends Xt{horizontal=new Se;vertical=new Se;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class De extends Xt{enable=!1;height=1080;width=1920;doLoad(t){Zt(this,"enable",t.enable),Zt(this,"width",t.width),Zt(this,"height",t.height)}}class Oe extends Xt{mode=t.LimitMode.delete;value=0;doLoad(t){Zt(this,"mode",t.mode),Zt(this,"value",t.value)}}class Ie extends Xt{density=new De;limit=new Oe;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Zt(this,"value",t.value)}}class Te extends Xt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=yt(this.options[t]??{},i))}Zt(this,"close",t.close),Zt(this,"type",t.type)}}class Ee extends me{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Zt(this,"opacityRate",t.opacityRate),Zt(this,"sizeRate",t.sizeRate),Zt(this,"velocityRate",t.velocityRate)}}class Re extends Xt{bounce=new ke;effect=new ue;groups={};move=new Me;number=new Ie;paint;palette;reduceDuplicates=!1;shape=new Te;zIndex=new Ee;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Ce,this.paint.color=new le,this.paint.color.value="#fff",this.paint.fill=new pe,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#g(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=yt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(T(e)?this.paint=mt(e,t=>{const e=new Ce;return e.load(t),e}):T(this.paint)?(this.paint=new Ce,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#g(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(T(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function _e(t,e,...i){const s=new Re(t,e);return Yt(s,...i),s}class Le extends Xt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new ce,this.fullScreen=new de,this.particles=_e(this.#p,this.#u),this.resize=new he}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,mt(this.preset,t=>{this.#f(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#g(this.palette)),Zt(this,"autoPlay",t.autoPlay),Zt(this,"clear",t.clear),Zt(this,"key",t.key),Zt(this,"name",t.name),Jt(this,"delay",t.delay),Zt(this,"detectRetina",t.detectRetina),Jt(this,"duration",t.duration),Zt(this,"fpsLimit",t.fpsLimit),Zt(this,"hdr",t.hdr),Zt(this,"pauseOnBlur",t.pauseOnBlur),Zt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Zt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;k(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=yt(this.style,t.style),Zt(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#g(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#f(t){this.load(this.#p.getPreset(t))}}const Ae=new Map;function Fe(t,e){let i=Ae.get(t);return i||(i=e(),Ae.size>2e3&&Ae.clear(),Ae.set(t,i)),i}function Be(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Ve(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return Ue(t,n.value,i,s);if(T(n.value)){const e=ut(n.value,i,s);if(!e)return;return Ve(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Ue(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return n.value===d?Ke():qe(t,n.value);if(T(n.value)){const e=ut(n.value,i,s);if(!e)return;return Ue(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function $e(t,e,i,s=!0){const n=Ve(t,e,i,s);return n?je(n):void 0}function je(t){const e=t.r/y,i=t.g/y,s=t.b/y,n=Math.max(e,i,s),a=Math.min(e,i,s),r={h:0,l:(n+a)*o,s:0};return n!==a&&(r.s=r.l<o?(n-a)/(n+a):(n-a)/(2-n-a),r.h=e===n?(i-s)/(n-a):i===n?2+(s-e)/(n-a):4+(e-i)/(n-a)),r.l*=w,r.s*=v,r.h*=60,r.h<0&&(r.h+=m),r.h>=m&&(r.h-=m),r}function qe(t,e){return Be(t,e)}function Ge(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function We(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),n=e/m,a=i/v,r=s/w;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const l=r<o?r*(1+a):r+a-r*a,c=2*r-l,d=1/3,h=Math.min(y,y*Ge(c,l,n+d)),u=Math.min(y,y*Ge(c,l,n)),p=Math.min(y,y*Ge(c,l,n-d));return{r:Math.round(h),g:Math.round(u),b:Math.round(p)}}function He(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),n=e/m,a=i/v,r=s/w;if(0===i){const t=r*y;return{r:t,g:t,b:t}}const l=r<o?r*(1+a):r+a-r*a,c=2*r-l,d=1/3;return{r:Math.min(y,y*Ge(c,l,n+d)),g:Math.min(y,y*Ge(c,l,n)),b:Math.min(y,y*Ge(c,l,n-d))}}function Ne(t){const e=We(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Ke(t,e){const i=t??0;if(e)return{r:F(i,y),g:F(i,y),b:F(i,y)};const s=()=>Math.floor(F(i,256));return{b:s(),g:s(),r:s()}}function Qe(t,e,i){const s=e?4:2,n=i??1;return Fe(`rgb-${t.r.toFixed(s)}-${t.g.toFixed(s)}-${t.b.toFixed(s)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/y*s).toString()} ${(t.g/y*s).toString()} ${(t.b/y*s).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Xe(t,e,i){const s=e?4:2,n=i??1;return Fe(`hsl-${t.h.toFixed(s)}-${t.s.toFixed(s)}-${t.l.toFixed(s)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?Qe(He(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${n.toString()})`)}function Ye(t,e,i,s){let n=t,a=e;return"r"in n||(n=We(t)),"r"in a||(a=We(e)),{b:$(n.b,a.b,i,s),g:$(n.g,a.g,i,s),r:$(n.r,a.r,i,s)}}function Ze(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Je(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:m},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:w}};return e&&(ti(s.h,e.h,i),ti(s.s,e.s,i),ti(s.l,e.l,i)),s}function ti(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=q(i.speed)/a*s,e.decay=1-q(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=q(i.count),e.time=0,e.delayTime=q(i.delay)*r,i.sync||(e.velocity*=A(),e.value*=A()),e.initialValue=e.value,e.offset=H(i.offset)):e.velocity=0}function ei(e,i,s,n){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const a=e.offset?j(e.offset):0,o=((e.velocity??0)*s.factor+3.6*a)*(n?.5075:1),r=e.decay??1,l=e.max,c=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=o,e.value<c&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=o,e.value>l&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=l)),e.velocity&&1!==r&&(e.velocity*=r),e.value=U(e.value,c,l)}function ii(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;ei(s,!1,e,i),ei(n,!0,e,i),ei(a,!0,e,i)}function si(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const ni=new _t;class ai{enable=!1;mode="destination-out";load(t){E(t)||(Zt(this,"mode",t.mode),Zt(this,"enable",t.enable))}}class oi{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 ai),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new ai,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function ri(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new oi)})}class li{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(l.x,l.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=I(s)?{min:Y(s.min),max:Y(s.max)}:{min:0,max:Y(s)}}}async function ci(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new li))})}var di;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(di||(di={}));const hi=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,ui=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class pi{accepts(t){return t.startsWith("#")}handleColor(t){return this.#y(t.value)}handleRangeColor(t){return this.#y(t.value)}parseString(t){return this.#y(t)}#y(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(hi,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=ui.exec(e);return i?{a:i[di.a]?Number.parseInt(i[di.a],16)/255:1,b:Number.parseInt(i[di.b]??"0",16),g:Number.parseInt(i[di.g]??"0",16),r:Number.parseInt(i[di.r]??"0",16)}:void 0}}async function gi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new pi)})}var fi;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(fi||(fi={}));const yi=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class mi{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return We(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return We({h:q(e.h),l:q(e.l),s:q(e.s)})}parseString(t){if(!this.accepts(t))return;const e=yi.exec(t);return e?Ne({a:e.length>4?nt(e[fi.a]):1,h:Number.parseInt(e[fi.h]??"0",10),l:Number.parseInt(e[fi.l]??"0",10),s:Number.parseInt(e[fi.s]??"0",10)}):void 0}}async function vi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new mi)})}class wi{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return ta});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function bi(t){t.checkVersion("4.3.2"),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,St(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new wi(t.pluginManager))})}function Pi(e,i){const s=e.value,n=e.animation,a={delayTime:q(n.delay)*r,enable:n.enable,value:q(e.value)*i,max:W(s)*i,min:G(s)*i,loops:0,maxLoops:q(n.count),time:0};if(n.enable){switch(a.decay=1-q(n.decay),n.mode){case t.AnimationMode.increase:a.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:a.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:a.value=a.min,e&&(a.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:a.value=a.max,e&&(a.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:a.value=j(a),e&&(a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function xi(e,i,s,n,a){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const o=(i.velocity??0)*a.factor,r=i.min,l=i.max,c=i.decay??1;i.time??=0;const d=i.delayTime??0;if(!(d>0&&i.time<d&&(i.time+=a.value,i.time<d))){switch(i.status){case t.AnimationStatus.increasing:i.value+=o;break;case t.AnimationStatus.decreasing:i.value-=o}switch(i.velocity&&1!==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,a){switch(i){case t.DestroyType.max:s>=a&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,l),e.destroyed||(i.value=U(i.value,r,l))}}class Mi extends ne{destroy=t.DestroyType.none;load(t){super.load(t),E(t)||Zt(this,"destroy",t.destroy)}}class zi extends we{animation=new Mi;value=1;load(t){if(E(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Ci{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Pi(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=q(i.speed)/a*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=A()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){ie(t,"opacity",zi,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&xi(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function Si(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Ci(t)))})}class ki{modes;#u;#m;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#m=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;let o=!1;for(const t of this.#m)if(o=t.particleBounce?.(e,s,i)??!1,o)break;if(o)return;const r=e.getPosition(),l=e.offset,c=e.getRadius(),d=ft(r,c),h=a.canvas.size,u=!e.isInsideCanvasForOutMode(n,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.left&&e.direction!==t.OutModeDirection.right)return;e.bounds.right<0&&e.direction===t.OutModeDirection.left?e.particle.position.x=e.size+e.offset.x:e.bounds.left>e.canvasSize.width&&e.direction===t.OutModeDirection.right&&(e.particle.position.x=e.canvasSize.width-e.size-e.offset.x);const i=e.particle.velocity.x;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.right&&i>0||e.direction===t.OutModeDirection.left&&i<0)){const t=q(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,s=!0}if(!s)return;const n=e.offset.x+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-n:e.outOfCanvas&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:d,canvasSize:h,offset:l,outOfCanvas:u,size:c}),function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.bottom&&e.direction!==t.OutModeDirection.top)return;e.bounds.bottom<0&&e.direction===t.OutModeDirection.top?e.particle.position.y=e.size+e.offset.y:e.bounds.top>e.canvasSize.height&&e.direction===t.OutModeDirection.bottom&&(e.particle.position.y=e.canvasSize.height-e.size-e.offset.y);const i=e.particle.velocity.y;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.bottom&&i>0||e.direction===t.OutModeDirection.top&&i<0)){const t=q(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,s=!0}if(!s)return;const n=e.offset.y+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-n:e.outOfCanvas&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:d,canvasSize:h,offset:l,outOfCanvas:u,size:c})}}class Di{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(this.modes.includes(n)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(n,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=N(e.position,e.moveCenter),{x:s,y:n}=e.velocity;if(s<0&&t>e.moveCenter.radius||n<0&&i>e.moveCenter.radius||s>=0&&t<-e.moveCenter.radius||n>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class Oi{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,s,n){if(!this.modes.includes(n))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const a=e.options.move.gravity,o=this.#u,r=o.canvas.size,c=e.getRadius();if(a.enable){const s=e.position;(!a.inverse&&s.y>r.height+c&&i===t.OutModeDirection.bottom||a.inverse&&s.y<-c&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+c||e.velocity.y<0&&e.position.y>=-c||e.velocity.x>0&&e.position.x<=r.width+c||e.velocity.x<0&&e.position.x>=-c)return;pt(e.position,o.canvas.size,l,c,i)||e.destroy()}}}const Ii=S.origin;class Ti{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;Ii.setTo(l),Ii.length=e.moveCenter.radius,Ii.angle=e.velocity.angle+Math.PI,Ii.addTo(e.moveCenter);const{dx:s,dy:n}=N(e.position,Ii);if(t<=0&&s>=0||i<=0&&n>=0||t>=0&&s<=0||i>=0&&n<=0)return;e.position.x=Math.floor(j({min:0,max:a.canvas.size.width})),e.position.y=Math.floor(j({min:0,max:a.canvas.size.height}));const{dx:o,dy:r}=N(e.position,e.moveCenter);e.direction=Math.atan2(-r,-o),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(e.isInsideCanvasForOutMode(n,i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor(j({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(j({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=N(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction),e.justWarped=!0;break}case t.ParticleOutType.normal:{const s=e.options.move.warp,n=a.canvas.size,o={bottom:n.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:n.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),l=ft(e.position,r);i===t.OutModeDirection.right&&l.left>n.width+e.offset.x?(e.position.x=o.left,e.initialPosition.x=e.position.x,s||(e.position.y=A()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0):i===t.OutModeDirection.left&&l.right<-e.offset.x&&(e.position.x=o.right,e.initialPosition.x=e.position.x,s||(e.position.y=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=o.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=o.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0);break}}}}}class Ei{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#v(e,t.OutMode.bounce,t=>new ki(t)),this.#v(e,t.OutMode.out,t=>new Ti(t)),this.#v(e,t.OutMode.destroy,t=>new Di(t)),this.#v(e,t.OutMode.none,t=>new Oi(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#w(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#w(e,i,s.left??s.default,t.OutModeDirection.left),this.#w(e,i,s.right??s.default,t.OutModeDirection.right),this.#w(e,i,s.top??s.default,t.OutModeDirection.top)}#v(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#w(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function Ri(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Ei(t)))})}class _i{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=vt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=le.create(void 0===a?void 0:le.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=q(o.opacity),t.fillAnimation=i.animation;const s=$e(this.#p,i);s&&(t.fillColor=Je(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=le.create(void 0===a?void 0:le.create(void 0,a),r.color);t.strokeWidth=q(r.width)*e.retina.pixelRatio,t.strokeOpacity=q(r.opacity??1),t.strokeAnimation=i.animation;const s=$e(this.#p,i)??t.getFillColor();s&&(t.strokeColor=Je(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(ii(t.fillColor,e,this.#u.hdr),ii(t.strokeColor,e,this.#u.hdr))}}async function Li(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new _i(t.pluginManager,e)))})}var Ai;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Ai||(Ai={}));const Fi=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Bi{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:q(e.r),g:q(e.g),b:q(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Fi.exec(t);return e?{a:e.length>4?nt(e[Ai.a]):1,b:parseInt(e[Ai.b]??"0",10),g:parseInt(e[Ai.g]??"0",10),r:parseInt(e[Ai.r]??"0",10)}:void 0}}async function Vi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Bi)})}class Ui extends ne{destroy=t.DestroyType.none;load(t){super.load(t),E(t)||Zt(this,"destroy",t.destroy)}}class $i extends we{animation=new Ui;value=3;load(t){if(super.load(t),E(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class ji{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/a*e.retina.reduceFactor,s.sync||(t.size.velocity*=A()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){ie(t,"size",$i,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Pi(i,e),t.retina.sizeAnimationSpeed=q(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&xi(t,t.size,!0,t.options.size.animation.destroy,e)}}async function qi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new ji(t)))})}async function Gi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{await Promise.all([ri(t),gi(t),vi(t),Vi(t),bi(t),ci(t),Li(t),Si(t),Ri(t),qi(t)])})}var Wi;!function(t){t.move="move",t.line="line",t.bezier="bezier",t.quadratic="quadratic",t.arc="arc",t.ellipse="ellipse"}(Wi||(Wi={}));function Hi(t,e,i){const s=i.segments[0];if(!s)return;const n=s.values[0];if(!n)return;t.moveTo(n.x*e,n.y*e);for(const s of i.segments){const i=s.values[0];if(!i)continue;const n=s.values[1],a=s.values[2],o=s.values[3];switch(s.type){case Wi.move:t.moveTo(i.x*e,i.y*e);break;case Wi.line:t.lineTo(i.x*e,i.y*e);break;case Wi.bezier:if(!n||!a||!o)continue;t.bezierCurveTo(n.x*e,n.y*e,a.x*e,a.y*e,o.x*e,o.y*e);break;case Wi.quadratic:if(!n||!a)continue;t.quadraticCurveTo(n.x*e,n.y*e,a.x*e,a.y*e);break;case Wi.arc:if(!n||!a)continue;t.arc(i.x*e,i.y*e,n.x*e,a.x,a.y);break;case Wi.ellipse:if(!n||!a||!o)continue;t.ellipse(i.x*e,i.y*e,n.x*e,n.y*e,a.x,o.x,o.y)}}if(!i.half)return;for(let s=i.segments.length-1;s>=0;s--){const n=i.segments[s];if(!n)continue;const a=n.values[0],o=1,r=2,l=n.values[o],c=n.values[r];switch(n.type){case Wi.line:if(!a)break;t.lineTo(a.x*-e,a.y*e);break;case Wi.bezier:if(!a||!l||!c)break;t.bezierCurveTo(-c.x*e,c.y*e,-l.x*e,l.y*e,-a.x*e,a.y*e);break;case Wi.quadratic:if(!l||!c)break;t.quadraticCurveTo(-l.x*e,l.y*e,-c.x*e,c.y*e);case Wi.arc:case Wi.ellipse:}}}var Ni;!function(t){t.hearts="hearts",t.diamonds="diamonds",t.clubs="clubs",t.spades="spades"}(Ni||(Ni={}));const Ki=o,Qi=.25,Xi=-Ki,Yi=-.25,Zi=.0625,Ji=.375,ts={half:!0,segments:[{type:Wi.bezier,values:[{x:0,y:Xi},{x:0,y:Xi},{x:Qi,y:Xi},{x:Qi,y:Yi}]},{type:Wi.bezier,values:[{x:Qi,y:Yi},{x:Qi,y:Yi},{x:Ki,y:Yi},{x:Ki,y:0}]},{type:Wi.bezier,values:[{x:Ki,y:0},{x:Ki,y:0},{x:Ki,y:Qi},{x:Qi,y:Qi}]},{type:Wi.bezier,values:[{x:Qi,y:Qi},{x:Qi,y:Qi},{x:Zi,y:Qi},{x:Zi,y:Zi}]},{type:Wi.bezier,values:[{x:Zi,y:Zi},{x:Zi,y:Qi},{x:Qi,y:Ki},{x:Qi,y:Ki}]},{type:Wi.bezier,values:[{x:Qi,y:Ki},{x:Qi,y:Ki},{x:0,y:Ki},{x:0,y:Ki}]}]},es={half:!0,segments:[{type:Wi.bezier,values:[{x:0,y:Ki},{x:0,y:Ki},{x:Ji,y:0},{x:Ji,y:0}]},{type:Wi.bezier,values:[{x:Ji,y:0},{x:Ji,y:0},{x:0,y:Xi},{x:0,y:Xi}]}]},is={half:!0,segments:[{type:Wi.bezier,values:[{x:0,y:Ki},{x:0,y:Ki},{x:Ki,y:0},{x:Ki,y:Yi}]},{type:Wi.bezier,values:[{x:Ki,y:Yi},{x:Ki,y:Yi},{x:Ki,y:Xi},{x:Qi,y:Xi}]},{type:Wi.bezier,values:[{x:Qi,y:Xi},{x:Qi,y:Xi},{x:0,y:Xi},{x:0,y:Yi}]}]},ss={half:!0,segments:[{type:Wi.bezier,values:[{x:0,y:Xi},{x:0,y:Xi},{x:Ki,y:Yi},{x:Ki,y:0}]},{type:Wi.bezier,values:[{x:Ki,y:0},{x:Ki,y:0},{x:Ki,y:Qi},{x:Qi,y:Qi}]},{type:Wi.bezier,values:[{x:Qi,y:Qi},{x:Qi,y:Qi},{x:Zi,y:Qi},{x:Zi,y:Zi}]},{type:Wi.bezier,values:[{x:Zi,y:Zi},{x:Zi,y:Qi},{x:Qi,y:Ki},{x:Qi,y:Ki}]},{type:Wi.bezier,values:[{x:Qi,y:Ki},{x:Qi,y:Ki},{x:0,y:Ki},{x:0,y:Ki}]}]},ns={[Ni.hearts]:is,[Ni.diamonds]:es,[Ni.clubs]:ts,[Ni.spades]:ss};class as{draw(t){const{context:e,radius:i}=t;Hi(e,i,ns.clubs)}}async function os(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["club","clubs"],()=>Promise.resolve(new as))})}class rs{draw(t){const{context:e,radius:i}=t;Hi(e,i,ns.diamonds)}}async function ls(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["diamond","diamonds"],()=>Promise.resolve(new rs))})}let cs=class{draw(t){const{context:e,radius:i}=t;Hi(e,i,ns.hearts)}};async function ds(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["heart","hearts"],()=>Promise.resolve(new cs))})}class hs{draw(t){const{context:e,radius:i}=t;Hi(e,i,ns.spades)}}async function us(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["spade","spades"],()=>Promise.resolve(new hs))})}async function ps(t){t.checkVersion("4.3.2"),await Promise.all([os(t),ls(t),ds(t),us(t)])}class gs{count;delay;duration;wait=!1;load(t){E(t)||(Zt(this,"count",t.count),Jt(this,"delay",t.delay),Jt(this,"duration",t.duration),Zt(this,"wait",t.wait))}}class fs{delay=.1;quantity=1;load(t){E(t)||(Jt(this,"quantity",t.quantity),Jt(this,"delay",t.delay))}}class ys{color=!1;opacity=!1;load(t){E(t)||(Zt(this,"color",t.color),Zt(this,"opacity",t.opacity))}}class ms{options={};replace=new ys;type="square";load(t){E(t)||(void 0!==t.options&&(this.options=yt({},t.options??{})),this.replace.load(t.replace),Zt(this,"type",t.type))}}class vs{height=0;mode=t.PixelMode.percent;width=0;load(t){E(t)||(Zt(this,"mode",t.mode),Zt(this,"height",t.height),Zt(this,"width",t.width))}}class ws{fill;stroke;load(t){E(t)||(t.fill&&(this.fill??=new pe,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new ze,this.stroke.load(t.stroke)))}}class bs{autoPlay=!0;direction;domId;fill=!0;life=new gs;name;particles;position;rate=new fs;shape=new ms;size;spawn=new ws;spawnFillColor;spawnStrokeColor;startCount=0;load(t){E(t)||(Zt(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new vs,this.size.load(t.size)),Zt(this,"direction",t.direction),Zt(this,"domId",t.domId),Zt(this,"fill",t.fill),this.life.load(t.life),Zt(this,"name",t.name),this.particles=mt(t.particles,t=>yt({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=H(t.position.x)),void 0!==t.position.y&&(this.position.y=H(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new le,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new le,this.spawnStrokeColor.load(t.spawnStrokeColor)),Zt(this,"startCount",t.startCount))}}class Ps{id="emitters";#b;constructor(t){this.#b=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return ea});return new e(this.#b,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=mt(i.emitters,t=>{const e=new bs;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return T(e)&&!!e.length||void 0!==e}}const xs=new WeakMap;var Ms;async function zs(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=xs.get(e);return i||(i=Promise.resolve().then(function(){return na}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw xs.delete(e),t}),xs.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return sa}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new Ps(e))})}!function(t){t.emitter="emitter"}(Ms||(Ms={}));const Cs=["emoji"];async function Ss(t,e){try{await lt().fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}const ks='"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';class Ds{#P=new Map;destroy(){for(const[t,e]of this.#P)e instanceof ImageBitmap&&e.close(),this.#P.delete(t)}draw(t){const e=t.particle.emojiDataKey;if(!e)return;const i=this.#P.get(e);i&&function(t,e){const{context:i,opacity:s}=t,n=i.globalAlpha,a=e.width,r=a*o;i.globalAlpha=s,i.drawImage(e,-r,-r,a,a),i.globalAlpha=n}(t,i)}async init(t){const e=t.actualOptions.particles.shape;if(!Cs.some(t=>ht(t,e.type)))return;const i=[Ss(ks)];mt(Cs.map(t=>e.options[t])[0],t=>{t.font&&i.push(Ss(t.font))}),await Promise.all(i)}particleDestroy(t){t.emojiDataKey=void 0}particleInit(t,e){const i=e.shapeData;if(!i.value)return;const s=vt(i.value,e.randomIndexData);if(!s)return;const n="string"==typeof s?{font:i.font??ks,padding:i.padding??0,value:s}:{font:ks,padding:0,...i,...s},a=n.font,o=n.value,r=`${o}_${a}`;if(this.#P.has(r))return void(e.emojiDataKey=r);const l=2*n.padding,c=W(e.size.value),d=c+l,h=2*d,u=new OffscreenCanvas(h,h),p=u.getContext("2d",t.canvas.render.settings);if(!p)return;p.font=`400 ${(2*c).toString()}px ${a}`,p.textBaseline="middle",p.textAlign="center",p.fillText(o,d,d);const g=u instanceof HTMLCanvasElement?u:u.transferToImageBitmap();this.#P.set(r,g),e.emojiDataKey=r}}async function Os(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(Cs,()=>Promise.resolve(new Ds))})}class Is{draw(t){!function(t){const{context:e,radius:i}=t,s=2*i,n=i*o,a=i+n,r=-i,l=-i;e.moveTo(r,l+n),e.quadraticCurveTo(r,l,r+n,l),e.quadraticCurveTo(r+i,l,r+i,l+n),e.quadraticCurveTo(r+i,l,r+a,l),e.quadraticCurveTo(r+s,l,r+s,l+n),e.quadraticCurveTo(r+s,l+i,r+a,l+a),e.lineTo(r+i,l+s),e.lineTo(r+n,l+a),e.quadraticCurveTo(r,l+i,r,l+n)}(t)}}async function Ts(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["heart"],()=>Promise.resolve(new Is))})}const Es=["image","images"],Rs=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function _s(t){return new Promise(e=>{t.loading=!0;const i=new Image;t.element=i,i.addEventListener("load",()=>{t.loading=!1,e()}),i.addEventListener("error",()=>{t.element=void 0,t.error=!0,t.loading=!1,Et().error(`Error loading image: ${t.source}`),e()}),i.src=t.source})}async function Ls(t){if("svg"!==t.type)return void await _s(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(Et().error("Image not found"),t.error=!0),t.loading=!1}function As(t,e,i,s,n=!1){const a=function(t,e,i,s=!1){const{svgData:n}=t;if(!n)return"";const a=Xe(e,s,i);if(n.includes("fill"))return n.replaceAll(Rs,()=>a);const o=n.indexOf(">");return`${n.substring(0,o)} fill="${a}"${n.substring(o)}`}(t,i,s.opacity?.value??1,n),o={color:i,data:{...t,svgData:a},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise(e=>{const i=new Blob([a],{type:"image/svg+xml"}),s=URL.createObjectURL(i),n=new Image;n.addEventListener("load",()=>{o.loaded=!0,o.element=n,e(o),URL.revokeObjectURL(s)});n.addEventListener("error",()=>{(async()=>{URL.revokeObjectURL(s);const i={...t,error:!1,loading:!0};await _s(i),o.loaded=!0,o.element=i.element,e(o)})()}),n.src=s})}class Fs{#u;#n;constructor(t,e){this.#n=t,this.#u=e}draw(t){const{context:e,radius:i,particle:s,opacity:n}=t,a=s.image,o=a?.element;if(a){if(e.globalAlpha=n,o){const t=a.ratio,s={x:-i,y:-i},n=2*i;e.drawImage(o,s.x,s.y,n,n/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(!e.preload||!this.#n.loadImage)return;const i=[];for(const s of e.preload)i.push(this.#n.loadImage(t,s));await Promise.all(i)}loadShape(t){const e=this.#u;if(!t.shape||!Es.includes(t.shape))return;const i=t.shapeData;if(!i)return;const s=this.#n.getImages?.(e),n=s?.find(t=>t.name===i.name||t.source===i.src);n||this.#x(e,i).then(()=>{this.loadShape(t)})}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;const i=this.#n.getImages?.(t),s=e.shapeData;if(!s)return;const n=e.getFillColor(),a=i?.find(t=>t.name===s.name||t.source===s.src);if(!a)return;const o=s.replaceColor;a.loading?setTimeout(()=>{this.particleInit(t,e)}):(async()=>{let i;i=a.svgData&&n?await As(a,s,n,e,t.hdr):{color:n,data:a,element:a.element,loaded:!0,ratio:s.width&&s.height?s.width/s.height:a.ratio??1,replaceColor:o,source:s.src},i.ratio||(i.ratio=1);const r={image:i,close:s.close??e.shapeClose};e.image=r.image,e.shapeClose=r.close})()}#x=async(t,e)=>{if(!this.#n.loadImage)throw new Error("Image shape not initialized");await this.#n.loadImage(t,{name:e.name,replaceColor:e.replaceColor,src:e.src})}}class Bs{height;name;replaceColor;src="";width;load(t){E(t)||(Zt(this,"height",t.height),Zt(this,"name",t.name),Zt(this,"replaceColor",t.replaceColor),Zt(this,"src",t.src),Zt(this,"width",t.width))}}class Vs{id="image-preloader";#n;constructor(t){this.#n=t}async getPlugin(t){const{ImagePreloaderInstance:e}=await Promise.resolve().then(function(){return aa});return new e(this.#n,t)}loadOptions(t,e,i){if(!i?.preload)return;e.preload??=[];const s=e.preload;for(const t of i.preload){const e=s.find(e=>e.name===t.name||e.src===t.src);if(e)e.load(t);else{const e=new Bs;e.load(t),s.push(e)}}}needsPlugin(){return!0}}async function Us(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{!function(t){t.getImages??=e=>{t.images??=new Map;let i=t.images.get(e);return i||(i=[],t.images.set(e,i)),i},t.loadImage??=async(e,i)=>{if(!t.getImages)throw new Error("No images collection found");if(!i.name&&!i.src)throw new Error("No image source provided");t.images??=new Map;const s=t.getImages(e);if(!s.some(t=>t.name===i.name||t.source===i.src))try{const n={name:i.name??i.src,source:i.src,type:i.src.substring(i.src.length-3),error:!1,loading:!0,replaceColor:i.replaceColor,ratio:i.width&&i.height?i.width/i.height:void 0};let a;s.push(n),t.images.set(e,s),a=i.replaceColor?Ls:_s,await a(n)}catch{throw new Error(`${i.name??i.src} not found`)}}}(t),t.pluginManager.addPlugin(new Vs(t)),t.pluginManager.addShape(Es,e=>Promise.resolve(new Fs(t,e)))})}class $s extends me{sync=!1;load(t){E(t)||(super.load(t),Zt(this,"sync",t.sync))}}class js extends me{sync=!1;load(t){E(t)||(super.load(t),Zt(this,"sync",t.sync))}}class qs{count=0;delay=new $s;duration=new js;load(t){E(t)||(Zt(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Gs{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const s=i.delay.sync?1:A(),n=i.duration.sync?1:A();t.life={delay:e.retina.reduceFactor?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){ie(t,"life",qs,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const a=H(0,i.width),o=H(0,i.width);t.position.x=j(a),t.position.y=j(o),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.#u.canvas.size)}}async function Ws(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new Gs(t)))})}class Hs{factor=4;value=!0;load(t){E(t)||(Zt(this,"factor",t.factor),Zt(this,"value",t.value))}}class Ns{disable=!0;reduce=new Hs;load(t){E(t)||(Zt(this,"disable",t.disable),this.reduce.load(t.reduce))}}class Ks{id="motion";async getPlugin(t){const{MotionPluginInstance:e}=await Promise.resolve().then(function(){return oa});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.motion;s?.load||(e.motion=s=new Ns),s.load(i?.motion)}needsPlugin(){return!0}}async function Qs(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Ks)})}const Xs=new Map;function Ys(t,e){const{context:i,radius:s}=t,n=function(t){const e=Xs.get(t);if(e)return e;const i=u/t,s=!!(t%2),n=(-Math.PI+(s?0:i))*o,a=[];for(let e=0;e<t;e++){const t=n+e*i;a[e]={x:Math.cos(t),y:Math.sin(t)}}return Xs.set(t,a),a}(e.count.numerator/e.count.denominator);i.beginPath();for(let t=0;t<n.length;t++){const e=n[t];if(!e)continue;const a=e.x*s,o=e.y*s;t?i.lineTo(a,o):i.moveTo(a,o)}i.closePath()}class Zs{draw(t){const{particle:e,radius:i}=t;Ys(t,this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round(q(e?.sides??5))}}class Js extends Zs{getSidesData(t,e){const{sides:i}=t;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class tn extends Zs{getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:1,numerator:3},length:2.66*e/1}}}async function en(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["polygon"],()=>Promise.resolve(new Js))})}async function sn(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["triangle"],()=>Promise.resolve(new tn))})}async function nn(t){t.checkVersion("4.3.2"),await Promise.all([en(t),sn(t)])}var an;!function(t){t.both="both",t.horizontal="horizontal",t.vertical="vertical"}(an||(an={}));class on{enable=!1;value=0;load(t){E(t)||(Zt(this,"enable",t.enable),Jt(this,"value",t.value))}}class rn{backColor;darken=new on;enable=!1;enlighten=new on;mode=an.vertical;speed=25;load(t){E(t)||(void 0!==t.backColor&&(this.backColor=re.create(this.backColor,t.backColor)),this.darken.load(t.darken),Zt(this,"enable",t.enable),this.enlighten.load(t.enlighten),Zt(this,"mode",t.mode),Jt(this,"speed",t.speed))}}class ln{#p;constructor(t){this.#p=t}getTransformValues(t){const e=t.roll?.enable&&t.roll,i=e&&e.horizontal,s=e&&e.vertical;return{a:i?Math.cos(e.angle):void 0,d:s?Math.sin(e.angle):void 0}}init(e){!function(e,i){const s=i.options.roll;if(s?.enable)if(i.roll={enable:s.enable,horizontal:s.mode===an.horizontal||s.mode===an.both,vertical:s.mode===an.vertical||s.mode===an.both,angle:A()*u,speed:q(s.speed)/360},s.backColor)i.backColor=$e(e,s.backColor);else if(s.darken.enable&&s.enlighten.enable){const e=A()>=o?t.AlterType.darken:t.AlterType.enlighten;i.roll.alter={type:e,value:q(e===t.AlterType.darken?s.darken.value:s.enlighten.value)}}else s.darken.enable?i.roll.alter={type:t.AlterType.darken,value:q(s.darken.value)}:s.enlighten.enable&&(i.roll.alter={type:t.AlterType.enlighten,value:q(s.enlighten.value)});else i.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this.#p,e)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){ie(t,"roll",rn,...e)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.options.roll,s=t.roll;if(!s||!i?.enable)return;const n=s.speed*e.factor,a=u;s.angle+=n,s.angle>a&&(s.angle-=a)}(t,e)}}async function cn(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("roll",()=>Promise.resolve(new ln(t.pluginManager)))})}class dn{decay=0;enable=!1;speed=0;sync=!1;load(t){E(t)||(Zt(this,"enable",t.enable),Jt(this,"speed",t.speed),Jt(this,"decay",t.decay),Zt(this,"sync",t.sync))}}class hn extends me{animation=new dn;direction=t.RotateDirection.clockwise;path=!1;load(t){E(t)||(super.load(t),Zt(this,"direction",t.direction),this.animation.load(t.animation),Zt(this,"path",t.path))}}class un{#u;constructor(t){this.#u=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:Y(q(i.value)),min:0,max:u},e.pathRotation=i.path;let s=i.direction;if(s===t.RotateDirection.random){s=Math.floor(2*A())>0?t.RotateDirection.counterClockwise:t.RotateDirection.clockwise}switch(s){case t.RotateDirection.counterClockwise:case"counterClockwise":e.rotate.status=t.AnimationStatus.decreasing;break;case t.RotateDirection.clockwise:e.rotate.status=t.AnimationStatus.increasing}const n=i.animation;n.enable&&(e.rotate.decay=1-q(n.decay),e.rotate.velocity=q(n.speed)/360*this.#u.retina.reduceFactor,n.sync||(e.rotate.velocity*=A())),e.rotation=e.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){ie(t,"rotate",hn,...e)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(xi(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function pn(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new un(t)))})}class gn{draw(t){!function(t){const{context:e,radius:i}=t,s=i*Math.SQRT1_2,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}async function fn(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new gn))})}const yn=0,mn=0;class vn{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.sides,a=i.starInset??2;e.moveTo(yn,mn-s);for(let t=0;t<n;t++)e.rotate(Math.PI/n),e.lineTo(yn,mn-s*a),e.rotate(Math.PI/n),e.lineTo(yn,mn-s)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round(q(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=q(i?.inset??2)}}async function wn(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["star"],()=>Promise.resolve(new vn))})}var bn;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(bn||(bn={}));class Pn{decay=0;enable=!1;speed=0;sync=!1;load(t){E(t)||(Zt(this,"enable",t.enable),Jt(this,"speed",t.speed),Jt(this,"decay",t.decay),Zt(this,"sync",t.sync))}}class xn extends me{animation=new Pn;direction=bn.clockwise;enable=!1;load(t){super.load(t),E(t)||(this.animation.load(t.animation),Zt(this,"direction",t.direction),Zt(this,"enable",t.enable))}}class Mn{#u;constructor(t){this.#u=t}getTransformValues(t){const e=t.tilt?.enable&&t.tilt;return{b:e?Math.cos(e.value)*e.cosDirection:void 0,c:e?Math.sin(e.value)*e.sinDirection:void 0}}init(e){const i=e.options.tilt;if(!i)return;e.tilt={enable:i.enable,value:Y(q(i.value)),sinDirection:A()>=o?1:-1,cosDirection:A()>=o?1:-1,min:0,max:u};let s=i.direction;if(s===bn.random){s=Math.floor(2*A())>0?bn.counterClockwise:bn.clockwise}switch(s){case bn.counterClockwise:case"counterClockwise":e.tilt.status=t.AnimationStatus.decreasing;break;case bn.clockwise:e.tilt.status=t.AnimationStatus.increasing}const n=e.options.tilt?.animation;n?.enable&&(e.tilt.decay=1-q(n.decay),e.tilt.velocity=q(n.speed)/360*this.#u.retina.reduceFactor,n.sync||(e.tilt.velocity*=A()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){ie(t,"tilt",xn,...e)}update(e,i){this.isEnabled(e)&&e.tilt&&xi(e,e.tilt,!1,t.DestroyType.none,i)}}async function zn(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("tilt",t=>Promise.resolve(new Mn(t)))})}class Cn{angle=50;move=10;load(t){E(t)||(Jt(this,"angle",t.angle),Jt(this,"move",t.move))}}class Sn{distance=5;enable=!1;speed=new Cn;load(t){if(!E(t)&&(Jt(this,"distance",t.distance),Zt(this,"enable",t.enable),void 0!==t.speed))if(O(t.speed))this.speed.load({angle:t.speed});else{const e=t.speed;"min"in e?this.speed.load({angle:e}):this.speed.load(t.speed)}}}class kn{#u;constructor(t){this.#u=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:A()*u,angleSpeed:q(e.speed.angle)/360,moveSpeed:q(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=q(e?.distance??0)*this.#u.retina.pixelRatio}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.options.wobble?.enable}loadOptions(t,...e){ie(t,"wobble",Sn,...e)}update(t,e){this.isEnabled(t)&&function(t,e,i){const{wobble:s}=e.options,{wobble:n}=e;if(!s?.enable||!n)return;const a=t.retina.reduceFactor,o=n.angleSpeed*i.factor*a,r=n.moveSpeed*i.factor*a*(e.retina.wobbleDistance??0)/16.666666666666668,l=u,{position:c}=e;n.angle+=o,n.angle>l&&(n.angle-=l),c.x+=r*Math.cos(n.angle),c.y+=r*Math.abs(Math.sin(n.angle))}(this.#u,t,e)}}async function Dn(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("wobble",t=>Promise.resolve(new kn(t)))})}class On{angle;colors;count;decay;disableForReducedMotion;drift;flat;gravity;position;scalar;shapeOptions;shapes;spread;startVelocity;ticks;zIndex;constructor(){this.angle=90,this.count=50,this.spread=45,this.startVelocity=45,this.decay=.9,this.gravity=1,this.drift=0,this.ticks=200,this.position={x:50,y:50},this.colors=["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],this.shapes=["square","circle"],this.scalar=1,this.zIndex=100,this.disableForReducedMotion=!0,this.flat=!1,this.shapeOptions={}}get origin(){return{x:this.position.x/a,y:this.position.y/a}}set origin(t){this.position.x=t.x*a,this.position.y=t.y*a}get particleCount(){return this.count}set particleCount(t){this.count=t}load(t){if(E(t))return;Zt(this,"angle",t.angle);const e=t.count??t.particleCount;void 0!==e&&(this.count=e),Zt(this,"spread",t.spread),Zt(this,"startVelocity",t.startVelocity),Zt(this,"decay",t.decay),Zt(this,"flat",t.flat),Zt(this,"gravity",t.gravity),Zt(this,"drift",t.drift),Zt(this,"ticks",t.ticks);const i=t.origin;i&&!t.position&&(t.position={x:void 0===i.x?void 0:i.x*a,y:void 0===i.y?void 0:i.y*a});const s=t.position;s&&(void 0!==s.x&&(this.position.x=s.x),void 0!==s.y&&(this.position.y=s.y)),void 0!==t.colors&&(T(t.colors)?this.colors=[...t.colors]:this.colors=t.colors);const n=t.shapeOptions;if(void 0!==n)for(const t in n){const e=n[t];e&&(this.shapeOptions[t]=yt(this.shapeOptions[t]??{},e))}void 0!==t.shapes&&(T(t.shapes)?this.shapes=[...t.shapes]:this.shapes=t.shapes),Zt(this,"scalar",t.scalar),Zt(this,"zIndex",t.zIndex),Zt(this,"disableForReducedMotion",t.disableForReducedMotion)}}const In=new Map;async function Tn(t,e){const i=new On;i.load(e.options);const s=Number.isFinite(i.ticks)&&i.ticks>0?i.ticks:void 0,n=void 0===s?0:12e3/(60*s);let a=In.get(e.id);a instanceof Promise&&(await a,a=In.get(e.id));const o=a;if(o&&!o.destroyed){const t=o;if("addEmitter"in t)return await async function(t,e,i){await(t.addEmitter?.({startCount:e.count,position:e.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{paint:{fill:{color:{value:e.colors},enable:!0}},shape:{type:e.shapes,options:e.shapeOptions},life:{count:1},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:i,startValue:"max",destroy:"min",count:1}},size:{value:5*e.scalar},move:{angle:{value:e.spread,offset:0},drift:{min:-e.drift,max:e.drift},gravity:{acceleration:9.81*e.gravity},speed:3*e.startVelocity,decay:1-e.decay,direction:-e.angle},rotate:{value:e.flat?0:{min:0,max:360},direction:"random",animation:{enable:!e.flat,speed:60}},tilt:{direction:"random",enable:!e.flat,value:e.flat?0:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!e.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!e.flat,speed:{min:-15,max:15}}}}))}(t,i,n),o}const r=(async()=>{const s=function(t,e,i){return{fullScreen:{enable:!e.canvas,zIndex:t.zIndex},fpsLimit:120,particles:{number:{value:0},paint:{fill:{color:{value:t.colors},enable:!0}},shape:{type:t.shapes,options:t.shapeOptions},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:i,startValue:"max",destroy:"min",count:1}},size:{value:5*t.scalar},links:{enable:!1},life:{count:1},move:{angle:{value:t.spread,offset:0},drift:{min:-t.drift,max:t.drift},enable:!0,gravity:{enable:!0,acceleration:9.81*t.gravity},speed:3*t.startVelocity,decay:1-t.decay,direction:-t.angle,random:!0,straight:!1,outModes:{top:"none",default:"destroy"}},rotate:{value:t.flat?0:{min:0,max:360},direction:"random",animation:{enable:!t.flat,speed:60}},tilt:{direction:"random",enable:!t.flat,value:t.flat?0:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!t.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!t.flat,speed:{min:-15,max:15}}},motion:{disable:t.disableForReducedMotion},emitters:{name:"confetti",startCount:t.count,position:t.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}}}(i,e,n),a=await t.load({id:e.id,element:e.canvas,options:s});return In.set(e.id,a),a})();return In.set(e.id,r),r}let En=null;async function Rn(t){return En||(En=async function(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{await Promise.all([Gi(t),Qs(t),zs(t),ps(t),Ts(t),Us(t),nn(t),fn(t),wn(t),Os(t),pn(t),Ws(t),cn(t),zn(t),Dn(t)])})}(t),En)}async function _n(t,e){let i,s;return await Rn(ni),D(t)?(s=t,i=e??{}):(s="confetti",i=t),Tn(ni,{id:s,options:i})}_n.create=async(t,e={})=>{await Rn(ni);const i=t?.getAttribute("id")??"confetti";return t?.setAttribute("id",i),await Tn(ni,{id:i,canvas:t??void 0,options:e}),async(s,n)=>{let a,o;return D(s)?(o=s,a=n??e):(o=i,a=s),Tn(ni,{id:o,canvas:t??void 0,options:a})}},_n.init=async()=>{await Rn(ni)},_n.version="4.3.2",globalThis.confetti=_n;const Ln=globalThis;Ln.confetti=_n,Ln.tsParticles=ni;function An(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Fn{#M;#z;#C;#S;#k;#u;#D;#O;#I;#T;#E;#R;#p;#_;#L;#A={};#F=[void 0,void 0];#B={};constructor(t,e,i){this.#p=t,this.#u=e,this.#S=i,this.#D=null,this.#M=null,this.#z=new Set,this.#L=[],this.#_=[],this.#C=[],this.#k=[],this.#I=[],this.#T=[],this.#E=[],this.#R={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#O}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(l.x,l.y,this.#S.size.width,this.#S.size.height)})}clear(){for(const t of this.#C)if(t.canvasClear?.())return;for(const e of Object.values(t.DrawLayer))if("number"==typeof e)for(const t of this.#V(e))if(t.canvasClear?.())return;this.canvasClear()}destroy(){this.stop(),this.#M=null,this.#z.clear(),this.#L=[],this.#_=[],this.#C=[],this.#k=[],this.#I=[],this.#T=[],this.#E=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#R[e]=[])}draw(t){const e=this.#D;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[a,o]=this.#U(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:d,opacity:h,strokeOpacity:u}=t.getOpacity(),p=this.#B,g=this.#A,f=a?Xe(a,r.hdr,d*h):void 0,y=o?Xe(o,r.hdr,u*h):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=y,this.draw(s=>{for(const i of this.#E)i.drawParticleSetup?.(s,t,e);this.#$(s,t,i,h,g,p),this.#j({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*c**l.sizeRate,opacity:h,transform:p}),this.#q(t);for(const i of this.#T)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#I)this.#G(i,s,t,e)})}drawParticles(e){const{particles:i,actualOptions:s}=this.#u;this.clear(),i.update(e),this.draw(n=>{const a=this.#S.size.width,o=this.#S.size.height;if(this.#M)try{n.drawImage(this.#M,l.x,l.y,a,o)}catch{this.#W("background-element-draw-error","Error drawing background element onto canvas")}const r=s.background;if(r.draw)try{r.draw(n,e)}catch{this.#W("background-draw-error","Error in background.draw callback")}for(const e of this.#V(t.DrawLayer.BackgroundMask))e.canvasPaint?.();for(const i of this.#V(t.DrawLayer.CanvasSetup))i.drawSettingsSetup?.(n,e);for(const i of this.#V(t.DrawLayer.PluginContent))i.draw?.(n,e);i.drawParticles(e);for(const i of this.#V(t.DrawLayer.CanvasCleanup))i.clearDraw?.(n,e),i.drawSettingsCleanup?.(n,e)})}init(){this.initUpdaters(),this.initPlugins(),this.#H(),this.paint()}initPlugins(){this.#C=[],this.#k=[],this.#I=[],this.#E=[],this.#T=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#R[e]=[]);for(const e of this.#u.plugins)(e.particleFillColor??e.particleStrokeColor)&&this.#k.push(e),e.drawParticle&&this.#I.push(e),e.drawParticleSetup&&this.#E.push(e),e.drawParticleCleanup&&this.#T.push(e),e.canvasClear&&this.#C.push(e),e.canvasPaint&&this.#V(t.DrawLayer.BackgroundMask).push(e),e.drawSettingsSetup&&this.#V(t.DrawLayer.CanvasSetup).push(e),e.draw&&this.#V(t.DrawLayer.PluginContent).push(e),(e.clearDraw??e.drawSettingsCleanup)&&this.#V(t.DrawLayer.CanvasCleanup).push(e)}initUpdaters(){this.#L=[],this.#_=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#_.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#L.push(t)}paint(){let e=!1;for(const i of this.#V(t.DrawLayer.BackgroundMask))if(e=i.canvasPaint?.()??!1,e)break;e||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(l.x,l.y,this.#S.size.width,this.#S.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,l.x,l.y,this.#S.size.width,this.#S.size.height),i.globalAlpha=s})}setContext(t){this.#D=t,this.#D&&(this.#D.globalCompositeOperation=i)}setContextSettings(t){this.#O=t}stop(){this.draw(t=>{t.clearRect(l.x,l.y,this.#S.size.width,this.#S.size.height)})}#q(t){for(const e of this.#_)e.afterDraw?.(t)}#$(t,e,i,s,n,a){for(const o of this.#L){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,s);a&&(n.fill=a),r&&(n.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)An(a,t,e)}o.beforeDraw?.(e)}}#N(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#K(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#j(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:d}=e,h=s.getPosition(),u=s.getTransformData(l),p={x:h.x,y:h.y};i.setTransform(u.a,u.b,u.c,u.d,h.x,h.y),a.fill&&(i.fillStyle=a.fill);const g=!!s.fillEnabled,f=s.strokeWidth??0;i.lineWidth=f,a.stroke&&(i.strokeStyle=a.stroke);const y={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:g,stroke:f>0,transformData:u,position:{...h},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(y);const m=s.effect?c.get(s.effect):void 0,v=s.shape?d.get(s.shape):void 0;this.#K(m,y),this.#Q(v,y),this.#X(v,y),this.#Y(v,y),this.#N(m,y),i.resetTransform()}#G(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#X(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:a}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),a&&i.stroke())}#Y(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#Q(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#V(t){return this.#R[t]}#U(t){let e,i;for(const s of this.#k)if(!e&&s.particleFillColor&&(e=$e(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=$e(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#F[0]=e,this.#F[1]=i,this.#F}#H(){const t=this.#u.actualOptions.background;if(this.#M=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof HTMLImageElement?this.#M=e:e?this.#W("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#W("background-element-not-found",`Background element selector "${t.element}" not found`)}}else(t.element instanceof HTMLCanvasElement||t.element instanceof OffscreenCanvas||t.element instanceof HTMLVideoElement||t.element instanceof HTMLImageElement)&&(this.#M=t.element)}#W(t,e){this.#z.has(t)||(this.#z.add(t),Et().warning(e))}}const Bn=new WeakMap;function Vn(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 Un{domElement;render;renderCanvas;size;zoom=1;#u;#Z;#J;#tt;#p;#et;#it;#st;#nt;constructor(t,e){this.#p=t,this.#u=e,this.render=new Fn(t,e,this),this.#st={height:0,width:0};const i=e.retina.pixelRatio,s=this.#st;this.size={height:s.height*i,width:s.width*i},this.#Z=!1,this.#it=[],this.#et="none"}get#at(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#Z){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#ot();this.render.destroy(),this.#it=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#nt?this.#nt:{x:e*o/t,y:i*o/t}}init(){this.#rt(t=>{t.disconnect()}),this.#J=dt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#lt()}),this.resize(),this.#ct(),this.initBackground(),this.#rt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#dt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Ve(this.#p,e.color);s.backgroundColor=n?Qe(n,t.actualOptions.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#it=[];for(const t of this.#u.plugins)t.resize&&this.#it.push(t)}loadCanvas(t){this.#Z&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#Z=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=Bn.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 Bn.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#tt=bt(s.style));const n=this.#st,a=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=a.height,n.width=a.width);const o=this.#u.retina.pixelRatio,r=this.size;a.height=r.height=n.height*o,a.width=r.width=n.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#st,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.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=o.width,i.height=l.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#et=t,this.#lt())}setZoom(t,e){this.zoom=t,this.#nt=e}stop(){this.#rt(t=>{t.disconnect()}),this.#J=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#ht(),e&&await t.refresh()}#ht(){for(const t of this.#it)t.resize?.()}#dt(){const t=this.#u.actualOptions.hdr&&ct("(color-gamut: p3)")?.matches&&ct("(dynamic-range: high)")?.matches;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...t?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});const e=this.renderCanvas;e&&this.render.setContext(e.getContext("2d",this.render.settings))}#ct(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#at?this.#ut():this.#ot();for(const i in e.style){if(!i||!(i in e.style))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}}#lt(){const t=this.domElement;if(!t)return;this.#rt(t=>{t.disconnect()}),this.#ct(),this.initBackground();const e=this.#et;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#rt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#ot(){const t=this.domElement,e=this.#tt;t&&e&&Vn(t,e,!0)}#rt(t){this.#J&&t(this.#J)}#ut(){const t=this.domElement;t&&Vn(t,Mt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class $n{#u;#pt;#gt;#ft;constructor(t){this.#u=t,this.#pt={visibilityChange:()=>{this.#yt()},resize:()=>{this.#mt()}}}addListeners(){this.#vt(!0)}removeListeners(){this.#vt(!1)}#yt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(lt().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#mt(){this.#ft&&(clearTimeout(this.#ft),this.#ft=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#ft=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*r)}#vt(t){const e=this.#pt;this.#wt(t),zt(document,n,e.visibilityChange,t,!1)}#wt(t){const e=this.#pt,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void zt(globalThis,s,e.resize,t);const n=i.canvas.domElement;this.#gt&&!t?(n&&this.#gt.unobserve(n),this.#gt.disconnect(),this.#gt=void 0):!this.#gt&&t&&n&&(this.#gt=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this.#mt()}),this.#gt.observe(n))}}function jn(t){if(!ht(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}function qn(t,e){const i=t%e;return i<0?i+e:i}function Gn(t,e,i,s){const n=_e(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=vt(n.effect.type,t.id,a),t.shape=vt(n.shape.type,t.id,a);const o=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=vt(e,t.id,a);i&&(t.effect=i)}o.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=vt(e,t.id,a);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===d){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(A()*i.length)]}if(t.shape===d){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(A()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return yt({close:e.close},vt(n,i,s))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return yt({close:e.close},vt(n,i,s))}(t.shape,r,t.id,a):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class Wn{backColor;destroyed;direction;effect;effectClose;effectData;fillColor;fillEnabled;fillOpacity;group;id;ignoresResizeRatio;initialPosition;initialVelocity;isRotating;justWarped;lastPathTime;misplaced;moveCenter;offset;opacity;options;outType;pathRotation;position;randomIndexData;retina;roll;rotation;shape;shapeClose;shapeData;sides;size;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;#bt={fillOpacity:1,opacity:1,strokeOpacity:1};#Pt=C.origin;#xt={sin:0,cos:0};#Mt={a:1,b:0,c:0,d:1};#u;#zt=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#zt.push(t),this.#zt.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#zt.length=0}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0;s?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this.#u.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#Ct(this.#St(Ze(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*o}getModifier(t){return this.#zt.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=q(this.opacity?.value??1),s=this.#St(void 0,t=>t.opacity)??i,n=this.fillOpacity??1,a=this.strokeOpacity??1;return this.#bt.fillOpacity=s*n*e,this.#bt.opacity=s*e,this.#bt.strokeOpacity=s*a*e,this.#bt}getPosition(){return this.#Pt.x=this.position.x+this.offset.x,this.#Pt.y=this.position.y+this.offset.y,this.#Pt.z=this.position.z,this.#Pt}getRadius(){return this.#St(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#xt.sin=Math.sin(t),this.#xt.cos=Math.cos(t),this.#xt}getStrokeColor(){return this.#Ct(this.#St(Ze(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#Mt.a=e.cos*(t.a??c.a),this.#Mt.b=i?e.sin*(t.b??1):t.b??c.b,this.#Mt.c=i?-e.sin*(t.c??1):t.c??c.c,this.#Mt.d=e.cos*(t.d??c.d),this.#Mt}init(e,i,s,n){const a=this.#u;!function(e,i,s){e.id=i,e.group=s,e.justWarped=!1,e.effectClose=!0,e.shapeClose=!0,e.pathRotation=!1,e.lastPathTime=0,e.destroyed=!1,e.unbreakable=!1,e.isRotating=!1,e.rotation=0,e.misplaced=!1,e.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},e.size={value:1,max:1,min:1,enable:!1},e.outType=t.ParticleOutType.normal,e.ignoresResizeRatio=!0}(this,e,n),this.options=Gn(this,a,this.#p,s),a.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(a.particleUpdaters,this),this.#kt(i),this.initialVelocity=this.#Dt(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,a),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(a.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(a,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(a,this)}isInsideCanvas(t){return this.#Ot({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#Ot({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=qn(t,u);return e>=Math.PI*o&&e<3*Math.PI*o}if(this.roll.horizontal){const e=qn(t+Math.PI*o,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=qn(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}removeModifier(t){const e=this.#zt.findIndex(e=>e.id===t);e>=0&&this.#zt.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#St(t,e){let i=t;for(const t of this.#zt)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#It(t,e){let i=0,s=t?C.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return C.create(i.x,i.y,e)}const t=st({size:l,position:s}),c=C.create(t.x,t.y,e);this.#Tt(c,r,o.left??o.default),this.#Tt(c,r,o.right??o.default),this.#Et(c,r,o.top??o.default),this.#Et(c,r,o.bottom??o.default);let d=!0;for(const t of n.particles.checkParticlePositionPlugins)if(d=t.checkParticlePosition?.(this,c,i)??!0,!d)break;if(d)return c;i+=1,s=void 0}}#Dt(){const e=this.options.move,i=J(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=Y(q(e.angle.value)),n=Y(q(e.angle.offset)),a={left:n-s*o,right:n+s*o};return e.straight||(i.angle+=j(H(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=A()),i}#Tt(e,i,s){jn({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#Et(e,i,s){jn({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#Rt(e,i){const s=this.getRadius(),n=this.#u.canvas.size,a=this.position,o=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:o?a.y+s<n.height:a.y-s<n.height,reason:"default"}:e===t.OutModeDirection.left?{inside:o?a.x-s>0:a.x+s>0,reason:"default"}:e===t.OutModeDirection.right?{inside:o?a.x+s<n.width:a.x-s<n.width,reason:"default"}:e===t.OutModeDirection.top?{inside:o?a.y-s>0:a.y+s>0,reason:"default"}:{inside:a.x>=-s&&a.y>=-s&&a.y<=n.height+s&&a.x<=n.width+s,reason:"default"}}#_t(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Ot(t){const e=this.#Rt(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#_t(t.direction,t.outMode),l=a?this.#Lt(a(r),"shape"):void 0,c=o?this.#Lt(o(r),"effect"):void 0;if(l&&c){const t=Math.max(l.margin??0,c.margin??0);return{inside:l.inside&&c.inside,margin:t>0?t:void 0,reason:"combined"}}return l??c??e}#Ct(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?si(t,this.roll.alter.type,this.roll.alter.value):t:t}#kt(e){const i=this.#u,s=Math.floor(q(this.options.zIndex.value)),n=this.#It(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 a=i.canvas.size;switch(this.moveCenter={...wt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=Z(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case t.MoveDirection.inside:this.outType=t.ParticleOutType.inside;break;case t.MoveDirection.outside:this.outType=t.ParticleOutType.outside}this.offset=S.origin}#Lt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Hn{#At;#Ft=new Map;#Bt=[];#Vt;#Ut;#$t=[];#jt;constructor(t){this.#At=t,this.#Vt=0,this.#jt=0}clear(){this.#Ft.clear();const t=this.#Ut;t&&(this.#At=t),this.#Ut=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#qt(e,i);this.#Ft.has(s)||this.#Ft.set(s,[]),this.#Ft.get(s)?.push(t)}query(t,e,i=[]){const s=this.#Gt(t);if(!s)return i;const n=Math.floor(s.minX/this.#At),a=Math.floor(s.maxX/this.#At),o=Math.floor(s.minY/this.#At),r=Math.floor(s.maxY/this.#At);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#Ft.get(a);if(o)for(const s of o)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this.#Wt(t.x,t.y,e),a=this.query(n,i,s);return this.#Ht(),a}queryRectangle(t,e,i,s=[]){const n=this.#Nt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Ht(),a}setCellSize(t){this.#Ut=t}#Wt(t,e,i){return(this.#Bt[this.#Vt++]??=new Kt(t,e,i)).reset(t,e,i)}#Nt(t,e,i,s){return(this.#$t[this.#jt++]??=new Qt(t,e,i,s)).reset(t,e,i,s)}#qt(t,e){return`${Math.floor(t/this.#At)}_${Math.floor(e/this.#At)}`}#Gt(t){if(t instanceof Kt){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 Qt){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}#Ht(){this.#Vt=0,this.#jt=0}}class Nn{checkParticlePositionPlugins;grid;#Kt;#u;#Qt;#Xt;#Yt;#Zt;#Jt;#te;#p;#ee;#ie;#se;#ne;#ae;#oe;constructor(t,e){this.#p=t,this.#u=e,this.#Yt=0,this.#Kt=[],this.#ee=[],this.#Xt=0,this.#Qt=new Map,this.#Zt=new Map,this.#oe=this.#re(this.#u.zLayers),this.grid=new Hn(100),this.checkParticlePositionPlugins=[],this.#Jt=[],this.#te=[],this.#se=[],this.#ie=[],this.#ae=[]}get count(){return this.#Kt.length}addParticle(e,i,s,n){const a=this.#u.actualOptions.particles.number.limit.mode,o=void 0===s?this.#Xt:this.#Qt.get(s)??this.#Xt,r=this.count;if(o>0)switch(a){case t.LimitMode.delete:{const t=r+1-o;t>0&&this.removeQuantity(t);break}case t.LimitMode.wait:if(r>=o)return}try{const a=this.#ee.pop()??new Wn(this.#p,this.#u);a.init(this.#Yt,e,i,s);let o=!0;return n&&(o=n(a)),o?(this.#Kt.push(a),this.#le(a),this.#Yt++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this.#ee.push(a)}catch(t){Et().warning(`error adding particle: ${t}`)}}clear(){this.#Kt=[],this.#Zt.clear(),this.#ce(this.#u.zLayers)}destroy(){this.#Kt=[],this.#ee.length=0,this.#Zt.clear(),this.#oe=[],this.checkParticlePositionPlugins=[],this.#Jt=[],this.#te=[],this.#se=[],this.#ie=[],this.#ae=[]}drawParticles(t){for(let e=this.#oe.length-1;e>=0;e--){const i=this.#oe[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Kt.filter(t)}find(t){return this.#Kt.find(t)}get(t){return this.#Kt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#ae=[],this.#te=[],this.#se=[],this.#Jt=[],this.#ie=[],this.#Zt.clear(),this.#ce(t.zLayers),this.grid=new Hn(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#ae.push(e),e.particleUpdate&&this.#te.push(e),e.postUpdate&&this.#se.push(e),e.particleReset&&this.#Jt.push(e),e.postParticleUpdate&&this.#ie.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#Kt.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let a=t;n<e&&a<this.count;a++)this.#de(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=_e(this.#p,this.#u,s);this.#he(n,i,t)}this.#he(t.particles,i)}setResizeFactor(t){this.#ne=t}update(t){this.grid.clear();for(const e of this.#ae)e.update?.(t);const e=this.#ue(t);for(const e of this.#se)e.postUpdate?.(t);if(this.#pe(t,e),e.size)for(const t of e)this.remove(t);this.#ne=void 0}#ge(...t){this.#ee.push(...t)}#he(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Xt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Qt.set(i,s?.number.limit.value??n.limit.value));const a=this.#fe(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,l=Math.min(o,r)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#Xt=n.limit.value*a:this.#Qt.set(i,n.limit.value*a),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)}#re(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#ye(t){const e=this.#oe.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#fe(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1}#le(t){const e=this.#ye(t.position.z),i=this.#oe[e];i&&(i.push(t),this.#Zt.set(t.id,e))}#de(e,i,s){const n=this.#Kt[e];return!!n&&(n.group===i&&(this.#Kt.splice(e,1),this.#me(n),n.destroy(s),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this.#ge(n),!0))}#me(t){const e=this.#Zt.get(t.id)??this.#ye(t.position.z),i=this.#oe[e];if(!i)return void this.#Zt.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Zt.delete(t.id)}#ce(t){const e=Math.max(Math.floor(t),1);if(this.#oe.length===e)for(const t of this.#oe)t.length=0;else this.#oe=this.#re(e)}#ve(t){const e=this.#ye(t.position.z),i=this.#Zt.get(t.id);if(void 0===i)return void this.#le(t);if(i===e)return;const s=this.#oe[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#oe[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#Zt.set(t.id,e)}else this.#Zt.set(t.id,e)}#ue(t){const e=new Set,i=this.#ne;for(const s of this.#Kt){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.#Jt)t.particleReset?.(s);for(const e of this.#te){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#pe(t,e){for(const i of this.#Kt)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#ie)e.postParticleUpdate?.(i,t);this.#ve(i)}}}class Kn{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=q(s.gravity.maxSpeed)*i,a.moveDrift=q(s.drift)*i,a.moveSpeed=q(s.speed)*i;const o=a.maxDistance;o.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,o.vertical=void 0===n.vertical?void 0:n.vertical*i}}function Qn(t){return!t.destroyed}function Xn(t,e,...i){const s=new Le(t,e);return Yt(s,...i),s}var Yn=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#we;#be;#Pe={value:0,factor:0};#xe;#Me;#ze;#Ce;#Se;#ke;#De;#Oe;#Ie;#Te;#Ee;#p;#Re;#_e;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this.#p=s,this.#xe=i,this.#Ie=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.#Re=!1,this.#we=0,this.#ze=0,this.#Oe=0,this.#Se=!0,this.started=!1,this.destroyed=!1,this.#Ee=!0,this.#De=0,this.zLayers=100,this.pageHidden=!1,this.#_e=o,this.#ke=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Kn(this),this.canvas=new Un(this.#p,this),this.particles=new Nn(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Te=Xn(this.#p,this),this.actualOptions=Xn(this.#p,this),this.#Ce=new $n(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#Ee&&!this.pageHidden&&Qn(this)}get options(){return this.#Te}get sourceOptions(){return this.#_e}addLifeTime(t){this.#Oe+=t}alive(){return!this.#ze||this.#Oe<=this.#ze}destroy(e=!0){if(Qn(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#Ie(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#xe(t,{container:this,data:e})}draw(t){if(!Qn(this))return;let e=t;this.#Me=B(t=>{e&&(this.#De=void 0,e=!1),this.#Le(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}Et().error(`Export plugin with type ${t} not found`)}async init(){if(!Qn(this))return;const e=new Map;for(const t of this.#p.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this.#Te=Xn(this.#p,this,this.#ke,this.sourceOptions),this.actualOptions=Xn(this.#p,this,this.#Te),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:a,smooth:o,zLayers:l}=this.actualOptions;this.hdr=a,this.zLayers=l,this.#ze=q(s)*r,this.#we=q(i)*r,this.#Oe=0,this.fpsLimit=n>0?n:120,this.#Re=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(t.EventType.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(t.EventType.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){if(Qn(this)&&(void 0!==this.#Me&&(V(this.#Me),this.#Me=void 0),!this.#Ee)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Ee=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!Qn(this))return;const i=this.#Ee||e;if(!this.#Se||this.actualOptions.autoPlay){if(this.#Ee&&(this.#Ee=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#Se=!1}async refresh(){if(Qn(this))return this.stop(),this.start()}async reset(t){if(Qn(this))return this.#ke=t,this.#_e=t,this.#Te=Xn(this.#p,this,this.#ke,this.sourceOptions),this.actualOptions=Xn(this.#p,this,this.#Te),this.refresh()}async start(){Qn(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#Ce.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#be=setTimeout(()=>{i()},this.#we)}))}stop(){if(Qn(this)&&this.started){this.#be&&(clearTimeout(this.#be),this.#be=void 0),this.#Se=!0,this.started=!1,this.#Ce.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this.#_e=this.#Te,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Le(t){try{if(!this.#Re&&void 0!==this.#De&&t<this.#De+r/this.fpsLimit)return void this.draw(!1);if(this.#De??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this.#Pe,t-this.#De,this.fpsLimit,this.#Re),this.addLifeTime(this.#Pe.value),this.#De=t,this.#Pe.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#Pe),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Et().error("error in animation loop",t)}}}});var Zn=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=t.DrawLayer.CanvasSetup;#u;#Ae;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#Ae&&(t.globalCompositeOperation=this.#Ae)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Ae=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function Jn(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=U(t.velocity.x,-1,1),t.velocity.y=U(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const d=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&d.y>=0&&d.y>=s||r.inverse&&d.y<=0&&d.y<=-s)&&(d.y=l*s,i&&(t.velocity.y=d.y/i));const h=t.options.zIndex,u=(1-t.zIndexFactor)**h.velocityRate;d.multTo(u),d.multTo(a);const{position:p}=t;p.addTo(d),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}var ta=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(e){const i=e.options.move,s=i.gravity,n=i.path;if(e.moveDecay=1-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},a={x:.01*n.x*e.canvas.size.width,y:.01*n.y*e.canvas.size.height},o=Q(i.getPosition(),a),r=q(s.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:a,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:A()*u,radius:o,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options.move;if(!s.enable)return;const n=this.#u,a=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(e),r=n.retina.reduceFactor,l=e.retina.moveSpeed,c=e.retina.moveDrift,d=e.size.max,h=l*(s.size?e.getRadius()/d:1)*a*(i.factor||1)*o,u=e.retina.maxSpeed;s.spin.enable?function(e,i,s,n){if(!i.spin)return;const a=i.spin.direction===t.RotateDirection.clockwise,r={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*r.x(i.spin.angle)*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*o;i.spin.radius>c?(i.spin.radius=c,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*s*(1-i.spin.radius/l)}(n,e,h,r):Jn(e,s,h,u,c,r,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=N(e,t.position),n=Math.abs(i),a=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&n>=l||c&&a>=c)&&!t.misplaced)t.misplaced=!!l&&n>l||!!c&&a>c,l&&(t.velocity.x=t.velocity.y*o-t.velocity.x),c&&(t.velocity.y=t.velocity.x*o-t.velocity.y);else if((!l||n<l)&&(!c||a<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.#Fe()}redrawInit(){return this.#Fe()}update(){for(const t of this.pathGenerators.values())t.update()}async#Fe(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var ea=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#b;constructor(t,e){this.#b=t,this.#u=e,this.#b.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(T(t))for(const e of t)await this.#b.addEmitter(this.#u,e);else await this.#b.addEmitter(this.#u,t)}pause(){for(const t of this.#b.getArray(this.#u))t.pause()}play(){for(const t of this.#b.getArray(this.#u))t.play()}resize(){for(const t of this.#b.getArray(this.#u))t.resize()}stop(){this.#b.clear(this.#u)}update(t){this.#b.getArray(this.#u).forEach(e=>{e.update(t)})}}});const ia=new Map;var sa=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||ia.set(t,e)}getShapeGenerator(t){return ia.get(t)}getSupportedShapeGenerators(){return ia.keys()}}});var na=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Be;#p;constructor(t){this.#Be=new Map,this.#p=t}async addEmitter(t,e,i){const s=new bs;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return ca}),a=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this.#Be.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Be.get(t);return e||(e=[],this.#Be.set(t,e)),e}initContainer(t){this.#Be.has(t)||(this.#Be.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)}}});var aa=Object.freeze({__proto__:null,ImagePreloaderInstance:class{#u;#n;constructor(t,e){this.#n=t,this.#u=e}destroy(){this.#n.images?.delete(this.#u)}}});var oa=Object.freeze({__proto__:null,MotionPluginInstance:class{#u;constructor(t){this.#u=t}async init(){const t=this.#u,e=t.actualOptions.motion;if(!e||!e.disable&&!e.reduce.value)return void(t.retina.reduceFactor=1);const i=ct("(prefers-reduced-motion: reduce)");if(!i)return void(t.retina.reduceFactor=1);this.#Ve(i);i.addEventListener("change",()=>{(async()=>{this.#Ve(i);try{await t.refresh()}catch{}})()}),await Promise.resolve()}#Ve(t){const e=this.#u,i=e.actualOptions.motion;i&&(t.matches?i.disable?e.retina.reduceFactor=0:e.retina.reduceFactor=i.reduce.value?1/i.reduce.factor:1:e.retina.reduceFactor=1)}}});function ra(t,e,i,s){(t.paint??=new Ce).fill={color:le.create(void 0,{value:e}),enable:s,opacity:i}}function la(t,e,i,s){(t.paint??=new Ce).stroke={color:le.create(void 0,{value:e}),opacity:i,width:s}}var ca=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#Ue;#$e;#je;#ze;#qe;#Ge;#We;#He;#Ne;#J;#Ke;#Ee;#p;#Qe;#gt;#Xe;#Ye;#Ze;#Je;constructor(e,i,s,n,o){this.#p=e,this.#u=i,this.#Qe=s,this.#Ue=0,this.#$e=0,this.#je=0,this.#He=o,n instanceof bs?this.options=n:(this.options=new bs,this.options.load(n)),this.#Ze=i.retina.reduceFactor?q(this.options.life.delay??0)*r/i.retina.reduceFactor:1/0,this.position=this.#He??this.#It(),this.name=this.options.name,this.fill=this.options.fill,this.#Ge=!this.options.life.wait,this.#Je=!1;const l=yt({},this.options.particles);if(l.move??={},l.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=$e(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=$e(this.#p,this.options.spawn.stroke.color)),this.#Ee=!this.options.autoPlay,this.#Ke=l,this.#Ye=this.#ti(),this.size=this.#Ye.mode===t.PixelMode.percent?{width:this.#Ye.width/a*this.#u.canvas.size.width,height:this.#Ye.height/a*this.#u.canvas.size.height}:{width:this.#Ye.width,height:this.#Ye.height},this.#Ne=this.options.life.count??-1,this.#We=this.#Ne<=0,this.options.domId){const t=lt().getElementById(this.options.domId);t&&(this.#J=new MutationObserver(()=>{this.resize()}),this.#gt=new ResizeObserver(()=>{this.resize()}),this.#J.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#gt.observe(t))}const c=this.options.shape,d=this.#p.emitterShapeManager?.getShapeGenerator(c.type);d&&(this.#Xe=d.generate(this.#u,this.position,this.size,this.fill,c.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#Ee=!0,this.pause()}externalPlay(){this.#Ee=!1,this.play()}async init(){await(this.#Xe?.init())}pause(){this.#Ee||(this.#qe=void 0)}play(){if(this.#Ee)return;if(!(this.#Ne>0||this.#We)&&this.options.life.count||!(this.#Ge||this.#je>=(this.#Ze??0)))return;const t=this.#u;if(void 0===this.#qe){const e=q(this.options.rate.delay);this.#qe=t.retina.reduceFactor?e*r/t.retina.reduceFactor:1/0}(this.#Ne>0||this.#We)&&this.#ei()}resize(){const e=this.#He,i=this.#u;this.position=e&&pt(e,i.canvas.size,S.origin)?e:this.#It(),this.#Ye=this.#ti(),this.size=this.#Ye.mode===t.PixelMode.percent?{width:this.#Ye.width/a*i.canvas.size.width,height:this.#Ye.height/a*i.canvas.size.height}:{width:this.#Ye.width,height:this.#Ye.height},this.#Xe?.resize(this.position,this.size)}update(t){if(this.#Ee)return;const e=this.#u;this.#Ge&&(this.#Ge=!1,this.#je=this.#Ze??0,this.#$e=this.#qe??0),this.#Je||(this.#Je=!0,this.#ii(this.options.startCount)),void 0!==this.#ze&&(this.#Ue+=t.value,this.#Ue>=this.#ze&&(this.pause(),void 0!==this.#Ze&&(this.#Ze=void 0),this.#We||this.#Ne--,this.#Ne>0||this.#We?(this.position=this.#It(),this.#Xe?.resize(this.position,this.size),this.#Ze=e.retina.reduceFactor?q(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0):this.#si(),this.#Ue-=this.#ze,this.#ze=void 0)),void 0!==this.#Ze&&(this.#je+=t.value,this.#je>=this.#Ze&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#je-=this.#Ze,this.#Ze=void 0)),void 0!==this.#qe&&(this.#$e+=t.value,this.#$e>=this.#qe&&(this.#ni(),this.#$e-=this.#qe))}#It(){const t=this.#u;if(this.options.domId){const e=lt().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*o)*s,y:(i.y+i.height*o)*s}}}return it({size:t.canvas.size,position:this.options.position})}#ti(){const e=this.#u;if(this.options.domId){const i=lt().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 vs;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}#si(){this.#J?.disconnect(),this.#J=void 0,this.#gt?.disconnect(),this.#gt=void 0,this.#Qe(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#ni(){if(this.#Ee)return;const t=q(this.options.rate.quantity);this.#ii(t)}#ii(t){const e=vt(this.#Ke)??{},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),a=this.options.spawn.stroke?.color?.animation,o=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.#u.retina.reduceFactor,c=!!i,d=!!a,h=!!this.#Xe,u=c||d,p=u||h,g=u?{h:m,s:v,l:w}:null,f=this.options.shape;for(let c=0;c<t*l;c++){const t=p?yt({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=o,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&g&&(this.spawnFillColor.h=this.#ai(i.h,this.spawnFillColor.h,g.h,3.6),this.spawnFillColor.s=this.#ai(i.s,this.spawnFillColor.s,g.s),this.spawnFillColor.l=this.#ai(i.l,this.spawnFillColor.l,g.l)),ra(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&g&&(this.spawnStrokeColor.h=this.#ai(a.h,this.spawnStrokeColor.h,g.h,3.6),this.spawnStrokeColor.s=this.#ai(a.s,this.spawnStrokeColor.s,g.s),this.spawnStrokeColor.l=this.#ai(a.l,this.spawnStrokeColor.l,g.l)),la(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#Xe){const e=this.#Xe.randomPosition();if(e){l=e.position;const i=f.replace;i.color&&e.color&&ra(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#ei(){if(this.#Ee)return;const t=void 0!==this.options.life.duration?q(this.options.life.duration):void 0;(this.#Ne>0||this.#We)&&void 0!==t&&t>0&&(this.#ze=t*r)}#ai(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const a=j(t.offset),o=q(this.options.rate.delay),l=n.retina.reduceFactor?o*r/n.retina.reduceFactor:1/0;return(e+q(t.speed)*n.fpsLimit/l+a*s)%i}}});t.AnimatableColor=le,t.AnimationOptions=se,t.AnimationValueWithRandom=ve,t.Background=ce,t.BaseRange=Nt,t.Circle=Kt,t.ColorAnimation=ae,t.Fill=pe,t.FullScreen=de,t.HslAnimation=oe,t.Move=Me,t.MoveAngle=ge,t.MoveCenter=fe,t.MoveGravity=ye,t.MovePath=be,t.OptionLoader=Xt,t.Options=Le,t.OptionsColor=re,t.OutModes=Pe,t.Paint=Ce,t.ParticlesBounce=ke,t.ParticlesBounceFactor=Se,t.ParticlesDensity=De,t.ParticlesNumber=Ie,t.ParticlesNumberLimit=Oe,t.ParticlesOptions=Re,t.RangedAnimationOptions=ne,t.RangedAnimationValueWithRandom=we,t.Rectangle=Qt,t.ResizeEvent=he,t.Shape=Te,t.Spin=xe,t.Stroke=ze,t.ValueWithRandom=me,t.Vector=S,t.Vector3d=C,t.ZIndex=Ee,t.alterHsl=si,t.animate=B,t.areBoundsInside=gt,t.calcExactPositionOrRandomFromSize=st,t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/a,y:t.position.y*t.size.height/a}:void 0},t.calcPositionOrRandomFromSize=et,t.calcPositionOrRandomFromSizeRanged=it,t.calculateBounds=ft,t.cancelAnimation=V,t.canvasFirstIndex=0,t.canvasTag=f,t.checkDistance=X,t.circleBounce=function(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=N(a,n);if(i*o+s*r<0)return;const l=-Math.atan2(r,o),c=t.mass,d=e.mass,h=t.velocity.rotate(l),u=e.velocity.rotate(l),p=tt(h,u,c,d),g=tt(u,h,c,d),f=p.rotate(-l),y=g.rotate(-l);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=y.x*e.factor.x,e.velocity.y=y.y*e.factor.y},t.circleBounceDataFromParticle=function(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:S.create(q(t.options.bounce.horizontal.value),q(t.options.bounce.vertical.value))}},t.clamp=U,t.cloneStyle=bt,t.collisionVelocity=tt,t.colorMix=Ye,t.colorToRgb=Ue,t.confetti=_n,t.countOffset=1,t.decayOffset=1,t.deepExtend=yt,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=i,t.defaultDensityFactor=1,t.defaultFps=60,t.defaultFpsLimit=120,t.defaultLoops=0,t.defaultOpacity=1,t.defaultRatio=1,t.defaultReduceFactor=1,t.defaultRemoveQuantity=1,t.defaultRetryCount=0,t.defaultRgbMin=0,t.defaultTime=0,t.defaultTransform=c,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=Y,t.deleteCount=1,t.double=2,t.doublePI=u,t.empty=0,t.executeOnSingleOrMultiple=mt,t.generatedAttribute=e,t.generatedFalse=g,t.generatedTrue=p,t.getDistance=Q,t.getDistanceSq=K,t.getDistances=N,t.getFullScreenStyle=Mt,t.getHslAnimationFromHsl=Je,t.getHslFromAnimation=Ze,t.getItemMapFromInitializer=St,t.getItemsFromInitializer=Ct,t.getLinkColor=function(t,e,i){if(i===d)return Ke();if(i!==h)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return Ye(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return We(t)}}},t.getLinkRandomColor=function(t,e,i,s){const n=D(e)?e:e.value;return n===d?s?Ve(t,{value:n}):i?d:h:n===h?h:Ve(t,{value:n})},t.getLogger=Et,t.getParticleBaseVelocity=J,t.getParticleDirectionAngle=Z,t.getPosition=wt,t.getRandom=A,t.getRandomFn=function(){return _},t.getRandomInRange=F,t.getRandomRgbColor=Ke,t.getRangeMax=W,t.getRangeMin=G,t.getRangeValue=q,t.getStyleFromHsl=Xe,t.getStyleFromRgb=Qe,t.hMax=m,t.hMin=0,t.hPhase=60,t.half=o,t.hslToRgb=We,t.hslToRgbFloat=He,t.hslaToRgba=Ne,t.identity=1,t.inverseFactorNumerator=1,t.isArray=T,t.isBoolean=k,t.isFunction=function(t){return"function"==typeof t},t.isInArray=ht,t.isNull=E,t.isNumber=O,t.isObject=I,t.isPointInside=pt,t.isString=D,t.itemFromArray=ut,t.itemFromSingleOrMultiple=vt,t.lFactor=1,t.lMax=w,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){if(void 0!==i){const s=e;if("__proto__"===s||"constructor"===s||"prototype"===s)return;const n=t,a=Object.prototype.hasOwnProperty.call(n,s)?n[s]:{};n[s]=yt(a,i)}},t.loadLazyProperty=ee,t.loadMinIndex=0,t.loadNestedProperty=te,t.loadOptionProperty=ie,t.loadOptions=Yt,t.loadParticlesOptions=_e,t.loadProperty=Zt,t.loadRandomFactor=1e4,t.loadRangeProperty=Jt,t.manageListener=zt,t.maxNits=x,t.midColorValue=h,t.millisecondsToSeconds=r,t.minCount=0,t.minDistance=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minRadius=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=$,t.none=0,t.one=1,t.originPoint=l,t.parseAlpha=nt,t.percentDenominator=a,t.phaseNumerator=1,t.quarter=b,t.randomColorValue=d,t.randomInRangeValue=j,t.rangeColorToHsl=$e,t.rangeColorToRgb=Ve,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=y,t.rgbToHsl=je,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=lt,t.safeMatchMedia=ct,t.safeMutationObserver=dt,t.setAnimationFunctions=function(t,e){L.nextFrame=t,L.cancel=e},t.setLogger=function(t){t.debug&&(Tt.debug=It(t.debug)),t.error&&(Tt.error=It(t.error)),t.info&&(Tt.info=It(t.info)),t.log&&(Tt.log=It(t.log)),t.trace&&(Tt.trace=It(t.trace)),t.verbose&&(Tt.verbose=It(t.verbose)),t.warning&&(Tt.warning=It(t.warning))},t.setRandom=function(t=Math.random){_=t},t.setRangeValue=H,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Be(t,e)?.a},t.stringToRgb=qe,t.threeQuarter=P,t.triple=3,t.tryCountIncrement=1,t.tsParticles=ni,t.updateColor=ii,t.updateColorValue=ei,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{confetti:(globalThis.__tsParticlesInternals.bundles.confetti||{}).confetti}),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.confetti=t.__tsParticlesInternals.bundles.confetti||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",a=100,o=.5,r=1e3,l={x:0,y:0,z:0},c={a:1,b:0,c:0,d:1},d="random",h="mid",u=2*Math.PI,p="true",g="false",f="canvas",m=255,y=360,v=100,w=100,b=.25,x=.75,P=400;var M;function z(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(M=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",M.bottomLeft="bottom-left",M.bottomRight="bottom-right",M.left="left",M.none="none",M.right="right",M.top="top",M.topLeft="top-left",M.topRight="top-right",M.outside="outside",M.inside="inside";class C{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 C.create(l.x,l.y,l.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return C.create(t.x,t.y,z(t))}static create(t,e,i){return"number"==typeof t?new C(t,e??l.y,i??l.z):new C(t.x,t.y,z(t))}add(t){return C.create(this.x+t.x,this.y+t.y,this.z+z(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=z(t)}copy(){return C.clone(this)}div(t){return C.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return C.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return C.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),l.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=z(t)}sub(t){return C.create(this.x-t.x,this.y-t.y,this.z-z(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=z(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class k extends C{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return k.create(l.x,l.y)}static clone(t){return k.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new k(t,e??l.y):new k(t.x,t.y)}}function S(t){return"boolean"==typeof t}function D(t){return"string"==typeof t}function O(t){return"number"==typeof t}function I(t){return"object"==typeof t&&null!==t}function T(t){return Array.isArray(t)}function E(t){return null==t}const R=Math.PI/180;let L=Math.random;const _={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function F(){return U(L(),0,1-Number.EPSILON)}function A(t,e){return F()*(e-t)+t}function B(t){return _.nextFrame(t)}function V(t){_.cancel(t)}function U(t,e,i){return Math.min(Math.max(t,e),i)}function H(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function $(t){const e=q(t);let i=N(t);return e===i&&(i=0),A(i,e)}function j(t){return O(t)?t:$(t)}function N(t){return O(t)?t:t.min}function q(t){return O(t)?t:t.max}function G(t,e){if(t===e||void 0===e&&O(t))return t;const i=N(t),s=q(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:G(i,s)}function W(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function K(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function Q(t,e){return Math.sqrt(K(t,e))}function X(t,e,i){return K(t,e)<=i*i}function Y(t){return t*R}function Z(e,i,s){if(O(e))return Y(e);switch(e){case t.MoveDirection.top:return-Math.PI*o;case t.MoveDirection.topRight:return-Math.PI*b;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*b;case t.MoveDirection.bottom:return Math.PI*o;case t.MoveDirection.bottomLeft:return Math.PI*x;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*x;case t.MoveDirection.inside:return Math.atan2(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 F()*u}}function J(t){const e=k.origin;return e.length=1,e.angle=t,e}function tt(t,e,i,s){return k.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function et(t){return{x:(t.position?.x??F()*a)*t.size.width/a,y:(t.position?.y??F()*a)*t.size.height/a}}function it(t){const e={x:void 0!==t.position?.x?j(t.position.x):void 0,y:void 0!==t.position?.y?j(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??F()*i.width,y:e?.y??F()*i.height}}function nt(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1}var at,ot;t.OutModeDirection=void 0,(at=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",at.left="left",at.right="right",at.top="top",t.PixelMode=void 0,(ot=t.PixelMode||(t.PixelMode={})).precise="precise",ot.percent="percent";function rt(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function lt(){return globalThis.document}function ct(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function dt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function ht(t,e){return t===e||T(e)&&e.includes(t)}function ut(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(F()*t.length)]}function pt(t,e,i,s,n){return gt(ft(t,s??0),e,i,n)}function gt(e,i,s,n){let a=!0;return n&&n!==t.OutModeDirection.bottom||(a=e.top<i.height+s.x),!a||n&&n!==t.OutModeDirection.left||(a=e.right>s.x),!a||n&&n!==t.OutModeDirection.right||(a=e.left<i.width+s.y),!a||n&&n!==t.OutModeDirection.top||(a=e.bottom>s.y),a}function ft(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function mt(t,...e){for(const i of e){if(E(i))continue;if(!I(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):I(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return I(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if(rt(t))continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if(rt(s))continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>mt(void 0,t)):mt(e[s],n)}}return t}function yt(t,e){return T(t)?t.map((t,i)=>e(t,i)):e(t,0)}function vt(t,e,i){return T(t)?ut(t,e,i):t}function wt(e,i){return function(e,i){if(e.mode!==t.PixelMode.percent){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/a*i.width,y:e.y/a*i.height}:{width:e.width/a*i.width,height:e.height/a*i.height}}(e,i)}function bt(t){const e=lt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||E(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}let xt,Pt;function Mt(t){if(xt!==t||!Pt){xt=t;const e=lt().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}Pt=e}return Pt}function zt(t,e,i,s,n){if(s){let s={passive:!0};S(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 Ct(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,n)),n}async function kt(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class St{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var Dt;t.EventType=void 0,(Dt=t.EventType||(t.EventType={})).configAdded="configAdded",Dt.containerInit="containerInit",Dt.particlesSetup="particlesSetup",Dt.containerStarted="containerStarted",Dt.containerStopped="containerStopped",Dt.containerDestroyed="containerDestroyed",Dt.containerPaused="containerPaused",Dt.containerPlay="containerPlay",Dt.containerBuilt="containerBuilt",Dt.particleAdded="particleAdded",Dt.particleDestroyed="particleDestroyed",Dt.particleRemoved="particleRemoved";class Ot{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#s.set(i,e),this.#n.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return kt(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return kt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return Ct(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#a,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#a,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const It=t=>(...e)=>{t(...e)},Tt={debug:It(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:It(console.info),log:It(console.log),trace:It(console.trace),verbose:It(console.log),warning:It(console.warn)};function Et(){return Tt}const Rt="100%";class Lt{pluginManager=new Ot(this);#d=[];#h=new St;#o=!1;get items(){return this.#d}get version(){return"4.4.0"}addEventListener(t,e){this.#h.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#h.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return ra}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*F()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=vt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Et().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=vt(r,a),{items:c}=this,d=c.findIndex(t=>t.id.description===n),h=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(h);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(d>=0){const t=this.item(d),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(d,e,h)}else c.push(h);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=lt();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)s=t,s.dataset[e]??=g,s.dataset[e]===p&&(s.style.width||=Rt,s.style.height||=Rt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(f).item(0);n?(s=n,s.dataset[e]=g):(s=i.createElement(f),s.dataset[e]=p,t.appendChild(s)),s.style.width||=Rt,s.style.height||=Rt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=lt();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return h.canvas.loadCanvas(u),await h.start(),h}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#h.removeEventListener(t,e)}}var _t,Ft,At,Bt,Vt,Ut,Ht,$t,jt,Nt,qt,Gt,Wt;!function(t){t.circle="circle",t.rectangle="rectangle"}(_t||(_t={}));class Kt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Qt extends Kt{radius;constructor(t,e,i){super(t,e,_t.circle),this.radius=i}contains(t){return X(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Qt||t.type===_t.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Xt||t.type===_t.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(n-i,2)+Math.pow(a-o,2)<=s**2||n<=s+i&&a<=s+o||n<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Xt extends Kt{size;constructor(t,e,i,s){super(t,e,_t.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof Qt)return t.intersects(this);if(!(t instanceof Xt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,o=a.width,r=a.height;return n.x<s.x+e&&n.x+o>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}t.RotateDirection=void 0,(Ft=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Ft.counterClockwise="counter-clockwise",Ft.random="random",t.AnimationMode=void 0,(At=t.AnimationMode||(t.AnimationMode={})).auto="auto",At.increase="increase",At.decrease="decrease",At.random="random",t.HdrMode=void 0,(Bt=t.HdrMode||(t.HdrMode={})).standard="standard",Bt.natural="natural",Bt.vivid="vivid",Bt.cinematic="cinematic",Bt.dynamic="dynamic",t.LimitMode=void 0,(Vt=t.LimitMode||(t.LimitMode={})).delete="delete",Vt.wait="wait",t.OutMode=void 0,(Ut=t.OutMode||(t.OutMode={})).bounce="bounce",Ut.none="none",Ut.out="out",Ut.destroy="destroy",Ut.split="split",t.AlterType=void 0,(Ht=t.AlterType||(t.AlterType={})).darken="darken",Ht.enlighten="enlighten",t.DestroyType=void 0,($t=t.DestroyType||(t.DestroyType={})).none="none",$t.max="max",$t.min="min",t.GradientType=void 0,(jt=t.GradientType||(t.GradientType={})).linear="linear",jt.radial="radial",jt.random="random",t.ParticleOutType=void 0,(Nt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Nt.inside="inside",Nt.outside="outside",t.StartValueType=void 0,(qt=t.StartValueType||(t.StartValueType={})).max="max",qt.min="min",qt.random="random",t.AnimationStatus=void 0,(Gt=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",Gt.decreasing="decreasing",t.DrawLayer=void 0,(Wt=t.DrawLayer||(t.DrawLayer={}))[Wt.BackgroundElement=0]="BackgroundElement",Wt[Wt.BackgroundDraw=1]="BackgroundDraw",Wt[Wt.BackgroundMask=2]="BackgroundMask",Wt[Wt.CanvasSetup=3]="CanvasSetup",Wt[Wt.PluginContent=4]="PluginContent",Wt[Wt.Particles=5]="Particles",Wt[Wt.CanvasCleanup=6]="CanvasCleanup",Wt[Wt.Foreground=7]="Foreground";class Yt{load(t){E(t)||this.doLoad(t)}}function Zt(t,...e){for(const i of e)t.load(i)}function Jt(t,e,i){void 0!==i&&(t[e]=i)}function te(t,e,i){void 0!==i&&(t[e]=G(i))}function ee(t,e,i){void 0!==i&&t[e].load(i)}function ie(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function se(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class ne extends Yt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){te(this,"count",t.count),Jt(this,"enable",t.enable),te(this,"speed",t.speed),te(this,"decay",t.decay),te(this,"delay",t.delay),Jt(this,"sync",t.sync)}}class ae extends ne{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),Jt(this,"mode",t.mode),Jt(this,"startValue",t.startValue)}}class oe extends ne{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Jt(this,"max",t.max),Jt(this,"min",t.min),te(this,"offset",t.offset)}}class re extends Yt{h=new oe(0,y);l=new oe(0,w);s=new oe(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class le extends Yt{value="";static create(t,e){const i=new le;return i.load(t),void 0!==e&&(D(e)||T(e)?i.load({value:e}):i.load(e)),i}doLoad(t){E(t.value)||(this.value=t.value)}}class ce extends le{animation=new re;static create(t,e){const i=new ce;return i.load(t),void 0!==e&&(D(e)||T(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class de extends Yt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new le,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=le.create(this.color,t.color)),Jt(this,"element",t.element),Jt(this,"draw",t.draw),Jt(this,"image",t.image),Jt(this,"position",t.position),Jt(this,"repeat",t.repeat),Jt(this,"size",t.size),Jt(this,"opacity",t.opacity)}}class he extends Yt{enable=!0;zIndex=0;doLoad(t){Jt(this,"enable",t.enable),Jt(this,"zIndex",t.zIndex)}}class ue extends Yt{enable=!0;mode=t.HdrMode.standard;peakNits=400;doLoad(e){if(void 0!==e.enable&&!S(e.enable))throw new Error(`Invalid HDR "enable" value: expected a boolean, got "${String(e.enable)}"`);if(void 0!==e.mode&&("string"!=typeof e.mode||!Object.values(t.HdrMode).includes(e.mode)))throw new Error(`Invalid HDR "mode" value: expected one of ${Object.values(t.HdrMode).join(", ")}, got "${i=e.mode,String(i)}"`);var i;if(void 0!==e.peakNits&&(!O(e.peakNits)||!Number.isFinite(e.peakNits)||e.peakNits<=0))throw new Error(`Invalid HDR "peakNits" value: expected a positive number, got "${String(e.peakNits)}"`);Jt(this,"enable",e.enable),Jt(this,"mode",e.mode),Jt(this,"peakNits",e.peakNits)}}class pe extends Yt{delay=.5;enable=!0;doLoad(t){Jt(this,"delay",t.delay),Jt(this,"enable",t.enable)}}class ge extends Yt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=mt(this.options[t]??{},i))}Jt(this,"close",t.close),Jt(this,"type",t.type)}}class fe extends Yt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),Jt(this,"enable",t.enable),te(this,"opacity",t.opacity)}}class me extends Yt{offset=0;value=90;doLoad(t){te(this,"offset",t.offset),te(this,"value",t.value)}}class ye extends Yt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){Jt(this,"x",t.x),Jt(this,"y",t.y),Jt(this,"mode",t.mode),Jt(this,"radius",t.radius)}}class ve extends Yt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){te(this,"acceleration",t.acceleration),Jt(this,"enable",t.enable),Jt(this,"inverse",t.inverse),te(this,"maxSpeed",t.maxSpeed)}}class we extends Yt{value=0;doLoad(t){E(t.value)||(this.value=G(t.value))}}class be extends we{animation=new ne;doLoad(t){super.doLoad(t),ee(this,"animation",t.animation)}}class xe extends be{animation=new ae}class Pe extends Yt{clamp=!0;delay=new we;enable=!1;generator;options={};doLoad(t){Jt(this,"clamp",t.clamp),this.delay.load(t.delay),Jt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=mt(this.options,t.options))}}class Me extends Yt{bottom;default=t.OutMode.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class ze extends Yt{acceleration=0;enable=!1;position;doLoad(t){te(this,"acceleration",t.acceleration),Jt(this,"enable",t.enable),t.position&&(this.position=mt({},t.position))}}class Ce extends Yt{angle=new me;center=new ye;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new ve;outModes=new Me;path=new Pe;random=!1;size=!1;speed=2;spin=new ze;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(O(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),te(this,"decay",t.decay),Jt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=O(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),te(this,"drift",t.drift),Jt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(I(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Jt(this,"random",t.random),Jt(this,"size",t.size),te(this,"speed",t.speed),this.spin.load(t.spin),Jt(this,"straight",t.straight),Jt(this,"vibrate",t.vibrate),Jt(this,"warp",t.warp)}}class ke extends Yt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),te(this,"width",t.width),te(this,"opacity",t.opacity)}}class Se extends Yt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),ie(this,"fill",t.fill,()=>new fe),ie(this,"stroke",t.stroke,()=>new ke)}}class De extends we{value=1}class Oe extends Yt{horizontal=new De;vertical=new De;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Ie extends Yt{enable=!1;height=1080;width=1920;doLoad(t){Jt(this,"enable",t.enable),Jt(this,"width",t.width),Jt(this,"height",t.height)}}class Te extends Yt{mode=t.LimitMode.delete;value=0;doLoad(t){Jt(this,"mode",t.mode),Jt(this,"value",t.value)}}class Ee extends Yt{density=new Ie;limit=new Te;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Jt(this,"value",t.value)}}class Re extends Yt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=mt(this.options[t]??{},i))}Jt(this,"close",t.close),Jt(this,"type",t.type)}}class Le extends we{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Jt(this,"opacityRate",t.opacityRate),Jt(this,"sizeRate",t.sizeRate),Jt(this,"velocityRate",t.velocityRate)}}class _e extends Yt{bounce=new Oe;effect=new ge;groups={};move=new Ce;number=new Ee;paint;palette;reduceDuplicates=!1;shape=new Re;zIndex=new Le;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Se,this.paint.color=new ce,this.paint.color.value="#fff",this.paint.fill=new fe,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#g(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=mt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(T(e)?this.paint=yt(e,t=>{const e=new Se;return e.load(t),e}):T(this.paint)?(this.paint=new Se,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#g(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(T(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 Fe(t,e,...i){const s=new _e(t,e);return Zt(s,...i),s}class Ae extends Yt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new de,this.fullScreen=new he,this.hdr=new ue,this.particles=Fe(this.#p,this.#u),this.resize=new pe}doLoad(e){void 0!==e.preset&&(this.preset=e.preset,yt(this.preset,t=>{this.#f(t)})),void 0!==e.palette&&(this.palette=e.palette,this.#g(this.palette)),Jt(this,"autoPlay",e.autoPlay),Jt(this,"clear",e.clear),Jt(this,"key",e.key),Jt(this,"name",e.name),te(this,"delay",e.delay),Jt(this,"detectRetina",e.detectRetina),te(this,"duration",e.duration),Jt(this,"fpsLimit",e.fpsLimit);const i=e.hdr;S(i)?(this.hdr.enable=i,this.hdr.mode=t.HdrMode.standard,this.hdr.peakNits=400):this.hdr.load(i),Jt(this,"pauseOnBlur",e.pauseOnBlur),Jt(this,"pauseOnOutsideViewport",e.pauseOnOutsideViewport),Jt(this,"zLayers",e.zLayers),this.background.load(e.background);const s=e.fullScreen;S(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(e.particles),this.resize.load(e.resize),this.style=mt(this.style,e.style),Jt(this,"smooth",e.smooth),this.#p.plugins.forEach(t=>{t.loadOptions(this.#u,this,e)})}#g(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#f(t){this.load(this.#p.getPreset(t))}}const Be=new Map,Ve=1.15,Ue=1.05,He=.2126,$e=.7152,je=.0722;function Ne(t,e){let i=Be.get(t);return i||(i=e(),Be.size>2e3&&Be.clear(),Be.set(t,i)),i}function qe(t){return U(t*(2.51*t+.03)/(t*(2.43*t+.59)+.14),0,1)}function Ge(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function We(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055}function Ke(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Qe(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return Xe(t,n.value,i,s);if(T(n.value)){const e=ut(n.value,i,s);if(!e)return;return Qe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Xe(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return n.value===d?ni():Je(t,n.value);if(T(n.value)){const e=ut(n.value,i,s);if(!e)return;return Xe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ye(t,e,i,s=!0){const n=Qe(t,e,i,s);return n?Ze(n):void 0}function Ze(t){const e=t.r/m,i=t.g/m,s=t.b/m,n=Math.max(e,i,s),a=Math.min(e,i,s),r={h:0,l:(n+a)*o,s:0};return n!==a&&(r.s=r.l<o?(n-a)/(n+a):(n-a)/(2-n-a),r.h=e===n?(i-s)/(n-a):i===n?2+(s-e)/(n-a):4+(e-i)/(n-a)),r.l*=w,r.s*=v,r.h*=60,r.h<0&&(r.h+=y),r.h>=y&&(r.h-=y),r}function Je(t,e){return Ke(t,e)}function ti(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function ei(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),n=e/y,a=i/v,r=s/w;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const l=r<o?r*(1+a):r+a-r*a,c=2*r-l,d=1/3,h=Math.min(m,m*ti(c,l,n+d)),u=Math.min(m,m*ti(c,l,n)),p=Math.min(m,m*ti(c,l,n-d));return{r:Math.round(h),g:Math.round(u),b:Math.round(p)}}function ii(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),n=e/y,a=i/v,r=s/w;if(0===i){const t=r*m;return{r:t,g:t,b:t}}const l=r<o?r*(1+a):r+a-r*a,c=2*r-l,d=1/3;return{r:Math.min(m,m*ti(c,l,n+d)),g:Math.min(m,m*ti(c,l,n)),b:Math.min(m,m*ti(c,l,n-d))}}function si(t){const e=ei(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function ni(t,e){const i=t??0;if(e)return{r:A(i,m),g:A(i,m),b:A(i,m)};const s=()=>Math.floor(A(i,256));return{b:s(),g:s(),r:s()}}function ai(e,i,s,n,a){const o=i?4:2,r=s??1;return Ne(i?`rgb-${e.r.toFixed(o)}-${e.g.toFixed(o)}-${e.b.toFixed(o)}-hdr-${r.toString()}-${(n??P).toString()}-${a??t.HdrMode.standard}`:`rgb-${e.r.toFixed(o)}-${e.g.toFixed(o)}-${e.b.toFixed(o)}-sdr-${r.toString()}`,()=>i?function(e,i,s=400,n=t.HdrMode.standard){const a=s/203,o=function(e,i,s,n){const a=e.r/m,o=e.g/m,r=e.b/m;if(n!==t.HdrMode.natural&&n!==t.HdrMode.vivid&&n!==t.HdrMode.cinematic&&n!==t.HdrMode.dynamic)return{b:r,g:o,r:a};const l=Math.max(1,i),c=He*a+$e*o+je*r,d=function(t,e,i){if(t<=i)return qe(t);const s=t+(t-i)*(e-1);return qe(s)}(c,i,s),h=c>0?d/c:1;return function(e,i,s,n,a){switch(n){case t.HdrMode.vivid:{const t=(e+i+s)/3;return{b:U(U(t+(s-t)*Ve,0,a)*Ue,0,a),g:U(U(t+(i-t)*Ve,0,a)*Ue,0,a),r:U(U(t+(e-t)*Ve,0,a)*Ue,0,a)}}case t.HdrMode.cinematic:{const t=1.05*e,n=.95*s,o=(t+i+n)/3;return{b:U(o+1.1*(n-o),0,a),g:U(o+1.1*(i-o),0,a),r:U(o+1.1*(t-o),0,a)}}case t.HdrMode.dynamic:{const t=He*e+$e*i+je*s,n=Math.min(1,2*t),o=1-n,r=(e+i+s)/3,l=U(r+(e-r)*Ve,0,a)*Ue,c=U(r+(i-r)*Ve,0,a)*Ue,d=U(r+(s-r)*Ve,0,a)*Ue;return{b:U(s*o+d*n,0,a),g:U(i*o+c*n,0,a),r:U(e*o+l*n,0,a)}}case t.HdrMode.standard:case t.HdrMode.natural:default:return{b:s,g:i,r:e}}}(U(a*h,0,l),U(o*h,0,l),U(r*h,0,l),n,l)}(e,a,.18,n);return`color(display-p3 ${o.r.toString()} ${o.g.toString()} ${o.b.toString()} / ${(i??1).toString()})`}(e,s,n,a):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(e,s))}function oi(e,i,s,n,a){const o=i?4:2,r=s??1;return Ne(i?`hsl-${e.h.toFixed(o)}-${e.s.toFixed(o)}-${e.l.toFixed(o)}-hdr-${r.toString()}-${(n??P).toString()}-${a??t.HdrMode.standard}`:`hsl-${e.h.toFixed(o)}-${e.s.toFixed(o)}-${e.l.toFixed(o)}-sdr-${r.toString()}`,()=>i?ai(ii(e),!0,s,n,a):`hsla(${e.h.toString()}, ${e.s.toString()}%, ${e.l.toString()}%, ${r.toString()})`)}function ri(t,e,i,s,n){let a=t,o=e;if("r"in a||(a=n?ii(t):ei(t)),"r"in o||(o=n?ii(e):ei(e)),n){const t={b:Ge(a.b/m),g:Ge(a.g/m),r:Ge(a.r/m)},e={b:Ge(o.b/m),g:Ge(o.g/m),r:Ge(o.r/m)},n=i+s;return{b:We((t.b*i+e.b*s)/n)*m,g:We((t.g*i+e.g*s)/n)*m,r:We((t.r*i+e.r*s)/n)*m}}return{b:H(a.b,o.b,i,s),g:H(a.g,o.g,i,s),r:H(a.r,o.r,i,s)}}function li(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function ci(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:y},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:w}};return e&&(di(s.h,e.h,i),di(s.s,e.s,i),di(s.l,e.l,i)),s}function di(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=j(i.speed)/a*s,e.decay=1-j(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=j(i.count),e.time=0,e.delayTime=j(i.delay)*r,i.sync||(e.velocity*=F(),e.value*=F()),e.initialValue=e.value,e.offset=G(i.offset)):e.velocity=0}function hi(e,i,s,n){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const a=e.offset?$(e.offset):0,o=(e.velocity??0)*s.factor+3.6*a,r=e.decay??1,l=e.max,c=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=o,e.value<c&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=o,e.value>l&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=l)),e.velocity&&1!==r&&(e.velocity*=r),e.value=U(e.value,c,l)}function ui(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;hi(s,!1,e),hi(n,!0,e),hi(a,!0,e)}function pi(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const gi=function(){const t=globalThis.tsParticles;return t?.pluginManager?t:new Lt}();class fi{enable=!1;mode="destination-out";load(t){E(t)||(Jt(this,"mode",t.mode),Jt(this,"enable",t.enable))}}class mi{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return la});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 fi),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new fi,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function yi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new mi)})}class vi{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(l.x,l.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=I(s)?{min:Y(s.min),max:Y(s.max)}:{min:0,max:Y(s)}}}async function wi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new vi))})}var bi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(bi||(bi={}));const xi=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Pi=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Mi{accepts(t){return t.startsWith("#")}handleColor(t){return this.#m(t.value)}handleRangeColor(t){return this.#m(t.value)}parseString(t){return this.#m(t)}#m(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(xi,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Pi.exec(e);return i?{a:i[bi.a]?Number.parseInt(i[bi.a],16)/255:1,b:Number.parseInt(i[bi.b]??"0",16),g:Number.parseInt(i[bi.g]??"0",16),r:Number.parseInt(i[bi.r]??"0",16)}:void 0}}async function zi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Mi)})}var Ci;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Ci||(Ci={}));const ki=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Si{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 ei(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ei({h:j(e.h),l:j(e.l),s:j(e.s)})}parseString(t){if(!this.accepts(t))return;const e=ki.exec(t);return e?si({a:e.length>4?nt(e[Ci.a]):1,h:Number.parseInt(e[Ci.h]??"0",10),l:Number.parseInt(e[Ci.l]??"0",10),s:Number.parseInt(e[Ci.s]??"0",10)}):void 0}}async function Di(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Si)})}class Oi{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return da});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Ii(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,kt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new Oi(t.pluginManager))})}function Ti(e,i){const s=e.value,n=e.animation,a={delayTime:j(n.delay)*r,enable:n.enable,value:j(e.value)*i,max:q(s)*i,min:N(s)*i,loops:0,maxLoops:j(n.count),time:0};if(n.enable){switch(a.decay=1-j(n.decay),n.mode){case t.AnimationMode.increase:a.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:a.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:a.status=F()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:a.value=a.min,e&&(a.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:a.value=a.max,e&&(a.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:a.value=$(a),e&&(a.status=F()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function Ei(e,i,s,n,a){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const o=(i.velocity??0)*a.factor,r=i.min,l=i.max,c=i.decay??1;i.time??=0;const d=i.delayTime??0;if(!(d>0&&i.time<d&&(i.time+=a.value,i.time<d))){switch(i.status){case t.AnimationStatus.increasing:i.value+=o;break;case t.AnimationStatus.decreasing:i.value-=o}switch(i.velocity&&1!==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,a){switch(i){case t.DestroyType.max:s>=a&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,l),e.destroyed||(i.value=U(i.value,r,l))}}class Ri extends ae{destroy=t.DestroyType.none;load(t){super.load(t),E(t)||Jt(this,"destroy",t.destroy)}}class Li extends xe{animation=new Ri;value=1;load(t){if(E(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class _i{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Ti(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=j(i.speed)/a*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){se(t,"opacity",Li,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&Ei(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function Fi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new _i(t)))})}class Ai{modes;#u;#y;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#y=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;let o=!1;for(const t of this.#y)if(o=t.particleBounce?.(e,s,i)??!1,o)break;if(o)return;const r=e.getPosition(),l=e.offset,c=e.getRadius(),d=ft(r,c),h=a.canvas.size,u=!e.isInsideCanvasForOutMode(n,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.left&&e.direction!==t.OutModeDirection.right)return;e.bounds.right<0&&e.direction===t.OutModeDirection.left?e.particle.position.x=e.size+e.offset.x:e.bounds.left>e.canvasSize.width&&e.direction===t.OutModeDirection.right&&(e.particle.position.x=e.canvasSize.width-e.size-e.offset.x);const i=e.particle.velocity.x;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.right&&i>0||e.direction===t.OutModeDirection.left&&i<0)){const t=j(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,s=!0}if(!s)return;const n=e.offset.x+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-n:e.outOfCanvas&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:d,canvasSize:h,offset:l,outOfCanvas:u,size:c}),function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.bottom&&e.direction!==t.OutModeDirection.top)return;e.bounds.bottom<0&&e.direction===t.OutModeDirection.top?e.particle.position.y=e.size+e.offset.y:e.bounds.top>e.canvasSize.height&&e.direction===t.OutModeDirection.bottom&&(e.particle.position.y=e.canvasSize.height-e.size-e.offset.y);const i=e.particle.velocity.y;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.bottom&&i>0||e.direction===t.OutModeDirection.top&&i<0)){const t=j(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,s=!0}if(!s)return;const n=e.offset.y+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-n:e.outOfCanvas&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:d,canvasSize:h,offset:l,outOfCanvas:u,size:c})}}class Bi{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(this.modes.includes(n)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(n,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=W(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 Vi{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,s,n){if(!this.modes.includes(n))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const a=e.options.move.gravity,o=this.#u,r=o.canvas.size,c=e.getRadius();if(a.enable){const s=e.position;(!a.inverse&&s.y>r.height+c&&i===t.OutModeDirection.bottom||a.inverse&&s.y<-c&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+c||e.velocity.y<0&&e.position.y>=-c||e.velocity.x>0&&e.position.x<=r.width+c||e.velocity.x<0&&e.position.x>=-c)return;pt(e.position,o.canvas.size,l,c,i)||e.destroy()}}}const Ui=k.origin;class Hi{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;Ui.setTo(l),Ui.length=e.moveCenter.radius,Ui.angle=e.velocity.angle+Math.PI,Ui.addTo(e.moveCenter);const{dx:s,dy:n}=W(e.position,Ui);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:a.canvas.size.width})),e.position.y=Math.floor($({min:0,max:a.canvas.size.height}));const{dx:o,dy:r}=W(e.position,e.moveCenter);e.direction=Math.atan2(-r,-o),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(e.isInsideCanvasForOutMode(n,i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor($({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}=W(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction),e.justWarped=!0;break}case t.ParticleOutType.normal:{const s=e.options.move.warp,n=a.canvas.size,o={bottom:n.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:n.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),l=ft(e.position,r);i===t.OutModeDirection.right&&l.left>n.width+e.offset.x?(e.position.x=o.left,e.initialPosition.x=e.position.x,s||(e.position.y=F()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0):i===t.OutModeDirection.left&&l.right<-e.offset.x&&(e.position.x=o.right,e.initialPosition.x=e.position.x,s||(e.position.y=F()*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=F()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.top,e.initialPosition.y=e.position.y,e.justWarped=!0):i===t.OutModeDirection.top&&l.bottom<-e.offset.y&&(s||(e.position.x=F()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0);break}}}}}class $i{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#v(e,t.OutMode.bounce,t=>new Ai(t)),this.#v(e,t.OutMode.out,t=>new Hi(t)),this.#v(e,t.OutMode.destroy,t=>new Bi(t)),this.#v(e,t.OutMode.none,t=>new Vi(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#w(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#w(e,i,s.left??s.default,t.OutModeDirection.left),this.#w(e,i,s.right??s.default,t.OutModeDirection.right),this.#w(e,i,s.top??s.default,t.OutModeDirection.top)}#v(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#w(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function ji(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new $i(t)))})}class Ni{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=vt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=ce.create(void 0===a?void 0:ce.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=j(o.opacity),t.fillAnimation=i.animation;const s=Ye(this.#p,i);s&&(t.fillColor=ci(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=ce.create(void 0===a?void 0:ce.create(void 0,a),r.color);t.strokeWidth=j(r.width)*e.retina.pixelRatio,t.strokeOpacity=j(r.opacity??1),t.strokeAnimation=i.animation;const s=Ye(this.#p,i)??t.getFillColor();s&&(t.strokeColor=ci(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(ui(t.fillColor,e,this.#u.hdr),ui(t.strokeColor,e,this.#u.hdr))}}async function qi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Ni(t.pluginManager,e)))})}var Gi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Gi||(Gi={}));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 Ki{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:j(e.r),g:j(e.g),b:j(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Wi.exec(t);return e?{a:e.length>4?nt(e[Gi.a]):1,b:parseInt(e[Gi.b]??"0",10),g:parseInt(e[Gi.g]??"0",10),r:parseInt(e[Gi.r]??"0",10)}:void 0}}async function Qi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Ki)})}class Xi extends ae{destroy=t.DestroyType.none;load(t){super.load(t),E(t)||Jt(this,"destroy",t.destroy)}}class Yi extends xe{animation=new Xi;value=3;load(t){if(super.load(t),E(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Zi{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/a*e.retina.reduceFactor,s.sync||(t.size.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){se(t,"size",Yi,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Ti(i,e),t.retina.sizeAnimationSpeed=j(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&Ei(t,t.size,!0,t.options.size.animation.destroy,e)}}async function Ji(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Zi(t)))})}async function ts(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{await Promise.all([yi(t),zi(t),Di(t),Qi(t),Ii(t),wi(t),qi(t),Fi(t),ji(t),Ji(t)])})}var es;!function(t){t.move="move",t.line="line",t.bezier="bezier",t.quadratic="quadratic",t.arc="arc",t.ellipse="ellipse"}(es||(es={}));function is(t,e,i){const s=i.segments[0];if(!s)return;const n=s.values[0];if(!n)return;t.moveTo(n.x*e,n.y*e);for(const s of i.segments){const i=s.values[0];if(!i)continue;const n=s.values[1],a=s.values[2],o=s.values[3];switch(s.type){case es.move:t.moveTo(i.x*e,i.y*e);break;case es.line:t.lineTo(i.x*e,i.y*e);break;case es.bezier:if(!n||!a||!o)continue;t.bezierCurveTo(n.x*e,n.y*e,a.x*e,a.y*e,o.x*e,o.y*e);break;case es.quadratic:if(!n||!a)continue;t.quadraticCurveTo(n.x*e,n.y*e,a.x*e,a.y*e);break;case es.arc:if(!n||!a)continue;t.arc(i.x*e,i.y*e,n.x*e,a.x,a.y);break;case es.ellipse:if(!n||!a||!o)continue;t.ellipse(i.x*e,i.y*e,n.x*e,n.y*e,a.x,o.x,o.y)}}if(!i.half)return;for(let s=i.segments.length-1;s>=0;s--){const n=i.segments[s];if(!n)continue;const a=n.values[0],o=1,r=2,l=n.values[o],c=n.values[r];switch(n.type){case es.line:if(!a)break;t.lineTo(a.x*-e,a.y*e);break;case es.bezier:if(!a||!l||!c)break;t.bezierCurveTo(-c.x*e,c.y*e,-l.x*e,l.y*e,-a.x*e,a.y*e);break;case es.quadratic:if(!l||!c)break;t.quadraticCurveTo(-l.x*e,l.y*e,-c.x*e,c.y*e);case es.arc:case es.ellipse:}}}var ss;!function(t){t.hearts="hearts",t.diamonds="diamonds",t.clubs="clubs",t.spades="spades"}(ss||(ss={}));const ns=o,as=.25,os=-ns,rs=-.25,ls=.0625,cs=.375,ds={half:!0,segments:[{type:es.bezier,values:[{x:0,y:os},{x:0,y:os},{x:as,y:os},{x:as,y:rs}]},{type:es.bezier,values:[{x:as,y:rs},{x:as,y:rs},{x:ns,y:rs},{x:ns,y:0}]},{type:es.bezier,values:[{x:ns,y:0},{x:ns,y:0},{x:ns,y:as},{x:as,y:as}]},{type:es.bezier,values:[{x:as,y:as},{x:as,y:as},{x:ls,y:as},{x:ls,y:ls}]},{type:es.bezier,values:[{x:ls,y:ls},{x:ls,y:as},{x:as,y:ns},{x:as,y:ns}]},{type:es.bezier,values:[{x:as,y:ns},{x:as,y:ns},{x:0,y:ns},{x:0,y:ns}]}]},hs={half:!0,segments:[{type:es.bezier,values:[{x:0,y:ns},{x:0,y:ns},{x:cs,y:0},{x:cs,y:0}]},{type:es.bezier,values:[{x:cs,y:0},{x:cs,y:0},{x:0,y:os},{x:0,y:os}]}]},us={half:!0,segments:[{type:es.bezier,values:[{x:0,y:ns},{x:0,y:ns},{x:ns,y:0},{x:ns,y:rs}]},{type:es.bezier,values:[{x:ns,y:rs},{x:ns,y:rs},{x:ns,y:os},{x:as,y:os}]},{type:es.bezier,values:[{x:as,y:os},{x:as,y:os},{x:0,y:os},{x:0,y:rs}]}]},ps={half:!0,segments:[{type:es.bezier,values:[{x:0,y:os},{x:0,y:os},{x:ns,y:rs},{x:ns,y:0}]},{type:es.bezier,values:[{x:ns,y:0},{x:ns,y:0},{x:ns,y:as},{x:as,y:as}]},{type:es.bezier,values:[{x:as,y:as},{x:as,y:as},{x:ls,y:as},{x:ls,y:ls}]},{type:es.bezier,values:[{x:ls,y:ls},{x:ls,y:as},{x:as,y:ns},{x:as,y:ns}]},{type:es.bezier,values:[{x:as,y:ns},{x:as,y:ns},{x:0,y:ns},{x:0,y:ns}]}]},gs={[ss.hearts]:us,[ss.diamonds]:hs,[ss.clubs]:ds,[ss.spades]:ps};class fs{draw(t){const{context:e,radius:i}=t;is(e,i,gs.clubs)}}async function ms(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["club","clubs"],()=>Promise.resolve(new fs))})}class ys{draw(t){const{context:e,radius:i}=t;is(e,i,gs.diamonds)}}async function vs(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["diamond","diamonds"],()=>Promise.resolve(new ys))})}let ws=class{draw(t){const{context:e,radius:i}=t;is(e,i,gs.hearts)}};async function bs(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["heart","hearts"],()=>Promise.resolve(new ws))})}class xs{draw(t){const{context:e,radius:i}=t;is(e,i,gs.spades)}}async function Ps(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["spade","spades"],()=>Promise.resolve(new xs))})}async function Ms(t){t.checkVersion("4.4.0"),await Promise.all([ms(t),vs(t),bs(t),Ps(t)])}class zs{count;delay;duration;wait=!1;load(t){E(t)||(Jt(this,"count",t.count),te(this,"delay",t.delay),te(this,"duration",t.duration),Jt(this,"wait",t.wait))}}class Cs{delay=.1;quantity=1;load(t){E(t)||(te(this,"quantity",t.quantity),te(this,"delay",t.delay))}}class ks{color=!1;opacity=!1;load(t){E(t)||(Jt(this,"color",t.color),Jt(this,"opacity",t.opacity))}}class Ss{options={};replace=new ks;type="square";load(t){E(t)||(void 0!==t.options&&(this.options=mt({},t.options??{})),this.replace.load(t.replace),Jt(this,"type",t.type))}}class Ds{height=0;mode=t.PixelMode.percent;width=0;load(t){E(t)||(Jt(this,"mode",t.mode),Jt(this,"height",t.height),Jt(this,"width",t.width))}}class Os{fill;stroke;load(t){E(t)||(t.fill&&(this.fill??=new fe,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new ke,this.stroke.load(t.stroke)))}}class Is{autoPlay=!0;direction;domId;fill=!0;life=new zs;name;particles;position;rate=new Cs;shape=new Ss;size;spawn=new Os;spawnFillColor;spawnStrokeColor;startCount=0;load(t){E(t)||(Jt(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new Ds,this.size.load(t.size)),Jt(this,"direction",t.direction),Jt(this,"domId",t.domId),Jt(this,"fill",t.fill),this.life.load(t.life),Jt(this,"name",t.name),this.particles=yt(t.particles,t=>mt({},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=G(t.position.x)),void 0!==t.position.y&&(this.position.y=G(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new ce,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new ce,this.spawnStrokeColor.load(t.spawnStrokeColor)),Jt(this,"startCount",t.startCount))}}class Ts{id="emitters";#b;constructor(t){this.#b=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return ha});return new e(this.#b,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=yt(i.emitters,t=>{const e=new Is;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return T(e)&&!!e.length||void 0!==e}}const Es=new WeakMap;var Rs;async function Ls(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=Es.get(e);return i||(i=Promise.resolve().then(function(){return ga}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw Es.delete(e),t}),Es.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return pa}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new Ts(e))})}!function(t){t.emitter="emitter"}(Rs||(Rs={}));const _s=["emoji"];async function Fs(t,e){try{await lt().fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}const As='"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';class Bs{#x=new Map;destroy(){for(const[t,e]of this.#x)e instanceof ImageBitmap&&e.close(),this.#x.delete(t)}draw(t){const e=t.particle.emojiDataKey;if(!e)return;const i=this.#x.get(e);i&&function(t,e){const{context:i,opacity:s}=t,n=i.globalAlpha,a=e.width,r=a*o;i.globalAlpha=s,i.drawImage(e,-r,-r,a,a),i.globalAlpha=n}(t,i)}async init(t){const e=t.actualOptions.particles.shape;if(!_s.some(t=>ht(t,e.type)))return;const i=[Fs(As)];yt(_s.map(t=>e.options[t])[0],t=>{t.font&&i.push(Fs(t.font))}),await Promise.all(i)}particleDestroy(t){t.emojiDataKey=void 0}particleInit(t,e){const i=e.shapeData;if(!i.value)return;const s=vt(i.value,e.randomIndexData);if(!s)return;const n="string"==typeof s?{font:i.font??As,padding:i.padding??0,value:s}:{font:As,padding:0,...i,...s},a=n.font,o=n.value,r=`${o}_${a}`;if(this.#x.has(r))return void(e.emojiDataKey=r);const l=2*n.padding,c=q(e.size.value),d=c+l,h=2*d,u=new OffscreenCanvas(h,h),p=u.getContext("2d",t.canvas.render.settings);if(!p)return;p.font=`400 ${(2*c).toString()}px ${a}`,p.textBaseline="middle",p.textAlign="center",p.fillText(o,d,d);const g=u instanceof HTMLCanvasElement?u:u.transferToImageBitmap();this.#x.set(r,g),e.emojiDataKey=r}}async function Vs(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(_s,()=>Promise.resolve(new Bs))})}class Us{draw(t){!function(t){const{context:e,radius:i}=t,s=2*i,n=i*o,a=i+n,r=-i,l=-i;e.moveTo(r,l+n),e.quadraticCurveTo(r,l,r+n,l),e.quadraticCurveTo(r+i,l,r+i,l+n),e.quadraticCurveTo(r+i,l,r+a,l),e.quadraticCurveTo(r+s,l,r+s,l+n),e.quadraticCurveTo(r+s,l+i,r+a,l+a),e.lineTo(r+i,l+s),e.lineTo(r+n,l+a),e.quadraticCurveTo(r,l+i,r,l+n)}(t)}}async function Hs(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["heart"],()=>Promise.resolve(new Us))})}const $s=["image","images"],js=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function Ns(t){return new Promise(e=>{t.loading=!0;const i=new Image;t.element=i,i.addEventListener("load",()=>{t.loading=!1,e()}),i.addEventListener("error",()=>{t.element=void 0,t.error=!0,t.loading=!1,Et().error(`Error loading image: ${t.source}`),e()}),i.src=t.source})}async function qs(t){if("svg"!==t.type)return void await Ns(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(Et().error("Image not found"),t.error=!0),t.loading=!1}function Gs(t,e,i,s,n=!1,a,o){const r=function(t,e,i,s=!1,n,a){const{svgData:o}=t;if(!o)return"";const r=oi(e,s,i,n,a);if(o.includes("fill"))return o.replaceAll(js,()=>r);const l=o.indexOf(">");return`${o.substring(0,l)} fill="${r}"${o.substring(l)}`}(t,i,s.opacity?.value??1,n,a,o),l={color:i,data:{...t,svgData:r},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise(e=>{const i=new Blob([r],{type:"image/svg+xml"}),s=URL.createObjectURL(i),n=new Image;n.addEventListener("load",()=>{l.loaded=!0,l.element=n,e(l),URL.revokeObjectURL(s)});n.addEventListener("error",()=>{(async()=>{URL.revokeObjectURL(s);const i={...t,error:!1,loading:!0};await Ns(i),l.loaded=!0,l.element=i.element,e(l)})()}),n.src=s})}class Ws{#u;#n;constructor(t,e){this.#n=t,this.#u=e}draw(t){const{context:e,radius:i,particle:s,opacity:n}=t,a=s.image,o=a?.element;if(a){if(e.globalAlpha=n,o){const t=a.ratio,s={x:-i,y:-i},n=2*i;e.drawImage(o,s.x,s.y,n,n/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(!e.preload||!this.#n.loadImage)return;const i=[];for(const s of e.preload)i.push(this.#n.loadImage(t,s));await Promise.all(i)}loadShape(t){const e=this.#u;if(!t.shape||!$s.includes(t.shape))return;const i=t.shapeData;if(!i)return;const s=this.#n.getImages?.(e),n=s?.find(t=>t.name===i.name||t.source===i.src);n||this.#P(e,i).then(()=>{this.loadShape(t)})}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;const i=this.#n.getImages?.(t),s=e.shapeData;if(!s)return;const n=e.getFillColor(),a=i?.find(t=>t.name===s.name||t.source===s.src);if(!a)return;const o=s.replaceColor;a.loading?setTimeout(()=>{this.particleInit(t,e)}):(async()=>{let i;i=a.svgData&&n?await Gs(a,s,n,e,t.hdr,t.peakNits,t.hdrMode):{color:n,data:a,element:a.element,loaded:!0,ratio:s.width&&s.height?s.width/s.height:a.ratio??1,replaceColor:o,source:s.src},i.ratio||(i.ratio=1);const r={image:i,close:s.close??e.shapeClose};e.image=r.image,e.shapeClose=r.close})()}#P=async(t,e)=>{if(!this.#n.loadImage)throw new Error("Image shape not initialized");await this.#n.loadImage(t,{name:e.name,replaceColor:e.replaceColor,src:e.src})}}class Ks{height;name;replaceColor;src="";width;load(t){E(t)||(Jt(this,"height",t.height),Jt(this,"name",t.name),Jt(this,"replaceColor",t.replaceColor),Jt(this,"src",t.src),Jt(this,"width",t.width))}}class Qs{id="image-preloader";#n;constructor(t){this.#n=t}async getPlugin(t){const{ImagePreloaderInstance:e}=await Promise.resolve().then(function(){return fa});return new e(this.#n,t)}loadOptions(t,e,i){if(!i?.preload)return;e.preload??=[];const s=e.preload;for(const t of i.preload){const e=s.find(e=>e.name===t.name||e.src===t.src);if(e)e.load(t);else{const e=new Ks;e.load(t),s.push(e)}}}needsPlugin(){return!0}}async function Xs(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{!function(t){t.getImages??=e=>{t.images??=new Map;let i=t.images.get(e);return i||(i=[],t.images.set(e,i)),i},t.loadImage??=async(e,i)=>{if(!t.getImages)throw new Error("No images collection found");if(!i.name&&!i.src)throw new Error("No image source provided");t.images??=new Map;const s=t.getImages(e);if(!s.some(t=>t.name===i.name||t.source===i.src))try{const n={name:i.name??i.src,source:i.src,type:i.src.substring(i.src.length-3),error:!1,loading:!0,replaceColor:i.replaceColor,ratio:i.width&&i.height?i.width/i.height:void 0};let a;s.push(n),t.images.set(e,s),a=i.replaceColor?qs:Ns,await a(n)}catch{throw new Error(`${i.name??i.src} not found`)}}}(t),t.pluginManager.addPlugin(new Qs(t)),t.pluginManager.addShape($s,e=>Promise.resolve(new Ws(t,e)))})}class Ys extends we{sync=!1;load(t){E(t)||(super.load(t),Jt(this,"sync",t.sync))}}class Zs extends we{sync=!1;load(t){E(t)||(super.load(t),Jt(this,"sync",t.sync))}}class Js{count=0;delay=new Ys;duration=new Zs;load(t){E(t)||(Jt(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class tn{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const s=i.delay.sync?1:F(),n=i.duration.sync?1:F();t.life={delay:e.retina.reduceFactor?j(i.delay.value)*s/e.retina.reduceFactor*r:0,delayTime:0,duration:e.retina.reduceFactor?j(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){se(t,"life",Js,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const a=G(0,i.width),o=G(0,i.width);t.position.x=$(a),t.position.y=$(o),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const l=t.options.life;l&&(s.delay=j(l.delay.value)*r,s.duration=j(l.duration.value)*r)}(t,e,this.#u.canvas.size)}}async function en(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new tn(t)))})}class sn{factor=4;value=!0;load(t){E(t)||(Jt(this,"factor",t.factor),Jt(this,"value",t.value))}}class nn{disable=!0;reduce=new sn;load(t){E(t)||(Jt(this,"disable",t.disable),this.reduce.load(t.reduce))}}class an{id="motion";async getPlugin(t){const{MotionPluginInstance:e}=await Promise.resolve().then(function(){return ma});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.motion;s?.load||(e.motion=s=new nn),s.load(i?.motion)}needsPlugin(){return!0}}async function on(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new an)})}const rn=new Map;function ln(t,e){const{context:i,radius:s}=t,n=function(t){const e=rn.get(t);if(e)return e;const i=u/t,s=!!(t%2),n=(-Math.PI+(s?0:i))*o,a=[];for(let e=0;e<t;e++){const t=n+e*i;a[e]={x:Math.cos(t),y:Math.sin(t)}}return rn.set(t,a),a}(e.count.numerator/e.count.denominator);i.beginPath();for(let t=0;t<n.length;t++){const e=n[t];if(!e)continue;const a=e.x*s,o=e.y*s;t?i.lineTo(a,o):i.moveTo(a,o)}i.closePath()}class cn{draw(t){const{particle:e,radius:i}=t;ln(t,this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round(j(e?.sides??5))}}class dn extends cn{getSidesData(t,e){const{sides:i}=t;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class hn extends cn{getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:1,numerator:3},length:2.66*e/1}}}async function un(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["polygon"],()=>Promise.resolve(new dn))})}async function pn(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["triangle"],()=>Promise.resolve(new hn))})}async function gn(t){t.checkVersion("4.4.0"),await Promise.all([un(t),pn(t)])}var fn;!function(t){t.both="both",t.horizontal="horizontal",t.vertical="vertical"}(fn||(fn={}));class mn{enable=!1;value=0;load(t){E(t)||(Jt(this,"enable",t.enable),te(this,"value",t.value))}}class yn{backColor;darken=new mn;enable=!1;enlighten=new mn;mode=fn.vertical;speed=25;load(t){E(t)||(void 0!==t.backColor&&(this.backColor=le.create(this.backColor,t.backColor)),this.darken.load(t.darken),Jt(this,"enable",t.enable),this.enlighten.load(t.enlighten),Jt(this,"mode",t.mode),te(this,"speed",t.speed))}}class vn{#p;constructor(t){this.#p=t}getTransformValues(t){const e=t.roll?.enable&&t.roll,i=e&&e.horizontal,s=e&&e.vertical;return{a:i?Math.cos(e.angle):void 0,d:s?Math.sin(e.angle):void 0}}init(e){!function(e,i){const s=i.options.roll;if(s?.enable)if(i.roll={enable:s.enable,horizontal:s.mode===fn.horizontal||s.mode===fn.both,vertical:s.mode===fn.vertical||s.mode===fn.both,angle:F()*u,speed:j(s.speed)/360},s.backColor)i.backColor=Ye(e,s.backColor);else if(s.darken.enable&&s.enlighten.enable){const e=F()>=o?t.AlterType.darken:t.AlterType.enlighten;i.roll.alter={type:e,value:j(e===t.AlterType.darken?s.darken.value:s.enlighten.value)}}else s.darken.enable?i.roll.alter={type:t.AlterType.darken,value:j(s.darken.value)}:s.enlighten.enable&&(i.roll.alter={type:t.AlterType.enlighten,value:j(s.enlighten.value)});else i.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this.#p,e)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){se(t,"roll",yn,...e)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.options.roll,s=t.roll;if(!s||!i?.enable)return;const n=s.speed*e.factor,a=u;s.angle+=n,s.angle>a&&(s.angle-=a)}(t,e)}}async function wn(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("roll",()=>Promise.resolve(new vn(t.pluginManager)))})}class bn{decay=0;enable=!1;speed=0;sync=!1;load(t){E(t)||(Jt(this,"enable",t.enable),te(this,"speed",t.speed),te(this,"decay",t.decay),Jt(this,"sync",t.sync))}}class xn extends we{animation=new bn;direction=t.RotateDirection.clockwise;path=!1;load(t){E(t)||(super.load(t),Jt(this,"direction",t.direction),this.animation.load(t.animation),Jt(this,"path",t.path))}}class Pn{#u;constructor(t){this.#u=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:Y(j(i.value)),min:0,max:u},e.pathRotation=i.path;let s=i.direction;if(s===t.RotateDirection.random){s=Math.floor(2*F())>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-j(n.decay),e.rotate.velocity=j(n.speed)/360*this.#u.retina.reduceFactor,n.sync||(e.rotate.velocity*=F())),e.rotation=e.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){se(t,"rotate",xn,...e)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(Ei(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function Mn(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new Pn(t)))})}class zn{draw(t){!function(t){const{context:e,radius:i}=t,s=i*Math.SQRT1_2,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}async function Cn(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new zn))})}const kn=0,Sn=0;class Dn{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.sides,a=i.starInset??2;e.moveTo(kn,Sn-s);for(let t=0;t<n;t++)e.rotate(Math.PI/n),e.lineTo(kn,Sn-s*a),e.rotate(Math.PI/n),e.lineTo(kn,Sn-s)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round(j(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=j(i?.inset??2)}}async function On(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["star"],()=>Promise.resolve(new Dn))})}var In;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(In||(In={}));class Tn{decay=0;enable=!1;speed=0;sync=!1;load(t){E(t)||(Jt(this,"enable",t.enable),te(this,"speed",t.speed),te(this,"decay",t.decay),Jt(this,"sync",t.sync))}}class En extends we{animation=new Tn;direction=In.clockwise;enable=!1;load(t){super.load(t),E(t)||(this.animation.load(t.animation),Jt(this,"direction",t.direction),Jt(this,"enable",t.enable))}}class Rn{#u;constructor(t){this.#u=t}getTransformValues(t){const e=t.tilt?.enable&&t.tilt;return{b:e?Math.cos(e.value)*e.cosDirection:void 0,c:e?Math.sin(e.value)*e.sinDirection:void 0}}init(e){const i=e.options.tilt;if(!i)return;e.tilt={enable:i.enable,value:Y(j(i.value)),sinDirection:F()>=o?1:-1,cosDirection:F()>=o?1:-1,min:0,max:u};let s=i.direction;if(s===In.random){s=Math.floor(2*F())>0?In.counterClockwise:In.clockwise}switch(s){case In.counterClockwise:case"counterClockwise":e.tilt.status=t.AnimationStatus.decreasing;break;case In.clockwise:e.tilt.status=t.AnimationStatus.increasing}const n=e.options.tilt?.animation;n?.enable&&(e.tilt.decay=1-j(n.decay),e.tilt.velocity=j(n.speed)/360*this.#u.retina.reduceFactor,n.sync||(e.tilt.velocity*=F()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){se(t,"tilt",En,...e)}update(e,i){this.isEnabled(e)&&e.tilt&&Ei(e,e.tilt,!1,t.DestroyType.none,i)}}async function Ln(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("tilt",t=>Promise.resolve(new Rn(t)))})}class _n{angle=50;move=10;load(t){E(t)||(te(this,"angle",t.angle),te(this,"move",t.move))}}class Fn{distance=5;enable=!1;speed=new _n;load(t){if(!E(t)&&(te(this,"distance",t.distance),Jt(this,"enable",t.enable),void 0!==t.speed))if(O(t.speed))this.speed.load({angle:t.speed});else{const e=t.speed;"min"in e?this.speed.load({angle:e}):this.speed.load(t.speed)}}}class An{#u;constructor(t){this.#u=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:F()*u,angleSpeed:j(e.speed.angle)/360,moveSpeed:j(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=j(e?.distance??0)*this.#u.retina.pixelRatio}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.options.wobble?.enable}loadOptions(t,...e){se(t,"wobble",Fn,...e)}update(t,e){this.isEnabled(t)&&function(t,e,i){const{wobble:s}=e.options,{wobble:n}=e;if(!s?.enable||!n)return;const a=t.retina.reduceFactor,o=n.angleSpeed*i.factor*a,r=n.moveSpeed*i.factor*a*(e.retina.wobbleDistance??0)/16.666666666666668,l=u,{position:c}=e;n.angle+=o,n.angle>l&&(n.angle-=l),c.x+=r*Math.cos(n.angle),c.y+=r*Math.abs(Math.sin(n.angle))}(this.#u,t,e)}}async function Bn(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("wobble",t=>Promise.resolve(new An(t)))})}class Vn{angle;colors;count;decay;disableForReducedMotion;drift;flat;gravity;position;scalar;shapeOptions;shapes;spread;startVelocity;ticks;zIndex;constructor(){this.angle=90,this.count=50,this.spread=45,this.startVelocity=45,this.decay=.9,this.gravity=1,this.drift=0,this.ticks=200,this.position={x:50,y:50},this.colors=["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],this.shapes=["square","circle"],this.scalar=1,this.zIndex=100,this.disableForReducedMotion=!0,this.flat=!1,this.shapeOptions={}}get origin(){return{x:this.position.x/a,y:this.position.y/a}}set origin(t){this.position.x=t.x*a,this.position.y=t.y*a}get particleCount(){return this.count}set particleCount(t){this.count=t}load(t){if(E(t))return;Jt(this,"angle",t.angle);const e=t.count??t.particleCount;void 0!==e&&(this.count=e),Jt(this,"spread",t.spread),Jt(this,"startVelocity",t.startVelocity),Jt(this,"decay",t.decay),Jt(this,"flat",t.flat),Jt(this,"gravity",t.gravity),Jt(this,"drift",t.drift),Jt(this,"ticks",t.ticks);const i=t.origin;i&&!t.position&&(t.position={x:void 0===i.x?void 0:i.x*a,y:void 0===i.y?void 0:i.y*a});const s=t.position;s&&(void 0!==s.x&&(this.position.x=s.x),void 0!==s.y&&(this.position.y=s.y)),void 0!==t.colors&&(T(t.colors)?this.colors=[...t.colors]:this.colors=t.colors);const n=t.shapeOptions;if(void 0!==n)for(const t in n){const e=n[t];e&&(this.shapeOptions[t]=mt(this.shapeOptions[t]??{},e))}void 0!==t.shapes&&(T(t.shapes)?this.shapes=[...t.shapes]:this.shapes=t.shapes),Jt(this,"scalar",t.scalar),Jt(this,"zIndex",t.zIndex),Jt(this,"disableForReducedMotion",t.disableForReducedMotion)}}const Un=new Map;async function Hn(t,e){const i=new Vn;i.load(e.options);const s=Number.isFinite(i.ticks)&&i.ticks>0?i.ticks:void 0,n=void 0===s?0:12e3/(60*s);let a=Un.get(e.id);a instanceof Promise&&(await a,a=Un.get(e.id));const o=a;if(o&&!o.destroyed){const t=o;if("addEmitter"in t)return await async function(t,e,i){await(t.addEmitter?.({startCount:e.count,position:e.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{paint:{fill:{color:{value:e.colors},enable:!0}},shape:{type:e.shapes,options:e.shapeOptions},life:{count:1},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:i,startValue:"max",destroy:"min",count:1}},size:{value:5*e.scalar},move:{angle:{value:e.spread,offset:0},drift:{min:-e.drift,max:e.drift},gravity:{acceleration:9.81*e.gravity},speed:3*e.startVelocity,decay:1-e.decay,direction:-e.angle},rotate:{value:e.flat?0:{min:0,max:360},direction:"random",animation:{enable:!e.flat,speed:60}},tilt:{direction:"random",enable:!e.flat,value:e.flat?0:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!e.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!e.flat,speed:{min:-15,max:15}}}}))}(t,i,n),o}const r=(async()=>{const s=function(t,e,i){return{fullScreen:{enable:!e.canvas,zIndex:t.zIndex},fpsLimit:120,particles:{number:{value:0},paint:{fill:{color:{value:t.colors},enable:!0}},shape:{type:t.shapes,options:t.shapeOptions},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:i,startValue:"max",destroy:"min",count:1}},size:{value:5*t.scalar},links:{enable:!1},life:{count:1},move:{angle:{value:t.spread,offset:0},drift:{min:-t.drift,max:t.drift},enable:!0,gravity:{enable:!0,acceleration:9.81*t.gravity},speed:3*t.startVelocity,decay:1-t.decay,direction:-t.angle,random:!0,straight:!1,outModes:{top:"none",default:"destroy"}},rotate:{value:t.flat?0:{min:0,max:360},direction:"random",animation:{enable:!t.flat,speed:60}},tilt:{direction:"random",enable:!t.flat,value:t.flat?0:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!t.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!t.flat,speed:{min:-15,max:15}}},motion:{disable:t.disableForReducedMotion},emitters:{name:"confetti",startCount:t.count,position:t.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}}}(i,e,n),a=await t.load({id:e.id,element:e.canvas,options:s});return Un.set(e.id,a),a})();return Un.set(e.id,r),r}let $n=null;async function jn(t){return $n||($n=async function(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{await Promise.all([ts(t),on(t),Ls(t),Ms(t),Hs(t),Xs(t),gn(t),Cn(t),On(t),Vs(t),Mn(t),en(t),wn(t),Ln(t),Bn(t)])})}(t),$n)}async function Nn(t,e){let i,s;return await jn(gi),D(t)?(s=t,i=e??{}):(s="confetti",i=t),Hn(gi,{id:s,options:i})}Nn.create=async(t,e={})=>{await jn(gi);const i=t?.getAttribute("id")??"confetti";return t?.setAttribute("id",i),await Hn(gi,{id:i,canvas:t??void 0,options:e}),async(s,n)=>{let a,o;return D(s)?(o=s,a=n??e):(o=i,a=s),Hn(gi,{id:o,canvas:t??void 0,options:a})}},Nn.init=async()=>{await jn(gi)},Nn.version="4.4.0",globalThis.confetti=Nn;const qn=globalThis;qn.confetti=Nn,qn.tsParticles=gi;function Gn(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Wn{#M;#z;#C;#k;#S;#u;#D;#O;#I;#T;#E;#R;#p;#L;#_;#F={};#A=[void 0,void 0];#B={};constructor(t,e,i){this.#p=t,this.#u=e,this.#k=i,this.#D=null,this.#M=null,this.#z=new Set,this.#_=[],this.#L=[],this.#C=[],this.#S=[],this.#I=[],this.#T=[],this.#E=[],this.#R={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#O}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(l.x,l.y,this.#k.size.width,this.#k.size.height)})}clear(){for(const t of this.#C)if(t.canvasClear?.())return;for(const e of Object.values(t.DrawLayer))if("number"==typeof e)for(const t of this.#V(e))if(t.canvasClear?.())return;this.canvasClear()}destroy(){this.stop(),this.#M=null,this.#z.clear(),this.#_=[],this.#L=[],this.#C=[],this.#S=[],this.#I=[],this.#T=[],this.#E=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#R[e]=[])}draw(t){const e=this.#D;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[a,o]=this.#U(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:d,opacity:h,strokeOpacity:u}=t.getOpacity(),p=this.#B,g=this.#F,f=a?oi(a,r.hdr,d*h,r.peakNits,r.hdrMode):void 0,m=o?oi(o,r.hdr,u*h,r.peakNits,r.hdrMode):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=m,this.draw(s=>{for(const i of this.#E)i.drawParticleSetup?.(s,t,e);this.#H(s,t,i,h,g,p),this.#$({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*c**l.sizeRate,opacity:h,transform:p}),this.#j(t);for(const i of this.#T)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#I)this.#N(i,s,t,e)})}drawParticles(e){const{particles:i,actualOptions:s}=this.#u;this.clear(),i.update(e),this.draw(n=>{const a=this.#k.size.width,o=this.#k.size.height;if(this.#M)try{n.drawImage(this.#M,l.x,l.y,a,o)}catch{this.#q("background-element-draw-error","Error drawing background element onto canvas")}const r=s.background;if(r.draw)try{r.draw(n,e)}catch{this.#q("background-draw-error","Error in background.draw callback")}for(const e of this.#V(t.DrawLayer.BackgroundMask))e.canvasPaint?.();for(const i of this.#V(t.DrawLayer.CanvasSetup))i.drawSettingsSetup?.(n,e);for(const i of this.#V(t.DrawLayer.PluginContent))i.draw?.(n,e);i.drawParticles(e);for(const i of this.#V(t.DrawLayer.CanvasCleanup))i.clearDraw?.(n,e),i.drawSettingsCleanup?.(n,e)})}init(){this.initUpdaters(),this.initPlugins(),this.#G(),this.paint()}initPlugins(){this.#C=[],this.#S=[],this.#I=[],this.#E=[],this.#T=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#R[e]=[]);for(const e of this.#u.plugins)(e.particleFillColor??e.particleStrokeColor)&&this.#S.push(e),e.drawParticle&&this.#I.push(e),e.drawParticleSetup&&this.#E.push(e),e.drawParticleCleanup&&this.#T.push(e),e.canvasClear&&this.#C.push(e),e.canvasPaint&&this.#V(t.DrawLayer.BackgroundMask).push(e),e.drawSettingsSetup&&this.#V(t.DrawLayer.CanvasSetup).push(e),e.draw&&this.#V(t.DrawLayer.PluginContent).push(e),(e.clearDraw??e.drawSettingsCleanup)&&this.#V(t.DrawLayer.CanvasCleanup).push(e)}initUpdaters(){this.#_=[],this.#L=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#L.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#_.push(t)}paint(){let e=!1;for(const i of this.#V(t.DrawLayer.BackgroundMask))if(e=i.canvasPaint?.()??!1,e)break;e||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(l.x,l.y,this.#k.size.width,this.#k.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,l.x,l.y,this.#k.size.width,this.#k.size.height),i.globalAlpha=s})}setContext(t){this.#D=t,this.#D&&(this.#D.globalCompositeOperation=i)}setContextSettings(t){this.#O=t}stop(){this.draw(t=>{t.clearRect(l.x,l.y,this.#k.size.width,this.#k.size.height)})}#j(t){for(const e of this.#L)e.afterDraw?.(t)}#H(t,e,i,s,n,a){for(const o of this.#_){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,s);a&&(n.fill=a),r&&(n.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)Gn(a,t,e)}o.beforeDraw?.(e)}}#W(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#K(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#$(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:d}=e,h=s.getPosition(),u=s.getTransformData(l),p={x:h.x,y:h.y};i.setTransform(u.a,u.b,u.c,u.d,h.x,h.y),a.fill&&(i.fillStyle=a.fill);const g=!!s.fillEnabled,f=s.strokeWidth??0;i.lineWidth=f,a.stroke&&(i.strokeStyle=a.stroke);const m={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:g,stroke:f>0,transformData:u,position:{...h},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=s.effect?c.get(s.effect):void 0,v=s.shape?d.get(s.shape):void 0;this.#K(y,m),this.#Q(v,m),this.#X(v,m),this.#Y(v,m),this.#W(y,m),i.resetTransform()}#N(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#X(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:a}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),a&&i.stroke())}#Y(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#Q(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#V(t){return this.#R[t]}#U(t){let e,i;for(const s of this.#S)if(!e&&s.particleFillColor&&(e=Ye(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ye(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#A[0]=e,this.#A[1]=i,this.#A}#G(){const t=this.#u.actualOptions.background;if(this.#M=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement||"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?this.#M=e:e?this.#q("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#q("background-element-not-found",`Background element selector "${t.element}" not found`)}}else("undefined"!=typeof HTMLCanvasElement&&t.element instanceof HTMLCanvasElement||"undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas||"undefined"!=typeof HTMLVideoElement&&t.element instanceof HTMLVideoElement||"undefined"!=typeof HTMLImageElement&&t.element instanceof HTMLImageElement)&&(this.#M=t.element)}#q(t,e){this.#z.has(t)||(this.#z.add(t),Et().warning(e))}}const Kn=new WeakMap;function Qn(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 Xn{domElement;render;renderCanvas;size;zoom=1;#u;#Z;#J;#tt;#et;#p;#it;#st;#nt;#at;constructor(t,e){this.#p=t,this.#u=e,this.render=new Wn(t,e,this),this.#nt={height:0,width:0};const i=e.retina.pixelRatio,s=this.#nt;this.size={height:s.height*i,width:s.width*i},this.#Z=!1,this.#st=[],this.#it="none"}get#ot(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#Z){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#rt();this.render.destroy(),this.#st=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#at?this.#at:{x:e*o/t,y:i*o/t}}init(){this.#lt(t=>{t.disconnect()}),this.#tt=dt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#ct()}),this.resize(),this.#dt(),this.#lt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#ht(),this.initBackground(),this.#ut(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Qe(this.#p,e.color);if(n){const i=t.actualOptions.hdr;s.backgroundColor=ai(n,t.hdr,e.opacity,i.peakNits,i.mode)}else s.backgroundColor="";s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#st=[];for(const t of this.#u.plugins)t.resize&&this.#st.push(t)}loadCanvas(t){this.#Z&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#Z=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=Kn.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 Kn.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#et=bt(s.style));const n=this.#nt,a=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=a.height,n.width=a.width);const o=this.#u.retina.pixelRatio,r=this.size;a.height=r.height=n.height*o,a.width=r.width=n.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#nt,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.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=o.width,i.height=l.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#it=t,this.#ct())}setZoom(t,e){this.zoom=t,this.#at=e}stop(){this.#lt(t=>{t.disconnect()}),this.#tt=void 0,this.#pt(),this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#gt(),e&&await t.refresh()}#gt(){for(const t of this.#st)t.resize?.()}#ht(){const t=this.#u,e=t.actualOptions.hdr.enable&&ct("(color-gamut: p3)")?.matches&&ct("(dynamic-range: high)")?.matches;t.hdr=e??!1,t.hdrMode=t.actualOptions.hdr.mode,t.peakNits=t.actualOptions.hdr.peakNits;const i=this.renderCanvas;if(!i)return;let s;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...e?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});try{s=i.getContext("2d",this.render.settings)}catch{s=null}if(e&&!s){t.hdr=!1;const e={alpha:!0,desynchronized:!0,willReadFrequently:!1,colorSpace:"srgb"};this.render.setContextSettings(e);try{s=i.getContext("2d",e)}catch{s=null}}this.render.setContext(s)}#ut(){this.#pt();const t=ct("(color-gamut: p3)"),e=ct("(dynamic-range: high)"),i=()=>{this.#ft(),this.#ht(),this.initBackground()},s=[];t&&(t.addEventListener("change",i),s.push({handler:i,mql:t})),e&&(e.addEventListener("change",i),s.push({handler:i,mql:e})),this.#J=s}#dt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#ot?this.#mt():this.#rt();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")}}}#ft(){const t=this.renderCanvas;t&&(this.domElement||(this.renderCanvas=new OffscreenCanvas(t.width,t.height)))}#pt(){if(this.#J){for(const{handler:t,mql:e}of this.#J)e.removeEventListener("change",t);this.#J=void 0}}#ct(){const t=this.domElement;if(!t)return;this.#lt(t=>{t.disconnect()}),this.#dt(),this.initBackground();const e=this.#it;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#lt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#rt(){const t=this.domElement,e=this.#et;t&&e&&Qn(t,e,!0)}#lt(t){this.#tt&&t(this.#tt)}#mt(){const t=this.domElement;t&&Qn(t,Mt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Yn{#u;#yt;#vt;#wt;constructor(t){this.#u=t,this.#yt={visibilityChange:()=>{this.#bt()},resize:()=>{this.#xt()}}}addListeners(){this.#Pt(!0)}removeListeners(){this.#Pt(!1)}#bt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(lt().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#xt(){this.#wt&&(clearTimeout(this.#wt),this.#wt=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#wt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*r)}#Pt(t){const e=this.#yt;this.#Mt(t),zt(document,n,e.visibilityChange,t,!1)}#Mt(t){const e=this.#yt,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void zt(globalThis,s,e.resize,t);const n=i.canvas.domElement;this.#vt&&!t?(n&&this.#vt.unobserve(n),this.#vt.disconnect(),this.#vt=void 0):!this.#vt&&t&&n&&(this.#vt=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this.#xt()}),this.#vt.observe(n))}}function Zn(t){if(!ht(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}function Jn(t,e){const i=t%e;return i<0?i+e:i}function ta(t,e,i,s){const n=Fe(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=vt(n.effect.type,t.id,a),t.shape=vt(n.shape.type,t.id,a);const o=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=vt(e,t.id,a);i&&(t.effect=i)}o.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=vt(e,t.id,a);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===d){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(F()*i.length)]}if(t.shape===d){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(F()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return mt({close:e.close},vt(n,i,s))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return mt({close:e.close},vt(n,i,s))}(t.shape,r,t.id,a):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class ea{backColor;destroyed;direction;effect;effectClose;effectData;fillColor;fillEnabled;fillOpacity;group;id;ignoresResizeRatio;initialPosition;initialVelocity;isRotating;justWarped;lastPathTime;misplaced;moveCenter;offset;opacity;options;outType;pathRotation;position;randomIndexData;retina;roll;rotation;shape;shapeClose;shapeData;sides;size;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;#zt={fillOpacity:1,opacity:1,strokeOpacity:1};#Ct=C.origin;#kt={sin:0,cos:0};#St={a:1,b:0,c:0,d:1};#u;#Dt=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#Dt.push(t),this.#Dt.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#Dt.length=0}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0;s?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this.#u.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#Ot(this.#It(li(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*o}getModifier(t){return this.#Dt.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=j(this.opacity?.value??1),s=this.#It(void 0,t=>t.opacity)??i,n=this.fillOpacity??1,a=this.strokeOpacity??1;return this.#zt.fillOpacity=n,this.#zt.opacity=s*e,this.#zt.strokeOpacity=a,this.#zt}getPosition(){return this.#Ct.x=this.position.x+this.offset.x,this.#Ct.y=this.position.y+this.offset.y,this.#Ct.z=this.position.z,this.#Ct}getRadius(){return this.#It(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#kt.sin=Math.sin(t),this.#kt.cos=Math.cos(t),this.#kt}getStrokeColor(){return this.#Ot(this.#It(li(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#St.a=e.cos*(t.a??c.a),this.#St.b=i?e.sin*(t.b??1):t.b??c.b,this.#St.c=i?-e.sin*(t.c??1):t.c??c.c,this.#St.d=e.cos*(t.d??c.d),this.#St}init(e,i,s,n){const a=this.#u;!function(e,i,s){e.id=i,e.group=s,e.justWarped=!1,e.effectClose=!0,e.shapeClose=!0,e.pathRotation=!1,e.lastPathTime=0,e.destroyed=!1,e.unbreakable=!1,e.isRotating=!1,e.rotation=0,e.misplaced=!1,e.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},e.size={value:1,max:1,min:1,enable:!1},e.outType=t.ParticleOutType.normal,e.ignoresResizeRatio=!0}(this,e,n),this.options=ta(this,a,this.#p,s),a.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(a.particleUpdaters,this),this.#Tt(i),this.initialVelocity=this.#Et(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,a),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(a.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(a,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(a,this)}isInsideCanvas(t){return this.#Rt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#Rt({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=Jn(t,u);return e>=Math.PI*o&&e<3*Math.PI*o}if(this.roll.horizontal){const e=Jn(t+Math.PI*o,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Jn(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}removeModifier(t){const e=this.#Dt.findIndex(e=>e.id===t);e>=0&&this.#Dt.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#It(t,e){let i=t;for(const t of this.#Dt)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#Lt(t,e){let i=0,s=t?C.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return C.create(i.x,i.y,e)}const t=st({size:l,position:s}),c=C.create(t.x,t.y,e);this.#_t(c,r,o.left??o.default),this.#_t(c,r,o.right??o.default),this.#Ft(c,r,o.top??o.default),this.#Ft(c,r,o.bottom??o.default);let d=!0;for(const t of n.particles.checkParticlePositionPlugins)if(d=t.checkParticlePosition?.(this,c,i)??!0,!d)break;if(d)return c;i+=1,s=void 0}}#Et(){const e=this.options.move,i=J(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=Y(j(e.angle.value)),n=Y(j(e.angle.offset)),a={left:n-s*o,right:n+s*o};return e.straight||(i.angle+=$(G(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=F()),i}#_t(e,i,s){Zn({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#Ft(e,i,s){Zn({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#At(e,i){const s=this.getRadius(),n=this.#u.canvas.size,a=this.position,o=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:o?a.y+s<n.height:a.y-s<n.height,reason:"default"}:e===t.OutModeDirection.left?{inside:o?a.x-s>0:a.x+s>0,reason:"default"}:e===t.OutModeDirection.right?{inside:o?a.x+s<n.width:a.x-s<n.width,reason:"default"}:e===t.OutModeDirection.top?{inside:o?a.y-s>0:a.y+s>0,reason:"default"}:{inside:a.x>=-s&&a.y>=-s&&a.y<=n.height+s&&a.x<=n.width+s,reason:"default"}}#Bt(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Rt(t){const e=this.#At(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#Bt(t.direction,t.outMode),l=a?this.#Vt(a(r),"shape"):void 0,c=o?this.#Vt(o(r),"effect"):void 0;if(l&&c){const t=Math.max(l.margin??0,c.margin??0);return{inside:l.inside&&c.inside,margin:t>0?t:void 0,reason:"combined"}}return l??c??e}#Ot(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?pi(t,this.roll.alter.type,this.roll.alter.value):t:t}#Tt(e){const i=this.#u,s=Math.floor(j(this.options.zIndex.value)),n=this.#Lt(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 a=i.canvas.size;switch(this.moveCenter={...wt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=Z(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case t.MoveDirection.inside:this.outType=t.ParticleOutType.inside;break;case t.MoveDirection.outside:this.outType=t.ParticleOutType.outside}this.offset=k.origin}#Vt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class ia{#Ut;#Ht=new Map;#$t=[];#jt;#Nt;#qt=[];#Gt;constructor(t){this.#Ut=t,this.#jt=0,this.#Gt=0}clear(){this.#Ht.clear();const t=this.#Nt;t&&(this.#Ut=t),this.#Nt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Wt(e,i);this.#Ht.has(s)||this.#Ht.set(s,[]),this.#Ht.get(s)?.push(t)}query(t,e,i=[]){const s=this.#Kt(t);if(!s)return i;const n=Math.floor(s.minX/this.#Ut),a=Math.floor(s.maxX/this.#Ut),o=Math.floor(s.minY/this.#Ut),r=Math.floor(s.maxY/this.#Ut);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#Ht.get(a);if(o)for(const s of o)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this.#Qt(t.x,t.y,e),a=this.query(n,i,s);return this.#Xt(),a}queryRectangle(t,e,i,s=[]){const n=this.#Yt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Xt(),a}setCellSize(t){this.#Nt=t}#Qt(t,e,i){return(this.#$t[this.#jt++]??=new Qt(t,e,i)).reset(t,e,i)}#Yt(t,e,i,s){return(this.#qt[this.#Gt++]??=new Xt(t,e,i,s)).reset(t,e,i,s)}#Wt(t,e){return`${Math.floor(t/this.#Ut)}_${Math.floor(e/this.#Ut)}`}#Kt(t){if(t instanceof Qt){const e=t.radius,{x:i,y:s}=t.position;return{minX:i-e,maxX:i+e,minY:s-e,maxY:s+e}}if(t instanceof Xt){const{x:e,y:i}=t.position,{width:s,height:n}=t.size;return{minX:e,maxX:e+s,minY:i,maxY:i+n}}return null}#Xt(){this.#jt=0,this.#Gt=0}}class sa{checkParticlePositionPlugins;grid;#Zt;#u;#Jt;#te;#ee;#ie;#se;#ne;#p;#ae;#oe;#re;#le;#ce;#de;constructor(t,e){this.#p=t,this.#u=e,this.#ee=0,this.#Zt=[],this.#ae=[],this.#te=0,this.#Jt=new Map,this.#ie=new Map,this.#de=this.#he(this.#u.zLayers),this.grid=new ia(100),this.checkParticlePositionPlugins=[],this.#se=[],this.#ne=[],this.#re=[],this.#oe=[],this.#ce=[]}get count(){return this.#Zt.length}addParticle(e,i,s,n){const a=this.#u.actualOptions.particles.number.limit.mode,o=void 0===s?this.#te:this.#Jt.get(s)??this.#te,r=this.count;if(o>0)switch(a){case t.LimitMode.delete:{const t=r+1-o;t>0&&this.removeQuantity(t);break}case t.LimitMode.wait:if(r>=o)return}try{const a=this.#ae.pop()??new ea(this.#p,this.#u);a.init(this.#ee,e,i,s);let o=!0;return n&&(o=n(a)),o?(this.#Zt.push(a),this.#ue(a),this.#ee++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this.#ae.push(a)}catch(t){Et().warning(`error adding particle: ${t}`)}}clear(){this.#Zt=[],this.#ie.clear(),this.#pe(this.#u.zLayers)}destroy(){this.#Zt=[],this.#ae.length=0,this.#ie.clear(),this.#de=[],this.checkParticlePositionPlugins=[],this.#se=[],this.#ne=[],this.#re=[],this.#oe=[],this.#ce=[]}drawParticles(t){for(let e=this.#de.length-1;e>=0;e--){const i=this.#de[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Zt.filter(t)}find(t){return this.#Zt.find(t)}get(t){return this.#Zt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#ce=[],this.#ne=[],this.#re=[],this.#se=[],this.#oe=[],this.#ie.clear(),this.#pe(t.zLayers),this.grid=new ia(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#ce.push(e),e.particleUpdate&&this.#ne.push(e),e.postUpdate&&this.#re.push(e),e.particleReset&&this.#se.push(e),e.postParticleUpdate&&this.#oe.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#Zt.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let a=t;n<e&&a<this.count;a++)this.#ge(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Fe(this.#p,this.#u,s);this.#fe(n,i,t)}this.#fe(t.particles,i)}setResizeFactor(t){this.#le=t}update(t){this.grid.clear();for(const e of this.#ce)e.update?.(t);const e=this.#me(t);for(const e of this.#re)e.postUpdate?.(t);if(this.#ye(t,e),e.size)for(const t of e)this.remove(t);this.#le=void 0}#ve(...t){this.#ae.push(...t)}#fe(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#te=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Jt.set(i,s?.number.limit.value??n.limit.value));const a=this.#we(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,l=Math.min(o,r)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#te=n.limit.value*a:this.#Jt.set(i,n.limit.value*a),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)}#he(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#be(t){const e=this.#de.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#we(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1}#ue(t){const e=this.#be(t.position.z),i=this.#de[e];i&&(i.push(t),this.#ie.set(t.id,e))}#ge(e,i,s){const n=this.#Zt[e];return!!n&&(n.group===i&&(this.#Zt.splice(e,1),this.#xe(n),n.destroy(s),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this.#ve(n),!0))}#xe(t){const e=this.#ie.get(t.id)??this.#be(t.position.z),i=this.#de[e];if(!i)return void this.#ie.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#ie.delete(t.id)}#pe(t){const e=Math.max(Math.floor(t),1);if(this.#de.length===e)for(const t of this.#de)t.length=0;else this.#de=this.#he(e)}#Pe(t){const e=this.#be(t.position.z),i=this.#ie.get(t.id);if(void 0===i)return void this.#ue(t);if(i===e)return;const s=this.#de[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#de[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#ie.set(t.id,e)}else this.#ie.set(t.id,e)}#me(t){const e=new Set,i=this.#le;for(const s of this.#Zt){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.#se)t.particleReset?.(s);for(const e of this.#ne){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#ye(t,e){for(const i of this.#Zt)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#oe)e.postParticleUpdate?.(i,t);this.#Pe(i)}}}class na{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=j(s.gravity.maxSpeed)*i,a.moveDrift=j(s.drift)*i,a.moveSpeed=j(s.speed)*i;const o=a.maxDistance;o.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,o.vertical=void 0===n.vertical?void 0:n.vertical*i}}function aa(t){return!t.destroyed}function oa(t,e,...i){const s=new Ae(t,e);return Zt(s,...i),s}var ra=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;hdrMode;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;peakNits;plugins;retina;shapeDrawers;started;zLayers;#Me;#ze;#Ce={value:0,factor:0};#ke;#Se;#De;#Oe;#Ie;#Te;#Ee;#Re;#Le;#_e;#Fe;#p;#Ae;#Be;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this.#p=s,this.#ke=i,this.#Le=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.hdrMode=t.HdrMode.standard,this.peakNits=400,this.#Ae=!1,this.#Me=0,this.#De=0,this.#Re=0,this.#Ie=!0,this.started=!1,this.destroyed=!1,this.#Fe=!0,this.#Ee=0,this.zLayers=100,this.pageHidden=!1,this.#Be=o,this.#Te=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new na(this),this.canvas=new Xn(this.#p,this),this.particles=new sa(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#_e=oa(this.#p,this),this.actualOptions=oa(this.#p,this),this.#Oe=new Yn(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#Fe&&!this.pageHidden&&aa(this)}get options(){return this.#_e}get sourceOptions(){return this.#Be}addLifeTime(t){this.#Re+=t}alive(){return!this.#De||this.#Re<=this.#De}destroy(e=!0){if(aa(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#Le(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#ke(t,{container:this,data:e})}draw(t){if(!aa(this))return;let e=t;this.#Se=B(t=>{e&&(this.#Ee=void 0,e=!1),this.#Ve(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}Et().error(`Export plugin with type ${t} not found`)}async init(){if(!aa(this))return;const e=new Map;for(const t of this.#p.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this.#_e=oa(this.#p,this,this.#Te,this.sourceOptions),this.actualOptions=oa(this.#p,this,this.#_e),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[t,i]of e)t.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:i,duration:s,fpsLimit:n,smooth:a,zLayers:o}=this.actualOptions,l=this.actualOptions.hdr;this.hdrMode=l.mode,this.peakNits=l.peakNits,this.zLayers=o,this.#De=j(s)*r,this.#Me=j(i)*r,this.#Re=0,this.fpsLimit=n>0?n:120,this.#Ae=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.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){if(aa(this)&&(void 0!==this.#Se&&(V(this.#Se),this.#Se=void 0),!this.#Fe)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Fe=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!aa(this))return;const i=this.#Fe||e;if(!this.#Ie||this.actualOptions.autoPlay){if(this.#Fe&&(this.#Fe=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#Ie=!1}async refresh(){if(aa(this))return this.stop(),this.start()}async reset(t){if(aa(this))return this.#Te=t,this.#Be=t,this.#_e=oa(this.#p,this,this.#Te,this.sourceOptions),this.actualOptions=oa(this.#p,this,this.#_e),this.refresh()}async start(){aa(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#Oe.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#ze=setTimeout(()=>{i()},this.#Me)}))}stop(){if(aa(this)&&this.started){this.#ze&&(clearTimeout(this.#ze),this.#ze=void 0),this.#Ie=!0,this.started=!1,this.#Oe.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this.#Be=this.#_e,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Ve(t){try{if(!this.#Ae&&void 0!==this.#Ee&&t<this.#Ee+r/this.fpsLimit)return void this.draw(!1);if(this.#Ee??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this.#Ce,t-this.#Ee,this.fpsLimit,this.#Ae),this.addLifeTime(this.#Ce.value),this.#Ee=t,this.#Ce.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#Ce),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Et().error("error in animation loop",t)}}}});var la=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=t.DrawLayer.CanvasSetup;#u;#Ue;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#Ue&&(t.globalCompositeOperation=this.#Ue)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Ue=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function ca(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=U(t.velocity.x,-1,1),t.velocity.y=U(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const d=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&d.y>=0&&d.y>=s||r.inverse&&d.y<=0&&d.y<=-s)&&(d.y=l*s,i&&(t.velocity.y=d.y/i));const h=t.options.zIndex,u=(1-t.zIndexFactor)**h.velocityRate;d.multTo(u),d.multTo(a);const{position:p}=t;p.addTo(d),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}var da=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(e){const i=e.options.move,s=i.gravity,n=i.path;if(e.moveDecay=1-j(i.decay),e.pathDelay=j(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:j(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},a={x:.01*n.x*e.canvas.size.width,y:.01*n.y*e.canvas.size.height},o=Q(i.getPosition(),a),r=j(s.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:a,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:F()*u,radius:o,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options.move;if(!s.enable)return;const n=this.#u,a=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(e),r=n.retina.reduceFactor,l=e.retina.moveSpeed,c=e.retina.moveDrift,d=e.size.max,h=l*(s.size?e.getRadius()/d:1)*a*(i.factor||1)*o,u=e.retina.maxSpeed;s.spin.enable?function(e,i,s,n){if(!i.spin)return;const a=i.spin.direction===t.RotateDirection.clockwise,r={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*r.x(i.spin.angle)*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*o;i.spin.radius>c?(i.spin.radius=c,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*s*(1-i.spin.radius/l)}(n,e,h,r):ca(e,s,h,u,c,r,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=W(e,t.position),n=Math.abs(i),a=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&n>=l||c&&a>=c)&&!t.misplaced)t.misplaced=!!l&&n>l||!!c&&a>c,l&&(t.velocity.x=t.velocity.y*o-t.velocity.x),c&&(t.velocity.y=t.velocity.x*o-t.velocity.y);else if((!l||n<l)&&(!c||a<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*=-F()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-F())}}(e)}preInit(){return this.#He()}redrawInit(){return this.#He()}update(){for(const t of this.pathGenerators.values())t.update()}async#He(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var ha=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#b;constructor(t,e){this.#b=t,this.#u=e,this.#b.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(T(t))for(const e of t)await this.#b.addEmitter(this.#u,e);else await this.#b.addEmitter(this.#u,t)}pause(){for(const t of this.#b.getArray(this.#u))t.pause()}play(){for(const t of this.#b.getArray(this.#u))t.play()}resize(){for(const t of this.#b.getArray(this.#u))t.resize()}stop(){this.#b.clear(this.#u)}update(t){this.#b.getArray(this.#u).forEach(e=>{e.update(t)})}}});const ua=new Map;var pa=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||ua.set(t,e)}getShapeGenerator(t){return ua.get(t)}getSupportedShapeGenerators(){return ua.keys()}}});var ga=Object.freeze({__proto__:null,EmittersInstancesManager:class{#$e;#p;constructor(t){this.#$e=new Map,this.#p=t}async addEmitter(t,e,i){const s=new Is;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return wa}),a=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this.#$e.set(t,[])}getArray(t){this.initContainer(t);let e=this.#$e.get(t);return e||(e=[],this.#$e.set(t,e)),e}initContainer(t){this.#$e.has(t)||(this.#$e.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)}}});var fa=Object.freeze({__proto__:null,ImagePreloaderInstance:class{#u;#n;constructor(t,e){this.#n=t,this.#u=e}destroy(){this.#n.images?.delete(this.#u)}}});var ma=Object.freeze({__proto__:null,MotionPluginInstance:class{#u;constructor(t){this.#u=t}async init(){const t=this.#u,e=t.actualOptions.motion;if(!e||!e.disable&&!e.reduce.value)return void(t.retina.reduceFactor=1);const i=ct("(prefers-reduced-motion: reduce)");if(!i)return void(t.retina.reduceFactor=1);this.#je(i);i.addEventListener("change",()=>{(async()=>{this.#je(i);try{await t.refresh()}catch{}})()}),await Promise.resolve()}#je(t){const e=this.#u,i=e.actualOptions.motion;i&&(t.matches?i.disable?e.retina.reduceFactor=0:e.retina.reduceFactor=i.reduce.value?1/i.reduce.factor:1:e.retina.reduceFactor=1)}}});function ya(t,e,i,s){(t.paint??=new Se).fill={color:ce.create(void 0,{value:e}),enable:s,opacity:i}}function va(t,e,i,s){(t.paint??=new Se).stroke={color:ce.create(void 0,{value:e}),opacity:i,width:s}}var wa=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#Ne;#qe;#Ge;#De;#We;#Ke;#Qe;#Xe;#Ye;#tt;#Ze;#Fe;#p;#Je;#vt;#ti;#ei;#ii;#si;constructor(e,i,s,n,o){this.#p=e,this.#u=i,this.#Je=s,this.#Ne=0,this.#qe=0,this.#Ge=0,this.#Xe=o,n instanceof Is?this.options=n:(this.options=new Is,this.options.load(n)),this.#ii=i.retina.reduceFactor?j(this.options.life.delay??0)*r/i.retina.reduceFactor:1/0,this.position=this.#Xe??this.#Lt(),this.name=this.options.name,this.fill=this.options.fill,this.#Ke=!this.options.life.wait,this.#si=!1;const l=mt({},this.options.particles);if(l.move??={},l.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=Ye(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=Ye(this.#p,this.options.spawn.stroke.color)),this.#Fe=!this.options.autoPlay,this.#Ze=l,this.#ei=this.#ni(),this.size=this.#ei.mode===t.PixelMode.percent?{width:this.#ei.width/a*this.#u.canvas.size.width,height:this.#ei.height/a*this.#u.canvas.size.height}:{width:this.#ei.width,height:this.#ei.height},this.#Ye=this.options.life.count??-1,this.#Qe=this.#Ye<=0,this.options.domId){const t=lt().getElementById(this.options.domId);t&&(this.#tt=new MutationObserver(()=>{this.resize()}),this.#vt=new ResizeObserver(()=>{this.resize()}),this.#tt.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#vt.observe(t))}const c=this.options.shape,d=this.#p.emitterShapeManager?.getShapeGenerator(c.type);d&&(this.#ti=d.generate(this.#u,this.position,this.size,this.fill,c.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#Fe=!0,this.pause()}externalPlay(){this.#Fe=!1,this.play()}async init(){await(this.#ti?.init())}pause(){this.#Fe||(this.#We=void 0)}play(){if(this.#Fe)return;if(!(this.#Ye>0||this.#Qe)&&this.options.life.count||!(this.#Ke||this.#Ge>=(this.#ii??0)))return;const t=this.#u;if(void 0===this.#We){const e=j(this.options.rate.delay);this.#We=t.retina.reduceFactor?e*r/t.retina.reduceFactor:1/0}(this.#Ye>0||this.#Qe)&&this.#ai()}resize(){const e=this.#Xe,i=this.#u;this.position=e&&pt(e,i.canvas.size,k.origin)?e:this.#Lt(),this.#ei=this.#ni(),this.size=this.#ei.mode===t.PixelMode.percent?{width:this.#ei.width/a*i.canvas.size.width,height:this.#ei.height/a*i.canvas.size.height}:{width:this.#ei.width,height:this.#ei.height},this.#ti?.resize(this.position,this.size)}update(t){if(this.#Fe)return;const e=this.#u;this.#Ke&&(this.#Ke=!1,this.#Ge=this.#ii??0,this.#qe=this.#We??0),this.#si||(this.#si=!0,this.#oi(this.options.startCount)),void 0!==this.#De&&(this.#Ne+=t.value,this.#Ne>=this.#De&&(this.pause(),void 0!==this.#ii&&(this.#ii=void 0),this.#Qe||this.#Ye--,this.#Ye>0||this.#Qe?(this.position=this.#Lt(),this.#ti?.resize(this.position,this.size),this.#ii=e.retina.reduceFactor?j(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0):this.#ri(),this.#Ne-=this.#De,this.#De=void 0)),void 0!==this.#ii&&(this.#Ge+=t.value,this.#Ge>=this.#ii&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#Ge-=this.#ii,this.#ii=void 0)),void 0!==this.#We&&(this.#qe+=t.value,this.#qe>=this.#We&&(this.#li(),this.#qe-=this.#We))}#Lt(){const t=this.#u;if(this.options.domId){const e=lt().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*o)*s,y:(i.y+i.height*o)*s}}}return it({size:t.canvas.size,position:this.options.position})}#ni(){const e=this.#u;if(this.options.domId){const i=lt().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 Ds;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}#ri(){this.#tt?.disconnect(),this.#tt=void 0,this.#vt?.disconnect(),this.#vt=void 0,this.#Je(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#li(){if(this.#Fe)return;const t=j(this.options.rate.quantity);this.#oi(t)}#oi(t){const e=vt(this.#Ze)??{},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:j(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,o=void 0===this.options.spawn.stroke?.opacity?1:j(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:j(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,d=!!a,h=!!this.#ti,u=c||d,p=u||h,g=u?{h:y,s:v,l:w}:null,f=this.options.shape;for(let c=0;c<t*l;c++){const t=p?mt({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=o,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&g&&(this.spawnFillColor.h=this.#ci(i.h,this.spawnFillColor.h,g.h,3.6),this.spawnFillColor.s=this.#ci(i.s,this.spawnFillColor.s,g.s),this.spawnFillColor.l=this.#ci(i.l,this.spawnFillColor.l,g.l)),ya(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&g&&(this.spawnStrokeColor.h=this.#ci(a.h,this.spawnStrokeColor.h,g.h,3.6),this.spawnStrokeColor.s=this.#ci(a.s,this.spawnStrokeColor.s,g.s),this.spawnStrokeColor.l=this.#ci(a.l,this.spawnStrokeColor.l,g.l)),va(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#ti){const e=this.#ti.randomPosition();if(e){l=e.position;const i=f.replace;i.color&&e.color&&ya(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#ai(){if(this.#Fe)return;const t=void 0!==this.options.life.duration?j(this.options.life.duration):void 0;(this.#Ye>0||this.#Qe)&&void 0!==t&&t>0&&(this.#De=t*r)}#ci(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const a=$(t.offset),o=j(this.options.rate.delay),l=n.retina.reduceFactor?o*r/n.retina.reduceFactor:1/0;return(e+j(t.speed)*n.fpsLimit/l+a*s)%i}}});t.AnimatableColor=ce,t.AnimationOptions=ne,t.AnimationValueWithRandom=be,t.Background=de,t.BaseRange=Kt,t.Circle=Qt,t.ColorAnimation=oe,t.Fill=fe,t.FullScreen=he,t.HDROptions=ue,t.HslAnimation=re,t.Move=Ce,t.MoveAngle=me,t.MoveCenter=ye,t.MoveGravity=ve,t.MovePath=Pe,t.OptionLoader=Yt,t.Options=Ae,t.OptionsColor=le,t.OutModes=Me,t.Paint=Se,t.ParticlesBounce=Oe,t.ParticlesBounceFactor=De,t.ParticlesDensity=Ie,t.ParticlesNumber=Ee,t.ParticlesNumberLimit=Te,t.ParticlesOptions=_e,t.RangedAnimationOptions=ae,t.RangedAnimationValueWithRandom=xe,t.Rectangle=Xt,t.ResizeEvent=pe,t.Shape=Re,t.Spin=ze,t.Stroke=ke,t.ValueWithRandom=we,t.Vector=k,t.Vector3d=C,t.ZIndex=Le,t.alterHsl=pi,t.animate=B,t.areBoundsInside=gt,t.calcExactPositionOrRandomFromSize=st,t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/a,y:t.position.y*t.size.height/a}:void 0},t.calcPositionOrRandomFromSize=et,t.calcPositionOrRandomFromSizeRanged=it,t.calculateBounds=ft,t.cancelAnimation=V,t.canvasFirstIndex=0,t.canvasTag=f,t.checkDistance=X,t.circleBounce=function(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=W(a,n);if(i*o+s*r<0)return;const l=-Math.atan2(r,o),c=t.mass,d=e.mass,h=t.velocity.rotate(l),u=e.velocity.rotate(l),p=tt(h,u,c,d),g=tt(u,h,c,d),f=p.rotate(-l),m=g.rotate(-l);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=m.x*e.factor.x,e.velocity.y=m.y*e.factor.y},t.circleBounceDataFromParticle=function(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:k.create(j(t.options.bounce.horizontal.value),j(t.options.bounce.vertical.value))}},t.clamp=U,t.cloneStyle=bt,t.collisionVelocity=tt,t.colorMix=ri,t.colorToRgb=Xe,t.confetti=Nn,t.countOffset=1,t.decayOffset=1,t.deepExtend=mt,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=Y,t.deleteCount=1,t.double=2,t.doublePI=u,t.empty=0,t.executeOnSingleOrMultiple=yt,t.generatedAttribute=e,t.generatedFalse=g,t.generatedTrue=p,t.getDistance=Q,t.getDistanceSq=K,t.getDistances=W,t.getFullScreenStyle=Mt,t.getHslAnimationFromHsl=ci,t.getHslFromAnimation=li,t.getItemMapFromInitializer=kt,t.getItemsFromInitializer=Ct,t.getLinkColor=function(t,e,i,s){if(i===d)return ni();if(i!==h)return i;{const i=t.getFillColor()??t.getStrokeColor(),n=e?.getFillColor()??e?.getStrokeColor();if(i&&n&&e)return ri(i,n,t.getRadius(),e.getRadius(),s);{const t=i??n;if(t)return ei(t)}}},t.getLinkRandomColor=function(t,e,i,s){const n=D(e)?e:e.value;return n===d?s?Qe(t,{value:n}):i?d:h:n===h?h:Qe(t,{value:n})},t.getLogger=Et,t.getParticleBaseVelocity=J,t.getParticleDirectionAngle=Z,t.getPosition=wt,t.getRandom=F,t.getRandomFn=function(){return L},t.getRandomInRange=A,t.getRandomRgbColor=ni,t.getRangeMax=q,t.getRangeMin=N,t.getRangeValue=j,t.getStyleFromHsl=oi,t.getStyleFromRgb=ai,t.hMax=y,t.hMin=0,t.hPhase=60,t.half=o,t.hslToRgb=ei,t.hslToRgbFloat=ii,t.hslaToRgba=si,t.identity=1,t.inverseFactorNumerator=1,t.isArray=T,t.isBoolean=S,t.isFunction=function(t){return"function"==typeof t},t.isInArray=ht,t.isNull=E,t.isNumber=O,t.isObject=I,t.isPointInside=pt,t.isString=D,t.itemFromArray=ut,t.itemFromSingleOrMultiple=vt,t.lFactor=1,t.lMax=w,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){if(void 0!==i){const s=e;if("__proto__"===s||"constructor"===s||"prototype"===s)return;const n=t,a=Object.prototype.hasOwnProperty.call(n,s)?n[s]:{};n[s]=mt(a,i)}},t.loadLazyProperty=ie,t.loadMinIndex=0,t.loadNestedProperty=ee,t.loadOptionProperty=se,t.loadOptions=Zt,t.loadParticlesOptions=Fe,t.loadProperty=Jt,t.loadRandomFactor=1e4,t.loadRangeProperty=te,t.manageListener=zt,t.maxNits=P,t.midColorValue=h,t.millisecondsToSeconds=r,t.minCount=0,t.minDistance=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minRadius=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=H,t.none=0,t.one=1,t.originPoint=l,t.parseAlpha=nt,t.percentDenominator=a,t.phaseNumerator=1,t.quarter=b,t.randomColorValue=d,t.randomInRangeValue=$,t.rangeColorToHsl=Ye,t.rangeColorToRgb=Qe,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=m,t.rgbToHsl=Ze,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=lt,t.safeMatchMedia=ct,t.safeMutationObserver=dt,t.setAnimationFunctions=function(t,e){_.nextFrame=t,_.cancel=e},t.setLogger=function(t){t.debug&&(Tt.debug=It(t.debug)),t.error&&(Tt.error=It(t.error)),t.info&&(Tt.info=It(t.info)),t.log&&(Tt.log=It(t.log)),t.trace&&(Tt.trace=It(t.trace)),t.verbose&&(Tt.verbose=It(t.verbose)),t.warning&&(Tt.warning=It(t.warning))},t.setRandom=function(t=Math.random){L=t},t.setRangeValue=G,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Ke(t,e)?.a},t.stringToRgb=Je,t.threeQuarter=x,t.triple=3,t.tryCountIncrement=1,t.tsParticles=gi,t.updateColor=ui,t.updateColorValue=hi,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{confetti:(globalThis.__tsParticlesInternals.bundles.confetti||{}).confetti}),delete(globalThis.window||globalThis).tsparticlesInternalExports;