UNPKG

108 kBJavaScriptView Raw
1/*! tsParticles v2.0.6 by Matteo Bruni */
2!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var s in i)("object"==typeof exports?exports:t)[s]=i[s]}}(window,(function(){return function(){"use strict";var t={d:function(e,i){for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{AnimatableColor:function(){return gt},AnimatableGradient:function(){return wt},AnimatableGradientColor:function(){return kt},AnimationOptions:function(){return Jt},Attract:function(){return D},Background:function(){return T},BackgroundMask:function(){return O},BackgroundMaskCover:function(){return S},Bounce:function(){return q},Bubble:function(){return _},BubbleBase:function(){return H},BubbleDiv:function(){return V},Canvas:function(){return Ni},Circle:function(){return ls},CircleWarp:function(){return hs},ClickEvent:function(){return R},Collisions:function(){return Et},CollisionsOverlap:function(){return Pt},ColorAnimation:function(){return mt},Connect:function(){return B},ConnectLinks:function(){return W},Container:function(){return bs},Destroy:function(){return Lt},DivEvent:function(){return I},Engine:function(){return Is},EventListeners:function(){return Yi},Events:function(){return F},ExternalInteractorBase:function(){return As},FrameManager:function(){return Ui},FullScreen:function(){return E},Grab:function(){return j},GrabLinks:function(){return G},GradientAngle:function(){return bt},GradientAngleAnimation:function(){return Mt},GradientColorOpacity:function(){return xt},GradientColorOpacityAnimation:function(){return zt},HoverEvent:function(){return L},HslAnimation:function(){return yt},InteractionManager:function(){return Ki},Interactivity:function(){return st},Life:function(){return qt},LifeDelay:function(){return Ft},LifeDuration:function(){return Dt},Light:function(){return Y},LightArea:function(){return N},LightGradient:function(){return $},LightShadow:function(){return X},Links:function(){return _t},LinksShadow:function(){return Ht},LinksTriangle:function(){return Vt},Loader:function(){return zs},Main:function(){return Is},ManualParticle:function(){return nt},Modes:function(){return it},Motion:function(){return rt},MotionReduce:function(){return ot},Move:function(){return Ut},MoveAngle:function(){return Wt},MoveAttract:function(){return Bt},MoveGravity:function(){return Gt},MovePath:function(){return $t},MovePathDelay:function(){return jt},MoveTrail:function(){return Nt},Opacity:function(){return Qt},OpacityAnimation:function(){return Zt},Options:function(){return ft},OptionsColor:function(){return C},Orbit:function(){return te},OrbitRotation:function(){return Kt},OutModes:function(){return Xt},Parallax:function(){return A},Particle:function(){return os},Particles:function(){return fs},ParticlesBounce:function(){return Ot},ParticlesBounceFactor:function(){return St},ParticlesDensity:function(){return ee},ParticlesInteractorBase:function(){return Ls},ParticlesNumber:function(){return ie},ParticlesOptions:function(){return we},ParticlesRepulse:function(){return se},Plugins:function(){return Ts},Point:function(){return rs},Push:function(){return U},QuadTree:function(){return ds},Range:function(){return as},Rectangle:function(){return cs},Remove:function(){return J},Repulse:function(){return K},RepulseBase:function(){return Z},RepulseDiv:function(){return Q},Responsive:function(){return at},Retina:function(){return ms},Roll:function(){return oe},RollLight:function(){return ne},Rotate:function(){return ae},RotateAnimation:function(){return re},Shadow:function(){return le},Shape:function(){return ce},Size:function(){return de},SizeAnimation:function(){return he},Slow:function(){return tt},Spin:function(){return Yt},Split:function(){return At},SplitFactor:function(){return Rt},SplitRate:function(){return It},Stroke:function(){return ue},Theme:function(){return ct},ThemeDefault:function(){return lt},Tilt:function(){return pe},TiltAnimation:function(){return ve},Trail:function(){return et},Twinkle:function(){return me},TwinkleValues:function(){return fe},ValueWithRandom:function(){return Tt},Vector:function(){return r},Vector3d:function(){return ts},Wobble:function(){return ye},ZIndex:function(){return ge},alterHsl:function(){return $i},animate:function(){return Me},areBoundsInside:function(){return Ee},arrayRandomIndex:function(){return Te},calcEasing:function(){return b},calcExactPositionOrRandomFromSize:function(){return z},calcExactPositionOrRandomFromSizeRanged:function(){return P},calcPositionFromSize:function(){return x},calcPositionOrRandomFromSize:function(){return k},calcPositionOrRandomFromSizeRanged:function(){return M},calculateBounds:function(){return Re},cancelAnimation:function(){return ze},circleBounce:function(){return He},circleBounceDataFromParticle:function(){return qe},clamp:function(){return a},clear:function(){return Fi},collisionVelocity:function(){return w},colorMix:function(){return Ci},colorToHsl:function(){return li},colorToRgb:function(){return ai},deepExtend:function(){return Ie},divMode:function(){return De},divModeExecute:function(){return Le},drawConnectLine:function(){return Di},drawEllipse:function(){return ji},drawGrabLine:function(){return Hi},drawLine:function(){return Ii},drawParticle:function(){return Vi},drawParticlePlugin:function(){return Gi},drawPlugin:function(){return Bi},drawShape:function(){return _i},drawShapeAfterEffect:function(){return Wi},drawTriangle:function(){return Ai},generatedAttribute:function(){return Ge},getDistance:function(){return m},getDistances:function(){return f},getHslAnimationFromHsl:function(){return Ei},getHslFromAnimation:function(){return Oi},getLinkColor:function(){return Ti},getLinkRandomColor:function(){return Si},getParticleBaseVelocity:function(){return g},getParticleDirectionAngle:function(){return y},getRandomRgbColor:function(){return ki},getRangeMax:function(){return u},getRangeMin:function(){return d},getRangeValue:function(){return h},getStyleFromHsl:function(){return zi},getStyleFromHsv:function(){return Pi},getStyleFromRgb:function(){return Mi},getValue:function(){return p},gradient:function(){return qi},hslToHsv:function(){return pi},hslToRgb:function(){return ui},hslaToHsva:function(){return fi},hslaToRgba:function(){return vi},hsvToHsl:function(){return mi},hsvToRgb:function(){return gi},hsvaToHsla:function(){return yi},hsvaToRgba:function(){return wi},isDivModeEnabled:function(){return Ae},isInArray:function(){return Pe},isPointInside:function(){return Oe},isSsr:function(){return ke},itemFromArray:function(){return Se},loadContainerOptions:function(){return We},loadFont:function(){return Ce},loadParticlesOptions:function(){return Be},midColorValue:function(){return $e},mix:function(){return l},mouseDownEvent:function(){return Xe},mouseLeaveEvent:function(){return Qe},mouseMoveEvent:function(){return Ue},mouseOutEvent:function(){return Ke},mouseUpEvent:function(){return Ye},noPolygonDataLoaded:function(){return si},noPolygonFound:function(){return ni},paintBase:function(){return Li},randomColorValue:function(){return je},randomInRange:function(){return c},rectBounce:function(){return Ve},resizeEvent:function(){return ei},rgbToHsl:function(){return ci},rgbToHsv:function(){return bi},rgbaToHsva:function(){return xi},setRangeValue:function(){return v},singleDivModeExecute:function(){return Fe},stringToAlpha:function(){return hi},stringToRgb:function(){return di},touchCancelEvent:function(){return ti},touchEndEvent:function(){return Ne},touchMoveEvent:function(){return Ze},touchStartEvent:function(){return Je},tsParticles:function(){return Fs},visibilityChangeEvent:function(){return ii}});var i,s=function(t,e,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,i):n?n.value=i:e.set(t,i),i},n=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)};class o{constructor(){i.set(this,void 0),s(this,i,new Map,"f")}addEventListener(t,e){var s;this.removeEventListener(t,e),n(this,i,"f").get(t)||n(this,i,"f").set(t,[]),null===(s=n(this,i,"f").get(t))||void 0===s||s.push(e)}removeEventListener(t,e){const s=n(this,i,"f").get(t);if(!s)return;const o=s.length,r=s.indexOf(e);r<0||(1===o?n(this,i,"f").delete(t):s.splice(r,1))}removeAllEventListeners(t){t?n(this,i,"f").delete(t):s(this,i,new Map,"f")}dispatchEvent(t,e){var s;null===(s=n(this,i,"f").get(t))||void 0===s||s.forEach((t=>t(e)))}hasEventListener(t){return!!n(this,i,"f").get(t)}}i=new WeakMap;class r{constructor(t,e){if("number"!=typeof t&&t)this.x=t.x,this.y=t.y;else{if(void 0===t||void 0===e)throw new Error("tsParticles - Vector not initialized correctly");this.x=t,this.y=e}}static clone(t){return r.create(t.x,t.y)}static create(t,e){return new r(t,e)}static get origin(){return r.create(0,0)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.updateFromAngle(this.angle,t)}add(t){return r.create(this.x+t.x,this.y+t.y)}addTo(t){this.x+=t.x,this.y+=t.y}sub(t){return r.create(this.x-t.x,this.y-t.y)}subFrom(t){this.x-=t.x,this.y-=t.y}mult(t){return r.create(this.x*t,this.y*t)}multTo(t){this.x*=t,this.y*=t}div(t){return r.create(this.x/t,this.y/t)}divTo(t){this.x/=t,this.y/=t}distanceTo(t){return this.sub(t).length}getLengthSq(){return this.x**2+this.y**2}distanceToSq(t){return this.sub(t).getLengthSq()}manhattanDistanceTo(t){return Math.abs(t.x-this.x)+Math.abs(t.y-this.y)}copy(){return r.clone(this)}setTo(t){this.x=t.x,this.y=t.y}rotate(t){return r.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t))}updateFromAngle(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}function a(t,e,i){return Math.min(Math.max(t,e),i)}function l(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function c(t){const e=u(t);let i=d(t);return e===i&&(i=0),Math.random()*(e-i)+i}function h(t){return"number"==typeof t?t:c(t)}function d(t){return"number"==typeof t?t:t.min}function u(t){return"number"==typeof t?t:t.max}function v(t,e){if(t===e||void 0===e&&"number"==typeof t)return t;const i=d(t),s=u(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:v(i,s)}function p(t){const e=t.random,{enable:i,minimumValue:s}="boolean"==typeof e?{enable:e,minimumValue:0}:e;return h(i?v(t.value,s):t.value)}function f(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.sqrt(i*i+s*s)}}function m(t,e){return f(t,e).distance}function y(t,e,i){if("number"==typeof t)return t*Math.PI/180;switch(t){case"top":return-Math.PI/2;case"top-right":return-Math.PI/4;case"right":return 0;case"bottom-right":return Math.PI/4;case"bottom":return Math.PI/2;case"bottom-left":return 3*Math.PI/4;case"left":return Math.PI;case"top-left":return-3*Math.PI/4;case"inside":return Math.atan2(i.y-e.y,i.x-e.x);case"outside":return Math.atan2(e.y-i.y,e.x-i.x);case"none":default:return Math.random()*Math.PI*2}}function g(t){const e=r.origin;return e.length=1,e.angle=t,e}function w(t,e,i,s){return r.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function b(t,e){switch(e){case"ease-out-quad":return 1-(1-t)**2;case"ease-out-cubic":return 1-(1-t)**3;case"ease-out-quart":return 1-(1-t)**4;case"ease-out-quint":return 1-(1-t)**5;case"ease-out-expo":return 1===t?1:1-Math.pow(2,-10*t);case"ease-out-sine":return Math.sin(t*Math.PI/2);case"ease-out-back":{const e=1.70158;return 1+(e+1)*Math.pow(t-1,3)+e*Math.pow(t-1,2)}case"ease-out-circ":return Math.sqrt(1-Math.pow(t-1,2));default:return t}}function x(t){var e,i;return void 0!==(null===(e=t.position)||void 0===e?void 0:e.x)&&void 0!==(null===(i=t.position)||void 0===i?void 0:i.y)?{x:t.position.x*t.size.width/100,y:t.position.y*t.size.height/100}:void 0}function k(t){var e,i,s,n;return{x:(null!==(i=null===(e=t.position)||void 0===e?void 0:e.x)&&void 0!==i?i:100*Math.random())*t.size.width/100,y:(null!==(n=null===(s=t.position)||void 0===s?void 0:s.y)&&void 0!==n?n:100*Math.random())*t.size.height/100}}function M(t){var e,i;const s={x:void 0!==(null===(e=t.position)||void 0===e?void 0:e.x)?h(t.position.x):void 0,y:void 0!==(null===(i=t.position)||void 0===i?void 0:i.y)?h(t.position.y):void 0};return k({size:t.size,position:s})}function z(t){var e,i,s,n;return{x:null!==(i=null===(e=t.position)||void 0===e?void 0:e.x)&&void 0!==i?i:Math.random()*t.size.width,y:null!==(n=null===(s=t.position)||void 0===s?void 0:s.y)&&void 0!==n?n:Math.random()*t.size.height}}function P(t){var e,i;const s={x:void 0!==(null===(e=t.position)||void 0===e?void 0:e.x)?h(t.position.x):void 0,y:void 0!==(null===(i=t.position)||void 0===i?void 0:i.y)?h(t.position.y):void 0};return z({size:t.size,position:s})}class C{constructor(){this.value=""}static create(t,e){const i=new C;return i.load(t),void 0!==e&&("string"==typeof e||e instanceof Array?i.load({value:e}):i.load(e)),i}load(t){void 0!==(null==t?void 0:t.value)&&(this.value=t.value)}}class T{constructor(){this.color=new C,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=C.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class S{constructor(){this.color=new C,this.color.value="#fff",this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=C.create(this.color,t.color)),void 0!==t.opacity&&(this.opacity=t.opacity))}}class O{constructor(){this.composite="destination-out",this.cover=new S,this.enable=!1}load(t){if(t){if(void 0!==t.composite&&(this.composite=t.composite),void 0!==t.cover){const e=t.cover,i="string"==typeof t.cover?{color:t.cover}:t.cover;this.cover.load(void 0!==e.color?e:{color:i})}void 0!==t.enable&&(this.enable=t.enable)}}}class E{constructor(){this.enable=!0,this.zIndex=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class R{constructor(){this.enable=!1,this.mode=[]}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}class I{constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type="circle"}get elementId(){return this.ids}set elementId(t){this.ids=t}get el(){return this.elementId}set el(t){this.elementId=t}get ids(){return this.selectors instanceof Array?this.selectors.map((t=>t.replace("#",""))):this.selectors.replace("#","")}set ids(t){this.selectors=t instanceof Array?t.map((t=>`#${t}`)):`#${t}`}load(t){var e,i;if(!t)return;const s=null!==(i=null!==(e=t.ids)&&void 0!==e?e:t.elementId)&&void 0!==i?i:t.el;void 0!==s&&(this.ids=s),void 0!==t.selectors&&(this.selectors=t.selectors),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.type&&(this.type=t.type)}}class A{constructor(){this.enable=!1,this.force=2,this.smooth=10}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.force&&(this.force=t.force),void 0!==t.smooth&&(this.smooth=t.smooth))}}class L{constructor(){this.enable=!1,this.mode=[],this.parallax=new A}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),this.parallax.load(t.parallax))}}class F{constructor(){this.onClick=new R,this.onDiv=new I,this.onHover=new L,this.resize=!0}get onclick(){return this.onClick}set onclick(t){this.onClick=t}get ondiv(){return this.onDiv}set ondiv(t){this.onDiv=t}get onhover(){return this.onHover}set onhover(t){this.onHover=t}load(t){var e,i,s;if(!t)return;this.onClick.load(null!==(e=t.onClick)&&void 0!==e?e:t.onclick);const n=null!==(i=t.onDiv)&&void 0!==i?i:t.ondiv;void 0!==n&&(n instanceof Array?this.onDiv=n.map((t=>{const e=new I;return e.load(t),e})):(this.onDiv=new I,this.onDiv.load(n))),this.onHover.load(null!==(s=t.onHover)&&void 0!==s?s:t.onhover),void 0!==t.resize&&(this.resize=t.resize)}}class D{constructor(){this.distance=200,this.duration=.4,this.easing="ease-out-quad",this.factor=1,this.maxSpeed=50,this.speed=1}load(t){t&&(void 0!==t.distance&&(this.distance=t.distance),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.easing&&(this.easing=t.easing),void 0!==t.factor&&(this.factor=t.factor),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed),void 0!==t.speed&&(this.speed=t.speed))}}class q{constructor(){this.distance=200}load(t){t&&void 0!==t.distance&&(this.distance=t.distance)}}class H{constructor(){this.distance=200,this.duration=.4,this.mix=!1}load(t){t&&(void 0!==t.distance&&(this.distance=t.distance),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.mix&&(this.mix=t.mix),void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.color&&(t.color instanceof Array?this.color=t.color.map((t=>C.create(void 0,t))):(this.color instanceof Array&&(this.color=new C),this.color=C.create(this.color,t.color))),void 0!==t.size&&(this.size=t.size))}}class V extends H{constructor(){super(),this.selectors=[]}get ids(){return this.selectors instanceof Array?this.selectors.map((t=>t.replace("#",""))):this.selectors.replace("#","")}set ids(t){this.selectors=t instanceof Array?t.map((t=>`#${t}`)):`#${t}`}load(t){super.load(t),t&&(void 0!==t.ids&&(this.ids=t.ids),void 0!==t.selectors&&(this.selectors=t.selectors))}}class _ extends H{load(t){super.load(t),t&&(t.divs instanceof Array?this.divs=t.divs.map((t=>{const e=new V;return e.load(t),e})):((this.divs instanceof Array||!this.divs)&&(this.divs=new V),this.divs.load(t.divs)))}}class W{constructor(){this.opacity=.5}load(t){void 0!==t&&void 0!==t.opacity&&void 0!==t.opacity&&(this.opacity=t.opacity)}}class B{constructor(){this.distance=80,this.links=new W,this.radius=60}get line_linked(){return this.links}set line_linked(t){this.links=t}get lineLinked(){return this.links}set lineLinked(t){this.links=t}load(t){var e,i;t&&(void 0!==t.distance&&(this.distance=t.distance),this.links.load(null!==(i=null!==(e=t.links)&&void 0!==e?e:t.lineLinked)&&void 0!==i?i:t.line_linked),void 0!==t.radius&&(this.radius=t.radius))}}class G{constructor(){this.blink=!1,this.consent=!1,this.opacity=1}load(t){t&&(void 0!==t.blink&&(this.blink=t.blink),void 0!==t.color&&(this.color=C.create(this.color,t.color)),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.opacity&&(this.opacity=t.opacity))}}class j{constructor(){this.distance=100,this.links=new G}get line_linked(){return this.links}set line_linked(t){this.links=t}get lineLinked(){return this.links}set lineLinked(t){this.links=t}load(t){var e,i;t&&(void 0!==t.distance&&(this.distance=t.distance),this.links.load(null!==(i=null!==(e=t.links)&&void 0!==e?e:t.lineLinked)&&void 0!==i?i:t.line_linked))}}class ${constructor(){this.start=new C,this.stop=new C,this.start.value="#ffffff",this.stop.value="#000000"}load(t){t&&(this.start=C.create(this.start,t.start),this.stop=C.create(this.stop,t.stop))}}class N{constructor(){this.gradient=new $,this.radius=1e3}load(t){t&&(this.gradient.load(t.gradient),void 0!==t.radius&&(this.radius=t.radius))}}class X{constructor(){this.color=new C,this.color.value="#000000",this.length=2e3}load(t){t&&(this.color=C.create(this.color,t.color),void 0!==t.length&&(this.length=t.length))}}class Y{constructor(){this.area=new N,this.shadow=new X}load(t){t&&(this.area.load(t.area),this.shadow.load(t.shadow))}}class U{constructor(){this.default=!0,this.groups=[],this.quantity=4}get particles_nb(){return this.quantity}set particles_nb(t){this.quantity=t}load(t){var e;if(!t)return;void 0!==t.default&&(this.default=t.default),void 0!==t.groups&&(this.groups=t.groups.map((t=>t))),this.groups.length||(this.default=!0);const i=null!==(e=t.quantity)&&void 0!==e?e:t.particles_nb;void 0!==i&&(this.quantity=i)}}class J{constructor(){this.quantity=2}get particles_nb(){return this.quantity}set particles_nb(t){this.quantity=t}load(t){var e;if(!t)return;const i=null!==(e=t.quantity)&&void 0!==e?e:t.particles_nb;void 0!==i&&(this.quantity=i)}}class Z{constructor(){this.distance=200,this.duration=.4,this.factor=100,this.speed=1,this.maxSpeed=50,this.easing="ease-out-quad"}load(t){t&&(void 0!==t.distance&&(this.distance=t.distance),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.easing&&(this.easing=t.easing),void 0!==t.factor&&(this.factor=t.factor),void 0!==t.speed&&(this.speed=t.speed),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed))}}class Q extends Z{constructor(){super(),this.selectors=[]}get ids(){return this.selectors instanceof Array?this.selectors.map((t=>t.replace("#",""))):this.selectors.replace("#","")}set ids(t){this.selectors=t instanceof Array?t.map((()=>`#${t}`)):`#${t}`}load(t){super.load(t),t&&(void 0!==t.ids&&(this.ids=t.ids),void 0!==t.selectors&&(this.selectors=t.selectors))}}class K extends Z{load(t){super.load(t),t&&(t.divs instanceof Array?this.divs=t.divs.map((t=>{const e=new Q;return e.load(t),e})):((this.divs instanceof Array||!this.divs)&&(this.divs=new Q),this.divs.load(t.divs)))}}class tt{constructor(){this.factor=3,this.radius=200}get active(){return!1}set active(t){}load(t){t&&(void 0!==t.factor&&(this.factor=t.factor),void 0!==t.radius&&(this.radius=t.radius))}}class et{constructor(){this.delay=1,this.pauseOnStop=!1,this.quantity=1}load(t){t&&(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.quantity&&(this.quantity=t.quantity),void 0!==t.particles&&(this.particles=Ie({},t.particles)),void 0!==t.pauseOnStop&&(this.pauseOnStop=t.pauseOnStop))}}class it{constructor(){this.attract=new D,this.bounce=new q,this.bubble=new _,this.connect=new B,this.grab=new j,this.light=new Y,this.push=new U,this.remove=new J,this.repulse=new K,this.slow=new tt,this.trail=new et}load(t){t&&(this.attract.load(t.attract),this.bubble.load(t.bubble),this.connect.load(t.connect),this.grab.load(t.grab),this.light.load(t.light),this.push.load(t.push),this.remove.load(t.remove),this.repulse.load(t.repulse),this.slow.load(t.slow),this.trail.load(t.trail))}}class st{constructor(){this.detectsOn="window",this.events=new F,this.modes=new it}get detect_on(){return this.detectsOn}set detect_on(t){this.detectsOn=t}load(t){var e,i,s;if(!t)return;const n=null!==(e=t.detectsOn)&&void 0!==e?e:t.detect_on;void 0!==n&&(this.detectsOn=n),this.events.load(t.events),this.modes.load(t.modes),!0===(null===(s=null===(i=t.modes)||void 0===i?void 0:i.slow)||void 0===s?void 0:s.active)&&(this.events.onHover.mode instanceof Array?this.events.onHover.mode.indexOf("slow")<0&&this.events.onHover.mode.push("slow"):"slow"!==this.events.onHover.mode&&(this.events.onHover.mode=[this.events.onHover.mode,"slow"]))}}class nt{load(t){var e,i;t&&(void 0!==t.position&&(this.position={x:null!==(e=t.position.x)&&void 0!==e?e:50,y:null!==(i=t.position.y)&&void 0!==i?i:50}),void 0!==t.options&&(this.options=Ie({},t.options)))}}class ot{constructor(){this.factor=4,this.value=!0}load(t){t&&(void 0!==t.factor&&(this.factor=t.factor),void 0!==t.value&&(this.value=t.value))}}class rt{constructor(){this.disable=!1,this.reduce=new ot}load(t){t&&(void 0!==t.disable&&(this.disable=t.disable),this.reduce.load(t.reduce))}}class at{constructor(){this.maxWidth=1/0,this.options={},this.mode="canvas"}load(t){t&&(void 0!==t.maxWidth&&(this.maxWidth=t.maxWidth),void 0!==t.mode&&("screen"===t.mode?this.mode="screen":this.mode="canvas"),void 0!==t.options&&(this.options=Ie({},t.options)))}}class lt{constructor(){this.auto=!1,this.mode="any",this.value=!1}load(t){t&&(void 0!==t.auto&&(this.auto=t.auto),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class ct{constructor(){this.name="",this.default=new lt}load(t){t&&(void 0!==t.name&&(this.name=t.name),this.default.load(t.default),void 0!==t.options&&(this.options=Ie({},t.options)))}}var ht,dt,ut,vt=function(t,e,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,i):n?n.value=i:e.set(t,i),i},pt=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)};class ft{constructor(t){ht.add(this),dt.set(this,void 0),vt(this,dt,t,"f"),this.autoPlay=!0,this.background=new T,this.backgroundMask=new O,this.fullScreen=new E,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.interactivity=new st,this.manualParticles=[],this.motion=new rt,this.particles=Be(),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.responsive=[],this.style={},this.themes=[],this.zLayers=100}get fps_limit(){return this.fpsLimit}set fps_limit(t){this.fpsLimit=t}get retina_detect(){return this.detectRetina}set retina_detect(t){this.detectRetina=t}get backgroundMode(){return this.fullScreen}set backgroundMode(t){this.fullScreen.load(t)}load(t){var e,i,s,n,o;if(!t)return;if(void 0!==t.preset)if(t.preset instanceof Array)for(const e of t.preset)this.importPreset(e);else this.importPreset(t.preset);void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay);const r=null!==(e=t.detectRetina)&&void 0!==e?e:t.retina_detect;void 0!==r&&(this.detectRetina=r),void 0!==t.duration&&(this.duration=t.duration);const a=null!==(i=t.fpsLimit)&&void 0!==i?i:t.fps_limit;void 0!==a&&(this.fpsLimit=a),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const l=null!==(s=t.fullScreen)&&void 0!==s?s:t.backgroundMode;if("boolean"==typeof l?this.fullScreen.enable=l:this.fullScreen.load(l),this.backgroundMask.load(t.backgroundMask),this.interactivity.load(t.interactivity),void 0!==t.manualParticles&&(this.manualParticles=t.manualParticles.map((t=>{const e=new nt;return e.load(t),e}))),this.motion.load(t.motion),this.particles.load(t.particles),this.style=Ie(this.style,t.style),pt(this,dt,"f").plugins.loadOptions(this,t),void 0!==t.responsive)for(const e of t.responsive){const t=new at;t.load(e),this.responsive.push(t)}if(this.responsive.sort(((t,e)=>t.maxWidth-e.maxWidth)),void 0!==t.themes)for(const e of t.themes){const t=new ct;t.load(e),this.themes.push(t)}this.defaultDarkTheme=null===(n=pt(this,ht,"m",ut).call(this,"dark"))||void 0===n?void 0:n.name,this.defaultLightTheme=null===(o=pt(this,ht,"m",ut).call(this,"light"))||void 0===o?void 0:o.name}setTheme(t){if(t){const e=this.themes.find((e=>e.name===t));e&&this.load(e.options)}else{const t="undefined"!=typeof matchMedia&&matchMedia("(prefers-color-scheme: dark)"),e=t&&t.matches,i=pt(this,ht,"m",ut).call(this,e?"dark":"light");i&&this.load(i.options)}}setResponsive(t,e,i){this.load(i);const s=this.responsive.find((i=>"screen"===i.mode&&screen?i.maxWidth*e>screen.availWidth:i.maxWidth*e>t));return this.load(null==s?void 0:s.options),null==s?void 0:s.maxWidth}importPreset(t){this.load(pt(this,dt,"f").plugins.getPreset(t))}}dt=new WeakMap,ht=new WeakSet,ut=function(t){var e;return null!==(e=this.themes.find((e=>e.default.value&&e.default.mode===t)))&&void 0!==e?e:this.themes.find((t=>t.default.value&&"any"===t.default.mode))};class mt{constructor(){this.count=0,this.enable=!1,this.offset=0,this.speed=1,this.sync=!0}load(t){t&&(void 0!==t.count&&(this.count=v(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.offset&&(this.offset=v(t.offset)),void 0!==t.speed&&(this.speed=v(t.speed)),void 0!==t.sync&&(this.sync=t.sync))}}class yt{constructor(){this.h=new mt,this.s=new mt,this.l=new mt}load(t){t&&(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class gt extends C{constructor(){super(),this.animation=new yt}static create(t,e){const i=new gt;return i.load(t),void 0!==e&&("string"==typeof e||e instanceof Array?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),!t)return;const e=t.animation;void 0!==e&&(void 0!==e.enable?this.animation.h.load(e):this.animation.load(t.animation))}}class wt{constructor(){this.angle=new bt,this.colors=[],this.type="random"}load(t){t&&(this.angle.load(t.angle),void 0!==t.colors&&(this.colors=t.colors.map((t=>{const e=new kt;return e.load(t),e}))),void 0!==t.type&&(this.type=t.type))}}class bt{constructor(){this.value=0,this.animation=new Mt,this.direction="clockwise"}load(t){t&&(this.animation.load(t.animation),void 0!==t.value&&(this.value=t.value),void 0!==t.direction&&(this.direction=t.direction))}}class xt{constructor(){this.value=0,this.animation=new zt}load(t){t&&(this.animation.load(t.animation),void 0!==t.value&&(this.value=v(t.value)))}}class kt{constructor(){this.stop=0,this.value=new gt}load(t){t&&(void 0!==t.stop&&(this.stop=t.stop),this.value=gt.create(this.value,t.value),void 0!==t.opacity&&(this.opacity=new xt,"number"==typeof t.opacity?this.opacity.value=t.opacity:this.opacity.load(t.opacity)))}}class Mt{constructor(){this.count=0,this.enable=!1,this.speed=0,this.sync=!1}load(t){t&&(void 0!==t.count&&(this.count=v(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=v(t.speed)),void 0!==t.sync&&(this.sync=t.sync))}}class zt{constructor(){this.count=0,this.enable=!1,this.speed=0,this.sync=!1,this.startValue="random"}load(t){t&&(void 0!==t.count&&(this.count=v(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=v(t.speed)),void 0!==t.sync&&(this.sync=t.sync),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Pt{constructor(){this.enable=!0,this.retries=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.retries&&(this.retries=t.retries))}}class Ct{constructor(){this.enable=!1,this.minimumValue=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.minimumValue&&(this.minimumValue=t.minimumValue))}}class Tt{constructor(){this.random=new Ct,this.value=0}load(t){t&&("boolean"==typeof t.random?this.random.enable=t.random:this.random.load(t.random),void 0!==t.value&&(this.value=v(t.value,this.random.enable?this.random.minimumValue:void 0)))}}class St extends Tt{constructor(){super(),this.random.minimumValue=.1,this.value=1}}class Ot{constructor(){this.horizontal=new St,this.vertical=new St}load(t){t&&(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class Et{constructor(){this.bounce=new Ot,this.enable=!1,this.mode="bounce",this.overlap=new Pt}load(t){t&&(this.bounce.load(t.bounce),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),this.overlap.load(t.overlap))}}class Rt extends Tt{constructor(){super(),this.value=3}}class It extends Tt{constructor(){super(),this.value={min:4,max:9}}}class At{constructor(){this.count=1,this.factor=new Rt,this.rate=new It,this.sizeOffset=!0}load(t){t&&(void 0!==t.count&&(this.count=t.count),this.factor.load(t.factor),this.rate.load(t.rate),void 0!==t.particles&&(this.particles=Ie({},t.particles)),void 0!==t.sizeOffset&&(this.sizeOffset=t.sizeOffset))}}class Lt{constructor(){this.mode="none",this.split=new At}load(t){t&&(void 0!==t.mode&&(this.mode=t.mode),this.split.load(t.split))}}class Ft extends Tt{constructor(){super(),this.sync=!1}load(t){t&&(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Dt extends Tt{constructor(){super(),this.random.minimumValue=1e-4,this.sync=!1}load(t){t&&(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class qt{constructor(){this.count=0,this.delay=new Ft,this.duration=new Dt}load(t){t&&(void 0!==t.count&&(this.count=t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Ht{constructor(){this.blur=5,this.color=new C,this.color.value="#000",this.enable=!1}load(t){t&&(void 0!==t.blur&&(this.blur=t.blur),this.color=C.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable))}}class Vt{constructor(){this.enable=!1,this.frequency=1}load(t){t&&(void 0!==t.color&&(this.color=C.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=t.opacity))}}class _t{constructor(){this.blink=!1,this.color=new C,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new Ht,this.triangles=new Vt,this.width=1,this.warp=!1}load(t){t&&(void 0!==t.id&&(this.id=t.id),void 0!==t.blink&&(this.blink=t.blink),this.color=C.create(this.color,t.color),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.distance&&(this.distance=t.distance),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),void 0!==t.width&&(this.width=t.width),void 0!==t.warp&&(this.warp=t.warp))}}class Wt{constructor(){this.offset=0,this.value=90}load(t){t&&(void 0!==t.offset&&(this.offset=v(t.offset)),void 0!==t.value&&(this.value=v(t.value)))}}class Bt{constructor(){this.distance=200,this.enable=!1,this.rotate={x:3e3,y:3e3}}get rotateX(){return this.rotate.x}set rotateX(t){this.rotate.x=t}get rotateY(){return this.rotate.y}set rotateY(t){this.rotate.y=t}load(t){var e,i,s,n;if(!t)return;void 0!==t.distance&&(this.distance=v(t.distance)),void 0!==t.enable&&(this.enable=t.enable);const o=null!==(i=null===(e=t.rotate)||void 0===e?void 0:e.x)&&void 0!==i?i:t.rotateX;void 0!==o&&(this.rotate.x=o);const r=null!==(n=null===(s=t.rotate)||void 0===s?void 0:s.y)&&void 0!==n?n:t.rotateY;void 0!==r&&(this.rotate.y=r)}}class Gt{constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){t&&(void 0!==t.acceleration&&(this.acceleration=v(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=v(t.maxSpeed)))}}class jt extends Tt{constructor(){super()}}class $t{constructor(){this.clamp=!0,this.delay=new jt,this.enable=!1,this.options={}}load(t){t&&(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=Ie(this.options,t.options)))}}class Nt{constructor(){this.enable=!1,this.length=10,this.fillColor=new C,this.fillColor.value="#000000"}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),this.fillColor=C.create(this.fillColor,t.fillColor),void 0!==t.length&&(this.length=t.length))}}class Xt{constructor(){this.default="out"}load(t){var e,i,s,n;t&&(void 0!==t.default&&(this.default=t.default),this.bottom=null!==(e=t.bottom)&&void 0!==e?e:t.default,this.left=null!==(i=t.left)&&void 0!==i?i:t.default,this.right=null!==(s=t.right)&&void 0!==s?s:t.default,this.top=null!==(n=t.top)&&void 0!==n?n:t.default)}}class Yt{constructor(){this.acceleration=0,this.enable=!1}load(t){t&&(void 0!==t.acceleration&&(this.acceleration=v(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),this.position=t.position?Ie({},t.position):void 0)}}class Ut{constructor(){this.angle=new Wt,this.attract=new Bt,this.center={x:50,y:50,radius:0},this.decay=0,this.distance={},this.direction="none",this.drift=0,this.enable=!1,this.gravity=new Gt,this.path=new $t,this.outModes=new Xt,this.random=!1,this.size=!1,this.speed=2,this.spin=new Yt,this.straight=!1,this.trail=new Nt,this.vibrate=!1,this.warp=!1}get collisions(){return!1}set collisions(t){}get bounce(){return this.collisions}set bounce(t){this.collisions=t}get out_mode(){return this.outMode}set out_mode(t){this.outMode=t}get outMode(){return this.outModes.default}set outMode(t){this.outModes.default=t}get noise(){return this.path}set noise(t){this.path=t}load(t){var e,i,s;if(!t)return;void 0!==t.angle&&("number"==typeof t.angle?this.angle.value=t.angle:this.angle.load(t.angle)),this.attract.load(t.attract),this.center=Ie(this.center,t.center),void 0!==t.decay&&(this.decay=t.decay),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance="number"==typeof t.distance?{horizontal:t.distance,vertical:t.distance}:Ie({},t.distance)),void 0!==t.drift&&(this.drift=v(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const n=null!==(e=t.outMode)&&void 0!==e?e:t.out_mode;void 0===t.outModes&&void 0===n||("string"==typeof t.outModes||void 0===t.outModes&&void 0!==n?this.outModes.load({default:null!==(i=t.outModes)&&void 0!==i?i:n}):this.outModes.load(t.outModes)),this.path.load(null!==(s=t.path)&&void 0!==s?s:t.noise),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=v(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),this.trail.load(t.trail),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class Jt{constructor(){this.count=0,this.enable=!1,this.speed=1,this.sync=!1}load(t){t&&(void 0!==t.count&&(this.count=v(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=v(t.speed)),void 0!==t.sync&&(this.sync=t.sync))}}class Zt extends Jt{constructor(){super(),this.destroy="none",this.enable=!1,this.speed=2,this.startValue="random",this.sync=!1}get opacity_min(){return this.minimumValue}set opacity_min(t){this.minimumValue=t}load(t){var e;t&&(super.load(t),void 0!==t.destroy&&(this.destroy=t.destroy),void 0!==t.enable&&(this.enable=t.enable),this.minimumValue=null!==(e=t.minimumValue)&&void 0!==e?e:t.opacity_min,void 0!==t.speed&&(this.speed=t.speed),void 0!==t.startValue&&(this.startValue=t.startValue),void 0!==t.sync&&(this.sync=t.sync))}}class Qt extends Tt{constructor(){super(),this.animation=new Zt,this.random.minimumValue=.1,this.value=1}get anim(){return this.animation}set anim(t){this.animation=t}load(t){var e;if(!t)return;super.load(t);const i=null!==(e=t.animation)&&void 0!==e?e:t.anim;void 0!==i&&(this.animation.load(i),this.value=v(this.value,this.animation.enable?this.animation.minimumValue:void 0))}}class Kt extends Tt{constructor(){super(),this.value=45,this.random.enable=!1,this.random.minimumValue=0}load(t){void 0!==t&&super.load(t)}}class te{constructor(){this.animation=new Jt,this.enable=!1,this.opacity=1,this.rotation=new Kt,this.width=1}load(t){t&&(this.animation.load(t.animation),this.rotation.load(t.rotation),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=v(t.opacity)),void 0!==t.width&&(this.width=v(t.width)),void 0!==t.radius&&(this.radius=v(t.radius)),void 0!==t.color&&(this.color=C.create(this.color,t.color)))}}class ee{constructor(){this.enable=!1,this.area=800,this.factor=1e3}get value_area(){return this.area}set value_area(t){this.area=t}load(t){var e;if(!t)return;void 0!==t.enable&&(this.enable=t.enable);const i=null!==(e=t.area)&&void 0!==e?e:t.value_area;void 0!==i&&(this.area=i),void 0!==t.factor&&(this.factor=t.factor)}}class ie{constructor(){this.density=new ee,this.limit=0,this.value=100}get max(){return this.limit}set max(t){this.limit=t}load(t){var e;if(!t)return;this.density.load(t.density);const i=null!==(e=t.limit)&&void 0!==e?e:t.max;void 0!==i&&(this.limit=i),void 0!==t.value&&(this.value=t.value)}}class se extends Tt{constructor(){super(),this.enabled=!1,this.distance=1,this.duration=1,this.factor=1,this.speed=1}load(t){super.load(t),t&&(void 0!==t.enabled&&(this.enabled=t.enabled),void 0!==t.distance&&(this.distance=v(t.distance)),void 0!==t.duration&&(this.duration=v(t.duration)),void 0!==t.factor&&(this.factor=v(t.factor)),void 0!==t.speed&&(this.speed=v(t.speed)))}}class ne{constructor(){this.enable=!1,this.value=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.value&&(this.value=v(t.value)))}}class oe{constructor(){this.darken=new ne,this.enable=!1,this.enlighten=new ne,this.mode="vertical",this.speed=25}load(t){t&&(void 0!==t.backColor&&(this.backColor=C.create(this.backColor,t.backColor)),this.darken.load(t.darken),void 0!==t.enable&&(this.enable=t.enable),this.enlighten.load(t.enlighten),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.speed&&(this.speed=v(t.speed)))}}class re{constructor(){this.enable=!1,this.speed=0,this.sync=!1}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=v(t.speed)),void 0!==t.sync&&(this.sync=t.sync))}}class ae extends Tt{constructor(){super(),this.animation=new re,this.direction="clockwise",this.path=!1,this.value=0}load(t){t&&(super.load(t),void 0!==t.direction&&(this.direction=t.direction),this.animation.load(t.animation),void 0!==t.path&&(this.path=t.path))}}class le{constructor(){this.blur=0,this.color=new C,this.enable=!1,this.offset={x:0,y:0},this.color.value="#000"}load(t){t&&(void 0!==t.blur&&(this.blur=t.blur),this.color=C.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.offset&&(void 0!==t.offset.x&&(this.offset.x=t.offset.x),void 0!==t.offset.y&&(this.offset.y=t.offset.y)))}}class ce{constructor(){this.options={},this.type="circle"}get image(){var t;return null!==(t=this.options.image)&&void 0!==t?t:this.options.images}set image(t){this.options.image=t,this.options.images=t}get custom(){return this.options}set custom(t){this.options=t}get images(){return this.image}set images(t){this.image=t}get stroke(){return[]}set stroke(t){}get character(){var t;return null!==(t=this.options.character)&&void 0!==t?t:this.options.char}set character(t){this.options.character=t,this.options.char=t}get polygon(){var t;return null!==(t=this.options.polygon)&&void 0!==t?t:this.options.star}set polygon(t){this.options.polygon=t,this.options.star=t}load(t){var e,i,s;if(!t)return;const n=null!==(e=t.options)&&void 0!==e?e:t.custom;if(void 0!==n)for(const t in n){const e=n[t];e&&(this.options[t]=Ie(null!==(i=this.options[t])&&void 0!==i?i:{},e))}this.loadShape(t.character,"character","char",!0),this.loadShape(t.polygon,"polygon","star",!1),this.loadShape(null!==(s=t.image)&&void 0!==s?s:t.images,"image","images",!0),void 0!==t.type&&(this.type=t.type)}loadShape(t,e,i,s){var n,o,r,a;void 0!==t&&(t instanceof Array?(this.options[e]instanceof Array||(this.options[e]=[],this.options[i]&&!s||(this.options[i]=[])),this.options[e]=Ie(null!==(n=this.options[e])&&void 0!==n?n:[],t),this.options[i]&&!s||(this.options[i]=Ie(null!==(o=this.options[i])&&void 0!==o?o:[],t))):(this.options[e]instanceof Array&&(this.options[e]={},this.options[i]&&!s||(this.options[i]={})),this.options[e]=Ie(null!==(r=this.options[e])&&void 0!==r?r:{},t),this.options[i]&&!s||(this.options[i]=Ie(null!==(a=this.options[i])&&void 0!==a?a:{},t))))}}class he extends Jt{constructor(){super(),this.destroy="none",this.enable=!1,this.speed=5,this.startValue="random",this.sync=!1}get size_min(){return this.minimumValue}set size_min(t){this.minimumValue=t}load(t){var e;super.load(t),t&&(void 0!==t.destroy&&(this.destroy=t.destroy),void 0!==t.enable&&(this.enable=t.enable),this.minimumValue=null!==(e=t.minimumValue)&&void 0!==e?e:t.size_min,void 0!==t.speed&&(this.speed=t.speed),void 0!==t.startValue&&(this.startValue=t.startValue),void 0!==t.sync&&(this.sync=t.sync))}}class de extends Tt{constructor(){super(),this.animation=new he,this.random.minimumValue=1,this.value=3}get anim(){return this.animation}set anim(t){this.animation=t}load(t){var e;if(super.load(t),!t)return;const i=null!==(e=t.animation)&&void 0!==e?e:t.anim;void 0!==i&&(this.animation.load(i),this.value=v(this.value,this.animation.enable?this.animation.minimumValue:void 0))}}class ue{constructor(){this.width=0}load(t){t&&(void 0!==t.color&&(this.color=gt.create(this.color,t.color)),void 0!==t.width&&(this.width=t.width),void 0!==t.opacity&&(this.opacity=t.opacity))}}class ve{constructor(){this.enable=!1,this.speed=0,this.sync=!1}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=v(t.speed)),void 0!==t.sync&&(this.sync=t.sync))}}class pe extends Tt{constructor(){super(),this.animation=new ve,this.direction="clockwise",this.enable=!1,this.value=0}load(t){super.load(t),t&&(this.animation.load(t.animation),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.enable&&(this.enable=t.enable))}}class fe{constructor(){this.enable=!1,this.frequency=.05,this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=C.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=v(t.opacity)))}}class me{constructor(){this.lines=new fe,this.particles=new fe}load(t){t&&(this.lines.load(t.lines),this.particles.load(t.particles))}}class ye{constructor(){this.distance=5,this.enable=!1,this.speed=50}load(t){t&&(void 0!==t.distance&&(this.distance=v(t.distance)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=v(t.speed)))}}class ge extends Tt{constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),t&&(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class we{constructor(){this.bounce=new Ot,this.collisions=new Et,this.color=new gt,this.color.value="#fff",this.destroy=new Lt,this.gradient=[],this.groups={},this.life=new qt,this.links=new _t,this.move=new Ut,this.number=new ie,this.opacity=new Qt,this.orbit=new te,this.reduceDuplicates=!1,this.repulse=new se,this.roll=new oe,this.rotate=new ae,this.shadow=new le,this.shape=new ce,this.size=new de,this.stroke=new ue,this.tilt=new pe,this.twinkle=new me,this.wobble=new ye,this.zIndex=new ge}get line_linked(){return this.links}set line_linked(t){this.links=t}get lineLinked(){return this.links}set lineLinked(t){this.links=t}load(t){var e,i,s,n,o,r,a,l;if(!t)return;this.bounce.load(t.bounce),this.color.load(gt.create(this.color,t.color)),this.destroy.load(t.destroy),this.life.load(t.life);const c=null!==(i=null!==(e=t.links)&&void 0!==e?e:t.lineLinked)&&void 0!==i?i:t.line_linked;if(void 0!==c&&this.links.load(c),void 0!==t.groups)for(const e in t.groups){const i=t.groups[e];void 0!==i&&(this.groups[e]=Ie(null!==(s=this.groups[e])&&void 0!==s?s:{},i))}this.move.load(t.move),this.number.load(t.number),this.opacity.load(t.opacity),this.orbit.load(t.orbit),void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.repulse.load(t.repulse),this.roll.load(t.roll),this.rotate.load(t.rotate),this.shape.load(t.shape),this.size.load(t.size),this.shadow.load(t.shadow),this.tilt.load(t.tilt),this.twinkle.load(t.twinkle),this.wobble.load(t.wobble),this.zIndex.load(t.zIndex);const h=null!==(o=null===(n=t.move)||void 0===n?void 0:n.collisions)&&void 0!==o?o:null===(r=t.move)||void 0===r?void 0:r.bounce;void 0!==h&&(this.collisions.enable=h),this.collisions.load(t.collisions);const d=null!==(a=t.stroke)&&void 0!==a?a:null===(l=t.shape)||void 0===l?void 0:l.stroke;d&&(d instanceof Array?this.stroke=d.map((t=>{const e=new ue;return e.load(t),e})):(this.stroke instanceof Array&&(this.stroke=new ue),this.stroke.load(d)));const u=t.gradient;u&&(u instanceof Array?this.gradient=u.map((t=>{const e=new wt;return e.load(t),e})):(this.gradient instanceof Array&&(this.gradient=new wt),this.gradient.load(u)))}}function be(t,e,i,s,n,o){const r={bounced:!1};return e.min<s.min||e.min>s.max||e.max<s.min||e.max>s.max||(t.max>=i.min&&t.max<=(i.max+i.min)/2&&n>0||t.min<=i.max&&t.min>(i.max+i.min)/2&&n<0)&&(r.velocity=n*-o,r.bounced=!0),r}function xe(t,e){if(!(e instanceof Array))return t.matches(e);for(const i of e)if(t.matches(i))return!0;return!1}function ke(){return"undefined"==typeof window||!window||void 0===window.document||!window.document}function Me(){return ke()?t=>setTimeout(t):t=>(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.setTimeout)(t)}function ze(){return ke()?t=>clearTimeout(t):t=>(window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||window.clearTimeout)(t)}function Pe(t,e){return t===e||e instanceof Array&&e.indexOf(t)>-1}async function Ce(t,e){try{await document.fonts.load(`${null!=e?e:"400"} 36px '${null!=t?t:"Verdana"}'`)}catch(t){}}function Te(t){return Math.floor(Math.random()*t.length)}function Se(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Te(t)]}function Oe(t,e,i,s,n){return Ee(Re(t,null!=s?s:0),e,i,n)}function Ee(t,e,i,s){let n=!0;return s&&"bottom"!==s||(n=t.top<e.height+i.x),!n||s&&"left"!==s||(n=t.right>i.x),!n||s&&"right"!==s||(n=t.left<e.width+i.y),!n||s&&"top"!==s||(n=t.bottom>i.y),n}function Re(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function Ie(t,...e){for(const i of e){if(null==i)continue;if("object"!=typeof i){t=i;continue}const e=Array.isArray(i);!e||"object"==typeof t&&t&&Array.isArray(t)?e||"object"==typeof t&&t&&!Array.isArray(t)||(t={}):t=[];for(const e in i){if("__proto__"===e)continue;const s=i[e],n="object"==typeof s,o=t;o[e]=n&&Array.isArray(s)?s.map((t=>Ie(o[e],t))):Ie(o[e],s)}}return t}function Ae(t,e){return e instanceof Array?!!e.find((e=>e.enable&&Pe(t,e.mode))):Pe(t,e.mode)}function Le(t,e,i){if(e instanceof Array)for(const s of e){const e=s.mode;s.enable&&Pe(t,e)&&Fe(s,i)}else{const s=e.mode;e.enable&&Pe(t,s)&&Fe(e,i)}}function Fe(t,e){const i=t.selectors;if(i instanceof Array)for(const s of i)e(s,t);else e(i,t)}function De(t,e){if(e&&t)return t instanceof Array?t.find((t=>xe(e,t.selectors))):xe(e,t.selectors)?t:void 0}function qe(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:r.create(p(t.options.bounce.horizontal),p(t.options.bounce.vertical))}}function He(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,o]=[t.position,e.position],{dx:r,dy:a}=f(o,n);if(i*r+s*a<0)return;const l=-Math.atan2(a,r),c=t.mass,h=e.mass,d=t.velocity.rotate(l),u=e.velocity.rotate(l),v=w(d,u,c,h),p=w(u,d,c,h),m=v.rotate(-l),y=p.rotate(-l);t.velocity.x=m.x*t.factor.x,t.velocity.y=m.y*t.factor.y,e.velocity.x=y.x*e.factor.x,e.velocity.y=y.y*e.factor.y}function Ve(t,e){const i=Re(t.getPosition(),t.getRadius()),s=be({min:i.left,max:i.right},{min:i.top,max:i.bottom},{min:e.left,max:e.right},{min:e.top,max:e.bottom},t.velocity.x,p(t.options.bounce.horizontal));s.bounced&&(void 0!==s.velocity&&(t.velocity.x=s.velocity),void 0!==s.position&&(t.position.x=s.position));const n=be({min:i.top,max:i.bottom},{min:i.left,max:i.right},{min:e.top,max:e.bottom},{min:e.left,max:e.right},t.velocity.y,p(t.options.bounce.vertical));n.bounced&&(void 0!==n.velocity&&(t.velocity.y=n.velocity),void 0!==n.position&&(t.position.y=n.position))}function _e(t,...e){for(const i of e)t.load(i)}function We(t,...e){const i=new ft(t);return _e(i,...e),i}function Be(...t){const e=new we;return _e(e,...t),e}const Ge="generated",je="random",$e="mid",Ne="touchend",Xe="mousedown",Ye="mouseup",Ue="mousemove",Je="touchstart",Ze="touchmove",Qe="mouseleave",Ke="mouseout",ti="touchcancel",ei="resize",ii="visibilitychange",si="No polygon data loaded.",ni="No polygon found, you need to specify SVG url in config.";function oi(t,e,i){let s=i;return s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+6*(e-t)*s:s<.5?e:s<2/3?t+(e-t)*(2/3-s)*6:t}function ri(t){if(t.startsWith("rgb")){const e=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.]+)\s*)?\)/i.exec(t);return e?{a:e.length>4?parseFloat(e[5]):1,b:parseInt(e[3],10),g:parseInt(e[2],10),r:parseInt(e[1],10)}:void 0}if(t.startsWith("hsl")){const e=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(t);return e?vi({a:e.length>4?parseFloat(e[5]):1,h:parseInt(e[1],10),l:parseInt(e[3],10),s:parseInt(e[2],10)}):void 0}if(t.startsWith("hsv")){const e=/hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(t);return e?wi({a:e.length>4?parseFloat(e[5]):1,h:parseInt(e[1],10),s:parseInt(e[2],10),v:parseInt(e[3],10)}):void 0}{const e=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,i=t.replace(e,((t,e,i,s,n)=>e+e+i+i+s+s+(void 0!==n?n+n:""))),s=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(i);return s?{a:void 0!==s[4]?parseInt(s[4],16)/255:1,b:parseInt(s[3],16),g:parseInt(s[2],16),r:parseInt(s[1],16)}:void 0}}function ai(t,e,i=!0){var s,n,o;if(void 0===t)return;const r="string"==typeof t?{value:t}:t;let a;if("string"==typeof r.value)a=r.value===je?ki():di(r.value);else if(r.value instanceof Array){a=ai({value:Se(r.value,e,i)})}else{const t=r.value,e=null!==(s=t.rgb)&&void 0!==s?s:r.value;if(void 0!==e.r)a=e;else{const e=null!==(n=t.hsl)&&void 0!==n?n:r.value;if(void 0!==e.h&&void 0!==e.l)a=ui(e);else{const e=null!==(o=t.hsv)&&void 0!==o?o:r.value;void 0!==e.h&&void 0!==e.v&&(a=gi(e))}}}return a}function li(t,e,i=!0){const s=ai(t,e,i);return void 0!==s?ci(s):void 0}function ci(t){const e=t.r/255,i=t.g/255,s=t.b/255,n=Math.max(e,i,s),o=Math.min(e,i,s),r={h:0,l:(n+o)/2,s:0};return n!==o&&(r.s=r.l<.5?(n-o)/(n+o):(n-o)/(2-n-o),r.h=e===n?(i-s)/(n-o):r.h=i===n?2+(s-e)/(n-o):4+(e-i)/(n-o)),r.l*=100,r.s*=100,r.h*=60,r.h<0&&(r.h+=360),r}function hi(t){var e;return null===(e=ri(t))||void 0===e?void 0:e.a}function di(t){return ri(t)}function ui(t){const e={b:0,g:0,r:0},i={h:t.h/360,l:t.l/100,s:t.s/100};if(0===i.s)e.b=i.l,e.g=i.l,e.r=i.l;else{const t=i.l<.5?i.l*(1+i.s):i.l+i.s-i.l*i.s,s=2*i.l-t;e.r=oi(s,t,i.h+1/3),e.g=oi(s,t,i.h),e.b=oi(s,t,i.h-1/3)}return e.r=Math.floor(255*e.r),e.g=Math.floor(255*e.g),e.b=Math.floor(255*e.b),e}function vi(t){const e=ui(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function pi(t){const e=t.l/100,i=e+t.s/100*Math.min(e,1-e),s=i?2*(1-e/i):0;return{h:t.h,s:100*s,v:100*i}}function fi(t){const e=pi(t);return{a:t.a,h:e.h,s:e.s,v:e.v}}function mi(t){const e=t.v/100,i=e*(1-t.s/100/2),s=0===i||1===i?0:(e-i)/Math.min(i,1-i);return{h:t.h,l:100*i,s:100*s}}function yi(t){const e=mi(t);return{a:t.a,h:e.h,l:e.l,s:e.s}}function gi(t){const e={b:0,g:0,r:0},i=t.h/60,s=t.s/100,n=t.v/100,o=n*s,r=o*(1-Math.abs(i%2-1));let a;if(i>=0&&i<=1?a={r:o,g:r,b:0}:i>1&&i<=2?a={r:r,g:o,b:0}:i>2&&i<=3?a={r:0,g:o,b:r}:i>3&&i<=4?a={r:0,g:r,b:o}:i>4&&i<=5?a={r:r,g:0,b:o}:i>5&&i<=6&&(a={r:o,g:0,b:r}),a){const t=n-o;e.r=Math.floor(255*(a.r+t)),e.g=Math.floor(255*(a.g+t)),e.b=Math.floor(255*(a.b+t))}return e}function wi(t){const e=gi(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function bi(t){const e={r:t.r/255,g:t.g/255,b:t.b/255},i=Math.max(e.r,e.g,e.b),s=i-Math.min(e.r,e.g,e.b);let n=0;i===e.r?n=(e.g-e.b)/s*60:i===e.g?n=60*(2+(e.b-e.r)/s):i===e.b&&(n=60*(4+(e.r-e.g)/s));return{h:n,s:100*(i?s/i:0),v:100*i}}function xi(t){const e=bi(t);return{a:t.a,h:e.h,s:e.s,v:e.v}}function ki(t){const e=null!=t?t:0;return{b:Math.floor(c(v(e,256))),g:Math.floor(c(v(e,256))),r:Math.floor(c(v(e,256)))}}function Mi(t,e){return`rgba(${t.r}, ${t.g}, ${t.b}, ${null!=e?e:1})`}function zi(t,e){return`hsla(${t.h}, ${t.s}%, ${t.l}%, ${null!=e?e:1})`}function Pi(t,e){return zi(mi(t),e)}function Ci(t,e,i,s){let n=t,o=e;return void 0===n.r&&(n=ui(t)),void 0===o.r&&(o=ui(e)),{b:l(n.b,o.b,i,s),g:l(n.g,o.g,i,s),r:l(n.r,o.r,i,s)}}function Ti(t,e,i){var s,n;if(i===je)return ki();if("mid"!==i)return i;{const i=null!==(s=t.getFillColor())&&void 0!==s?s:t.getStrokeColor(),o=null!==(n=null==e?void 0:e.getFillColor())&&void 0!==n?n:null==e?void 0:e.getStrokeColor();if(i&&o&&e)return Ci(i,o,t.getRadius(),e.getRadius());{const t=null!=i?i:o;if(t)return ui(t)}}}function Si(t,e,i){const s="string"==typeof t?t:t.value;return s===je?i?ai({value:s}):e?je:$e:ai({value:s})}function Oi(t){return void 0!==t?{h:t.h.value,s:t.s.value,l:t.l.value}:void 0}function Ei(t,e,i){const s={h:{enable:!1,value:t.h},s:{enable:!1,value:t.s},l:{enable:!1,value:t.l}};return e&&(Ri(s.h,e.h,i),Ri(s.s,e.s,i),Ri(s.l,e.l,i)),s}function Ri(t,e,i){if(t.enable=e.enable,t.enable){if(t.velocity=h(e.speed)/100*i,e.sync)return;t.status=0,t.velocity*=Math.random(),t.value&&(t.value*=Math.random())}else t.velocity=0}function Ii(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}function Ai(t,e,i,s){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.lineTo(s.x,s.y),t.closePath()}function Li(t,e,i){t.save(),t.fillStyle=null!=i?i:"rgba(0,0,0,0)",t.fillRect(0,0,e.width,e.height),t.restore()}function Fi(t,e){t.clearRect(0,0,e.width,e.height)}function Di(t,e,i,s,n){t.save(),Ii(t,s,n),t.lineWidth=e,t.strokeStyle=i,t.stroke(),t.restore()}function qi(t,e,i,s){const n=Math.floor(i.getRadius()/e.getRadius()),o=e.getFillColor(),r=i.getFillColor();if(!o||!r)return;const a=e.getPosition(),l=i.getPosition(),c=Ci(o,r,e.getRadius(),i.getRadius()),h=t.createLinearGradient(a.x,a.y,l.x,l.y);return h.addColorStop(0,zi(o,s)),h.addColorStop(n>1?1:n,Mi(c,s)),h.addColorStop(1,zi(r,s)),h}function Hi(t,e,i,s,n,o){t.save(),Ii(t,i,s),t.strokeStyle=Mi(n,o),t.lineWidth=e,t.stroke(),t.restore()}function Vi(t,e,i,s,n,o,r,a,l,c){var h,d,u,v;const p=i.getPosition(),f=i.options.tilt,m=i.options.roll;if(e.save(),f.enable||m.enable){const t=m.enable&&i.roll,s=f.enable&&i.tilt,n=t&&("horizontal"===m.mode||"both"===m.mode),o=t&&("vertical"===m.mode||"both"===m.mode);e.setTransform(n?Math.cos(i.roll.angle):1,s?Math.cos(i.tilt.value)*i.tilt.cosDirection:0,s?Math.sin(i.tilt.value)*i.tilt.sinDirection:0,o?Math.sin(i.roll.angle):1,p.x,p.y)}else e.translate(p.x,p.y);e.beginPath();const y=(null!==(d=null===(h=i.rotate)||void 0===h?void 0:h.value)&&void 0!==d?d:0)+(i.options.rotate.path?i.velocity.angle:0);0!==y&&e.rotate(y),o&&(e.globalCompositeOperation=r);const g=i.shadowColor;c.enable&&g&&(e.shadowBlur=c.blur,e.shadowColor=Mi(g),e.shadowOffsetX=c.offset.x,e.shadowOffsetY=c.offset.y),n.fill&&(e.fillStyle=n.fill);const w=i.stroke;e.lineWidth=null!==(u=i.strokeWidth)&&void 0!==u?u:0,n.stroke&&(e.strokeStyle=n.stroke),_i(t,e,i,a,l,s),(null!==(v=null==w?void 0:w.width)&&void 0!==v?v:0)>0&&e.stroke(),i.close&&e.closePath(),i.fill&&e.fill(),e.restore(),e.save(),f.enable&&i.tilt?e.setTransform(1,Math.cos(i.tilt.value)*i.tilt.cosDirection,Math.sin(i.tilt.value)*i.tilt.sinDirection,1,p.x,p.y):e.translate(p.x,p.y),0!==y&&e.rotate(y),o&&(e.globalCompositeOperation=r),Wi(t,e,i,a,l,s),e.restore()}function _i(t,e,i,s,n,o){if(!i.shape)return;const r=t.drawers.get(i.shape);r&&r.draw(e,i,s,n,o,t.retina.pixelRatio)}function Wi(t,e,i,s,n,o){if(!i.shape)return;const r=t.drawers.get(i.shape);(null==r?void 0:r.afterEffect)&&r.afterEffect(e,i,s,n,o,t.retina.pixelRatio)}function Bi(t,e,i){e.draw&&(t.save(),e.draw(t,i),t.restore())}function Gi(t,e,i,s){e.drawParticle&&(t.save(),e.drawParticle(t,i,s),t.restore())}function ji(t,e,i,s,n,o,r,a,l){if(o<=0)return;const c=e.getPosition();i&&(t.strokeStyle=zi(i,n)),t.lineWidth=o;const h=r*Math.PI/180;t.beginPath(),t.ellipse(c.x,c.y,s/2,2*s,h,a,l),t.stroke()}function $i(t,e,i){return{h:t.h,s:t.s,l:t.l+("darken"===e?-1:1)*i}}class Ni{constructor(t){this.container=t,this.size={height:0,width:0},this.context=null,this.generatedCanvas=!1}init(){this.resize(),this.initStyle(),this.initCover(),this.initTrail(),this.initBackground(),this.paint()}loadCanvas(t){var e;this.generatedCanvas&&(null===(e=this.element)||void 0===e||e.remove()),this.generatedCanvas=t.dataset&&Ge in t.dataset?"true"===t.dataset[Ge]:this.generatedCanvas,this.element=t,this.originalStyle=Ie({},this.element.style),this.size.height=t.offsetHeight,this.size.width=t.offsetWidth,this.context=this.element.getContext("2d"),this.container.retina.init(),this.initBackground()}destroy(){var t;this.generatedCanvas&&(null===(t=this.element)||void 0===t||t.remove()),this.draw((t=>{Fi(t,this.size)}))}paint(){const t=this.container.actualOptions;this.draw((e=>{t.backgroundMask.enable&&t.backgroundMask.cover?(Fi(e,this.size),this.paintBase(this.coverColorStyle)):this.paintBase()}))}clear(){const t=this.container.actualOptions,e=t.particles.move.trail;t.backgroundMask.enable?this.paint():e.enable&&e.length>0&&this.trailFillColor?this.paintBase(Mi(this.trailFillColor,1/e.length)):this.draw((t=>{Fi(t,this.size)}))}async windowResize(){if(!this.element)return;this.resize();const t=this.container,e=t.updateActualOptions();t.particles.setDensity();for(const[,e]of t.plugins)void 0!==e.resize&&e.resize();e&&await t.refresh()}resize(){if(!this.element)return;const t=this.container,e=t.retina.pixelRatio,i=t.canvas.size,s=this.element.offsetWidth*e,n=this.element.offsetHeight*e;if(n===i.height&&s===i.width&&n===this.element.height&&s===this.element.width)return;const o=Object.assign({},i);this.element.width=i.width=this.element.offsetWidth*e,this.element.height=i.height=this.element.offsetHeight*e,this.container.started&&(this.resizeFactor={width:i.width/o.width,height:i.height/o.height})}drawConnectLine(t,e){this.draw((i=>{var s;const n=this.lineStyle(t,e);if(!n)return;const o=t.getPosition(),r=e.getPosition();Di(i,null!==(s=t.retina.linksWidth)&&void 0!==s?s:this.container.retina.linksWidth,n,o,r)}))}drawGrabLine(t,e,i,s){const n=this.container;this.draw((o=>{var r;const a=t.getPosition();Hi(o,null!==(r=t.retina.linksWidth)&&void 0!==r?r:n.retina.linksWidth,a,s,e,i)}))}drawParticle(t,e){var i,s,n,o,r,a;if(t.spawning||t.destroyed)return;const l=t.getRadius();if(l<=0)return;const c=t.getFillColor(),h=null!==(i=t.getStrokeColor())&&void 0!==i?i:c;if(!c&&!h)return;let[d,u]=this.getPluginParticleColors(t);d&&u||(d||(d=c||void 0),u||(u=h||void 0));const v=this.container.actualOptions,p=t.options.zIndex,f=(1-t.zIndexFactor)**p.opacityRate,m=null!==(o=null!==(s=t.bubble.opacity)&&void 0!==s?s:null===(n=t.opacity)||void 0===n?void 0:n.value)&&void 0!==o?o:1,y=null!==(a=null===(r=t.stroke)||void 0===r?void 0:r.opacity)&&void 0!==a?a:m,g=m*f,w=y*f,b={fill:d?zi(d,g):void 0};b.stroke=u?zi(u,w):b.fill,this.draw((i=>{const s=(1-t.zIndexFactor)**p.sizeRate,n=this.container;for(const e of n.particles.updaters)if(e.beforeDraw&&e.beforeDraw(t),e.getColorStyles){const{fill:s,stroke:n}=e.getColorStyles(t,i,l,g);s&&(b.fill=s),n&&(b.stroke=n)}Vi(n,i,t,e,b,v.backgroundMask.enable,v.backgroundMask.composite,l*s,g,t.options.shadow);for(const e of n.particles.updaters)e.afterDraw&&e.afterDraw(t)}))}drawPlugin(t,e){this.draw((i=>{Bi(i,t,e)}))}drawParticlePlugin(t,e,i){this.draw((s=>{Gi(s,t,e,i)}))}initBackground(){const t=this.container.actualOptions.background,e=this.element,i=null==e?void 0:e.style;if(i){if(t.color){const e=ai(t.color);i.backgroundColor=e?Mi(e,t.opacity):""}else i.backgroundColor="";i.backgroundImage=t.image||"",i.backgroundPosition=t.position||"",i.backgroundRepeat=t.repeat||"",i.backgroundSize=t.size||""}}draw(t){if(this.context)return t(this.context)}initCover(){const t=this.container.actualOptions.backgroundMask.cover,e=ai(t.color);if(e){const i={r:e.r,g:e.g,b:e.b,a:t.opacity};this.coverColorStyle=Mi(i,i.a)}}initTrail(){const t=this.container.actualOptions,e=ai(t.particles.move.trail.fillColor);if(e){const i=t.particles.move.trail;this.trailFillColor={r:e.r,g:e.g,b:e.b,a:1/i.length}}}getPluginParticleColors(t){let e,i;for(const[,s]of this.container.plugins)if(!e&&s.particleFillColor&&(e=li(s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=li(s.particleStrokeColor(t))),e&&i)break;return[e,i]}initStyle(){const t=this.element,e=this.container.actualOptions;if(!t)return;const i=this.originalStyle;e.fullScreen.enable?(this.originalStyle=Ie({},t.style),t.style.setProperty("position","fixed","important"),t.style.setProperty("z-index",e.fullScreen.zIndex.toString(10),"important"),t.style.setProperty("top","0","important"),t.style.setProperty("left","0","important"),t.style.setProperty("width","100%","important"),t.style.setProperty("height","100%","important")):i&&(t.style.position=i.position,t.style.zIndex=i.zIndex,t.style.top=i.top,t.style.left=i.left,t.style.width=i.width,t.style.height=i.height);for(const i in e.style){if(!i||!e.style)continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}paintBase(t){this.draw((e=>{Li(e,this.size,t)}))}lineStyle(t,e){return this.draw((i=>{const s=this.container.actualOptions.interactivity.modes.connect;return qi(i,t,e,s.links.opacity)}))}}function Xi(t,e,i,s,n){if(s){let s={passive:!0};"boolean"==typeof n?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}class Yi{constructor(t){this.container=t,this.canPush=!0,this.mouseMoveHandler=t=>this.mouseTouchMove(t),this.touchStartHandler=t=>this.mouseTouchMove(t),this.touchMoveHandler=t=>this.mouseTouchMove(t),this.touchEndHandler=()=>this.mouseTouchFinish(),this.mouseLeaveHandler=()=>this.mouseTouchFinish(),this.touchCancelHandler=()=>this.mouseTouchFinish(),this.touchEndClickHandler=t=>this.mouseTouchClick(t),this.mouseUpHandler=t=>this.mouseTouchClick(t),this.mouseDownHandler=()=>this.mouseDown(),this.visibilityChangeHandler=()=>this.handleVisibilityChange(),this.themeChangeHandler=t=>this.handleThemeChange(t),this.oldThemeChangeHandler=t=>this.handleThemeChange(t),this.resizeHandler=()=>this.handleWindowResize()}addListeners(){this.manageListeners(!0)}removeListeners(){this.manageListeners(!1)}manageListeners(t){var e;const i=this.container,s=i.actualOptions,n=s.interactivity.detectsOn;let o=Qe;if("window"===n)i.interactivity.element=window,o=Ke;else if("parent"===n&&i.canvas.element){const t=i.canvas.element;i.interactivity.element=null!==(e=t.parentElement)&&void 0!==e?e:t.parentNode}else i.interactivity.element=i.canvas.element;const r=!ke()&&"undefined"!=typeof matchMedia&&matchMedia("(prefers-color-scheme: dark)");r&&(void 0!==r.addEventListener?Xi(r,"change",this.themeChangeHandler,t):void 0!==r.addListener&&(t?r.addListener(this.oldThemeChangeHandler):r.removeListener(this.oldThemeChangeHandler)));const a=i.interactivity.element;if(!a)return;const l=a;(s.interactivity.events.onHover.enable||s.interactivity.events.onClick.enable)&&(Xi(a,Ue,this.mouseMoveHandler,t),Xi(a,Je,this.touchStartHandler,t),Xi(a,Ze,this.touchMoveHandler,t),s.interactivity.events.onClick.enable?(Xi(a,Ne,this.touchEndClickHandler,t),Xi(a,Ye,this.mouseUpHandler,t),Xi(a,Xe,this.mouseDownHandler,t)):Xi(a,Ne,this.touchEndHandler,t),Xi(a,o,this.mouseLeaveHandler,t),Xi(a,ti,this.touchCancelHandler,t)),i.canvas.element&&(i.canvas.element.style.pointerEvents=l===i.canvas.element?"initial":"none"),s.interactivity.events.resize&&("undefined"!=typeof ResizeObserver?this.resizeObserver&&!t?(i.canvas.element&&this.resizeObserver.unobserve(i.canvas.element),this.resizeObserver.disconnect(),delete this.resizeObserver):!this.resizeObserver&&t&&i.canvas.element&&(this.resizeObserver=new ResizeObserver((t=>{t.find((t=>t.target===i.canvas.element))&&this.handleWindowResize()})),this.resizeObserver.observe(i.canvas.element)):Xi(window,ei,this.resizeHandler,t)),document&&Xi(document,ii,this.visibilityChangeHandler,t,!1)}handleWindowResize(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),delete this.resizeTimeout),this.resizeTimeout=setTimeout((async()=>{var t;return null===(t=this.container.canvas)||void 0===t?void 0:t.windowResize()}),500)}handleVisibilityChange(){const t=this.container,e=t.actualOptions;this.mouseTouchFinish(),e.pauseOnBlur&&((null===document||void 0===document?void 0:document.hidden)?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.getAnimationStatus()?t.play(!0):t.draw(!0)))}mouseDown(){const t=this.container.interactivity;if(t){const e=t.mouse;e.clicking=!0,e.downPosition=e.position}}mouseTouchMove(t){var e,i,s,n,o,r,a;const l=this.container,c=l.actualOptions;if(!(null===(e=l.interactivity)||void 0===e?void 0:e.element))return;let h;l.interactivity.mouse.inside=!0;const d=l.canvas.element;if(t.type.startsWith("mouse")){this.canPush=!0;const e=t;if(l.interactivity.element===window){if(d){const t=d.getBoundingClientRect();h={x:e.clientX-t.left,y:e.clientY-t.top}}}else if("parent"===c.interactivity.detectsOn){const t=e.target,n=e.currentTarget,o=l.canvas.element;if(t&&n&&o){const i=t.getBoundingClientRect(),s=n.getBoundingClientRect(),r=o.getBoundingClientRect();h={x:e.offsetX+2*i.left-(s.left+r.left),y:e.offsetY+2*i.top-(s.top+r.top)}}else h={x:null!==(i=e.offsetX)&&void 0!==i?i:e.clientX,y:null!==(s=e.offsetY)&&void 0!==s?s:e.clientY}}else e.target===l.canvas.element&&(h={x:null!==(n=e.offsetX)&&void 0!==n?n:e.clientX,y:null!==(o=e.offsetY)&&void 0!==o?o:e.clientY})}else{this.canPush="touchmove"!==t.type;const e=t,i=e.touches[e.touches.length-1],s=null==d?void 0:d.getBoundingClientRect();h={x:i.clientX-(null!==(r=null==s?void 0:s.left)&&void 0!==r?r:0),y:i.clientY-(null!==(a=null==s?void 0:s.top)&&void 0!==a?a:0)}}const u=l.retina.pixelRatio;h&&(h.x*=u,h.y*=u),l.interactivity.mouse.position=h,l.interactivity.status=Ue}mouseTouchFinish(){const t=this.container.interactivity;if(!t)return;const e=t.mouse;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=Qe,e.inside=!1,e.clicking=!1}mouseTouchClick(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse;s.inside=!0;let n=!1;const o=s.position;if(o&&i.interactivity.events.onClick.enable){for(const[,t]of e.plugins)if(t.clickPositionValid&&(n=t.clickPositionValid(o),n))break;n||this.doMouseTouchClick(t),s.clicking=!1}}doMouseTouchClick(t){const e=this.container,i=e.actualOptions;if(this.canPush){const t=e.interactivity.mouse.position;if(!t)return;e.interactivity.mouse.clickPosition={x:t.x,y:t.y},e.interactivity.mouse.clickTime=(new Date).getTime();const s=i.interactivity.events.onClick;if(s.mode instanceof Array)for(const t of s.mode)this.handleClickMode(t);else this.handleClickMode(s.mode)}"touchend"===t.type&&setTimeout((()=>this.mouseTouchFinish()),500)}handleThemeChange(t){const e=t.matches?this.container.options.defaultDarkTheme:this.container.options.defaultLightTheme,i=this.container.options.themes.find((t=>t.name===e));i&&i.default.auto&&this.container.loadTheme(e)}handleClickMode(t){this.container.handleClickMode(t)}}class Ui{constructor(t){this.container=t}async nextFrame(t){var e;try{const i=this.container;if(void 0!==i.lastFrameTime&&t<i.lastFrameTime+1e3/i.fpsLimit)return void i.draw(!1);null!==(e=i.lastFrameTime)&&void 0!==e||(i.lastFrameTime=t);const s=t-i.lastFrameTime,n={value:s,factor:60*s/1e3};if(i.lifeTime+=n.value,i.lastFrameTime=t,s>1e3)return void i.draw(!1);if(await i.particles.draw(n),i.duration>0&&i.lifeTime>i.duration)return void i.destroy();i.getAnimationStatus()&&i.draw(!1)}catch(t){console.error("tsParticles error in animation loop",t)}}}var Ji,Zi=function(t,e,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,i):n?n.value=i:e.set(t,i),i},Qi=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)};class Ki{constructor(t,e){this.container=e,Ji.set(this,void 0),Zi(this,Ji,t,"f"),this.externalInteractors=[],this.particleInteractors=[],this.init()}init(){const t=Qi(this,Ji,"f").plugins.getInteractors(this.container,!0);this.externalInteractors=[],this.particleInteractors=[];for(const e of t)switch(e.type){case 0:this.externalInteractors.push(e);break;case 1:this.particleInteractors.push(e)}}async externalInteract(t){for(const e of this.externalInteractors)e.isEnabled()&&await e.interact(t)}async particlesInteract(t,e){for(const e of this.externalInteractors)e.reset(t);for(const i of this.particleInteractors)i.isEnabled(t)&&await i.interact(t,e)}handleClickMode(t){for(const e of this.externalInteractors)e.handleClickMode&&e.handleClickMode(t)}}Ji=new WeakMap;class ts extends r{constructor(t,e,i){if(super(t,e),"number"!=typeof t&&t)this.z=t.z;else{if(void 0===i)throw new Error("tsParticles - Vector not initialized correctly");this.z=i}}static clone(t){return ts.create(t.x,t.y,t.z)}static create(t,e,i){return new ts(t,e,i)}static get origin(){return ts.create(0,0,0)}add(t){return t instanceof ts?ts.create(this.x+t.x,this.y+t.y,this.z+t.z):super.add(t)}addTo(t){super.addTo(t),t instanceof ts&&(this.z+=t.z)}sub(t){return t instanceof ts?ts.create(this.x-t.x,this.y-t.y,this.z-t.z):super.sub(t)}subFrom(t){super.subFrom(t),t instanceof ts&&(this.z-=t.z)}mult(t){return ts.create(this.x*t,this.y*t,this.z*t)}multTo(t){super.multTo(t),this.z*=t}div(t){return ts.create(this.x/t,this.y/t,this.z/t)}divTo(t){super.divTo(t),this.z/=t}copy(){return ts.clone(this)}setTo(t){super.setTo(t);const e=t;void 0!==e.z&&(this.z=e.z)}}var es,is=function(t,e,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,i):n?n.value=i:e.set(t,i),i},ss=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)};const ns=t=>{(Pe(t.outMode,t.checkModes)||Pe(t.outMode,t.checkModes))&&(t.coord>t.maxCoord-2*t.radius?t.setCb(-t.radius):t.coord<2*t.radius&&t.setCb(t.radius))};class os{constructor(t,e,i,s,n,o){var l,v,f,m,g,w,b;this.id=e,this.container=i,this.group=o,es.set(this,void 0),is(this,es,t,"f"),this.fill=!0,this.close=!0,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.splitCount=0,this.misplaced=!1,this.retina={maxDistance:{}},this.outType="normal",this.ignoresResizeRatio=!0;const x=i.retina.pixelRatio,k=Be(i.actualOptions.particles),M=k.shape.type,z=k.reduceDuplicates;if(this.shape=M instanceof Array?Se(M,this.id,z):M,null==n?void 0:n.shape){if(n.shape.type){const t=n.shape.type;this.shape=t instanceof Array?Se(t,this.id,z):t}const t=new ce;t.load(n.shape),this.shape&&(this.shapeData=this.loadShapeData(t,z))}else this.shapeData=this.loadShapeData(k.shape,z);void 0!==n&&k.load(n),void 0!==(null===(l=this.shapeData)||void 0===l?void 0:l.particles)&&k.load(null===(v=this.shapeData)||void 0===v?void 0:v.particles),this.fill=null!==(m=null===(f=this.shapeData)||void 0===f?void 0:f.fill)&&void 0!==m?m:this.fill,this.close=null!==(w=null===(g=this.shapeData)||void 0===g?void 0:g.close)&&void 0!==w?w:this.close,this.options=k,this.pathDelay=1e3*p(this.options.move.path.delay);const P=h(this.options.zIndex.value);i.retina.initParticle(this);const C=this.options.size,T=C.value;this.size={enable:C.animation.enable,value:h(C.value)*i.retina.pixelRatio,max:u(T)*x,min:d(T)*x,loops:0,maxLoops:h(C.animation.count)};const S=C.animation;if(S.enable){switch(this.size.status=0,S.startValue){case"min":this.size.value=this.size.min,this.size.status=0;break;case"random":this.size.value=c(this.size)*x,this.size.status=Math.random()>=.5?0:1;break;case"max":default:this.size.value=this.size.max,this.size.status=1}this.size.velocity=(null!==(b=this.retina.sizeAnimationSpeed)&&void 0!==b?b:i.retina.sizeAnimationSpeed)/100*i.retina.reduceFactor,S.sync||(this.size.velocity*=Math.random())}this.bubble={inRange:!1},this.position=this.calcPosition(i,s,a(P,0,i.zLayers)),this.initialPosition=this.position.copy();const O=i.canvas.size,E=this.options.move.center;switch(this.moveCenter={x:O.width*E.x/100,y:O.height*E.y/100,radius:this.options.move.center.radius},this.direction=y(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case"inside":this.outType="inside";break;case"outside":this.outType="outside"}this.initialVelocity=this.calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.moveDecay=1-h(this.options.move.decay);const R=this.options.move.gravity;this.gravity={enable:R.enable,acceleration:h(R.acceleration),inverse:R.inverse},this.offset=r.origin;const I=i.particles;I.needsSort=I.needsSort||I.lastZIndex<this.position.z,I.lastZIndex=this.position.z,this.zIndexFactor=this.position.z/i.zLayers,this.sides=24;let A=i.drawers.get(this.shape);A||(A=ss(this,es,"f").plugins.getShapeDrawer(this.shape),A&&i.drawers.set(this.shape,A)),(null==A?void 0:A.loadShape)&&(null==A||A.loadShape(this));const L=null==A?void 0:A.getSidesCount;L&&(this.sides=L(this)),this.life=this.loadLife(),this.spawning=this.life.delay>0,this.shadowColor=ai(this.options.shadow.color);for(const t of i.particles.updaters)t.init&&t.init(this);for(const t of i.particles.movers)t.init&&t.init(this);A&&A.particleInit&&A.particleInit(i,this);for(const[,t]of i.plugins)t.particleCreated&&t.particleCreated(this)}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}isInsideCanvas(){const t=this.getRadius(),e=this.container.canvas.size;return this.position.x>=-t&&this.position.y>=-t&&this.position.y<=e.height+t&&this.position.x<=e.width+t}draw(t){const e=this.container;for(const[,i]of e.plugins)e.canvas.drawParticlePlugin(i,this,t);e.canvas.drawParticle(this,t)}getPosition(){return{x:this.position.x+this.offset.x,y:this.position.y+this.offset.y,z:this.position.z}}getRadius(){var t;return null!==(t=this.bubble.radius)&&void 0!==t?t:this.size.value}getMass(){return this.getRadius()**2*Math.PI/2}getFillColor(){var t,e;const i=null!==(t=this.bubble.color)&&void 0!==t?t:Oi(this.color);if(i&&this.roll&&(this.backColor||this.roll.alter)){const t="both"===this.options.roll.mode?2:1,s="horizontal"===this.options.roll.mode?Math.PI/2:0;if(Math.floor(((null!==(e=this.roll.angle)&&void 0!==e?e:0)+s)/(Math.PI/t))%2){if(this.backColor)return this.backColor;if(this.roll.alter)return $i(i,this.roll.alter.type,this.roll.alter.value)}}return i}getStrokeColor(){var t,e;return null!==(e=null!==(t=this.bubble.color)&&void 0!==t?t:Oi(this.strokeColor))&&void 0!==e?e:this.getFillColor()}destroy(t){if(this.destroyed=!0,this.bubble.inRange=!1,this.unbreakable)return;this.destroyed=!0,this.bubble.inRange=!1;for(const[,e]of this.container.plugins)e.particleDestroyed&&e.particleDestroyed(this,t);if(t)return;"split"===this.options.destroy.mode&&this.split()}reset(){this.opacity&&(this.opacity.loops=0),this.size.loops=0}split(){const t=this.options.destroy.split;if(t.count>=0&&this.splitCount++>t.count)return;const e=p(t.rate);for(let t=0;t<e;t++)this.container.particles.addSplitParticle(this)}calcPosition(t,e,i,s=0){var n,o,r,a;for(const[,s]of t.plugins){const t=void 0!==s.particlePosition?s.particlePosition(e,this):void 0;if(void 0!==t)return ts.create(t.x,t.y,i)}const l=z({size:t.canvas.size,position:e}),c=ts.create(l.x,l.y,i),h=this.getRadius(),d=this.options.move.outModes,u=e=>{ns({outMode:e,checkModes:["bounce","bounce-horizontal"],coord:c.x,maxCoord:t.canvas.size.width,setCb:t=>c.x+=t,radius:h})},v=e=>{ns({outMode:e,checkModes:["bounce","bounce-vertical"],coord:c.y,maxCoord:t.canvas.size.height,setCb:t=>c.y+=t,radius:h})};return u(null!==(n=d.left)&&void 0!==n?n:d.default),u(null!==(o=d.right)&&void 0!==o?o:d.default),v(null!==(r=d.top)&&void 0!==r?r:d.default),v(null!==(a=d.bottom)&&void 0!==a?a:d.default),this.checkOverlap(c,s)?this.calcPosition(t,void 0,i,s+1):c}checkOverlap(t,e=0){const i=this.options.collisions,s=this.getRadius();if(!i.enable)return!1;const n=i.overlap;if(n.enable)return!1;const o=n.retries;if(o>=0&&e>o)throw new Error("Particle is overlapping and can't be placed");let r=!1;for(const e of this.container.particles.array)if(m(t,e.position)<s+e.getRadius()){r=!0;break}return r}calculateVelocity(){const t=g(this.direction).copy(),e=this.options.move;if("inside"===e.direction||"outside"===e.direction)return t;const i=Math.PI/180*h(e.angle.value),s=Math.PI/180*h(e.angle.offset),n={left:s-i/2,right:s+i/2};return e.straight||(t.angle+=c(v(n.left,n.right))),e.random&&"number"==typeof e.speed&&(t.length*=Math.random()),t}loadShapeData(t,e){const i=t.options[this.shape];if(i)return Ie({},i instanceof Array?Se(i,this.id,e):i)}loadLife(){const t=this.container,e=this.options,i=e.life,s={delay:t.retina.reduceFactor?h(i.delay.value)*(i.delay.sync?1:Math.random())/t.retina.reduceFactor*1e3:0,delayTime:0,duration:t.retina.reduceFactor?h(i.duration.value)*(i.duration.sync?1:Math.random())/t.retina.reduceFactor*1e3:0,time:0,count:e.life.count};return s.duration<=0&&(s.duration=-1),s.count<=0&&(s.count=-1),s}}es=new WeakMap;class rs{constructor(t,e){this.position=t,this.particle=e}}class as{constructor(t,e){this.position={x:t,y:e}}}class ls extends as{constructor(t,e,i){super(t,e),this.radius=i}contains(t){return m(t,this.position)<=this.radius}intersects(t){const e=t,i=t,s=this.position,n=t.position,o=Math.abs(n.x-s.x),r=Math.abs(n.y-s.y),a=this.radius;if(void 0!==i.radius){return a+i.radius>Math.sqrt(o*o+r+r)}if(void 0!==e.size){const t=e.size.width,i=e.size.height,s=Math.pow(o-t,2)+Math.pow(r-i,2);return!(o>a+t||r>a+i)&&(o<=t||r<=i||s<=a*a)}return!1}}class cs extends as{constructor(t,e,i,s){super(t,e),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){const e=t,i=t,s=this.size.width,n=this.size.height,o=this.position,r=t.position;if(void 0!==i.radius)return i.intersects(this);if(!e.size)return!1;const a=e.size,l=a.width,c=a.height;return r.x<o.x+s&&r.x+l>o.x&&r.y<o.y+n&&r.y+c>o.y}}class hs extends ls{constructor(t,e,i,s){super(t,e,i),this.canvasSize=s,this.canvasSize=Object.assign({},s)}contains(t){if(super.contains(t))return!0;const e={x:t.x-this.canvasSize.width,y:t.y};if(super.contains(e))return!0;const i={x:t.x-this.canvasSize.width,y:t.y-this.canvasSize.height};if(super.contains(i))return!0;const s={x:t.x,y:t.y-this.canvasSize.height};return super.contains(s)}intersects(t){if(super.intersects(t))return!0;const e=t,i=t,s={x:t.position.x-this.canvasSize.width,y:t.position.y-this.canvasSize.height};if(void 0!==i.radius){const t=new ls(s.x,s.y,2*i.radius);return super.intersects(t)}if(void 0!==e.size){const t=new cs(s.x,s.y,2*e.size.width,2*e.size.height);return super.intersects(t)}return!1}}class ds{constructor(t,e){this.rectangle=t,this.capacity=e,this.points=[],this.divided=!1}insert(t){var e,i,s,n,o;return!!this.rectangle.contains(t.position)&&(this.points.length<this.capacity?(this.points.push(t),!0):(this.divided||this.subdivide(),null!==(o=(null===(e=this.northEast)||void 0===e?void 0:e.insert(t))||(null===(i=this.northWest)||void 0===i?void 0:i.insert(t))||(null===(s=this.southEast)||void 0===s?void 0:s.insert(t))||(null===(n=this.southWest)||void 0===n?void 0:n.insert(t)))&&void 0!==o&&o))}queryCircle(t,e){return this.query(new ls(t.x,t.y,e))}queryCircleWarp(t,e,i){const s=i,n=i;return this.query(new hs(t.x,t.y,e,void 0!==s.canvas?s.canvas.size:n))}queryRectangle(t,e){return this.query(new cs(t.x,t.y,e.width,e.height))}query(t,e){var i,s,n,o;const r=null!=e?e:[];if(!t.intersects(this.rectangle))return[];for(const e of this.points)!t.contains(e.position)&&m(t.position,e.position)>e.particle.getRadius()||r.push(e.particle);return this.divided&&(null===(i=this.northEast)||void 0===i||i.query(t,r),null===(s=this.northWest)||void 0===s||s.query(t,r),null===(n=this.southEast)||void 0===n||n.query(t,r),null===(o=this.southWest)||void 0===o||o.query(t,r)),r}subdivide(){const t=this.rectangle.position.x,e=this.rectangle.position.y,i=this.rectangle.size.width,s=this.rectangle.size.height,n=this.capacity;this.northEast=new ds(new cs(t,e,i/2,s/2),n),this.northWest=new ds(new cs(t+i/2,e,i/2,s/2),n),this.southEast=new ds(new cs(t,e+s/2,i/2,s/2),n),this.southWest=new ds(new cs(t+i/2,e+s/2,i/2,s/2),n),this.divided=!0}}var us,vs=function(t,e,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,i):n?n.value=i:e.set(t,i),i},ps=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)};class fs{constructor(t,e){this.container=e,us.set(this,void 0),vs(this,us,t,"f"),this.nextId=0,this.array=[],this.zArray=[],this.limit=0,this.needsSort=!1,this.lastZIndex=0,this.freqs={links:new Map,triangles:new Map},this.interactionManager=new Ki(ps(this,us,"f"),e);const i=this.container.canvas.size;this.linksColors=new Map,this.quadTree=new ds(new cs(-i.width/4,-i.height/4,3*i.width/2,3*i.height/2),4),this.movers=ps(this,us,"f").plugins.getMovers(e,!0),this.updaters=ps(this,us,"f").plugins.getUpdaters(e,!0)}get count(){return this.array.length}init(){var t;const e=this.container,i=e.actualOptions;this.lastZIndex=0,this.needsSort=!1,this.freqs.links=new Map,this.freqs.triangles=new Map;let s=!1;this.updaters=ps(this,us,"f").plugins.getUpdaters(e,!0),this.interactionManager.init();for(const[,t]of e.plugins)if(void 0!==t.particlesInitialization&&(s=t.particlesInitialization()),s)break;if(this.addManualParticles(),!s){for(const e in i.particles.groups){const s=i.particles.groups[e];for(let n=this.count,o=0;o<(null===(t=s.number)||void 0===t?void 0:t.value)&&n<i.particles.number.value;n++,o++)this.addParticle(void 0,s,e)}for(let t=this.count;t<i.particles.number.value;t++)this.addParticle()}e.pathGenerator.init(e)}async redraw(){this.clear(),this.init(),await this.draw({value:0,factor:0})}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++){const t=this.array[o];if(!t||t.group!==i)continue;t.destroy(s),this.array.splice(o--,1);const e=this.zArray.indexOf(t);this.zArray.splice(e,1),n++,ps(this,us,"f").dispatchEvent("particleRemoved",{container:this.container,data:{particle:t}})}}remove(t,e,i){this.removeAt(this.array.indexOf(t),void 0,e,i)}async update(t){const e=this.container,i=[];e.pathGenerator.update();for(const[,i]of e.plugins)void 0!==i.update&&i.update(t);for(const s of this.array){const n=e.canvas.resizeFactor;n&&!s.ignoresResizeRatio&&(s.position.x*=n.width,s.position.y*=n.height),s.ignoresResizeRatio=!1,s.bubble.inRange=!1;for(const[,e]of this.container.plugins){if(s.destroyed)break;e.particleUpdate&&e.particleUpdate(s,t)}for(const e of this.movers)e.isEnabled(s)&&e.move(s,t);s.destroyed?i.push(s):this.quadTree.insert(new rs(s.getPosition(),s))}for(const t of i)this.remove(t);await this.interactionManager.externalInteract(t);for(const i of e.particles.array){for(const e of this.updaters)e.update(i,t);i.destroyed||i.spawning||await this.interactionManager.particlesInteract(i,t)}delete e.canvas.resizeFactor}async draw(t){const e=this.container,i=this.container.canvas.size;this.quadTree=new ds(new cs(-i.width/4,-i.height/4,3*i.width/2,3*i.height/2),4),e.canvas.clear(),await this.update(t),this.needsSort&&(this.zArray.sort(((t,e)=>e.position.z-t.position.z||t.id-e.id)),this.lastZIndex=this.zArray[this.zArray.length-1].position.z,this.needsSort=!1);for(const[,i]of e.plugins)e.canvas.drawPlugin(i,t);for(const e of this.zArray)e.draw(t)}clear(){this.array=[],this.zArray=[]}push(t,e,i,s){this.pushing=!0;for(let n=0;n<t;n++)this.addParticle(null==e?void 0:e.position,i,s);this.pushing=!1}addParticle(t,e,i){const s=this.container,n=s.actualOptions.particles.number.limit*s.density;if(n>0){const t=this.count+1-n;t>0&&this.removeQuantity(t)}return this.pushParticle(t,e,i)}addSplitParticle(t){const e=t.options.destroy.split,i=Be(t.options),s=p(e.factor);i.color.load({value:{hsl:t.getFillColor()}}),"number"==typeof i.size.value?i.size.value/=s:(i.size.value.min/=s,i.size.value.max/=s),i.load(e.particles);const n=e.sizeOffset?v(-t.size.value,t.size.value):0,o={x:t.position.x+c(n),y:t.position.y+c(n)};return this.pushParticle(o,i,t.group,(e=>!(e.size.value<.5)&&(e.velocity.length=c(v(t.velocity.length,e.velocity.length)),e.splitCount=t.splitCount+1,e.unbreakable=!0,setTimeout((()=>{e.unbreakable=!1}),500),!0)))}removeQuantity(t,e){this.removeAt(0,t,e)}getLinkFrequency(t,e){const i=v(t.id,e.id),s=`${d(i)}_${u(i)}`;let n=this.freqs.links.get(s);return void 0===n&&(n=Math.random(),this.freqs.links.set(s,n)),n}getTriangleFrequency(t,e,i){let[s,n,o]=[t.id,e.id,i.id];s>n&&([n,s]=[s,n]),n>o&&([o,n]=[n,o]),s>o&&([o,s]=[s,o]);const r=`${s}_${n}_${o}`;let a=this.freqs.triangles.get(r);return void 0===a&&(a=Math.random(),this.freqs.triangles.set(r,a)),a}addManualParticles(){const t=this.container,e=t.actualOptions;for(const i of e.manualParticles)this.addParticle(x({size:t.canvas.size,position:i.position}),i.options)}setDensity(){const t=this.container.actualOptions;for(const e in t.particles.groups)this.applyDensity(t.particles.groups[e],0,e);this.applyDensity(t.particles,t.manualParticles.length)}handleClickMode(t){this.interactionManager.handleClickMode(t)}applyDensity(t,e,i){var s;if(!(null===(s=t.number.density)||void 0===s?void 0:s.enable))return;const n=t.number,o=this.initDensityFactor(n.density),r=n.value,a=n.limit>0?n.limit:r,l=Math.min(r,a)*o+e,c=Math.min(this.count,this.array.filter((t=>t.group===i)).length);this.limit=n.limit*o,c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)}initDensityFactor(t){const e=this.container;if(!e.canvas.element||!t.enable)return 1;const i=e.canvas.element,s=e.retina.pixelRatio;return i.width*i.height/(t.factor*s**2*t.area)}pushParticle(t,e,i,s){try{const n=new os(ps(this,us,"f"),this.nextId,this.container,t,e,i);let o=!0;if(s&&(o=s(n)),!o)return;return this.array.push(n),this.zArray.push(n),this.nextId++,ps(this,us,"f").dispatchEvent("particleAdded",{container:this.container,data:{particle:n}}),n}catch(t){return void console.warn(`error adding particle: ${t}`)}}}us=new WeakMap;class ms{constructor(t){this.container=t}init(){const t=this.container,e=t.actualOptions;this.pixelRatio=!e.detectRetina||ke()?1:window.devicePixelRatio;const i=this.container.actualOptions.motion;if(i&&(i.disable||i.reduce.value))if(ke()||"undefined"==typeof matchMedia||!matchMedia)this.reduceFactor=1;else{const e=matchMedia("(prefers-reduced-motion: reduce)");if(e){this.handleMotionChange(e);const i=()=>{this.handleMotionChange(e),t.refresh().catch((()=>{}))};void 0!==e.addEventListener?e.addEventListener("change",i):void 0!==e.addListener&&e.addListener(i)}}else this.reduceFactor=1;const s=this.pixelRatio;if(t.canvas.element){const e=t.canvas.element;t.canvas.size.width=e.offsetWidth*s,t.canvas.size.height=e.offsetHeight*s}const n=e.particles;this.attractDistance=h(n.move.attract.distance)*s,this.linksDistance=n.links.distance*s,this.linksWidth=n.links.width*s,this.sizeAnimationSpeed=h(n.size.animation.speed)*s,this.maxSpeed=h(n.move.gravity.maxSpeed)*s;const o=e.interactivity.modes;this.connectModeDistance=o.connect.distance*s,this.connectModeRadius=o.connect.radius*s,this.grabModeDistance=o.grab.distance*s,this.repulseModeDistance=o.repulse.distance*s,this.bounceModeDistance=o.bounce.distance*s,this.attractModeDistance=o.attract.distance*s,this.slowModeRadius=o.slow.radius*s,this.bubbleModeDistance=o.bubble.distance*s,o.bubble.size&&(this.bubbleModeSize=o.bubble.size*s)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move.distance,n=t.retina;n.attractDistance=h(e.move.attract.distance)*i,n.linksDistance=e.links.distance*i,n.linksWidth=e.links.width*i,n.moveDrift=h(e.move.drift)*i,n.moveSpeed=h(e.move.speed)*i,n.sizeAnimationSpeed=h(e.size.animation.speed)*i;const o=n.maxDistance;o.horizontal=void 0!==s.horizontal?s.horizontal*i:void 0,o.vertical=void 0!==s.vertical?s.vertical*i:void 0,n.maxSpeed=h(e.move.gravity.maxSpeed)*i}handleMotionChange(t){const e=this.container.actualOptions;if(t.matches){const t=e.motion;this.reduceFactor=t.disable?0:t.reduce.value?1/t.reduce.factor:1}else this.reduceFactor=1}}var ys,gs=function(t,e,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,i):n?n.value=i:e.set(t,i),i},ws=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)};class bs{constructor(t,e,i){this.id=e,ys.set(this,void 0),gs(this,ys,t,"f"),this.fpsLimit=120,this.duration=0,this.lifeTime=0,this.firstStart=!0,this.started=!1,this.destroyed=!1,this.paused=!0,this.lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._sourceOptions=i,this._initialSourceOptions=i,this.retina=new ms(this),this.canvas=new Ni(this),this.particles=new fs(ws(this,ys,"f"),this),this.drawer=new Ui(this),this.pathGenerator={generate:t=>{const e=t.velocity.copy();return e.angle+=e.length*Math.PI/180,e},init:()=>{},update:()=>{}},this.interactivity={mouse:{clicking:!1,inside:!1}},this.plugins=new Map,this.drawers=new Map,this.density=1,this._options=We(ws(this,ys,"f")),this.actualOptions=We(ws(this,ys,"f")),this.eventListeners=new Yi(this),"undefined"!=typeof IntersectionObserver&&IntersectionObserver&&(this.intersectionObserver=new IntersectionObserver((t=>this.intersectionManager(t)))),ws(this,ys,"f").dispatchEvent("containerBuilt",{container:this})}get options(){return this._options}get sourceOptions(){return this._sourceOptions}play(t){const e=this.paused||t;if(!this.firstStart||this.actualOptions.autoPlay){if(this.paused&&(this.paused=!1),e)for(const[,t]of this.plugins)t.play&&t.play();ws(this,ys,"f").dispatchEvent("containerPlay",{container:this}),this.draw(e||!1)}else this.firstStart=!1}pause(){if(void 0!==this.drawAnimationFrame&&(ze()(this.drawAnimationFrame),delete this.drawAnimationFrame),!this.paused){for(const[,t]of this.plugins)t.pause&&t.pause();this.pageHidden||(this.paused=!0),ws(this,ys,"f").dispatchEvent("containerPaused",{container:this})}}draw(t){let e=t;this.drawAnimationFrame=Me()((async t=>{e&&(this.lastFrameTime=void 0,e=!1),await this.drawer.nextFrame(t)}))}getAnimationStatus(){return!this.paused&&!this.pageHidden}setNoise(t,e,i){this.setPath(t,e,i)}setPath(t,e,i){var s,n,o;if(t)if("function"==typeof t)this.pathGenerator.generate=t,e&&(this.pathGenerator.init=e),i&&(this.pathGenerator.update=i);else{const e=this.pathGenerator;this.pathGenerator=t,(s=this.pathGenerator).generate||(s.generate=e.generate),(n=this.pathGenerator).init||(n.init=e.init),(o=this.pathGenerator).update||(o.update=e.update)}}destroy(){this.stop(),this.canvas.destroy();for(const[,t]of this.drawers)t.destroy&&t.destroy(this);for(const t of this.drawers.keys())this.drawers.delete(t);this.destroyed=!0,ws(this,ys,"f").dispatchEvent("containerDestroyed",{container:this})}exportImg(t){this.exportImage(t)}exportImage(t,e,i){var s;return null===(s=this.canvas.element)||void 0===s?void 0:s.toBlob(t,null!=e?e:"image/png",i)}exportConfiguration(){return JSON.stringify(this.actualOptions,void 0,2)}refresh(){return this.stop(),this.start()}reset(){return this._options=We(ws(this,ys,"f")),this.refresh()}stop(){if(this.started){this.firstStart=!0,this.started=!1,this.eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.clear(),this.interactivity.element instanceof HTMLElement&&this.intersectionObserver&&this.intersectionObserver.unobserve(this.interactivity.element);for(const[,t]of this.plugins)t.stop&&t.stop();for(const t of this.plugins.keys())this.plugins.delete(t);this.particles.linksColors=new Map,delete this.particles.grabLineColor,delete this.particles.linksColor,this._sourceOptions=this._options,ws(this,ys,"f").dispatchEvent("containerStopped",{container:this})}}async loadTheme(t){this.currentTheme=t,await this.refresh()}async start(){if(!this.started){await this.init(),this.started=!0,this.eventListeners.addListeners(),this.interactivity.element instanceof HTMLElement&&this.intersectionObserver&&this.intersectionObserver.observe(this.interactivity.element);for(const[,t]of this.plugins)void 0!==t.startAsync?await t.startAsync():void 0!==t.start&&t.start();ws(this,ys,"f").dispatchEvent("containerStarted",{container:this}),this.play()}}addClickHandler(t){const e=this.interactivity.element;if(!e)return;const i=(e,i,s)=>{if(this.destroyed)return;const n=this.retina.pixelRatio,o={x:i.x*n,y:i.y*n},r=this.particles.quadTree.queryCircle(o,s*n);t(e,r)};let s=!1,n=!1;e.addEventListener("click",(t=>{if(this.destroyed)return;const e=t,s={x:e.offsetX||e.clientX,y:e.offsetY||e.clientY};i(t,s,1)})),e.addEventListener("touchstart",(()=>{this.destroyed||(s=!0,n=!1)})),e.addEventListener("touchmove",(()=>{this.destroyed||(n=!0)})),e.addEventListener("touchend",(t=>{var e,o,r;if(!this.destroyed){if(s&&!n){const s=t;let n=s.touches[s.touches.length-1];if(!n&&(n=s.changedTouches[s.changedTouches.length-1],!n))return;const a=null===(e=this.canvas.element)||void 0===e?void 0:e.getBoundingClientRect(),l={x:n.clientX-(null!==(o=null==a?void 0:a.left)&&void 0!==o?o:0),y:n.clientY-(null!==(r=null==a?void 0:a.top)&&void 0!==r?r:0)};i(t,l,Math.max(n.radiusX,n.radiusY))}s=!1,n=!1}})),e.addEventListener("touchcancel",(()=>{this.destroyed||(s=!1,n=!1)}))}handleClickMode(t){this.particles.handleClickMode(t);for(const[,e]of this.plugins)e.handleClickMode&&e.handleClickMode(t)}updateActualOptions(){this.actualOptions.responsive=[];const t=this.actualOptions.setResponsive(this.canvas.size.width,this.retina.pixelRatio,this._options);return this.actualOptions.setTheme(this.currentTheme),this.responsiveMaxWidth!=t&&(this.responsiveMaxWidth=t,!0)}async init(){const t=ws(this,ys,"f").plugins.getSupportedShapes();for(const e of t){const t=ws(this,ys,"f").plugins.getShapeDrawer(e);t&&this.drawers.set(e,t)}this._options=We(ws(this,ys,"f"),this._initialSourceOptions,this.sourceOptions),this.actualOptions=We(ws(this,ys,"f"),this._options),this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize(),this.zLayers=this.actualOptions.zLayers,this.duration=h(this.actualOptions.duration),this.lifeTime=0,this.fpsLimit=this.actualOptions.fpsLimit>0?this.actualOptions.fpsLimit:120;const e=ws(this,ys,"f").plugins.getAvailablePlugins(this);for(const[t,i]of e)this.plugins.set(t,i);for(const[,t]of this.drawers)t.init&&await t.init(this);for(const[,t]of this.plugins)t.init?t.init(this.actualOptions):void 0!==t.initAsync&&await t.initAsync(this.actualOptions);const i=this.actualOptions.particles.move.path;i.generator&&this.setPath(ws(this,ys,"f").plugins.getPathGenerator(i.generator)),ws(this,ys,"f").dispatchEvent("containerInit",{container:this}),this.particles.init(),this.particles.setDensity();for(const[,t]of this.plugins)void 0!==t.particlesSetup&&t.particlesSetup();ws(this,ys,"f").dispatchEvent("particlesSetup",{container:this})}intersectionManager(t){if(this.actualOptions.pauseOnOutsideViewport)for(const e of t)e.target===this.interactivity.element&&(e.isIntersecting?this.play():this.pause())}}ys=new WeakMap;var xs,ks=function(t,e,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,i):n?n.value=i:e.set(t,i),i},Ms=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)};class zs{constructor(t){xs.set(this,void 0),ks(this,xs,t,"f")}dom(){return Ms(this,xs,"f").domArray}domItem(t){const e=this.dom(),i=e[t];if(i&&!i.destroyed)return i;e.splice(t,1)}async loadOptions(t){var e,i,s;const n=null!==(e=t.tagId)&&void 0!==e?e:`tsparticles${Math.floor(1e4*Math.random())}`,{options:o,index:r}=t;let a=null!==(i=t.element)&&void 0!==i?i:document.getElementById(n);a||(a=document.createElement("div"),a.id=n,null===(s=document.querySelector("body"))||void 0===s||s.append(a));const l=o instanceof Array?Se(o,r):o,c=this.dom(),h=c.findIndex((t=>t.id===n));if(h>=0){const t=this.domItem(h);t&&!t.destroyed&&(t.destroy(),c.splice(h,1))}let d;if("canvas"===a.tagName.toLowerCase())d=a,d.dataset[Ge]="false";else{const t=a.getElementsByTagName("canvas");t.length?(d=t[0],d.dataset[Ge]="false"):(d=document.createElement("canvas"),d.dataset[Ge]="true",d.style.width="100%",d.style.height="100%",a.appendChild(d))}const u=new bs(Ms(this,xs,"f"),n,l);return h>=0?c.splice(h,0,u):c.push(u),u.canvas.loadCanvas(d),await u.start(),u}async loadRemoteOptions(t){const{url:e,index:i}=t,s=e instanceof Array?Se(e,i):e;if(!s)return;const n=await fetch(s);if(!n.ok)return o=n.status,console.error(`Error tsParticles - fetch status: ${o}`),void console.error("Error tsParticles - File config not found");var o;const r=await n.json();return this.loadOptions({tagId:t.tagId,element:t.element,index:i,options:r})}load(t,e,i){const s={index:i};return"string"==typeof t?s.tagId=t:s.options=t,"number"==typeof e?s.index=null!=e?e:s.index:s.options=null!=e?e:s.options,this.loadOptions(s)}async set(t,e,i,s){const n={index:s};return"string"==typeof t?n.tagId=t:n.element=t,e instanceof HTMLElement?n.element=e:n.options=e,"number"==typeof i?n.index=i:n.options=null!=i?i:n.options,this.loadOptions(n)}async loadJSON(t,e,i){let s,n;return"number"==typeof e||void 0===e?s=t:(n=t,s=e),this.loadRemoteOptions({tagId:n,url:s,index:i})}async setJSON(t,e,i,s){let n,o,r,a;return t instanceof HTMLElement?(a=t,n=e,r=i):(o=t,a=e,n=i,r=s),this.loadRemoteOptions({tagId:o,url:n,index:r,element:a})}setOnClickHandler(t){const e=this.dom();if(!e.length)throw new Error("Can only set click handlers after calling tsParticles.load() or tsParticles.loadJSON()");for(const i of e)i.addClickHandler(t)}addEventListener(t,e){Ms(this,xs,"f").eventDispatcher.addEventListener(t,e)}removeEventListener(t,e){Ms(this,xs,"f").eventDispatcher.removeEventListener(t,e)}dispatchEvent(t,e){Ms(this,xs,"f").eventDispatcher.dispatchEvent(t,e)}}xs=new WeakMap;var Ps,Cs=function(t,e,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,i):n?n.value=i:e.set(t,i),i};class Ts{constructor(t){Ps.set(this,void 0),Cs(this,Ps,t,"f"),this.plugins=[],this.interactorsInitializers=new Map,this.moversInitializers=new Map,this.updatersInitializers=new Map,this.interactors=new Map,this.movers=new Map,this.updaters=new Map,this.presets=new Map,this.drawers=new Map,this.pathGenerators=new Map}getPlugin(t){return this.plugins.find((e=>e.id===t))}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}getAvailablePlugins(t){const e=new Map;for(const i of this.plugins)i.needsPlugin(t.actualOptions)&&e.set(i.id,i.getPlugin(t));return e}loadOptions(t,e){for(const i of this.plugins)i.loadOptions(t,e)}getPreset(t){return this.presets.get(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}getShapeDrawer(t){return this.drawers.get(t)}addShapeDrawer(t,e){this.getShapeDrawer(t)||this.drawers.set(t,e)}getSupportedShapes(){return this.drawers.keys()}getPathGenerator(t){return this.pathGenerators.get(t)}addPathGenerator(t,e){this.getPathGenerator(t)||this.pathGenerators.set(t,e)}getInteractors(t,e=!1){let i=this.interactors.get(t);return i&&!e||(i=[...this.interactorsInitializers.values()].map((e=>e(t))),this.interactors.set(t,i)),i}addInteractor(t,e){this.interactorsInitializers.set(t,e)}getUpdaters(t,e=!1){let i=this.updaters.get(t);return i&&!e||(i=[...this.updatersInitializers.values()].map((e=>e(t))),this.updaters.set(t,i)),i}addParticleUpdater(t,e){this.updatersInitializers.set(t,e)}getMovers(t,e=!1){let i=this.movers.get(t);return i&&!e||(i=[...this.moversInitializers.values()].map((e=>e(t))),this.movers.set(t,i)),i}addParticleMover(t,e){this.moversInitializers.set(t,e)}}Ps=new WeakMap;var Ss,Os,Es=function(t,e,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,i):n?n.value=i:e.set(t,i),i},Rs=function(t,e,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:e.get(t)};class Is{constructor(){Ss.set(this,void 0),Os.set(this,void 0),this.domArray=[],this.eventDispatcher=new o,Es(this,Ss,!1,"f"),Es(this,Os,new zs(this),"f"),this.plugins=new Ts(this)}init(){Rs(this,Ss,"f")||Es(this,Ss,!0,"f")}async loadFromArray(t,e,i){return Rs(this,Os,"f").load(t,e,i)}async load(t,e){return Rs(this,Os,"f").load(t,e)}async set(t,e,i){return Rs(this,Os,"f").set(t,e,i)}async loadJSON(t,e,i){return Rs(this,Os,"f").loadJSON(t,e,i)}async setJSON(t,e,i,s){return Rs(this,Os,"f").setJSON(t,e,i,s)}setOnClickHandler(t){Rs(this,Os,"f").setOnClickHandler(t)}dom(){return Rs(this,Os,"f").dom()}domItem(t){return Rs(this,Os,"f").domItem(t)}async refresh(){for(const t of this.dom())await t.refresh()}async addShape(t,e,i,s,n){let o;o="function"==typeof e?{afterEffect:s,destroy:n,draw:e,init:i}:e,this.plugins.addShapeDrawer(t,o),await this.refresh()}async addPreset(t,e,i=!1){this.plugins.addPreset(t,e,i),await this.refresh()}async addPlugin(t){this.plugins.addPlugin(t),await this.refresh()}async addPathGenerator(t,e){this.plugins.addPathGenerator(t,e),await this.refresh()}async addInteractor(t,e){this.plugins.addInteractor(t,e),await this.refresh()}async addMover(t,e){this.plugins.addParticleMover(t,e),await this.refresh()}async addParticleUpdater(t,e){this.plugins.addParticleUpdater(t,e),await this.refresh()}addEventListener(t,e){Rs(this,Os,"f").addEventListener(t,e)}removeEventListener(t,e){Rs(this,Os,"f").removeEventListener(t,e)}dispatchEvent(t,e){Rs(this,Os,"f").dispatchEvent(t,e)}}Ss=new WeakMap,Os=new WeakMap;class As{constructor(t){this.container=t,this.type=0}}class Ls{constructor(t){this.container=t,this.type=1}}const Fs=new Is;return Fs.init(),e}()}));
\No newline at end of file