@tsparticles/preset-triangles 3.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +212 -0
- package/browser/bundle.js +6 -0
- package/browser/index.js +18 -0
- package/browser/options.js +25 -0
- package/cjs/bundle.js +19 -0
- package/cjs/index.js +33 -0
- package/cjs/options.js +28 -0
- package/esm/bundle.js +6 -0
- package/esm/index.js +18 -0
- package/esm/options.js +25 -0
- package/package.json +98 -0
- package/report.html +39 -0
- package/tsparticles.preset.triangles.bundle.js +6795 -0
- package/tsparticles.preset.triangles.bundle.min.js +2 -0
- package/tsparticles.preset.triangles.bundle.min.js.LICENSE.txt +8 -0
- package/tsparticles.preset.triangles.js +203 -0
- package/tsparticles.preset.triangles.min.js +2 -0
- package/tsparticles.preset.triangles.min.js.LICENSE.txt +8 -0
- package/types/bundle.d.ts +3 -0
- package/types/index.d.ts +2 -0
- package/types/options.d.ts +2 -0
- package/umd/bundle.js +20 -0
- package/umd/index.js +32 -0
- package/umd/options.js +38 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see tsparticles.preset.triangles.bundle.min.js.LICENSE.txt */
|
|
2
|
+
!function(t,i){if("object"==typeof exports&&"object"==typeof module)module.exports=i();else if("function"==typeof define&&define.amd)define([],i);else{var e=i();for(var s in e)("object"==typeof exports?exports:t)[s]=e[s]}}(this,(()=>(()=>{"use strict";var t={d:(i,e)=>{for(var s in e)t.o(e,s)&&!t.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:e[s]})},o:(t,i)=>Object.prototype.hasOwnProperty.call(t,i),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},i={};t.r(i),t.d(i,{loadTrianglesPreset:()=>$i,tsParticles:()=>Mi});class e{constructor(t,i,e){if("number"!=typeof t&&t){this.x=t.x,this.y=t.y;const i=t;this.z=i.z?i.z:0}else{if(void 0===t||void 0===i)throw new Error("tsParticles - Vector3d not initialized correctly");this.x=t,this.y=i,this.z=null!=e?e:0}}static get origin(){return e.create(0,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)}static clone(t){return e.create(t.x,t.y,t.z)}static create(t,i,s){return new e(t,i,s)}add(t){return e.create(this.x+t.x,this.y+t.y,this.z+t.z)}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=t.z}copy(){return e.clone(this)}distanceTo(t){return this.sub(t).length}distanceToSq(t){return this.sub(t).getLengthSq()}div(t){return e.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**2+this.y**2}mult(t){return e.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}rotate(t){return e.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),0)}setTo(t){this.x=t.x,this.y=t.y;const i=t;this.z=i.z?i.z:0}sub(t){return e.create(this.x-t.x,this.y-t.y,this.z-t.z)}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=t.z}updateFromAngle(t,i){this.x=Math.cos(t)*i,this.y=Math.sin(t)*i}}class s extends e{constructor(t,i){super(t,i,0)}static get origin(){return s.create(0,0)}static clone(t){return s.create(t.x,t.y)}static create(t,i){return new s(t,i)}}let o=Math.random;new Map;function n(){return a(o(),0,1-1e-16)}function a(t,i,e){return Math.min(Math.max(t,i),e)}function r(t,i,e,s){return Math.floor((t*e+i*s)/(e+s))}function l(t){const i=d(t);let e=h(t);return i===e&&(e=0),n()*(i-e)+e}function c(t){return"number"==typeof t?t:l(t)}function h(t){return"number"==typeof t?t:t.min}function d(t){return"number"==typeof t?t:t.max}function u(t,i){if(t===i||void 0===i&&"number"==typeof t)return t;const e=h(t),s=d(t);return void 0!==i?{min:Math.min(e,i),max:Math.max(s,i)}:u(e,s)}function p(t){const i=t.random,{enable:e,minimumValue:s}="boolean"==typeof i?{enable:i,minimumValue:0}:i;return c(e?u(t.value,s):t.value)}function v(t,i){const e=t.x-i.x,s=t.y-i.y;return{dx:e,dy:s,distance:Math.sqrt(e**2+s**2)}}function f(t,i){return v(t,i).distance}function y(t){var i,e,s,o;return{x:null!==(e=null===(i=t.position)||void 0===i?void 0:i.x)&&void 0!==e?e:n()*t.size.width,y:null!==(o=null===(s=t.position)||void 0===s?void 0:s.y)&&void 0!==o?o:n()*t.size.height}}function m(t){return t?t.endsWith("%")?parseFloat(t)/100:parseFloat(t):1}function g(){return"undefined"==typeof window||!window||void 0===window.document||!window.document}function b(t){if(!g()&&"undefined"!=typeof matchMedia)return matchMedia(t)}function w(t,i){return t===i||i instanceof Array&&i.indexOf(t)>-1}function x(t,i,e=!0){return t[void 0!==i&&e?i%t.length:function(t){return Math.floor(n()*t.length)}(t)]}function _(t,i,e,s,o){return function(t,i,e,s){let o=!0;s&&"bottom"!==s||(o=t.top<i.height+e.x);!o||s&&"left"!==s||(o=t.right>e.x);!o||s&&"right"!==s||(o=t.left<i.width+e.y);!o||s&&"top"!==s||(o=t.bottom>e.y);return o}(z(t,null!=s?s:0),i,e,o)}function z(t,i){return{bottom:t.y+i,left:t.x-i,right:t.x+i,top:t.y-i}}function k(t,...i){for(const e of i){if(null==e)continue;if("object"!=typeof e){t=e;continue}const i=Array.isArray(e);!i||"object"==typeof t&&t&&Array.isArray(t)?i||"object"==typeof t&&t&&!Array.isArray(t)||(t={}):t=[];for(const i in e){if("__proto__"===i)continue;const s=e[i],o="object"==typeof s,n=t;n[i]=o&&Array.isArray(s)?s.map((t=>k(n[i],t))):k(n[i],s)}}return t}function M(t,i){return t instanceof Array?t.map(((t,e)=>i(t,e))):i(t,0)}function P(t,i,e){return t instanceof Array?x(t,i,e):t}function C(t,i){const e=t.value,s=t.animation,o={enable:t.animation.enable,value:c(t.value)*i,max:d(e)*i,min:h(e)*i,loops:0,maxLoops:c(t.animation.count)};if(s.enable){o.decay=1-c(s.decay);let t=!1;switch(s.mode){case"increase":o.status="increasing";break;case"decrease":o.status="decreasing";break;case"random":o.status=n()>=.5?"increasing":"decreasing";break;case"auto":t=!0}switch(s.startValue){case"min":o.value=o.min,t&&(o.status="increasing");break;case"random":o.value=l(o),t&&(o.status=n()>=.5?"increasing":"decreasing");break;default:o.value=o.max,t&&(o.status="decreasing")}}return o.initialValue=o.value,o}const O="random",S="mid",T=new Map;function I(t){T.set(t.key,t)}function R(t,i,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(i-t)*e:e<.5?i:e<2/3?t+(i-t)*(2/3-e)*6:t}function D(t){for(const[,i]of T)if(t.startsWith(i.stringPrefix))return i.parseString(t);const i=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,((t,i,e,s,o)=>i+i+e+e+s+s+(void 0!==o?o+o:""))),e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(i);return e?{a:void 0!==e[4]?parseInt(e[4],16)/255:1,b:parseInt(e[3],16),g:parseInt(e[2],16),r:parseInt(e[1],16)}:void 0}function L(t,i,e=!0){if(!t)return;const s="string"==typeof t?{value:t}:t;if("string"==typeof s.value)return E(s.value,i,e);if(s.value instanceof Array)return L({value:x(s.value,i,e)});for(const[,t]of T){const i=t.handleRangeColor(s);if(i)return i}}function E(t,i,e=!0){if(!t)return;const s="string"==typeof t?{value:t}:t;if("string"==typeof s.value)return s.value===O?q():function(t){return D(t)}(s.value);if(s.value instanceof Array)return E({value:x(s.value,i,e)});for(const[,t]of T){const i=t.handleColor(s);if(i)return i}}function F(t,i,e=!0){const s=L(t,i,e);return s?A(s):void 0}function A(t){const i=t.r/255,e=t.g/255,s=t.b/255,o=Math.max(i,e,s),n=Math.min(i,e,s),a={h:0,l:(o+n)/2,s:0};return o!==n&&(a.s=a.l<.5?(o-n)/(o+n):(o-n)/(2-o-n),a.h=i===o?(e-s)/(o-n):a.h=e===o?2+(s-i)/(o-n):4+(i-e)/(o-n)),a.l*=100,a.s*=100,a.h*=60,a.h<0&&(a.h+=360),a.h>=360&&(a.h-=360),a}function V(t){const i={b:0,g:0,r:0},e={h:t.h/360,l:t.l/100,s:t.s/100};if(e.s){const t=e.l<.5?e.l*(1+e.s):e.l+e.s-e.l*e.s,s=2*e.l-t;i.r=R(s,t,e.h+1/3),i.g=R(s,t,e.h),i.b=R(s,t,e.h-1/3)}else i.b=e.l,i.g=e.l,i.r=e.l;return i.r=Math.floor(255*i.r),i.g=Math.floor(255*i.g),i.b=Math.floor(255*i.b),i}function q(t){const i=null!=t?t:0;return{b:Math.floor(l(u(i,256))),g:Math.floor(l(u(i,256))),r:Math.floor(l(u(i,256)))}}function W(t,i){return`rgba(${t.r}, ${t.g}, ${t.b}, ${null!=i?i:1})`}function U(t,i){return`hsla(${t.h}, ${t.s}%, ${t.l}%, ${null!=i?i:1})`}function B(t,i,e){var s,o;if(e===O)return q();if(e!==S)return e;{const e=null!==(s=t.getFillColor())&&void 0!==s?s:t.getStrokeColor(),n=null!==(o=null==i?void 0:i.getFillColor())&&void 0!==o?o:null==i?void 0:i.getStrokeColor();if(e&&n&&i)return function(t,i,e,s){let o=t,n=i;return void 0===o.r&&(o=V(t)),void 0===n.r&&(n=V(i)),{b:r(o.b,n.b,e,s),g:r(o.g,n.g,e,s),r:r(o.r,n.r,e,s)}}(e,n,t.getRadius(),i.getRadius());{const t=null!=e?e:n;if(t)return V(t)}}}function H(t){return void 0!==t?{h:t.h.value,s:t.s.value,l:t.l.value}:void 0}function j(t,i,e){t.enable=i.enable,t.enable?(t.velocity=c(i.speed)/100*e,t.decay=1-c(i.decay),t.status="increasing",t.loops=0,t.maxLoops=c(i.count),i.sync||(t.velocity*=n(),t.value*=n()),t.initialValue=t.value):t.velocity=0}function G(t,i,e){t.fillStyle=null!=e?e:"rgba(0,0,0,0)",t.fillRect(0,0,i.width,i.height)}function X(t,i,e,s){e.backgroundMask.enable&&s?($(t,i),G(t,i,s)):G(t,i)}function Y(t,i,e){t.beginPath(),t.moveTo(i.x,i.y),t.lineTo(e.x,e.y),t.closePath()}function $(t,i){t.clearRect(0,0,i.width,i.height)}const N="generated",Z="touchend",Q="pointermove",J="pointerleave";function K(t,i,e){var s;const o=i[e];void 0!==o&&(t[e]=(null!==(s=t[e])&&void 0!==s?s:1)*o)}class tt{constructor(t){this.container=t,this.size={height:0,width:0},this._context=null,this._generated=!1,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[],this._mutationObserver=g()||"undefined"==typeof MutationObserver?void 0:new MutationObserver((t=>{for(const i of t)"attributes"===i.type&&"style"===i.attributeName&&this._repairStyle()}))}get _fullScreen(){return this.container.actualOptions.fullScreen.enable}clear(){this.draw((t=>{!function(t,i,e,s,o){if(e.backgroundMask.enable)X(t,i,e,o);else{const o=e.particles.move.trail;o.enable&&o.length>0&&s?s.color?G(t,i,W(s.color,s.opacity)):s.image&&function(t,i,e,s){e&&(t.globalAlpha=s,t.drawImage(e,0,0,i.width,i.height),t.globalAlpha=1)}(t,i,s.image,s.opacity):$(t,i)}}(t,this.size,this.container.actualOptions,this._trailFill,this._coverColorStyle)}))}destroy(){var t,i;null===(t=this._mutationObserver)||void 0===t||t.disconnect(),this._generated?null===(i=this.element)||void 0===i||i.remove():this._resetOriginalStyle(),this.draw((t=>{$(t,this.size)})),this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}draw(t){if(this._context)return t(this._context)}drawParticle(t,i){var e;if(t.spawning||t.destroyed)return;const s=t.getRadius();if(s<=0)return;const o=t.getFillColor(),n=null!==(e=t.getStrokeColor())&&void 0!==e?e:o;let[a,r]=this._getPluginParticleColors(t);a||(a=o),r||(r=n),(a||r)&&this.draw((e=>{var o,n,l,c;const h=this.container.actualOptions,d=t.options.zIndex,u=(1-t.zIndexFactor)**d.opacityRate,p=null!==(l=null!==(o=t.bubble.opacity)&&void 0!==o?o:null===(n=t.opacity)||void 0===n?void 0:n.value)&&void 0!==l?l:1,v=p*u,f=(null!==(c=t.strokeOpacity)&&void 0!==c?c:p)*u,y={},m={fill:a?U(a,v):void 0};m.stroke=r?U(r,f):m.fill,this._applyPreDrawUpdaters(e,t,s,v,m,y),function(t){var i,e,s,o,n;const{container:a,context:r,particle:l,delta:c,colorStyles:h,backgroundMask:d,composite:u,radius:p,opacity:v,shadow:f,transform:y}=t,m=l.getPosition(),g=l.rotation+(l.pathRotation?l.velocity.angle:0),b=Math.sin(g),w=Math.cos(g),x={a:w*(null!==(i=y.a)&&void 0!==i?i:1),b:b*(null!==(e=y.b)&&void 0!==e?e:1),c:-b*(null!==(s=y.c)&&void 0!==s?s:1),d:w*(null!==(o=y.d)&&void 0!==o?o:1)};r.setTransform(x.a,x.b,x.c,x.d,m.x,m.y),r.beginPath(),d&&(r.globalCompositeOperation=u);const _=l.shadowColor;f.enable&&_&&(r.shadowBlur=f.blur,r.shadowColor=W(_),r.shadowOffsetX=f.offset.x,r.shadowOffsetY=f.offset.y),h.fill&&(r.fillStyle=h.fill);const z=null!==(n=l.strokeWidth)&&void 0!==n?n:0;r.lineWidth=z,h.stroke&&(r.strokeStyle=h.stroke),function(t,i,e,s,o,n){if(!e.shape)return;const a=t.drawers.get(e.shape);a&&a.draw(i,e,s,o,n,t.retina.pixelRatio)}(a,r,l,p,v,c),z>0&&r.stroke(),l.close&&r.closePath(),l.fill&&r.fill(),function(t,i,e,s,o,n){if(!e.shape)return;const a=t.drawers.get(e.shape);(null==a?void 0:a.afterEffect)&&a.afterEffect(i,e,s,o,n,t.retina.pixelRatio)}(a,r,l,p,v,c),r.globalCompositeOperation="source-over",r.setTransform(1,0,0,1,0,0)}({container:this.container,context:e,particle:t,delta:i,colorStyles:m,backgroundMask:h.backgroundMask.enable,composite:h.backgroundMask.composite,radius:s*(1-t.zIndexFactor)**d.sizeRate,opacity:v,shadow:t.options.shadow,transform:y}),this._applyPostDrawUpdaters(t)}))}drawParticlePlugin(t,i,e){this.draw((s=>{!function(t,i,e,s){i.drawParticle&&i.drawParticle(t,e,s)}(s,t,i,e)}))}drawPlugin(t,i){this.draw((e=>{!function(t,i,e){i.draw&&i.draw(t,e)}(e,t,i)}))}async init(){var t;this._resize(),this._initStyle(),this._initCover();try{await this._initTrail()}catch(t){console.error(t)}this._initBackground(),this.element&&(null===(t=this._mutationObserver)||void 0===t||t.observe(this.element,{attributes:!0})),this._initUpdaters(),this._initPlugins(),this._paint(),this.container.updateActualOptions(),this._resize(),this._initBackground()}loadCanvas(t){var i,e;this._generated&&(null===(i=this.element)||void 0===i||i.remove()),this._generated=t.dataset&&N in t.dataset?"true"===t.dataset[N]:this._generated,this.element=t,this.element.ariaHidden="true",this._originalStyle=k({},this.element.style),this.size.height=t.offsetHeight,this.size.width=t.offsetWidth,this._context=function(t){const i=t.getContext("2d");if(!i)throw new Error("Error tsParticles - No canvas context found");return i}(t),null===(e=this._mutationObserver)||void 0===e||e.observe(this.element,{attributes:!0}),this.container.retina.init(),this._initBackground()}async windowResize(){if(!this.element)return;this._resize();const t=this.container,i=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),i&&await t.refresh()}_applyPostDrawUpdaters(t){var i;for(const e of this._postDrawUpdaters)null===(i=e.afterDraw)||void 0===i||i.call(e,t)}_applyPreDrawUpdaters(t,i,e,s,o,n){var a;for(const r of this._preDrawUpdaters){if(r.getColorStyles){const{fill:n,stroke:a}=r.getColorStyles(i,t,e,s);n&&(o.fill=n),a&&(o.stroke=a)}if(r.getTransformValues){const t=r.getTransformValues(i);for(const i in t)K(n,t,i)}null===(a=r.beforeDraw)||void 0===a||a.call(r,i)}}_applyResizePlugins(){for(const t of this._resizePlugins)t.resize&&t.resize()}_getPluginParticleColors(t){let i,e;for(const s of this._colorPlugins)if(!i&&s.particleFillColor&&(i=F(s.particleFillColor(t))),!e&&s.particleStrokeColor&&(e=F(s.particleStrokeColor(t))),i&&e)break;return[i,e]}_initBackground(){const t=this.container.actualOptions.background,i=this.element,e=null==i?void 0:i.style;if(e){if(t.color){const i=L(t.color);e.backgroundColor=i?W(i,t.opacity):""}else e.backgroundColor="";e.backgroundImage=t.image||"",e.backgroundPosition=t.position||"",e.backgroundRepeat=t.repeat||"",e.backgroundSize=t.size||""}}_initCover(){const t=this.container.actualOptions.backgroundMask.cover,i=L(t.color);if(i){const e={r:i.r,g:i.g,b:i.b,a:t.opacity};this._coverColorStyle=W(e,e.a)}}_initPlugins(){this._resizePlugins=[];for(const[,t]of this.container.plugins)t.resize&&this._resizePlugins.push(t),(t.particleFillColor||t.particleStrokeColor)&&this._colorPlugins.push(t)}_initStyle(){const t=this.element,i=this.container.actualOptions;if(t){this._fullScreen?(this._originalStyle=k({},t.style),this._setFullScreenStyle()):this._resetOriginalStyle();for(const e in i.style){if(!e||!i.style)continue;const s=i.style[e];s&&t.style.setProperty(e,s,"important")}}}async _initTrail(){const t=this.container.actualOptions,i=t.particles.move.trail,e=i.fill;if(i.enable)if(e.color){const i=L(e.color);if(!i)return;const s=t.particles.move.trail;this._trailFill={color:Object.assign({},i),opacity:1/s.length}}else await new Promise(((t,s)=>{if(!e.image)return;const o=document.createElement("img");o.addEventListener("load",(()=>{this._trailFill={image:o,opacity:1/i.length},t()})),o.addEventListener("error",(t=>{s(t.error)})),o.src=e.image}))}_initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this.container.particles.updaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles||t.getTransformValues||t.beforeDraw)&&this._preDrawUpdaters.push(t)}_paint(){this.draw((t=>{X(t,this.size,this.container.actualOptions,this._coverColorStyle)}))}_repairStyle(){var t,i;const e=this.element;e&&(null===(t=this._mutationObserver)||void 0===t||t.disconnect(),this._initStyle(),this._initBackground(),null===(i=this._mutationObserver)||void 0===i||i.observe(e,{attributes:!0}))}_resetOriginalStyle(){const t=this.element,i=this._originalStyle;t&&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)}_resize(){if(!this.element)return;const t=this.container,i=t.retina.pixelRatio,e=t.canvas.size,s=this.element.offsetWidth*i,o=this.element.offsetHeight*i;if(o===e.height&&s===e.width&&o===this.element.height&&s===this.element.width)return;const n=Object.assign({},e);this.element.width=e.width=this.element.offsetWidth*i,this.element.height=e.height=this.element.offsetHeight*i,this.container.started&&(this.resizeFactor={width:e.width/n.width,height:e.height/n.height})}_setFullScreenStyle(){const t=this.element;if(!t)return;const i="important";t.style.setProperty("position","fixed",i),t.style.setProperty("z-index",this.container.actualOptions.fullScreen.zIndex.toString(10),i),t.style.setProperty("top","0",i),t.style.setProperty("left","0",i),t.style.setProperty("width","100%",i),t.style.setProperty("height","100%",i)}}function it(t,i,e,s,o){if(s){let s={passive:!0};"boolean"==typeof o?s.capture=o:void 0!==o&&(s=o),t.addEventListener(i,e,s)}else{const s=o;t.removeEventListener(i,e,s)}}class et{constructor(t){this.container=t,this.canPush=!0,this.handlers={mouseMove:t=>this._mouseTouchMove(t),touchStart:t=>this._mouseTouchMove(t),touchMove:t=>this._mouseTouchMove(t),touchEnd:()=>this._mouseTouchFinish(),mouseLeave:()=>this._mouseTouchFinish(),touchCancel:()=>this._mouseTouchFinish(),touchEndClick:t=>this._mouseTouchClick(t),mouseUp:t=>this._mouseTouchClick(t),mouseDown:()=>this._mouseDown(),visibilityChange:()=>this._handleVisibilityChange(),themeChange:t=>this._handleThemeChange(t),oldThemeChange:t=>this._handleThemeChange(t),resize:()=>this._handleWindowResize()}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}_doMouseTouchClick(t){const i=this.container,e=i.actualOptions;if(this.canPush){const t=i.interactivity.mouse,s=t.position;if(!s)return;t.clickPosition=Object.assign({},s),t.clickTime=(new Date).getTime();M(e.interactivity.events.onClick.mode,(t=>this._handleClickMode(t)))}"touchend"===t.type&&setTimeout((()=>this._mouseTouchFinish()),500)}_handleClickMode(t){this.container.handleClickMode(t)}_handleThemeChange(t){const i=t,e=this.container,s=e.options,o=s.defaultThemes,n=i.matches?o.dark:o.light,a=s.themes.find((t=>t.name===n));a&&a.default.auto&&e.loadTheme(n)}_handleVisibilityChange(){const t=this.container,i=t.actualOptions;this._mouseTouchFinish(),i.pauseOnBlur&&(t.pageHidden=(null===document||void 0===document?void 0:document.hidden)||!1,t.pageHidden?t.pause():t.getAnimationStatus()?t.play(!0):t.draw(!0))}_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()}),1e3*this.container.actualOptions.interactivity.events.resize.delay)}_manageInteractivityEvents(t){var i;const e=this.handlers,s=this.container,o=s.actualOptions,n=o.interactivity.detectsOn;let a=J;if("window"===n)s.interactivity.element=window,a="pointerout";else if("parent"===n&&s.canvas.element){const t=s.canvas.element;s.interactivity.element=null!==(i=t.parentElement)&&void 0!==i?i:t.parentNode}else s.interactivity.element=s.canvas.element;const r=s.interactivity.element;if(!r)return;const l=r;(o.interactivity.events.onHover.enable||o.interactivity.events.onClick.enable)&&(it(r,Q,e.mouseMove,t),it(r,"touchstart",e.touchStart,t),it(r,"touchmove",e.touchMove,t),o.interactivity.events.onClick.enable?(it(r,Z,e.touchEndClick,t),it(r,"pointerup",e.mouseUp,t),it(r,"pointerdown",e.mouseDown,t)):it(r,Z,e.touchEnd,t),it(r,a,e.mouseLeave,t),it(r,"touchcancel",e.touchCancel,t)),s.canvas.element&&(s.canvas.element.style.pointerEvents=l===s.canvas.element?"initial":"none")}_manageListeners(t){this._manageMediaEvents(t),this._manageInteractivityEvents(t),this._manageResizeEvent(t),this._manageVisibilityEvent(t)}_manageMediaEvents(t){const i=this.handlers,e=b("(prefers-color-scheme: dark)");e&&(void 0===e.addEventListener?void 0!==e.addListener&&(t?e.addListener(i.oldThemeChange):e.removeListener(i.oldThemeChange)):it(e,"change",i.themeChange,t))}_manageResizeEvent(t){const i=this.handlers,e=this.container;e.actualOptions.interactivity.events.resize&&("undefined"!=typeof ResizeObserver?this.resizeObserver&&!t?(e.canvas.element&&this.resizeObserver.unobserve(e.canvas.element),this.resizeObserver.disconnect(),delete this.resizeObserver):!this.resizeObserver&&t&&e.canvas.element&&(this.resizeObserver=new ResizeObserver((t=>{t.find((t=>t.target===e.canvas.element))&&this._handleWindowResize()})),this.resizeObserver.observe(e.canvas.element)):it(window,"resize",i.resize,t))}_manageVisibilityEvent(t){document&&it(document,"visibilitychange",this.handlers.visibilityChange,t)}_mouseDown(){const t=this.container.interactivity;if(t){const i=t.mouse;i.clicking=!0,i.downPosition=i.position}}_mouseTouchClick(t){const i=this.container,e=i.actualOptions,s=i.interactivity.mouse;s.inside=!0;let o=!1;const n=s.position;if(n&&e.interactivity.events.onClick.enable){for(const[,t]of i.plugins)if(t.clickPositionValid&&(o=t.clickPositionValid(n),o))break;o||this._doMouseTouchClick(t),s.clicking=!1}}_mouseTouchFinish(){const t=this.container.interactivity;if(!t)return;const i=t.mouse;delete i.position,delete i.clickPosition,delete i.downPosition,t.status=J,i.inside=!1,i.clicking=!1}_mouseTouchMove(t){var i,e,s,o,n,a,r;const l=this.container,c=l.actualOptions;if(!(null===(i=l.interactivity)||void 0===i?void 0:i.element))return;let h;l.interactivity.mouse.inside=!0;const d=l.canvas.element;if(t.type.startsWith("pointer")){this.canPush=!0;const i=t;if(l.interactivity.element===window){if(d){const t=d.getBoundingClientRect();h={x:i.clientX-t.left,y:i.clientY-t.top}}}else if("parent"===c.interactivity.detectsOn){const t=i.target,o=i.currentTarget,n=l.canvas.element;if(t&&o&&n){const e=t.getBoundingClientRect(),s=o.getBoundingClientRect(),a=n.getBoundingClientRect();h={x:i.offsetX+2*e.left-(s.left+a.left),y:i.offsetY+2*e.top-(s.top+a.top)}}else h={x:null!==(e=i.offsetX)&&void 0!==e?e:i.clientX,y:null!==(s=i.offsetY)&&void 0!==s?s:i.clientY}}else i.target===l.canvas.element&&(h={x:null!==(o=i.offsetX)&&void 0!==o?o:i.clientX,y:null!==(n=i.offsetY)&&void 0!==n?n:i.clientY})}else{this.canPush="touchmove"!==t.type;const i=t,e=i.touches[i.touches.length-1],s=null==d?void 0:d.getBoundingClientRect();h={x:e.clientX-(null!==(a=null==s?void 0:s.left)&&void 0!==a?a:0),y:e.clientY-(null!==(r=null==s?void 0:s.top)&&void 0!==r?r:0)}}const u=l.retina.pixelRatio;h&&(h.x*=u,h.y*=u),l.interactivity.mouse.position=h,l.interactivity.status=Q}}class st{constructor(t){this.container=t}async nextFrame(t){var i;try{const e=this.container;if(!e.smooth&&void 0!==e.lastFrameTime&&t<e.lastFrameTime+1e3/e.fpsLimit)return void e.draw(!1);null!==(i=e.lastFrameTime)&&void 0!==i||(e.lastFrameTime=t);const s=function(t,i=60,e=!1){return{value:t,factor:e?60/i:60*t/1e3}}(t-e.lastFrameTime,e.fpsLimit,e.smooth);if(e.lifeTime+=s.value,e.lastFrameTime=t,s.value>1e3)return void e.draw(!1);if(await e.particles.draw(s),e.duration>0&&e.lifeTime>e.duration)return void e.destroy();e.getAnimationStatus()&&e.draw(!1)}catch(t){console.error("tsParticles error in animation loop",t)}}}class ot{constructor(){this.value=""}static create(t,i){const e=new ot;return e.load(t),void 0!==i&&("string"==typeof i||i instanceof Array?e.load({value:i}):e.load(i)),e}load(t){void 0!==(null==t?void 0:t.value)&&(this.value=t.value)}}class nt{constructor(){this.color=new ot,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=ot.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 at{constructor(){this.color=new ot,this.color.value="#fff",this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=ot.create(this.color,t.color)),void 0!==t.opacity&&(this.opacity=t.opacity))}}class rt{constructor(){this.composite="destination-out",this.cover=new at,this.enable=!1}load(t){if(t){if(void 0!==t.composite&&(this.composite=t.composite),void 0!==t.cover){const i=t.cover,e="string"==typeof t.cover?{color:t.cover}:t.cover;this.cover.load(void 0!==i.color?i:{color:e})}void 0!==t.enable&&(this.enable=t.enable)}}}class lt{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 ct{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 ht{constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type="circle"}get el(){return this.elementId}set el(t){this.elementId=t}get elementId(){return this.ids}set elementId(t){this.ids=t}get ids(){return M(this.selectors,(t=>t.replace("#","")))}set ids(t){this.selectors=M(t,(t=>`#${t}`))}load(t){var i,e;if(!t)return;const s=null!==(e=null!==(i=t.ids)&&void 0!==i?i:t.elementId)&&void 0!==e?e: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 dt{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 ut{constructor(){this.enable=!1,this.mode=[],this.parallax=new dt}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 pt{constructor(){this.delay=.5,this.enable=!0}load(t){void 0!==t&&(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class vt{constructor(){this.onClick=new ct,this.onDiv=new ht,this.onHover=new ut,this.resize=new pt}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 i,e,s;if(!t)return;this.onClick.load(null!==(i=t.onClick)&&void 0!==i?i:t.onclick);const o=null!==(e=t.onDiv)&&void 0!==e?e:t.ondiv;void 0!==o&&(this.onDiv=M(o,(t=>{const i=new ht;return i.load(t),i}))),this.onHover.load(null!==(s=t.onHover)&&void 0!==s?s:t.onhover),"boolean"==typeof t.resize?this.resize.enable=t.resize:this.resize.load(t.resize)}}class ft{constructor(t,i){this._engine=t,this._container=i}load(t){if(t&&this._container){const i=this._engine.plugins.interactors.get(this._container);if(i)for(const e of i)e.loadModeOptions&&e.loadModeOptions(this,t)}}}class yt{constructor(t,i){this.detectsOn="window",this.events=new vt,this.modes=new ft(t,i)}get detect_on(){return this.detectsOn}set detect_on(t){this.detectsOn=t}load(t){var i;if(!t)return;const e=null!==(i=t.detectsOn)&&void 0!==i?i:t.detect_on;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class mt{load(t){var i,e,s;t&&(void 0!==t.position&&(this.position={x:null!==(i=t.position.x)&&void 0!==i?i:50,y:null!==(e=t.position.y)&&void 0!==e?e:50,mode:null!==(s=t.position.mode)&&void 0!==s?s:"percent"}),void 0!==t.options&&(this.options=k({},t.options)))}}class gt{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=k({},t.options)))}}class bt{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 wt{constructor(){this.name="",this.default=new bt}load(t){t&&(void 0!==t.name&&(this.name=t.name),this.default.load(t.default),void 0!==t.options&&(this.options=k({},t.options)))}}class xt{constructor(){this.count=0,this.enable=!1,this.offset=0,this.speed=1,this.decay=0,this.sync=!0}load(t){t&&(void 0!==t.count&&(this.count=u(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.offset&&(this.offset=u(t.offset)),void 0!==t.speed&&(this.speed=u(t.speed)),void 0!==t.decay&&(this.decay=u(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class _t{constructor(){this.h=new xt,this.s=new xt,this.l=new xt}load(t){t&&(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class zt extends ot{constructor(){super(),this.animation=new _t}static create(t,i){const e=new zt;return e.load(t),void 0!==i&&("string"==typeof i||i instanceof Array?e.load({value:i}):e.load(i)),e}load(t){if(super.load(t),!t)return;const i=t.animation;void 0!==i&&(void 0!==i.enable?this.animation.h.load(i):this.animation.load(t.animation))}}class kt{constructor(){this.speed=2}load(t){t&&void 0!==t.speed&&(this.speed=t.speed)}}class Mt{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 Pt{constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.count&&(this.count=u(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=u(t.speed)),void 0!==t.decay&&(this.decay=u(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class Ct extends Pt{constructor(){super(),this.mode="auto",this.startValue="random"}load(t){super.load(t),t&&(void 0!==t.minimumValue&&(this.minimumValue=t.minimumValue),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Ot{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 St{constructor(){this.random=new Ot,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=u(t.value,this.random.enable?this.random.minimumValue:void 0)))}}class Tt extends St{constructor(){super(),this.animation=new Pt}get anim(){return this.animation}set anim(t){this.animation=t}load(t){var i;if(super.load(t),!t)return;const e=null!==(i=t.animation)&&void 0!==i?i:t.anim;void 0!==e&&this.animation.load(e)}}class It extends Tt{constructor(){super(),this.animation=new Ct}load(t){super.load(t),t&&void 0!==t.animation&&(this.value=u(this.value,this.animation.enable?this.animation.minimumValue:void 0))}}class Rt extends St{constructor(){super(),this.random.minimumValue=.1,this.value=1}}class Dt{constructor(){this.horizontal=new Rt,this.vertical=new Rt}load(t){t&&(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class Lt{constructor(){this.absorb=new kt,this.bounce=new Dt,this.enable=!1,this.mode="bounce",this.overlap=new Mt}load(t){t&&(this.absorb.load(t.absorb),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 Et{constructor(){this.offset=0,this.value=90}load(t){t&&(void 0!==t.offset&&(this.offset=u(t.offset)),void 0!==t.value&&(this.value=u(t.value)))}}class Ft{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 i,e,s,o;if(!t)return;void 0!==t.distance&&(this.distance=u(t.distance)),void 0!==t.enable&&(this.enable=t.enable);const n=null!==(e=null===(i=t.rotate)||void 0===i?void 0:i.x)&&void 0!==e?e:t.rotateX;void 0!==n&&(this.rotate.x=n);const a=null!==(o=null===(s=t.rotate)||void 0===s?void 0:s.y)&&void 0!==o?o:t.rotateY;void 0!==a&&(this.rotate.y=a)}}class At{constructor(){this.x=50,this.y=50,this.mode="percent",this.radius=0}load(t){t&&(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class Vt{constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){t&&(void 0!==t.acceleration&&(this.acceleration=u(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=u(t.maxSpeed)))}}class qt{constructor(){this.clamp=!0,this.delay=new St,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=k(this.options,t.options)))}}class Wt{load(t){t&&(void 0!==t.color&&(this.color=ot.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image))}}class Ut{constructor(){this.enable=!1,this.length=10,this.fill=new Wt}get fillColor(){return this.fill.color}set fillColor(t){this.fill.load({color:t})}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0===t.fill&&void 0===t.fillColor||this.fill.load(t.fill||{color:t.fillColor}),void 0!==t.length&&(this.length=t.length))}}class Bt{constructor(){this.default="out"}load(t){var i,e,s,o;t&&(void 0!==t.default&&(this.default=t.default),this.bottom=null!==(i=t.bottom)&&void 0!==i?i:t.default,this.left=null!==(e=t.left)&&void 0!==e?e:t.default,this.right=null!==(s=t.right)&&void 0!==s?s:t.default,this.top=null!==(o=t.top)&&void 0!==o?o:t.default)}}class Ht{constructor(){this.acceleration=0,this.enable=!1}load(t){t&&(void 0!==t.acceleration&&(this.acceleration=u(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),this.position=t.position?k({},t.position):void 0)}}class jt{constructor(){this.angle=new Et,this.attract=new Ft,this.center=new At,this.decay=0,this.distance={},this.direction="none",this.drift=0,this.enable=!1,this.gravity=new Vt,this.path=new qt,this.outModes=new Bt,this.random=!1,this.size=!1,this.speed=2,this.spin=new Ht,this.straight=!1,this.trail=new Ut,this.vibrate=!1,this.warp=!1}get bounce(){return this.collisions}set bounce(t){this.collisions=t}get collisions(){return!1}set collisions(t){}get noise(){return this.path}set noise(t){this.path=t}get outMode(){return this.outModes.default}set outMode(t){this.outModes.default=t}get out_mode(){return this.outMode}set out_mode(t){this.outMode=t}load(t){var i,e,s;if(!t)return;this.angle.load("number"==typeof t.angle?{value:t.angle}:t.angle),this.attract.load(t.attract),this.center.load(t.center),void 0!==t.decay&&(this.decay=u(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}:Object.assign({},t.distance)),void 0!==t.drift&&(this.drift=u(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const o=null!==(e=null!==(i=t.outModes)&&void 0!==i?i:t.outMode)&&void 0!==e?e:t.out_mode;void 0!==o&&("object"==typeof o?this.outModes.load(o):this.outModes.load({default:o})),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=u(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 Gt extends Ct{constructor(){super(),this.destroy="none",this.speed=2}get opacity_min(){return this.minimumValue}set opacity_min(t){this.minimumValue=t}load(t){void 0!==(null==t?void 0:t.opacity_min)&&void 0===t.minimumValue&&(t.minimumValue=t.opacity_min),super.load(t),t&&void 0!==t.destroy&&(this.destroy=t.destroy)}}class Xt extends It{constructor(){super(),this.animation=new Gt,this.random.minimumValue=.1,this.value=1}get anim(){return this.animation}set anim(t){this.animation=t}}class Yt{constructor(){this.enable=!1,this.width=1920,this.height=1080}get area(){return this.width}set area(t){this.width=t}get factor(){return this.height}set factor(t){this.height=t}get value_area(){return this.area}set value_area(t){this.area=t}load(t){var i,e,s;if(!t)return;void 0!==t.enable&&(this.enable=t.enable);const o=null!==(e=null!==(i=t.width)&&void 0!==i?i:t.area)&&void 0!==e?e:t.value_area;void 0!==o&&(this.width=o);const n=null!==(s=t.height)&&void 0!==s?s:t.factor;void 0!==n&&(this.height=n)}}class $t{constructor(){this.density=new Yt,this.limit=0,this.value=100}get max(){return this.limit}set max(t){this.limit=t}load(t){var i;if(!t)return;this.density.load(t.density);const e=null!==(i=t.limit)&&void 0!==i?i:t.max;void 0!==e&&(this.limit=e),void 0!==t.value&&(this.value=t.value)}}class Nt{constructor(){this.blur=0,this.color=new ot,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=ot.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 Zt{constructor(){this.options={},this.type="circle",this.close=!0,this.fill=!0}load(t){var i;if(!t)return;void 0!==t.close&&(this.close=t.close),void 0!==t.fill&&(this.fill=t.fill);const e=t.options;if(void 0!==e)for(const t in e){const s=e[t];s&&(this.options[t]=k(null!==(i=this.options[t])&&void 0!==i?i:{},s))}void 0!==t.type&&(this.type=t.type)}}class Qt extends Ct{constructor(){super(),this.destroy="none",this.speed=5}get size_min(){return this.minimumValue}set size_min(t){this.minimumValue=t}load(t){void 0!==(null==t?void 0:t.size_min)&&void 0===t.minimumValue&&(t.minimumValue=t.size_min),super.load(t),t&&void 0!==t.destroy&&(this.destroy=t.destroy)}}class Jt extends It{constructor(){super(),this.animation=new Qt,this.random.minimumValue=1,this.value=3}get anim(){return this.animation}set anim(t){this.animation=t}}class Kt{constructor(){this.width=0}load(t){t&&(void 0!==t.color&&(this.color=zt.create(this.color,t.color)),void 0!==t.width&&(this.width=u(t.width)),void 0!==t.opacity&&(this.opacity=u(t.opacity)))}}class ti extends St{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 ii{constructor(t,i){this._engine=t,this._container=i,this.bounce=new Dt,this.collisions=new Lt,this.color=new zt,this.color.value="#fff",this.groups={},this.move=new jt,this.number=new $t,this.opacity=new Xt,this.reduceDuplicates=!1,this.shadow=new Nt,this.shape=new Zt,this.size=new Jt,this.stroke=new Kt,this.zIndex=new ti}load(t){var i,e,s,o;if(!t)return;if(this.bounce.load(t.bounce),this.color.load(zt.create(this.color,t.color)),void 0!==t.groups)for(const e in t.groups){const s=t.groups[e];void 0!==s&&(this.groups[e]=k(null!==(i=this.groups[e])&&void 0!==i?i:{},s))}this.move.load(t.move),this.number.load(t.number),this.opacity.load(t.opacity),void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.shape.load(t.shape),this.size.load(t.size),this.shadow.load(t.shadow),this.zIndex.load(t.zIndex);const n=null!==(s=null===(e=t.move)||void 0===e?void 0:e.collisions)&&void 0!==s?s:null===(o=t.move)||void 0===o?void 0:o.bounce;void 0!==n&&(this.collisions.enable=n),this.collisions.load(t.collisions),void 0!==t.interactivity&&(this.interactivity=k({},t.interactivity));const a=t.stroke;if(a&&(this.stroke=M(a,(t=>{const i=new Kt;return i.load(t),i}))),this._container){const i=this._engine.plugins.updaters.get(this._container);if(i)for(const e of i)e.loadOptions&&e.loadOptions(this,t);const e=this._engine.plugins.interactors.get(this._container);if(e)for(const i of e)i.loadParticlesOptions&&i.loadParticlesOptions(this,t)}}}function ei(t,...i){for(const e of i)t.load(e)}function si(t,i,...e){const s=new ii(t,i);return ei(s,...e),s}class oi{constructor(t,i){this._engine=t,this._container=i,this.autoPlay=!0,this.background=new nt,this.backgroundMask=new rt,this.defaultThemes={},this.delay=0,this.fullScreen=new lt,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.interactivity=new yt(t,i),this.manualParticles=[],this.name="default",this.particles=si(this._engine,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.responsive=[],this.smooth=!1,this.style={},this.themes=[],this.zLayers=100}get backgroundMode(){return this.fullScreen}set backgroundMode(t){this.fullScreen.load(t)}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}load(t){var i,e,s,o,n;if(!t)return;void 0!==t.preset&&M(t.preset,(t=>this._importPreset(t))),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.delay&&(this.delay=u(t.delay));const a=null!==(i=t.detectRetina)&&void 0!==i?i:t.retina_detect;void 0!==a&&(this.detectRetina=a),void 0!==t.duration&&(this.duration=u(t.duration));const r=null!==(e=t.fpsLimit)&&void 0!==e?e:t.fps_limit;void 0!==r&&(this.fpsLimit=r),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;"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 i=new mt;return i.load(t),i}))),this.particles.load(t.particles),this.style=k(this.style,t.style),this._engine.plugins.loadOptions(this,t),void 0!==t.smooth&&(this.smooth=t.smooth);const c=this._engine.plugins.interactors.get(this._container);if(c)for(const i of c)i.loadOptions&&i.loadOptions(this,t);if(void 0!==t.responsive)for(const i of t.responsive){const t=new gt;t.load(i),this.responsive.push(t)}if(this.responsive.sort(((t,i)=>t.maxWidth-i.maxWidth)),void 0!==t.themes)for(const i of t.themes){const t=this.themes.find((t=>t.name===i.name));if(t)t.load(i);else{const t=new wt;t.load(i),this.themes.push(t)}}this.defaultThemes.dark=null===(o=this._findDefaultTheme("dark"))||void 0===o?void 0:o.name,this.defaultThemes.light=null===(n=this._findDefaultTheme("light"))||void 0===n?void 0:n.name}setResponsive(t,i,e){this.load(e);const s=this.responsive.find((e=>"screen"===e.mode&&screen?e.maxWidth>screen.availWidth:e.maxWidth*i>t));return this.load(null==s?void 0:s.options),null==s?void 0:s.maxWidth}setTheme(t){if(t){const i=this.themes.find((i=>i.name===t));i&&this.load(i.options)}else{const t=b("(prefers-color-scheme: dark)"),i=t&&t.matches,e=this._findDefaultTheme(i?"dark":"light");e&&this.load(e.options)}}_findDefaultTheme(t){var i;return null!==(i=this.themes.find((i=>i.default.value&&i.default.mode===t)))&&void 0!==i?i:this.themes.find((t=>t.default.value&&"any"===t.default.mode))}_importPreset(t){this.load(this._engine.plugins.getPreset(t))}}class ni{constructor(t,i){this.container=i,this._engine=t,this._interactors=this._engine.plugins.getInteractors(this.container,!0),this._externalInteractors=[],this._particleInteractors=[]}async externalInteract(t){for(const i of this._externalInteractors)i.isEnabled()&&await i.interact(t)}handleClickMode(t){for(const i of this._externalInteractors)i.handleClickMode&&i.handleClickMode(t)}init(){this._externalInteractors=[],this._particleInteractors=[];for(const t of this._interactors){switch(t.type){case"external":this._externalInteractors.push(t);break;case"particles":this._particleInteractors.push(t)}t.init()}}async particlesInteract(t,i){for(const e of this._externalInteractors)e.clear(t,i);for(const e of this._particleInteractors)e.isEnabled(t)&&await e.interact(t,i)}async reset(t){for(const i of this._externalInteractors)i.isEnabled()&&await i.reset(t);for(const i of this._particleInteractors)i.isEnabled(t)&&await i.reset(t)}}const ai=t=>{w(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 ri{constructor(t,i,e,s,o,n){this.container=e,this._engine=t,this.init(i,s,o,n)}destroy(t){var i;if(!this.unbreakable&&!this.destroyed){this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;for(const[,i]of this.container.plugins)i.particleDestroyed&&i.particleDestroyed(this,t);for(const i of this.container.particles.updaters)i.particleDestroyed&&i.particleDestroyed(this,t);null===(i=this.pathGenerator)||void 0===i||i.reset(this)}}draw(t){const i=this.container;for(const[,e]of i.plugins)i.canvas.drawParticlePlugin(e,this,t);i.canvas.drawParticle(this,t)}getFillColor(){var t;return this._getRollColor(null!==(t=this.bubble.color)&&void 0!==t?t:H(this.color))}getMass(){return this.getRadius()**2*Math.PI/2}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}getStrokeColor(){var t;return this._getRollColor(null!==(t=this.bubble.color)&&void 0!==t?t:H(this.strokeColor))}init(t,i,e,s){var o,n,a,r,l,h,d;const u=this.container,v=this._engine;this.id=t,this.group=s,this.fill=!0,this.pathRotation=!1,this.close=!0,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{}},this.outType="normal",this.ignoresResizeRatio=!0;const f=u.retina.pixelRatio,y=u.actualOptions,m=si(this._engine,u,y.particles),g=m.shape.type,{reduceDuplicates:b}=m;this.shape=P(g,this.id,b);const w=m.shape;if(e&&e.shape&&e.shape.type){const t=P(e.shape.type,this.id,b);t&&(this.shape=t,w.load(e.shape))}this.shapeData=this._loadShapeData(w,b),m.load(e),m.load(null===(o=this.shapeData)||void 0===o?void 0:o.particles),this.interactivity=new yt(v,u),this.interactivity.load(u.actualOptions.interactivity),this.interactivity.load(m.interactivity),this.fill=null!==(a=null===(n=this.shapeData)||void 0===n?void 0:n.fill)&&void 0!==a?a:this.fill,this.close=null!==(l=null===(r=this.shapeData)||void 0===r?void 0:r.close)&&void 0!==l?l:this.close,this.options=m;const x=this.options.move.path;this.pathDelay=1e3*p(x.delay),x.generator&&(this.pathGenerator=this._engine.plugins.getPathGenerator(x.generator),this.pathGenerator&&u.addPath(x.generator,this.pathGenerator)&&this.pathGenerator.init(u)),u.retina.initParticle(this),this.size=C(this.options.size,f),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(i),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.moveDecay=1-c(this.options.move.decay);const _=u.particles;_.needsSort=_.needsSort||_.lastZIndex<this.position.z,_.lastZIndex=this.position.z,this.zIndexFactor=this.position.z/u.zLayers,this.sides=24;let z=u.drawers.get(this.shape);z||(z=this._engine.plugins.getShapeDrawer(this.shape),z&&u.drawers.set(this.shape,z)),(null==z?void 0:z.loadShape)&&(null==z||z.loadShape(this));const k=null==z?void 0:z.getSidesCount;k&&(this.sides=k(this)),this.spawning=!1,this.shadowColor=L(this.options.shadow.color);for(const t of u.particles.updaters)t.init(this);for(const t of u.particles.movers)null===(h=t.init)||void 0===h||h.call(t,this);(null==z?void 0:z.particleInit)&&z.particleInit(u,this);for(const[,t]of u.plugins)null===(d=t.particleCreated)||void 0===d||d.call(t,this)}isInsideCanvas(){const t=this.getRadius(),i=this.container.canvas.size;return this.position.x>=-t&&this.position.y>=-t&&this.position.y<=i.height+t&&this.position.x<=i.width+t}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){var t;for(const i of this.container.particles.updaters)null===(t=i.reset)||void 0===t||t.call(i,this)}_calcPosition(t,i,s,o=0){var n,a,r,l;for(const[,o]of t.plugins){const t=void 0!==o.particlePosition?o.particlePosition(i,this):void 0;if(void 0!==t)return e.create(t.x,t.y,s)}const c=y({size:t.canvas.size,position:i}),h=e.create(c.x,c.y,s),d=this.getRadius(),u=this.options.move.outModes,p=i=>{ai({outMode:i,checkModes:["bounce","bounce-horizontal"],coord:h.x,maxCoord:t.canvas.size.width,setCb:t=>h.x+=t,radius:d})},v=i=>{ai({outMode:i,checkModes:["bounce","bounce-vertical"],coord:h.y,maxCoord:t.canvas.size.height,setCb:t=>h.y+=t,radius:d})};return p(null!==(n=u.left)&&void 0!==n?n:u.default),p(null!==(a=u.right)&&void 0!==a?a:u.default),v(null!==(r=u.top)&&void 0!==r?r:u.default),v(null!==(l=u.bottom)&&void 0!==l?l:u.default),this._checkOverlap(h,o)?this._calcPosition(t,void 0,s,o+1):h}_calculateVelocity(){const t=function(t){const i=s.origin;return i.length=1,i.angle=t,i}(this.direction).copy(),i=this.options.move;if("inside"===i.direction||"outside"===i.direction)return t;const e=Math.PI/180*c(i.angle.value),o=Math.PI/180*c(i.angle.offset),a={left:o-e/2,right:o+e/2};return i.straight||(t.angle+=l(u(a.left,a.right))),i.random&&"number"==typeof i.speed&&(t.length*=n()),t}_checkOverlap(t,i=0){const e=this.options.collisions,s=this.getRadius();if(!e.enable)return!1;const o=e.overlap;if(o.enable)return!1;const n=o.retries;if(n>=0&&i>n)throw new Error("Particle is overlapping and can't be placed");let a=!1;for(const i of this.container.particles.array)if(f(t,i.position)<s+i.getRadius()){a=!0;break}return a}_getRollColor(t){var i;if(!t||!this.roll||!this.backColor&&!this.roll.alter)return t;const e=this.roll.horizontal&&this.roll.vertical?2:1,s=this.roll.horizontal?Math.PI/2:0;return Math.floor(((null!==(i=this.roll.angle)&&void 0!==i?i:0)+s)/(Math.PI/e))%2?this.backColor?this.backColor:this.roll.alter?function(t,i,e){return{h:t.h,s:t.s,l:t.l+("darken"===i?-1:1)*e}}(t,this.roll.alter.type,this.roll.alter.value):t:t}_initPosition(t){var i,e;const o=this.container,r=c(this.options.zIndex.value);this.position=this._calcPosition(o,t,a(r,0,o.zLayers)),this.initialPosition=this.position.copy();const l=o.canvas.size,h=Object.assign({},this.options.move.center),d="percent"===h.mode;switch(this.moveCenter={x:h.x*(d?l.width/100:1),y:h.y*(d?l.height/100:1),radius:null!==(i=this.options.move.center.radius)&&void 0!==i?i:0,mode:null!==(e=this.options.move.center.mode)&&void 0!==e?e:"percent"},this.direction=function(t,i,e){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(e.y-i.y,e.x-i.x);case"outside":return Math.atan2(i.y-e.y,i.x-e.x);default:return n()*Math.PI*2}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case"inside":this.outType="inside";break;case"outside":this.outType="outside"}this.offset=s.origin}_loadShapeData(t,i){const e=t.options[this.shape];if(e)return k({close:t.close,fill:t.fill},P(e,this.id,i))}}class li{constructor(t,i){this.position=t,this.particle=i}}class ci{constructor(t,i){this.position={x:t,y:i}}}class hi extends ci{constructor(t,i,e){super(t,i),this.radius=e}contains(t){return f(t,this.position)<=this.radius}intersects(t){const i=t,e=t,s=this.position,o=t.position,n=Math.abs(o.x-s.x),a=Math.abs(o.y-s.y),r=this.radius;if(void 0!==e.radius){return r+e.radius>Math.sqrt(n**2+a**2)}if(void 0!==i.size){const t=i.size.width,e=i.size.height;return Math.pow(n-t,2)+Math.pow(a-e,2)<=r**2||n<=r+t&&a<=r+e||n<=t||a<=e}return!1}}class di extends ci{constructor(t,i,e,s){super(t,i),this.size={height:s,width:e}}contains(t){const i=this.size.width,e=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+i&&t.y>=s.y&&t.y<=s.y+e}intersects(t){t instanceof hi&&t.intersects(this);const i=this.size.width,e=this.size.height,s=this.position,o=t.position,n=t instanceof di?t.size:{width:0,height:0},a=n.width,r=n.height;return o.x<s.x+i&&o.x+a>s.x&&o.y<s.y+e&&o.y+r>s.y}}class ui{constructor(t,i){this.rectangle=t,this.capacity=i,this._points=[],this._divided=!1}insert(t){var i,e,s,o,n;return!!this.rectangle.contains(t.position)&&(this._points.length<this.capacity?(this._points.push(t),!0):(this._divided||this.subdivide(),null!==(n=(null===(i=this._NE)||void 0===i?void 0:i.insert(t))||(null===(e=this._NW)||void 0===e?void 0:e.insert(t))||(null===(s=this._SE)||void 0===s?void 0:s.insert(t))||(null===(o=this._SW)||void 0===o?void 0:o.insert(t)))&&void 0!==n&&n))}query(t,i,e){var s,o,n,a;const r=null!=e?e:[];if(!t.intersects(this.rectangle))return[];for(const e of this._points)!t.contains(e.position)&&f(t.position,e.position)>e.particle.getRadius()&&(!i||i(e.particle))||r.push(e.particle);return this._divided&&(null===(s=this._NE)||void 0===s||s.query(t,i,r),null===(o=this._NW)||void 0===o||o.query(t,i,r),null===(n=this._SE)||void 0===n||n.query(t,i,r),null===(a=this._SW)||void 0===a||a.query(t,i,r)),r}queryCircle(t,i,e){return this.query(new hi(t.x,t.y,i),e)}queryRectangle(t,i,e){return this.query(new di(t.x,t.y,i.width,i.height),e)}subdivide(){const t=this.rectangle.position.x,i=this.rectangle.position.y,e=this.rectangle.size.width,s=this.rectangle.size.height,o=this.capacity;this._NE=new ui(new di(t,i,e/2,s/2),o),this._NW=new ui(new di(t+e/2,i,e/2,s/2),o),this._SE=new ui(new di(t,i+s/2,e/2,s/2),o),this._SW=new ui(new di(t+e/2,i+s/2,e/2,s/2),o),this._divided=!0}}class pi{constructor(t,i){this.container=i,this._engine=t,this.nextId=0,this.array=[],this.zArray=[],this.pool=[],this.limit=0,this.needsSort=!1,this.lastZIndex=0,this.interactionManager=new ni(this._engine,i);const e=this.container.canvas.size;this.quadTree=new ui(new di(-e.width/4,-e.height/4,3*e.width/2,3*e.height/2),4),this.movers=this._engine.plugins.getMovers(i,!0),this.updaters=this._engine.plugins.getUpdaters(i,!0)}get count(){return this.array.length}addManualParticles(){const t=this.container,i=t.actualOptions;for(const s of i.manualParticles)this.addParticle(s.position?"precise"===s.position.mode?s.position:(e={size:t.canvas.size,position:s.position}).position&&void 0!==e.position.x&&void 0!==e.position.y?{x:e.position.x*e.size.width/100,y:e.position.y*e.size.height/100}:void 0:void 0,s.options);var e}addParticle(t,i,e,s){const o=this.container.actualOptions.particles.number.limit;if(o>0){const t=this.count+1-o;t>0&&this.removeQuantity(t)}return this._pushParticle(t,i,e,s)}clear(){this.array=[],this.zArray=[]}destroy(){this.array=[],this.zArray=[],this.movers=[],this.updaters=[]}async draw(t){const i=this.container,e=this.container.canvas.size;this.quadTree=new ui(new di(-e.width/4,-e.height/4,3*e.width/2,3*e.height/2),4),i.canvas.clear(),await this.update(t),this.needsSort&&(this.zArray.sort(((t,i)=>i.position.z-t.position.z||t.id-i.id)),this.lastZIndex=this.zArray[this.zArray.length-1].position.z,this.needsSort=!1);for(const[,e]of i.plugins)i.canvas.drawPlugin(e,t);for(const i of this.zArray)i.draw(t)}handleClickMode(t){this.interactionManager.handleClickMode(t)}init(){var t;const i=this.container,e=i.actualOptions;this.lastZIndex=0,this.needsSort=!1;let s=!1;this.updaters=this._engine.plugins.getUpdaters(i,!0),this.interactionManager.init();for(const[,t]of i.plugins)if(void 0!==t.particlesInitialization&&(s=t.particlesInitialization()),s)break;this.interactionManager.init();for(const[,t]of i.pathGenerators)t.init(i);if(this.addManualParticles(),!s){for(const i in e.particles.groups){const s=e.particles.groups[i];for(let o=this.count,n=0;n<(null===(t=s.number)||void 0===t?void 0:t.value)&&o<e.particles.number.value;o++,n++)this.addParticle(void 0,s,i)}for(let t=this.count;t<e.particles.number.value;t++)this.addParticle()}}push(t,i,e,s){this.pushing=!0;for(let o=0;o<t;o++)this.addParticle(null==i?void 0:i.position,e,s);this.pushing=!1}async redraw(){this.clear(),this.init(),await this.draw({value:0,factor:0})}remove(t,i,e){this.removeAt(this.array.indexOf(t),void 0,i,e)}removeAt(t,i=1,e,s){if(t<0||t>this.count)return;let o=0;for(let n=t;o<i&&n<this.count;n++)this._removeParticle(n--,e,s)&&o++}removeQuantity(t,i){this.removeAt(0,t,i)}setDensity(){const t=this.container.actualOptions;for(const i in t.particles.groups)this._applyDensity(t.particles.groups[i],0,i);this._applyDensity(t.particles,t.manualParticles.length)}async update(t){var i,e;const s=this.container,o=[];for(const[,t]of s.pathGenerators)t.update();for(const[,e]of s.plugins)null===(i=e.update)||void 0===i||i.call(e,t);for(const i of this.array){const n=s.canvas.resizeFactor;n&&!i.ignoresResizeRatio&&(i.position.x*=n.width,i.position.y*=n.height,i.initialPosition.x*=n.width,i.initialPosition.y*=n.height),i.ignoresResizeRatio=!1,await this.interactionManager.reset(i);for(const[,s]of this.container.plugins){if(i.destroyed)break;null===(e=s.particleUpdate)||void 0===e||e.call(s,i,t)}for(const e of this.movers)e.isEnabled(i)&&e.move(i,t);i.destroyed?o.push(i):this.quadTree.insert(new li(i.getPosition(),i))}for(const t of o)this.remove(t);await this.interactionManager.externalInteract(t);for(const i of this.array){for(const e of this.updaters)e.update(i,t);i.destroyed||i.spawning||await this.interactionManager.particlesInteract(i,t)}delete s.canvas.resizeFactor}_applyDensity(t,i,e){var s;if(!(null===(s=t.number.density)||void 0===s?void 0:s.enable))return;const o=t.number,n=this._initDensityFactor(o.density),a=o.value,r=o.limit>0?o.limit:a,l=Math.min(a,r)*n+i,c=Math.min(this.count,this.array.filter((t=>t.group===e)).length);this.limit=o.limit*n,c<l?this.push(Math.abs(l-c),void 0,t,e):c>l&&this.removeQuantity(c-l,e)}_initDensityFactor(t){const i=this.container;if(!i.canvas.element||!t.enable)return 1;const e=i.canvas.element,s=i.retina.pixelRatio;return e.width*e.height/(t.factor*s**2*t.area)}_pushParticle(t,i,e,s){try{let o=this.pool.pop();o?o.init(this.nextId,t,i,e):o=new ri(this._engine,this.nextId,this.container,t,i,e);let n=!0;if(s&&(n=s(o)),!n)return;return this.array.push(o),this.zArray.push(o),this.nextId++,this._engine.dispatchEvent("particleAdded",{container:this.container,data:{particle:o}}),o}catch(t){return void console.warn(`error adding particle: ${t}`)}}_removeParticle(t,i,e){const s=this.array[t];if(!s||s.group!==i)return!1;s.destroy(e),this.array.splice(t,1);const o=this.zArray.indexOf(s);return this.zArray.splice(o,1),this.pool.push(s),this._engine.dispatchEvent("particleRemoved",{container:this.container,data:{particle:s}}),!0}}class vi{constructor(t){this.container=t}init(){const t=this.container,i=t.actualOptions;this.pixelRatio=!i.detectRetina||g()?1:window.devicePixelRatio,this.reduceFactor=1;const e=this.pixelRatio;if(t.canvas.element){const i=t.canvas.element;t.canvas.size.width=i.offsetWidth*e,t.canvas.size.height=i.offsetHeight*e}const s=i.particles;this.attractDistance=c(s.move.attract.distance)*e,this.sizeAnimationSpeed=c(s.size.animation.speed)*e,this.maxSpeed=c(s.move.gravity.maxSpeed)*e}initParticle(t){const i=t.options,e=this.pixelRatio,s=i.move.distance,o=t.retina;o.attractDistance=c(i.move.attract.distance)*e,o.moveDrift=c(i.move.drift)*e,o.moveSpeed=c(i.move.speed)*e,o.sizeAnimationSpeed=c(i.size.animation.speed)*e;const n=o.maxDistance;n.horizontal=void 0!==s.horizontal?s.horizontal*e:void 0,n.vertical=void 0!==s.vertical?s.vertical*e:void 0,o.maxSpeed=c(i.move.gravity.maxSpeed)*e}}function fi(t){return t&&!t.destroyed}function yi(t,i,...e){const s=new oi(t,i);return ei(s,...e),s}const mi={generate:t=>{const i=t.velocity.copy();return i.angle+=i.length*Math.PI/180,i},init:()=>{},update:()=>{},reset:()=>{}};class gi{constructor(t,i,e){this.id=i,this._engine=t,this.fpsLimit=120,this.smooth=!1,this._delay=0,this.duration=0,this.lifeTime=0,this._firstStart=!0,this.started=!1,this.destroyed=!1,this._paused=!0,this.lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._sourceOptions=e,this._initialSourceOptions=e,this.retina=new vi(this),this.canvas=new tt(this),this.particles=new pi(this._engine,this),this.frameManager=new st(this),this.pathGenerators=new Map,this.interactivity={mouse:{clicking:!1,inside:!1}},this.plugins=new Map,this.drawers=new Map,this._options=yi(this._engine,this),this.actualOptions=yi(this._engine,this),this._eventListeners=new et(this),"undefined"!=typeof IntersectionObserver&&IntersectionObserver&&(this._intersectionObserver=new IntersectionObserver((t=>this._intersectionManager(t)))),this._engine.dispatchEvent("containerBuilt",{container:this})}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addClickHandler(t){if(!fi(this))return;const i=this.interactivity.element;if(!i)return;const e=(i,e,s)=>{if(!fi(this))return;const o=this.retina.pixelRatio,n={x:e.x*o,y:e.y*o},a=this.particles.quadTree.queryCircle(n,s*o);t(i,a)};let s=!1,o=!1;i.addEventListener("click",(t=>{if(!fi(this))return;const i=t,s={x:i.offsetX||i.clientX,y:i.offsetY||i.clientY};e(t,s,1)})),i.addEventListener("touchstart",(()=>{fi(this)&&(s=!0,o=!1)})),i.addEventListener("touchmove",(()=>{fi(this)&&(o=!0)})),i.addEventListener("touchend",(t=>{if(fi(this)){if(s&&!o){const i=t;let s=i.touches[i.touches.length-1];if(!s&&(s=i.changedTouches[i.changedTouches.length-1],!s))return;const o=this.canvas.element,n=o?o.getBoundingClientRect():void 0,a={x:s.clientX-(n?n.left:0),y:s.clientY-(n?n.top:0)};e(t,a,Math.max(s.radiusX,s.radiusY))}s=!1,o=!1}})),i.addEventListener("touchcancel",(()=>{fi(this)&&(s=!1,o=!1)}))}addPath(t,i,e=!1){return!(!fi(this)||!e&&this.pathGenerators.has(t))&&(this.pathGenerators.set(t,null!=i?i:mi),!0)}destroy(){if(!fi(this))return;this.stop(),this.particles.destroy(),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._engine.plugins.destroy(this),this.destroyed=!0;const t=this._engine.dom(),i=t.findIndex((t=>t===this));i>=0&&t.splice(i,1),this._engine.dispatchEvent("containerDestroyed",{container:this})}draw(t){if(!fi(this))return;let i=t;this._drawAnimationFrame=(g()?t=>setTimeout(t):t=>(requestAnimationFrame||setTimeout)(t))((async t=>{i&&(this.lastFrameTime=void 0,i=!1),await this.frameManager.nextFrame(t)}))}exportConfiguration(){return JSON.stringify(this.actualOptions,((t,i)=>{if("_engine"!==t&&"_container"!==t)return i}),2)}exportImage(t,i,e){const s=this.canvas.element;s&&s.toBlob(t,null!=i?i:"image/png",e)}exportImg(t){this.exportImage(t)}getAnimationStatus(){return!this._paused&&!this.pageHidden&&fi(this)}handleClickMode(t){if(fi(this)){this.particles.handleClickMode(t);for(const[,i]of this.plugins)i.handleClickMode&&i.handleClickMode(t)}}async init(){if(!fi(this))return;const t=this._engine.plugins.getSupportedShapes();for(const i of t){const t=this._engine.plugins.getShapeDrawer(i);t&&this.drawers.set(i,t)}this._options=yi(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=yi(this._engine,this,this._options);const i=this._engine.plugins.getAvailablePlugins(this);for(const[t,e]of i)this.plugins.set(t,e);this.retina.init(),await this.canvas.init(),this.zLayers=this.actualOptions.zLayers,this.duration=1e3*c(this.actualOptions.duration),this._delay=1e3*c(this.actualOptions.delay),this.lifeTime=0,this.fpsLimit=this.actualOptions.fpsLimit>0?this.actualOptions.fpsLimit:120,this.smooth=this.actualOptions.smooth;for(const[,t]of this.drawers)t.init&&await t.init(this);for(const[,t]of this.plugins)t.init&&await t.init();this._engine.dispatchEvent("containerInit",{container:this}),this.particles.init(),this.particles.setDensity();for(const[,t]of this.plugins)t.particlesSetup&&t.particlesSetup();this._engine.dispatchEvent("particlesSetup",{container:this})}async loadTheme(t){fi(this)&&(this._currentTheme=t,await this.refresh())}pause(){if(fi(this)&&(void 0!==this._drawAnimationFrame&&((g()?t=>clearTimeout(t):t=>(cancelAnimationFrame||clearTimeout)(t))(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const[,t]of this.plugins)t.pause&&t.pause();this.pageHidden||(this._paused=!0),this._engine.dispatchEvent("containerPaused",{container:this})}}play(t){if(!fi(this))return;const i=this._paused||t;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),i)for(const[,t]of this.plugins)t.play&&t.play();this._engine.dispatchEvent("containerPlay",{container:this}),this.draw(i||!1)}else this._firstStart=!1}async refresh(){if(fi(this))return this.stop(),this.start()}async reset(){if(fi(this))return this._options=yi(this._engine,this),this.refresh()}setNoise(t,i,e){fi(this)&&this.setPath(t,i,e)}setPath(t,i,e){if(!t||!fi(this))return;const s=Object.assign({},mi);if("function"==typeof t)s.generate=t,i&&(s.init=i),e&&(s.update=e);else{const i=s;s.generate=t.generate||i.generate,s.init=t.init||i.init,s.update=t.update||i.update}this.addPath("default",s,!0)}async start(){fi(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise((t=>{this._delayTimeout=setTimeout((async()=>{this._eventListeners.addListeners(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(this.interactivity.element);for(const[,t]of this.plugins)t.start&&await t.start();this._engine.dispatchEvent("containerStarted",{container:this}),this.play(),t()}),this._delay)})))}stop(){if(fi(this)&&this.started){this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.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._sourceOptions=this._options,this._engine.dispatchEvent("containerStopped",{container:this})}}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)}_intersectionManager(t){if(fi(this)&&this.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivity.element&&(i.isIntersecting?this.play:this.pause)()}}class bi{constructor(){this._listeners=new Map}addEventListener(t,i){var e;this.removeEventListener(t,i),this._listeners.get(t)||this._listeners.set(t,[]),null===(e=this._listeners.get(t))||void 0===e||e.push(i)}dispatchEvent(t,i){var e;null===(e=this._listeners.get(t))||void 0===e||e.forEach((t=>t(i)))}hasEventListener(t){return!!this._listeners.get(t)}removeAllEventListeners(t){t?this._listeners.delete(t):this._listeners=new Map}removeEventListener(t,i){const e=this._listeners.get(t);if(!e)return;const s=e.length,o=e.indexOf(i);o<0||(1===s?this._listeners.delete(t):e.splice(o,1))}}function wi(t,i,e,s=!1){let o=i.get(t);return o&&!s||(o=[...e.values()].map((i=>i(t))),i.set(t,o)),o}class xi{constructor(t){this._engine=t,this.plugins=[],this._initializers={interactors:new Map,movers:new Map,updaters: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}addInteractor(t,i){this._initializers.interactors.set(t,i)}addParticleMover(t,i){this._initializers.movers.set(t,i)}addParticleUpdater(t,i){this._initializers.updaters.set(t,i)}addPathGenerator(t,i){this.getPathGenerator(t)||this.pathGenerators.set(t,i)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,i,e=!1){!e&&this.getPreset(t)||this.presets.set(t,i)}addShapeDrawer(t,i){M(t,(t=>{this.getShapeDrawer(t)||this.drawers.set(t,i)}))}destroy(t){this.updaters.delete(t),this.movers.delete(t),this.interactors.delete(t)}getAvailablePlugins(t){const i=new Map;for(const e of this.plugins)e.needsPlugin(t.actualOptions)&&i.set(e.id,e.getPlugin(t));return i}getInteractors(t,i=!1){return wi(t,this.interactors,this._initializers.interactors,i)}getMovers(t,i=!1){return wi(t,this.movers,this._initializers.movers,i)}getPathGenerator(t){return this.pathGenerators.get(t)}getPlugin(t){return this.plugins.find((i=>i.id===t))}getPreset(t){return this.presets.get(t)}getShapeDrawer(t){return this.drawers.get(t)}getSupportedShapes(){return this.drawers.keys()}getUpdaters(t,i=!1){return wi(t,this.updaters,this._initializers.updaters,i)}loadOptions(t,i){for(const e of this.plugins)e.loadOptions(t,i)}loadParticlesOptions(t,i,...e){const s=this.updaters.get(t);if(s)for(const t of s)t.loadOptions&&t.loadOptions(i,...e)}}class _i{constructor(t){this.container=t,this.type="particles"}}const zi=new class{constructor(){this.key="rgb",this.stringPrefix="rgb"}handleColor(t){var i;const e=null!==(i=t.value.rgb)&&void 0!==i?i:t.value;if(void 0!==e.r)return e}handleRangeColor(t){var i;const e=null!==(i=t.value.rgb)&&void 0!==i?i:t.value;if(void 0!==e.r)return{r:c(e.r),g:c(e.g),b:c(e.b)}}parseString(t){if(!t.startsWith(this.stringPrefix))return;const i=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.%]+)\s*)?\)/i.exec(t);return i?{a:i.length>4?m(i[5]):1,b:parseInt(i[3],10),g:parseInt(i[2],10),r:parseInt(i[1],10)}:void 0}},ki=new class{constructor(){this.key="hsl",this.stringPrefix="hsl"}handleColor(t){var i;const e=null!==(i=t.value.hsl)&&void 0!==i?i:t.value;if(void 0!==e.h&&void 0!==e.s&&void 0!==e.l)return V(e)}handleRangeColor(t){var i;const e=null!==(i=t.value.hsl)&&void 0!==i?i:t.value;if(void 0!==e.h&&void 0!==e.l)return V({h:c(e.h),l:c(e.l),s:c(e.s)})}parseString(t){if(!t.startsWith("hsl"))return;const i=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.%]+)\s*)?\)/i.exec(t);return i?function(t){const i=V(t);return{a:t.a,b:i.b,g:i.g,r:i.r}}({a:i.length>4?m(i[5]):1,h:parseInt(i[1],10),l:parseInt(i[3],10),s:parseInt(i[2],10)}):void 0}};I(zi),I(ki);const Mi=new class{constructor(){this._configs=new Map,this._domArray=[],this._eventDispatcher=new bi,this.plugins=new xi(this)}get configs(){const t={};for(const[i,e]of this._configs)t[i]=e;return t}addConfig(t,i){var e;"string"==typeof t?i&&(i.name=t,this._configs.set(t,i)):this._configs.set(null!==(e=t.name)&&void 0!==e?e:"default",t)}addEventListener(t,i){this._eventDispatcher.addEventListener(t,i)}async addInteractor(t,i){this.plugins.addInteractor(t,i),await this.refresh()}async addMover(t,i){this.plugins.addParticleMover(t,i),await this.refresh()}async addParticleUpdater(t,i){this.plugins.addParticleUpdater(t,i),await this.refresh()}async addPathGenerator(t,i){this.plugins.addPathGenerator(t,i),await this.refresh()}async addPlugin(t){this.plugins.addPlugin(t),await this.refresh()}async addPreset(t,i,e=!1){this.plugins.addPreset(t,i,e),await this.refresh()}async addShape(t,i,e,s,o){let n;n="function"==typeof i?{afterEffect:s,destroy:o,draw:i,init:e}:i,this.plugins.addShapeDrawer(t,n),await this.refresh()}dispatchEvent(t,i){this._eventDispatcher.dispatchEvent(t,i)}dom(){return this._domArray}domItem(t){const i=this.dom(),e=i[t];if(e&&!e.destroyed)return e;i.splice(t,1)}async load(t){var i,e,s;const o=null!==(i=t.id)&&void 0!==i?i:`tsparticles${Math.floor(1e4*n())}`,{index:a,url:r}=t,l=r?await async function(t){const i=P(t.url,t.index);if(!i)return t.fallback;const e=await fetch(i);return e.ok?e.json():(console.error(`tsParticles - Error ${e.status} while retrieving config file`),t.fallback)}({fallback:t.options,index:a,url:r}):t.options;let c=null!==(e=t.element)&&void 0!==e?e:document.getElementById(o);c||(c=document.createElement("div"),c.id=o,null===(s=document.querySelector("body"))||void 0===s||s.append(c));const h=P(l,a),d=this.dom(),u=d.findIndex((t=>t.id===o));if(u>=0){const t=this.domItem(u);t&&!t.destroyed&&(t.destroy(),d.splice(u,1))}let p;if("canvas"===c.tagName.toLowerCase())p=c,p.dataset[N]="false";else{const t=c.getElementsByTagName("canvas");t.length?(p=t[0],p.dataset[N]="false"):(p=document.createElement("canvas"),p.dataset[N]="true",c.appendChild(p))}p.style.width||(p.style.width="100%"),p.style.height||(p.style.height="100%");const v=new gi(this,o,h);return u>=0?d.splice(u,0,v):d.push(v),v.canvas.loadCanvas(p),await v.start(),v}async refresh(){for(const t of this.dom())await t.refresh()}removeEventListener(t,i){this._eventDispatcher.removeEventListener(t,i)}setOnClickHandler(t){const i=this.dom();if(!i.length)throw new Error("Can only set click handlers after calling tsParticles.load()");for(const e of i)e.addClickHandler(t)}};class Pi{init(t){var i;const e=t.container,s=t.options,o=s.move.gravity,n=s.move.spin;if(t.gravity={enable:o.enable,acceleration:c(o.acceleration),inverse:o.inverse},n.enable){const s=null!==(i=n.position)&&void 0!==i?i:{x:50,y:50},o={x:s.x/100*e.canvas.size.width,y:s.y/100*e.canvas.size.height},a=f(t.getPosition(),o),r=c(n.acceleration);t.retina.spinAcceleration=r*e.retina.pixelRatio,t.spin={center:o,direction:t.velocity.x>=0?"clockwise":"counter-clockwise",angle:t.velocity.angle,radius:a,acceleration:t.retina.spinAcceleration}}}isEnabled(t){return!t.destroyed&&t.options.move.enable}move(t,i){var e,s,o,r,l;const h=t.options,u=h.move;if(!u.enable)return;const p=t.container,f=function(t){return t.slow.inRange?t.slow.factor:1}(t),y=(null!==(e=(r=t.retina).moveSpeed)&&void 0!==e?e:r.moveSpeed=c(u.speed)*p.retina.pixelRatio)*p.retina.reduceFactor,m=null!==(s=(l=t.retina).moveDrift)&&void 0!==s?s:l.moveDrift=c(t.options.move.drift)*p.retina.pixelRatio,g=d(h.size.value)*p.retina.pixelRatio,b=y*((u.size?t.getRadius()/g:1)*f*(i.factor||1))/2;if(u.spin.enable)!function(t,i){const e=t.container;if(!t.spin)return;const s={x:"clockwise"===t.spin.direction?Math.cos:Math.sin,y:"clockwise"===t.spin.direction?Math.sin:Math.cos};t.position.x=t.spin.center.x+t.spin.radius*s.x(t.spin.angle),t.position.y=t.spin.center.y+t.spin.radius*s.y(t.spin.angle),t.spin.radius+=t.spin.acceleration;const o=Math.max(e.canvas.size.width,e.canvas.size.height);t.spin.radius>o/2?(t.spin.radius=o/2,t.spin.acceleration*=-1):t.spin.radius<0&&(t.spin.radius=0,t.spin.acceleration*=-1),t.spin.angle+=i/100*(1-t.spin.radius/o)}(t,b);else{!function(t,i){var e;const s=t.options.move.path;if(!s.enable)return;if(t.lastPathTime<=t.pathDelay)return void(t.lastPathTime+=i.value);const o=null===(e=t.pathGenerator)||void 0===e?void 0:e.generate(t);o&&t.velocity.addTo(o),s.clamp&&(t.velocity.x=a(t.velocity.x,-1,1),t.velocity.y=a(t.velocity.y,-1,1)),t.lastPathTime-=t.pathDelay}(t,i);const e=t.gravity,s=(null==e?void 0:e.enable)&&e.inverse?-1:1;(null==e?void 0:e.enable)&&b&&(t.velocity.y+=s*(e.acceleration*i.factor)/(60*b)),m&&b&&(t.velocity.x+=m*i.factor/(60*b));const n=t.moveDecay;1!=n&&t.velocity.multTo(n);const r=t.velocity.mult(b),l=null!==(o=t.retina.maxSpeed)&&void 0!==o?o:p.retina.maxSpeed;(null==e?void 0:e.enable)&&l>0&&(!e.inverse&&r.y>=0&&r.y>=l||e.inverse&&r.y<=0&&r.y<=-l)&&(r.y=s*l,b&&(t.velocity.y=r.y/b));const c=t.options.zIndex,h=(1-t.zIndexFactor)**c.velocityRate;1!=h&&r.multTo(h),t.position.addTo(r),u.vibrate&&(t.position.x+=Math.sin(t.position.x*Math.cos(t.position.y)),t.position.y+=Math.cos(t.position.y*Math.sin(t.position.x)))}!function(t){const i=t.initialPosition,{dx:e,dy:s}=v(i,t.position),o=Math.abs(e),a=Math.abs(s),r=t.retina.maxDistance.horizontal,l=t.retina.maxDistance.vertical;if(r||l)if((r&&o>=r||l&&a>=l)&&!t.misplaced)t.misplaced=!!r&&o>r||!!l&&a>l,r&&(t.velocity.x=t.velocity.y/2-t.velocity.x),l&&(t.velocity.y=t.velocity.x/2-t.velocity.y);else if((!r||o<r)&&(!l||a<l)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const e=t.position,s=t.velocity;r&&(e.x<i.x&&s.x<0||e.x>i.x&&s.x>0)&&(s.x*=-n()),l&&(e.y<i.y&&s.y<0||e.y>i.y&&s.y>0)&&(s.y*=-n())}}(t)}}class Ci{draw(t,i,e){i.circleRange||(i.circleRange={min:0,max:2*Math.PI});const s=i.circleRange;t.arc(0,0,e,s.min,s.max,!1)}getSidesCount(){return 12}particleInit(t,i){var e;const s=i.shapeData,o=null!==(e=null==s?void 0:s.angle)&&void 0!==e?e:{max:360,min:0};i.circleRange="object"!=typeof o?{min:0,max:o*Math.PI/180}:{min:o.min*Math.PI/180,max:o.max*Math.PI/180}}}function Oi(t,i,e,s,o){var n,a;const r=i;if(!r||!e.enable||void 0!==r.loops&&void 0!==r.maxLoops&&r.maxLoops>0&&r.loops>=r.maxLoops)return;const c=l(e.offset),h=(null!==(n=i.velocity)&&void 0!==n?n:0)*t.factor+3.6*c,d=null!==(a=i.decay)&&void 0!==a?a:1;o&&"increasing"!==r.status?(r.value-=h,r.value<0&&(r.loops||(r.loops=0),r.loops++,r.status="increasing",r.value+=r.value)):(r.value+=h,r.value>s&&(r.loops||(r.loops=0),r.loops++,o&&(r.status="decreasing",r.value-=r.value%s))),r.velocity&&1!==d&&(r.velocity*=d),r.value>s&&(r.value%=s)}class Si{constructor(t){this.container=t}init(t){const i=F(t.options.color,t.id,t.options.reduceDuplicates);i&&(t.color=function(t,i,e){const s={h:{enable:!1,value:t.h},s:{enable:!1,value:t.s},l:{enable:!1,value:t.l}};return i&&(j(s.h,i.h,e),j(s.s,i.s,e),j(s.l,i.l,e)),s}(i,t.options.color.animation,this.container.retina.reduceFactor))}isEnabled(t){var i,e,s;const o=t.options.color.animation;return!t.destroyed&&!t.spawning&&(void 0!==(null===(i=t.color)||void 0===i?void 0:i.h.value)&&o.h.enable||void 0!==(null===(e=t.color)||void 0===e?void 0:e.s.value)&&o.s.enable||void 0!==(null===(s=t.color)||void 0===s?void 0:s.l.value)&&o.l.enable)}update(t,i){!function(t,i){var e,s,o;const n=t.options.color.animation,a=null===(e=t.color)||void 0===e?void 0:e.h,r=null===(s=t.color)||void 0===s?void 0:s.s,l=null===(o=t.color)||void 0===o?void 0:o.l;a&&Oi(i,a,n.h,360,!1),r&&Oi(i,r,n.s,100,!0),l&&Oi(i,l,n.l,100,!0)}(t,i)}}class Ti{constructor(t){this.container=t}init(t){const i=t.options.opacity;t.opacity=C(i,1);const e=i.animation;e.enable&&(t.opacity.velocity=c(e.speed)/100*this.container.retina.reduceFactor,e.sync||(t.opacity.velocity*=n()))}isEnabled(t){var i,e,s,o;return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((null!==(i=t.opacity.maxLoops)&&void 0!==i?i:0)<=0||(null!==(e=t.opacity.maxLoops)&&void 0!==e?e:0)>0&&(null!==(s=t.opacity.loops)&&void 0!==s?s:0)<(null!==(o=t.opacity.maxLoops)&&void 0!==o?o:0))}reset(t){t.opacity&&(t.opacity.loops=0)}update(t,i){this.isEnabled(t)&&function(t,i){var e,s,o,n,r,l;if(!t.opacity)return;const c=t.opacity.min,h=t.opacity.max,d=null!==(e=t.opacity.decay)&&void 0!==e?e:1;if(!(t.destroyed||!t.opacity.enable||(null!==(s=t.opacity.maxLoops)&&void 0!==s?s:0)>0&&(null!==(o=t.opacity.loops)&&void 0!==o?o:0)>(null!==(n=t.opacity.maxLoops)&&void 0!==n?n:0))){switch(t.opacity.status){case"increasing":t.opacity.value>=h?(t.opacity.status="decreasing",t.opacity.loops||(t.opacity.loops=0),t.opacity.loops++):t.opacity.value+=(null!==(r=t.opacity.velocity)&&void 0!==r?r:0)*i.factor;break;case"decreasing":t.opacity.value<=c?(t.opacity.status="increasing",t.opacity.loops||(t.opacity.loops=0),t.opacity.loops++):t.opacity.value-=(null!==(l=t.opacity.velocity)&&void 0!==l?l:0)*i.factor}t.opacity.velocity&&1!==t.opacity.decay&&(t.opacity.velocity*=d),function(t,i,e,s){switch(t.options.opacity.animation.destroy){case"max":i>=s&&t.destroy();break;case"min":i<=e&&t.destroy()}}(t,t.opacity.value,c,h),t.destroyed||(t.opacity.value=a(t.opacity.value,c,h))}}(t,i)}}class Ii{constructor(t){this.container=t,this.modes=["bounce","bounce-vertical","bounce-horizontal","bounceVertical","bounceHorizontal","split"]}update(t,i,e,s){if(!this.modes.includes(s))return;const o=this.container;let n=!1;for(const[,s]of o.plugins)if(void 0!==s.particleBounce&&(n=s.particleBounce(t,e,i)),n)break;if(n)return;const a=t.getPosition(),r=t.offset,l=t.getRadius(),c=z(a,l),h=o.canvas.size;!function(t){if("bounce"!==t.outMode&&"bounce-horizontal"!==t.outMode&&"bounceHorizontal"!==t.outMode&&"split"!==t.outMode)return;t.bounds.right<0?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const i=t.particle.velocity.x;let e=!1;if("right"===t.direction&&t.bounds.right>=t.canvasSize.width&&i>0||"left"===t.direction&&t.bounds.left<=0&&i<0){const i=p(t.particle.options.bounce.horizontal);t.particle.velocity.x*=-i,e=!0}if(!e)return;const s=t.offset.x+t.size;t.bounds.right>=t.canvasSize.width?t.particle.position.x=t.canvasSize.width-s:t.bounds.left<=0&&(t.particle.position.x=s),"split"===t.outMode&&t.particle.destroy()}({particle:t,outMode:s,direction:i,bounds:c,canvasSize:h,offset:r,size:l}),function(t){if("bounce"!==t.outMode&&"bounce-vertical"!==t.outMode&&"bounceVertical"!==t.outMode&&"split"!==t.outMode)return;t.bounds.bottom<0?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const i=t.particle.velocity.y;let e=!1;if("bottom"===t.direction&&t.bounds.bottom>=t.canvasSize.height&&i>0||"top"===t.direction&&t.bounds.top<=0&&i<0){const i=p(t.particle.options.bounce.vertical);t.particle.velocity.y*=-i,e=!0}if(!e)return;const s=t.offset.y+t.size;t.bounds.bottom>=t.canvasSize.height?t.particle.position.y=t.canvasSize.height-s:t.bounds.top<=0&&(t.particle.position.y=s),"split"===t.outMode&&t.particle.destroy()}({particle:t,outMode:s,direction:i,bounds:c,canvasSize:h,offset:r,size:l})}}class Ri{constructor(t){this.container=t,this.modes=["destroy"]}update(t,i,e,o){if(!this.modes.includes(o))return;const n=this.container;switch(t.outType){case"normal":case"outside":if(_(t.position,n.canvas.size,s.origin,t.getRadius(),i))return;break;case"inside":{const{dx:i,dy:e}=v(t.position,t.moveCenter),{x:s,y:o}=t.velocity;if(s<0&&i>t.moveCenter.radius||o<0&&e>t.moveCenter.radius||s>=0&&i<-t.moveCenter.radius||o>=0&&e<-t.moveCenter.radius)return;break}}n.particles.remove(t,void 0,!0)}}class Di{constructor(t){this.container=t,this.modes=["none"]}update(t,i,e,o){if(!this.modes.includes(o))return;if(t.options.move.distance.horizontal&&("left"===i||"right"===i)||t.options.move.distance.vertical&&("top"===i||"bottom"===i))return;const n=t.options.move.gravity,a=this.container,r=a.canvas.size,l=t.getRadius();if(n.enable){const e=t.position;(!n.inverse&&e.y>r.height+l&&"bottom"===i||n.inverse&&e.y<-l&&"top"===i)&&a.particles.remove(t)}else{if(t.velocity.y>0&&t.position.y<=r.height+l||t.velocity.y<0&&t.position.y>=-l||t.velocity.x>0&&t.position.x<=r.width+l||t.velocity.x<0&&t.position.x>=-l)return;_(t.position,a.canvas.size,s.origin,l,i)||a.particles.remove(t)}}}class Li{constructor(t){this.container=t,this.modes=["out"]}update(t,i,e,o){if(!this.modes.includes(o))return;const a=this.container;switch(t.outType){case"inside":{const{x:i,y:e}=t.velocity,o=s.origin;o.length=t.moveCenter.radius,o.angle=t.velocity.angle+Math.PI,o.addTo(s.create(t.moveCenter));const{dx:n,dy:r}=v(t.position,o);if(i<=0&&n>=0||e<=0&&r>=0||i>=0&&n<=0||e>=0&&r<=0)return;t.position.x=Math.floor(l({min:0,max:a.canvas.size.width})),t.position.y=Math.floor(l({min:0,max:a.canvas.size.height}));const{dx:c,dy:h}=v(t.position,t.moveCenter);t.direction=Math.atan2(-h,-c),t.velocity.angle=t.direction;break}default:if(_(t.position,a.canvas.size,s.origin,t.getRadius(),i))return;switch(t.outType){case"outside":{t.position.x=Math.floor(l({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(l({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:i,dy:e}=v(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(e,i),t.velocity.angle=t.direction);break}case"normal":{const e=t.options.move.warp,s=a.canvas.size,o={bottom:s.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:s.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},r=t.getRadius(),l=z(t.position,r);"right"===i&&l.left>s.width+t.offset.x?(t.position.x=o.left,t.initialPosition.x=t.position.x,e||(t.position.y=n()*s.height,t.initialPosition.y=t.position.y)):"left"===i&&l.right<-t.offset.x&&(t.position.x=o.right,t.initialPosition.x=t.position.x,e||(t.position.y=n()*s.height,t.initialPosition.y=t.position.y)),"bottom"===i&&l.top>s.height+t.offset.y?(e||(t.position.x=n()*s.width,t.initialPosition.x=t.position.x),t.position.y=o.top,t.initialPosition.y=t.position.y):"top"===i&&l.bottom<-t.offset.y&&(e||(t.position.x=n()*s.width,t.initialPosition.x=t.position.x),t.position.y=o.bottom,t.initialPosition.y=t.position.y);break}}}}}class Ei{constructor(t){this.container=t,this.updaters=[new Ii(t),new Ri(t),new Li(t),new Di(t)]}init(){}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,i){var e,s,o,n;const a=t.options.move.outModes;this.updateOutMode(t,i,null!==(e=a.bottom)&&void 0!==e?e:a.default,"bottom"),this.updateOutMode(t,i,null!==(s=a.left)&&void 0!==s?s:a.default,"left"),this.updateOutMode(t,i,null!==(o=a.right)&&void 0!==o?o:a.default,"right"),this.updateOutMode(t,i,null!==(n=a.top)&&void 0!==n?n:a.default,"top")}updateOutMode(t,i,e,s){for(const o of this.updaters)o.update(t,s,i,e)}}class Fi extends hi{constructor(t,i,e,s){super(t,i,e),this.canvasSize=s,this.canvasSize=Object.assign({},s)}contains(t){if(super.contains(t))return!0;const i={x:t.x-this.canvasSize.width,y:t.y};if(super.contains(i))return!0;const e={x:t.x-this.canvasSize.width,y:t.y-this.canvasSize.height};if(super.contains(e))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 i=t,e=t,s={x:t.position.x-this.canvasSize.width,y:t.position.y-this.canvasSize.height};if(void 0!==e.radius){const t=new hi(s.x,s.y,2*e.radius);return super.intersects(t)}if(void 0!==i.size){const t=new di(s.x,s.y,2*i.size.width,2*i.size.height);return super.intersects(t)}return!1}}class Ai{constructor(){this.blur=5,this.color=new ot,this.color.value="#000",this.enable=!1}load(t){t&&(void 0!==t.blur&&(this.blur=t.blur),this.color=ot.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable))}}class Vi{constructor(){this.enable=!1,this.frequency=1}load(t){t&&(void 0!==t.color&&(this.color=ot.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 qi{constructor(){this.blink=!1,this.color=new ot,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new Ai,this.triangles=new Vi,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=ot.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))}}function Wi(t,i,e,s,o){let n=f(t,i);if(!o||n<=e)return n;if(n=f(t,{x:i.x-s.width,y:i.y}),n<=e)return n;if(n=f(t,{x:i.x-s.width,y:i.y-s.height}),n<=e)return n;return n=f(t,{x:i.x,y:i.y-s.height}),n}class Ui extends _i{constructor(t){super(t),this.linkContainer=t}clear(){}init(){this.linkContainer.particles.linksColor=void 0,this.linkContainer.particles.linksColors=new Map}async interact(t){var i;if(!t.options.links)return;t.links=[];const e=t.getPosition(),s=this.container,o=s.canvas.size;if(e.x<0||e.y<0||e.x>o.width||e.y>o.height)return;const n=t.options.links,a=n.opacity,r=null!==(i=t.retina.linksDistance)&&void 0!==i?i:0,l=n.warp,c=l?new Fi(e.x,e.y,r,o):new hi(e.x,e.y,r),h=s.particles.quadTree.query(c);for(const i of h){const s=i.options.links;if(t===i||!(null==s?void 0:s.enable)||n.id!==s.id||i.spawning||i.destroyed||!i.links||-1!==t.links.map((t=>t.destination)).indexOf(i)||-1!==i.links.map((t=>t.destination)).indexOf(t))continue;const c=i.getPosition();if(c.x<0||c.y<0||c.x>o.width||c.y>o.height)continue;const h=Wi(e,c,r,o,l&&s.warp);if(h>r)return;const d=(1-h/r)*a;this.setColor(t),t.links.push({destination:i,opacity:d})}}isEnabled(t){var i;return!!(null===(i=t.options.links)||void 0===i?void 0:i.enable)}loadParticlesOptions(t,...i){var e,s;t.links||(t.links=new qi);for(const o of i)t.links.load(null!==(s=null!==(e=null==o?void 0:o.links)&&void 0!==e?e:null==o?void 0:o.lineLinked)&&void 0!==s?s:null==o?void 0:o.line_linked)}reset(){}setColor(t){if(!t.options.links)return;const i=this.linkContainer,e=t.options.links;let s=void 0===e.id?i.particles.linksColor:i.particles.linksColors.get(e.id);if(s)return;s=function(t,i,e){const s="string"==typeof t?t:t.value;return s===O?e?L({value:s}):i?O:S:s===S?S:L({value:s})}(e.color,e.blink,e.consent),void 0===e.id?i.particles.linksColor=s:i.particles.linksColors.set(e.id,s)}}function Bi(t,i){const e=((s=t.map((t=>t.id))).sort(((t,i)=>t-i)),s.join("_"));var s;let o=i.get(e);return void 0===o&&(o=n(),i.set(e,o)),o}class Hi{constructor(t){this.container=t,this._freqs={links:new Map,triangles:new Map}}drawParticle(t,i){var e;const s=i.options;if(!i.links||i.links.length<=0)return;const o=i.links.filter((t=>s.links&&this.getLinkFrequency(i,t.destination)<=s.links.frequency));for(const t of o)this.drawTriangles(s,i,t,o),t.opacity>0&&(null!==(e=i.retina.linksWidth)&&void 0!==e?e:0)>0&&this.drawLinkLine(i,t)}async init(){this._freqs.links=new Map,this._freqs.triangles=new Map}particleCreated(t){if(t.links=[],!t.options.links)return;const i=this.container.retina.pixelRatio;t.retina.linksDistance=t.options.links.distance*i,t.retina.linksWidth=t.options.links.width*i}particleDestroyed(t){t.links=[]}drawLinkLine(t,i){const e=this.container,s=e.actualOptions,o=i.destination,a=t.getPosition(),r=o.getPosition();let l=i.opacity;e.canvas.draw((i=>{var h,d,u;if(!t.options.links)return;let p;const y=null===(h=t.options.twinkle)||void 0===h?void 0:h.lines;if(null==y?void 0:y.enable){const t=y.frequency,i=L(y.color);n()<t&&i&&(p=i,l=c(y.opacity))}if(!p){const i=t.options.links,s=void 0!==(null==i?void 0:i.id)?e.particles.linksColors.get(i.id):e.particles.linksColor;p=B(t,o,s)}if(!p)return;const m=null!==(d=t.retina.linksWidth)&&void 0!==d?d:0,g=null!==(u=t.retina.linksDistance)&&void 0!==u?u:0;!function(t,i,e,s,o,n,a,r,l,c,h,d){let u=!1;if(f(e,s)<=o)Y(t,e,s),u=!0;else if(a){let i,a;const r=v(e,{x:s.x-n.width,y:s.y});if(r.distance<=o){const t=e.y-r.dy/r.dx*e.x;i={x:0,y:t},a={x:n.width,y:t}}else{const t=v(e,{x:s.x,y:s.y-n.height});if(t.distance<=o){const s=-(e.y-t.dy/t.dx*e.x)/(t.dy/t.dx);i={x:s,y:0},a={x:s,y:n.height}}else{const t=v(e,{x:s.x-n.width,y:s.y-n.height});if(t.distance<=o){const s=e.y-t.dy/t.dx*e.x;i={x:-s/(t.dy/t.dx),y:s},a={x:i.x+n.width,y:i.y+n.height}}}}i&&a&&(Y(t,e,i),Y(t,s,a),u=!0)}if(u){if(t.lineWidth=i,r&&(t.globalCompositeOperation=l),t.strokeStyle=W(c,h),d.enable){const i=L(d.color);i&&(t.shadowBlur=d.blur,t.shadowColor=W(i))}t.stroke()}}(i,m,a,r,g,e.canvas.size,t.options.links.warp,s.backgroundMask.enable,s.backgroundMask.composite,p,l,t.options.links.shadow)}))}drawLinkTriangle(t,i,e){var s;if(!t.options.links)return;const o=this.container,n=o.actualOptions,a=i.destination,r=e.destination,l=t.options.links.triangles,c=null!==(s=l.opacity)&&void 0!==s?s:(i.opacity+e.opacity)/2;c<=0||o.canvas.draw((i=>{var e;const s=t.getPosition(),h=a.getPosition(),d=r.getPosition(),u=null!==(e=t.retina.linksDistance)&&void 0!==e?e:0;if(f(s,h)>u||f(d,h)>u||f(d,s)>u)return;let p=L(l.color);if(!p){const i=t.options.links,e=void 0!==(null==i?void 0:i.id)?o.particles.linksColors.get(i.id):o.particles.linksColor;p=B(t,a,e)}p&&function(t,i,e,s,o,n,a,r){!function(t,i,e,s){t.beginPath(),t.moveTo(i.x,i.y),t.lineTo(e.x,e.y),t.lineTo(s.x,s.y),t.closePath()}(t,i,e,s),o&&(t.globalCompositeOperation=n),t.fillStyle=W(a,r),t.fill()}(i,s,h,d,n.backgroundMask.enable,n.backgroundMask.composite,p,c)}))}drawTriangles(t,i,e,s){var o,n,a;const r=e.destination;if(!(null===(o=t.links)||void 0===o?void 0:o.triangles.enable)||!(null===(n=r.options.links)||void 0===n?void 0:n.triangles.enable))return;const l=null===(a=r.links)||void 0===a?void 0:a.filter((t=>{const i=this.getLinkFrequency(r,t.destination);return r.options.links&&i<=r.options.links.frequency&&s.findIndex((i=>i.destination===t.destination))>=0}));if(null==l?void 0:l.length)for(const s of l){const o=s.destination;this.getTriangleFrequency(i,r,o)>t.links.triangles.frequency||this.drawLinkTriangle(i,e,s)}}getLinkFrequency(t,i){return Bi([t,i],this._freqs.links)}getTriangleFrequency(t,i,e){return Bi([t,i,e],this._freqs.triangles)}}class ji{constructor(){this.id="links"}getPlugin(t){return new Hi(t)}loadOptions(){}needsPlugin(){return!0}}async function Gi(t){await async function(t){await t.addInteractor("particlesLinks",(t=>new Ui(t)))}(t),await async function(t){const i=new ji;await t.addPlugin(i)}(t)}class Xi{init(t){var i;const e=t.container,s=t.options.size.animation;s.enable&&(t.size.velocity=(null!==(i=t.retina.sizeAnimationSpeed)&&void 0!==i?i:e.retina.sizeAnimationSpeed)/100*e.retina.reduceFactor,s.sync||(t.size.velocity*=n()))}isEnabled(t){var i,e,s,o;return!t.destroyed&&!t.spawning&&t.size.enable&&((null!==(i=t.size.maxLoops)&&void 0!==i?i:0)<=0||(null!==(e=t.size.maxLoops)&&void 0!==e?e:0)>0&&(null!==(s=t.size.loops)&&void 0!==s?s:0)<(null!==(o=t.size.maxLoops)&&void 0!==o?o:0))}reset(t){t.size.loops=0}update(t,i){this.isEnabled(t)&&function(t,i){var e,s,o,n,r;const l=(null!==(e=t.size.velocity)&&void 0!==e?e:0)*i.factor,c=t.size.min,h=t.size.max,d=null!==(s=t.size.decay)&&void 0!==s?s:1;if(!(t.destroyed||!t.size.enable||(null!==(o=t.size.maxLoops)&&void 0!==o?o:0)>0&&(null!==(n=t.size.loops)&&void 0!==n?n:0)>(null!==(r=t.size.maxLoops)&&void 0!==r?r:0))){switch(t.size.status){case"increasing":t.size.value>=h?(t.size.status="decreasing",t.size.loops||(t.size.loops=0),t.size.loops++):t.size.value+=l;break;case"decreasing":t.size.value<=c?(t.size.status="increasing",t.size.loops||(t.size.loops=0),t.size.loops++):t.size.value-=l}t.size.velocity&&1!==d&&(t.size.velocity*=d),function(t,i,e,s){switch(t.options.size.animation.destroy){case"max":i>=s&&t.destroy();break;case"min":i<=e&&t.destroy()}}(t,t.size.value,c,h),t.destroyed||(t.size.value=a(t.size.value,c,h))}}(t,i)}}const Yi={background:{color:"#000000"},particles:{links:{distance:125,enable:!0,triangles:{enable:!0,opacity:.1}},move:{enable:!0,speed:5},size:{value:1},shape:{type:"circle"}}};async function $i(t){await async function(t){t.addMover("base",(()=>new Pi))}(t),await async function(t){await t.addShape("circle",new Ci)}(t),await async function(t){await t.addParticleUpdater("color",(t=>new Si(t)))}(t),await Gi(t),await async function(t){await t.addParticleUpdater("outModes",(t=>new Ei(t)))}(t),await async function(t){await t.addParticleUpdater("opacity",(t=>new Ti(t)))}(t),await async function(t){await t.addParticleUpdater("size",(()=>new Xi))}(t),await t.addPreset("triangles",Yi)}return(async()=>{await $i(Mi)})(),i})()));
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v3.0.0-alpha.1
|
|
8
|
+
*/
|
|
9
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
11
|
+
module.exports = factory(require("@tsparticles/move-base"), require("@tsparticles/shape-circle"), require("@tsparticles/updater-color"), require("@tsparticles/updater-opacity"), require("@tsparticles/updater-out-modes"), require("@tsparticles/interaction-particles-links"), require("@tsparticles/updater-size"));
|
|
12
|
+
else if(typeof define === 'function' && define.amd)
|
|
13
|
+
define(["@tsparticles/move-base", "@tsparticles/shape-circle", "@tsparticles/updater-color", "@tsparticles/updater-opacity", "@tsparticles/updater-out-modes", "@tsparticles/interaction-particles-links", "@tsparticles/updater-size"], factory);
|
|
14
|
+
else {
|
|
15
|
+
var a = typeof exports === 'object' ? factory(require("@tsparticles/move-base"), require("@tsparticles/shape-circle"), require("@tsparticles/updater-color"), require("@tsparticles/updater-opacity"), require("@tsparticles/updater-out-modes"), require("@tsparticles/interaction-particles-links"), require("@tsparticles/updater-size")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
|
|
16
|
+
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
17
|
+
}
|
|
18
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE__619__, __WEBPACK_EXTERNAL_MODULE__163__, __WEBPACK_EXTERNAL_MODULE__501__, __WEBPACK_EXTERNAL_MODULE__686__, __WEBPACK_EXTERNAL_MODULE__290__, __WEBPACK_EXTERNAL_MODULE__164__, __WEBPACK_EXTERNAL_MODULE__2__) => {
|
|
19
|
+
return /******/ (() => { // webpackBootstrap
|
|
20
|
+
/******/ "use strict";
|
|
21
|
+
/******/ var __webpack_modules__ = ({
|
|
22
|
+
|
|
23
|
+
/***/ 164:
|
|
24
|
+
/***/ ((module) => {
|
|
25
|
+
|
|
26
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__164__;
|
|
27
|
+
|
|
28
|
+
/***/ }),
|
|
29
|
+
|
|
30
|
+
/***/ 619:
|
|
31
|
+
/***/ ((module) => {
|
|
32
|
+
|
|
33
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__619__;
|
|
34
|
+
|
|
35
|
+
/***/ }),
|
|
36
|
+
|
|
37
|
+
/***/ 163:
|
|
38
|
+
/***/ ((module) => {
|
|
39
|
+
|
|
40
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__163__;
|
|
41
|
+
|
|
42
|
+
/***/ }),
|
|
43
|
+
|
|
44
|
+
/***/ 501:
|
|
45
|
+
/***/ ((module) => {
|
|
46
|
+
|
|
47
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__501__;
|
|
48
|
+
|
|
49
|
+
/***/ }),
|
|
50
|
+
|
|
51
|
+
/***/ 686:
|
|
52
|
+
/***/ ((module) => {
|
|
53
|
+
|
|
54
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__686__;
|
|
55
|
+
|
|
56
|
+
/***/ }),
|
|
57
|
+
|
|
58
|
+
/***/ 290:
|
|
59
|
+
/***/ ((module) => {
|
|
60
|
+
|
|
61
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__290__;
|
|
62
|
+
|
|
63
|
+
/***/ }),
|
|
64
|
+
|
|
65
|
+
/***/ 2:
|
|
66
|
+
/***/ ((module) => {
|
|
67
|
+
|
|
68
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__2__;
|
|
69
|
+
|
|
70
|
+
/***/ })
|
|
71
|
+
|
|
72
|
+
/******/ });
|
|
73
|
+
/************************************************************************/
|
|
74
|
+
/******/ // The module cache
|
|
75
|
+
/******/ var __webpack_module_cache__ = {};
|
|
76
|
+
/******/
|
|
77
|
+
/******/ // The require function
|
|
78
|
+
/******/ function __webpack_require__(moduleId) {
|
|
79
|
+
/******/ // Check if module is in cache
|
|
80
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
81
|
+
/******/ if (cachedModule !== undefined) {
|
|
82
|
+
/******/ return cachedModule.exports;
|
|
83
|
+
/******/ }
|
|
84
|
+
/******/ // Create a new module (and put it into the cache)
|
|
85
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
86
|
+
/******/ // no module.id needed
|
|
87
|
+
/******/ // no module.loaded needed
|
|
88
|
+
/******/ exports: {}
|
|
89
|
+
/******/ };
|
|
90
|
+
/******/
|
|
91
|
+
/******/ // Execute the module function
|
|
92
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
93
|
+
/******/
|
|
94
|
+
/******/ // Return the exports of the module
|
|
95
|
+
/******/ return module.exports;
|
|
96
|
+
/******/ }
|
|
97
|
+
/******/
|
|
98
|
+
/************************************************************************/
|
|
99
|
+
/******/ /* webpack/runtime/define property getters */
|
|
100
|
+
/******/ (() => {
|
|
101
|
+
/******/ // define getter functions for harmony exports
|
|
102
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
103
|
+
/******/ for(var key in definition) {
|
|
104
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
105
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
106
|
+
/******/ }
|
|
107
|
+
/******/ }
|
|
108
|
+
/******/ };
|
|
109
|
+
/******/ })();
|
|
110
|
+
/******/
|
|
111
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
112
|
+
/******/ (() => {
|
|
113
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
114
|
+
/******/ })();
|
|
115
|
+
/******/
|
|
116
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
117
|
+
/******/ (() => {
|
|
118
|
+
/******/ // define __esModule on exports
|
|
119
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
120
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
121
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
122
|
+
/******/ }
|
|
123
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
124
|
+
/******/ };
|
|
125
|
+
/******/ })();
|
|
126
|
+
/******/
|
|
127
|
+
/************************************************************************/
|
|
128
|
+
var __webpack_exports__ = {};
|
|
129
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
130
|
+
(() => {
|
|
131
|
+
// ESM COMPAT FLAG
|
|
132
|
+
__webpack_require__.r(__webpack_exports__);
|
|
133
|
+
|
|
134
|
+
// EXPORTS
|
|
135
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
136
|
+
"loadTrianglesPreset": () => (/* binding */ loadTrianglesPreset)
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/move-base","commonjs2":"@tsparticles/move-base","amd":"@tsparticles/move-base","root":"window"}
|
|
140
|
+
var move_base_root_window_ = __webpack_require__(619);
|
|
141
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-circle","commonjs2":"@tsparticles/shape-circle","amd":"@tsparticles/shape-circle","root":"window"}
|
|
142
|
+
var shape_circle_root_window_ = __webpack_require__(163);
|
|
143
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-color","commonjs2":"@tsparticles/updater-color","amd":"@tsparticles/updater-color","root":"window"}
|
|
144
|
+
var updater_color_root_window_ = __webpack_require__(501);
|
|
145
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-opacity","commonjs2":"@tsparticles/updater-opacity","amd":"@tsparticles/updater-opacity","root":"window"}
|
|
146
|
+
var updater_opacity_root_window_ = __webpack_require__(686);
|
|
147
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-out-modes","commonjs2":"@tsparticles/updater-out-modes","amd":"@tsparticles/updater-out-modes","root":"window"}
|
|
148
|
+
var updater_out_modes_root_window_ = __webpack_require__(290);
|
|
149
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/interaction-particles-links","commonjs2":"@tsparticles/interaction-particles-links","amd":"@tsparticles/interaction-particles-links","root":"window"}
|
|
150
|
+
var interaction_particles_links_root_window_ = __webpack_require__(164);
|
|
151
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-size","commonjs2":"@tsparticles/updater-size","amd":"@tsparticles/updater-size","root":"window"}
|
|
152
|
+
var updater_size_root_window_ = __webpack_require__(2);
|
|
153
|
+
;// CONCATENATED MODULE: ./dist/browser/options.js
|
|
154
|
+
const options = {
|
|
155
|
+
background: {
|
|
156
|
+
color: "#000000"
|
|
157
|
+
},
|
|
158
|
+
particles: {
|
|
159
|
+
links: {
|
|
160
|
+
distance: 125,
|
|
161
|
+
enable: true,
|
|
162
|
+
triangles: {
|
|
163
|
+
enable: true,
|
|
164
|
+
opacity: 0.1
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
move: {
|
|
168
|
+
enable: true,
|
|
169
|
+
speed: 5
|
|
170
|
+
},
|
|
171
|
+
size: {
|
|
172
|
+
value: 1
|
|
173
|
+
},
|
|
174
|
+
shape: {
|
|
175
|
+
type: "circle"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
;// CONCATENATED MODULE: ./dist/browser/index.js
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
async function loadTrianglesPreset(engine) {
|
|
189
|
+
await (0,move_base_root_window_.loadBaseMover)(engine);
|
|
190
|
+
await (0,shape_circle_root_window_.loadCircleShape)(engine);
|
|
191
|
+
await (0,updater_color_root_window_.loadColorUpdater)(engine);
|
|
192
|
+
await (0,interaction_particles_links_root_window_.loadParticlesLinksInteraction)(engine);
|
|
193
|
+
await (0,updater_out_modes_root_window_.loadOutModesUpdater)(engine);
|
|
194
|
+
await (0,updater_opacity_root_window_.loadOpacityUpdater)(engine);
|
|
195
|
+
await (0,updater_size_root_window_.loadSizeUpdater)(engine);
|
|
196
|
+
await engine.addPreset("triangles", options);
|
|
197
|
+
}
|
|
198
|
+
})();
|
|
199
|
+
|
|
200
|
+
/******/ return __webpack_exports__;
|
|
201
|
+
/******/ })()
|
|
202
|
+
;
|
|
203
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see tsparticles.preset.triangles.min.js.LICENSE.txt */
|
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/move-base"),require("@tsparticles/shape-circle"),require("@tsparticles/updater-color"),require("@tsparticles/updater-opacity"),require("@tsparticles/updater-out-modes"),require("@tsparticles/interaction-particles-links"),require("@tsparticles/updater-size"));else if("function"==typeof define&&define.amd)define(["@tsparticles/move-base","@tsparticles/shape-circle","@tsparticles/updater-color","@tsparticles/updater-opacity","@tsparticles/updater-out-modes","@tsparticles/interaction-particles-links","@tsparticles/updater-size"],t);else{var r="object"==typeof exports?t(require("@tsparticles/move-base"),require("@tsparticles/shape-circle"),require("@tsparticles/updater-color"),require("@tsparticles/updater-opacity"),require("@tsparticles/updater-out-modes"),require("@tsparticles/interaction-particles-links"),require("@tsparticles/updater-size")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var a in r)("object"==typeof exports?exports:e)[a]=r[a]}}(this,((e,t,r,a,i,s,o)=>(()=>{"use strict";var p={164:e=>{e.exports=s},619:t=>{t.exports=e},163:e=>{e.exports=t},501:e=>{e.exports=r},686:e=>{e.exports=a},290:e=>{e.exports=i},2:e=>{e.exports=o}},l={};function c(e){var t=l[e];if(void 0!==t)return t.exports;var r=l[e]={exports:{}};return p[e](r,r.exports,c),r.exports}c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return(()=>{c.r(d),c.d(d,{loadTrianglesPreset:()=>l});var e=c(619),t=c(163),r=c(501),a=c(686),i=c(290),s=c(164),o=c(2);const p={background:{color:"#000000"},particles:{links:{distance:125,enable:!0,triangles:{enable:!0,opacity:.1}},move:{enable:!0,speed:5},size:{value:1},shape:{type:"circle"}}};async function l(l){await(0,e.loadBaseMover)(l),await(0,t.loadCircleShape)(l),await(0,r.loadColorUpdater)(l),await(0,s.loadParticlesLinksInteraction)(l),await(0,i.loadOutModesUpdater)(l),await(0,a.loadOpacityUpdater)(l),await(0,o.loadSizeUpdater)(l),await l.addPreset("triangles",p)}})(),d})()));
|
package/types/index.d.ts
ADDED
package/umd/bundle.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports", ".", "@tsparticles/engine"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.tsParticles = exports.loadTrianglesPreset = void 0;
|
|
13
|
+
const _1 = require(".");
|
|
14
|
+
Object.defineProperty(exports, "loadTrianglesPreset", { enumerable: true, get: function () { return _1.loadTrianglesPreset; } });
|
|
15
|
+
const engine_1 = require("@tsparticles/engine");
|
|
16
|
+
Object.defineProperty(exports, "tsParticles", { enumerable: true, get: function () { return engine_1.tsParticles; } });
|
|
17
|
+
(async () => {
|
|
18
|
+
await (0, _1.loadTrianglesPreset)(engine_1.tsParticles);
|
|
19
|
+
})();
|
|
20
|
+
});
|
package/umd/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports", "@tsparticles/move-base", "@tsparticles/shape-circle", "@tsparticles/updater-color", "@tsparticles/updater-opacity", "@tsparticles/updater-out-modes", "@tsparticles/interaction-particles-links", "@tsparticles/updater-size", "./options"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.loadTrianglesPreset = void 0;
|
|
13
|
+
const move_base_1 = require("@tsparticles/move-base");
|
|
14
|
+
const shape_circle_1 = require("@tsparticles/shape-circle");
|
|
15
|
+
const updater_color_1 = require("@tsparticles/updater-color");
|
|
16
|
+
const updater_opacity_1 = require("@tsparticles/updater-opacity");
|
|
17
|
+
const updater_out_modes_1 = require("@tsparticles/updater-out-modes");
|
|
18
|
+
const interaction_particles_links_1 = require("@tsparticles/interaction-particles-links");
|
|
19
|
+
const updater_size_1 = require("@tsparticles/updater-size");
|
|
20
|
+
const options_1 = require("./options");
|
|
21
|
+
async function loadTrianglesPreset(engine) {
|
|
22
|
+
await (0, move_base_1.loadBaseMover)(engine);
|
|
23
|
+
await (0, shape_circle_1.loadCircleShape)(engine);
|
|
24
|
+
await (0, updater_color_1.loadColorUpdater)(engine);
|
|
25
|
+
await (0, interaction_particles_links_1.loadParticlesLinksInteraction)(engine);
|
|
26
|
+
await (0, updater_out_modes_1.loadOutModesUpdater)(engine);
|
|
27
|
+
await (0, updater_opacity_1.loadOpacityUpdater)(engine);
|
|
28
|
+
await (0, updater_size_1.loadSizeUpdater)(engine);
|
|
29
|
+
await engine.addPreset("triangles", options_1.options);
|
|
30
|
+
}
|
|
31
|
+
exports.loadTrianglesPreset = loadTrianglesPreset;
|
|
32
|
+
});
|
package/umd/options.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.options = void 0;
|
|
13
|
+
exports.options = {
|
|
14
|
+
background: {
|
|
15
|
+
color: "#000000",
|
|
16
|
+
},
|
|
17
|
+
particles: {
|
|
18
|
+
links: {
|
|
19
|
+
distance: 125,
|
|
20
|
+
enable: true,
|
|
21
|
+
triangles: {
|
|
22
|
+
enable: true,
|
|
23
|
+
opacity: 0.1,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
move: {
|
|
27
|
+
enable: true,
|
|
28
|
+
speed: 5,
|
|
29
|
+
},
|
|
30
|
+
size: {
|
|
31
|
+
value: 1,
|
|
32
|
+
},
|
|
33
|
+
shape: {
|
|
34
|
+
type: "circle",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
});
|