@tsparticles/confetti 4.3.1 → 4.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/confetti.js +2 -2
- package/browser/confetti.lazy.js +2 -2
- package/cjs/confetti.js +2 -2
- package/cjs/confetti.lazy.js +2 -2
- package/esm/confetti.js +2 -2
- package/esm/confetti.lazy.js +2 -2
- package/package.json +17 -17
- package/report.html +1 -1
- package/tsparticles.confetti.bundle.js +46 -38
- package/tsparticles.confetti.bundle.min.js +1 -1
- package/tsparticles.confetti.js +3 -3
- package/tsparticles.confetti.min.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.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(){return globalThis.document}function lt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function ct(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function dt(t,e){return t===e||T(e)&&e.includes(t)}function ht(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(A()*t.length)]}function ut(t,e,i,s,n){return pt(gt(t,s??0),e,i,n)}function pt(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 gt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function ft(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("__proto__"===t||"constructor"===t||"prototype"===t)continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if("__proto__"===s||"constructor"===s||"prototype"===s)continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>ft(void 0,t)):ft(e[s],n)}}return t}function yt(t,e){return T(t)?t.map((t,i)=>e(t,i)):e(t,0)}function mt(t,e,i){return T(t)?ht(t,e,i):t}function vt(e,i){return function(e,i){if(e.mode!==t.PixelMode.percent){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/a*i.width,y:e.y/a*i.height}:{width:e.width/a*i.width,height:e.height/a*i.height}}(e,i)}function wt(t){const e=rt().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 bt,Pt;function xt(t){if(bt!==t||!Pt){bt=t;const e=rt().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 Mt(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 zt(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 Ct(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 kt;t.EventType=void 0,(kt=t.EventType||(t.EventType={})).configAdded="configAdded",kt.containerInit="containerInit",kt.particlesSetup="particlesSetup",kt.containerStarted="containerStarted",kt.containerStopped="containerStopped",kt.containerDestroyed="containerDestroyed",kt.containerPaused="containerPaused",kt.containerPlay="containerPlay",kt.containerBuilt="containerBuilt",kt.particleAdded="particleAdded",kt.particleDestroyed="particleDestroyed",kt.particleRemoved="particleRemoved";class Dt{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 Ct(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 Ct(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return zt(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 Ot=t=>(...e)=>{t(...e)},It={debug:Ot(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:Ot(console.info),log:Ot(console.log),trace:Ot(console.trace),verbose:Ot(console.log),warning:Ot(console.warn)};function Tt(){return It}const Et="100%";class Rt{pluginManager=new Dt(this);#d=[];#h=new St;#o=!1;get items(){return this.#d}get version(){return"4.3.1"}addEventListener(t,e){this.#h.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#h.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return Xn}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=mt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Tt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=mt(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=rt();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)s=t,s.dataset[e]??=g,s.dataset[e]===p&&(s.style.width||=Et,s.style.height||=Et,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||=Et,s.style.height||=Et,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=rt();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,Lt,At,Ft,Bt,Vt,Ut,$t,jt,qt,Gt,Wt;!function(t){t.circle="circle",t.rectangle="rectangle"}(_t||(_t={}));class Ht{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Nt extends Ht{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 Nt||t.type===_t.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Kt||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 Kt extends Ht{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 Nt)return t.intersects(this);if(!(t instanceof Kt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,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,(Lt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Lt.counterClockwise="counter-clockwise",Lt.random="random",t.AnimationMode=void 0,(At=t.AnimationMode||(t.AnimationMode={})).auto="auto",At.increase="increase",At.decrease="decrease",At.random="random",t.LimitMode=void 0,(Ft=t.LimitMode||(t.LimitMode={})).delete="delete",Ft.wait="wait",t.OutMode=void 0,(Bt=t.OutMode||(t.OutMode={})).bounce="bounce",Bt.none="none",Bt.out="out",Bt.destroy="destroy",Bt.split="split",t.AlterType=void 0,(Vt=t.AlterType||(t.AlterType={})).darken="darken",Vt.enlighten="enlighten",t.DestroyType=void 0,(Ut=t.DestroyType||(t.DestroyType={})).none="none",Ut.max="max",Ut.min="min",t.GradientType=void 0,($t=t.GradientType||(t.GradientType={})).linear="linear",$t.radial="radial",$t.random="random",t.ParticleOutType=void 0,(jt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",jt.inside="inside",jt.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 Qt{load(t){E(t)||this.doLoad(t)}}function Xt(t,...e){for(const i of e)t.load(i)}function Yt(t,e,i){void 0!==i&&(t[e]=i)}function Zt(t,e,i){void 0!==i&&(t[e]=H(i))}function Jt(t,e,i){void 0!==i&&t[e].load(i)}function te(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function ee(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 ie extends Qt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Zt(this,"count",t.count),Yt(this,"enable",t.enable),Zt(this,"speed",t.speed),Zt(this,"decay",t.decay),Zt(this,"delay",t.delay),Yt(this,"sync",t.sync)}}class se extends ie{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),Yt(this,"mode",t.mode),Yt(this,"startValue",t.startValue)}}class ne extends ie{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Yt(this,"max",t.max),Yt(this,"min",t.min),Zt(this,"offset",t.offset)}}class ae extends Qt{h=new ne(0,m);l=new ne(0,w);s=new ne(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class oe extends Qt{value="";static create(t,e){const i=new oe;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 re extends oe{animation=new ae;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){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class le extends Qt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new oe,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=oe.create(this.color,t.color)),Yt(this,"element",t.element),Yt(this,"draw",t.draw),Yt(this,"image",t.image),Yt(this,"position",t.position),Yt(this,"repeat",t.repeat),Yt(this,"size",t.size),Yt(this,"opacity",t.opacity)}}class ce extends Qt{enable=!0;zIndex=0;doLoad(t){Yt(this,"enable",t.enable),Yt(this,"zIndex",t.zIndex)}}class de extends Qt{delay=.5;enable=!0;doLoad(t){Yt(this,"delay",t.delay),Yt(this,"enable",t.enable)}}class he extends Qt{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]=ft(this.options[t]??{},i))}Yt(this,"close",t.close),Yt(this,"type",t.type)}}class ue extends Qt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=re.create(this.color,t.color)),Yt(this,"enable",t.enable),Zt(this,"opacity",t.opacity)}}class pe extends Qt{offset=0;value=90;doLoad(t){Zt(this,"offset",t.offset),Zt(this,"value",t.value)}}class ge extends Qt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){Yt(this,"x",t.x),Yt(this,"y",t.y),Yt(this,"mode",t.mode),Yt(this,"radius",t.radius)}}class fe extends Qt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Zt(this,"acceleration",t.acceleration),Yt(this,"enable",t.enable),Yt(this,"inverse",t.inverse),Zt(this,"maxSpeed",t.maxSpeed)}}class ye extends Qt{value=0;doLoad(t){E(t.value)||(this.value=H(t.value))}}class me extends ye{animation=new ie;doLoad(t){super.doLoad(t),Jt(this,"animation",t.animation)}}class ve extends me{animation=new se}class we extends Qt{clamp=!0;delay=new ye;enable=!1;generator;options={};doLoad(t){Yt(this,"clamp",t.clamp),this.delay.load(t.delay),Yt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=ft(this.options,t.options))}}class be extends Qt{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 Pe extends Qt{acceleration=0;enable=!1;position;doLoad(t){Zt(this,"acceleration",t.acceleration),Yt(this,"enable",t.enable),t.position&&(this.position=ft({},t.position))}}class xe extends Qt{angle=new pe;center=new ge;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new fe;outModes=new be;path=new we;random=!1;size=!1;speed=2;spin=new Pe;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(O(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Zt(this,"decay",t.decay),Yt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=O(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Zt(this,"drift",t.drift),Yt(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),Yt(this,"random",t.random),Yt(this,"size",t.size),Zt(this,"speed",t.speed),this.spin.load(t.spin),Yt(this,"straight",t.straight),Yt(this,"vibrate",t.vibrate),Yt(this,"warp",t.warp)}}class Me extends Qt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=re.create(this.color,t.color)),Zt(this,"width",t.width),Zt(this,"opacity",t.opacity)}}class ze extends Qt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=re.create(this.color,t.color)),te(this,"fill",t.fill,()=>new ue),te(this,"stroke",t.stroke,()=>new Me)}}class Ce extends ye{value=1}class Se extends Qt{horizontal=new Ce;vertical=new Ce;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class ke extends Qt{enable=!1;height=1080;width=1920;doLoad(t){Yt(this,"enable",t.enable),Yt(this,"width",t.width),Yt(this,"height",t.height)}}class De extends Qt{mode=t.LimitMode.delete;value=0;doLoad(t){Yt(this,"mode",t.mode),Yt(this,"value",t.value)}}class Oe extends Qt{density=new ke;limit=new De;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Yt(this,"value",t.value)}}class Ie extends Qt{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]=ft(this.options[t]??{},i))}Yt(this,"close",t.close),Yt(this,"type",t.type)}}class Te extends ye{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Yt(this,"opacityRate",t.opacityRate),Yt(this,"sizeRate",t.sizeRate),Yt(this,"velocityRate",t.velocityRate)}}class Ee extends Qt{bounce=new Se;effect=new he;groups={};move=new xe;number=new Oe;paint;palette;reduceDuplicates=!1;shape=new Ie;zIndex=new Te;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new ze,this.paint.color=new re,this.paint.color.value="#fff",this.paint.fill=new ue,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#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]=ft(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 ze;return e.load(t),e}):T(this.paint)?(this.paint=new ze,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#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 Re(t,e,...i){const s=new Ee(t,e);return Xt(s,...i),s}class _e extends Qt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new le,this.fullScreen=new ce,this.particles=Re(this.#p,this.#u),this.resize=new de}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,yt(this.preset,t=>{this.#f(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#g(this.palette)),Yt(this,"autoPlay",t.autoPlay),Yt(this,"clear",t.clear),Yt(this,"key",t.key),Yt(this,"name",t.name),Zt(this,"delay",t.delay),Yt(this,"detectRetina",t.detectRetina),Zt(this,"duration",t.duration),Yt(this,"fpsLimit",t.fpsLimit),Yt(this,"hdr",t.hdr),Yt(this,"pauseOnBlur",t.pauseOnBlur),Yt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Yt(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=ft(this.style,t.style),Yt(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 Le=new Map;function Ae(t,e){let i=Le.get(t);return i||(i=e(),Le.size>2e3&&Le.clear(),Le.set(t,i)),i}function Fe(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Be(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return Ve(t,n.value,i,s);if(T(n.value)){const e=ht(n.value,i,s);if(!e)return;return Be(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Ve(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return n.value===d?Ne():je(t,n.value);if(T(n.value)){const e=ht(n.value,i,s);if(!e)return;return Ve(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ue(t,e,i,s=!0){const n=Be(t,e,i,s);return n?$e(n):void 0}function $e(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 je(t,e){return Fe(t,e)}function qe(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function Ge(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(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*qe(c,l,n+d)),u=Math.min(y,y*qe(c,l,n)),p=Math.min(y,y*qe(c,l,n-d));return{r:Math.round(h),g:Math.round(u),b:Math.round(p)}}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=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*qe(c,l,n+d)),g:Math.min(y,y*qe(c,l,n)),b:Math.min(y,y*qe(c,l,n-d))}}function He(t){const e=Ge(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Ne(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 Ke(t,e,i){const s=e?4:2,n=i??1;return Ae(`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 Qe(t,e,i){const s=e?4:2,n=i??1;return Ae(`hsl-${t.h.toFixed(s)}-${t.s.toFixed(s)}-${t.l.toFixed(s)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?Ke(We(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${n.toString()})`)}function Xe(t,e,i,s){let n=t,a=e;return"r"in n||(n=Ge(t)),"r"in a||(a=Ge(e)),{b:$(n.b,a.b,i,s),g:$(n.g,a.g,i,s),r:$(n.r,a.r,i,s)}}function Ye(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Ze(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&&(Je(s.h,e.h,i),Je(s.s,e.s,i),Je(s.l,e.l,i)),s}function Je(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 ti(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 ei(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;ti(s,!1,e,i),ti(n,!0,e,i),ti(a,!0,e,i)}function ii(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const si=new Rt;class ni{enable=!1;mode="destination-out";load(t){E(t)||(Yt(this,"mode",t.mode),Yt(this,"enable",t.enable))}}class ai{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Yn});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 ni),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new ni,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function oi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new ai)})}class ri{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 li(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new ri))})}var ci;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(ci||(ci={}));const di=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,hi=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class ui{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(di,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=hi.exec(e);return i?{a:i[ci.a]?Number.parseInt(i[ci.a],16)/255:1,b:Number.parseInt(i[ci.b]??"0",16),g:Number.parseInt(i[ci.g]??"0",16),r:Number.parseInt(i[ci.r]??"0",16)}:void 0}}async function pi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new ui)})}var gi;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(gi||(gi={}));const fi=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class yi{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Ge(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Ge({h:q(e.h),l:q(e.l),s:q(e.s)})}parseString(t){if(!this.accepts(t))return;const e=fi.exec(t);return e?He({a:e.length>4?nt(e[gi.a]):1,h:Number.parseInt(e[gi.h]??"0",10),l:Number.parseInt(e[gi.l]??"0",10),s:Number.parseInt(e[gi.s]??"0",10)}):void 0}}async function mi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new yi)})}class vi{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Jn});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function wi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,Ct(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new vi(t.pluginManager))})}function bi(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 Pi(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 xi extends se{destroy=t.DestroyType.none;load(t){super.load(t),E(t)||Yt(this,"destroy",t.destroy)}}class Mi extends ve{animation=new xi;value=1;load(t){if(E(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class zi{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=bi(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){ee(t,"opacity",Mi,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&Pi(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function Ci(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new zi(t)))})}class Si{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=gt(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 ki{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 Di{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;ut(e.position,o.canvas.size,l,c,i)||e.destroy()}}}const Oi=S.origin;class Ii{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;Oi.setTo(l),Oi.length=e.moveCenter.radius,Oi.angle=e.velocity.angle+Math.PI,Oi.addTo(e.moveCenter);const{dx:s,dy:n}=N(e.position,Oi);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=gt(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 Ti{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#v(e,t.OutMode.bounce,t=>new Si(t)),this.#v(e,t.OutMode.out,t=>new Ii(t)),this.#v(e,t.OutMode.destroy,t=>new ki(t)),this.#v(e,t.OutMode.none,t=>new Di(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 Ei(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Ti(t)))})}class Ri{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=mt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=re.create(void 0===a?void 0:re.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=q(o.opacity),t.fillAnimation=i.animation;const s=Ue(this.#p,i);s&&(t.fillColor=Ze(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=re.create(void 0===a?void 0:re.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=Ue(this.#p,i)??t.getFillColor();s&&(t.strokeColor=Ze(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)&&(ei(t.fillColor,e,this.#u.hdr),ei(t.strokeColor,e,this.#u.hdr))}}async function _i(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Ri(t.pluginManager,e)))})}var Li;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Li||(Li={}));const Ai=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Fi{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:q(e.r),g:q(e.g),b:q(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Ai.exec(t);return e?{a:e.length>4?nt(e[Li.a]):1,b:parseInt(e[Li.b]??"0",10),g:parseInt(e[Li.g]??"0",10),r:parseInt(e[Li.r]??"0",10)}:void 0}}async function Bi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Fi)})}class Vi extends se{destroy=t.DestroyType.none;load(t){super.load(t),E(t)||Yt(this,"destroy",t.destroy)}}class Ui extends ve{animation=new Vi;value=3;load(t){if(super.load(t),E(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class $i{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/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){ee(t,"size",Ui,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=bi(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&&Pi(t,t.size,!0,t.options.size.animation.destroy,e)}}async function ji(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new $i(t)))})}async function qi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(async t=>{await Promise.all([oi(t),pi(t),mi(t),Bi(t),wi(t),li(t),_i(t),Ci(t),Ei(t),ji(t)])})}var Gi;!function(t){t.move="move",t.line="line",t.bezier="bezier",t.quadratic="quadratic",t.arc="arc",t.ellipse="ellipse"}(Gi||(Gi={}));function Wi(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 Gi.move:t.moveTo(i.x*e,i.y*e);break;case Gi.line:t.lineTo(i.x*e,i.y*e);break;case Gi.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 Gi.quadratic:if(!n||!a)continue;t.quadraticCurveTo(n.x*e,n.y*e,a.x*e,a.y*e);break;case Gi.arc:if(!n||!a)continue;t.arc(i.x*e,i.y*e,n.x*e,a.x,a.y);break;case Gi.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 Gi.line:if(!a)break;t.lineTo(a.x*-e,a.y*e);break;case Gi.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 Gi.quadratic:if(!l||!c)break;t.quadraticCurveTo(-l.x*e,l.y*e,-c.x*e,c.y*e);case Gi.arc:case Gi.ellipse:}}}var Hi;!function(t){t.hearts="hearts",t.diamonds="diamonds",t.clubs="clubs",t.spades="spades"}(Hi||(Hi={}));const Ni=o,Ki=.25,Qi=-Ni,Xi=-.25,Yi=.0625,Zi=.375,Ji={half:!0,segments:[{type:Gi.bezier,values:[{x:0,y:Qi},{x:0,y:Qi},{x:Ki,y:Qi},{x:Ki,y:Xi}]},{type:Gi.bezier,values:[{x:Ki,y:Xi},{x:Ki,y:Xi},{x:Ni,y:Xi},{x:Ni,y:0}]},{type:Gi.bezier,values:[{x:Ni,y:0},{x:Ni,y:0},{x:Ni,y:Ki},{x:Ki,y:Ki}]},{type:Gi.bezier,values:[{x:Ki,y:Ki},{x:Ki,y:Ki},{x:Yi,y:Ki},{x:Yi,y:Yi}]},{type:Gi.bezier,values:[{x:Yi,y:Yi},{x:Yi,y:Ki},{x:Ki,y:Ni},{x:Ki,y:Ni}]},{type:Gi.bezier,values:[{x:Ki,y:Ni},{x:Ki,y:Ni},{x:0,y:Ni},{x:0,y:Ni}]}]},ts={half:!0,segments:[{type:Gi.bezier,values:[{x:0,y:Ni},{x:0,y:Ni},{x:Zi,y:0},{x:Zi,y:0}]},{type:Gi.bezier,values:[{x:Zi,y:0},{x:Zi,y:0},{x:0,y:Qi},{x:0,y:Qi}]}]},es={half:!0,segments:[{type:Gi.bezier,values:[{x:0,y:Ni},{x:0,y:Ni},{x:Ni,y:0},{x:Ni,y:Xi}]},{type:Gi.bezier,values:[{x:Ni,y:Xi},{x:Ni,y:Xi},{x:Ni,y:Qi},{x:Ki,y:Qi}]},{type:Gi.bezier,values:[{x:Ki,y:Qi},{x:Ki,y:Qi},{x:0,y:Qi},{x:0,y:Xi}]}]},is={half:!0,segments:[{type:Gi.bezier,values:[{x:0,y:Qi},{x:0,y:Qi},{x:Ni,y:Xi},{x:Ni,y:0}]},{type:Gi.bezier,values:[{x:Ni,y:0},{x:Ni,y:0},{x:Ni,y:Ki},{x:Ki,y:Ki}]},{type:Gi.bezier,values:[{x:Ki,y:Ki},{x:Ki,y:Ki},{x:Yi,y:Ki},{x:Yi,y:Yi}]},{type:Gi.bezier,values:[{x:Yi,y:Yi},{x:Yi,y:Ki},{x:Ki,y:Ni},{x:Ki,y:Ni}]},{type:Gi.bezier,values:[{x:Ki,y:Ni},{x:Ki,y:Ni},{x:0,y:Ni},{x:0,y:Ni}]}]},ss={[Hi.hearts]:es,[Hi.diamonds]:ts,[Hi.clubs]:Ji,[Hi.spades]:is};class ns{draw(t){const{context:e,radius:i}=t;Wi(e,i,ss.clubs)}}async function as(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["club","clubs"],()=>Promise.resolve(new ns))})}class os{draw(t){const{context:e,radius:i}=t;Wi(e,i,ss.diamonds)}}async function rs(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["diamond","diamonds"],()=>Promise.resolve(new os))})}let ls=class{draw(t){const{context:e,radius:i}=t;Wi(e,i,ss.hearts)}};async function cs(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["heart","hearts"],()=>Promise.resolve(new ls))})}class ds{draw(t){const{context:e,radius:i}=t;Wi(e,i,ss.spades)}}async function hs(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["spade","spades"],()=>Promise.resolve(new ds))})}async function us(t){t.checkVersion("4.3.1"),await Promise.all([as(t),rs(t),cs(t),hs(t)])}class ps{count;delay;duration;wait=!1;load(t){E(t)||(Yt(this,"count",t.count),Zt(this,"delay",t.delay),Zt(this,"duration",t.duration),Yt(this,"wait",t.wait))}}class gs{delay=.1;quantity=1;load(t){E(t)||(Zt(this,"quantity",t.quantity),Zt(this,"delay",t.delay))}}class fs{color=!1;opacity=!1;load(t){E(t)||(Yt(this,"color",t.color),Yt(this,"opacity",t.opacity))}}class ys{options={};replace=new fs;type="square";load(t){E(t)||(void 0!==t.options&&(this.options=ft({},t.options??{})),this.replace.load(t.replace),Yt(this,"type",t.type))}}class ms{height=0;mode=t.PixelMode.percent;width=0;load(t){E(t)||(Yt(this,"mode",t.mode),Yt(this,"height",t.height),Yt(this,"width",t.width))}}class vs{fill;stroke;load(t){E(t)||(t.fill&&(this.fill??=new ue,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new Me,this.stroke.load(t.stroke)))}}class ws{autoPlay=!0;direction;domId;fill=!0;life=new ps;name;particles;position;rate=new gs;shape=new ys;size;spawn=new vs;spawnFillColor;spawnStrokeColor;startCount=0;load(t){E(t)||(Yt(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new ms,this.size.load(t.size)),Yt(this,"direction",t.direction),Yt(this,"domId",t.domId),Yt(this,"fill",t.fill),this.life.load(t.life),Yt(this,"name",t.name),this.particles=yt(t.particles,t=>ft({},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 re,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new re,this.spawnStrokeColor.load(t.spawnStrokeColor)),Yt(this,"startCount",t.startCount))}}class bs{id="emitters";#b;constructor(t){this.#b=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return ta});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 ws;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return T(e)&&!!e.length||void 0!==e}}const Ps=new WeakMap;var xs;async function Ms(t){t.checkVersion("4.3.1"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=Ps.get(e);return i||(i=Promise.resolve().then(function(){return sa}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw Ps.delete(e),t}),Ps.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return ia}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new bs(e))})}!function(t){t.emitter="emitter"}(xs||(xs={}));const zs=["emoji"];async function Cs(t,e){try{await rt().fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}const Ss='"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';class ks{#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(!zs.some(t=>dt(t,e.type)))return;const i=[Cs(Ss)];yt(zs.map(t=>e.options[t])[0],t=>{t.font&&i.push(Cs(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=mt(i.value,e.randomIndexData);if(!s)return;const n="string"==typeof s?{font:i.font??Ss,padding:i.padding??0,value:s}:{font:Ss,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 Ds(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(zs,()=>Promise.resolve(new ks))})}class Os{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 Is(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["heart"],()=>Promise.resolve(new Os))})}const Ts=["image","images"],Es=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function Rs(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,Tt().error(`Error loading image: ${t.source}`),e()}),i.src=t.source})}async function _s(t){if("svg"!==t.type)return void await Rs(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(Tt().error("Image not found"),t.error=!0),t.loading=!1}function Ls(t,e,i,s,n=!1){const a=function(t,e,i,s=!1){const{svgData:n}=t;if(!n)return"";const a=Qe(e,s,i);if(n.includes("fill"))return n.replaceAll(Es,()=>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 Rs(i),o.loaded=!0,o.element=i.element,e(o)})()}),n.src=s})}class As{#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||!Ts.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 Ls(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 Fs{height;name;replaceColor;src="";width;load(t){E(t)||(Yt(this,"height",t.height),Yt(this,"name",t.name),Yt(this,"replaceColor",t.replaceColor),Yt(this,"src",t.src),Yt(this,"width",t.width))}}class Bs{id="image-preloader";#n;constructor(t){this.#n=t}async getPlugin(t){const{ImagePreloaderInstance:e}=await Promise.resolve().then(function(){return na});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 Fs;e.load(t),s.push(e)}}}needsPlugin(){return!0}}async function Vs(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{!function(t){t.getImages??=e=>{t.images??=new Map;let i=t.images.get(e);return i||(i=[],t.images.set(e,i)),i},t.loadImage??=async(e,i)=>{if(!t.getImages)throw new Error("No images collection found");if(!i.name&&!i.src)throw new Error("No image source provided");t.images??=new Map;const 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?_s:Rs,await a(n)}catch{throw new Error(`${i.name??i.src} not found`)}}}(t),t.pluginManager.addPlugin(new Bs(t)),t.pluginManager.addShape(Ts,e=>Promise.resolve(new As(t,e)))})}class Us extends ye{sync=!1;load(t){E(t)||(super.load(t),Yt(this,"sync",t.sync))}}class $s extends ye{sync=!1;load(t){E(t)||(super.load(t),Yt(this,"sync",t.sync))}}class js{count=0;delay=new Us;duration=new $s;load(t){E(t)||(Yt(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class qs{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const 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){ee(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=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 Gs(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new qs(t)))})}class Ws{factor=4;value=!0;load(t){E(t)||(Yt(this,"factor",t.factor),Yt(this,"value",t.value))}}class Hs{disable=!0;reduce=new Ws;load(t){E(t)||(Yt(this,"disable",t.disable),this.reduce.load(t.reduce))}}class Ns{id="motion";async getPlugin(t){const{MotionPluginInstance:e}=await Promise.resolve().then(function(){return aa});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.motion;s?.load||(e.motion=s=new Hs),s.load(i?.motion)}needsPlugin(){return!0}}async function Ks(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Ns)})}const Qs=new Map;function Xs(t,e){const{context:i,radius:s}=t,n=function(t){const e=Qs.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 Qs.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 Ys{draw(t){const{particle:e,radius:i}=t;Xs(t,this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round(q(e?.sides??5))}}class Zs extends Ys{getSidesData(t,e){const{sides:i}=t;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class Js extends Ys{getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:1,numerator:3},length:2.66*e/1}}}async function tn(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["polygon"],()=>Promise.resolve(new Zs))})}async function en(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["triangle"],()=>Promise.resolve(new Js))})}async function sn(t){t.checkVersion("4.3.1"),await Promise.all([tn(t),en(t)])}var nn;!function(t){t.both="both",t.horizontal="horizontal",t.vertical="vertical"}(nn||(nn={}));class an{enable=!1;value=0;load(t){E(t)||(Yt(this,"enable",t.enable),Zt(this,"value",t.value))}}class on{backColor;darken=new an;enable=!1;enlighten=new an;mode=nn.vertical;speed=25;load(t){E(t)||(void 0!==t.backColor&&(this.backColor=oe.create(this.backColor,t.backColor)),this.darken.load(t.darken),Yt(this,"enable",t.enable),this.enlighten.load(t.enlighten),Yt(this,"mode",t.mode),Zt(this,"speed",t.speed))}}class rn{#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===nn.horizontal||s.mode===nn.both,vertical:s.mode===nn.vertical||s.mode===nn.both,angle:A()*u,speed:q(s.speed)/360},s.backColor)i.backColor=Ue(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){ee(t,"roll",on,...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 ln(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("roll",()=>Promise.resolve(new rn(t.pluginManager)))})}class cn{decay=0;enable=!1;speed=0;sync=!1;load(t){E(t)||(Yt(this,"enable",t.enable),Zt(this,"speed",t.speed),Zt(this,"decay",t.decay),Yt(this,"sync",t.sync))}}class dn extends ye{animation=new cn;direction=t.RotateDirection.clockwise;path=!1;load(t){E(t)||(super.load(t),Yt(this,"direction",t.direction),this.animation.load(t.animation),Yt(this,"path",t.path))}}class hn{#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){ee(t,"rotate",dn,...e)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(Pi(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function un(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new hn(t)))})}class pn{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 gn(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new pn))})}const fn=0,yn=0;class mn{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.sides,a=i.starInset??2;e.moveTo(fn,yn-s);for(let t=0;t<n;t++)e.rotate(Math.PI/n),e.lineTo(fn,yn-s*a),e.rotate(Math.PI/n),e.lineTo(fn,yn-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 vn(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["star"],()=>Promise.resolve(new mn))})}var wn;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(wn||(wn={}));class bn{decay=0;enable=!1;speed=0;sync=!1;load(t){E(t)||(Yt(this,"enable",t.enable),Zt(this,"speed",t.speed),Zt(this,"decay",t.decay),Yt(this,"sync",t.sync))}}class Pn extends ye{animation=new bn;direction=wn.clockwise;enable=!1;load(t){super.load(t),E(t)||(this.animation.load(t.animation),Yt(this,"direction",t.direction),Yt(this,"enable",t.enable))}}class xn{#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===wn.random){s=Math.floor(2*A())>0?wn.counterClockwise:wn.clockwise}switch(s){case wn.counterClockwise:case"counterClockwise":e.tilt.status=t.AnimationStatus.decreasing;break;case wn.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){ee(t,"tilt",Pn,...e)}update(e,i){this.isEnabled(e)&&e.tilt&&Pi(e,e.tilt,!1,t.DestroyType.none,i)}}async function Mn(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("tilt",t=>Promise.resolve(new xn(t)))})}class zn{angle=50;move=10;load(t){E(t)||(Zt(this,"angle",t.angle),Zt(this,"move",t.move))}}class Cn{distance=5;enable=!1;speed=new zn;load(t){if(!E(t)&&(Zt(this,"distance",t.distance),Yt(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 Sn{#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){ee(t,"wobble",Cn,...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 kn(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("wobble",t=>Promise.resolve(new Sn(t)))})}class Dn{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;Yt(this,"angle",t.angle);const e=t.count??t.particleCount;void 0!==e&&(this.count=e),Yt(this,"spread",t.spread),Yt(this,"startVelocity",t.startVelocity),Yt(this,"decay",t.decay),Yt(this,"flat",t.flat),Yt(this,"gravity",t.gravity),Yt(this,"drift",t.drift),Yt(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]=ft(this.shapeOptions[t]??{},e))}void 0!==t.shapes&&(T(t.shapes)?this.shapes=[...t.shapes]:this.shapes=t.shapes),Yt(this,"scalar",t.scalar),Yt(this,"zIndex",t.zIndex),Yt(this,"disableForReducedMotion",t.disableForReducedMotion)}}const On=new Map;async function In(t,e){const i=new Dn;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=On.get(e.id);a instanceof Promise&&(await a,a=On.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 On.set(e.id,a),a})();return On.set(e.id,r),r}let Tn=null;async function En(t){return Tn||(Tn=async function(t){t.checkVersion("4.3.1"),await t.pluginManager.register(async t=>{await Promise.all([qi(t),Ks(t),Ms(t),us(t),Is(t),Vs(t),sn(t),gn(t),vn(t),Ds(t),un(t),Gs(t),ln(t),Mn(t),kn(t)])})}(t),Tn)}async function Rn(t,e){let i,s;return await En(si),D(t)?(s=t,i=e??{}):(s="confetti",i=t),In(si,{id:s,options:i})}Rn.create=async(t,e={})=>{await En(si);const i=t?.getAttribute("id")??"confetti";return t?.setAttribute("id",i),await In(si,{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),In(si,{id:o,canvas:t??void 0,options:a})}},Rn.init=async()=>{await En(si)},Rn.version="4.3.1",globalThis.confetti=Rn;const _n=globalThis;_n.confetti=Rn,_n.tsParticles=si;function Ln(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class An{#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?Qe(a,r.hdr,d*h):void 0,y=o?Qe(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)Ln(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=Ue(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ue(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),Tt().warning(e))}}const Fn=new WeakMap;function Bn(t,e,i=!1){if(!e)return;const s=t.style,n=new Set;for(let t=0;t<s.length;t++){const e=s.item(t);e&&n.add(e)}for(let t=0;t<e.length;t++){const i=e.item(t);i&&n.add(i)}for(const t of n){const n=e.getPropertyValue(t);n?s.setProperty(t,n,i?"important":""):s.removeProperty(t)}}class Vn{domElement;render;renderCanvas;size;zoom=1;#u;#Z;#J;#tt;#p;#et;#it;#st;#nt;constructor(t,e){this.#p=t,this.#u=e,this.render=new An(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=ct(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=Be(this.#p,e.color);s.backgroundColor=n?Ke(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=Fn.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 Fn.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#tt=wt(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&<("(color-gamut: p3)")?.matches&<("(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&&Bn(t,e,!0)}#rt(t){this.#J&&t(this.#J)}#ut(){const t=this.domElement;t&&Bn(t,xt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Un{#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&&(rt().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),Mt(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 Mt(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 $n(t){if(!dt(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 qn(t,e,i,s){const n=Re(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=mt(n.effect.type,t.id,a),t.shape=mt(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=mt(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=mt(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 ft({close:e.close},mt(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 ft({close:e.close},mt(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 Gn{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(Ye(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(Ye(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=qn(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=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.#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){$n({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){$n({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?ii(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={...vt(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 Wn{#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 Nt(t,e,i)).reset(t,e,i)}#Nt(t,e,i,s){return(this.#$t[this.#jt++]??=new Kt(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 Nt){const e=t.radius,{x:i,y:s}=t.position;return{minX:i-e,maxX:i+e,minY:s-e,maxY:s+e}}if(t instanceof Kt){const{x:e,y:i}=t.position,{width:s,height:n}=t.size;return{minX:e,maxX:e+s,minY:i,maxY:i+n}}return null}#Ht(){this.#Vt=0,this.#jt=0}}class Hn{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 Wn(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 Gn(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){Tt().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 Wn(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=Re(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 Nn{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 Kn(t){return!t.destroyed}function Qn(t,e,...i){const s=new _e(t,e);return Xt(s,...i),s}var Xn=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 Nn(this),this.canvas=new Vn(this.#p,this),this.particles=new Hn(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Te=Qn(this.#p,this),this.actualOptions=Qn(this.#p,this),this.#Ce=new Un(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#Ee&&!this.pageHidden&&Kn(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(Kn(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(!Kn(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}Tt().error(`Export plugin with type ${t} not found`)}async init(){if(!Kn(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=Qn(this.#p,this,this.#ke,this.sourceOptions),this.actualOptions=Qn(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(Kn(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(!Kn(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(Kn(this))return this.stop(),this.start()}async reset(t){if(Kn(this))return this.#ke=t,this.#_e=t,this.#Te=Qn(this.#p,this,this.#ke,this.sourceOptions),this.actualOptions=Qn(this.#p,this,this.#Te),this.refresh()}async start(){Kn(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(Kn(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){Tt().error("error in animation loop",t)}}}});var Yn=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 Zn(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 Jn=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):Zn(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 ta=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 ea=new Map;var ia=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||ea.set(t,e)}getShapeGenerator(t){return ea.get(t)}getSupportedShapeGenerators(){return ea.keys()}}});var sa=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 ws;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return la}),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 na=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 aa=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=lt("(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 oa(t,e,i,s){(t.paint??=new ze).fill={color:re.create(void 0,{value:e}),enable:s,opacity:i}}function ra(t,e,i,s){(t.paint??=new ze).stroke={color:re.create(void 0,{value:e}),opacity:i,width:s}}var la=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 ws?this.options=n:(this.options=new ws,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=ft({},this.options.particles);if(l.move??={},l.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=Ue(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=Ue(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=rt().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&&ut(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=rt().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=rt().getElementById(this.options.domId);if(i){const s=i.getBoundingClientRect();return{width:s.width*e.retina.pixelRatio,height:s.height*e.retina.pixelRatio,mode:t.PixelMode.precise}}}return this.options.size??(()=>{const e=new ms;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}#si(){this.#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=mt(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?ft({},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)),oa(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)),ra(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&&oa(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=re,t.AnimationOptions=ie,t.AnimationValueWithRandom=me,t.Background=le,t.BaseRange=Ht,t.Circle=Nt,t.ColorAnimation=ne,t.Fill=ue,t.FullScreen=ce,t.HslAnimation=ae,t.Move=xe,t.MoveAngle=pe,t.MoveCenter=ge,t.MoveGravity=fe,t.MovePath=we,t.OptionLoader=Qt,t.Options=_e,t.OptionsColor=oe,t.OutModes=be,t.Paint=ze,t.ParticlesBounce=Se,t.ParticlesBounceFactor=Ce,t.ParticlesDensity=ke,t.ParticlesNumber=Oe,t.ParticlesNumberLimit=De,t.ParticlesOptions=Ee,t.RangedAnimationOptions=se,t.RangedAnimationValueWithRandom=ve,t.Rectangle=Kt,t.ResizeEvent=de,t.Shape=Ie,t.Spin=Pe,t.Stroke=Me,t.ValueWithRandom=ye,t.Vector=S,t.Vector3d=C,t.ZIndex=Te,t.alterHsl=ii,t.animate=B,t.areBoundsInside=pt,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=gt,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=wt,t.collisionVelocity=tt,t.colorMix=Xe,t.colorToRgb=Ve,t.confetti=Rn,t.countOffset=1,t.decayOffset=1,t.deepExtend=ft,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=N,t.getFullScreenStyle=xt,t.getHslAnimationFromHsl=Ze,t.getHslFromAnimation=Ye,t.getItemMapFromInitializer=Ct,t.getItemsFromInitializer=zt,t.getLinkColor=function(t,e,i){if(i===d)return Ne();if(i!==h)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return Xe(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return Ge(t)}}},t.getLinkRandomColor=function(t,e,i,s){const n=D(e)?e:e.value;return n===d?s?Be(t,{value:n}):i?d:h:n===h?h:Be(t,{value:n})},t.getLogger=Tt,t.getParticleBaseVelocity=J,t.getParticleDirectionAngle=Z,t.getPosition=vt,t.getRandom=A,t.getRandomFn=function(){return _},t.getRandomInRange=F,t.getRandomRgbColor=Ne,t.getRangeMax=W,t.getRangeMin=G,t.getRangeValue=q,t.getStyleFromHsl=Qe,t.getStyleFromRgb=Ke,t.hMax=m,t.hMin=0,t.hPhase=60,t.half=o,t.hslToRgb=Ge,t.hslToRgbFloat=We,t.hslaToRgba=He,t.identity=1,t.inverseFactorNumerator=1,t.isArray=T,t.isBoolean=k,t.isFunction=function(t){return"function"==typeof t},t.isInArray=dt,t.isNull=E,t.isNumber=O,t.isObject=I,t.isPointInside=ut,t.isString=D,t.itemFromArray=ht,t.itemFromSingleOrMultiple=mt,t.lFactor=1,t.lMax=w,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){void 0!==i&&(t[e]=ft(t[e]??{},i))},t.loadLazyProperty=te,t.loadMinIndex=0,t.loadNestedProperty=Jt,t.loadOptionProperty=ee,t.loadOptions=Xt,t.loadParticlesOptions=Re,t.loadProperty=Yt,t.loadRandomFactor=1e4,t.loadRangeProperty=Zt,t.manageListener=Mt,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=Ue,t.rangeColorToRgb=Be,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=y,t.rgbToHsl=$e,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=rt,t.safeMatchMedia=lt,t.safeMutationObserver=ct,t.setAnimationFunctions=function(t,e){L.nextFrame=t,L.cancel=e},t.setLogger=function(t){t.debug&&(It.debug=Ot(t.debug)),t.error&&(It.error=Ot(t.error)),t.info&&(It.info=Ot(t.info)),t.log&&(It.log=Ot(t.log)),t.trace&&(It.trace=Ot(t.trace)),t.verbose&&(It.verbose=Ot(t.verbose)),t.warning&&(It.warning=Ot(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 Fe(t,e)?.a},t.stringToRgb=je,t.threeQuarter=P,t.triple=3,t.tryCountIncrement=1,t.tsParticles=si,t.updateColor=ei,t.updateColorValue=ti,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",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;
|