@tsparticles/ribbons 4.3.2 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/ribbons.js +3 -3
- package/browser/ribbons.lazy.js +3 -3
- package/cjs/ribbons.js +3 -3
- package/cjs/ribbons.lazy.js +3 -3
- package/esm/ribbons.js +3 -3
- package/esm/ribbons.lazy.js +3 -3
- package/package.json +8 -8
- package/report.html +1 -1
- package/tsparticles.ribbons.bundle.js +319 -105
- package/tsparticles.ribbons.bundle.min.js +1 -1
- package/tsparticles.ribbons.js +4 -4
- package/tsparticles.ribbons.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.ribbons=t.__tsParticlesInternals.bundles.ribbons||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",o=100,a=.5,r=1e3,l={x:0,y:0,z:0},c={a:1,b:0,c:0,d:1},h="random",d="mid",u=2*Math.PI,p="true",f="false",g="canvas",y=255,m=360,v=100,b=100,w=.25,P=.75,M=400;var x;function z(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(x=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",x.bottomLeft="bottom-left",x.bottomRight="bottom-right",x.left="left",x.none="none",x.right="right",x.top="top",x.topLeft="top-left",x.topRight="top-right",x.outside="outside",x.inside="inside";class S{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 S.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 S.create(t.x,t.y,z(t))}static create(t,e,i){return"number"==typeof t?new S(t,e??l.y,i??l.z):new S(t.x,t.y,z(t))}add(t){return S.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 S.clone(this)}div(t){return S.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return S.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 S.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 S.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 C extends S{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return C.create(l.x,l.y)}static clone(t){return C.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new C(t,e??l.y):new C(t.x,t.y)}}function O(t){return"boolean"==typeof t}function D(t){return"string"==typeof t}function k(t){return"number"==typeof t}function I(t){return"object"==typeof t&&null!==t}function T(t){return Array.isArray(t)}function _(t){return null==t}const E=Math.PI/180;let R=Math.random;const L={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function F(){return U(R(),0,1-Number.EPSILON)}function A(t,e){return F()*(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 N(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function H(t){const e=$(t);let i=W(t);return e===i&&(i=0),A(i,e)}function G(t){return k(t)?t:H(t)}function W(t){return k(t)?t:t.min}function $(t){return k(t)?t:t.max}function q(t,e){if(t===e||void 0===e&&k(t))return t;const i=W(t),s=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:q(i,s)}function j(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function X(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function Y(t,e){return Math.sqrt(X(t,e))}function Q(t,e,i){return X(t,e)<=i*i}function Z(t){return t*E}function K(e,i,s){if(k(e))return Z(e);switch(e){case t.MoveDirection.top:return-Math.PI*a;case t.MoveDirection.topRight:return-Math.PI*w;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*w;case t.MoveDirection.bottom:return Math.PI*a;case t.MoveDirection.bottomLeft:return Math.PI*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 F()*u}}function J(t){const e=C.origin;return e.length=1,e.angle=t,e}function tt(t,e,i,s){return C.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function et(t){return{x:(t.position?.x??F()*o)*t.size.width/o,y:(t.position?.y??F()*o)*t.size.height/o}}function it(t){const e={x:void 0!==t.position?.x?G(t.position.x):void 0,y:void 0!==t.position?.y?G(t.position.y):void 0};return et({size:t.size,position:e})}function st(t){const{position:e,size:i}=t;return{x:e?.x??F()*i.width,y:e?.y??F()*i.height}}function nt(t){return t?t.endsWith("%")?parseFloat(t)/o:parseFloat(t):1}var ot,at;t.OutModeDirection=void 0,(ot=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",ot.left="left",ot.right="right",ot.top="top",t.PixelMode=void 0,(at=t.PixelMode||(t.PixelMode={})).precise="precise",at.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 ht(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function dt(t,e){return t===e||T(e)&&e.includes(t)}function ut(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(F()*t.length)]}function pt(t,e,i,s,n){return ft(gt(t,s??0),e,i,n)}function ft(e,i,s,n){let o=!0;return n&&n!==t.OutModeDirection.bottom||(o=e.top<i.height+s.x),!o||n&&n!==t.OutModeDirection.left||(o=e.right>s.x),!o||n&&n!==t.OutModeDirection.right||(o=e.left<i.width+s.y),!o||n&&n!==t.OutModeDirection.top||(o=e.bottom>s.y),o}function gt(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(_(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 bt(e,i){return function(e,i){if(e.mode!==t.PixelMode.percent){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/o*i.width,y:e.y/o*i.height}:{width:e.width/o*i.width,height:e.height/o*i.height}}(e,i)}function wt(t){const e=lt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||_(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const o=t.getPropertyPriority?.(s);o?e.setProperty(s,n,o):e.setProperty(s,n)}return e}let Pt,Mt;function xt(t){if(Pt!==t||!Mt){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)}Mt=e}return Mt}function zt(t,e,i,s,n){if(s){let s={passive:!0};O(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function St(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 Ot{#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 kt{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#o=new Set;#a=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#s.set(i,e),this.#n.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return 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 St(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#a&&!this.#r){this.#r=!0,this.#o=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#o,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#a=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#a)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#o,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const 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 _t(){return Tt}const Et="100%";class Rt{pluginManager=new kt(this);#h=[];#d=new Ot;#a=!1;get items(){return this.#h}get version(){return"4.3.2"}addEventListener(t,e){this.#d.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.#d.dispatchEvent(t,e)}async init(){this.#a||(await this.pluginManager.init(),this.#a=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return sn}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*F()).toString()}`,{index:o,url:a}=t,r=a?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():(_t().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:a,index:o}):t.options,l=vt(r,o),{items:c}=this,h=c.findIndex(t=>t.id.description===n),d=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,d)}else c.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=lt();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,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(g).item(0);n?(s=n,s.dataset[e]=f):(s=i.createElement(g),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=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 d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}var Lt,Ft,At,Bt,Vt,Ut,Nt,Ht,Gt,Wt,$t,qt;!function(t){t.circle="circle",t.rectangle="rectangle"}(Lt||(Lt={}));class jt{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 Xt extends jt{radius;constructor(t,e,i){super(t,e,Lt.circle),this.radius=i}contains(t){return Q(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),o=Math.abs(i.y-e.y);if(t instanceof Xt||t.type===Lt.circle){return s+t.radius>Math.hypot(n,o)}if(t instanceof Yt||t.type===Lt.rectangle){const e=t,{width:i,height:a}=e.size;return Math.pow(n-i,2)+Math.pow(o-a,2)<=s**2||n<=s+i&&o<=s+a||n<=i||o<=a}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Yt extends jt{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 Xt)return t.intersects(this);if(!(t instanceof Yt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,o=t.size,a=o.width,r=o.height;return n.x<s.x+e&&n.x+a>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}t.RotateDirection=void 0,(Ft=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Ft.counterClockwise="counter-clockwise",Ft.random="random",t.AnimationMode=void 0,(At=t.AnimationMode||(t.AnimationMode={})).auto="auto",At.increase="increase",At.decrease="decrease",At.random="random",t.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,(Nt=t.DestroyType||(t.DestroyType={})).none="none",Nt.max="max",Nt.min="min",t.GradientType=void 0,(Ht=t.GradientType||(t.GradientType={})).linear="linear",Ht.radial="radial",Ht.random="random",t.ParticleOutType=void 0,(Gt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Gt.inside="inside",Gt.outside="outside",t.StartValueType=void 0,(Wt=t.StartValueType||(t.StartValueType={})).max="max",Wt.min="min",Wt.random="random",t.AnimationStatus=void 0,($t=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",$t.decreasing="decreasing",t.DrawLayer=void 0,(qt=t.DrawLayer||(t.DrawLayer={}))[qt.BackgroundElement=0]="BackgroundElement",qt[qt.BackgroundDraw=1]="BackgroundDraw",qt[qt.BackgroundMask=2]="BackgroundMask",qt[qt.CanvasSetup=3]="CanvasSetup",qt[qt.PluginContent=4]="PluginContent",qt[qt.Particles=5]="Particles",qt[qt.CanvasCleanup=6]="CanvasCleanup",qt[qt.Foreground=7]="Foreground";class Qt{load(t){_(t)||this.doLoad(t)}}function Zt(t,...e){for(const i of e)t.load(i)}function Kt(t,e,i){void 0!==i&&(t[e]=i)}function Jt(t,e,i){void 0!==i&&(t[e]=q(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 o=n[e];for(const t of s)o.load(t?.[e])}class se extends Qt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Jt(this,"count",t.count),Kt(this,"enable",t.enable),Jt(this,"speed",t.speed),Jt(this,"decay",t.decay),Jt(this,"delay",t.delay),Kt(this,"sync",t.sync)}}class ne extends se{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),Kt(this,"mode",t.mode),Kt(this,"startValue",t.startValue)}}class oe extends se{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Kt(this,"max",t.max),Kt(this,"min",t.min),Jt(this,"offset",t.offset)}}class ae extends Qt{h=new oe(0,m);l=new oe(0,b);s=new oe(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class re extends Qt{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){_(t.value)||(this.value=t.value)}}class le extends re{animation=new ae;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 Qt{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)),Kt(this,"element",t.element),Kt(this,"draw",t.draw),Kt(this,"image",t.image),Kt(this,"position",t.position),Kt(this,"repeat",t.repeat),Kt(this,"size",t.size),Kt(this,"opacity",t.opacity)}}class he extends Qt{enable=!0;zIndex=0;doLoad(t){Kt(this,"enable",t.enable),Kt(this,"zIndex",t.zIndex)}}class de extends Qt{delay=.5;enable=!0;doLoad(t){Kt(this,"delay",t.delay),Kt(this,"enable",t.enable)}}class ue 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]=yt(this.options[t]??{},i))}Kt(this,"close",t.close),Kt(this,"type",t.type)}}class pe extends Qt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=le.create(this.color,t.color)),Kt(this,"enable",t.enable),Jt(this,"opacity",t.opacity)}}class fe extends Qt{offset=0;value=90;doLoad(t){Jt(this,"offset",t.offset),Jt(this,"value",t.value)}}class ge extends Qt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){Kt(this,"x",t.x),Kt(this,"y",t.y),Kt(this,"mode",t.mode),Kt(this,"radius",t.radius)}}class ye extends Qt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Jt(this,"acceleration",t.acceleration),Kt(this,"enable",t.enable),Kt(this,"inverse",t.inverse),Jt(this,"maxSpeed",t.maxSpeed)}}class me extends Qt{value=0;doLoad(t){_(t.value)||(this.value=q(t.value))}}class ve extends me{animation=new se;doLoad(t){super.doLoad(t),te(this,"animation",t.animation)}}class be extends ve{animation=new ne}class we extends Qt{clamp=!0;delay=new me;enable=!1;generator;options={};doLoad(t){Kt(this,"clamp",t.clamp),this.delay.load(t.delay),Kt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=yt(this.options,t.options))}}class Pe 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 Me extends Qt{acceleration=0;enable=!1;position;doLoad(t){Jt(this,"acceleration",t.acceleration),Kt(this,"enable",t.enable),t.position&&(this.position=yt({},t.position))}}class xe extends Qt{angle=new fe;center=new ge;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new ye;outModes=new Pe;path=new we;random=!1;size=!1;speed=2;spin=new Me;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(k(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Jt(this,"decay",t.decay),Kt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=k(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Jt(this,"drift",t.drift),Kt(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),Kt(this,"random",t.random),Kt(this,"size",t.size),Jt(this,"speed",t.speed),this.spin.load(t.spin),Kt(this,"straight",t.straight),Kt(this,"vibrate",t.vibrate),Kt(this,"warp",t.warp)}}class ze extends Qt{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 Se extends Qt{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 Ce extends me{value=1}class Oe extends Qt{horizontal=new Ce;vertical=new Ce;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class De extends Qt{enable=!1;height=1080;width=1920;doLoad(t){Kt(this,"enable",t.enable),Kt(this,"width",t.width),Kt(this,"height",t.height)}}class ke extends Qt{mode=t.LimitMode.delete;value=0;doLoad(t){Kt(this,"mode",t.mode),Kt(this,"value",t.value)}}class Ie extends Qt{density=new De;limit=new ke;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Kt(this,"value",t.value)}}class Te 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]=yt(this.options[t]??{},i))}Kt(this,"close",t.close),Kt(this,"type",t.type)}}class _e extends me{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Kt(this,"opacityRate",t.opacityRate),Kt(this,"sizeRate",t.sizeRate),Kt(this,"velocityRate",t.velocityRate)}}class Ee extends Qt{bounce=new Oe;effect=new ue;groups={};move=new xe;number=new Ie;paint;palette;reduceDuplicates=!1;shape=new Te;zIndex=new _e;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Se,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.#f(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=yt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(T(e)?this.paint=mt(e,t=>{const e=new Se;return e.load(t),e}):T(this.paint)?(this.paint=new Se,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f(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 Zt(s,...i),s}class Le 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 ce,this.fullScreen=new he,this.particles=Re(this.#p,this.#u),this.resize=new de}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,mt(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),Kt(this,"autoPlay",t.autoPlay),Kt(this,"clear",t.clear),Kt(this,"key",t.key),Kt(this,"name",t.name),Jt(this,"delay",t.delay),Kt(this,"detectRetina",t.detectRetina),Jt(this,"duration",t.duration),Kt(this,"fpsLimit",t.fpsLimit),Kt(this,"hdr",t.hdr),Kt(this,"pauseOnBlur",t.pauseOnBlur),Kt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Kt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;O(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),Kt(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#f(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#g(t){this.load(this.#p.getPreset(t))}}const Fe=new Map;function Ae(t,e){let i=Fe.get(t);return i||(i=e(),Fe.size>2e3&&Fe.clear(),Fe.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===h?Xe():Ge(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 Ne(t,e,i,s=!0){const n=Ve(t,e,i,s);return n?He(n):void 0}function He(t){const e=t.r/y,i=t.g/y,s=t.b/y,n=Math.max(e,i,s),o=Math.min(e,i,s),r={h:0,l:(n+o)*a,s:0};return n!==o&&(r.s=r.l<a?(n-o)/(n+o):(n-o)/(2-n-o),r.h=e===n?(i-s)/(n-o):i===n?2+(s-e)/(n-o):4+(e-i)/(n-o)),r.l*=b,r.s*=v,r.h*=60,r.h<0&&(r.h+=m),r.h>=m&&(r.h-=m),r}function Ge(t,e){return Be(t,e)}function We(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 $e(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/m,o=i/v,r=s/b;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const l=r<a?r*(1+o):r+o-r*o,c=2*r-l,h=1/3,d=Math.min(y,y*We(c,l,n+h)),u=Math.min(y,y*We(c,l,n)),p=Math.min(y,y*We(c,l,n-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function qe(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/m,o=i/v,r=s/b;if(0===i){const t=r*y;return{r:t,g:t,b:t}}const l=r<a?r*(1+o):r+o-r*o,c=2*r-l,h=1/3;return{r:Math.min(y,y*We(c,l,n+h)),g:Math.min(y,y*We(c,l,n)),b:Math.min(y,y*We(c,l,n-h))}}function je(t){const e=$e(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Xe(t,e){const i=t??0;if(e)return{r:A(i,y),g:A(i,y),b:A(i,y)};const s=()=>Math.floor(A(i,256));return{b:s(),g:s(),r:s()}}function Ye(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?Ye(qe(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${n.toString()})`)}function Ze(t,e,i,s){let n=t,o=e;return"r"in n||(n=$e(t)),"r"in o||(o=$e(e)),{b:N(n.b,o.b,i,s),g:N(n.g,o.g,i,s),r:N(n.r,o.r,i,s)}}function Ke(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:b}};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=G(i.speed)/o*s,e.decay=1-G(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=G(i.count),e.time=0,e.delayTime=G(i.delay)*r,i.sync||(e.velocity*=F(),e.value*=F()),e.initialValue=e.value,e.offset=q(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 o=e.offset?H(e.offset):0,a=((e.velocity??0)*s.factor+3.6*o)*(n?.5075:1),r=e.decay??1,l=e.max,c=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=a,e.value<c&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=a,e.value>l&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=l)),e.velocity&&1!==r&&(e.velocity*=r),e.value=U(e.value,c,l)}function ii(t,e,i){if(!t)return;const{h:s,s:n,l:o}=t;ei(s,!1,e,i),ei(n,!0,e,i),ei(o,!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 Rt;class oi{enable=!1;mode="destination-out";load(t){_(t)||(Kt(this,"mode",t.mode),Kt(this,"enable",t.enable))}}class ai{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return nn});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 oi),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new oi,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 ai)})}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:Z(s.min),max:Z(s.max)}:{min:0,max:Z(s)}}}async function ci(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new li))})}var hi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(hi||(hi={}));const di=/^#?([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(di,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=ui.exec(e);return i?{a:i[hi.a]?Number.parseInt(i[hi.a],16)/255:1,b:Number.parseInt(i[hi.b]??"0",16),g:Number.parseInt(i[hi.g]??"0",16),r:Number.parseInt(i[hi.r]??"0",16)}:void 0}}async function fi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new pi)})}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 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 $e(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return $e({h:G(e.h),l:G(e.l),s:G(e.s)})}parseString(t){if(!this.accepts(t))return;const e=yi.exec(t);return e?je({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 vi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new mi)})}class bi{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return an});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function wi(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,Ct(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new bi(t.pluginManager))})}function Pi(e,i){const s=e.value,n=e.animation,o={delayTime:G(n.delay)*r,enable:n.enable,value:G(e.value)*i,max:$(s)*i,min:W(s)*i,loops:0,maxLoops:G(n.count),time:0};if(n.enable){switch(o.decay=1-G(n.decay),n.mode){case t.AnimationMode.increase:o.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:o.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:o.status=F()>=a?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:o.value=o.min,e&&(o.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:o.value=o.max,e&&(o.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:o.value=H(o),e&&(o.status=F()>=a?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return o.initialValue=o.value,o}function Mi(e,i,s,n,o){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const a=(i.velocity??0)*o.factor,r=i.min,l=i.max,c=i.decay??1;i.time??=0;const h=i.delayTime??0;if(!(h>0&&i.time<h&&(i.time+=o.value,i.time<h))){switch(i.status){case t.AnimationStatus.increasing:i.value+=a;break;case t.AnimationStatus.decreasing:i.value-=a}switch(i.velocity&&1!==c&&(i.velocity*=c),i.status){case t.AnimationStatus.increasing:i.value>=l&&(i.status=t.AnimationStatus.decreasing,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(i.status=t.AnimationStatus.increasing,i.loops??=0,i.loops++)}!function(e,i,s,n,o){switch(i){case t.DestroyType.max:s>=o&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,l),e.destroyed||(i.value=U(i.value,r,l))}}class xi extends ne{destroy=t.DestroyType.none;load(t){super.load(t),_(t)||Kt(this,"destroy",t.destroy)}}class zi extends be{animation=new xi;value=1;load(t){if(_(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Si{#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=G(i.speed)/o*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){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&&Mi(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function Ci(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Si(t)))})}class Oi{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 o=this.#u;let a=!1;for(const t of this.#m)if(a=t.particleBounce?.(e,s,i)??!1,a)break;if(a)return;const r=e.getPosition(),l=e.offset,c=e.getRadius(),h=gt(r,c),d=o.canvas.size,u=!e.isInsideCanvasForOutMode(n,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.left&&e.direction!==t.OutModeDirection.right)return;e.bounds.right<0&&e.direction===t.OutModeDirection.left?e.particle.position.x=e.size+e.offset.x:e.bounds.left>e.canvasSize.width&&e.direction===t.OutModeDirection.right&&(e.particle.position.x=e.canvasSize.width-e.size-e.offset.x);const i=e.particle.velocity.x;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.right&&i>0||e.direction===t.OutModeDirection.left&&i<0)){const t=G(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,s=!0}if(!s)return;const n=e.offset.x+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-n:e.outOfCanvas&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:d,offset:l,outOfCanvas:u,size:c}),function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.bottom&&e.direction!==t.OutModeDirection.top)return;e.bounds.bottom<0&&e.direction===t.OutModeDirection.top?e.particle.position.y=e.size+e.offset.y:e.bounds.top>e.canvasSize.height&&e.direction===t.OutModeDirection.bottom&&(e.particle.position.y=e.canvasSize.height-e.size-e.offset.y);const i=e.particle.velocity.y;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.bottom&&i>0||e.direction===t.OutModeDirection.top&&i<0)){const t=G(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,s=!0}if(!s)return;const n=e.offset.y+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-n:e.outOfCanvas&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:d,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}=j(e.position,e.moveCenter),{x:s,y:n}=e.velocity;if(s<0&&t>e.moveCenter.radius||n<0&&i>e.moveCenter.radius||s>=0&&t<-e.moveCenter.radius||n>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class ki{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,s,n){if(!this.modes.includes(n))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const o=e.options.move.gravity,a=this.#u,r=a.canvas.size,c=e.getRadius();if(o.enable){const s=e.position;(!o.inverse&&s.y>r.height+c&&i===t.OutModeDirection.bottom||o.inverse&&s.y<-c&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+c||e.velocity.y<0&&e.position.y>=-c||e.velocity.x>0&&e.position.x<=r.width+c||e.velocity.x<0&&e.position.x>=-c)return;pt(e.position,a.canvas.size,l,c,i)||e.destroy()}}}const Ii=C.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 o=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}=j(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(H({min:0,max:o.canvas.size.width})),e.position.y=Math.floor(H({min:0,max:o.canvas.size.height}));const{dx:a,dy:r}=j(e.position,e.moveCenter);e.direction=Math.atan2(-r,-a),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(e.isInsideCanvasForOutMode(n,i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor(H({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(H({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=j(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction),e.justWarped=!0;break}case t.ParticleOutType.normal:{const s=e.options.move.warp,n=o.canvas.size,a={bottom:n.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:n.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),l=gt(e.position,r);i===t.OutModeDirection.right&&l.left>n.width+e.offset.x?(e.position.x=a.left,e.initialPosition.x=e.position.x,s||(e.position.y=F()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0):i===t.OutModeDirection.left&&l.right<-e.offset.x&&(e.position.x=a.right,e.initialPosition.x=e.position.x,s||(e.position.y=F()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0),i===t.OutModeDirection.bottom&&l.top>n.height+e.offset.y?(s||(e.position.x=F()*n.width,e.initialPosition.x=e.position.x),e.position.y=a.top,e.initialPosition.y=e.position.y,e.justWarped=!0):i===t.OutModeDirection.top&&l.bottom<-e.offset.y&&(s||(e.position.x=F()*n.width,e.initialPosition.x=e.position.x),e.position.y=a.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0);break}}}}}class _i{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#v(e,t.OutMode.bounce,t=>new Oi(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 ki(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#b(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#b(e,i,s.left??s.default,t.OutModeDirection.left),this.#b(e,i,s.right??s.default,t.OutModeDirection.right),this.#b(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))}#b(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.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new _i(t)))})}class Ri{#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,o=n??void 0,a=s?.fill,r=s?.stroke;if(a){const i=le.create(void 0===o?void 0:le.create(void 0,o),a.color);t.fillEnabled=a.enable,t.fillOpacity=G(a.opacity),t.fillAnimation=i.animation;const s=Ne(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===o?void 0:le.create(void 0,o),r.color);t.strokeWidth=G(r.width)*e.retina.pixelRatio,t.strokeOpacity=G(r.opacity??1),t.strokeAnimation=i.animation;const s=Ne(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,o=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),a=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(o||a)}update(t,e){this.isEnabled(t)&&(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 Ri(t.pluginManager,e)))})}var Fi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Fi||(Fi={}));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 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:G(e.r),g:G(e.g),b:G(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Ai.exec(t);return e?{a:e.length>4?nt(e[Fi.a]):1,b:parseInt(e[Fi.b]??"0",10),g:parseInt(e[Fi.g]??"0",10),r:parseInt(e[Fi.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),_(t)||Kt(this,"destroy",t.destroy)}}class Ni extends be{animation=new Ui;value=3;load(t){if(super.load(t),_(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Hi{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/o*e.retina.reduceFactor,s.sync||(t.size.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){ie(t,"size",Ni,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Pi(i,e),t.retina.sizeAnimationSpeed=G(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&Mi(t,t.size,0,t.options.size.animation.destroy,e)}}async function Gi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Hi(t)))})}async function Wi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{await Promise.all([ri(t),fi(t),vi(t),Vi(t),wi(t),ci(t),Li(t),Ci(t),Ei(t),Gi(t)])})}class $i{count;delay;duration;wait=!1;load(t){_(t)||(Kt(this,"count",t.count),Jt(this,"delay",t.delay),Jt(this,"duration",t.duration),Kt(this,"wait",t.wait))}}class qi{delay=.1;quantity=1;load(t){_(t)||(Jt(this,"quantity",t.quantity),Jt(this,"delay",t.delay))}}class ji{color=!1;opacity=!1;load(t){_(t)||(Kt(this,"color",t.color),Kt(this,"opacity",t.opacity))}}class Xi{options={};replace=new ji;type="square";load(t){_(t)||(void 0!==t.options&&(this.options=yt({},t.options??{})),this.replace.load(t.replace),Kt(this,"type",t.type))}}class Yi{height=0;mode=t.PixelMode.percent;width=0;load(t){_(t)||(Kt(this,"mode",t.mode),Kt(this,"height",t.height),Kt(this,"width",t.width))}}class Qi{fill;stroke;load(t){_(t)||(t.fill&&(this.fill??=new pe,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new ze,this.stroke.load(t.stroke)))}}class Zi{autoPlay=!0;direction;domId;fill=!0;life=new $i;name;particles;position;rate=new qi;shape=new Xi;size;spawn=new Qi;spawnFillColor;spawnStrokeColor;startCount=0;load(t){_(t)||(Kt(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new Yi,this.size.load(t.size)),Kt(this,"direction",t.direction),Kt(this,"domId",t.domId),Kt(this,"fill",t.fill),this.life.load(t.life),Kt(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=q(t.position.x)),void 0!==t.position.y&&(this.position.y=q(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)),Kt(this,"startCount",t.startCount))}}class Ki{id="emitters";#w;constructor(t){this.#w=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return rn});return new e(this.#w,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=mt(i.emitters,t=>{const e=new Zi;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return T(e)&&!!e.length||void 0!==e}}const Ji=new WeakMap;class ts{fill;options;position;size;constructor(t,e,i,s){this.position=t,this.size=e,this.fill=i,this.options=s}resize(t,e){this.position=t,this.size=e}}var es;async function is(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=Ji.get(e);return i||(i=Promise.resolve().then(function(){return hn}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw Ji.delete(e),t}),Ji.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return cn}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new Ki(e))})}!function(t){t.emitter="emitter"}(es||(es={}));var ss;function ns(t,e){return t+e*(F()-a)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}(ss||(ss={}));class os extends ts{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:ns(e.x,i.width),y:ns(e.y,i.height)}};{const t=i.width*a,s=i.height*a,n=function(t){return Math.floor(F()*t)}(4),o=2*(F()-a);switch(n){case ss.TopLeft:return{position:{x:e.x+o*t,y:e.y-s}};case ss.TopRight:return{position:{x:e.x-t,y:e.y+o*s}};case ss.BottomRight:return{position:{x:e.x+o*t,y:e.y+s}};case ss.BottomLeft:default:return{position:{x:e.x+t,y:e.y+o*s}}}}}}class as{generate(t,e,i,s,n){return new os(e,i,s,n)}}async function rs(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{!function(t){if(!t.pluginManager.addEmitterShapeGenerator)throw new Error("tsParticles Emitters Plugin is not loaded")}(t),t.pluginManager.addEmitterShapeGenerator?.("square",new as)})}class ls extends me{sync=!1;load(t){_(t)||(super.load(t),Kt(this,"sync",t.sync))}}class cs extends me{sync=!1;load(t){_(t)||(super.load(t),Kt(this,"sync",t.sync))}}class hs{count=0;delay=new ls;duration=new cs;load(t){_(t)||(Kt(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class ds{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const s=i.delay.sync?1:F(),n=i.duration.sync?1:F();t.life={delay:e.retina.reduceFactor?G(i.delay.value)*s/e.retina.reduceFactor*r:0,delayTime:0,duration:e.retina.reduceFactor?G(i.duration.value)*n/e.retina.reduceFactor*r:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){ie(t,"life",hs,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const o=q(0,i.width),a=q(0,i.width);t.position.x=H(o),t.position.y=H(a),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const l=t.options.life;l&&(s.delay=G(l.delay.value)*r,s.duration=G(l.duration.value)*r)}(t,e,this.#u.canvas.size)}}async function us(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new ds(t)))})}class ps{factor=4;value=!0;load(t){_(t)||(Kt(this,"factor",t.factor),Kt(this,"value",t.value))}}class fs{disable=!0;reduce=new ps;load(t){_(t)||(Kt(this,"disable",t.disable),this.reduce.load(t.reduce))}}class gs{id="motion";async getPlugin(t){const{MotionPluginInstance:e}=await Promise.resolve().then(function(){return dn});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.motion;s?.load||(e.motion=s=new fs),s.load(i?.motion)}needsPlugin(){return!0}}async function ys(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new gs)})}const ms=.5;function vs(t){return t.ribbonParticleDist??8}function bs(t){return t.ribbonOscillationSpeed??3}function ws(t){return t.ribbonOscillationDistance??40}function Ps(t){const e=t.shapeData,i=Math.max(4,Math.round(G(e?.count??30))),s=G(e?.particleDist??8),n=G(e?.mass??1),o=G(e?.drag??.05),a=G(e?.velocityInherit??5),r=G(e?.oscillationSpeed??3),l=G(e?.oscillationDistance??40),c=G(e?.angle??45),h=Math.PI/180*c,d=C.create(t.position.x,t.position.y);if(!t.ribbonBounds)return;t.ribbonParticleDist=s,t.ribbonMass=n,t.ribbonDrag=o,t.ribbonVelocityInherit=a,t.ribbonOscillationSpeed=r,t.ribbonOscillationDistance=l,t.ribbonTime=100*F(),t.ribbonOffsets=C.create(Math.cos(h),Math.sin(h)),t.ribbonHead=d,t.ribbonPreviousHead=C.create(d.x,d.y),t.ribbonPreviousPosition=C.create(t.position.x,t.position.y);const u=t.velocity.angle+Math.PI,p=s*ms;t.ribbonPoints=new Array(i);for(let e=0;e<i;e++){const i=e*s,n=(F()-ms)*p,o=u+Math.PI*ms;t.ribbonPoints[e]={force:C.origin,position:C.create(d.x+Math.cos(u)*i+Math.cos(o)*n,d.y+Math.sin(u)*i+Math.sin(o)*n),velocity:C.origin}}}function Ms(t){const e=t.ribbonPoints,i=t.ribbonBounds,s=i?.x??0,n=i?.y??0,o=C.create(F()*s,-F()*n);if(i)if(e?.length){t.position.x=o.x,t.position.y=o.y,t.ribbonHead=C.create(o.x,o.y),t.ribbonPreviousHead=C.create(o.x,o.y),t.ribbonPreviousPosition=C.create(o.x,o.y),t.ribbonTime=100*F();for(let i=0;i<e.length;i++){const s=e[i];s&&(s.position=C.create(o.x,o.y-i*vs(t)),s.force=C.origin,s.velocity=C.origin)}}else Ps(t)}function xs(t,e,i){const s=t.ribbonPoints?.[e];s&&s.force.addTo(i)}function zs(t,e,i){const s=t.ribbonPoints?.[e];if(!s)return;const n=function(t){return t.ribbonMass??1}(t),o=function(t){return t.ribbonDrag??.05}(t),a=C.create(s.force.x,s.force.y),r=s.velocity.length,l=C.create(s.velocity.x,s.velocity.y);l.multTo(o*n*r),a.subFrom(l);const c=a.div(n);s.position.addTo(s.velocity.mult(i)),s.velocity.addTo(c.mult(i)),s.force=C.origin}function Ss(t){const{particle:e,delta:i}=t,s=e.ribbonPoints,n=e.ribbonOffsets,o=e.ribbonBounds;if(!s?.length||!n||!o)return;const a=Math.min(.02,Math.max(i.value/1e3,1e-6)),r=function(t){return t.ribbonHead??=C.create(t.position.x,t.position.y),t.ribbonHead}(e),l=function(t){return t.ribbonPreviousHead??=C.create(t.position.x,t.position.y),t.ribbonPreviousHead}(e),c=function(t){return t.ribbonVelocityInherit??5}(e),h=e.options.move.enable;if(e.ribbonTime=(e.ribbonTime??0)+a*bs(e),h?(r.x=e.position.x+Math.cos(e.ribbonTime)*ws(e)/bs(e),r.y=e.position.y):r.x+=Math.cos(e.ribbonTime)*ws(e)*a,e.justWarped){const t=e.velocity.angle+Math.PI,i=vs(e),n=s[0];n&&(n.position=C.create(r.x,r.y),n.velocity=C.origin,n.force=C.origin);for(let e=1;e<s.length;e++){const n=s[e];if(!n)continue;const o=e*i;n.position=C.create(r.x+Math.cos(t)*o,r.y+Math.sin(t)*o),n.velocity=C.origin,n.force=C.origin}}const d=vs(e);if(!Number.isFinite(r.x)||!Number.isFinite(r.y))return void Ms(e);const u=s[0];if(!u)return;u.position=C.create(r.x,r.y);const p=l.x-r.x,f=l.y-r.y,g=Math.sqrt(p*p+f*f),y=Math.min(g/a*c,800);e.ribbonPreviousHead=C.create(r.x,r.y),e.ribbonPreviousPosition=C.create(e.position.x,e.position.y);for(let t=1;t<s.length;t++){const i=s[t],n=s[t-1];if(!i||!n)continue;const o=n.position.sub(i.position).copy();o.normalize(),o.multTo(y),xs(e,t,o)}for(let t=1;t<s.length;t++)zs(e,t,a);for(let t=1;t<s.length;t++){const i=s[t],n=s[t-1];if(!i||!n)continue;const o=i.position.sub(n.position).copy();if(o.normalize(),o.multTo(d),i.position=n.position.add(o),!(Number.isFinite(i.position.x)&&Number.isFinite(i.position.y)&&Number.isFinite(i.velocity.x)&&Number.isFinite(i.velocity.y)))return void Ms(e)}}function Cs(t,e,i,s,n,o){return(t-i)*(o-s)-(e-s)*(n-i)}function Os(t,e){return C.create((t.x+e.x)*ms,(t.y+e.y)*ms)}function Ds(t,e){t.beginPath(),t.moveTo(e.a.x,e.a.y),t.lineTo(e.b.x,e.b.y),t.lineTo(e.c.x,e.c.y),e.d&&t.lineTo(e.d.x,e.d.y),t.closePath(),e.stroke&&t.stroke(),e.fill&&t.fill()}function ks(t,e,i){!function(t,e,i){t.ribbonBounds=C.create(e,i)}(t,e,i),t.ribbonPoints?.length||Ps(t)}function Is(t){return Math.max(4,Math.round(G(t.shapeData?.count??30)))}function Ts(e,i,s,n,o,a){const{canvasSize:r,direction:l}=e;return l===t.OutModeDirection.bottom?n<=r.height+a:l===t.OutModeDirection.left?s>=-a:l===t.OutModeDirection.right?i<=r.width+a:l===t.OutModeDirection.top?o>=-a:s>=-a&&o>=-a&&i<=r.width+a&&n<=r.height+a}class _s{#u;constructor(t){this.#u=t}draw(e){const i=this.#u.canvas.size;ks(e.particle,i.width,i.height),e.particle.ribbonPoints&&e.particle.ribbonPoints.length!==Is(e.particle)&&Ps(e.particle),Ss(e),function(e,i){const{context:s,particle:n,radius:o}=e,a=n.ribbonPoints,r=n.ribbonOffsets,l=n.ribbonBounds,c=e.fill,h=e.stroke;if(!a||!r||!l||a.length<4||!c&&!h)return;const d=r.mult(o),u=n.position,p="string"==typeof s.fillStyle?s.fillStyle:"",f="string"==typeof s.strokeStyle?s.strokeStyle:"",g=n.shapeData;let y=h?f:p;if(g?.backColor)y=g.backColor;else if(g?.darken?.enable){const e=Ke(n.fillColor);e&&(y=Qe(si(e,t.AlterType.darken,G(g.darken.value)),i))}else if(g?.enlighten?.enable){const e=Ke(n.fillColor);e&&(y=Qe(si(e,t.AlterType.enlighten,G(g.enlighten.value)),i))}s.lineWidth=1,s.lineJoin="round",s.lineCap="round";for(let t=0;t<a.length-1;t++){const e=a[t],i=a[t+1];if(!e||!i)continue;const n=e.position.add(d),o=i.position.add(d),r=e.position.sub(u),f=i.position.sub(u),g=n.sub(u),m=o.sub(u),v=Math.min(e.position.y,i.position.y,n.y,o.y),b=Math.max(e.position.y,i.position.y,n.y,o.y),w=Cs(e.position.x,e.position.y,i.position.x,i.position.y,o.x,o.y)<0?p:y;v>l.y+d.length||b<-d.length||(s.fillStyle=w,h&&(s.strokeStyle=w),0===t?(Ds(s,{a:r,b:f,c:Os(f,m),fill:c,stroke:h}),Ds(s,{a:m,b:g,c:Os(f,m),fill:c,stroke:h})):t===a.length-2?(Ds(s,{a:r,b:f,c:Os(r,g),fill:c,stroke:h}),Ds(s,{a:m,b:g,c:Os(r,g),fill:c,stroke:h})):Ds(s,{a:r,b:f,c:m,d:g,fill:c,stroke:h}))}s.fillStyle=p,h&&(s.strokeStyle=f),s.beginPath()}(e,this.#u.hdr)}getSidesCount(t){const e=t.ribbonPoints?.length;return e?Math.max(12,2*e):12}isInsideCanvas(e){const{outMode:i,particle:s,radius:n}=e,o=s.ribbonPoints,a=s.ribbonOffsets,r=s.position,l=i===t.OutMode.destroy||i===t.OutMode.out,c=(a?.length??0)*n,h=Math.max(n,c);if(!l)return Ts(e,r.x-h,r.x+h,r.y-h,r.y+h,0);if(!o?.length||!a)return Ts(e,r.x-h,r.x+h,r.y-h,r.y+h,0);let d=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,p=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY;for(const t of o){const e=t.position.x,i=t.position.y,s=e+a.x*n,o=i+a.y*n;d=Math.min(d,e,s),u=Math.max(u,e,s),p=Math.min(p,i,o),f=Math.max(f,i,o)}if(!(Number.isFinite(d)&&Number.isFinite(p)&&Number.isFinite(u)&&Number.isFinite(f)))return!1;const g=s.ribbonOscillationSpeed&&s.ribbonOscillationDistance?s.ribbonOscillationDistance/s.ribbonOscillationSpeed:0;return Ts(e,d,u,p,f,Math.max(h,s.ribbonParticleDist??0)+g)}loadShape(t){if(!t.shapeData)return;const e=Is(t);t.ribbonPoints?.length&&t.ribbonPoints.length===e||Ps(t)}particleDestroy(t){delete t.ribbonPoints,delete t.ribbonHead,delete t.ribbonPreviousHead,delete t.ribbonPreviousPosition,delete t.ribbonTime,delete t.ribbonOffsets,delete t.ribbonParticleDist,delete t.ribbonMass,delete t.ribbonDrag,delete t.ribbonVelocityInherit,delete t.ribbonOscillationSpeed,delete t.ribbonOscillationDistance}particleInit(t,e){ks(e,t.canvas.size.width,t.canvas.size.height)}}async function Es(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["ribbon"],t=>Promise.resolve(new _s(t)))})}class Rs{colors;count;disableForReducedMotion;emitterSize;positionX;ribbonOptions;scalar;zIndex;constructor(){this.count=5,this.emitterSize={width:100,height:0},this.positionX=50,this.colors=["#FF0055","#00D1FF","#FFD23F","#61FF7E","#B284FF"],this.ribbonOptions={angle:45,darken:{enable:!0,value:30},count:60,drag:.02,mass:1,oscillationDistance:{min:100,max:140},oscillationSpeed:{min:3,max:5},particleDist:8,velocityInherit:{min:4,max:6}},this.scalar=1,this.zIndex=100,this.disableForReducedMotion=!0}get origin(){return{x:this.positionX/o,y:0}}set origin(t){this.positionX=t.x*o}get particleCount(){return this.count}set particleCount(t){this.count=t}get position(){return{x:this.positionX,y:0}}set position(t){this.positionX=t.x}load(t){if(_(t))return;const e=t.count??t.particleCount;if(void 0!==e&&(this.count=e),t.emitterSize&&(void 0!==t.emitterSize.width&&(this.emitterSize.width=t.emitterSize.width),void 0!==t.emitterSize.height&&(this.emitterSize.height=t.emitterSize.height)),Kt(this,"positionX",t.positionX),void 0===t.positionX){const e=t.origin;e&&!t.position&&(t.position={x:void 0===e.x?void 0:e.x*o,y:0});const i=t.position;i&&void 0!==i.x&&(this.positionX=i.x)}void 0!==t.colors&&(T(t.colors)?this.colors=[...t.colors]:this.colors=t.colors),void 0!==t.ribbonOptions&&(this.ribbonOptions=yt({},t.ribbonOptions)),Kt(this,"scalar",t.scalar),Kt(this,"zIndex",t.zIndex),Kt(this,"disableForReducedMotion",t.disableForReducedMotion)}}const Ls=new Map;async function Fs(t,e){const i=new Rs;i.load(e.options);let s=Ls.get(e.id);s instanceof Promise&&(await s,s=Ls.get(e.id));const n=s;if(n&&!n.destroyed){const t=n;if("addEmitter"in t)return await async function(t,e){await(t.addEmitter?.({startCount:e.count,position:{x:e.positionX,y:0},shape:{type:"square"},size:{width:e.emitterSize.width,height:e.emitterSize.height},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{paint:{fill:{color:{value:e.colors},enable:!0}},shape:{type:"ribbon",options:{ribbon:e.ribbonOptions}},life:{count:1},size:{value:8*e.scalar},move:{direction:"bottom",enable:!0,outModes:{top:"none",default:"destroy"},speed:{min:4,max:6}},roll:{enable:!1},rotate:{value:0,move:!1,animation:{enable:!1}},tilt:{enable:!1},wobble:{enable:!1}}}))}(t,i),n}const o=(async()=>{const s=function(t,e){return{fullScreen:{enable:!e.canvas,zIndex:t.zIndex},fpsLimit:120,particles:{number:{value:0},paint:{fill:{color:{value:t.colors},enable:!0}},shape:{type:"ribbon",options:{ribbon:t.ribbonOptions}},size:{value:8*t.scalar},links:{enable:!1},life:{count:1},move:{direction:"bottom",enable:!0,outModes:{top:"none",default:"destroy"},speed:{min:4,max:6}},roll:{enable:!1},rotate:{value:0,move:!1,animation:{enable:!1}},tilt:{enable:!1},wobble:{enable:!1}},motion:{disable:t.disableForReducedMotion},emitters:{name:"ribbons",startCount:t.count,position:{x:t.positionX,y:0},shape:{type:"square"},size:{width:t.emitterSize.width,height:t.emitterSize.height},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}}}(i,e),n=await t.load({id:e.id,element:e.canvas,options:s});return Ls.set(e.id,n),n})();return Ls.set(e.id,o),o}let As=null;async function Bs(t){return As||(As=async function(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{await Promise.all([Wi(t),ys(t),(async t=>{await is(t),await rs(t)})(t),Es(t),us(t)])})}(t),As)}async function Vs(t,e){let i,s;return await Bs(ni),D(t)?(s=t,i=e??{}):(s="ribbons",i=t??{}),Fs(ni,{id:s,options:i})}Vs.create=async(t,e={})=>{await Bs(ni);const i=t?.getAttribute("id")??"ribbons";return t?.setAttribute("id",i),await Fs(ni,{id:i,canvas:t??void 0,options:e}),async(s,n)=>{let o,a;return D(s)?(a=s,o=n??e):(a=i,o=s??{}),Fs(ni,{id:a,canvas:t??void 0,options:o})}},Vs.init=async()=>{await Bs(ni)},Vs.version="4.3.2",globalThis.ribbons=Vs;const Us=globalThis;Us.ribbons=Vs,Us.tsParticles=ni;function Ns(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Hs{#P;#M;#x;#z;#S;#u;#C;#O;#D;#k;#I;#T;#p;#_;#E;#R={};#L=[void 0,void 0];#F={};constructor(t,e,i){this.#p=t,this.#u=e,this.#z=i,this.#C=null,this.#P=null,this.#M=new Set,this.#E=[],this.#_=[],this.#x=[],this.#S=[],this.#D=[],this.#k=[],this.#I=[],this.#T={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.#z.size.width,this.#z.size.height)})}clear(){for(const t of this.#x)if(t.canvasClear?.())return;for(const e of Object.values(t.DrawLayer))if("number"==typeof e)for(const t of this.#A(e))if(t.canvasClear?.())return;this.canvasClear()}destroy(){this.stop(),this.#P=null,this.#M.clear(),this.#E=[],this.#_=[],this.#x=[],this.#S=[],this.#D=[],this.#k=[],this.#I=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#T[e]=[])}draw(t){const e=this.#C;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[o,a]=this.#B(t);if(o??=s,a??=n,!o&&!a)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#F,f=this.#R,g=o?Qe(o,r.hdr,h*d):void 0,y=a?Qe(a,r.hdr,u*d):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=y,this.draw(s=>{for(const i of this.#I)i.drawParticleSetup?.(s,t,e);this.#V(s,t,i,d,f,p),this.#U({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#N(t);for(const i of this.#k)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#D)this.#H(i,s,t,e)})}drawParticles(e){const{particles:i,actualOptions:s}=this.#u;this.clear(),i.update(e),this.draw(n=>{const o=this.#z.size.width,a=this.#z.size.height;if(this.#P)try{n.drawImage(this.#P,l.x,l.y,o,a)}catch{this.#G("background-element-draw-error","Error drawing background element onto canvas")}const r=s.background;if(r.draw)try{r.draw(n,e)}catch{this.#G("background-draw-error","Error in background.draw callback")}for(const e of this.#A(t.DrawLayer.BackgroundMask))e.canvasPaint?.();for(const i of this.#A(t.DrawLayer.CanvasSetup))i.drawSettingsSetup?.(n,e);for(const i of this.#A(t.DrawLayer.PluginContent))i.draw?.(n,e);i.drawParticles(e);for(const i of this.#A(t.DrawLayer.CanvasCleanup))i.clearDraw?.(n,e),i.drawSettingsCleanup?.(n,e)})}init(){this.initUpdaters(),this.initPlugins(),this.#W(),this.paint()}initPlugins(){this.#x=[],this.#S=[],this.#D=[],this.#I=[],this.#k=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#T[e]=[]);for(const e of this.#u.plugins)(e.particleFillColor??e.particleStrokeColor)&&this.#S.push(e),e.drawParticle&&this.#D.push(e),e.drawParticleSetup&&this.#I.push(e),e.drawParticleCleanup&&this.#k.push(e),e.canvasClear&&this.#x.push(e),e.canvasPaint&&this.#A(t.DrawLayer.BackgroundMask).push(e),e.drawSettingsSetup&&this.#A(t.DrawLayer.CanvasSetup).push(e),e.draw&&this.#A(t.DrawLayer.PluginContent).push(e),(e.clearDraw??e.drawSettingsCleanup)&&this.#A(t.DrawLayer.CanvasCleanup).push(e)}initUpdaters(){this.#E=[],this.#_=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#_.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#E.push(t)}paint(){let e=!1;for(const i of this.#A(t.DrawLayer.BackgroundMask))if(e=i.canvasPaint?.()??!1,e)break;e||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(l.x,l.y,this.#z.size.width,this.#z.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.#z.size.width,this.#z.size.height),i.globalAlpha=s})}setContext(t){this.#C=t,this.#C&&(this.#C.globalCompositeOperation=i)}setContextSettings(t){this.#O=t}stop(){this.draw(t=>{t.clearRect(l.x,l.y,this.#z.size.width,this.#z.size.height)})}#N(t){for(const e of this.#_)e.afterDraw?.(t)}#V(t,e,i,s,n,o){for(const a of this.#E){if(a.getColorStyles){const{fill:o,stroke:r}=a.getColorStyles(e,t,i,s);o&&(n.fill=o),r&&(n.stroke=r)}if(a.getTransformValues){const t=a.getTransformValues(e);for(const e in t)Ns(o,t,e)}a.beforeDraw?.(e)}}#$(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#q(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#U(t){const{container:e,context:i,particle:s,delta:n,colorStyles:o,radius:a,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(l),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.y),o.fill&&(i.fillStyle=o.fill);const f=!!s.fillEnabled,g=s.strokeWidth??0;i.lineWidth=g,o.stroke&&(i.strokeStyle=o.stroke);const y={context:i,particle:s,radius:a,drawRadius:1*a,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:f,stroke:g>0,transformData:u,position:{...d},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?h.get(s.shape):void 0;this.#q(m,y),this.#j(v,y),this.#X(v,y),this.#Y(v,y),this.#$(m,y),i.resetTransform()}#H(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#X(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:o}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),o&&i.stroke())}#Y(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#j(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#A(t){return this.#T[t]}#B(t){let e,i;for(const s of this.#S)if(!e&&s.particleFillColor&&(e=Ne(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ne(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#L[0]=e,this.#L[1]=i,this.#L}#W(){const t=this.#u.actualOptions.background;if(this.#P=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.#P=e:e?this.#G("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#G("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.#P=t.element)}#G(t,e){this.#M.has(t)||(this.#M.add(t),_t().warning(e))}}const Gs=new WeakMap;function Ws(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 $s{domElement;render;renderCanvas;size;zoom=1;#u;#Q;#Z;#K;#p;#J;#tt;#et;#it;constructor(t,e){this.#p=t,this.#u=e,this.render=new Hs(t,e,this),this.#et={height:0,width:0};const i=e.retina.pixelRatio,s=this.#et;this.size={height:s.height*i,width:s.width*i},this.#Q=!1,this.#tt=[],this.#J="none"}get#st(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#Q){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#nt();this.render.destroy(),this.#tt=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#it?this.#it:{x:e*a/t,y:i*a/t}}init(){this.#ot(t=>{t.disconnect()}),this.#Z=ht(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#at()}),this.resize(),this.#rt(),this.initBackground(),this.#ot(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#lt(),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?Ye(n,t.actualOptions.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#tt=[];for(const t of this.#u.plugins)t.resize&&this.#tt.push(t)}loadCanvas(t){this.#Q&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#Q=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=Gs.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 Gs.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#K=wt(s.style));const n=this.#et,o=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=o.height,n.width=o.width);const a=this.#u.retina.pixelRatio,r=this.size;o.height=r.height=n.height*a,o.width=r.width=n.width*a}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#et,n={width:t.offsetWidth,height:t.offsetHeight},o=e.retina.pixelRatio,a={width:n.width*o,height:n.height*o};if(n.height===s.height&&n.width===s.width&&a.height===i.height&&a.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=a.width,i.height=l.height=a.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#J=t,this.#at())}setZoom(t,e){this.zoom=t,this.#it=e}stop(){this.#ot(t=>{t.disconnect()}),this.#Z=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#ct(),e&&await t.refresh()}#ct(){for(const t of this.#tt)t.resize?.()}#lt(){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))}#rt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#st?this.#ht():this.#nt();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")}}}#at(){const t=this.domElement;if(!t)return;this.#ot(t=>{t.disconnect()}),this.#rt(),this.initBackground();const e=this.#J;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#ot(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#nt(){const t=this.domElement,e=this.#K;t&&e&&Ws(t,e,!0)}#ot(t){this.#Z&&t(this.#Z)}#ht(){const t=this.domElement;t&&Ws(t,xt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class qs{#u;#dt;#ut;#pt;constructor(t){this.#u=t,this.#dt={visibilityChange:()=>{this.#ft()},resize:()=>{this.#gt()}}}addListeners(){this.#yt(!0)}removeListeners(){this.#yt(!1)}#ft(){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)))}#gt(){this.#pt&&(clearTimeout(this.#pt),this.#pt=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#pt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*r)}#yt(t){const e=this.#dt;this.#mt(t),zt(document,n,e.visibilityChange,t,!1)}#mt(t){const e=this.#dt,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.#ut&&!t?(n&&this.#ut.unobserve(n),this.#ut.disconnect(),this.#ut=void 0):!this.#ut&&t&&n&&(this.#ut=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this.#gt()}),this.#ut.observe(n))}}function js(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 Xs(t,e){const i=t%e;return i<0?i+e:i}function Ys(t,e,i,s){const n=Re(i,e,e.actualOptions.particles),o=n.reduceDuplicates;t.effect=vt(n.effect.type,t.id,o),t.shape=vt(n.shape.type,t.id,o);const a=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=vt(e,t.id,o);i&&(t.effect=i)}a.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=vt(e,t.id,o);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===h){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(F()*i.length)]}if(t.shape===h){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(F()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return yt({close:e.close},vt(n,i,s))}(t.effect,a,t.id,o):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return yt({close:e.close},vt(n,i,s))}(t.shape,r,t.id,o):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class Qs{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;#vt={fillOpacity:1,opacity:1,strokeOpacity:1};#bt=S.origin;#wt={sin:0,cos:0};#Pt={a:1,b:0,c:0,d:1};#u;#Mt=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#Mt.push(t),this.#Mt.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#Mt.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.#xt(this.#zt(Ke(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*a}getModifier(t){return this.#Mt.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=G(this.opacity?.value??1),s=this.#zt(void 0,t=>t.opacity)??i,n=this.fillOpacity??1,o=this.strokeOpacity??1;return this.#vt.fillOpacity=s*n*e,this.#vt.opacity=s*e,this.#vt.strokeOpacity=s*o*e,this.#vt}getPosition(){return this.#bt.x=this.position.x+this.offset.x,this.#bt.y=this.position.y+this.offset.y,this.#bt.z=this.position.z,this.#bt}getRadius(){return this.#zt(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#wt.sin=Math.sin(t),this.#wt.cos=Math.cos(t),this.#wt}getStrokeColor(){return this.#xt(this.#zt(Ke(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#Pt.a=e.cos*(t.a??c.a),this.#Pt.b=i?e.sin*(t.b??1):t.b??c.b,this.#Pt.c=i?-e.sin*(t.c??1):t.c??c.c,this.#Pt.d=e.cos*(t.d??c.d),this.#Pt}init(e,i,s,n){const o=this.#u;!function(e,i,s){e.id=i,e.group=s,e.justWarped=!1,e.effectClose=!0,e.shapeClose=!0,e.pathRotation=!1,e.lastPathTime=0,e.destroyed=!1,e.unbreakable=!1,e.isRotating=!1,e.rotation=0,e.misplaced=!1,e.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},e.size={value:1,max:1,min:1,enable:!1},e.outType=t.ParticleOutType.normal,e.ignoresResizeRatio=!0}(this,e,n),this.options=Ys(this,o,this.#p,s),o.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(o.particleUpdaters,this),this.#St(i),this.initialVelocity=this.#Ct(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/o.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,o),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(o.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(o,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(o,this)}isInsideCanvas(t){return this.#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=Xs(t,u);return e>=Math.PI*a&&e<3*Math.PI*a}if(this.roll.horizontal){const e=Xs(t+Math.PI*a,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Xs(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.#Mt.findIndex(e=>e.id===t);e>=0&&this.#Mt.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#zt(t,e){let i=t;for(const t of this.#Mt)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#Dt(t,e){let i=0,s=t?S.create(t.x,t.y,e):void 0;const n=this.#u,o=n.particlePositionPlugins,a=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size;for(;;){for(const t of o){const i=t.particlePosition?.(s,this);if(i)return S.create(i.x,i.y,e)}const t=st({size:l,position:s}),c=S.create(t.x,t.y,e);this.#kt(c,r,a.left??a.default),this.#kt(c,r,a.right??a.default),this.#It(c,r,a.top??a.default),this.#It(c,r,a.bottom??a.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}}#Ct(){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=Z(G(e.angle.value)),n=Z(G(e.angle.offset)),o={left:n-s*a,right:n+s*a};return e.straight||(i.angle+=H(q(o.left,o.right))),e.random&&"number"==typeof e.speed&&(i.length*=F()),i}#kt(e,i,s){js({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#It(e,i,s){js({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#Tt(e,i){const s=this.getRadius(),n=this.#u.canvas.size,o=this.position,a=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:a?o.y+s<n.height:o.y-s<n.height,reason:"default"}:e===t.OutModeDirection.left?{inside:a?o.x-s>0:o.x+s>0,reason:"default"}:e===t.OutModeDirection.right?{inside:a?o.x+s<n.width:o.x-s<n.width,reason:"default"}:e===t.OutModeDirection.top?{inside:a?o.y-s>0:o.y+s>0,reason:"default"}:{inside:o.x>=-s&&o.y>=-s&&o.y<=n.height+s&&o.x<=n.width+s,reason:"default"}}#_t(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Ot(t){const e=this.#Tt(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,o=s?.isInsideCanvas,a=n?.isInsideCanvas;if(!o&&!a)return e;const r=this.#_t(t.direction,t.outMode),l=o?this.#Et(o(r),"shape"):void 0,c=a?this.#Et(a(r),"effect"):void 0;if(l&&c){const t=Math.max(l.margin??0,c.margin??0);return{inside:l.inside&&c.inside,margin:t>0?t:void 0,reason:"combined"}}return l??c??e}#xt(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}#St(e){const i=this.#u,s=Math.floor(G(this.options.zIndex.value)),n=this.#Dt(e,U(s,0,i.zLayers));if(!n)throw new Error("a valid position cannot be found for particle");this.position=n,this.initialPosition=this.position.copy();const o=i.canvas.size;switch(this.moveCenter={...bt(this.options.move.center,o),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=K(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=C.origin}#Et(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Zs{#Rt;#Lt=new Map;#Ft=[];#At;#Bt;#Vt=[];#Ut;constructor(t){this.#Rt=t,this.#At=0,this.#Ut=0}clear(){this.#Lt.clear();const t=this.#Bt;t&&(this.#Rt=t),this.#Bt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Nt(e,i);this.#Lt.has(s)||this.#Lt.set(s,[]),this.#Lt.get(s)?.push(t)}query(t,e,i=[]){const s=this.#Ht(t);if(!s)return i;const n=Math.floor(s.minX/this.#Rt),o=Math.floor(s.maxX/this.#Rt),a=Math.floor(s.minY/this.#Rt),r=Math.floor(s.maxY/this.#Rt);for(let s=n;s<=o;s++)for(let n=a;n<=r;n++){const o=`${s}_${n}`,a=this.#Lt.get(o);if(a)for(const s of a)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this.#Gt(t.x,t.y,e),o=this.query(n,i,s);return this.#Wt(),o}queryRectangle(t,e,i,s=[]){const n=this.#$t(t.x,t.y,e.width,e.height),o=this.query(n,i,s);return this.#Wt(),o}setCellSize(t){this.#Bt=t}#Gt(t,e,i){return(this.#Ft[this.#At++]??=new Xt(t,e,i)).reset(t,e,i)}#$t(t,e,i,s){return(this.#Vt[this.#Ut++]??=new Yt(t,e,i,s)).reset(t,e,i,s)}#Nt(t,e){return`${Math.floor(t/this.#Rt)}_${Math.floor(e/this.#Rt)}`}#Ht(t){if(t instanceof Xt){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 Yt){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}#Wt(){this.#At=0,this.#Ut=0}}class Ks{checkParticlePositionPlugins;grid;#qt;#u;#jt;#Xt;#Yt;#Qt;#Zt;#Kt;#p;#Jt;#te;#ee;#ie;#se;#ne;constructor(t,e){this.#p=t,this.#u=e,this.#Yt=0,this.#qt=[],this.#Jt=[],this.#Xt=0,this.#jt=new Map,this.#Qt=new Map,this.#ne=this.#oe(this.#u.zLayers),this.grid=new Zs(100),this.checkParticlePositionPlugins=[],this.#Zt=[],this.#Kt=[],this.#ee=[],this.#te=[],this.#se=[]}get count(){return this.#qt.length}addParticle(e,i,s,n){const o=this.#u.actualOptions.particles.number.limit.mode,a=void 0===s?this.#Xt:this.#jt.get(s)??this.#Xt,r=this.count;if(a>0)switch(o){case t.LimitMode.delete:{const t=r+1-a;t>0&&this.removeQuantity(t);break}case t.LimitMode.wait:if(r>=a)return}try{const o=this.#Jt.pop()??new Qs(this.#p,this.#u);o.init(this.#Yt,e,i,s);let a=!0;return n&&(a=n(o)),a?(this.#qt.push(o),this.#ae(o),this.#Yt++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:o}),o):void this.#Jt.push(o)}catch(t){_t().warning(`error adding particle: ${t}`)}}clear(){this.#qt=[],this.#Qt.clear(),this.#re(this.#u.zLayers)}destroy(){this.#qt=[],this.#Jt.length=0,this.#Qt.clear(),this.#ne=[],this.checkParticlePositionPlugins=[],this.#Zt=[],this.#Kt=[],this.#ee=[],this.#te=[],this.#se=[]}drawParticles(t){for(let e=this.#ne.length-1;e>=0;e--){const i=this.#ne[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#qt.filter(t)}find(t){return this.#qt.find(t)}get(t){return this.#qt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#se=[],this.#Kt=[],this.#ee=[],this.#Zt=[],this.#te=[],this.#Qt.clear(),this.#re(t.zLayers),this.grid=new Zs(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#se.push(e),e.particleUpdate&&this.#Kt.push(e),e.postUpdate&&this.#ee.push(e),e.particleReset&&this.#Zt.push(e),e.postParticleUpdate&&this.#te.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#qt.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let o=t;n<e&&o<this.count;o++)this.#le(o,i,s)&&(o--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Re(this.#p,this.#u,s);this.#ce(n,i,t)}this.#ce(t.particles,i)}setResizeFactor(t){this.#ie=t}update(t){this.grid.clear();for(const e of this.#se)e.update?.(t);const e=this.#he(t);for(const e of this.#ee)e.postUpdate?.(t);if(this.#de(t,e),e.size)for(const t of e)this.remove(t);this.#ie=void 0}#ue(...t){this.#Jt.push(...t)}#ce(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.#jt.set(i,s?.number.limit.value??n.limit.value));const o=this.#pe(n.density),a=n.value,r=n.limit.value>0?n.limit.value:a,l=Math.min(a,r)*o+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#Xt=n.limit.value*o:this.#jt.set(i,n.limit.value*o),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)}#oe(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#fe(t){const e=this.#ne.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#pe(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}#ae(t){const e=this.#fe(t.position.z),i=this.#ne[e];i&&(i.push(t),this.#Qt.set(t.id,e))}#le(e,i,s){const n=this.#qt[e];return!!n&&(n.group===i&&(this.#qt.splice(e,1),this.#ge(n),n.destroy(s),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this.#ue(n),!0))}#ge(t){const e=this.#Qt.get(t.id)??this.#fe(t.position.z),i=this.#ne[e];if(!i)return void this.#Qt.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Qt.delete(t.id)}#re(t){const e=Math.max(Math.floor(t),1);if(this.#ne.length===e)for(const t of this.#ne)t.length=0;else this.#ne=this.#oe(e)}#ye(t){const e=this.#fe(t.position.z),i=this.#Qt.get(t.id);if(void 0===i)return void this.#ae(t);if(i===e)return;const s=this.#ne[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#ne[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.#Qt.set(t.id,e)}else this.#Qt.set(t.id,e)}#he(t){const e=new Set,i=this.#ie;for(const s of this.#qt){i&&!s.ignoresResizeRatio&&(s.position.x*=i.width,s.position.y*=i.height,s.initialPosition.x*=i.width,s.initialPosition.y*=i.height),s.ignoresResizeRatio=!1;for(const t of this.#Zt)t.particleReset?.(s);for(const e of this.#Kt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#de(t,e){for(const i of this.#qt)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#te)e.postParticleUpdate?.(i,t);this.#ye(i)}}}class Js{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,o=t.retina;o.maxSpeed=G(s.gravity.maxSpeed)*i,o.moveDrift=G(s.drift)*i,o.moveSpeed=G(s.speed)*i;const a=o.maxDistance;a.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,a.vertical=void 0===n.vertical?void 0:n.vertical*i}}function tn(t){return!t.destroyed}function en(t,e,...i){const s=new Le(t,e);return Zt(s,...i),s}var sn=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#me;#ve;#be={value:0,factor:0};#we;#Pe;#Me;#xe;#ze;#Se;#Ce;#Oe;#De;#ke;#Ie;#p;#Te;#_e;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:o,sourceOptions:a}=e;this.#p=s,this.#we=i,this.#De=o,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.#Te=!1,this.#me=0,this.#Me=0,this.#Oe=0,this.#ze=!0,this.started=!1,this.destroyed=!1,this.#Ie=!0,this.#Ce=0,this.zLayers=100,this.pageHidden=!1,this.#_e=a,this.#Se=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Js(this),this.canvas=new $s(this.#p,this),this.particles=new Ks(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#ke=en(this.#p,this),this.actualOptions=en(this.#p,this),this.#xe=new qs(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#Ie&&!this.pageHidden&&tn(this)}get options(){return this.#ke}get sourceOptions(){return this.#_e}addLifeTime(t){this.#Oe+=t}alive(){return!this.#Me||this.#Oe<=this.#Me}destroy(e=!0){if(tn(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.#De(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#we(t,{container:this,data:e})}draw(t){if(!tn(this))return;let e=t;this.#Pe=B(t=>{e&&(this.#Ce=void 0,e=!1),this.#Ee(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}_t().error(`Export plugin with type ${t} not found`)}async init(){if(!tn(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.#ke=en(this.#p,this,this.#Se,this.sourceOptions),this.actualOptions=en(this.#p,this,this.#ke),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[t,i]of e)t.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:i,duration:s,fpsLimit:n,hdr:o,smooth:a,zLayers:l}=this.actualOptions;this.hdr=o,this.zLayers=l,this.#Me=G(s)*r,this.#me=G(i)*r,this.#Oe=0,this.fpsLimit=n>0?n:120,this.#Te=a;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(t.EventType.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(t.EventType.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){if(tn(this)&&(void 0!==this.#Pe&&(V(this.#Pe),this.#Pe=void 0),!this.#Ie)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Ie=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!tn(this))return;const i=this.#Ie||e;if(!this.#ze||this.actualOptions.autoPlay){if(this.#Ie&&(this.#Ie=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#ze=!1}async refresh(){if(tn(this))return this.stop(),this.start()}async reset(t){if(tn(this))return this.#Se=t,this.#_e=t,this.#ke=en(this.#p,this,this.#Se,this.sourceOptions),this.actualOptions=en(this.#p,this,this.#ke),this.refresh()}async start(){tn(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#xe.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#ve=setTimeout(()=>{i()},this.#me)}))}stop(){if(tn(this)&&this.started){this.#ve&&(clearTimeout(this.#ve),this.#ve=void 0),this.#ze=!0,this.started=!1,this.#xe.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.#ke,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Ee(t){try{if(!this.#Te&&void 0!==this.#Ce&&t<this.#Ce+r/this.fpsLimit)return void this.draw(!1);if(this.#Ce??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this.#be,t-this.#Ce,this.fpsLimit,this.#Te),this.addLifeTime(this.#be.value),this.#Ce=t,this.#be.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#be),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){_t().error("error in animation loop",t)}}}});var nn=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=t.DrawLayer.CanvasSetup;#u;#Re;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.#Re&&(t.globalCompositeOperation=this.#Re)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Re=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function on(t,e,i,s,n,o,a){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const o=t.pathGenerator?.generate(t,e);o&&t.velocity.addTo(o);s.clamp&&(t.velocity.x=U(t.velocity.x,-1,1),t.velocity.y=U(t.velocity.y,-1,1));t.lastPathTime-=n}(t,a);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*a.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*a.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=l*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(o);const{position:p}=t;p.addTo(h),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*o,p.y+=Math.cos(p.y*Math.sin(p.x))*o)}var an=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(e){const i=e.options.move,s=i.gravity,n=i.path;if(e.moveDecay=1-G(i.decay),e.pathDelay=G(n.delay.value)*r,n.generator){let t=this.pathGenerators.get(n.generator);t||(t=this.availablePathGenerators.get(n.generator),t&&(this.pathGenerators.set(n.generator,t),t.init())),e.pathGenerator=t}e.gravity={enable:s.enable,acceleration:G(s.acceleration),inverse:s.inverse},function(e,i){const s=i.options.move.spin;if(!s.enable)return;const n=s.position??{x:50,y:50},o={x:.01*n.x*e.canvas.size.width,y:.01*n.y*e.canvas.size.height},a=Y(i.getPosition(),o),r=G(s.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:o,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:F()*u,radius:a,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options.move;if(!s.enable)return;const n=this.#u,o=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(e),r=n.retina.reduceFactor,l=e.retina.moveSpeed,c=e.retina.moveDrift,h=e.size.max,d=l*(s.size?e.getRadius()/h:1)*o*(i.factor||1)*a,u=e.retina.maxSpeed;s.spin.enable?function(e,i,s,n){if(!i.spin)return;const o=i.spin.direction===t.RotateDirection.clockwise,r={x:o?Math.cos:Math.sin,y:o?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*r.x(i.spin.angle)*n,i.position.y=i.spin.center.y+i.spin.radius*r.y(i.spin.angle)*n,i.spin.radius+=i.spin.acceleration*n;const l=Math.max(e.canvas.size.width,e.canvas.size.height),c=l*a;i.spin.radius>c?(i.spin.radius=c,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*s*(1-i.spin.radius/l)}(n,e,d,r):on(e,s,d,u,c,r,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=j(e,t.position),n=Math.abs(i),o=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&n>=l||c&&o>=c)&&!t.misplaced)t.misplaced=!!l&&n>l||!!c&&o>c,l&&(t.velocity.x=t.velocity.y*a-t.velocity.x),c&&(t.velocity.y=t.velocity.x*a-t.velocity.y);else if((!l||n<l)&&(!c||o<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-F()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-F())}}(e)}preInit(){return this.#Le()}redrawInit(){return this.#Le()}update(){for(const t of this.pathGenerators.values())t.update()}async#Le(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var rn=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#w;constructor(t,e){this.#w=t,this.#u=e,this.#w.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(T(t))for(const e of t)await this.#w.addEmitter(this.#u,e);else await this.#w.addEmitter(this.#u,t)}pause(){for(const t of this.#w.getArray(this.#u))t.pause()}play(){for(const t of this.#w.getArray(this.#u))t.play()}resize(){for(const t of this.#w.getArray(this.#u))t.resize()}stop(){this.#w.clear(this.#u)}update(t){this.#w.getArray(this.#u).forEach(e=>{e.update(t)})}}});const ln=new Map;var cn=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||ln.set(t,e)}getShapeGenerator(t){return ln.get(t)}getSupportedShapeGenerators(){return ln.keys()}}});var hn=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Fe;#p;constructor(t){this.#Fe=new Map,this.#p=t}async addEmitter(t,e,i){const s=new Zi;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return fn}),o=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await o.init(),this.getArray(t).push(o),o}clear(t){this.initContainer(t),this.#Fe.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Fe.get(t);return e||(e=[],this.#Fe.set(t,e)),e}initContainer(t){this.#Fe.has(t)||(this.#Fe.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||k(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 dn=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.#Ae(i);i.addEventListener("change",()=>{(async()=>{this.#Ae(i);try{await t.refresh()}catch{}})()}),await Promise.resolve()}#Ae(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 un(t,e,i,s){(t.paint??=new Se).fill={color:le.create(void 0,{value:e}),enable:s,opacity:i}}function pn(t,e,i,s){(t.paint??=new Se).stroke={color:le.create(void 0,{value:e}),opacity:i,width:s}}var fn=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#Be;#Ve;#Ue;#Me;#Ne;#He;#Ge;#We;#$e;#Z;#qe;#Ie;#p;#je;#ut;#Xe;#Ye;#Qe;#Ze;constructor(e,i,s,n,a){this.#p=e,this.#u=i,this.#je=s,this.#Be=0,this.#Ve=0,this.#Ue=0,this.#We=a,n instanceof Zi?this.options=n:(this.options=new Zi,this.options.load(n)),this.#Qe=i.retina.reduceFactor?G(this.options.life.delay??0)*r/i.retina.reduceFactor:1/0,this.position=this.#We??this.#Dt(),this.name=this.options.name,this.fill=this.options.fill,this.#He=!this.options.life.wait,this.#Ze=!1;const l=yt({},this.options.particles);if(l.move??={},l.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=Ne(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=Ne(this.#p,this.options.spawn.stroke.color)),this.#Ie=!this.options.autoPlay,this.#qe=l,this.#Ye=this.#Ke(),this.size=this.#Ye.mode===t.PixelMode.percent?{width:this.#Ye.width/o*this.#u.canvas.size.width,height:this.#Ye.height/o*this.#u.canvas.size.height}:{width:this.#Ye.width,height:this.#Ye.height},this.#$e=this.options.life.count??-1,this.#Ge=this.#$e<=0,this.options.domId){const t=lt().getElementById(this.options.domId);t&&(this.#Z=new MutationObserver(()=>{this.resize()}),this.#ut=new ResizeObserver(()=>{this.resize()}),this.#Z.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#ut.observe(t))}const c=this.options.shape,h=this.#p.emitterShapeManager?.getShapeGenerator(c.type);h&&(this.#Xe=h.generate(this.#u,this.position,this.size,this.fill,c.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#Ie=!0,this.pause()}externalPlay(){this.#Ie=!1,this.play()}async init(){await(this.#Xe?.init())}pause(){this.#Ie||(this.#Ne=void 0)}play(){if(this.#Ie)return;if(!(this.#$e>0||this.#Ge)&&this.options.life.count||!(this.#He||this.#Ue>=(this.#Qe??0)))return;const t=this.#u;if(void 0===this.#Ne){const e=G(this.options.rate.delay);this.#Ne=t.retina.reduceFactor?e*r/t.retina.reduceFactor:1/0}(this.#$e>0||this.#Ge)&&this.#Je()}resize(){const e=this.#We,i=this.#u;this.position=e&&pt(e,i.canvas.size,C.origin)?e:this.#Dt(),this.#Ye=this.#Ke(),this.size=this.#Ye.mode===t.PixelMode.percent?{width:this.#Ye.width/o*i.canvas.size.width,height:this.#Ye.height/o*i.canvas.size.height}:{width:this.#Ye.width,height:this.#Ye.height},this.#Xe?.resize(this.position,this.size)}update(t){if(this.#Ie)return;const e=this.#u;this.#He&&(this.#He=!1,this.#Ue=this.#Qe??0,this.#Ve=this.#Ne??0),this.#Ze||(this.#Ze=!0,this.#ti(this.options.startCount)),void 0!==this.#Me&&(this.#Be+=t.value,this.#Be>=this.#Me&&(this.pause(),void 0!==this.#Qe&&(this.#Qe=void 0),this.#Ge||this.#$e--,this.#$e>0||this.#Ge?(this.position=this.#Dt(),this.#Xe?.resize(this.position,this.size),this.#Qe=e.retina.reduceFactor?G(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0):this.#ei(),this.#Be-=this.#Me,this.#Me=void 0)),void 0!==this.#Qe&&(this.#Ue+=t.value,this.#Ue>=this.#Qe&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#Ue-=this.#Qe,this.#Qe=void 0)),void 0!==this.#Ne&&(this.#Ve+=t.value,this.#Ve>=this.#Ne&&(this.#ii(),this.#Ve-=this.#Ne))}#Dt(){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*a)*s,y:(i.y+i.height*a)*s}}}return it({size:t.canvas.size,position:this.options.position})}#Ke(){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 Yi;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}#ei(){this.#Z?.disconnect(),this.#Z=void 0,this.#ut?.disconnect(),this.#ut=void 0,this.#je(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#ii(){if(this.#Ie)return;const t=G(this.options.rate.quantity);this.#ti(t)}#ti(t){const e=vt(this.#qe)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:G(this.options.spawn.fill.opacity),o=this.options.spawn.stroke?.color?.animation,a=void 0===this.options.spawn.stroke?.opacity?1:G(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:G(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,h=!!o,d=!!this.#Xe,u=c||h,p=u||d,f=u?{h:m,s:v,l:b}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?yt({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=a,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this.#si(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this.#si(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this.#si(i.l,this.spawnFillColor.l,f.l)),un(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(o&&f&&(this.spawnStrokeColor.h=this.#si(o.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this.#si(o.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this.#si(o.l,this.spawnStrokeColor.l,f.l)),pn(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=g.replace;i.color&&e.color&&un(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#Je(){if(this.#Ie)return;const t=void 0!==this.options.life.duration?G(this.options.life.duration):void 0;(this.#$e>0||this.#Ge)&&void 0!==t&&t>0&&(this.#Me=t*r)}#si(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const o=H(t.offset),a=G(this.options.rate.delay),l=n.retina.reduceFactor?a*r/n.retina.reduceFactor:1/0;return(e+G(t.speed)*n.fpsLimit/l+o*s)%i}}});t.AnimatableColor=le,t.AnimationOptions=se,t.AnimationValueWithRandom=ve,t.Background=ce,t.BaseRange=jt,t.Circle=Xt,t.ColorAnimation=oe,t.Fill=pe,t.FullScreen=he,t.HslAnimation=ae,t.Move=xe,t.MoveAngle=fe,t.MoveCenter=ge,t.MoveGravity=ye,t.MovePath=we,t.OptionLoader=Qt,t.Options=Le,t.OptionsColor=re,t.OutModes=Pe,t.Paint=Se,t.ParticlesBounce=Oe,t.ParticlesBounceFactor=Ce,t.ParticlesDensity=De,t.ParticlesNumber=Ie,t.ParticlesNumberLimit=ke,t.ParticlesOptions=Ee,t.RangedAnimationOptions=ne,t.RangedAnimationValueWithRandom=be,t.Rectangle=Yt,t.ResizeEvent=de,t.Shape=Te,t.Spin=Me,t.Stroke=ze,t.ValueWithRandom=me,t.Vector=C,t.Vector3d=S,t.ZIndex=_e,t.alterHsl=si,t.animate=B,t.areBoundsInside=ft,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/o,y:t.position.y*t.size.height/o}:void 0},t.calcPositionOrRandomFromSize=et,t.calcPositionOrRandomFromSizeRanged=it,t.calculateBounds=gt,t.cancelAnimation=V,t.canvasFirstIndex=0,t.canvasTag=g,t.checkDistance=Q,t.circleBounce=function(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,o]=[t.position,e.position],{dx:a,dy:r}=j(o,n);if(i*a+s*r<0)return;const l=-Math.atan2(r,a),c=t.mass,h=e.mass,d=t.velocity.rotate(l),u=e.velocity.rotate(l),p=tt(d,u,c,h),f=tt(u,d,c,h),g=p.rotate(-l),y=f.rotate(-l);t.velocity.x=g.x*t.factor.x,t.velocity.y=g.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:C.create(G(t.options.bounce.horizontal.value),G(t.options.bounce.vertical.value))}},t.clamp=U,t.cloneStyle=wt,t.collisionVelocity=tt,t.colorMix=Ze,t.colorToRgb=Ue,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=Z,t.deleteCount=1,t.double=2,t.doublePI=u,t.empty=0,t.executeOnSingleOrMultiple=mt,t.generatedAttribute=e,t.generatedFalse=f,t.generatedTrue=p,t.getDistance=Y,t.getDistanceSq=X,t.getDistances=j,t.getFullScreenStyle=xt,t.getHslAnimationFromHsl=Je,t.getHslFromAnimation=Ke,t.getItemMapFromInitializer=Ct,t.getItemsFromInitializer=St,t.getLinkColor=function(t,e,i){if(i===h)return Xe();if(i!==d)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return Ze(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return $e(t)}}},t.getLinkRandomColor=function(t,e,i,s){const n=D(e)?e:e.value;return n===h?s?Ve(t,{value:n}):i?h:d:n===d?d:Ve(t,{value:n})},t.getLogger=_t,t.getParticleBaseVelocity=J,t.getParticleDirectionAngle=K,t.getPosition=bt,t.getRandom=F,t.getRandomFn=function(){return R},t.getRandomInRange=A,t.getRandomRgbColor=Xe,t.getRangeMax=$,t.getRangeMin=W,t.getRangeValue=G,t.getStyleFromHsl=Qe,t.getStyleFromRgb=Ye,t.hMax=m,t.hMin=0,t.hPhase=60,t.half=a,t.hslToRgb=$e,t.hslToRgbFloat=qe,t.hslaToRgba=je,t.identity=1,t.inverseFactorNumerator=1,t.isArray=T,t.isBoolean=O,t.isFunction=function(t){return"function"==typeof t},t.isInArray=dt,t.isNull=_,t.isNumber=k,t.isObject=I,t.isPointInside=pt,t.isString=D,t.itemFromArray=ut,t.itemFromSingleOrMultiple=vt,t.lFactor=1,t.lMax=b,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){if(void 0!==i){const s=e;if("__proto__"===s||"constructor"===s||"prototype"===s)return;const n=t,o=Object.prototype.hasOwnProperty.call(n,s)?n[s]:{};n[s]=yt(o,i)}},t.loadLazyProperty=ee,t.loadMinIndex=0,t.loadNestedProperty=te,t.loadOptionProperty=ie,t.loadOptions=Zt,t.loadParticlesOptions=Re,t.loadProperty=Kt,t.loadRandomFactor=1e4,t.loadRangeProperty=Jt,t.manageListener=zt,t.maxNits=M,t.midColorValue=d,t.millisecondsToSeconds=r,t.minCount=0,t.minDistance=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minRadius=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=N,t.none=0,t.one=1,t.originPoint=l,t.parseAlpha=nt,t.percentDenominator=o,t.phaseNumerator=1,t.quarter=w,t.randomColorValue=h,t.randomInRangeValue=H,t.rangeColorToHsl=Ne,t.rangeColorToRgb=Ve,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=y,t.rgbToHsl=He,t.ribbons=Vs,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=lt,t.safeMatchMedia=ct,t.safeMutationObserver=ht,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){R=t},t.setRangeValue=q,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Be(t,e)?.a},t.stringToRgb=Ge,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,{loadExtendProperty:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadExtendProperty,loadLazyProperty:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadLazyProperty,loadMinIndex:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadMinIndex,loadNestedProperty:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadNestedProperty,loadOptionProperty:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadOptionProperty,loadOptions:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadOptions,loadParticlesOptions:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadParticlesOptions,loadProperty:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadProperty,loadRandomFactor:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadRandomFactor,loadRangeProperty:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadRangeProperty,tsParticles:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).tsParticles}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.ribbons||{}),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.ribbons=t.__tsParticlesInternals.bundles.ribbons||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",o=100,a=.5,r=1e3,l={x:0,y:0,z:0},c={a:1,b:0,c:0,d:1},d="random",h="mid",u=2*Math.PI,p="true",f="false",g="canvas",y=255,m=360,v=100,b=100,w=.25,P=.75,M=400;var x;function z(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(x=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",x.bottomLeft="bottom-left",x.bottomRight="bottom-right",x.left="left",x.none="none",x.right="right",x.top="top",x.topLeft="top-left",x.topRight="top-right",x.outside="outside",x.inside="inside";class S{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 S.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 S.create(t.x,t.y,z(t))}static create(t,e,i){return"number"==typeof t?new S(t,e??l.y,i??l.z):new S(t.x,t.y,z(t))}add(t){return S.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 S.clone(this)}div(t){return S.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return S.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 S.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 S.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 C extends S{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return C.create(l.x,l.y)}static clone(t){return C.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new C(t,e??l.y):new C(t.x,t.y)}}function O(t){return"boolean"==typeof t}function D(t){return"string"==typeof t}function k(t){return"number"==typeof t}function I(t){return"object"==typeof t&&null!==t}function T(t){return Array.isArray(t)}function _(t){return null==t}const E=Math.PI/180;let R=Math.random;const L={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function F(){return H(R(),0,1-Number.EPSILON)}function A(t,e){return F()*(e-t)+t}function B(t){return L.nextFrame(t)}function V(t){L.cancel(t)}function H(t,e,i){return Math.min(Math.max(t,e),i)}function N(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function U(t){const e=W(t);let i=G(t);return e===i&&(i=0),A(i,e)}function $(t){return k(t)?t:U(t)}function G(t){return k(t)?t:t.min}function W(t){return k(t)?t:t.max}function q(t,e){if(t===e||void 0===e&&k(t))return t;const i=G(t),s=W(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:q(i,s)}function j(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function X(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function Y(t,e){return Math.sqrt(X(t,e))}function Q(t,e,i){return X(t,e)<=i*i}function Z(t){return t*E}function K(e,i,s){if(k(e))return Z(e);switch(e){case t.MoveDirection.top:return-Math.PI*a;case t.MoveDirection.topRight:return-Math.PI*w;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*w;case t.MoveDirection.bottom:return Math.PI*a;case t.MoveDirection.bottomLeft:return Math.PI*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 F()*u}}function J(t){const e=C.origin;return e.length=1,e.angle=t,e}function tt(t,e,i,s){return C.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function et(t){return{x:(t.position?.x??F()*o)*t.size.width/o,y:(t.position?.y??F()*o)*t.size.height/o}}function it(t){const e={x:void 0!==t.position?.x?$(t.position.x):void 0,y:void 0!==t.position?.y?$(t.position.y):void 0};return et({size:t.size,position:e})}function st(t){const{position:e,size:i}=t;return{x:e?.x??F()*i.width,y:e?.y??F()*i.height}}function nt(t){return t?t.endsWith("%")?parseFloat(t)/o:parseFloat(t):1}var ot,at;t.OutModeDirection=void 0,(ot=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",ot.left="left",ot.right="right",ot.top="top",t.PixelMode=void 0,(at=t.PixelMode||(t.PixelMode={})).precise="precise",at.percent="percent";function rt(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function lt(){return globalThis.document}function ct(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function dt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function ht(t,e){return t===e||T(e)&&e.includes(t)}function ut(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(F()*t.length)]}function pt(t,e,i,s,n){return ft(gt(t,s??0),e,i,n)}function ft(e,i,s,n){let o=!0;return n&&n!==t.OutModeDirection.bottom||(o=e.top<i.height+s.x),!o||n&&n!==t.OutModeDirection.left||(o=e.right>s.x),!o||n&&n!==t.OutModeDirection.right||(o=e.left<i.width+s.y),!o||n&&n!==t.OutModeDirection.top||(o=e.bottom>s.y),o}function gt(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(_(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 bt(e,i){return function(e,i){if(e.mode!==t.PixelMode.percent){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/o*i.width,y:e.y/o*i.height}:{width:e.width/o*i.width,height:e.height/o*i.height}}(e,i)}function wt(t){const e=lt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||_(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const o=t.getPropertyPriority?.(s);o?e.setProperty(s,n,o):e.setProperty(s,n)}return e}let Pt,Mt;function xt(t){if(Pt!==t||!Mt){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)}Mt=e}return Mt}function zt(t,e,i,s,n){if(s){let s={passive:!0};O(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function St(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 Ot{#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 kt{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#o=new Set;#a=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#s.set(i,e),this.#n.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return 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 St(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#a&&!this.#r){this.#r=!0,this.#o=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#o,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#a=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#a)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#o,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const 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 _t(){return Tt}const Et="100%";class Rt{pluginManager=new kt(this);#d=[];#h=new Ot;#a=!1;get items(){return this.#d}get version(){return"4.4.0"}addEventListener(t,e){this.#h.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#h.dispatchEvent(t,e)}async init(){this.#a||(await this.pluginManager.init(),this.#a=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return gn}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*F()).toString()}`,{index:o,url:a}=t,r=a?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():(_t().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:a,index:o}):t.options,l=vt(r,o),{items:c}=this,d=c.findIndex(t=>t.id.description===n),h=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(h);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(d>=0){const t=this.item(d),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(d,e,h)}else c.push(h);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=lt();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,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(g).item(0);n?(s=n,s.dataset[e]=f):(s=i.createElement(g),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=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,Ft,At,Bt,Vt,Ht,Nt,Ut,$t,Gt,Wt,qt,jt;!function(t){t.circle="circle",t.rectangle="rectangle"}(Lt||(Lt={}));class Xt{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 Yt extends Xt{radius;constructor(t,e,i){super(t,e,Lt.circle),this.radius=i}contains(t){return Q(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),o=Math.abs(i.y-e.y);if(t instanceof Yt||t.type===Lt.circle){return s+t.radius>Math.hypot(n,o)}if(t instanceof Qt||t.type===Lt.rectangle){const e=t,{width:i,height:a}=e.size;return Math.pow(n-i,2)+Math.pow(o-a,2)<=s**2||n<=s+i&&o<=s+a||n<=i||o<=a}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Qt extends Xt{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 Yt)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,o=t.size,a=o.width,r=o.height;return n.x<s.x+e&&n.x+a>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}t.RotateDirection=void 0,(Ft=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Ft.counterClockwise="counter-clockwise",Ft.random="random",t.AnimationMode=void 0,(At=t.AnimationMode||(t.AnimationMode={})).auto="auto",At.increase="increase",At.decrease="decrease",At.random="random",t.HdrMode=void 0,(Bt=t.HdrMode||(t.HdrMode={})).standard="standard",Bt.natural="natural",Bt.vivid="vivid",Bt.cinematic="cinematic",Bt.dynamic="dynamic",t.LimitMode=void 0,(Vt=t.LimitMode||(t.LimitMode={})).delete="delete",Vt.wait="wait",t.OutMode=void 0,(Ht=t.OutMode||(t.OutMode={})).bounce="bounce",Ht.none="none",Ht.out="out",Ht.destroy="destroy",Ht.split="split",t.AlterType=void 0,(Nt=t.AlterType||(t.AlterType={})).darken="darken",Nt.enlighten="enlighten",t.DestroyType=void 0,(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,(Gt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Gt.inside="inside",Gt.outside="outside",t.StartValueType=void 0,(Wt=t.StartValueType||(t.StartValueType={})).max="max",Wt.min="min",Wt.random="random",t.AnimationStatus=void 0,(qt=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",qt.decreasing="decreasing",t.DrawLayer=void 0,(jt=t.DrawLayer||(t.DrawLayer={}))[jt.BackgroundElement=0]="BackgroundElement",jt[jt.BackgroundDraw=1]="BackgroundDraw",jt[jt.BackgroundMask=2]="BackgroundMask",jt[jt.CanvasSetup=3]="CanvasSetup",jt[jt.PluginContent=4]="PluginContent",jt[jt.Particles=5]="Particles",jt[jt.CanvasCleanup=6]="CanvasCleanup",jt[jt.Foreground=7]="Foreground";class Zt{load(t){_(t)||this.doLoad(t)}}function Kt(t,...e){for(const i of e)t.load(i)}function Jt(t,e,i){void 0!==i&&(t[e]=i)}function te(t,e,i){void 0!==i&&(t[e]=q(i))}function ee(t,e,i){void 0!==i&&t[e].load(i)}function ie(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function se(t,e,i,...s){const n=t;n[e]??=new i;const o=n[e];for(const t of s)o.load(t?.[e])}class ne extends Zt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){te(this,"count",t.count),Jt(this,"enable",t.enable),te(this,"speed",t.speed),te(this,"decay",t.decay),te(this,"delay",t.delay),Jt(this,"sync",t.sync)}}class oe extends ne{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),Jt(this,"mode",t.mode),Jt(this,"startValue",t.startValue)}}class ae extends ne{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Jt(this,"max",t.max),Jt(this,"min",t.min),te(this,"offset",t.offset)}}class re extends Zt{h=new ae(0,m);l=new ae(0,b);s=new ae(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class le extends Zt{value="";static create(t,e){const i=new le;return i.load(t),void 0!==e&&(D(e)||T(e)?i.load({value:e}):i.load(e)),i}doLoad(t){_(t.value)||(this.value=t.value)}}class ce extends le{animation=new re;static create(t,e){const i=new ce;return i.load(t),void 0!==e&&(D(e)||T(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class de extends Zt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new le,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=le.create(this.color,t.color)),Jt(this,"element",t.element),Jt(this,"draw",t.draw),Jt(this,"image",t.image),Jt(this,"position",t.position),Jt(this,"repeat",t.repeat),Jt(this,"size",t.size),Jt(this,"opacity",t.opacity)}}class he extends Zt{enable=!0;zIndex=0;doLoad(t){Jt(this,"enable",t.enable),Jt(this,"zIndex",t.zIndex)}}class ue extends Zt{enable=!0;mode=t.HdrMode.standard;peakNits=400;doLoad(e){if(void 0!==e.enable&&!O(e.enable))throw new Error(`Invalid HDR "enable" value: expected a boolean, got "${String(e.enable)}"`);if(void 0!==e.mode&&("string"!=typeof e.mode||!Object.values(t.HdrMode).includes(e.mode)))throw new Error(`Invalid HDR "mode" value: expected one of ${Object.values(t.HdrMode).join(", ")}, got "${i=e.mode,String(i)}"`);var i;if(void 0!==e.peakNits&&(!k(e.peakNits)||!Number.isFinite(e.peakNits)||e.peakNits<=0))throw new Error(`Invalid HDR "peakNits" value: expected a positive number, got "${String(e.peakNits)}"`);Jt(this,"enable",e.enable),Jt(this,"mode",e.mode),Jt(this,"peakNits",e.peakNits)}}class pe extends Zt{delay=.5;enable=!0;doLoad(t){Jt(this,"delay",t.delay),Jt(this,"enable",t.enable)}}class fe extends Zt{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))}Jt(this,"close",t.close),Jt(this,"type",t.type)}}class ge extends Zt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),Jt(this,"enable",t.enable),te(this,"opacity",t.opacity)}}class ye extends Zt{offset=0;value=90;doLoad(t){te(this,"offset",t.offset),te(this,"value",t.value)}}class me extends Zt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){Jt(this,"x",t.x),Jt(this,"y",t.y),Jt(this,"mode",t.mode),Jt(this,"radius",t.radius)}}class ve extends Zt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){te(this,"acceleration",t.acceleration),Jt(this,"enable",t.enable),Jt(this,"inverse",t.inverse),te(this,"maxSpeed",t.maxSpeed)}}class be extends Zt{value=0;doLoad(t){_(t.value)||(this.value=q(t.value))}}class we extends be{animation=new ne;doLoad(t){super.doLoad(t),ee(this,"animation",t.animation)}}class Pe extends we{animation=new oe}class Me extends Zt{clamp=!0;delay=new be;enable=!1;generator;options={};doLoad(t){Jt(this,"clamp",t.clamp),this.delay.load(t.delay),Jt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=yt(this.options,t.options))}}class xe extends Zt{bottom;default=t.OutMode.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class ze extends Zt{acceleration=0;enable=!1;position;doLoad(t){te(this,"acceleration",t.acceleration),Jt(this,"enable",t.enable),t.position&&(this.position=yt({},t.position))}}class Se extends Zt{angle=new ye;center=new me;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new ve;outModes=new xe;path=new Me;random=!1;size=!1;speed=2;spin=new ze;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(k(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),te(this,"decay",t.decay),Jt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=k(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),te(this,"drift",t.drift),Jt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(I(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Jt(this,"random",t.random),Jt(this,"size",t.size),te(this,"speed",t.speed),this.spin.load(t.spin),Jt(this,"straight",t.straight),Jt(this,"vibrate",t.vibrate),Jt(this,"warp",t.warp)}}class Ce extends Zt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),te(this,"width",t.width),te(this,"opacity",t.opacity)}}class Oe extends Zt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),ie(this,"fill",t.fill,()=>new ge),ie(this,"stroke",t.stroke,()=>new Ce)}}class De extends be{value=1}class ke extends Zt{horizontal=new De;vertical=new De;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Ie extends Zt{enable=!1;height=1080;width=1920;doLoad(t){Jt(this,"enable",t.enable),Jt(this,"width",t.width),Jt(this,"height",t.height)}}class Te extends Zt{mode=t.LimitMode.delete;value=0;doLoad(t){Jt(this,"mode",t.mode),Jt(this,"value",t.value)}}class _e extends Zt{density=new Ie;limit=new Te;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Jt(this,"value",t.value)}}class Ee extends Zt{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))}Jt(this,"close",t.close),Jt(this,"type",t.type)}}class Re extends be{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Jt(this,"opacityRate",t.opacityRate),Jt(this,"sizeRate",t.sizeRate),Jt(this,"velocityRate",t.velocityRate)}}class Le extends Zt{bounce=new ke;effect=new fe;groups={};move=new Se;number=new _e;paint;palette;reduceDuplicates=!1;shape=new Ee;zIndex=new Re;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Oe,this.paint.color=new ce,this.paint.color.value="#fff",this.paint.fill=new ge,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#f(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=yt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(T(e)?this.paint=mt(e,t=>{const e=new Oe;return e.load(t),e}):T(this.paint)?(this.paint=new Oe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(T(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function Fe(t,e,...i){const s=new Le(t,e);return Kt(s,...i),s}class Ae extends Zt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new de,this.fullScreen=new he,this.hdr=new ue,this.particles=Fe(this.#p,this.#u),this.resize=new pe}doLoad(e){void 0!==e.preset&&(this.preset=e.preset,mt(this.preset,t=>{this.#g(t)})),void 0!==e.palette&&(this.palette=e.palette,this.#f(this.palette)),Jt(this,"autoPlay",e.autoPlay),Jt(this,"clear",e.clear),Jt(this,"key",e.key),Jt(this,"name",e.name),te(this,"delay",e.delay),Jt(this,"detectRetina",e.detectRetina),te(this,"duration",e.duration),Jt(this,"fpsLimit",e.fpsLimit);const i=e.hdr;O(i)?(this.hdr.enable=i,this.hdr.mode=t.HdrMode.standard,this.hdr.peakNits=400):this.hdr.load(i),Jt(this,"pauseOnBlur",e.pauseOnBlur),Jt(this,"pauseOnOutsideViewport",e.pauseOnOutsideViewport),Jt(this,"zLayers",e.zLayers),this.background.load(e.background);const s=e.fullScreen;O(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(e.particles),this.resize.load(e.resize),this.style=yt(this.style,e.style),Jt(this,"smooth",e.smooth),this.#p.plugins.forEach(t=>{t.loadOptions(this.#u,this,e)})}#f(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#g(t){this.load(this.#p.getPreset(t))}}const Be=new Map,Ve=1.15,He=1.05,Ne=.2126,Ue=.7152,$e=.0722;function Ge(t,e){let i=Be.get(t);return i||(i=e(),Be.size>2e3&&Be.clear(),Be.set(t,i)),i}function We(t){return H(t*(2.51*t+.03)/(t*(2.43*t+.59)+.14),0,1)}function qe(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function je(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055}function Xe(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Ye(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return Qe(t,n.value,i,s);if(T(n.value)){const e=ut(n.value,i,s);if(!e)return;return Ye(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Qe(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return n.value===d?ni():Je(t,n.value);if(T(n.value)){const e=ut(n.value,i,s);if(!e)return;return Qe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ze(t,e,i,s=!0){const n=Ye(t,e,i,s);return n?Ke(n):void 0}function Ke(t){const e=t.r/y,i=t.g/y,s=t.b/y,n=Math.max(e,i,s),o=Math.min(e,i,s),r={h:0,l:(n+o)*a,s:0};return n!==o&&(r.s=r.l<a?(n-o)/(n+o):(n-o)/(2-n-o),r.h=e===n?(i-s)/(n-o):i===n?2+(s-e)/(n-o):4+(e-i)/(n-o)),r.l*=b,r.s*=v,r.h*=60,r.h<0&&(r.h+=m),r.h>=m&&(r.h-=m),r}function Je(t,e){return Xe(t,e)}function ti(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function ei(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/m,o=i/v,r=s/b;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const l=r<a?r*(1+o):r+o-r*o,c=2*r-l,d=1/3,h=Math.min(y,y*ti(c,l,n+d)),u=Math.min(y,y*ti(c,l,n)),p=Math.min(y,y*ti(c,l,n-d));return{r:Math.round(h),g:Math.round(u),b:Math.round(p)}}function ii(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/m,o=i/v,r=s/b;if(0===i){const t=r*y;return{r:t,g:t,b:t}}const l=r<a?r*(1+o):r+o-r*o,c=2*r-l,d=1/3;return{r:Math.min(y,y*ti(c,l,n+d)),g:Math.min(y,y*ti(c,l,n)),b:Math.min(y,y*ti(c,l,n-d))}}function si(t){const e=ei(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function ni(t,e){const i=t??0;if(e)return{r:A(i,y),g:A(i,y),b:A(i,y)};const s=()=>Math.floor(A(i,256));return{b:s(),g:s(),r:s()}}function oi(e,i,s,n,o){const a=i?4:2,r=s??1;return Ge(i?`rgb-${e.r.toFixed(a)}-${e.g.toFixed(a)}-${e.b.toFixed(a)}-hdr-${r.toString()}-${(n??M).toString()}-${o??t.HdrMode.standard}`:`rgb-${e.r.toFixed(a)}-${e.g.toFixed(a)}-${e.b.toFixed(a)}-sdr-${r.toString()}`,()=>i?function(e,i,s=400,n=t.HdrMode.standard){const o=s/203,a=function(e,i,s,n){const o=e.r/y,a=e.g/y,r=e.b/y;if(n!==t.HdrMode.natural&&n!==t.HdrMode.vivid&&n!==t.HdrMode.cinematic&&n!==t.HdrMode.dynamic)return{b:r,g:a,r:o};const l=Math.max(1,i),c=Ne*o+Ue*a+$e*r,d=function(t,e,i){if(t<=i)return We(t);const s=t+(t-i)*(e-1);return We(s)}(c,i,s),h=c>0?d/c:1;return function(e,i,s,n,o){switch(n){case t.HdrMode.vivid:{const t=(e+i+s)/3;return{b:H(H(t+(s-t)*Ve,0,o)*He,0,o),g:H(H(t+(i-t)*Ve,0,o)*He,0,o),r:H(H(t+(e-t)*Ve,0,o)*He,0,o)}}case t.HdrMode.cinematic:{const t=1.05*e,n=.95*s,a=(t+i+n)/3;return{b:H(a+1.1*(n-a),0,o),g:H(a+1.1*(i-a),0,o),r:H(a+1.1*(t-a),0,o)}}case t.HdrMode.dynamic:{const t=Ne*e+Ue*i+$e*s,n=Math.min(1,2*t),a=1-n,r=(e+i+s)/3,l=H(r+(e-r)*Ve,0,o)*He,c=H(r+(i-r)*Ve,0,o)*He,d=H(r+(s-r)*Ve,0,o)*He;return{b:H(s*a+d*n,0,o),g:H(i*a+c*n,0,o),r:H(e*a+l*n,0,o)}}case t.HdrMode.standard:case t.HdrMode.natural:default:return{b:s,g:i,r:e}}}(H(o*h,0,l),H(a*h,0,l),H(r*h,0,l),n,l)}(e,o,.18,n);return`color(display-p3 ${a.r.toString()} ${a.g.toString()} ${a.b.toString()} / ${(i??1).toString()})`}(e,s,n,o):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(e,s))}function ai(e,i,s,n,o){const a=i?4:2,r=s??1;return Ge(i?`hsl-${e.h.toFixed(a)}-${e.s.toFixed(a)}-${e.l.toFixed(a)}-hdr-${r.toString()}-${(n??M).toString()}-${o??t.HdrMode.standard}`:`hsl-${e.h.toFixed(a)}-${e.s.toFixed(a)}-${e.l.toFixed(a)}-sdr-${r.toString()}`,()=>i?oi(ii(e),!0,s,n,o):`hsla(${e.h.toString()}, ${e.s.toString()}%, ${e.l.toString()}%, ${r.toString()})`)}function ri(t,e,i,s,n){let o=t,a=e;if("r"in o||(o=n?ii(t):ei(t)),"r"in a||(a=n?ii(e):ei(e)),n){const t={b:qe(o.b/y),g:qe(o.g/y),r:qe(o.r/y)},e={b:qe(a.b/y),g:qe(a.g/y),r:qe(a.r/y)},n=i+s;return{b:je((t.b*i+e.b*s)/n)*y,g:je((t.g*i+e.g*s)/n)*y,r:je((t.r*i+e.r*s)/n)*y}}return{b:N(o.b,a.b,i,s),g:N(o.g,a.g,i,s),r:N(o.r,a.r,i,s)}}function li(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function ci(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:m},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:b}};return e&&(di(s.h,e.h,i),di(s.s,e.s,i),di(s.l,e.l,i)),s}function di(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=$(i.speed)/o*s,e.decay=1-$(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=$(i.count),e.time=0,e.delayTime=$(i.delay)*r,i.sync||(e.velocity*=F(),e.value*=F()),e.initialValue=e.value,e.offset=q(i.offset)):e.velocity=0}function hi(e,i,s,n){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const o=e.offset?U(e.offset):0,a=(e.velocity??0)*s.factor+3.6*o,r=e.decay??1,l=e.max,c=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=a,e.value<c&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=a,e.value>l&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=l)),e.velocity&&1!==r&&(e.velocity*=r),e.value=H(e.value,c,l)}function ui(t,e,i){if(!t)return;const{h:s,s:n,l:o}=t;hi(s,!1,e),hi(n,!0,e),hi(o,!0,e)}function pi(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const fi=function(){const t=globalThis.tsParticles;return t?.pluginManager?t:new Rt}();class gi{enable=!1;mode="destination-out";load(t){_(t)||(Jt(this,"mode",t.mode),Jt(this,"enable",t.enable))}}class yi{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 gi),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new gi,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function mi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new yi)})}class vi{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(l.x,l.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=I(s)?{min:Z(s.min),max:Z(s.max)}:{min:0,max:Z(s)}}}async function bi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new vi))})}var wi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(wi||(wi={}));const Pi=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Mi=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class xi{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(Pi,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Mi.exec(e);return i?{a:i[wi.a]?Number.parseInt(i[wi.a],16)/255:1,b:Number.parseInt(i[wi.b]??"0",16),g:Number.parseInt(i[wi.g]??"0",16),r:Number.parseInt(i[wi.r]??"0",16)}:void 0}}async function zi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new xi)})}var Si;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Si||(Si={}));const Ci=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Oi{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ei(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ei({h:$(e.h),l:$(e.l),s:$(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Ci.exec(t);return e?si({a:e.length>4?nt(e[Si.a]):1,h:Number.parseInt(e[Si.h]??"0",10),l:Number.parseInt(e[Si.l]??"0",10),s:Number.parseInt(e[Si.s]??"0",10)}):void 0}}async function Di(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Oi)})}class ki{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return vn});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Ii(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,Ct(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new ki(t.pluginManager))})}function Ti(e,i){const s=e.value,n=e.animation,o={delayTime:$(n.delay)*r,enable:n.enable,value:$(e.value)*i,max:W(s)*i,min:G(s)*i,loops:0,maxLoops:$(n.count),time:0};if(n.enable){switch(o.decay=1-$(n.decay),n.mode){case t.AnimationMode.increase:o.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:o.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:o.status=F()>=a?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:o.value=o.min,e&&(o.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:o.value=o.max,e&&(o.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:o.value=U(o),e&&(o.status=F()>=a?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return o.initialValue=o.value,o}function _i(e,i,s,n,o){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const a=(i.velocity??0)*o.factor,r=i.min,l=i.max,c=i.decay??1;i.time??=0;const d=i.delayTime??0;if(!(d>0&&i.time<d&&(i.time+=o.value,i.time<d))){switch(i.status){case t.AnimationStatus.increasing:i.value+=a;break;case t.AnimationStatus.decreasing:i.value-=a}switch(i.velocity&&1!==c&&(i.velocity*=c),i.status){case t.AnimationStatus.increasing:i.value>=l&&(i.status=t.AnimationStatus.decreasing,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(i.status=t.AnimationStatus.increasing,i.loops??=0,i.loops++)}!function(e,i,s,n,o){switch(i){case t.DestroyType.max:s>=o&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,l),e.destroyed||(i.value=H(i.value,r,l))}}class Ei extends oe{destroy=t.DestroyType.none;load(t){super.load(t),_(t)||Jt(this,"destroy",t.destroy)}}class Ri extends Pe{animation=new Ei;value=1;load(t){if(_(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Li{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Ti(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=$(i.speed)/o*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){se(t,"opacity",Ri,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&_i(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function Fi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Li(t)))})}class Ai{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 o=this.#u;let a=!1;for(const t of this.#m)if(a=t.particleBounce?.(e,s,i)??!1,a)break;if(a)return;const r=e.getPosition(),l=e.offset,c=e.getRadius(),d=gt(r,c),h=o.canvas.size,u=!e.isInsideCanvasForOutMode(n,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.left&&e.direction!==t.OutModeDirection.right)return;e.bounds.right<0&&e.direction===t.OutModeDirection.left?e.particle.position.x=e.size+e.offset.x:e.bounds.left>e.canvasSize.width&&e.direction===t.OutModeDirection.right&&(e.particle.position.x=e.canvasSize.width-e.size-e.offset.x);const i=e.particle.velocity.x;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.right&&i>0||e.direction===t.OutModeDirection.left&&i<0)){const t=$(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=$(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,s=!0}if(!s)return;const n=e.offset.y+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-n:e.outOfCanvas&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:d,canvasSize:h,offset:l,outOfCanvas:u,size:c})}}class Bi{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(this.modes.includes(n)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(n,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=j(e.position,e.moveCenter),{x:s,y:n}=e.velocity;if(s<0&&t>e.moveCenter.radius||n<0&&i>e.moveCenter.radius||s>=0&&t<-e.moveCenter.radius||n>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class Vi{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,s,n){if(!this.modes.includes(n))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const o=e.options.move.gravity,a=this.#u,r=a.canvas.size,c=e.getRadius();if(o.enable){const s=e.position;(!o.inverse&&s.y>r.height+c&&i===t.OutModeDirection.bottom||o.inverse&&s.y<-c&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+c||e.velocity.y<0&&e.position.y>=-c||e.velocity.x>0&&e.position.x<=r.width+c||e.velocity.x<0&&e.position.x>=-c)return;pt(e.position,a.canvas.size,l,c,i)||e.destroy()}}}const Hi=C.origin;class Ni{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const o=this.#u;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;Hi.setTo(l),Hi.length=e.moveCenter.radius,Hi.angle=e.velocity.angle+Math.PI,Hi.addTo(e.moveCenter);const{dx:s,dy:n}=j(e.position,Hi);if(t<=0&&s>=0||i<=0&&n>=0||t>=0&&s<=0||i>=0&&n<=0)return;e.position.x=Math.floor(U({min:0,max:o.canvas.size.width})),e.position.y=Math.floor(U({min:0,max:o.canvas.size.height}));const{dx:a,dy:r}=j(e.position,e.moveCenter);e.direction=Math.atan2(-r,-a),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(e.isInsideCanvasForOutMode(n,i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor(U({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(U({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=j(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction),e.justWarped=!0;break}case t.ParticleOutType.normal:{const s=e.options.move.warp,n=o.canvas.size,a={bottom:n.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:n.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),l=gt(e.position,r);i===t.OutModeDirection.right&&l.left>n.width+e.offset.x?(e.position.x=a.left,e.initialPosition.x=e.position.x,s||(e.position.y=F()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0):i===t.OutModeDirection.left&&l.right<-e.offset.x&&(e.position.x=a.right,e.initialPosition.x=e.position.x,s||(e.position.y=F()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0),i===t.OutModeDirection.bottom&&l.top>n.height+e.offset.y?(s||(e.position.x=F()*n.width,e.initialPosition.x=e.position.x),e.position.y=a.top,e.initialPosition.y=e.position.y,e.justWarped=!0):i===t.OutModeDirection.top&&l.bottom<-e.offset.y&&(s||(e.position.x=F()*n.width,e.initialPosition.x=e.position.x),e.position.y=a.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0);break}}}}}class Ui{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#v(e,t.OutMode.bounce,t=>new Ai(t)),this.#v(e,t.OutMode.out,t=>new Ni(t)),this.#v(e,t.OutMode.destroy,t=>new Bi(t)),this.#v(e,t.OutMode.none,t=>new Vi(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#b(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#b(e,i,s.left??s.default,t.OutModeDirection.left),this.#b(e,i,s.right??s.default,t.OutModeDirection.right),this.#b(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))}#b(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function $i(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Ui(t)))})}class Gi{#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,o=n??void 0,a=s?.fill,r=s?.stroke;if(a){const i=ce.create(void 0===o?void 0:ce.create(void 0,o),a.color);t.fillEnabled=a.enable,t.fillOpacity=$(a.opacity),t.fillAnimation=i.animation;const s=Ze(this.#p,i);s&&(t.fillColor=ci(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=ce.create(void 0===o?void 0:ce.create(void 0,o),r.color);t.strokeWidth=$(r.width)*e.retina.pixelRatio,t.strokeOpacity=$(r.opacity??1),t.strokeAnimation=i.animation;const s=Ze(this.#p,i)??t.getFillColor();s&&(t.strokeColor=ci(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,o=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),a=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(o||a)}update(t,e){this.isEnabled(t)&&(ui(t.fillColor,e,this.#u.hdr),ui(t.strokeColor,e,this.#u.hdr))}}async function Wi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Gi(t.pluginManager,e)))})}var qi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(qi||(qi={}));const ji=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Xi{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:$(e.r),g:$(e.g),b:$(e.b)}}parseString(t){if(!this.accepts(t))return;const e=ji.exec(t);return e?{a:e.length>4?nt(e[qi.a]):1,b:parseInt(e[qi.b]??"0",10),g:parseInt(e[qi.g]??"0",10),r:parseInt(e[qi.r]??"0",10)}:void 0}}async function Yi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Xi)})}class Qi extends oe{destroy=t.DestroyType.none;load(t){super.load(t),_(t)||Jt(this,"destroy",t.destroy)}}class Zi extends Pe{animation=new Qi;value=3;load(t){if(super.load(t),_(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Ki{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/o*e.retina.reduceFactor,s.sync||(t.size.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){se(t,"size",Zi,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Ti(i,e),t.retina.sizeAnimationSpeed=$(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&_i(t,t.size,0,t.options.size.animation.destroy,e)}}async function Ji(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Ki(t)))})}async function ts(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{await Promise.all([mi(t),zi(t),Di(t),Yi(t),Ii(t),bi(t),Wi(t),Fi(t),$i(t),Ji(t)])})}class es{count;delay;duration;wait=!1;load(t){_(t)||(Jt(this,"count",t.count),te(this,"delay",t.delay),te(this,"duration",t.duration),Jt(this,"wait",t.wait))}}class is{delay=.1;quantity=1;load(t){_(t)||(te(this,"quantity",t.quantity),te(this,"delay",t.delay))}}class ss{color=!1;opacity=!1;load(t){_(t)||(Jt(this,"color",t.color),Jt(this,"opacity",t.opacity))}}class ns{options={};replace=new ss;type="square";load(t){_(t)||(void 0!==t.options&&(this.options=yt({},t.options??{})),this.replace.load(t.replace),Jt(this,"type",t.type))}}class os{height=0;mode=t.PixelMode.percent;width=0;load(t){_(t)||(Jt(this,"mode",t.mode),Jt(this,"height",t.height),Jt(this,"width",t.width))}}class as{fill;stroke;load(t){_(t)||(t.fill&&(this.fill??=new ge,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new Ce,this.stroke.load(t.stroke)))}}class rs{autoPlay=!0;direction;domId;fill=!0;life=new es;name;particles;position;rate=new is;shape=new ns;size;spawn=new as;spawnFillColor;spawnStrokeColor;startCount=0;load(t){_(t)||(Jt(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new os,this.size.load(t.size)),Jt(this,"direction",t.direction),Jt(this,"domId",t.domId),Jt(this,"fill",t.fill),this.life.load(t.life),Jt(this,"name",t.name),this.particles=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=q(t.position.x)),void 0!==t.position.y&&(this.position.y=q(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new ce,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new ce,this.spawnStrokeColor.load(t.spawnStrokeColor)),Jt(this,"startCount",t.startCount))}}class ls{id="emitters";#w;constructor(t){this.#w=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return bn});return new e(this.#w,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=mt(i.emitters,t=>{const e=new rs;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return T(e)&&!!e.length||void 0!==e}}const cs=new WeakMap;class ds{fill;options;position;size;constructor(t,e,i,s){this.position=t,this.size=e,this.fill=i,this.options=s}resize(t,e){this.position=t,this.size=e}}var hs;async function us(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=cs.get(e);return i||(i=Promise.resolve().then(function(){return Mn}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw cs.delete(e),t}),cs.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return Pn}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new ls(e))})}!function(t){t.emitter="emitter"}(hs||(hs={}));var ps;function fs(t,e){return t+e*(F()-a)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}(ps||(ps={}));class gs extends ds{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:fs(e.x,i.width),y:fs(e.y,i.height)}};{const t=i.width*a,s=i.height*a,n=function(t){return Math.floor(F()*t)}(4),o=2*(F()-a);switch(n){case ps.TopLeft:return{position:{x:e.x+o*t,y:e.y-s}};case ps.TopRight:return{position:{x:e.x-t,y:e.y+o*s}};case ps.BottomRight:return{position:{x:e.x+o*t,y:e.y+s}};case ps.BottomLeft:default:return{position:{x:e.x+t,y:e.y+o*s}}}}}}class ys{generate(t,e,i,s,n){return new gs(e,i,s,n)}}async function ms(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{!function(t){if(!t.pluginManager.addEmitterShapeGenerator)throw new Error("tsParticles Emitters Plugin is not loaded")}(t),t.pluginManager.addEmitterShapeGenerator?.("square",new ys)})}class vs extends be{sync=!1;load(t){_(t)||(super.load(t),Jt(this,"sync",t.sync))}}class bs extends be{sync=!1;load(t){_(t)||(super.load(t),Jt(this,"sync",t.sync))}}class ws{count=0;delay=new vs;duration=new bs;load(t){_(t)||(Jt(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Ps{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const s=i.delay.sync?1:F(),n=i.duration.sync?1:F();t.life={delay:e.retina.reduceFactor?$(i.delay.value)*s/e.retina.reduceFactor*r:0,delayTime:0,duration:e.retina.reduceFactor?$(i.duration.value)*n/e.retina.reduceFactor*r:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){se(t,"life",ws,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const o=q(0,i.width),a=q(0,i.width);t.position.x=U(o),t.position.y=U(a),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const l=t.options.life;l&&(s.delay=$(l.delay.value)*r,s.duration=$(l.duration.value)*r)}(t,e,this.#u.canvas.size)}}async function Ms(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new Ps(t)))})}class xs{factor=4;value=!0;load(t){_(t)||(Jt(this,"factor",t.factor),Jt(this,"value",t.value))}}class zs{disable=!0;reduce=new xs;load(t){_(t)||(Jt(this,"disable",t.disable),this.reduce.load(t.reduce))}}class Ss{id="motion";async getPlugin(t){const{MotionPluginInstance:e}=await Promise.resolve().then(function(){return xn});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.motion;s?.load||(e.motion=s=new zs),s.load(i?.motion)}needsPlugin(){return!0}}async function Cs(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Ss)})}const Os=.5;function Ds(t){return t.ribbonParticleDist??8}function ks(t){return t.ribbonOscillationSpeed??3}function Is(t){return t.ribbonOscillationDistance??40}function Ts(t){const e=t.shapeData,i=Math.max(4,Math.round($(e?.count??30))),s=$(e?.particleDist??8),n=$(e?.mass??1),o=$(e?.drag??.05),a=$(e?.velocityInherit??5),r=$(e?.oscillationSpeed??3),l=$(e?.oscillationDistance??40),c=$(e?.angle??45),d=Math.PI/180*c,h=C.create(t.position.x,t.position.y);if(!t.ribbonBounds)return;t.ribbonParticleDist=s,t.ribbonMass=n,t.ribbonDrag=o,t.ribbonVelocityInherit=a,t.ribbonOscillationSpeed=r,t.ribbonOscillationDistance=l,t.ribbonTime=100*F(),t.ribbonOffsets=C.create(Math.cos(d),Math.sin(d)),t.ribbonHead=h,t.ribbonPreviousHead=C.create(h.x,h.y),t.ribbonPreviousPosition=C.create(t.position.x,t.position.y);const u=t.velocity.angle+Math.PI,p=s*Os;t.ribbonPoints=new Array(i);for(let e=0;e<i;e++){const i=e*s,n=(F()-Os)*p,o=u+Math.PI*Os;t.ribbonPoints[e]={force:C.origin,position:C.create(h.x+Math.cos(u)*i+Math.cos(o)*n,h.y+Math.sin(u)*i+Math.sin(o)*n),velocity:C.origin}}}function _s(t){const e=t.ribbonPoints,i=t.ribbonBounds,s=i?.x??0,n=i?.y??0,o=C.create(F()*s,-F()*n);if(i)if(e?.length){t.position.x=o.x,t.position.y=o.y,t.ribbonHead=C.create(o.x,o.y),t.ribbonPreviousHead=C.create(o.x,o.y),t.ribbonPreviousPosition=C.create(o.x,o.y),t.ribbonTime=100*F();for(let i=0;i<e.length;i++){const s=e[i];s&&(s.position=C.create(o.x,o.y-i*Ds(t)),s.force=C.origin,s.velocity=C.origin)}}else Ts(t)}function Es(t,e,i){const s=t.ribbonPoints?.[e];s&&s.force.addTo(i)}function Rs(t,e,i){const s=t.ribbonPoints?.[e];if(!s)return;const n=function(t){return t.ribbonMass??1}(t),o=function(t){return t.ribbonDrag??.05}(t),a=C.create(s.force.x,s.force.y),r=s.velocity.length,l=C.create(s.velocity.x,s.velocity.y);l.multTo(o*n*r),a.subFrom(l);const c=a.div(n);s.position.addTo(s.velocity.mult(i)),s.velocity.addTo(c.mult(i)),s.force=C.origin}function Ls(t){const{particle:e,delta:i}=t,s=e.ribbonPoints,n=e.ribbonOffsets,o=e.ribbonBounds;if(!s?.length||!n||!o)return;const a=Math.min(.02,Math.max(i.value/1e3,1e-6)),r=function(t){return t.ribbonHead??=C.create(t.position.x,t.position.y),t.ribbonHead}(e),l=function(t){return t.ribbonPreviousHead??=C.create(t.position.x,t.position.y),t.ribbonPreviousHead}(e),c=function(t){return t.ribbonVelocityInherit??5}(e),d=e.options.move.enable;if(e.ribbonTime=(e.ribbonTime??0)+a*ks(e),d?(r.x=e.position.x+Math.cos(e.ribbonTime)*Is(e)/ks(e),r.y=e.position.y):r.x+=Math.cos(e.ribbonTime)*Is(e)*a,e.justWarped){const t=e.velocity.angle+Math.PI,i=Ds(e),n=s[0];n&&(n.position=C.create(r.x,r.y),n.velocity=C.origin,n.force=C.origin);for(let e=1;e<s.length;e++){const n=s[e];if(!n)continue;const o=e*i;n.position=C.create(r.x+Math.cos(t)*o,r.y+Math.sin(t)*o),n.velocity=C.origin,n.force=C.origin}}const h=Ds(e);if(!Number.isFinite(r.x)||!Number.isFinite(r.y))return void _s(e);const u=s[0];if(!u)return;u.position=C.create(r.x,r.y);const p=l.x-r.x,f=l.y-r.y,g=Math.sqrt(p*p+f*f),y=Math.min(g/a*c,800);e.ribbonPreviousHead=C.create(r.x,r.y),e.ribbonPreviousPosition=C.create(e.position.x,e.position.y);for(let t=1;t<s.length;t++){const i=s[t],n=s[t-1];if(!i||!n)continue;const o=n.position.sub(i.position).copy();o.normalize(),o.multTo(y),Es(e,t,o)}for(let t=1;t<s.length;t++)Rs(e,t,a);for(let t=1;t<s.length;t++){const i=s[t],n=s[t-1];if(!i||!n)continue;const o=i.position.sub(n.position).copy();if(o.normalize(),o.multTo(h),i.position=n.position.add(o),!(Number.isFinite(i.position.x)&&Number.isFinite(i.position.y)&&Number.isFinite(i.velocity.x)&&Number.isFinite(i.velocity.y)))return void _s(e)}}function Fs(t,e,i,s,n,o){return(t-i)*(o-s)-(e-s)*(n-i)}function As(t,e){return C.create((t.x+e.x)*Os,(t.y+e.y)*Os)}function Bs(t,e){t.beginPath(),t.moveTo(e.a.x,e.a.y),t.lineTo(e.b.x,e.b.y),t.lineTo(e.c.x,e.c.y),e.d&&t.lineTo(e.d.x,e.d.y),t.closePath(),e.stroke&&t.stroke(),e.fill&&t.fill()}function Vs(t,e,i,s,n,o,a,r,l){o?(Bs(t,{a:e,b:i,c:As(i,n),fill:r,stroke:l}),Bs(t,{a:n,b:s,c:As(i,n),fill:r,stroke:l})):a?(Bs(t,{a:e,b:i,c:As(e,s),fill:r,stroke:l}),Bs(t,{a:n,b:s,c:As(e,s),fill:r,stroke:l})):Bs(t,{a:e,b:i,c:n,d:s,fill:r,stroke:l})}function Hs(e,i,s,n){const{context:o,particle:a,radius:r}=e,l=a.ribbonPoints,c=a.ribbonOffsets,d=a.ribbonBounds,h=e.fill,u=e.stroke;if(!l||!c||!d||l.length<4||!h&&!u)return;const p=c.mult(r),f=a.position,g="string"==typeof o.fillStyle?o.fillStyle:"",y="string"==typeof o.strokeStyle?o.strokeStyle:"",m=function(e,i,s,n,o,a,r,l){let c=e?s:i;if(n?.backColor)c=n.backColor;else if(n?.darken?.enable){const e=li(o.fillColor);e&&(c=ai(pi(e,t.AlterType.darken,$(n.darken.value)),a,void 0,r,l))}else if(n?.enlighten?.enable){const e=li(o.fillColor);e&&(c=ai(pi(e,t.AlterType.enlighten,$(n.enlighten.value)),a,void 0,r,l))}return c}(u,g,y,a.shapeData,a,i,s,n);o.lineWidth=1,o.lineJoin="round",o.lineCap="round";for(let t=0;t<l.length-1;t++){const e=l[t],i=l[t+1];if(!e||!i)continue;const s=e.position.add(p),n=i.position.add(p),a=e.position.sub(f),r=i.position.sub(f),c=s.sub(f),y=n.sub(f),v=Math.min(e.position.y,i.position.y,s.y,n.y),b=Math.max(e.position.y,i.position.y,s.y,n.y),w=Fs(e.position.x,e.position.y,i.position.x,i.position.y,n.x,n.y)<0?g:m;v>d.y+p.length||b<-p.length||(o.fillStyle=w,u&&(o.strokeStyle=w),0===t?Vs(o,a,r,c,y,!0,!1,h,u):t===l.length-2?Vs(o,a,r,c,y,!1,!0,h,u):Vs(o,a,r,c,y,!1,!1,h,u))}o.fillStyle=g,u&&(o.strokeStyle=y),o.beginPath()}function Ns(t,e,i){!function(t,e,i){t.ribbonBounds=C.create(e,i)}(t,e,i),t.ribbonPoints?.length||Ts(t)}function Us(t){return Math.max(4,Math.round($(t.shapeData?.count??30)))}function $s(e,i,s,n,o,a){const{canvasSize:r,direction:l}=e;return l===t.OutModeDirection.bottom?n<=r.height+a:l===t.OutModeDirection.left?s>=-a:l===t.OutModeDirection.right?i<=r.width+a:l===t.OutModeDirection.top?o>=-a:s>=-a&&o>=-a&&i<=r.width+a&&n<=r.height+a}class Gs{#u;constructor(t){this.#u=t}draw(t){const e=this.#u.canvas.size;Ns(t.particle,e.width,e.height),t.particle.ribbonPoints&&t.particle.ribbonPoints.length!==Us(t.particle)&&Ts(t.particle),Ls(t),Hs(t,this.#u.hdr,this.#u.peakNits,this.#u.hdrMode)}getSidesCount(t){const e=t.ribbonPoints?.length;return e?Math.max(12,2*e):12}isInsideCanvas(e){const{outMode:i,particle:s,radius:n}=e,o=s.ribbonPoints,a=s.ribbonOffsets,r=s.position,l=i===t.OutMode.destroy||i===t.OutMode.out,c=(a?.length??0)*n,d=Math.max(n,c);if(!l)return $s(e,r.x-d,r.x+d,r.y-d,r.y+d,0);if(!o?.length||!a)return $s(e,r.x-d,r.x+d,r.y-d,r.y+d,0);let h=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,p=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY;for(const t of o){const e=t.position.x,i=t.position.y,s=e+a.x*n,o=i+a.y*n;h=Math.min(h,e,s),u=Math.max(u,e,s),p=Math.min(p,i,o),f=Math.max(f,i,o)}if(!(Number.isFinite(h)&&Number.isFinite(p)&&Number.isFinite(u)&&Number.isFinite(f)))return!1;const g=s.ribbonOscillationSpeed&&s.ribbonOscillationDistance?s.ribbonOscillationDistance/s.ribbonOscillationSpeed:0;return $s(e,h,u,p,f,Math.max(d,s.ribbonParticleDist??0)+g)}loadShape(t){if(!t.shapeData)return;const e=Us(t);t.ribbonPoints?.length&&t.ribbonPoints.length===e||Ts(t)}particleDestroy(t){delete t.ribbonPoints,delete t.ribbonHead,delete t.ribbonPreviousHead,delete t.ribbonPreviousPosition,delete t.ribbonTime,delete t.ribbonOffsets,delete t.ribbonParticleDist,delete t.ribbonMass,delete t.ribbonDrag,delete t.ribbonVelocityInherit,delete t.ribbonOscillationSpeed,delete t.ribbonOscillationDistance}particleInit(t,e){Ns(e,t.canvas.size.width,t.canvas.size.height)}}async function Ws(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["ribbon"],t=>Promise.resolve(new Gs(t)))})}class qs{colors;count;disableForReducedMotion;emitterSize;positionX;ribbonOptions;scalar;zIndex;constructor(){this.count=5,this.emitterSize={width:100,height:0},this.positionX=50,this.colors=["#FF0055","#00D1FF","#FFD23F","#61FF7E","#B284FF"],this.ribbonOptions={angle:45,darken:{enable:!0,value:30},count:60,drag:.02,mass:1,oscillationDistance:{min:100,max:140},oscillationSpeed:{min:3,max:5},particleDist:8,velocityInherit:{min:4,max:6}},this.scalar=1,this.zIndex=100,this.disableForReducedMotion=!0}get origin(){return{x:this.positionX/o,y:0}}set origin(t){this.positionX=t.x*o}get particleCount(){return this.count}set particleCount(t){this.count=t}get position(){return{x:this.positionX,y:0}}set position(t){this.positionX=t.x}load(t){if(_(t))return;const e=t.count??t.particleCount;if(void 0!==e&&(this.count=e),t.emitterSize&&(void 0!==t.emitterSize.width&&(this.emitterSize.width=t.emitterSize.width),void 0!==t.emitterSize.height&&(this.emitterSize.height=t.emitterSize.height)),Jt(this,"positionX",t.positionX),void 0===t.positionX){const e=t.origin;e&&!t.position&&(t.position={x:void 0===e.x?void 0:e.x*o,y:0});const i=t.position;i&&void 0!==i.x&&(this.positionX=i.x)}void 0!==t.colors&&(T(t.colors)?this.colors=[...t.colors]:this.colors=t.colors),void 0!==t.ribbonOptions&&(this.ribbonOptions=yt({},t.ribbonOptions)),Jt(this,"scalar",t.scalar),Jt(this,"zIndex",t.zIndex),Jt(this,"disableForReducedMotion",t.disableForReducedMotion)}}const js=new Map;async function Xs(t,e){const i=new qs;i.load(e.options);let s=js.get(e.id);s instanceof Promise&&(await s,s=js.get(e.id));const n=s;if(n&&!n.destroyed){const t=n;if("addEmitter"in t)return await async function(t,e){await(t.addEmitter?.({startCount:e.count,position:{x:e.positionX,y:0},shape:{type:"square"},size:{width:e.emitterSize.width,height:e.emitterSize.height},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{paint:{fill:{color:{value:e.colors},enable:!0}},shape:{type:"ribbon",options:{ribbon:e.ribbonOptions}},life:{count:1},size:{value:8*e.scalar},move:{direction:"bottom",enable:!0,outModes:{top:"none",default:"destroy"},speed:{min:4,max:6}},roll:{enable:!1},rotate:{value:0,move:!1,animation:{enable:!1}},tilt:{enable:!1},wobble:{enable:!1}}}))}(t,i),n}const o=(async()=>{const s=function(t,e){return{fullScreen:{enable:!e.canvas,zIndex:t.zIndex},fpsLimit:120,particles:{number:{value:0},paint:{fill:{color:{value:t.colors},enable:!0}},shape:{type:"ribbon",options:{ribbon:t.ribbonOptions}},size:{value:8*t.scalar},links:{enable:!1},life:{count:1},move:{direction:"bottom",enable:!0,outModes:{top:"none",default:"destroy"},speed:{min:4,max:6}},roll:{enable:!1},rotate:{value:0,move:!1,animation:{enable:!1}},tilt:{enable:!1},wobble:{enable:!1}},motion:{disable:t.disableForReducedMotion},emitters:{name:"ribbons",startCount:t.count,position:{x:t.positionX,y:0},shape:{type:"square"},size:{width:t.emitterSize.width,height:t.emitterSize.height},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}}}(i,e),n=await t.load({id:e.id,element:e.canvas,options:s});return js.set(e.id,n),n})();return js.set(e.id,o),o}let Ys=null;async function Qs(t){return Ys||(Ys=async function(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{await Promise.all([ts(t),Cs(t),(async t=>{await us(t),await ms(t)})(t),Ws(t),Ms(t)])})}(t),Ys)}async function Zs(t,e){let i,s;return await Qs(fi),D(t)?(s=t,i=e??{}):(s="ribbons",i=t??{}),Xs(fi,{id:s,options:i})}Zs.create=async(t,e={})=>{await Qs(fi);const i=t?.getAttribute("id")??"ribbons";return t?.setAttribute("id",i),await Xs(fi,{id:i,canvas:t??void 0,options:e}),async(s,n)=>{let o,a;return D(s)?(a=s,o=n??e):(a=i,o=s??e),Xs(fi,{id:a,canvas:t??void 0,options:o})}},Zs.init=async()=>{await Qs(fi)},Zs.version="4.4.0",globalThis.ribbons=Zs;const Ks=globalThis;Ks.ribbons=Zs,Ks.tsParticles=fi;function Js(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class tn{#P;#M;#x;#z;#S;#u;#C;#O;#D;#k;#I;#T;#p;#_;#E;#R={};#L=[void 0,void 0];#F={};constructor(t,e,i){this.#p=t,this.#u=e,this.#z=i,this.#C=null,this.#P=null,this.#M=new Set,this.#E=[],this.#_=[],this.#x=[],this.#S=[],this.#D=[],this.#k=[],this.#I=[],this.#T={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.#z.size.width,this.#z.size.height)})}clear(){for(const t of this.#x)if(t.canvasClear?.())return;for(const e of Object.values(t.DrawLayer))if("number"==typeof e)for(const t of this.#A(e))if(t.canvasClear?.())return;this.canvasClear()}destroy(){this.stop(),this.#P=null,this.#M.clear(),this.#E=[],this.#_=[],this.#x=[],this.#S=[],this.#D=[],this.#k=[],this.#I=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#T[e]=[])}draw(t){const e=this.#C;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[o,a]=this.#B(t);if(o??=s,a??=n,!o&&!a)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:d,opacity:h,strokeOpacity:u}=t.getOpacity(),p=this.#F,f=this.#R,g=o?ai(o,r.hdr,d*h,r.peakNits,r.hdrMode):void 0,y=a?ai(a,r.hdr,u*h,r.peakNits,r.hdrMode):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=y,this.draw(s=>{for(const i of this.#I)i.drawParticleSetup?.(s,t,e);this.#V(s,t,i,h,f,p),this.#H({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:h,transform:p}),this.#N(t);for(const i of this.#k)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#D)this.#U(i,s,t,e)})}drawParticles(e){const{particles:i,actualOptions:s}=this.#u;this.clear(),i.update(e),this.draw(n=>{const o=this.#z.size.width,a=this.#z.size.height;if(this.#P)try{n.drawImage(this.#P,l.x,l.y,o,a)}catch{this.#$("background-element-draw-error","Error drawing background element onto canvas")}const r=s.background;if(r.draw)try{r.draw(n,e)}catch{this.#$("background-draw-error","Error in background.draw callback")}for(const e of this.#A(t.DrawLayer.BackgroundMask))e.canvasPaint?.();for(const i of this.#A(t.DrawLayer.CanvasSetup))i.drawSettingsSetup?.(n,e);for(const i of this.#A(t.DrawLayer.PluginContent))i.draw?.(n,e);i.drawParticles(e);for(const i of this.#A(t.DrawLayer.CanvasCleanup))i.clearDraw?.(n,e),i.drawSettingsCleanup?.(n,e)})}init(){this.initUpdaters(),this.initPlugins(),this.#G(),this.paint()}initPlugins(){this.#x=[],this.#S=[],this.#D=[],this.#I=[],this.#k=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#T[e]=[]);for(const e of this.#u.plugins)(e.particleFillColor??e.particleStrokeColor)&&this.#S.push(e),e.drawParticle&&this.#D.push(e),e.drawParticleSetup&&this.#I.push(e),e.drawParticleCleanup&&this.#k.push(e),e.canvasClear&&this.#x.push(e),e.canvasPaint&&this.#A(t.DrawLayer.BackgroundMask).push(e),e.drawSettingsSetup&&this.#A(t.DrawLayer.CanvasSetup).push(e),e.draw&&this.#A(t.DrawLayer.PluginContent).push(e),(e.clearDraw??e.drawSettingsCleanup)&&this.#A(t.DrawLayer.CanvasCleanup).push(e)}initUpdaters(){this.#E=[],this.#_=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#_.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#E.push(t)}paint(){let e=!1;for(const i of this.#A(t.DrawLayer.BackgroundMask))if(e=i.canvasPaint?.()??!1,e)break;e||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(l.x,l.y,this.#z.size.width,this.#z.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.#z.size.width,this.#z.size.height),i.globalAlpha=s})}setContext(t){this.#C=t,this.#C&&(this.#C.globalCompositeOperation=i)}setContextSettings(t){this.#O=t}stop(){this.draw(t=>{t.clearRect(l.x,l.y,this.#z.size.width,this.#z.size.height)})}#N(t){for(const e of this.#_)e.afterDraw?.(t)}#V(t,e,i,s,n,o){for(const a of this.#E){if(a.getColorStyles){const{fill:o,stroke:r}=a.getColorStyles(e,t,i,s);o&&(n.fill=o),r&&(n.stroke=r)}if(a.getTransformValues){const t=a.getTransformValues(e);for(const e in t)Js(o,t,e)}a.beforeDraw?.(e)}}#W(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#q(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#H(t){const{container:e,context:i,particle:s,delta:n,colorStyles:o,radius:a,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:d}=e,h=s.getPosition(),u=s.getTransformData(l),p={x:h.x,y:h.y};i.setTransform(u.a,u.b,u.c,u.d,h.x,h.y),o.fill&&(i.fillStyle=o.fill);const f=!!s.fillEnabled,g=s.strokeWidth??0;i.lineWidth=g,o.stroke&&(i.strokeStyle=o.stroke);const y={context:i,particle:s,radius:a,drawRadius:1*a,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:f,stroke:g>0,transformData:u,position:{...h},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(y);const m=s.effect?c.get(s.effect):void 0,v=s.shape?d.get(s.shape):void 0;this.#q(m,y),this.#j(v,y),this.#X(v,y),this.#Y(v,y),this.#W(m,y),i.resetTransform()}#U(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#X(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:o}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),o&&i.stroke())}#Y(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#j(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#A(t){return this.#T[t]}#B(t){let e,i;for(const s of this.#S)if(!e&&s.particleFillColor&&(e=Ze(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ze(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#L[0]=e,this.#L[1]=i,this.#L}#G(){const t=this.#u.actualOptions.background;if(this.#P=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement||"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?this.#P=e:e?this.#$("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#$("background-element-not-found",`Background element selector "${t.element}" not found`)}}else("undefined"!=typeof HTMLCanvasElement&&t.element instanceof HTMLCanvasElement||"undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas||"undefined"!=typeof HTMLVideoElement&&t.element instanceof HTMLVideoElement||"undefined"!=typeof HTMLImageElement&&t.element instanceof HTMLImageElement)&&(this.#P=t.element)}#$(t,e){this.#M.has(t)||(this.#M.add(t),_t().warning(e))}}const en=new WeakMap;function sn(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 nn{domElement;render;renderCanvas;size;zoom=1;#u;#Q;#Z;#K;#J;#p;#tt;#et;#it;#st;constructor(t,e){this.#p=t,this.#u=e,this.render=new tn(t,e,this),this.#it={height:0,width:0};const i=e.retina.pixelRatio,s=this.#it;this.size={height:s.height*i,width:s.width*i},this.#Q=!1,this.#et=[],this.#tt="none"}get#nt(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#Q){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#ot();this.render.destroy(),this.#et=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#st?this.#st:{x:e*a/t,y:i*a/t}}init(){this.#at(t=>{t.disconnect()}),this.#K=dt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#rt()}),this.resize(),this.#lt(),this.#at(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#ct(),this.initBackground(),this.#dt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Ye(this.#p,e.color);if(n){const i=t.actualOptions.hdr;s.backgroundColor=oi(n,t.hdr,e.opacity,i.peakNits,i.mode)}else s.backgroundColor="";s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#et=[];for(const t of this.#u.plugins)t.resize&&this.#et.push(t)}loadCanvas(t){this.#Q&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#Q=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=en.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 en.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#J=wt(s.style));const n=this.#it,o=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=o.height,n.width=o.width);const a=this.#u.retina.pixelRatio,r=this.size;o.height=r.height=n.height*a,o.width=r.width=n.width*a}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#it,n={width:t.offsetWidth,height:t.offsetHeight},o=e.retina.pixelRatio,a={width:n.width*o,height:n.height*o};if(n.height===s.height&&n.width===s.width&&a.height===i.height&&a.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=a.width,i.height=l.height=a.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#tt=t,this.#rt())}setZoom(t,e){this.zoom=t,this.#st=e}stop(){this.#at(t=>{t.disconnect()}),this.#K=void 0,this.#ht(),this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#ut(),e&&await t.refresh()}#ut(){for(const t of this.#et)t.resize?.()}#ct(){const t=this.#u,e=t.actualOptions.hdr.enable&&ct("(color-gamut: p3)")?.matches&&ct("(dynamic-range: high)")?.matches;t.hdr=e??!1,t.hdrMode=t.actualOptions.hdr.mode,t.peakNits=t.actualOptions.hdr.peakNits;const i=this.renderCanvas;if(!i)return;let s;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...e?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});try{s=i.getContext("2d",this.render.settings)}catch{s=null}if(e&&!s){t.hdr=!1;const e={alpha:!0,desynchronized:!0,willReadFrequently:!1,colorSpace:"srgb"};this.render.setContextSettings(e);try{s=i.getContext("2d",e)}catch{s=null}}this.render.setContext(s)}#dt(){this.#ht();const t=ct("(color-gamut: p3)"),e=ct("(dynamic-range: high)"),i=()=>{this.#pt(),this.#ct(),this.initBackground()},s=[];t&&(t.addEventListener("change",i),s.push({handler:i,mql:t})),e&&(e.addEventListener("change",i),s.push({handler:i,mql:e})),this.#Z=s}#lt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#nt?this.#ft():this.#ot();for(const i in e.style){if(!i||!(i in e.style))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}}#pt(){const t=this.renderCanvas;t&&(this.domElement||(this.renderCanvas=new OffscreenCanvas(t.width,t.height)))}#ht(){if(this.#Z){for(const{handler:t,mql:e}of this.#Z)e.removeEventListener("change",t);this.#Z=void 0}}#rt(){const t=this.domElement;if(!t)return;this.#at(t=>{t.disconnect()}),this.#lt(),this.initBackground();const e=this.#tt;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#at(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#ot(){const t=this.domElement,e=this.#J;t&&e&&sn(t,e,!0)}#at(t){this.#K&&t(this.#K)}#ft(){const t=this.domElement;t&&sn(t,xt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class on{#u;#gt;#yt;#mt;constructor(t){this.#u=t,this.#gt={visibilityChange:()=>{this.#vt()},resize:()=>{this.#bt()}}}addListeners(){this.#wt(!0)}removeListeners(){this.#wt(!1)}#vt(){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)))}#bt(){this.#mt&&(clearTimeout(this.#mt),this.#mt=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#mt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*r)}#wt(t){const e=this.#gt;this.#Pt(t),zt(document,n,e.visibilityChange,t,!1)}#Pt(t){const e=this.#gt,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void zt(globalThis,s,e.resize,t);const n=i.canvas.domElement;this.#yt&&!t?(n&&this.#yt.unobserve(n),this.#yt.disconnect(),this.#yt=void 0):!this.#yt&&t&&n&&(this.#yt=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this.#bt()}),this.#yt.observe(n))}}function an(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 rn(t,e){const i=t%e;return i<0?i+e:i}function ln(t,e,i,s){const n=Fe(i,e,e.actualOptions.particles),o=n.reduceDuplicates;t.effect=vt(n.effect.type,t.id,o),t.shape=vt(n.shape.type,t.id,o);const a=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=vt(e,t.id,o);i&&(t.effect=i)}a.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=vt(e,t.id,o);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===d){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(F()*i.length)]}if(t.shape===d){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(F()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return yt({close:e.close},vt(n,i,s))}(t.effect,a,t.id,o):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return yt({close:e.close},vt(n,i,s))}(t.shape,r,t.id,o):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class cn{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;#Mt={fillOpacity:1,opacity:1,strokeOpacity:1};#xt=S.origin;#zt={sin:0,cos:0};#St={a:1,b:0,c:0,d:1};#u;#Ct=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#Ct.push(t),this.#Ct.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#Ct.length=0}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0;s?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this.#u.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#Ot(this.#Dt(li(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*a}getModifier(t){return this.#Ct.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=$(this.opacity?.value??1),s=this.#Dt(void 0,t=>t.opacity)??i,n=this.fillOpacity??1,o=this.strokeOpacity??1;return this.#Mt.fillOpacity=n,this.#Mt.opacity=s*e,this.#Mt.strokeOpacity=o,this.#Mt}getPosition(){return this.#xt.x=this.position.x+this.offset.x,this.#xt.y=this.position.y+this.offset.y,this.#xt.z=this.position.z,this.#xt}getRadius(){return this.#Dt(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#zt.sin=Math.sin(t),this.#zt.cos=Math.cos(t),this.#zt}getStrokeColor(){return this.#Ot(this.#Dt(li(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#St.a=e.cos*(t.a??c.a),this.#St.b=i?e.sin*(t.b??1):t.b??c.b,this.#St.c=i?-e.sin*(t.c??1):t.c??c.c,this.#St.d=e.cos*(t.d??c.d),this.#St}init(e,i,s,n){const o=this.#u;!function(e,i,s){e.id=i,e.group=s,e.justWarped=!1,e.effectClose=!0,e.shapeClose=!0,e.pathRotation=!1,e.lastPathTime=0,e.destroyed=!1,e.unbreakable=!1,e.isRotating=!1,e.rotation=0,e.misplaced=!1,e.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},e.size={value:1,max:1,min:1,enable:!1},e.outType=t.ParticleOutType.normal,e.ignoresResizeRatio=!0}(this,e,n),this.options=ln(this,o,this.#p,s),o.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(o.particleUpdaters,this),this.#kt(i),this.initialVelocity=this.#It(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/o.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,o),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(o.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(o,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(o,this)}isInsideCanvas(t){return this.#Tt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#Tt({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=rn(t,u);return e>=Math.PI*a&&e<3*Math.PI*a}if(this.roll.horizontal){const e=rn(t+Math.PI*a,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=rn(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.#Ct.findIndex(e=>e.id===t);e>=0&&this.#Ct.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Dt(t,e){let i=t;for(const t of this.#Ct)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#_t(t,e){let i=0,s=t?S.create(t.x,t.y,e):void 0;const n=this.#u,o=n.particlePositionPlugins,a=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size;for(;;){for(const t of o){const i=t.particlePosition?.(s,this);if(i)return S.create(i.x,i.y,e)}const t=st({size:l,position:s}),c=S.create(t.x,t.y,e);this.#Et(c,r,a.left??a.default),this.#Et(c,r,a.right??a.default),this.#Rt(c,r,a.top??a.default),this.#Rt(c,r,a.bottom??a.default);let d=!0;for(const t of n.particles.checkParticlePositionPlugins)if(d=t.checkParticlePosition?.(this,c,i)??!0,!d)break;if(d)return c;i+=1,s=void 0}}#It(){const e=this.options.move,i=J(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=Z($(e.angle.value)),n=Z($(e.angle.offset)),o={left:n-s*a,right:n+s*a};return e.straight||(i.angle+=U(q(o.left,o.right))),e.random&&"number"==typeof e.speed&&(i.length*=F()),i}#Et(e,i,s){an({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#Rt(e,i,s){an({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#Lt(e,i){const s=this.getRadius(),n=this.#u.canvas.size,o=this.position,a=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:a?o.y+s<n.height:o.y-s<n.height,reason:"default"}:e===t.OutModeDirection.left?{inside:a?o.x-s>0:o.x+s>0,reason:"default"}:e===t.OutModeDirection.right?{inside:a?o.x+s<n.width:o.x-s<n.width,reason:"default"}:e===t.OutModeDirection.top?{inside:a?o.y-s>0:o.y+s>0,reason:"default"}:{inside:o.x>=-s&&o.y>=-s&&o.y<=n.height+s&&o.x<=n.width+s,reason:"default"}}#Ft(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Tt(t){const e=this.#Lt(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,o=s?.isInsideCanvas,a=n?.isInsideCanvas;if(!o&&!a)return e;const r=this.#Ft(t.direction,t.outMode),l=o?this.#At(o(r),"shape"):void 0,c=a?this.#At(a(r),"effect"):void 0;if(l&&c){const t=Math.max(l.margin??0,c.margin??0);return{inside:l.inside&&c.inside,margin:t>0?t:void 0,reason:"combined"}}return l??c??e}#Ot(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?pi(t,this.roll.alter.type,this.roll.alter.value):t:t}#kt(e){const i=this.#u,s=Math.floor($(this.options.zIndex.value)),n=this.#_t(e,H(s,0,i.zLayers));if(!n)throw new Error("a valid position cannot be found for particle");this.position=n,this.initialPosition=this.position.copy();const o=i.canvas.size;switch(this.moveCenter={...bt(this.options.move.center,o),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=K(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=C.origin}#At(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class dn{#Bt;#Vt=new Map;#Ht=[];#Nt;#Ut;#$t=[];#Gt;constructor(t){this.#Bt=t,this.#Nt=0,this.#Gt=0}clear(){this.#Vt.clear();const t=this.#Ut;t&&(this.#Bt=t),this.#Ut=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Wt(e,i);this.#Vt.has(s)||this.#Vt.set(s,[]),this.#Vt.get(s)?.push(t)}query(t,e,i=[]){const s=this.#qt(t);if(!s)return i;const n=Math.floor(s.minX/this.#Bt),o=Math.floor(s.maxX/this.#Bt),a=Math.floor(s.minY/this.#Bt),r=Math.floor(s.maxY/this.#Bt);for(let s=n;s<=o;s++)for(let n=a;n<=r;n++){const o=`${s}_${n}`,a=this.#Vt.get(o);if(a)for(const s of a)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this.#jt(t.x,t.y,e),o=this.query(n,i,s);return this.#Xt(),o}queryRectangle(t,e,i,s=[]){const n=this.#Yt(t.x,t.y,e.width,e.height),o=this.query(n,i,s);return this.#Xt(),o}setCellSize(t){this.#Ut=t}#jt(t,e,i){return(this.#Ht[this.#Nt++]??=new Yt(t,e,i)).reset(t,e,i)}#Yt(t,e,i,s){return(this.#$t[this.#Gt++]??=new Qt(t,e,i,s)).reset(t,e,i,s)}#Wt(t,e){return`${Math.floor(t/this.#Bt)}_${Math.floor(e/this.#Bt)}`}#qt(t){if(t instanceof Yt){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}#Xt(){this.#Nt=0,this.#Gt=0}}class hn{checkParticlePositionPlugins;grid;#Qt;#u;#Zt;#Kt;#Jt;#te;#ee;#ie;#p;#se;#ne;#oe;#ae;#re;#le;constructor(t,e){this.#p=t,this.#u=e,this.#Jt=0,this.#Qt=[],this.#se=[],this.#Kt=0,this.#Zt=new Map,this.#te=new Map,this.#le=this.#ce(this.#u.zLayers),this.grid=new dn(100),this.checkParticlePositionPlugins=[],this.#ee=[],this.#ie=[],this.#oe=[],this.#ne=[],this.#re=[]}get count(){return this.#Qt.length}addParticle(e,i,s,n){const o=this.#u.actualOptions.particles.number.limit.mode,a=void 0===s?this.#Kt:this.#Zt.get(s)??this.#Kt,r=this.count;if(a>0)switch(o){case t.LimitMode.delete:{const t=r+1-a;t>0&&this.removeQuantity(t);break}case t.LimitMode.wait:if(r>=a)return}try{const o=this.#se.pop()??new cn(this.#p,this.#u);o.init(this.#Jt,e,i,s);let a=!0;return n&&(a=n(o)),a?(this.#Qt.push(o),this.#de(o),this.#Jt++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:o}),o):void this.#se.push(o)}catch(t){_t().warning(`error adding particle: ${t}`)}}clear(){this.#Qt=[],this.#te.clear(),this.#he(this.#u.zLayers)}destroy(){this.#Qt=[],this.#se.length=0,this.#te.clear(),this.#le=[],this.checkParticlePositionPlugins=[],this.#ee=[],this.#ie=[],this.#oe=[],this.#ne=[],this.#re=[]}drawParticles(t){for(let e=this.#le.length-1;e>=0;e--){const i=this.#le[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Qt.filter(t)}find(t){return this.#Qt.find(t)}get(t){return this.#Qt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#re=[],this.#ie=[],this.#oe=[],this.#ee=[],this.#ne=[],this.#te.clear(),this.#he(t.zLayers),this.grid=new dn(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#re.push(e),e.particleUpdate&&this.#ie.push(e),e.postUpdate&&this.#oe.push(e),e.particleReset&&this.#ee.push(e),e.postParticleUpdate&&this.#ne.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#Qt.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let o=t;n<e&&o<this.count;o++)this.#ue(o,i,s)&&(o--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Fe(this.#p,this.#u,s);this.#pe(n,i,t)}this.#pe(t.particles,i)}setResizeFactor(t){this.#ae=t}update(t){this.grid.clear();for(const e of this.#re)e.update?.(t);const e=this.#fe(t);for(const e of this.#oe)e.postUpdate?.(t);if(this.#ge(t,e),e.size)for(const t of e)this.remove(t);this.#ae=void 0}#ye(...t){this.#se.push(...t)}#pe(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Kt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Zt.set(i,s?.number.limit.value??n.limit.value));const o=this.#me(n.density),a=n.value,r=n.limit.value>0?n.limit.value:a,l=Math.min(a,r)*o+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#Kt=n.limit.value*o:this.#Zt.set(i,n.limit.value*o),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)}#ce(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#ve(t){const e=this.#le.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#me(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1}#de(t){const e=this.#ve(t.position.z),i=this.#le[e];i&&(i.push(t),this.#te.set(t.id,e))}#ue(e,i,s){const n=this.#Qt[e];return!!n&&(n.group===i&&(this.#Qt.splice(e,1),this.#be(n),n.destroy(s),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this.#ye(n),!0))}#be(t){const e=this.#te.get(t.id)??this.#ve(t.position.z),i=this.#le[e];if(!i)return void this.#te.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#te.delete(t.id)}#he(t){const e=Math.max(Math.floor(t),1);if(this.#le.length===e)for(const t of this.#le)t.length=0;else this.#le=this.#ce(e)}#we(t){const e=this.#ve(t.position.z),i=this.#te.get(t.id);if(void 0===i)return void this.#de(t);if(i===e)return;const s=this.#le[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#le[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#te.set(t.id,e)}else this.#te.set(t.id,e)}#fe(t){const e=new Set,i=this.#ae;for(const s of this.#Qt){i&&!s.ignoresResizeRatio&&(s.position.x*=i.width,s.position.y*=i.height,s.initialPosition.x*=i.width,s.initialPosition.y*=i.height),s.ignoresResizeRatio=!1;for(const t of this.#ee)t.particleReset?.(s);for(const e of this.#ie){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#ge(t,e){for(const i of this.#Qt)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#ne)e.postParticleUpdate?.(i,t);this.#we(i)}}}class un{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,o=t.retina;o.maxSpeed=$(s.gravity.maxSpeed)*i,o.moveDrift=$(s.drift)*i,o.moveSpeed=$(s.speed)*i;const a=o.maxDistance;a.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,a.vertical=void 0===n.vertical?void 0:n.vertical*i}}function pn(t){return!t.destroyed}function fn(t,e,...i){const s=new Ae(t,e);return Kt(s,...i),s}var gn=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;hdrMode;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;peakNits;plugins;retina;shapeDrawers;started;zLayers;#Pe;#Me;#xe={value:0,factor:0};#ze;#Se;#Ce;#Oe;#De;#ke;#Ie;#Te;#_e;#Ee;#Re;#p;#Le;#Fe;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:o,sourceOptions:a}=e;this.#p=s,this.#ze=i,this.#_e=o,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.hdrMode=t.HdrMode.standard,this.peakNits=400,this.#Le=!1,this.#Pe=0,this.#Ce=0,this.#Te=0,this.#De=!0,this.started=!1,this.destroyed=!1,this.#Re=!0,this.#Ie=0,this.zLayers=100,this.pageHidden=!1,this.#Fe=a,this.#ke=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new un(this),this.canvas=new nn(this.#p,this),this.particles=new hn(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Ee=fn(this.#p,this),this.actualOptions=fn(this.#p,this),this.#Oe=new on(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#Re&&!this.pageHidden&&pn(this)}get options(){return this.#Ee}get sourceOptions(){return this.#Fe}addLifeTime(t){this.#Te+=t}alive(){return!this.#Ce||this.#Te<=this.#Ce}destroy(e=!0){if(pn(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.#_e(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#ze(t,{container:this,data:e})}draw(t){if(!pn(this))return;let e=t;this.#Se=B(t=>{e&&(this.#Ie=void 0,e=!1),this.#Ae(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}_t().error(`Export plugin with type ${t} not found`)}async init(){if(!pn(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.#Ee=fn(this.#p,this,this.#ke,this.sourceOptions),this.actualOptions=fn(this.#p,this,this.#Ee),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[t,i]of e)t.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:i,duration:s,fpsLimit:n,smooth:o,zLayers:a}=this.actualOptions,l=this.actualOptions.hdr;this.hdrMode=l.mode,this.peakNits=l.peakNits,this.zLayers=a,this.#Ce=$(s)*r,this.#Pe=$(i)*r,this.#Te=0,this.fpsLimit=n>0?n:120,this.#Le=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(pn(this)&&(void 0!==this.#Se&&(V(this.#Se),this.#Se=void 0),!this.#Re)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Re=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!pn(this))return;const i=this.#Re||e;if(!this.#De||this.actualOptions.autoPlay){if(this.#Re&&(this.#Re=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#De=!1}async refresh(){if(pn(this))return this.stop(),this.start()}async reset(t){if(pn(this))return this.#ke=t,this.#Fe=t,this.#Ee=fn(this.#p,this,this.#ke,this.sourceOptions),this.actualOptions=fn(this.#p,this,this.#Ee),this.refresh()}async start(){pn(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#Oe.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#Me=setTimeout(()=>{i()},this.#Pe)}))}stop(){if(pn(this)&&this.started){this.#Me&&(clearTimeout(this.#Me),this.#Me=void 0),this.#De=!0,this.started=!1,this.#Oe.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this.#Fe=this.#Ee,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Ae(t){try{if(!this.#Le&&void 0!==this.#Ie&&t<this.#Ie+r/this.fpsLimit)return void this.draw(!1);if(this.#Ie??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this.#xe,t-this.#Ie,this.fpsLimit,this.#Le),this.addLifeTime(this.#xe.value),this.#Ie=t,this.#xe.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#xe),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){_t().error("error in animation loop",t)}}}});var yn=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=t.DrawLayer.CanvasSetup;#u;#Be;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.#Be&&(t.globalCompositeOperation=this.#Be)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Be=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function mn(t,e,i,s,n,o,a){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const o=t.pathGenerator?.generate(t,e);o&&t.velocity.addTo(o);s.clamp&&(t.velocity.x=H(t.velocity.x,-1,1),t.velocity.y=H(t.velocity.y,-1,1));t.lastPathTime-=n}(t,a);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*a.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*a.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const d=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&d.y>=0&&d.y>=s||r.inverse&&d.y<=0&&d.y<=-s)&&(d.y=l*s,i&&(t.velocity.y=d.y/i));const h=t.options.zIndex,u=(1-t.zIndexFactor)**h.velocityRate;d.multTo(u),d.multTo(o);const{position:p}=t;p.addTo(d),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*o,p.y+=Math.cos(p.y*Math.sin(p.x))*o)}var vn=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-$(i.decay),e.pathDelay=$(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:$(s.acceleration),inverse:s.inverse},function(e,i){const s=i.options.move.spin;if(!s.enable)return;const n=s.position??{x:50,y:50},o={x:.01*n.x*e.canvas.size.width,y:.01*n.y*e.canvas.size.height},a=Y(i.getPosition(),o),r=$(s.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:o,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:F()*u,radius:a,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options.move;if(!s.enable)return;const n=this.#u,o=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(e),r=n.retina.reduceFactor,l=e.retina.moveSpeed,c=e.retina.moveDrift,d=e.size.max,h=l*(s.size?e.getRadius()/d:1)*o*(i.factor||1)*a,u=e.retina.maxSpeed;s.spin.enable?function(e,i,s,n){if(!i.spin)return;const o=i.spin.direction===t.RotateDirection.clockwise,r={x:o?Math.cos:Math.sin,y:o?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*r.x(i.spin.angle)*n,i.position.y=i.spin.center.y+i.spin.radius*r.y(i.spin.angle)*n,i.spin.radius+=i.spin.acceleration*n;const l=Math.max(e.canvas.size.width,e.canvas.size.height),c=l*a;i.spin.radius>c?(i.spin.radius=c,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*s*(1-i.spin.radius/l)}(n,e,h,r):mn(e,s,h,u,c,r,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=j(e,t.position),n=Math.abs(i),o=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&n>=l||c&&o>=c)&&!t.misplaced)t.misplaced=!!l&&n>l||!!c&&o>c,l&&(t.velocity.x=t.velocity.y*a-t.velocity.x),c&&(t.velocity.y=t.velocity.x*a-t.velocity.y);else if((!l||n<l)&&(!c||o<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-F()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-F())}}(e)}preInit(){return this.#Ve()}redrawInit(){return this.#Ve()}update(){for(const t of this.pathGenerators.values())t.update()}async#Ve(){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 bn=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#w;constructor(t,e){this.#w=t,this.#u=e,this.#w.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(T(t))for(const e of t)await this.#w.addEmitter(this.#u,e);else await this.#w.addEmitter(this.#u,t)}pause(){for(const t of this.#w.getArray(this.#u))t.pause()}play(){for(const t of this.#w.getArray(this.#u))t.play()}resize(){for(const t of this.#w.getArray(this.#u))t.resize()}stop(){this.#w.clear(this.#u)}update(t){this.#w.getArray(this.#u).forEach(e=>{e.update(t)})}}});const wn=new Map;var Pn=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||wn.set(t,e)}getShapeGenerator(t){return wn.get(t)}getSupportedShapeGenerators(){return wn.keys()}}});var Mn=Object.freeze({__proto__:null,EmittersInstancesManager:class{#He;#p;constructor(t){this.#He=new Map,this.#p=t}async addEmitter(t,e,i){const s=new rs;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return Cn}),o=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await o.init(),this.getArray(t).push(o),o}clear(t){this.initContainer(t),this.#He.set(t,[])}getArray(t){this.initContainer(t);let e=this.#He.get(t);return e||(e=[],this.#He.set(t,e)),e}initContainer(t){this.#He.has(t)||(this.#He.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||k(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 xn=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.#Ne(i);i.addEventListener("change",()=>{(async()=>{this.#Ne(i);try{await t.refresh()}catch{}})()}),await Promise.resolve()}#Ne(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 zn(t,e,i,s){(t.paint??=new Oe).fill={color:ce.create(void 0,{value:e}),enable:s,opacity:i}}function Sn(t,e,i,s){(t.paint??=new Oe).stroke={color:ce.create(void 0,{value:e}),opacity:i,width:s}}var Cn=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#Ue;#$e;#Ge;#Ce;#We;#qe;#je;#Xe;#Ye;#K;#Qe;#Re;#p;#Ze;#yt;#Ke;#Je;#ti;#ei;constructor(e,i,s,n,a){this.#p=e,this.#u=i,this.#Ze=s,this.#Ue=0,this.#$e=0,this.#Ge=0,this.#Xe=a,n instanceof rs?this.options=n:(this.options=new rs,this.options.load(n)),this.#ti=i.retina.reduceFactor?$(this.options.life.delay??0)*r/i.retina.reduceFactor:1/0,this.position=this.#Xe??this.#_t(),this.name=this.options.name,this.fill=this.options.fill,this.#qe=!this.options.life.wait,this.#ei=!1;const l=yt({},this.options.particles);if(l.move??={},l.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=Ze(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=Ze(this.#p,this.options.spawn.stroke.color)),this.#Re=!this.options.autoPlay,this.#Qe=l,this.#Je=this.#ii(),this.size=this.#Je.mode===t.PixelMode.percent?{width:this.#Je.width/o*this.#u.canvas.size.width,height:this.#Je.height/o*this.#u.canvas.size.height}:{width:this.#Je.width,height:this.#Je.height},this.#Ye=this.options.life.count??-1,this.#je=this.#Ye<=0,this.options.domId){const t=lt().getElementById(this.options.domId);t&&(this.#K=new MutationObserver(()=>{this.resize()}),this.#yt=new ResizeObserver(()=>{this.resize()}),this.#K.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#yt.observe(t))}const c=this.options.shape,d=this.#p.emitterShapeManager?.getShapeGenerator(c.type);d&&(this.#Ke=d.generate(this.#u,this.position,this.size,this.fill,c.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#Re=!0,this.pause()}externalPlay(){this.#Re=!1,this.play()}async init(){await(this.#Ke?.init())}pause(){this.#Re||(this.#We=void 0)}play(){if(this.#Re)return;if(!(this.#Ye>0||this.#je)&&this.options.life.count||!(this.#qe||this.#Ge>=(this.#ti??0)))return;const t=this.#u;if(void 0===this.#We){const e=$(this.options.rate.delay);this.#We=t.retina.reduceFactor?e*r/t.retina.reduceFactor:1/0}(this.#Ye>0||this.#je)&&this.#si()}resize(){const e=this.#Xe,i=this.#u;this.position=e&&pt(e,i.canvas.size,C.origin)?e:this.#_t(),this.#Je=this.#ii(),this.size=this.#Je.mode===t.PixelMode.percent?{width:this.#Je.width/o*i.canvas.size.width,height:this.#Je.height/o*i.canvas.size.height}:{width:this.#Je.width,height:this.#Je.height},this.#Ke?.resize(this.position,this.size)}update(t){if(this.#Re)return;const e=this.#u;this.#qe&&(this.#qe=!1,this.#Ge=this.#ti??0,this.#$e=this.#We??0),this.#ei||(this.#ei=!0,this.#ni(this.options.startCount)),void 0!==this.#Ce&&(this.#Ue+=t.value,this.#Ue>=this.#Ce&&(this.pause(),void 0!==this.#ti&&(this.#ti=void 0),this.#je||this.#Ye--,this.#Ye>0||this.#je?(this.position=this.#_t(),this.#Ke?.resize(this.position,this.size),this.#ti=e.retina.reduceFactor?$(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0):this.#oi(),this.#Ue-=this.#Ce,this.#Ce=void 0)),void 0!==this.#ti&&(this.#Ge+=t.value,this.#Ge>=this.#ti&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#Ge-=this.#ti,this.#ti=void 0)),void 0!==this.#We&&(this.#$e+=t.value,this.#$e>=this.#We&&(this.#ai(),this.#$e-=this.#We))}#_t(){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*a)*s,y:(i.y+i.height*a)*s}}}return it({size:t.canvas.size,position:this.options.position})}#ii(){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 os;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}#oi(){this.#K?.disconnect(),this.#K=void 0,this.#yt?.disconnect(),this.#yt=void 0,this.#Ze(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#ai(){if(this.#Re)return;const t=$(this.options.rate.quantity);this.#ni(t)}#ni(t){const e=vt(this.#Qe)??{},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:$(this.options.spawn.fill.opacity),o=this.options.spawn.stroke?.color?.animation,a=void 0===this.options.spawn.stroke?.opacity?1:$(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:$(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,d=!!o,h=!!this.#Ke,u=c||d,p=u||h,f=u?{h:m,s:v,l:b}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?yt({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=a,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this.#ri(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this.#ri(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this.#ri(i.l,this.spawnFillColor.l,f.l)),zn(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(o&&f&&(this.spawnStrokeColor.h=this.#ri(o.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this.#ri(o.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this.#ri(o.l,this.spawnStrokeColor.l,f.l)),Sn(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#Ke){const e=this.#Ke.randomPosition();if(e){l=e.position;const i=g.replace;i.color&&e.color&&zn(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#si(){if(this.#Re)return;const t=void 0!==this.options.life.duration?$(this.options.life.duration):void 0;(this.#Ye>0||this.#je)&&void 0!==t&&t>0&&(this.#Ce=t*r)}#ri(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const o=U(t.offset),a=$(this.options.rate.delay),l=n.retina.reduceFactor?a*r/n.retina.reduceFactor:1/0;return(e+$(t.speed)*n.fpsLimit/l+o*s)%i}}});t.AnimatableColor=ce,t.AnimationOptions=ne,t.AnimationValueWithRandom=we,t.Background=de,t.BaseRange=Xt,t.Circle=Yt,t.ColorAnimation=ae,t.Fill=ge,t.FullScreen=he,t.HDROptions=ue,t.HslAnimation=re,t.Move=Se,t.MoveAngle=ye,t.MoveCenter=me,t.MoveGravity=ve,t.MovePath=Me,t.OptionLoader=Zt,t.Options=Ae,t.OptionsColor=le,t.OutModes=xe,t.Paint=Oe,t.ParticlesBounce=ke,t.ParticlesBounceFactor=De,t.ParticlesDensity=Ie,t.ParticlesNumber=_e,t.ParticlesNumberLimit=Te,t.ParticlesOptions=Le,t.RangedAnimationOptions=oe,t.RangedAnimationValueWithRandom=Pe,t.Rectangle=Qt,t.ResizeEvent=pe,t.Shape=Ee,t.Spin=ze,t.Stroke=Ce,t.ValueWithRandom=be,t.Vector=C,t.Vector3d=S,t.ZIndex=Re,t.alterHsl=pi,t.animate=B,t.areBoundsInside=ft,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/o,y:t.position.y*t.size.height/o}:void 0},t.calcPositionOrRandomFromSize=et,t.calcPositionOrRandomFromSizeRanged=it,t.calculateBounds=gt,t.cancelAnimation=V,t.canvasFirstIndex=0,t.canvasTag=g,t.checkDistance=Q,t.circleBounce=function(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,o]=[t.position,e.position],{dx:a,dy:r}=j(o,n);if(i*a+s*r<0)return;const l=-Math.atan2(r,a),c=t.mass,d=e.mass,h=t.velocity.rotate(l),u=e.velocity.rotate(l),p=tt(h,u,c,d),f=tt(u,h,c,d),g=p.rotate(-l),y=f.rotate(-l);t.velocity.x=g.x*t.factor.x,t.velocity.y=g.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:C.create($(t.options.bounce.horizontal.value),$(t.options.bounce.vertical.value))}},t.clamp=H,t.cloneStyle=wt,t.collisionVelocity=tt,t.colorMix=ri,t.colorToRgb=Qe,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=Z,t.deleteCount=1,t.double=2,t.doublePI=u,t.empty=0,t.executeOnSingleOrMultiple=mt,t.generatedAttribute=e,t.generatedFalse=f,t.generatedTrue=p,t.getDistance=Y,t.getDistanceSq=X,t.getDistances=j,t.getFullScreenStyle=xt,t.getHslAnimationFromHsl=ci,t.getHslFromAnimation=li,t.getItemMapFromInitializer=Ct,t.getItemsFromInitializer=St,t.getLinkColor=function(t,e,i,s){if(i===d)return ni();if(i!==h)return i;{const i=t.getFillColor()??t.getStrokeColor(),n=e?.getFillColor()??e?.getStrokeColor();if(i&&n&&e)return ri(i,n,t.getRadius(),e.getRadius(),s);{const t=i??n;if(t)return ei(t)}}},t.getLinkRandomColor=function(t,e,i,s){const n=D(e)?e:e.value;return n===d?s?Ye(t,{value:n}):i?d:h:n===h?h:Ye(t,{value:n})},t.getLogger=_t,t.getParticleBaseVelocity=J,t.getParticleDirectionAngle=K,t.getPosition=bt,t.getRandom=F,t.getRandomFn=function(){return R},t.getRandomInRange=A,t.getRandomRgbColor=ni,t.getRangeMax=W,t.getRangeMin=G,t.getRangeValue=$,t.getStyleFromHsl=ai,t.getStyleFromRgb=oi,t.hMax=m,t.hMin=0,t.hPhase=60,t.half=a,t.hslToRgb=ei,t.hslToRgbFloat=ii,t.hslaToRgba=si,t.identity=1,t.inverseFactorNumerator=1,t.isArray=T,t.isBoolean=O,t.isFunction=function(t){return"function"==typeof t},t.isInArray=ht,t.isNull=_,t.isNumber=k,t.isObject=I,t.isPointInside=pt,t.isString=D,t.itemFromArray=ut,t.itemFromSingleOrMultiple=vt,t.lFactor=1,t.lMax=b,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){if(void 0!==i){const s=e;if("__proto__"===s||"constructor"===s||"prototype"===s)return;const n=t,o=Object.prototype.hasOwnProperty.call(n,s)?n[s]:{};n[s]=yt(o,i)}},t.loadLazyProperty=ie,t.loadMinIndex=0,t.loadNestedProperty=ee,t.loadOptionProperty=se,t.loadOptions=Kt,t.loadParticlesOptions=Fe,t.loadProperty=Jt,t.loadRandomFactor=1e4,t.loadRangeProperty=te,t.manageListener=zt,t.maxNits=M,t.midColorValue=h,t.millisecondsToSeconds=r,t.minCount=0,t.minDistance=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minRadius=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=N,t.none=0,t.one=1,t.originPoint=l,t.parseAlpha=nt,t.percentDenominator=o,t.phaseNumerator=1,t.quarter=w,t.randomColorValue=d,t.randomInRangeValue=U,t.rangeColorToHsl=Ze,t.rangeColorToRgb=Ye,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=y,t.rgbToHsl=Ke,t.ribbons=Zs,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){R=t},t.setRangeValue=q,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Xe(t,e)?.a},t.stringToRgb=Je,t.threeQuarter=P,t.triple=3,t.tryCountIncrement=1,t.tsParticles=fi,t.updateColor=ui,t.updateColorValue=hi,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{loadExtendProperty:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadExtendProperty,loadLazyProperty:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadLazyProperty,loadMinIndex:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadMinIndex,loadNestedProperty:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadNestedProperty,loadOptionProperty:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadOptionProperty,loadOptions:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadOptions,loadParticlesOptions:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadParticlesOptions,loadProperty:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadProperty,loadRandomFactor:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadRandomFactor,loadRangeProperty:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadRangeProperty,tsParticles:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).tsParticles}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.ribbons||{}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|