@tsparticles/confetti 4.2.0 → 4.2.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.
@@ -17,7 +17,7 @@ import { loadWobbleUpdater } from "@tsparticles/updater-wobble";
17
17
  import { setConfetti } from "./utils.js";
18
18
  let initPromise = null;
19
19
  async function doInitPlugins(engine) {
20
- engine.checkVersion("4.2.0");
20
+ engine.checkVersion("4.2.1");
21
21
  await engine.pluginManager.register(async (e) => {
22
22
  await Promise.all([
23
23
  loadBasic(e),
@@ -90,5 +90,5 @@ confetti.create = async (canvas, options = {}) => {
90
90
  confetti.init = async () => {
91
91
  await initPlugins(tsParticles);
92
92
  };
93
- confetti.version = "4.2.0";
93
+ confetti.version = "4.2.1";
94
94
  globalThis.confetti = confetti;
@@ -2,7 +2,7 @@ import { isString, tsParticles } from "@tsparticles/engine/lazy";
2
2
  import { setConfetti } from "./utils.js";
3
3
  let initPromise = null;
4
4
  async function doInitPlugins(engine) {
5
- engine.checkVersion("4.2.0");
5
+ engine.checkVersion("4.2.1");
6
6
  await engine.pluginManager.register(async (e) => {
7
7
  const [{ loadBasic }, { loadEmittersPluginSimple }, { loadMotionPlugin }, { loadCardSuitsShape }, { loadEmojiShape }, { loadHeartShape }, { loadImageShape }, { loadPolygonShape }, { loadSquareShape }, { loadStarShape }, { loadRotateUpdater }, { loadLifeUpdater }, { loadRollUpdater }, { loadTiltUpdater }, { loadWobbleUpdater },] = await Promise.all([
8
8
  import("@tsparticles/basic/lazy"),
@@ -92,5 +92,5 @@ confetti.create = async (canvas, options = {}) => {
92
92
  confetti.init = async () => {
93
93
  await initPlugins(tsParticles);
94
94
  };
95
- confetti.version = "4.2.0";
95
+ confetti.version = "4.2.1";
96
96
  globalThis.confetti = confetti;
package/cjs/confetti.js CHANGED
@@ -17,7 +17,7 @@ import { loadWobbleUpdater } from "@tsparticles/updater-wobble";
17
17
  import { setConfetti } from "./utils.js";
18
18
  let initPromise = null;
19
19
  async function doInitPlugins(engine) {
20
- engine.checkVersion("4.2.0");
20
+ engine.checkVersion("4.2.1");
21
21
  await engine.pluginManager.register(async (e) => {
22
22
  await Promise.all([
23
23
  loadBasic(e),
@@ -90,5 +90,5 @@ confetti.create = async (canvas, options = {}) => {
90
90
  confetti.init = async () => {
91
91
  await initPlugins(tsParticles);
92
92
  };
93
- confetti.version = "4.2.0";
93
+ confetti.version = "4.2.1";
94
94
  globalThis.confetti = confetti;
@@ -2,7 +2,7 @@ import { isString, tsParticles } from "@tsparticles/engine/lazy";
2
2
  import { setConfetti } from "./utils.js";
3
3
  let initPromise = null;
4
4
  async function doInitPlugins(engine) {
5
- engine.checkVersion("4.2.0");
5
+ engine.checkVersion("4.2.1");
6
6
  await engine.pluginManager.register(async (e) => {
7
7
  const [{ loadBasic }, { loadEmittersPluginSimple }, { loadMotionPlugin }, { loadCardSuitsShape }, { loadEmojiShape }, { loadHeartShape }, { loadImageShape }, { loadPolygonShape }, { loadSquareShape }, { loadStarShape }, { loadRotateUpdater }, { loadLifeUpdater }, { loadRollUpdater }, { loadTiltUpdater }, { loadWobbleUpdater },] = await Promise.all([
8
8
  import("@tsparticles/basic/lazy"),
@@ -92,5 +92,5 @@ confetti.create = async (canvas, options = {}) => {
92
92
  confetti.init = async () => {
93
93
  await initPlugins(tsParticles);
94
94
  };
95
- confetti.version = "4.2.0";
95
+ confetti.version = "4.2.1";
96
96
  globalThis.confetti = confetti;
package/esm/confetti.js CHANGED
@@ -17,7 +17,7 @@ import { loadWobbleUpdater } from "@tsparticles/updater-wobble";
17
17
  import { setConfetti } from "./utils.js";
18
18
  let initPromise = null;
19
19
  async function doInitPlugins(engine) {
20
- engine.checkVersion("4.2.0");
20
+ engine.checkVersion("4.2.1");
21
21
  await engine.pluginManager.register(async (e) => {
22
22
  await Promise.all([
23
23
  loadBasic(e),
@@ -90,5 +90,5 @@ confetti.create = async (canvas, options = {}) => {
90
90
  confetti.init = async () => {
91
91
  await initPlugins(tsParticles);
92
92
  };
93
- confetti.version = "4.2.0";
93
+ confetti.version = "4.2.1";
94
94
  globalThis.confetti = confetti;
@@ -2,7 +2,7 @@ import { isString, tsParticles } from "@tsparticles/engine/lazy";
2
2
  import { setConfetti } from "./utils.js";
3
3
  let initPromise = null;
4
4
  async function doInitPlugins(engine) {
5
- engine.checkVersion("4.2.0");
5
+ engine.checkVersion("4.2.1");
6
6
  await engine.pluginManager.register(async (e) => {
7
7
  const [{ loadBasic }, { loadEmittersPluginSimple }, { loadMotionPlugin }, { loadCardSuitsShape }, { loadEmojiShape }, { loadHeartShape }, { loadImageShape }, { loadPolygonShape }, { loadSquareShape }, { loadStarShape }, { loadRotateUpdater }, { loadLifeUpdater }, { loadRollUpdater }, { loadTiltUpdater }, { loadWobbleUpdater },] = await Promise.all([
8
8
  import("@tsparticles/basic/lazy"),
@@ -92,5 +92,5 @@ confetti.create = async (canvas, options = {}) => {
92
92
  confetti.init = async () => {
93
93
  await initPlugins(tsParticles);
94
94
  };
95
- confetti.version = "4.2.0";
95
+ confetti.version = "4.2.1";
96
96
  globalThis.confetti = confetti;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/confetti",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "description": "tsParticles confetti bundle — easily create confetti, confetti cannon, confetti explosions, confetti falling, and confetti parade animations with presets. Ready to use components available for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -105,22 +105,22 @@
105
105
  "./package.json": "./package.json"
106
106
  },
107
107
  "dependencies": {
108
- "@tsparticles/basic": "4.2.0",
109
- "@tsparticles/engine": "4.2.0",
110
- "@tsparticles/plugin-emitters": "4.2.0",
111
- "@tsparticles/plugin-motion": "4.2.0",
112
- "@tsparticles/shape-cards": "4.2.0",
113
- "@tsparticles/shape-emoji": "4.2.0",
114
- "@tsparticles/shape-heart": "4.2.0",
115
- "@tsparticles/shape-image": "4.2.0",
116
- "@tsparticles/shape-polygon": "4.2.0",
117
- "@tsparticles/shape-square": "4.2.0",
118
- "@tsparticles/shape-star": "4.2.0",
119
- "@tsparticles/updater-life": "4.2.0",
120
- "@tsparticles/updater-roll": "4.2.0",
121
- "@tsparticles/updater-rotate": "4.2.0",
122
- "@tsparticles/updater-tilt": "4.2.0",
123
- "@tsparticles/updater-wobble": "4.2.0"
108
+ "@tsparticles/basic": "4.2.1",
109
+ "@tsparticles/engine": "4.2.1",
110
+ "@tsparticles/plugin-emitters": "4.2.1",
111
+ "@tsparticles/plugin-motion": "4.2.1",
112
+ "@tsparticles/shape-cards": "4.2.1",
113
+ "@tsparticles/shape-emoji": "4.2.1",
114
+ "@tsparticles/shape-heart": "4.2.1",
115
+ "@tsparticles/shape-image": "4.2.1",
116
+ "@tsparticles/shape-polygon": "4.2.1",
117
+ "@tsparticles/shape-square": "4.2.1",
118
+ "@tsparticles/shape-star": "4.2.1",
119
+ "@tsparticles/updater-life": "4.2.1",
120
+ "@tsparticles/updater-roll": "4.2.1",
121
+ "@tsparticles/updater-rotate": "4.2.1",
122
+ "@tsparticles/updater-tilt": "4.2.1",
123
+ "@tsparticles/updater-wobble": "4.2.1"
124
124
  },
125
125
  "publishConfig": {
126
126
  "access": "public"
@@ -1,5 +1,5 @@
1
1
  (function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
2
- /* tsParticles v4.2.0 */
2
+ /* tsParticles v4.2.1 */
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
5
5
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -879,7 +879,7 @@
879
879
  return this.#domArray;
880
880
  }
881
881
  get version() {
882
- return "4.2.0";
882
+ return "4.2.1";
883
883
  }
884
884
  addEventListener(type, listener) {
885
885
  this.#eventDispatcher.addEventListener(type, listener);
@@ -2220,7 +2220,7 @@
2220
2220
  }
2221
2221
 
2222
2222
  async function loadBlendPlugin(engine) {
2223
- engine.checkVersion("4.2.0");
2223
+ engine.checkVersion("4.2.1");
2224
2224
  await engine.pluginManager.register(e => {
2225
2225
  e.pluginManager.addPlugin(new BlendPlugin());
2226
2226
  });
@@ -2257,7 +2257,7 @@
2257
2257
  }
2258
2258
 
2259
2259
  async function loadCircleShape(engine) {
2260
- engine.checkVersion("4.2.0");
2260
+ engine.checkVersion("4.2.1");
2261
2261
  await engine.pluginManager.register(e => {
2262
2262
  e.pluginManager.addShape(["circle"], () => {
2263
2263
  return Promise.resolve(new CircleDrawer());
@@ -2305,7 +2305,7 @@
2305
2305
  }
2306
2306
 
2307
2307
  async function loadHexColorPlugin(engine) {
2308
- engine.checkVersion("4.2.0");
2308
+ engine.checkVersion("4.2.1");
2309
2309
  await engine.pluginManager.register(e => {
2310
2310
  e.pluginManager.addColorManager("hex", new HexColorManager());
2311
2311
  });
@@ -2358,7 +2358,7 @@
2358
2358
  }
2359
2359
 
2360
2360
  async function loadHslColorPlugin(engine) {
2361
- engine.checkVersion("4.2.0");
2361
+ engine.checkVersion("4.2.1");
2362
2362
  await engine.pluginManager.register(e => {
2363
2363
  e.pluginManager.addColorManager("hsl", new HslColorManager());
2364
2364
  });
@@ -2382,7 +2382,7 @@
2382
2382
  }
2383
2383
 
2384
2384
  async function loadMovePlugin(engine) {
2385
- engine.checkVersion("4.2.0");
2385
+ engine.checkVersion("4.2.1");
2386
2386
  await engine.pluginManager.register(e => {
2387
2387
  const moveEngine = e, movePluginManager = moveEngine.pluginManager;
2388
2388
  movePluginManager.initializers.pathGenerators ??= new Map();
@@ -2598,7 +2598,7 @@
2598
2598
  }
2599
2599
 
2600
2600
  async function loadOpacityUpdater(engine) {
2601
- engine.checkVersion("4.2.0");
2601
+ engine.checkVersion("4.2.1");
2602
2602
  await engine.pluginManager.register(e => {
2603
2603
  e.pluginManager.addParticleUpdater("opacity", container => {
2604
2604
  return Promise.resolve(new OpacityUpdater(container));
@@ -2943,7 +2943,7 @@
2943
2943
  }
2944
2944
 
2945
2945
  async function loadOutModesUpdater(engine) {
2946
- engine.checkVersion("4.2.0");
2946
+ engine.checkVersion("4.2.1");
2947
2947
  await engine.pluginManager.register(e => {
2948
2948
  e.pluginManager.addParticleUpdater("outModes", container => {
2949
2949
  return Promise.resolve(new OutOfCanvasUpdater(container));
@@ -3014,7 +3014,7 @@
3014
3014
  }
3015
3015
 
3016
3016
  async function loadPaintUpdater(engine) {
3017
- engine.checkVersion("4.2.0");
3017
+ engine.checkVersion("4.2.1");
3018
3018
  await engine.pluginManager.register(e => {
3019
3019
  e.pluginManager.addParticleUpdater("paint", container => {
3020
3020
  return Promise.resolve(new PaintUpdater(e.pluginManager, container));
@@ -3069,7 +3069,7 @@
3069
3069
  }
3070
3070
 
3071
3071
  async function loadRgbColorPlugin(engine) {
3072
- engine.checkVersion("4.2.0");
3072
+ engine.checkVersion("4.2.1");
3073
3073
  await engine.pluginManager.register(e => {
3074
3074
  e.pluginManager.addColorManager("rgb", new RgbColorManager());
3075
3075
  });
@@ -3154,7 +3154,7 @@
3154
3154
  }
3155
3155
 
3156
3156
  async function loadSizeUpdater(engine) {
3157
- engine.checkVersion("4.2.0");
3157
+ engine.checkVersion("4.2.1");
3158
3158
  await engine.pluginManager.register(e => {
3159
3159
  e.pluginManager.addParticleUpdater("size", container => {
3160
3160
  return Promise.resolve(new SizeUpdater(container));
@@ -3163,7 +3163,7 @@
3163
3163
  }
3164
3164
 
3165
3165
  async function loadBasic(engine) {
3166
- engine.checkVersion("4.2.0");
3166
+ engine.checkVersion("4.2.1");
3167
3167
  await engine.pluginManager.register(async (e) => {
3168
3168
  await Promise.all([
3169
3169
  loadBlendPlugin(e),
@@ -3463,7 +3463,7 @@
3463
3463
  }
3464
3464
 
3465
3465
  async function loadClubsSuitShape(engine) {
3466
- engine.checkVersion("4.2.0");
3466
+ engine.checkVersion("4.2.1");
3467
3467
  await engine.pluginManager.register(e => {
3468
3468
  e.pluginManager.addShape(["club", "clubs"], () => Promise.resolve(new ClubDrawer()));
3469
3469
  });
@@ -3477,7 +3477,7 @@
3477
3477
  }
3478
3478
 
3479
3479
  async function loadDiamondsSuitShape(engine) {
3480
- engine.checkVersion("4.2.0");
3480
+ engine.checkVersion("4.2.1");
3481
3481
  await engine.pluginManager.register(e => {
3482
3482
  e.pluginManager.addShape(["diamond", "diamonds"], () => Promise.resolve(new DiamondDrawer()));
3483
3483
  });
@@ -3491,7 +3491,7 @@
3491
3491
  };
3492
3492
 
3493
3493
  async function loadHeartsSuitShape(engine) {
3494
- engine.checkVersion("4.2.0");
3494
+ engine.checkVersion("4.2.1");
3495
3495
  await engine.pluginManager.register(e => {
3496
3496
  e.pluginManager.addShape(["heart", "hearts"], () => Promise.resolve(new HeartDrawer$1()));
3497
3497
  });
@@ -3505,14 +3505,14 @@
3505
3505
  }
3506
3506
 
3507
3507
  async function loadSpadesSuitShape(engine) {
3508
- engine.checkVersion("4.2.0");
3508
+ engine.checkVersion("4.2.1");
3509
3509
  await engine.pluginManager.register(e => {
3510
3510
  e.pluginManager.addShape(["spade", "spades"], () => Promise.resolve(new SpadeDrawer()));
3511
3511
  });
3512
3512
  }
3513
3513
 
3514
3514
  async function loadCardSuitsShape(engine) {
3515
- engine.checkVersion("4.2.0");
3515
+ engine.checkVersion("4.2.1");
3516
3516
  await Promise.all([
3517
3517
  loadClubsSuitShape(engine),
3518
3518
  loadDiamondsSuitShape(engine),
@@ -3727,7 +3727,7 @@
3727
3727
  })(EmitterClickMode || (EmitterClickMode = {}));
3728
3728
 
3729
3729
  async function loadEmittersPluginSimple(engine) {
3730
- engine.checkVersion("4.2.0");
3730
+ engine.checkVersion("4.2.1");
3731
3731
  await engine.pluginManager.register(async (e) => {
3732
3732
  const instancesManager = await getEmittersInstancesManager(e);
3733
3733
  await addEmittersShapesManager(e);
@@ -3829,7 +3829,7 @@
3829
3829
  }
3830
3830
 
3831
3831
  async function loadEmojiShape(engine) {
3832
- engine.checkVersion("4.2.0");
3832
+ engine.checkVersion("4.2.1");
3833
3833
  await engine.pluginManager.register(e => {
3834
3834
  e.pluginManager.addShape(validTypes, () => Promise.resolve(new EmojiDrawer()));
3835
3835
  });
@@ -3855,7 +3855,7 @@
3855
3855
  }
3856
3856
 
3857
3857
  async function loadHeartShape(engine) {
3858
- engine.checkVersion("4.2.0");
3858
+ engine.checkVersion("4.2.1");
3859
3859
  await engine.pluginManager.register(e => {
3860
3860
  e.pluginManager.addShape(["heart"], () => Promise.resolve(new HeartDrawer()));
3861
3861
  });
@@ -4664,7 +4664,7 @@
4664
4664
  };
4665
4665
  }
4666
4666
  async function loadImageShape(engine) {
4667
- engine.checkVersion("4.2.0");
4667
+ engine.checkVersion("4.2.1");
4668
4668
  await engine.pluginManager.register(e => {
4669
4669
  addLoadImageToEngine(e);
4670
4670
  e.pluginManager.addPlugin(new ImagePreloaderPlugin(e));
@@ -4809,7 +4809,7 @@
4809
4809
  }
4810
4810
 
4811
4811
  async function loadLifeUpdater(engine) {
4812
- engine.checkVersion("4.2.0");
4812
+ engine.checkVersion("4.2.1");
4813
4813
  await engine.pluginManager.register(e => {
4814
4814
  e.pluginManager.addParticleUpdater("life", container => {
4815
4815
  return Promise.resolve(new LifeUpdater(container));
@@ -4863,7 +4863,7 @@
4863
4863
  }
4864
4864
 
4865
4865
  async function loadMotionPlugin(engine) {
4866
- engine.checkVersion("4.2.0");
4866
+ engine.checkVersion("4.2.1");
4867
4867
  await engine.pluginManager.register(e => {
4868
4868
  e.pluginManager.addPlugin(new MotionPlugin());
4869
4869
  });
@@ -4948,19 +4948,19 @@
4948
4948
  }
4949
4949
 
4950
4950
  async function loadGenericPolygonShape(engine) {
4951
- engine.checkVersion("4.2.0");
4951
+ engine.checkVersion("4.2.1");
4952
4952
  await engine.pluginManager.register(e => {
4953
4953
  e.pluginManager.addShape(["polygon"], () => Promise.resolve(new PolygonDrawer()));
4954
4954
  });
4955
4955
  }
4956
4956
  async function loadTriangleShape(engine) {
4957
- engine.checkVersion("4.2.0");
4957
+ engine.checkVersion("4.2.1");
4958
4958
  await engine.pluginManager.register(e => {
4959
4959
  e.pluginManager.addShape(["triangle"], () => Promise.resolve(new TriangleDrawer()));
4960
4960
  });
4961
4961
  }
4962
4962
  async function loadPolygonShape(engine) {
4963
- engine.checkVersion("4.2.0");
4963
+ engine.checkVersion("4.2.1");
4964
4964
  await Promise.all([
4965
4965
  loadGenericPolygonShape(engine),
4966
4966
  loadTriangleShape(engine),
@@ -5094,7 +5094,7 @@
5094
5094
  }
5095
5095
 
5096
5096
  async function loadRollUpdater(engine) {
5097
- engine.checkVersion("4.2.0");
5097
+ engine.checkVersion("4.2.1");
5098
5098
  await engine.pluginManager.register(e => {
5099
5099
  e.pluginManager.addParticleUpdater("roll", () => {
5100
5100
  return Promise.resolve(new RollUpdater(e.pluginManager));
@@ -5200,7 +5200,7 @@
5200
5200
  }
5201
5201
 
5202
5202
  async function loadRotateUpdater(engine) {
5203
- engine.checkVersion("4.2.0");
5203
+ engine.checkVersion("4.2.1");
5204
5204
  await engine.pluginManager.register(e => {
5205
5205
  e.pluginManager.addParticleUpdater("rotate", container => {
5206
5206
  return Promise.resolve(new RotateUpdater(container));
@@ -5224,7 +5224,7 @@
5224
5224
  }
5225
5225
 
5226
5226
  async function loadSquareShape(engine) {
5227
- engine.checkVersion("4.2.0");
5227
+ engine.checkVersion("4.2.1");
5228
5228
  await engine.pluginManager.register(e => {
5229
5229
  e.pluginManager.addShape(["edge", "square"], () => Promise.resolve(new SquareDrawer()));
5230
5230
  });
@@ -5258,7 +5258,7 @@
5258
5258
  }
5259
5259
 
5260
5260
  async function loadStarShape(engine) {
5261
- engine.checkVersion("4.2.0");
5261
+ engine.checkVersion("4.2.1");
5262
5262
  await engine.pluginManager.register(e => {
5263
5263
  e.pluginManager.addShape(["star"], () => Promise.resolve(new StarDrawer()));
5264
5264
  });
@@ -5367,7 +5367,7 @@
5367
5367
  }
5368
5368
 
5369
5369
  async function loadTiltUpdater(engine) {
5370
- engine.checkVersion("4.2.0");
5370
+ engine.checkVersion("4.2.1");
5371
5371
  await engine.pluginManager.register(e => {
5372
5372
  e.pluginManager.addParticleUpdater("tilt", container => {
5373
5373
  return Promise.resolve(new TiltUpdater(container));
@@ -5469,7 +5469,7 @@
5469
5469
  }
5470
5470
 
5471
5471
  async function loadWobbleUpdater(engine) {
5472
- engine.checkVersion("4.2.0");
5472
+ engine.checkVersion("4.2.1");
5473
5473
  await engine.pluginManager.register(e => {
5474
5474
  e.pluginManager.addParticleUpdater("wobble", container => {
5475
5475
  return Promise.resolve(new WobbleUpdater(container));
@@ -5874,7 +5874,7 @@
5874
5874
 
5875
5875
  let initPromise = null;
5876
5876
  async function doInitPlugins(engine) {
5877
- engine.checkVersion("4.2.0");
5877
+ engine.checkVersion("4.2.1");
5878
5878
  await engine.pluginManager.register(async (e) => {
5879
5879
  await Promise.all([
5880
5880
  loadBasic(e),
@@ -5947,7 +5947,7 @@
5947
5947
  confetti.init = async () => {
5948
5948
  await initPlugins(tsParticles);
5949
5949
  };
5950
- confetti.version = "4.2.0";
5950
+ confetti.version = "4.2.1";
5951
5951
  globalThis.confetti = confetti;
5952
5952
 
5953
5953
  const globalObject = globalThis;
@@ -1 +1 @@
1
- !function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.confetti=t.__tsParticlesInternals.bundles.confetti||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",a=100,o=.5,r=1e3,l={x:0,y:0,z:0},c={a:1,b:0,c:0,d:1},h="random",d="mid",u=2*Math.PI,p="true",g="false",f="canvas",m=255,y=360,v=100,w=100,b=.25,x=.75;var P;function M(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(P=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",P.bottomLeft="bottom-left",P.bottomRight="bottom-right",P.left="left",P.none="none",P.right="right",P.top="top",P.topLeft="top-left",P.topRight="top-right",P.outside="outside",P.inside="inside";class z{x;y;z;constructor(t=l.x,e=l.y,i=l.z){this.x=t,this.y=e,this.z=i}static get origin(){return z.create(l.x,l.y,l.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return z.create(t.x,t.y,M(t))}static create(t,e,i){return"number"==typeof t?new z(t,e??l.y,i??l.z):new z(t.x,t.y,M(t))}add(t){return z.create(this.x+t.x,this.y+t.y,this.z+M(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=M(t)}copy(){return z.clone(this)}div(t){return z.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return z.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return z.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),l.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=M(t)}sub(t){return z.create(this.x-t.x,this.y-t.y,this.z-M(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=M(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class C extends z{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return C.create(l.x,l.y)}static clone(t){return C.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new C(t,e??l.y):new C(t.x,t.y)}}function S(t){return"boolean"==typeof t}function D(t){return"string"==typeof t}function k(t){return"number"==typeof t}function O(t){return"object"==typeof t&&null!==t}function I(t){return Array.isArray(t)}function T(t){return null==t}const R=Math.PI/180;let E=Math.random;const _={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return V(E(),0,1-Number.EPSILON)}function F(t,e){return A()*(e-t)+t}function L(t){return _.nextFrame(t)}function B(t){_.cancel(t)}function V(t,e,i){return Math.min(Math.max(t,e),i)}function U(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function G(t){const e=q(t);let i=j(t);return e===i&&(i=0),F(i,e)}function $(t){return k(t)?t:G(t)}function j(t){return k(t)?t:t.min}function q(t){return k(t)?t:t.max}function W(t,e){if(t===e||void 0===e&&k(t))return t;const i=j(t),s=q(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:W(i,s)}function N(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function H(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function Q(t,e){return Math.sqrt(H(t,e))}function K(t,e,i){return H(t,e)<=i*i}function X(t){return t*R}function Y(e,i,s){if(k(e))return X(e);switch(e){case t.MoveDirection.top:return-Math.PI*o;case t.MoveDirection.topRight:return-Math.PI*b;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*b;case t.MoveDirection.bottom:return Math.PI*o;case t.MoveDirection.bottomLeft:return Math.PI*x;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*x;case t.MoveDirection.inside:return Math.atan2(s.y-i.y,s.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-s.y,i.x-s.x);default:return A()*u}}function Z(t){const e=C.origin;return e.length=1,e.angle=t,e}function J(t,e,i,s){return C.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function tt(t){return{x:(t.position?.x??A()*a)*t.size.width/a,y:(t.position?.y??A()*a)*t.size.height/a}}function et(t){const e={x:void 0!==t.position?.x?$(t.position.x):void 0,y:void 0!==t.position?.y?$(t.position.y):void 0};return tt({size:t.size,position:e})}function it(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}function st(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1}var nt,at;t.OutModeDirection=void 0,(nt=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",nt.left="left",nt.right="right",nt.top="top",t.PixelMode=void 0,(at=t.PixelMode||(t.PixelMode={})).precise="precise",at.percent="percent";function ot(){return globalThis.document}function rt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function lt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function ct(t,e){return t===e||I(e)&&e.includes(t)}function ht(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(A()*t.length)]}function dt(t,e,i,s,n){return ut(pt(t,s??0),e,i,n)}function ut(e,i,s,n){let a=!0;return n&&n!==t.OutModeDirection.bottom||(a=e.top<i.height+s.x),!a||n&&n!==t.OutModeDirection.left||(a=e.right>s.x),!a||n&&n!==t.OutModeDirection.right||(a=e.left<i.width+s.y),!a||n&&n!==t.OutModeDirection.top||(a=e.bottom>s.y),a}function pt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function gt(t,...e){for(const i of e){if(T(i))continue;if(!O(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):O(t)&&!Array.isArray(t)||(t={});const e=Object.keys(i),s=new Set(["__proto__","constructor","prototype"]);if(!e.some(t=>{const e=i[t];return O(e)||Array.isArray(e)})){const n=i,a=t;for(const t of e)if(!s.has(t)&&t in n){const e=n[t];void 0!==e&&(a[t]=e)}continue}for(const n of e){if(s.has(n))continue;const e=t,a=i[n];e[n]=Array.isArray(a)?a.map(t=>gt(void 0,t)):gt(e[n],a)}}return t}function ft(t,e){return I(t)?t.map((t,i)=>e(t,i)):e(t,0)}function mt(t,e,i){return I(t)?ht(t,e,i):t}function yt(e,i){return function(e,i){if(e.mode!==t.PixelMode.percent){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/a*i.width,y:e.y/a*i.height}:{width:e.width/a*i.width,height:e.height/a*i.height}}(e,i)}function vt(t){const e=ot().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||T(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}let wt,bt;function xt(t){if(wt!==t||!bt){wt=t;const e=ot().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}bt=e}return bt}function Pt(t,e,i,s,n){if(s){let s={passive:!0};S(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function Mt(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,n)),n}async function zt(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class Ct{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var St;t.EventType=void 0,(St=t.EventType||(t.EventType={})).configAdded="configAdded",St.containerInit="containerInit",St.particlesSetup="particlesSetup",St.containerStarted="containerStarted",St.containerStopped="containerStopped",St.containerDestroyed="containerDestroyed",St.containerPaused="containerPaused",St.containerPlay="containerPlay",St.containerBuilt="containerBuilt",St.particleAdded="particleAdded",St.particleDestroyed="particleDestroyed",St.particleRemoved="particleRemoved";class Dt{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#s.set(i,e),this.#n.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return zt(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return zt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return Mt(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#a,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#a,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const kt=t=>(...e)=>{t(...e)},Ot={debug:kt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:kt(console.info),log:kt(console.log),trace:kt(console.trace),verbose:kt(console.log),warning:kt(console.warn)};function It(){return Ot}const Tt="100%";class Rt{pluginManager=new Dt(this);#h=[];#d=new Ct;#o=!1;get items(){return this.#h}get version(){return"4.2.0"}addEventListener(t,e){this.#d.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#d.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return ia}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=mt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(It().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=mt(r,a),{items:c}=this,h=c.findIndex(t=>t.id.description===n),d=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,d)}else c.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=ot();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)s=t,s.dataset[e]??=g,s.dataset[e]===p&&(s.style.width||=Tt,s.style.height||=Tt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(f).item(0);n?(s=n,s.dataset[e]=g):(s=i.createElement(f),s.dataset[e]=p,t.appendChild(s)),s.style.width||=Tt,s.style.height||=Tt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=ot();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}var Et,_t,At,Ft,Lt,Bt,Vt,Ut,Gt,$t,jt;!function(t){t.circle="circle",t.rectangle="rectangle"}(Et||(Et={}));class qt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Wt extends qt{radius;constructor(t,e,i){super(t,e,Et.circle),this.radius=i}contains(t){return K(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Wt||t.type===Et.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Nt||t.type===Et.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(n-i,2)+Math.pow(a-o,2)<=s**2||n<=s+i&&a<=s+o||n<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Nt extends qt{size;constructor(t,e,i,s){super(t,e,Et.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof Wt)return t.intersects(this);if(!(t instanceof Nt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,o=a.width,r=a.height;return n.x<s.x+e&&n.x+o>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}t.RotateDirection=void 0,(_t=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",_t.counterClockwise="counter-clockwise",_t.random="random",t.AnimationMode=void 0,(At=t.AnimationMode||(t.AnimationMode={})).auto="auto",At.increase="increase",At.decrease="decrease",At.random="random",t.LimitMode=void 0,(Ft=t.LimitMode||(t.LimitMode={})).delete="delete",Ft.wait="wait",t.OutMode=void 0,(Lt=t.OutMode||(t.OutMode={})).bounce="bounce",Lt.none="none",Lt.out="out",Lt.destroy="destroy",Lt.split="split",t.AlterType=void 0,(Bt=t.AlterType||(t.AlterType={})).darken="darken",Bt.enlighten="enlighten",t.DestroyType=void 0,(Vt=t.DestroyType||(t.DestroyType={})).none="none",Vt.max="max",Vt.min="min",t.GradientType=void 0,(Ut=t.GradientType||(t.GradientType={})).linear="linear",Ut.radial="radial",Ut.random="random",t.ParticleOutType=void 0,(Gt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Gt.inside="inside",Gt.outside="outside",t.StartValueType=void 0,($t=t.StartValueType||(t.StartValueType={})).max="max",$t.min="min",$t.random="random",t.AnimationStatus=void 0,(jt=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",jt.decreasing="decreasing";class Ht{load(t){T(t)||this.doLoad(t)}}function Qt(t,...e){for(const i of e)t.load(i)}function Kt(t,e,i){void 0!==i&&(t[e]=i)}function Xt(t,e,i){void 0!==i&&(t[e]=W(i))}function Yt(t,e,i){void 0!==i&&t[e].load(i)}function Zt(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function Jt(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class te extends Ht{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Xt(this,"count",t.count),Kt(this,"enable",t.enable),Xt(this,"speed",t.speed),Xt(this,"decay",t.decay),Xt(this,"delay",t.delay),Kt(this,"sync",t.sync)}}class ee extends te{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),Kt(this,"mode",t.mode),Kt(this,"startValue",t.startValue)}}class ie extends te{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Kt(this,"max",t.max),Kt(this,"min",t.min),Xt(this,"offset",t.offset)}}class se extends Ht{h=new ie(0,y);l=new ie(0,w);s=new ie(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class ne extends Ht{value="";static create(t,e){const i=new ne;return i.load(t),void 0!==e&&(D(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){T(t.value)||(this.value=t.value)}}class ae extends ne{animation=new se;static create(t,e){const i=new ae;return i.load(t),void 0!==e&&(D(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class oe extends Ht{color;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new ne,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=ne.create(this.color,t.color)),Kt(this,"image",t.image),Kt(this,"position",t.position),Kt(this,"repeat",t.repeat),Kt(this,"size",t.size),Kt(this,"opacity",t.opacity)}}class re extends Ht{enable=!0;zIndex=0;doLoad(t){Kt(this,"enable",t.enable),Kt(this,"zIndex",t.zIndex)}}class le extends Ht{delay=.5;enable=!0;doLoad(t){Kt(this,"delay",t.delay),Kt(this,"enable",t.enable)}}class ce extends Ht{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=gt(this.options[t]??{},i))}Kt(this,"close",t.close),Kt(this,"type",t.type)}}class he extends Ht{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=ae.create(this.color,t.color)),Kt(this,"enable",t.enable),Xt(this,"opacity",t.opacity)}}class de extends Ht{offset=0;value=90;doLoad(t){Xt(this,"offset",t.offset),Xt(this,"value",t.value)}}class ue extends Ht{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){Kt(this,"x",t.x),Kt(this,"y",t.y),Kt(this,"mode",t.mode),Kt(this,"radius",t.radius)}}class pe extends Ht{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Xt(this,"acceleration",t.acceleration),Kt(this,"enable",t.enable),Kt(this,"inverse",t.inverse),Xt(this,"maxSpeed",t.maxSpeed)}}class ge extends Ht{value=0;doLoad(t){T(t.value)||(this.value=W(t.value))}}class fe extends ge{animation=new te;doLoad(t){super.doLoad(t),Yt(this,"animation",t.animation)}}class me extends fe{animation=new ee}class ye extends Ht{clamp=!0;delay=new ge;enable=!1;generator;options={};doLoad(t){Kt(this,"clamp",t.clamp),this.delay.load(t.delay),Kt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=gt(this.options,t.options))}}class ve extends Ht{bottom;default=t.OutMode.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class we extends Ht{acceleration=0;enable=!1;position;doLoad(t){Xt(this,"acceleration",t.acceleration),Kt(this,"enable",t.enable),t.position&&(this.position=gt({},t.position))}}class be extends Ht{angle=new de;center=new ue;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new pe;outModes=new ve;path=new ye;random=!1;size=!1;speed=2;spin=new we;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(k(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Xt(this,"decay",t.decay),Kt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=k(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Xt(this,"drift",t.drift),Kt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(O(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Kt(this,"random",t.random),Kt(this,"size",t.size),Xt(this,"speed",t.speed),this.spin.load(t.spin),Kt(this,"straight",t.straight),Kt(this,"vibrate",t.vibrate),Kt(this,"warp",t.warp)}}class xe extends Ht{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=ae.create(this.color,t.color)),Xt(this,"width",t.width),Xt(this,"opacity",t.opacity)}}class Pe extends Ht{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=ae.create(this.color,t.color)),Zt(this,"fill",t.fill,()=>new he),Zt(this,"stroke",t.stroke,()=>new xe)}}class Me extends ge{value=1}class ze extends Ht{horizontal=new Me;vertical=new Me;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Ce extends Ht{enable=!1;height=1080;width=1920;doLoad(t){Kt(this,"enable",t.enable),Kt(this,"width",t.width),Kt(this,"height",t.height)}}class Se extends Ht{mode=t.LimitMode.delete;value=0;doLoad(t){Kt(this,"mode",t.mode),Kt(this,"value",t.value)}}class De extends Ht{density=new Ce;limit=new Se;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Kt(this,"value",t.value)}}class ke extends Ht{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=gt(this.options[t]??{},i))}Kt(this,"close",t.close),Kt(this,"type",t.type)}}class Oe extends ge{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Kt(this,"opacityRate",t.opacityRate),Kt(this,"sizeRate",t.sizeRate),Kt(this,"velocityRate",t.velocityRate)}}class Ie extends Ht{bounce=new ze;effect=new ce;groups={};move=new be;number=new De;paint;palette;reduceDuplicates=!1;shape=new ke;zIndex=new Oe;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Pe,this.paint.color=new ae,this.paint.color.value="#fff",this.paint.fill=new he,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#g(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=gt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(I(e)?this.paint=ft(e,t=>{const e=new Pe;return e.load(t),e}):I(this.paint)?(this.paint=new Pe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#g(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(I(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function Te(t,e,...i){const s=new Ie(t,e);return Qt(s,...i),s}class Re extends Ht{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new oe,this.fullScreen=new re,this.particles=Te(this.#p,this.#u),this.resize=new le}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,ft(this.preset,t=>{this.#f(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#g(this.palette)),Kt(this,"autoPlay",t.autoPlay),Kt(this,"clear",t.clear),Kt(this,"key",t.key),Kt(this,"name",t.name),Xt(this,"delay",t.delay),Kt(this,"detectRetina",t.detectRetina),Xt(this,"duration",t.duration),Kt(this,"fpsLimit",t.fpsLimit),Kt(this,"hdr",t.hdr),Kt(this,"pauseOnBlur",t.pauseOnBlur),Kt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Kt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;S(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=gt(this.style,t.style),Kt(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#g(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#f(t){this.load(this.#p.getPreset(t))}}const Ee=new Map;function _e(t,e){let i=Ee.get(t);return i||(i=e(),Ee.size>2e3&&Ee.clear(),Ee.set(t,i)),i}function Ae(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Fe(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return Le(t,n.value,i,s);if(I(n.value)){const e=ht(n.value,i,s);if(!e)return;return Fe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Le(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return n.value===h?qe():Ue(t,n.value);if(I(n.value)){const e=ht(n.value,i,s);if(!e)return;return Le(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Be(t,e,i,s=!0){const n=Fe(t,e,i,s);return n?Ve(n):void 0}function Ve(t){const e=t.r/m,i=t.g/m,s=t.b/m,n=Math.max(e,i,s),a=Math.min(e,i,s),r={h:0,l:(n+a)*o,s:0};return n!==a&&(r.s=r.l<o?(n-a)/(n+a):(n-a)/(2-n-a),r.h=e===n?(i-s)/(n-a):i===n?2+(s-e)/(n-a):4+(e-i)/(n-a)),r.l*=w,r.s*=v,r.h*=60,r.h<0&&(r.h+=y),r.h>=y&&(r.h-=y),r}function Ue(t,e){return Ae(t,e)}function Ge(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function $e(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),n=e/y,a=i/v,r=s/w;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const l=r<o?r*(1+a):r+a-r*a,c=2*r-l,h=1/3,d=Math.min(m,m*Ge(c,l,n+h)),u=Math.min(m,m*Ge(c,l,n)),p=Math.min(m,m*Ge(c,l,n-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function je(t){const e=$e(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function qe(t){const e=t??0,i=()=>Math.floor(F(e,256));return{b:i(),g:i(),r:i()}}function We(t,e,i){const s=i??1;return _e(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/m*s).toString()} ${(t.g/m*s).toString()} ${(t.b/m*s).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Ne(t,e,i){const s=i??1;return _e(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?We($e(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${s.toString()})`)}function He(t,e,i,s){let n=t,a=e;return"r"in n||(n=$e(t)),"r"in a||(a=$e(e)),{b:U(n.b,a.b,i,s),g:U(n.g,a.g,i,s),r:U(n.r,a.r,i,s)}}function Qe(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Ke(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:y},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:w}};return e&&(Xe(s.h,e.h,i),Xe(s.s,e.s,i),Xe(s.l,e.l,i)),s}function Xe(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=$(i.speed)/a*s,e.decay=1-$(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=$(i.count),e.time=0,e.delayTime=$(i.delay)*r,i.sync||(e.velocity*=A(),e.value*=A()),e.initialValue=e.value,e.offset=W(i.offset)):e.velocity=0}function Ye(e,i,s){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const n=e.offset?G(e.offset):0,a=(e.velocity??0)*s.factor+3.6*n,o=e.decay??1,r=e.max,l=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=a,e.value<l&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=a,e.value>r&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=r)),e.velocity&&1!==o&&(e.velocity*=o),e.value=V(e.value,l,r)}function Ze(t,e){if(!t)return;const{h:i,s:s,l:n}=t;Ye(i,!1,e),Ye(s,!0,e),Ye(n,!0,e)}function Je(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const ti=new Rt;class ei{enable=!1;mode="destination-out";load(t){T(t)||(Kt(this,"mode",t.mode),Kt(this,"enable",t.enable))}}class ii{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return sa});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new ei),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new ei,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function si(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new ii)})}class ni{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(l.x,l.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=O(s)?{min:X(s.min),max:X(s.max)}:{min:0,max:X(s)}}}async function ai(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new ni))})}var oi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(oi||(oi={}));const ri=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,li=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class ci{accepts(t){return t.startsWith("#")}handleColor(t){return this.#m(t.value)}handleRangeColor(t){return this.#m(t.value)}parseString(t){return this.#m(t)}#m(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(ri,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=li.exec(e);return i?{a:i[oi.a]?Number.parseInt(i[oi.a],16)/255:1,b:Number.parseInt(i[oi.b]??"0",16),g:Number.parseInt(i[oi.g]??"0",16),r:Number.parseInt(i[oi.r]??"0",16)}:void 0}}async function hi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new ci)})}var di;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(di||(di={}));const ui=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class pi{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return $e(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return $e({h:$(e.h),l:$(e.l),s:$(e.s)})}parseString(t){if(!this.accepts(t))return;const e=ui.exec(t);return e?je({a:e.length>4?st(e[di.a]):1,h:Number.parseInt(e[di.h]??"0",10),l:Number.parseInt(e[di.l]??"0",10),s:Number.parseInt(e[di.s]??"0",10)}):void 0}}async function gi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new pi)})}class fi{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return aa});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function mi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,zt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new fi(t.pluginManager))})}function yi(e,i){const s=e.value,n=e.animation,a={delayTime:$(n.delay)*r,enable:n.enable,value:$(e.value)*i,max:q(s)*i,min:j(s)*i,loops:0,maxLoops:$(n.count),time:0};if(n.enable){switch(a.decay=1-$(n.decay),n.mode){case t.AnimationMode.increase:a.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:a.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:a.value=a.min,e&&(a.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:a.value=a.max,e&&(a.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:a.value=G(a),e&&(a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function vi(e,i,s,n,a){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const o=(i.velocity??0)*a.factor,r=i.min,l=i.max,c=i.decay??1;i.time??=0;const h=i.delayTime??0;if(!(h>0&&i.time<h&&(i.time+=a.value,i.time<h))){switch(i.status){case t.AnimationStatus.increasing:i.value+=o;break;case t.AnimationStatus.decreasing:i.value-=o}switch(i.velocity&&1!==c&&(i.velocity*=c),i.status){case t.AnimationStatus.increasing:i.value>=l&&(s?i.status=t.AnimationStatus.decreasing:i.value-=l,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(s?i.status=t.AnimationStatus.increasing:i.value+=l,i.loops??=0,i.loops++)}!function(e,i,s,n,a){switch(i){case t.DestroyType.max:s>=a&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,l),e.destroyed||(i.value=V(i.value,r,l))}}class wi extends ee{destroy=t.DestroyType.none;load(t){super.load(t),T(t)||Kt(this,"destroy",t.destroy)}}class bi extends me{animation=new wi;value=1;load(t){if(T(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class xi{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=yi(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=$(i.speed)/a*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=A()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){Jt(t,"opacity",bi,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&vi(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function Pi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new xi(t)))})}class Mi{modes;#u;#y;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#y=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;let o=!1;for(const t of this.#y)if(o=t.particleBounce?.(e,s,i)??!1,o)break;if(o)return;const r=e.getPosition(),l=e.offset,c=e.getRadius(),h=pt(r,c),d=a.canvas.size,u=!e.isInsideCanvasForOutMode(n,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.left&&e.direction!==t.OutModeDirection.right)return;e.bounds.right<0&&e.direction===t.OutModeDirection.left?e.particle.position.x=e.size+e.offset.x:e.bounds.left>e.canvasSize.width&&e.direction===t.OutModeDirection.right&&(e.particle.position.x=e.canvasSize.width-e.size-e.offset.x);const i=e.particle.velocity.x;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.right&&i>0||e.direction===t.OutModeDirection.left&&i<0)){const t=$(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,s=!0}if(!s)return;const n=e.offset.x+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-n:e.outOfCanvas&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:d,offset:l,outOfCanvas:u,size:c}),function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.bottom&&e.direction!==t.OutModeDirection.top)return;e.bounds.bottom<0&&e.direction===t.OutModeDirection.top?e.particle.position.y=e.size+e.offset.y:e.bounds.top>e.canvasSize.height&&e.direction===t.OutModeDirection.bottom&&(e.particle.position.y=e.canvasSize.height-e.size-e.offset.y);const i=e.particle.velocity.y;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.bottom&&i>0||e.direction===t.OutModeDirection.top&&i<0)){const t=$(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,s=!0}if(!s)return;const n=e.offset.y+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-n:e.outOfCanvas&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:d,offset:l,outOfCanvas:u,size:c})}}class zi{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(this.modes.includes(n)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(n,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=N(e.position,e.moveCenter),{x:s,y:n}=e.velocity;if(s<0&&t>e.moveCenter.radius||n<0&&i>e.moveCenter.radius||s>=0&&t<-e.moveCenter.radius||n>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class Ci{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,s,n){if(!this.modes.includes(n))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const a=e.options.move.gravity,o=this.#u,r=o.canvas.size,c=e.getRadius();if(a.enable){const s=e.position;(!a.inverse&&s.y>r.height+c&&i===t.OutModeDirection.bottom||a.inverse&&s.y<-c&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+c||e.velocity.y<0&&e.position.y>=-c||e.velocity.x>0&&e.position.x<=r.width+c||e.velocity.x<0&&e.position.x>=-c)return;dt(e.position,o.canvas.size,l,c,i)||e.destroy()}}}const Si=C.origin;class Di{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;Si.setTo(l),Si.length=e.moveCenter.radius,Si.angle=e.velocity.angle+Math.PI,Si.addTo(e.moveCenter);const{dx:s,dy:n}=N(e.position,Si);if(t<=0&&s>=0||i<=0&&n>=0||t>=0&&s<=0||i>=0&&n<=0)return;e.position.x=Math.floor(G({min:0,max:a.canvas.size.width})),e.position.y=Math.floor(G({min:0,max:a.canvas.size.height}));const{dx:o,dy:r}=N(e.position,e.moveCenter);e.direction=Math.atan2(-r,-o),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(e.isInsideCanvasForOutMode(n,i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor(G({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(G({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=N(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction),e.justWarped=!0;break}case t.ParticleOutType.normal:{const s=e.options.move.warp,n=a.canvas.size,o={bottom:n.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:n.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),l=pt(e.position,r);i===t.OutModeDirection.right&&l.left>n.width+e.offset.x?(e.position.x=o.left,e.initialPosition.x=e.position.x,s||(e.position.y=A()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0):i===t.OutModeDirection.left&&l.right<-e.offset.x&&(e.position.x=o.right,e.initialPosition.x=e.position.x,s||(e.position.y=A()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0),i===t.OutModeDirection.bottom&&l.top>n.height+e.offset.y?(s||(e.position.x=A()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.top,e.initialPosition.y=e.position.y,e.justWarped=!0):i===t.OutModeDirection.top&&l.bottom<-e.offset.y&&(s||(e.position.x=A()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0);break}}}}}class ki{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#v(e,t.OutMode.bounce,t=>new Mi(t)),this.#v(e,t.OutMode.out,t=>new Di(t)),this.#v(e,t.OutMode.destroy,t=>new zi(t)),this.#v(e,t.OutMode.none,t=>new Ci(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#w(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#w(e,i,s.left??s.default,t.OutModeDirection.left),this.#w(e,i,s.right??s.default,t.OutModeDirection.right),this.#w(e,i,s.top??s.default,t.OutModeDirection.top)}#v(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#w(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function Oi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new ki(t)))})}class Ii{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=mt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=ae.create(void 0===a?void 0:ae.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=$(o.opacity),t.fillAnimation=i.animation;const s=Be(this.#p,i);s&&(t.fillColor=Ke(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=ae.create(void 0===a?void 0:ae.create(void 0,a),r.color);t.strokeWidth=$(r.width)*e.retina.pixelRatio,t.strokeOpacity=$(r.opacity??1),t.strokeAnimation=i.animation;const s=Be(this.#p,i)??t.getFillColor();s&&(t.strokeColor=Ke(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(Ze(t.fillColor,e),Ze(t.strokeColor,e))}}async function Ti(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Ii(t.pluginManager,e)))})}var Ri;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Ri||(Ri={}));const Ei=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class _i{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:$(e.r),g:$(e.g),b:$(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Ei.exec(t);return e?{a:e.length>4?st(e[Ri.a]):1,b:parseInt(e[Ri.b]??"0",10),g:parseInt(e[Ri.g]??"0",10),r:parseInt(e[Ri.r]??"0",10)}:void 0}}async function Ai(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new _i)})}class Fi extends ee{destroy=t.DestroyType.none;load(t){super.load(t),T(t)||Kt(this,"destroy",t.destroy)}}class Li extends me{animation=new Fi;value=3;load(t){if(super.load(t),T(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Bi{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/a*e.retina.reduceFactor,s.sync||(t.size.velocity*=A()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){Jt(t,"size",Li,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=yi(i,e),t.retina.sizeAnimationSpeed=$(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&vi(t,t.size,!0,t.options.size.animation.destroy,e)}}async function Vi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Bi(t)))})}async function Ui(t){t.checkVersion("4.2.0"),await t.pluginManager.register(async t=>{await Promise.all([si(t),hi(t),gi(t),Ai(t),mi(t),ai(t),Ti(t),Pi(t),Oi(t),Vi(t)])})}var Gi;!function(t){t.move="move",t.line="line",t.bezier="bezier",t.quadratic="quadratic",t.arc="arc",t.ellipse="ellipse"}(Gi||(Gi={}));function $i(t,e,i){const s=i.segments[0];if(!s)return;const n=s.values[0];if(!n)return;t.moveTo(n.x*e,n.y*e);for(const s of i.segments){const i=s.values[0];if(!i)continue;const n=s.values[1],a=s.values[2],o=s.values[3];switch(s.type){case Gi.move:t.moveTo(i.x*e,i.y*e);break;case Gi.line:t.lineTo(i.x*e,i.y*e);break;case Gi.bezier:if(!n||!a||!o)continue;t.bezierCurveTo(n.x*e,n.y*e,a.x*e,a.y*e,o.x*e,o.y*e);break;case Gi.quadratic:if(!n||!a)continue;t.quadraticCurveTo(n.x*e,n.y*e,a.x*e,a.y*e);break;case Gi.arc:if(!n||!a)continue;t.arc(i.x*e,i.y*e,n.x*e,a.x,a.y);break;case Gi.ellipse:if(!n||!a||!o)continue;t.ellipse(i.x*e,i.y*e,n.x*e,n.y*e,a.x,o.x,o.y)}}if(!i.half)return;for(let s=i.segments.length-1;s>=0;s--){const n=i.segments[s];if(!n)continue;const a=n.values[0],o=1,r=2,l=n.values[o],c=n.values[r];switch(n.type){case Gi.line:if(!a)break;t.lineTo(a.x*-e,a.y*e);break;case Gi.bezier:if(!a||!l||!c)break;t.bezierCurveTo(-c.x*e,c.y*e,-l.x*e,l.y*e,-a.x*e,a.y*e);break;case Gi.quadratic:if(!l||!c)break;t.quadraticCurveTo(-l.x*e,l.y*e,-c.x*e,c.y*e);case Gi.arc:case Gi.ellipse:}}}var ji;!function(t){t.hearts="hearts",t.diamonds="diamonds",t.clubs="clubs",t.spades="spades"}(ji||(ji={}));const qi=o,Wi=.25,Ni=-qi,Hi=-.25,Qi=.0625,Ki=.375,Xi={half:!0,segments:[{type:Gi.bezier,values:[{x:0,y:Ni},{x:0,y:Ni},{x:Wi,y:Ni},{x:Wi,y:Hi}]},{type:Gi.bezier,values:[{x:Wi,y:Hi},{x:Wi,y:Hi},{x:qi,y:Hi},{x:qi,y:0}]},{type:Gi.bezier,values:[{x:qi,y:0},{x:qi,y:0},{x:qi,y:Wi},{x:Wi,y:Wi}]},{type:Gi.bezier,values:[{x:Wi,y:Wi},{x:Wi,y:Wi},{x:Qi,y:Wi},{x:Qi,y:Qi}]},{type:Gi.bezier,values:[{x:Qi,y:Qi},{x:Qi,y:Wi},{x:Wi,y:qi},{x:Wi,y:qi}]},{type:Gi.bezier,values:[{x:Wi,y:qi},{x:Wi,y:qi},{x:0,y:qi},{x:0,y:qi}]}]},Yi={half:!0,segments:[{type:Gi.bezier,values:[{x:0,y:qi},{x:0,y:qi},{x:Ki,y:0},{x:Ki,y:0}]},{type:Gi.bezier,values:[{x:Ki,y:0},{x:Ki,y:0},{x:0,y:Ni},{x:0,y:Ni}]}]},Zi={half:!0,segments:[{type:Gi.bezier,values:[{x:0,y:qi},{x:0,y:qi},{x:qi,y:0},{x:qi,y:Hi}]},{type:Gi.bezier,values:[{x:qi,y:Hi},{x:qi,y:Hi},{x:qi,y:Ni},{x:Wi,y:Ni}]},{type:Gi.bezier,values:[{x:Wi,y:Ni},{x:Wi,y:Ni},{x:0,y:Ni},{x:0,y:Hi}]}]},Ji={half:!0,segments:[{type:Gi.bezier,values:[{x:0,y:Ni},{x:0,y:Ni},{x:qi,y:Hi},{x:qi,y:0}]},{type:Gi.bezier,values:[{x:qi,y:0},{x:qi,y:0},{x:qi,y:Wi},{x:Wi,y:Wi}]},{type:Gi.bezier,values:[{x:Wi,y:Wi},{x:Wi,y:Wi},{x:Qi,y:Wi},{x:Qi,y:Qi}]},{type:Gi.bezier,values:[{x:Qi,y:Qi},{x:Qi,y:Wi},{x:Wi,y:qi},{x:Wi,y:qi}]},{type:Gi.bezier,values:[{x:Wi,y:qi},{x:Wi,y:qi},{x:0,y:qi},{x:0,y:qi}]}]},ts={[ji.hearts]:Zi,[ji.diamonds]:Yi,[ji.clubs]:Xi,[ji.spades]:Ji};class es{draw(t){const{context:e,radius:i}=t;$i(e,i,ts.clubs)}}async function is(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["club","clubs"],()=>Promise.resolve(new es))})}class ss{draw(t){const{context:e,radius:i}=t;$i(e,i,ts.diamonds)}}async function ns(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["diamond","diamonds"],()=>Promise.resolve(new ss))})}let as=class{draw(t){const{context:e,radius:i}=t;$i(e,i,ts.hearts)}};async function os(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["heart","hearts"],()=>Promise.resolve(new as))})}class rs{draw(t){const{context:e,radius:i}=t;$i(e,i,ts.spades)}}async function ls(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["spade","spades"],()=>Promise.resolve(new rs))})}async function cs(t){t.checkVersion("4.2.0"),await Promise.all([is(t),ns(t),os(t),ls(t)])}class hs{count;delay;duration;wait=!1;load(t){T(t)||(Kt(this,"count",t.count),Xt(this,"delay",t.delay),Xt(this,"duration",t.duration),Kt(this,"wait",t.wait))}}class ds{delay=.1;quantity=1;load(t){T(t)||(Xt(this,"quantity",t.quantity),Xt(this,"delay",t.delay))}}class us{color=!1;opacity=!1;load(t){T(t)||(Kt(this,"color",t.color),Kt(this,"opacity",t.opacity))}}class ps{options={};replace=new us;type="square";load(t){T(t)||(void 0!==t.options&&(this.options=gt({},t.options??{})),this.replace.load(t.replace),Kt(this,"type",t.type))}}class gs{height=0;mode=t.PixelMode.percent;width=0;load(t){T(t)||(Kt(this,"mode",t.mode),Kt(this,"height",t.height),Kt(this,"width",t.width))}}class fs{fill;stroke;load(t){T(t)||(t.fill&&(this.fill??=new he,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new xe,this.stroke.load(t.stroke)))}}class ms{autoPlay=!0;direction;domId;fill=!0;life=new hs;name;particles;position;rate=new ds;shape=new ps;size;spawn=new fs;spawnFillColor;spawnStrokeColor;startCount=0;load(t){T(t)||(Kt(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new gs,this.size.load(t.size)),Kt(this,"direction",t.direction),Kt(this,"domId",t.domId),Kt(this,"fill",t.fill),this.life.load(t.life),Kt(this,"name",t.name),this.particles=ft(t.particles,t=>gt({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=W(t.position.x)),void 0!==t.position.y&&(this.position.y=W(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new ae,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new ae,this.spawnStrokeColor.load(t.spawnStrokeColor)),Kt(this,"startCount",t.startCount))}}class ys{id="emitters";#b;constructor(t){this.#b=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return oa});return new e(this.#b,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=ft(i.emitters,t=>{const e=new ms;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return I(e)&&!!e.length||void 0!==e}}const vs=new WeakMap;var ws;async function bs(t){t.checkVersion("4.2.0"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=vs.get(e);return i||(i=Promise.resolve().then(function(){return ca}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw vs.delete(e),t}),vs.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return la}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new ys(e))})}!function(t){t.emitter="emitter"}(ws||(ws={}));const xs=["emoji"];async function Ps(t,e){try{await ot().fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}const Ms='"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';class zs{#x=new Map;destroy(){for(const[t,e]of this.#x)e instanceof ImageBitmap&&e.close(),this.#x.delete(t)}draw(t){const e=t.particle.emojiDataKey;if(!e)return;const i=this.#x.get(e);i&&function(t,e){const{context:i,opacity:s}=t,n=i.globalAlpha,a=e.width,r=a*o;i.globalAlpha=s,i.drawImage(e,-r,-r,a,a),i.globalAlpha=n}(t,i)}async init(t){const e=t.actualOptions.particles.shape;if(!xs.some(t=>ct(t,e.type)))return;const i=[Ps(Ms)];ft(xs.map(t=>e.options[t])[0],t=>{t.font&&i.push(Ps(t.font))}),await Promise.all(i)}particleDestroy(t){t.emojiDataKey=void 0}particleInit(t,e){const i=e.shapeData;if(!i.value)return;const s=mt(i.value,e.randomIndexData);if(!s)return;const n="string"==typeof s?{font:i.font??Ms,padding:i.padding??0,value:s}:{font:Ms,padding:0,...i,...s},a=n.font,o=n.value,r=`${o}_${a}`;if(this.#x.has(r))return void(e.emojiDataKey=r);const l=2*n.padding,c=q(e.size.value),h=c+l,d=2*h,u=new OffscreenCanvas(d,d),p=u.getContext("2d",t.canvas.render.settings);if(!p)return;p.font=`400 ${(2*c).toString()}px ${a}`,p.textBaseline="middle",p.textAlign="center",p.fillText(o,h,h);const g=u instanceof HTMLCanvasElement?u:u.transferToImageBitmap();this.#x.set(r,g),e.emojiDataKey=r}}async function Cs(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(xs,()=>Promise.resolve(new zs))})}class Ss{draw(t){!function(t){const{context:e,radius:i}=t,s=2*i,n=i*o,a=i+n,r=-i,l=-i;e.moveTo(r,l+n),e.quadraticCurveTo(r,l,r+n,l),e.quadraticCurveTo(r+i,l,r+i,l+n),e.quadraticCurveTo(r+i,l,r+a,l),e.quadraticCurveTo(r+s,l,r+s,l+n),e.quadraticCurveTo(r+s,l+i,r+a,l+a),e.lineTo(r+i,l+s),e.lineTo(r+n,l+a),e.quadraticCurveTo(r,l+i,r,l+n)}(t)}}async function Ds(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["heart"],()=>Promise.resolve(new Ss))})}const ks=["image","images"],Os=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function Is(t){return new Promise(e=>{t.loading=!0;const i=new Image;t.element=i,i.addEventListener("load",()=>{t.loading=!1,e()}),i.addEventListener("error",()=>{t.element=void 0,t.error=!0,t.loading=!1,It().error(`Error loading image: ${t.source}`),e()}),i.src=t.source})}async function Ts(t){if("svg"!==t.type)return void await Is(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(It().error("Image not found"),t.error=!0),t.loading=!1}function Rs(t,e,i,s,n=!1){const a=function(t,e,i,s=!1){const{svgData:n}=t;if(!n)return"";const a=Ne(e,s,i);if(n.includes("fill"))return n.replaceAll(Os,()=>a);const o=n.indexOf(">");return`${n.substring(0,o)} fill="${a}"${n.substring(o)}`}(t,i,s.opacity?.value??1,n),o={color:i,gif:e.gif,data:{...t,svgData:a},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise(e=>{const i=new Blob([a],{type:"image/svg+xml"}),s=URL.createObjectURL(i),n=new Image;n.addEventListener("load",()=>{o.loaded=!0,o.element=n,e(o),URL.revokeObjectURL(s)});n.addEventListener("error",()=>{(async()=>{URL.revokeObjectURL(s);const i={...t,error:!1,loading:!0};await Is(i),o.loaded=!0,o.element=i.element,e(o)})()}),n.src=s})}const Es=[0,4,2,1],_s=[8,8,4,2];class As{data;pos;constructor(t){this.pos=0,this.data=new Uint8ClampedArray(t)}getString(t){const e=this.data.slice(this.pos,this.pos+t);return this.pos+=e.length,e.reduce((t,e)=>t+String.fromCharCode(e),"")}nextByte(){return this.data[this.pos++]}nextTwoBytes(){return this.pos+=2,this.data[this.pos-2]+(this.data[this.pos-1]<<8)}readSubBlocks(){let t,e="";do{t=this.data[this.pos++];for(let i=t;--i>=0;e+=String.fromCharCode(this.data[this.pos++]));}while(0!==t);return e}readSubBlocksBin(){let t=this.data[this.pos],e=0;for(let i=0;0!==t;i+=t+1,t=this.data[this.pos+i])e+=t;const i=new Uint8Array(e);t=this.data[this.pos++];for(let e=0;0!==t;t=this.data[this.pos++])for(let s=t;--s>=0;i[e++]=this.data[this.pos++]);return i}skipSubBlocks(){for(const t=1,e=0;this.data[this.pos]!==e;this.pos+=this.data[this.pos]+t);this.pos++}}var Fs,Ls;!function(t){t[t.Replace=0]="Replace",t[t.Combine=1]="Combine",t[t.RestoreBackground=2]="RestoreBackground",t[t.RestorePrevious=3]="RestorePrevious",t[t.UndefinedA=4]="UndefinedA",t[t.UndefinedB=5]="UndefinedB",t[t.UndefinedC=6]="UndefinedC",t[t.UndefinedD=7]="UndefinedD"}(Fs||(Fs={})),function(t){t[t.Extension=33]="Extension",t[t.ApplicationExtension=255]="ApplicationExtension",t[t.GraphicsControlExtension=249]="GraphicsControlExtension",t[t.PlainTextExtension=1]="PlainTextExtension",t[t.CommentExtension=254]="CommentExtension",t[t.Image=44]="Image",t[t.EndOfFile=59]="EndOfFile"}(Ls||(Ls={}));function Bs(t,e){const i=[];for(let s=0;s<e;s++)i.push({r:t.data[t.pos],g:t.data[t.pos+1],b:t.data[t.pos+2]}),t.pos+=3;return i}function Vs(t,e,i){const s=e>>>3,n=7&e;return(t[s]+(t[s+1]<<8)+(t[s+2]<<16)&(1<<i)-1<<n)>>>n}async function Us(t,e,i,s,n,a,o){switch(t.nextByte()){case Ls.EndOfFile:return!0;case Ls.Image:await async function(t,e,i,s,n,a){const o=e.frames[s(!0)];o.left=t.nextTwoBytes(),o.top=t.nextTwoBytes(),o.width=t.nextTwoBytes(),o.height=t.nextTwoBytes();const r=t.nextByte(),l=!(128&~r),c=!(64&~r);o.sortFlag=!(32&~r),o.reserved=(24&r)>>>3;const h=1<<1+(7&r);l&&(o.localColorTable=Bs(t,h));const d=t=>{const{r:s,g:a,b:r}=(l?o.localColorTable:e.globalColorTable)[t];return t!==n(null)?{r:s,g:a,b:r,a:255}:{r:s,g:a,b:r,a:i?Math.trunc((s+a+r)/3):0}},u=(()=>{try{return new ImageData(o.width,o.height,a)}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==u)throw new EvalError("GIF frame size is to large");const p=t.nextByte(),g=t.readSubBlocksBin(),f=1<<p;if(c){for(let t=0,e=p+1,i=0,s=[[0]],n=0;n<4;n++)if(Es[n]<o.height){let a=0,r=0,l=!1;for(;!l;){const c=t;if(t=Vs(g,i,e),i+=e+1,t===f){e=p+1,s.length=f+2;for(let t=0;t<s.length;t++)s[t]=t<f?[t]:[]}else{t>=s.length?s.push(s[c].concat(s[c][0])):c!==f&&s.push(s[c].concat(s[t][0]));for(const e of s[t]){const{r:t,g:i,b:s,a:l}=d(e);u.data.set([t,i,s,l],Es[n]*o.width+_s[n]*r+a%(4*o.width)),a+=4}s.length===1<<e&&e<12&&e++}a===4*o.width*(r+1)&&(r++,Es[n]+_s[n]*r>=o.height&&(l=!0))}}o.image=u,o.bitmap=await createImageBitmap(u)}else{let t=0,e=p+1,i=0,s=-4;const n=[[0]];for(;;){const a=t;if(t=Vs(g,i,e),i+=e,t===f){e=p+1,n.length=f+2;for(let t=0;t<n.length;t++)n[t]=t<f?[t]:[]}else{if(t===f+1)break;t>=n.length?n.push(n[a].concat(n[a][0])):a!==f&&n.push(n[a].concat(n[t][0]));for(const e of n[t]){const{r:t,g:i,b:n,a:a}=d(e);s+=4,u.data.set([t,i,n,a],s)}n.length>=1<<e&&e<12&&e++}}o.image=u,o.bitmap=await createImageBitmap(u)}}(t,e,i,s,n,a);break;case Ls.Extension:!function(t,e,i,s){switch(t.nextByte()){case Ls.GraphicsControlExtension:{const n=e.frames[i(!1)];t.pos++;const a=t.nextByte();n.GCreserved=(224&a)>>>5,n.disposalMethod=(28&a)>>>2,n.userInputDelayFlag=!(2&~a);const o=!(1&~a);n.delayTime=10*t.nextTwoBytes();const r=t.nextByte();o&&s(r),t.pos++;break}case Ls.ApplicationExtension:{t.pos++;const i={identifier:t.getString(8),authenticationCode:t.getString(3),data:t.readSubBlocksBin()};e.applicationExtensions.push(i);break}case Ls.CommentExtension:e.comments.push([i(!1),t.readSubBlocks()]);break;case Ls.PlainTextExtension:if(0===e.globalColorTable.length)throw new EvalError("plain text extension without global color table");t.pos++,e.frames[i(!1)].plainTextData={left:t.nextTwoBytes(),top:t.nextTwoBytes(),width:t.nextTwoBytes(),height:t.nextTwoBytes(),charSize:{width:t.nextTwoBytes(),height:t.nextTwoBytes()},foregroundColor:t.nextByte(),backgroundColor:t.nextByte(),text:t.readSubBlocks()};break;default:t.skipSubBlocks()}}(t,e,s,n);break;default:throw new EvalError("undefined block found")}return!1}async function Gs(t,e){if("gif"===t.type){t.loading=!0;try{t.gifData=await async function(t,e,i,s){s??=!1;const n=await fetch(t);if(!n.ok&&404===n.status)throw new EvalError("file not found");const a=await n.arrayBuffer(),o={width:0,height:0,totalTime:0,colorRes:0,pixelAspectRatio:0,frames:[],sortFlag:!1,globalColorTable:[],backgroundImage:new ImageData(1,1,e),comments:[],applicationExtensions:[]},r=new As(new Uint8ClampedArray(a));if("GIF89a"!==r.getString(6))throw new Error("not a supported GIF file");o.width=r.nextTwoBytes(),o.height=r.nextTwoBytes();const l=r.nextByte(),c=!(128&~l);o.colorRes=(112&l)>>>4,o.sortFlag=!(8&~l);const h=1<<1+(7&l),d=r.nextByte();o.pixelAspectRatio=r.nextByte(),0!==o.pixelAspectRatio&&(o.pixelAspectRatio=(o.pixelAspectRatio+15)/64),c&&(o.globalColorTable=Bs(r,h));const u=(()=>{try{return new ImageData(o.width,o.height,e)}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==u)throw new Error("GIF frame size is to large");const{r:p,g:g,b:f}=o.globalColorTable[d];u.data.set(c?[p,g,f,255]:[0,0,0,0]);for(let t=4;t<u.data.length;t*=2)u.data.copyWithin(t,0,t);o.backgroundImage=u;let m=-1,y=!0,v=-1;const w=t=>(t&&(y=!0),m),b=t=>(null!=t&&(v=t),v);try{do{y&&(o.frames.push({left:0,top:0,width:0,height:0,disposalMethod:Fs.Replace,image:new ImageData(1,1,e),plainTextData:null,userInputDelayFlag:!1,delayTime:0,sortFlag:!1,localColorTable:[],reserved:0,GCreserved:0}),m++,v=-1,y=!1)}while(!await Us(r,o,s,w,b,e));o.frames.length--;for(const t of o.frames){if(t.userInputDelayFlag&&0===t.delayTime){o.totalTime=1/0;break}o.totalTime+=t.delayTime}return o}catch(t){if(t instanceof EvalError)throw new Error(`error while parsing frame ${m.toString()} "${t.message}"`,{cause:t});throw t}}(t.source,e),t.gifLoopCount=function(t){for(const e of t.applicationExtensions)if(e.identifier+e.authenticationCode==="NETSCAPE2.0")return e.data[1]+(e.data[2]<<8);return Number.NaN}(t.gifData),t.gifLoopCount||(t.gifLoopCount=1/0)}catch{t.error=!0}t.loading=!1}else await Is(t)}class $s{#u;#n;constructor(t,e){this.#n=t,this.#u=e}draw(t){const{context:e,radius:i,particle:s,opacity:n}=t,a=s.image,r=a?.element;if(a){if(e.globalAlpha=n,a.gif&&a.gifData)!function(t,e){const{context:i,radius:s,particle:n,delta:a}=t,r=n.image;if(!r?.gifData||!r.gif)return;const c=new OffscreenCanvas(r.gifData.width,r.gifData.height),h=c.getContext("2d",e);if(!h)throw new Error("could not create offscreen canvas context");h.imageSmoothingQuality="low",h.imageSmoothingEnabled=!1,h.clearRect(l.x,l.y,c.width,c.height),n.gifLoopCount??=r.gifLoopCount??0;let d=n.gifFrame??0;const u={x:-r.gifData.width*o,y:-r.gifData.height*o},p=r.gifData.frames[d];if(n.gifTime??=0,p.bitmap){switch(i.scale(s/r.gifData.width,s/r.gifData.height),p.disposalMethod){case Fs.UndefinedA:case Fs.UndefinedB:case Fs.UndefinedC:case Fs.UndefinedD:case Fs.Replace:h.drawImage(p.bitmap,p.left,p.top),i.drawImage(c,u.x,u.y),h.clearRect(l.x,l.y,c.width,c.height);break;case Fs.Combine:h.drawImage(p.bitmap,p.left,p.top),i.drawImage(c,u.x,u.y);break;case Fs.RestoreBackground:h.drawImage(p.bitmap,p.left,p.top),i.drawImage(c,u.x,u.y),h.clearRect(l.x,l.y,c.width,c.height),r.gifData.globalColorTable.length?h.putImageData(r.gifData.backgroundImage,u.x,u.y):h.putImageData(r.gifData.frames[0].image,u.x+p.left,u.y+p.top);break;case Fs.RestorePrevious:{const t=h.getImageData(l.x,l.y,c.width,c.height);h.drawImage(p.bitmap,p.left,p.top),i.drawImage(c,u.x,u.y),h.clearRect(l.x,l.y,c.width,c.height),h.putImageData(t,l.x,l.y)}}if(n.gifTime+=a.value,n.gifTime>p.delayTime){if(n.gifTime-=p.delayTime,++d>=r.gifData.frames.length){if(--n.gifLoopCount<=0)return;d=0,h.clearRect(l.x,l.y,c.width,c.height)}n.gifFrame=d}i.scale(r.gifData.width/s,r.gifData.height/s)}}(t,this.#u.canvas.render.settings);else if(r){const t=a.ratio,s={x:-i,y:-i},n=2*i;e.drawImage(r,s.x,s.y,n,n/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(!e.preload||!this.#n.loadImage)return;const i=[];for(const s of e.preload)i.push(this.#n.loadImage(t,s));await Promise.all(i)}loadShape(t){const e=this.#u;if(!t.shape||!ks.includes(t.shape))return;const i=t.shapeData;if(!i)return;const s=this.#n.getImages?.(e),n=s?.find(t=>t.name===i.name||t.source===i.src);n||this.#P(e,i).then(()=>{this.loadShape(t)})}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;const i=this.#n.getImages?.(t),s=e.shapeData;if(!s)return;const n=e.getFillColor(),a=i?.find(t=>t.name===s.name||t.source===s.src);if(!a)return;const o=s.replaceColor;a.loading?setTimeout(()=>{this.particleInit(t,e)}):(async()=>{let i;i=a.svgData&&n?await Rs(a,s,n,e,t.hdr):{color:n,data:a,element:a.element,gif:a.gif,gifData:a.gifData,gifLoopCount:a.gifLoopCount,loaded:!0,ratio:s.width&&s.height?s.width/s.height:a.ratio??1,replaceColor:o,source:s.src},i.ratio||(i.ratio=1);const r={image:i,close:s.close??e.shapeClose};e.image=r.image,e.shapeClose=r.close})()}#P=async(t,e)=>{if(!this.#n.loadImage)throw new Error("Image shape not initialized");await this.#n.loadImage(t,{gif:e.gif,name:e.name,replaceColor:e.replaceColor,src:e.src})}}class js{gif=!1;height;name;replaceColor;src="";width;load(t){T(t)||(Kt(this,"gif",t.gif),Kt(this,"height",t.height),Kt(this,"name",t.name),Kt(this,"replaceColor",t.replaceColor),Kt(this,"src",t.src),Kt(this,"width",t.width))}}class qs{id="image-preloader";#n;constructor(t){this.#n=t}async getPlugin(t){const{ImagePreloaderInstance:e}=await Promise.resolve().then(function(){return ha});return new e(this.#n,t)}loadOptions(t,e,i){if(!i?.preload)return;e.preload??=[];const s=e.preload;for(const t of i.preload){const e=s.find(e=>e.name===t.name||e.src===t.src);if(e)e.load(t);else{const e=new js;e.load(t),s.push(e)}}}needsPlugin(){return!0}}async function Ws(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{!function(t){t.getImages??=e=>{t.images??=new Map;let i=t.images.get(e);return i||(i=[],t.images.set(e,i)),i},t.loadImage??=async(e,i)=>{if(!t.getImages)throw new Error("No images collection found");if(!i.name&&!i.src)throw new Error("No image source provided");t.images??=new Map;const s=t.getImages(e);if(!s.some(t=>t.name===i.name||t.source===i.src))try{const n={gif:i.gif,name:i.name??i.src,source:i.src,type:i.src.substring(i.src.length-3),error:!1,loading:!0,replaceColor:i.replaceColor,ratio:i.width&&i.height?i.width/i.height:void 0};let a;s.push(n),t.images.set(e,s),a=i.gif?t=>Gs(t,{colorSpace:"srgb"}):i.replaceColor?Ts:Is,await a(n)}catch{throw new Error(`${i.name??i.src} not found`)}}}(t),t.pluginManager.addPlugin(new qs(t)),t.pluginManager.addShape(ks,e=>Promise.resolve(new $s(t,e)))})}class Ns extends ge{sync=!1;load(t){T(t)||(super.load(t),Kt(this,"sync",t.sync))}}class Hs extends ge{sync=!1;load(t){T(t)||(super.load(t),Kt(this,"sync",t.sync))}}class Qs{count=0;delay=new Ns;duration=new Hs;load(t){T(t)||(Kt(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Ks{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const s=i.delay.sync?1:A(),n=i.duration.sync?1:A();t.life={delay:e.retina.reduceFactor?$(i.delay.value)*s/e.retina.reduceFactor*r:0,delayTime:0,duration:e.retina.reduceFactor?$(i.duration.value)*n/e.retina.reduceFactor*r:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){Jt(t,"life",Qs,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const a=W(0,i.width),o=W(0,i.width);t.position.x=G(a),t.position.y=G(o),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const l=t.options.life;l&&(s.delay=$(l.delay.value)*r,s.duration=$(l.duration.value)*r)}(t,e,this.#u.canvas.size)}}async function Xs(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new Ks(t)))})}class Ys{factor=4;value=!0;load(t){T(t)||(Kt(this,"factor",t.factor),Kt(this,"value",t.value))}}class Zs{disable=!0;reduce=new Ys;load(t){T(t)||(Kt(this,"disable",t.disable),this.reduce.load(t.reduce))}}class Js{id="motion";async getPlugin(t){const{MotionPluginInstance:e}=await Promise.resolve().then(function(){return da});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.motion;s?.load||(e.motion=s=new Zs),s.load(i?.motion)}needsPlugin(){return!0}}async function tn(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Js)})}const en=new Map;function sn(t,e){const{context:i,radius:s}=t,n=function(t){const e=en.get(t);if(e)return e;const i=u/t,s=!!(t%2),n=(-Math.PI+(s?0:i))*o,a=[];for(let e=0;e<t;e++){const t=n+e*i;a[e]={x:Math.cos(t),y:Math.sin(t)}}return en.set(t,a),a}(e.count.numerator/e.count.denominator);i.beginPath();for(let t=0;t<n.length;t++){const e=n[t];if(!e)continue;const a=e.x*s,o=e.y*s;t?i.lineTo(a,o):i.moveTo(a,o)}i.closePath()}class nn{draw(t){const{particle:e,radius:i}=t;sn(t,this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round($(e?.sides??5))}}class an extends nn{getSidesData(t,e){const{sides:i}=t;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class on extends nn{getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:1,numerator:3},length:2.66*e/1}}}async function rn(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["polygon"],()=>Promise.resolve(new an))})}async function ln(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["triangle"],()=>Promise.resolve(new on))})}async function cn(t){t.checkVersion("4.2.0"),await Promise.all([rn(t),ln(t)])}var hn;!function(t){t.both="both",t.horizontal="horizontal",t.vertical="vertical"}(hn||(hn={}));class dn{enable=!1;value=0;load(t){T(t)||(Kt(this,"enable",t.enable),Xt(this,"value",t.value))}}class un{backColor;darken=new dn;enable=!1;enlighten=new dn;mode=hn.vertical;speed=25;load(t){T(t)||(void 0!==t.backColor&&(this.backColor=ne.create(this.backColor,t.backColor)),this.darken.load(t.darken),Kt(this,"enable",t.enable),this.enlighten.load(t.enlighten),Kt(this,"mode",t.mode),Xt(this,"speed",t.speed))}}class pn{#p;constructor(t){this.#p=t}getTransformValues(t){const e=t.roll?.enable&&t.roll,i=e&&e.horizontal,s=e&&e.vertical;return{a:i?Math.cos(e.angle):void 0,d:s?Math.sin(e.angle):void 0}}init(e){!function(e,i){const s=i.options.roll;if(s?.enable)if(i.roll={enable:s.enable,horizontal:s.mode===hn.horizontal||s.mode===hn.both,vertical:s.mode===hn.vertical||s.mode===hn.both,angle:A()*u,speed:$(s.speed)/360},s.backColor)i.backColor=Be(e,s.backColor);else if(s.darken.enable&&s.enlighten.enable){const e=A()>=o?t.AlterType.darken:t.AlterType.enlighten;i.roll.alter={type:e,value:$(e===t.AlterType.darken?s.darken.value:s.enlighten.value)}}else s.darken.enable?i.roll.alter={type:t.AlterType.darken,value:$(s.darken.value)}:s.enlighten.enable&&(i.roll.alter={type:t.AlterType.enlighten,value:$(s.enlighten.value)});else i.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this.#p,e)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){Jt(t,"roll",un,...e)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.options.roll,s=t.roll;if(!s||!i?.enable)return;const n=s.speed*e.factor,a=u;s.angle+=n,s.angle>a&&(s.angle-=a)}(t,e)}}async function gn(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("roll",()=>Promise.resolve(new pn(t.pluginManager)))})}class fn{decay=0;enable=!1;speed=0;sync=!1;load(t){T(t)||(Kt(this,"enable",t.enable),Xt(this,"speed",t.speed),Xt(this,"decay",t.decay),Kt(this,"sync",t.sync))}}class mn extends ge{animation=new fn;direction=t.RotateDirection.clockwise;path=!1;load(t){T(t)||(super.load(t),Kt(this,"direction",t.direction),this.animation.load(t.animation),Kt(this,"path",t.path))}}class yn{#u;constructor(t){this.#u=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:X($(i.value)),min:0,max:u},e.pathRotation=i.path;let s=i.direction;if(s===t.RotateDirection.random){s=Math.floor(2*A())>0?t.RotateDirection.counterClockwise:t.RotateDirection.clockwise}switch(s){case t.RotateDirection.counterClockwise:case"counterClockwise":e.rotate.status=t.AnimationStatus.decreasing;break;case t.RotateDirection.clockwise:e.rotate.status=t.AnimationStatus.increasing}const n=i.animation;n.enable&&(e.rotate.decay=1-$(n.decay),e.rotate.velocity=$(n.speed)/360*this.#u.retina.reduceFactor,n.sync||(e.rotate.velocity*=A())),e.rotation=e.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){Jt(t,"rotate",mn,...e)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(vi(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function vn(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new yn(t)))})}class wn{draw(t){!function(t){const{context:e,radius:i}=t,s=i*Math.SQRT1_2,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}async function bn(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new wn))})}const xn=0,Pn=0;class Mn{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.sides,a=i.starInset??2;e.moveTo(xn,Pn-s);for(let t=0;t<n;t++)e.rotate(Math.PI/n),e.lineTo(xn,Pn-s*a),e.rotate(Math.PI/n),e.lineTo(xn,Pn-s)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round($(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=$(i?.inset??2)}}async function zn(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["star"],()=>Promise.resolve(new Mn))})}var Cn;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(Cn||(Cn={}));class Sn{decay=0;enable=!1;speed=0;sync=!1;load(t){T(t)||(Kt(this,"enable",t.enable),Xt(this,"speed",t.speed),Xt(this,"decay",t.decay),Kt(this,"sync",t.sync))}}class Dn extends ge{animation=new Sn;direction=Cn.clockwise;enable=!1;load(t){super.load(t),T(t)||(this.animation.load(t.animation),Kt(this,"direction",t.direction),Kt(this,"enable",t.enable))}}class kn{#u;constructor(t){this.#u=t}getTransformValues(t){const e=t.tilt?.enable&&t.tilt;return{b:e?Math.cos(e.value)*e.cosDirection:void 0,c:e?Math.sin(e.value)*e.sinDirection:void 0}}init(e){const i=e.options.tilt;if(!i)return;e.tilt={enable:i.enable,value:X($(i.value)),sinDirection:A()>=o?1:-1,cosDirection:A()>=o?1:-1,min:0,max:u};let s=i.direction;if(s===Cn.random){s=Math.floor(2*A())>0?Cn.counterClockwise:Cn.clockwise}switch(s){case Cn.counterClockwise:case"counterClockwise":e.tilt.status=t.AnimationStatus.decreasing;break;case Cn.clockwise:e.tilt.status=t.AnimationStatus.increasing}const n=e.options.tilt?.animation;n?.enable&&(e.tilt.decay=1-$(n.decay),e.tilt.velocity=$(n.speed)/360*this.#u.retina.reduceFactor,n.sync||(e.tilt.velocity*=A()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){Jt(t,"tilt",Dn,...e)}update(e,i){this.isEnabled(e)&&e.tilt&&vi(e,e.tilt,!1,t.DestroyType.none,i)}}async function On(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("tilt",t=>Promise.resolve(new kn(t)))})}class In{angle=50;move=10;load(t){T(t)||(Xt(this,"angle",t.angle),Xt(this,"move",t.move))}}class Tn{distance=5;enable=!1;speed=new In;load(t){if(!T(t)&&(Xt(this,"distance",t.distance),Kt(this,"enable",t.enable),void 0!==t.speed))if(k(t.speed))this.speed.load({angle:t.speed});else{const e=t.speed;"min"in e?this.speed.load({angle:e}):this.speed.load(t.speed)}}}class Rn{#u;constructor(t){this.#u=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:A()*u,angleSpeed:$(e.speed.angle)/360,moveSpeed:$(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=$(e?.distance??0)*this.#u.retina.pixelRatio}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.options.wobble?.enable}loadOptions(t,...e){Jt(t,"wobble",Tn,...e)}update(t,e){this.isEnabled(t)&&function(t,e,i){const{wobble:s}=e.options,{wobble:n}=e;if(!s?.enable||!n)return;const a=t.retina.reduceFactor,o=n.angleSpeed*i.factor*a,r=n.moveSpeed*i.factor*a*(e.retina.wobbleDistance??0)/16.666666666666668,l=u,{position:c}=e;n.angle+=o,n.angle>l&&(n.angle-=l),c.x+=r*Math.cos(n.angle),c.y+=r*Math.abs(Math.sin(n.angle))}(this.#u,t,e)}}async function En(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("wobble",t=>Promise.resolve(new Rn(t)))})}class _n{angle;colors;count;decay;disableForReducedMotion;drift;flat;gravity;position;scalar;shapeOptions;shapes;spread;startVelocity;ticks;zIndex;constructor(){this.angle=90,this.count=50,this.spread=45,this.startVelocity=45,this.decay=.9,this.gravity=1,this.drift=0,this.ticks=200,this.position={x:50,y:50},this.colors=["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],this.shapes=["square","circle"],this.scalar=1,this.zIndex=100,this.disableForReducedMotion=!0,this.flat=!1,this.shapeOptions={}}get origin(){return{x:this.position.x/a,y:this.position.y/a}}set origin(t){this.position.x=t.x*a,this.position.y=t.y*a}get particleCount(){return this.count}set particleCount(t){this.count=t}load(t){if(T(t))return;Kt(this,"angle",t.angle);const e=t.count??t.particleCount;void 0!==e&&(this.count=e),Kt(this,"spread",t.spread),Kt(this,"startVelocity",t.startVelocity),Kt(this,"decay",t.decay),Kt(this,"flat",t.flat),Kt(this,"gravity",t.gravity),Kt(this,"drift",t.drift),Kt(this,"ticks",t.ticks);const i=t.origin;i&&!t.position&&(t.position={x:void 0===i.x?void 0:i.x*a,y:void 0===i.y?void 0:i.y*a});const s=t.position;s&&(void 0!==s.x&&(this.position.x=s.x),void 0!==s.y&&(this.position.y=s.y)),void 0!==t.colors&&(I(t.colors)?this.colors=[...t.colors]:this.colors=t.colors);const n=t.shapeOptions;if(void 0!==n)for(const t in n){const e=n[t];e&&(this.shapeOptions[t]=gt(this.shapeOptions[t]??{},e))}void 0!==t.shapes&&(I(t.shapes)?this.shapes=[...t.shapes]:this.shapes=t.shapes),Kt(this,"scalar",t.scalar),Kt(this,"zIndex",t.zIndex),Kt(this,"disableForReducedMotion",t.disableForReducedMotion)}}const An=new Map;async function Fn(t,e){const i=new _n;i.load(e.options);const s=Number.isFinite(i.ticks)&&i.ticks>0?i.ticks:void 0,n=void 0===s?0:12e3/(60*s);let a=An.get(e.id);a instanceof Promise&&(await a,a=An.get(e.id));const o=a;if(o&&!o.destroyed){const t=o;if("addEmitter"in t)return await async function(t,e,i){await(t.addEmitter?.({startCount:e.count,position:e.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{paint:{fill:{color:{value:e.colors},enable:!0}},shape:{type:e.shapes,options:e.shapeOptions},life:{count:1},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:i,startValue:"max",destroy:"min",count:1}},size:{value:5*e.scalar},move:{angle:{value:e.spread,offset:0},drift:{min:-e.drift,max:e.drift},gravity:{acceleration:9.81*e.gravity},speed:3*e.startVelocity,decay:1-e.decay,direction:-e.angle},rotate:{value:e.flat?0:{min:0,max:360},direction:"random",animation:{enable:!e.flat,speed:60}},tilt:{direction:"random",enable:!e.flat,value:e.flat?0:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!e.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!e.flat,speed:{min:-15,max:15}}}}))}(t,i,n),o}const r=(async()=>{const s=function(t,e,i){return{fullScreen:{enable:!e.canvas,zIndex:t.zIndex},fpsLimit:120,particles:{number:{value:0},paint:{fill:{color:{value:t.colors},enable:!0}},shape:{type:t.shapes,options:t.shapeOptions},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:i,startValue:"max",destroy:"min",count:1}},size:{value:5*t.scalar},links:{enable:!1},life:{count:1},move:{angle:{value:t.spread,offset:0},drift:{min:-t.drift,max:t.drift},enable:!0,gravity:{enable:!0,acceleration:9.81*t.gravity},speed:3*t.startVelocity,decay:1-t.decay,direction:-t.angle,random:!0,straight:!1,outModes:{top:"none",default:"destroy"}},rotate:{value:t.flat?0:{min:0,max:360},direction:"random",animation:{enable:!t.flat,speed:60}},tilt:{direction:"random",enable:!t.flat,value:t.flat?0:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!t.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!t.flat,speed:{min:-15,max:15}}},motion:{disable:t.disableForReducedMotion},emitters:{name:"confetti",startCount:t.count,position:t.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}}}(i,e,n),a=await t.load({id:e.id,element:e.canvas,options:s});return An.set(e.id,a),a})();return An.set(e.id,r),r}let Ln=null;async function Bn(t){return Ln||(Ln=async function(t){t.checkVersion("4.2.0"),await t.pluginManager.register(async t=>{await Promise.all([Ui(t),tn(t),bs(t),cs(t),Ds(t),Ws(t),cn(t),bn(t),zn(t),Cs(t),vn(t),Xs(t),gn(t),On(t),En(t)])})}(t),Ln)}async function Vn(t,e){let i,s;return await Bn(ti),D(t)?(s=t,i=e??{}):(s="confetti",i=t),Fn(ti,{id:s,options:i})}Vn.create=async(t,e={})=>{await Bn(ti);const i=t?.getAttribute("id")??"confetti";return t?.setAttribute("id",i),await Fn(ti,{id:i,canvas:t??void 0,options:e}),async(s,n)=>{let a,o;return D(s)?(o=s,a=n??e):(o=i,a=s),Fn(ti,{id:o,canvas:t??void 0,options:a})}},Vn.init=async()=>{await Bn(ti)},Vn.version="4.2.0",globalThis.confetti=Vn;const Un=globalThis;Un.confetti=Vn,Un.tsParticles=ti;function Gn(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class $n{#M;#z;#C;#S;#D;#u;#k;#O;#I;#T;#R;#E;#_;#A;#p;#F;#L;#B={};#V=[void 0,void 0];#U={};constructor(t,e,i){this.#p=t,this.#u=e,this.#z=i,this.#k=null,this.#L=[],this.#F=[],this.#D=[],this.#M=[],this.#C=[],this.#S=[],this.#I=[],this.#T=[],this.#R=[],this.#E=[],this.#A=[],this.#_=[]}get settings(){return this.#O}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(l.x,l.y,this.#z.size.width,this.#z.size.height)})}clear(){let t=!1;for(const e of this.#M)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this.#L=[],this.#F=[],this.#D=[],this.#M=[],this.#C=[],this.#S=[],this.#I=[],this.#T=[],this.#R=[],this.#E=[],this.#A=[],this.#_=[]}draw(t){const e=this.#k;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[a,o]=this.#G(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#U,g=this.#B,f=a?Ne(a,r.hdr,h*d):void 0,m=o?Ne(o,r.hdr,u*d):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=m,this.draw(s=>{for(const i of this.#R)i.drawParticleSetup?.(s,t,e);this.#$(s,t,i,d,g,p),this.#j({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#q(t);for(const i of this.#T)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#I)this.#W(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#u;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#A)e.drawSettingsSetup?.(i,t);for(const e of this.#E)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#S)e.clearDraw?.(i,t);for(const e of this.#_)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#D=[],this.#M=[],this.#C=[],this.#S=[],this.#I=[],this.#R=[],this.#T=[],this.#E=[],this.#A=[],this.#_=[];for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#D.push(t),t.canvasClear&&this.#M.push(t),t.canvasPaint&&this.#C.push(t),t.drawParticle&&this.#I.push(t),t.drawParticleSetup&&this.#R.push(t),t.drawParticleCleanup&&this.#T.push(t),t.draw&&this.#E.push(t),t.drawSettingsSetup&&this.#A.push(t),t.drawSettingsCleanup&&this.#_.push(t),t.clearDraw&&this.#S.push(t)}initUpdaters(){this.#L=[],this.#F=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#F.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#L.push(t)}paint(){let t=!1;for(const e of this.#C)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(l.x,l.y,this.#z.size.width,this.#z.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,l.x,l.y,this.#z.size.width,this.#z.size.height),i.globalAlpha=s})}setContext(t){this.#k=t,this.#k&&(this.#k.globalCompositeOperation=i)}setContextSettings(t){this.#O=t}stop(){this.draw(t=>{t.clearRect(l.x,l.y,this.#z.size.width,this.#z.size.height)})}#q(t){for(const e of this.#F)e.afterDraw?.(t)}#$(t,e,i,s,n,a){for(const o of this.#L){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,s);a&&(n.fill=a),r&&(n.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)Gn(a,t,e)}o.beforeDraw?.(e)}}#N(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#H(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#j(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(l),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.y),a.fill&&(i.fillStyle=a.fill);const g=!!s.fillEnabled,f=s.strokeWidth??0;i.lineWidth=f,a.stroke&&(i.strokeStyle=a.stroke);const m={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:g,stroke:f>0,transformData:u,position:{...d},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;this.#H(y,m),this.#Q(v,m),this.#K(v,m),this.#X(v,m),this.#N(y,m),i.resetTransform()}#W(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#K(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:a}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),a&&i.stroke())}#X(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#Q(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#G(t){let e,i;for(const s of this.#D)if(!e&&s.particleFillColor&&(e=Be(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Be(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#V[0]=e,this.#V[1]=i,this.#V}}const jn=new WeakMap;function qn(t,e,i=!1){if(!e)return;const s=t.style,n=new Set;for(let t=0;t<s.length;t++){const e=s.item(t);e&&n.add(e)}for(let t=0;t<e.length;t++){const i=e.item(t);i&&n.add(i)}for(const t of n){const n=e.getPropertyValue(t);n?s.setProperty(t,n,i?"important":""):s.removeProperty(t)}}class Wn{domElement;render;renderCanvas;size;zoom=1;#u;#Y;#Z;#J;#p;#tt;#et;#it;#st;constructor(t,e){this.#p=t,this.#u=e,this.render=new $n(t,e,this),this.#it={height:0,width:0};const i=e.retina.pixelRatio,s=this.#it;this.size={height:s.height*i,width:s.width*i},this.#Y=!1,this.#et=[],this.#tt="none"}get#nt(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#Y){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#at();this.render.destroy(),this.#et=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#st?this.#st:{x:e*o/t,y:i*o/t}}init(){this.#ot(t=>{t.disconnect()}),this.#Z=lt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#rt()}),this.resize(),this.#lt(),this.initBackground(),this.#ot(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#ct(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Fe(this.#p,e.color);s.backgroundColor=n?We(n,t.actualOptions.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#et=[];for(const t of this.#u.plugins)t.resize&&this.#et.push(t)}loadCanvas(t){this.#Y&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#Y=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=jn.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return jn.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#J=vt(s.style));const n=this.#it,a=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=a.height,n.width=a.width);const o=this.#u.retina.pixelRatio,r=this.size;a.height=r.height=n.height*o,a.width=r.width=n.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#it,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=o.width,i.height=l.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#tt=t,this.#rt())}setZoom(t,e){this.zoom=t,this.#st=e}stop(){this.#ot(t=>{t.disconnect()}),this.#Z=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#ht(),e&&await t.refresh()}#ht(){for(const t of this.#et)t.resize?.()}#ct(){const t=this.#u.actualOptions.hdr&&rt("(color-gamut: p3)")?.matches&&rt("(dynamic-range: high)")?.matches;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...t?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});const e=this.renderCanvas;e&&this.render.setContext(e.getContext("2d",this.render.settings))}#lt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#nt?this.#dt():this.#at();for(const i in e.style){if(!i||!(i in e.style))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}}#rt(){const t=this.domElement;if(!t)return;this.#ot(t=>{t.disconnect()}),this.#lt(),this.initBackground();const e=this.#tt;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#ot(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#at(){const t=this.domElement,e=this.#J;t&&e&&qn(t,e,!0)}#ot(t){this.#Z&&t(this.#Z)}#dt(){const t=this.domElement;t&&qn(t,xt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Nn{#u;#ut;#pt;#gt;constructor(t){this.#u=t,this.#ut={visibilityChange:()=>{this.#ft()},resize:()=>{this.#mt()}}}addListeners(){this.#yt(!0)}removeListeners(){this.#yt(!1)}#ft(){const t=this.#u;t.actualOptions.pauseOnBlur&&(ot().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#mt(){this.#gt&&(clearTimeout(this.#gt),this.#gt=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#gt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*r)}#yt(t){const e=this.#ut;this.#vt(t),Pt(document,n,e.visibilityChange,t,!1)}#vt(t){const e=this.#ut,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Pt(globalThis,s,e.resize,t);const n=i.canvas.domElement;this.#pt&&!t?(n&&this.#pt.unobserve(n),this.#pt.disconnect(),this.#pt=void 0):!this.#pt&&t&&n&&(this.#pt=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this.#mt()}),this.#pt.observe(n))}}function Hn(t){if(!ct(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}function Qn(t,e){const i=t%e;return i<0?i+e:i}function Kn(t,e,i,s){const n=Te(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=mt(n.effect.type,t.id,a),t.shape=mt(n.shape.type,t.id,a);const o=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=mt(e,t.id,a);i&&(t.effect=i)}o.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=mt(e,t.id,a);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===h){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(A()*i.length)]}if(t.shape===h){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(A()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return gt({close:e.close},mt(n,i,s))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return gt({close:e.close},mt(n,i,s))}(t.shape,r,t.id,a):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class Xn{backColor;bubble;destroyed;direction;effect;effectClose;effectData;fillColor;fillEnabled;fillOpacity;group;id;ignoresResizeRatio;initialPosition;initialVelocity;isRotating;justWarped;lastPathTime;misplaced;moveCenter;offset;opacity;options;outType;pathRotation;position;randomIndexData;retina;roll;rotation;shape;shapeClose;shapeData;sides;size;slow;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;#wt={fillOpacity:1,opacity:1,strokeOpacity:1};#bt=z.origin;#xt={sin:0,cos:0};#Pt={a:1,b:0,c:0,d:1};#u;#p;constructor(t,e){this.#p=t,this.#u=e}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0;s?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this.#u.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#Mt(this.bubble.color??Qe(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*o}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??$(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this.#wt.fillOpacity=i*s*e,this.#wt.opacity=i*e,this.#wt.strokeOpacity=i*n*e,this.#wt}getPosition(){return this.#bt.x=this.position.x+this.offset.x,this.#bt.y=this.position.y+this.offset.y,this.#bt.z=this.position.z,this.#bt}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#xt.sin=Math.sin(t),this.#xt.cos=Math.cos(t),this.#xt}getStrokeColor(){return this.#Mt(this.bubble.color??Qe(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#Pt.a=e.cos*(t.a??c.a),this.#Pt.b=i?e.sin*(t.b??1):t.b??c.b,this.#Pt.c=i?-e.sin*(t.c??1):t.c??c.c,this.#Pt.d=e.cos*(t.d??c.d),this.#Pt}init(e,i,s,n){const a=this.#u;!function(e,i,s){e.id=i,e.group=s,e.justWarped=!1,e.effectClose=!0,e.shapeClose=!0,e.pathRotation=!1,e.lastPathTime=0,e.destroyed=!1,e.unbreakable=!1,e.isRotating=!1,e.rotation=0,e.misplaced=!1,e.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},e.size={value:1,max:1,min:1,enable:!1},e.outType=t.ParticleOutType.normal,e.ignoresResizeRatio=!0}(this,e,n),this.options=Kn(this,a,this.#p,s),a.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(a.particleUpdaters,this),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#zt(i),this.initialVelocity=this.#Ct(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,a),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(a.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(a,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(a,this)}isInsideCanvas(t){return this.#St({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#St({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=Qn(t,u);return e>=Math.PI*o&&e<3*Math.PI*o}if(this.roll.horizontal){const e=Qn(t+Math.PI*o,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Qn(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Dt(t,e){let i=0,s=t?z.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return z.create(i.x,i.y,e)}const t=it({size:l,position:s}),c=z.create(t.x,t.y,e);this.#kt(c,r,o.left??o.default),this.#kt(c,r,o.right??o.default),this.#Ot(c,r,o.top??o.default),this.#Ot(c,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}}#Ct(){const e=this.options.move,i=Z(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=X($(e.angle.value)),n=X($(e.angle.offset)),a={left:n-s*o,right:n+s*o};return e.straight||(i.angle+=G(W(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=A()),i}#kt(e,i,s){Hn({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#Ot(e,i,s){Hn({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#It(e,i){const s=this.getRadius(),n=this.#u.canvas.size,a=this.position,o=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:o?a.y+s<n.height:a.y-s<n.height,reason:"default"}:e===t.OutModeDirection.left?{inside:o?a.x-s>0:a.x+s>0,reason:"default"}:e===t.OutModeDirection.right?{inside:o?a.x+s<n.width:a.x-s<n.width,reason:"default"}:e===t.OutModeDirection.top?{inside:o?a.y-s>0:a.y+s>0,reason:"default"}:{inside:a.x>=-s&&a.y>=-s&&a.y<=n.height+s&&a.x<=n.width+s,reason:"default"}}#Tt(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#St(t){const e=this.#It(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#Tt(t.direction,t.outMode),l=a?this.#Rt(a(r),"shape"):void 0,c=o?this.#Rt(o(r),"effect"):void 0;if(l&&c){const t=Math.max(l.margin??0,c.margin??0);return{inside:l.inside&&c.inside,margin:t>0?t:void 0,reason:"combined"}}return l??c??e}#Mt(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?Je(t,this.roll.alter.type,this.roll.alter.value):t:t}#zt(e){const i=this.#u,s=Math.floor($(this.options.zIndex.value)),n=this.#Dt(e,V(s,0,i.zLayers));if(!n)throw new Error("a valid position cannot be found for particle");this.position=n,this.initialPosition=this.position.copy();const a=i.canvas.size;switch(this.moveCenter={...yt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=Y(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case t.MoveDirection.inside:this.outType=t.ParticleOutType.inside;break;case t.MoveDirection.outside:this.outType=t.ParticleOutType.outside}this.offset=C.origin}#Rt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Yn{#Et;#_t=new Map;#At=[];#Ft;#Lt;#Bt=[];#Vt;constructor(t){this.#Et=t,this.#Ft=0,this.#Vt=0}clear(){this.#_t.clear();const t=this.#Lt;t&&(this.#Et=t),this.#Lt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Ut(e,i);this.#_t.has(s)||this.#_t.set(s,[]),this.#_t.get(s)?.push(t)}query(t,e,i=[]){const s=this.#Gt(t);if(!s)return i;const n=Math.floor(s.minX/this.#Et),a=Math.floor(s.maxX/this.#Et),o=Math.floor(s.minY/this.#Et),r=Math.floor(s.maxY/this.#Et);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#_t.get(a);if(o)for(const s of o)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this.#$t(t.x,t.y,e),a=this.query(n,i,s);return this.#jt(),a}queryRectangle(t,e,i,s=[]){const n=this.#qt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#jt(),a}setCellSize(t){this.#Lt=t}#$t(t,e,i){return(this.#At[this.#Ft++]??=new Wt(t,e,i)).reset(t,e,i)}#qt(t,e,i,s){return(this.#Bt[this.#Vt++]??=new Nt(t,e,i,s)).reset(t,e,i,s)}#Ut(t,e){return`${Math.floor(t/this.#Et)}_${Math.floor(e/this.#Et)}`}#Gt(t){if(t instanceof Wt){const e=t.radius,{x:i,y:s}=t.position;return{minX:i-e,maxX:i+e,minY:s-e,maxY:s+e}}if(t instanceof Nt){const{x:e,y:i}=t.position,{width:s,height:n}=t.size;return{minX:e,maxX:e+s,minY:i,maxY:i+n}}return null}#jt(){this.#Ft=0,this.#Vt=0}}class Zn{checkParticlePositionPlugins;grid;#Wt;#u;#Nt;#Ht;#Qt;#Kt;#Xt;#Yt;#p;#Zt;#Jt;#te;#ee;#ie;#se;constructor(t,e){this.#p=t,this.#u=e,this.#Qt=0,this.#Wt=[],this.#Zt=[],this.#Ht=0,this.#Nt=new Map,this.#Kt=new Map,this.#se=this.#ne(this.#u.zLayers),this.grid=new Yn(100),this.checkParticlePositionPlugins=[],this.#Xt=[],this.#Yt=[],this.#te=[],this.#Jt=[],this.#ie=[]}get count(){return this.#Wt.length}addParticle(e,i,s,n){const a=this.#u.actualOptions.particles.number.limit.mode,o=void 0===s?this.#Ht:this.#Nt.get(s)??this.#Ht,r=this.count;if(o>0)switch(a){case t.LimitMode.delete:{const t=r+1-o;t>0&&this.removeQuantity(t);break}case t.LimitMode.wait:if(r>=o)return}try{const a=this.#Zt.pop()??new Xn(this.#p,this.#u);a.init(this.#Qt,e,i,s);let o=!0;return n&&(o=n(a)),o?(this.#Wt.push(a),this.#ae(a),this.#Qt++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this.#Zt.push(a)}catch(t){It().warning(`error adding particle: ${t}`)}}clear(){this.#Wt=[],this.#Kt.clear(),this.#oe(this.#u.zLayers)}destroy(){this.#Wt=[],this.#Zt.length=0,this.#Kt.clear(),this.#se=[],this.checkParticlePositionPlugins=[],this.#Xt=[],this.#Yt=[],this.#te=[],this.#Jt=[],this.#ie=[]}drawParticles(t){for(let e=this.#se.length-1;e>=0;e--){const i=this.#se[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Wt.filter(t)}find(t){return this.#Wt.find(t)}get(t){return this.#Wt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#ie=[],this.#Yt=[],this.#te=[],this.#Xt=[],this.#Jt=[],this.#Kt.clear(),this.#oe(t.zLayers),this.grid=new Yn(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#ie.push(e),e.particleUpdate&&this.#Yt.push(e),e.postUpdate&&this.#te.push(e),e.particleReset&&this.#Xt.push(e),e.postParticleUpdate&&this.#Jt.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#Wt.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let a=t;n<e&&a<this.count;a++)this.#re(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Te(this.#p,this.#u,s);this.#le(n,i,t)}this.#le(t.particles,i)}setResizeFactor(t){this.#ee=t}update(t){this.grid.clear();for(const e of this.#ie)e.update?.(t);const e=this.#ce(t);for(const e of this.#te)e.postUpdate?.(t);if(this.#he(t,e),e.size)for(const t of e)this.remove(t);this.#ee=void 0}#de(...t){this.#Zt.push(...t)}#le(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Ht=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Nt.set(i,s?.number.limit.value??n.limit.value));const a=this.#ue(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,l=Math.min(o,r)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#Ht=n.limit.value*a:this.#Nt.set(i,n.limit.value*a),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)}#ne(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#pe(t){const e=this.#se.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#ue(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1}#ae(t){const e=this.#pe(t.position.z),i=this.#se[e];i&&(i.push(t),this.#Kt.set(t.id,e))}#re(e,i,s){const n=this.#Wt[e];return!!n&&(n.group===i&&(this.#Wt.splice(e,1),this.#ge(n),n.destroy(s),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this.#de(n),!0))}#ge(t){const e=this.#Kt.get(t.id)??this.#pe(t.position.z),i=this.#se[e];if(!i)return void this.#Kt.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Kt.delete(t.id)}#oe(t){const e=Math.max(Math.floor(t),1);if(this.#se.length===e)for(const t of this.#se)t.length=0;else this.#se=this.#ne(e)}#fe(t){const e=this.#pe(t.position.z),i=this.#Kt.get(t.id);if(void 0===i)return void this.#ae(t);if(i===e)return;const s=this.#se[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#se[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#Kt.set(t.id,e)}else this.#Kt.set(t.id,e)}#ce(t){const e=new Set,i=this.#ee;for(const s of this.#Wt){i&&!s.ignoresResizeRatio&&(s.position.x*=i.width,s.position.y*=i.height,s.initialPosition.x*=i.width,s.initialPosition.y*=i.height),s.ignoresResizeRatio=!1;for(const t of this.#Xt)t.particleReset?.(s);for(const e of this.#Yt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#he(t,e){for(const i of this.#Wt)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#Jt)e.postParticleUpdate?.(i,t);this.#fe(i)}}}class Jn{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=$(s.gravity.maxSpeed)*i,a.moveDrift=$(s.drift)*i,a.moveSpeed=$(s.speed)*i;const o=a.maxDistance;o.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,o.vertical=void 0===n.vertical?void 0:n.vertical*i}}function ta(t){return!t.destroyed}function ea(t,e,...i){const s=new Re(t,e);return Qt(s,...i),s}var ia=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#me;#ye;#ve={value:0,factor:0};#we;#be;#xe;#Pe;#Me;#ze;#Ce;#Se;#De;#ke;#Oe;#p;#Ie;#Te;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this.#p=s,this.#we=i,this.#De=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.#Ie=!1,this.#me=0,this.#xe=0,this.#Se=0,this.#Me=!0,this.started=!1,this.destroyed=!1,this.#Oe=!0,this.#Ce=0,this.zLayers=100,this.pageHidden=!1,this.#Te=o,this.#ze=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Jn(this),this.canvas=new Wn(this.#p,this),this.particles=new Zn(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#ke=ea(this.#p,this),this.actualOptions=ea(this.#p,this),this.#Pe=new Nn(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#Oe&&!this.pageHidden&&ta(this)}get options(){return this.#ke}get sourceOptions(){return this.#Te}addLifeTime(t){this.#Se+=t}alive(){return!this.#xe||this.#Se<=this.#xe}destroy(e=!0){if(ta(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#De(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#we(t,{container:this,data:e})}draw(t){if(!ta(this))return;let e=t;this.#be=L(t=>{e&&(this.#Ce=void 0,e=!1),this.#Re(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}It().error(`Export plugin with type ${t} not found`)}async init(){if(!ta(this))return;const e=new Map;for(const t of this.#p.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this.#ke=ea(this.#p,this,this.#ze,this.sourceOptions),this.actualOptions=ea(this.#p,this,this.#ke),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[t,i]of e)t.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:i,duration:s,fpsLimit:n,hdr:a,smooth:o,zLayers:l}=this.actualOptions;this.hdr=a,this.zLayers=l,this.#xe=$(s)*r,this.#me=$(i)*r,this.#Se=0,this.fpsLimit=n>0?n:120,this.#Ie=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(t.EventType.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(t.EventType.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){if(ta(this)&&(void 0!==this.#be&&(B(this.#be),this.#be=void 0),!this.#Oe)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Oe=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!ta(this))return;const i=this.#Oe||e;if(!this.#Me||this.actualOptions.autoPlay){if(this.#Oe&&(this.#Oe=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#Me=!1}async refresh(){if(ta(this))return this.stop(),this.start()}async reset(t){if(ta(this))return this.#ze=t,this.#Te=t,this.#ke=ea(this.#p,this,this.#ze,this.sourceOptions),this.actualOptions=ea(this.#p,this,this.#ke),this.refresh()}async start(){ta(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#Pe.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#ye=setTimeout(()=>{i()},this.#me)}))}stop(){if(ta(this)&&this.started){this.#ye&&(clearTimeout(this.#ye),this.#ye=void 0),this.#Me=!0,this.started=!1,this.#Pe.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this.#Te=this.#ke,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Re(t){try{if(!this.#Ie&&void 0!==this.#Ce&&t<this.#Ce+r/this.fpsLimit)return void this.draw(!1);if(this.#Ce??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this.#ve,t-this.#Ce,this.fpsLimit,this.#Ie),this.addLifeTime(this.#ve.value),this.#Ce=t,this.#ve.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#ve),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){It().error("error in animation loop",t)}}}});var sa=Object.freeze({__proto__:null,BlendPluginInstance:class{#u;#Ee;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#Ee&&(t.globalCompositeOperation=this.#Ee)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Ee=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function na(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=V(t.velocity.x,-1,1),t.velocity.y=V(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=l*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(a);const{position:p}=t;p.addTo(h),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}var aa=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(e){const i=e.options.move,s=i.gravity,n=i.path;if(e.moveDecay=1-$(i.decay),e.pathDelay=$(n.delay.value)*r,n.generator){let t=this.pathGenerators.get(n.generator);t||(t=this.availablePathGenerators.get(n.generator),t&&(this.pathGenerators.set(n.generator,t),t.init())),e.pathGenerator=t}e.gravity={enable:s.enable,acceleration:$(s.acceleration),inverse:s.inverse},function(e,i){const s=i.options.move.spin;if(!s.enable)return;const n=s.position??{x:50,y:50},a={x:.01*n.x*e.canvas.size.width,y:.01*n.y*e.canvas.size.height},o=Q(i.getPosition(),a),r=$(s.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:a,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:A()*u,radius:o,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options.move;if(!s.enable)return;const n=this.#u,a=function(t){return t.slow.inRange?t.slow.factor:1}(e),r=n.retina.reduceFactor,l=e.retina.moveSpeed,c=e.retina.moveDrift,h=e.size.max,d=l*(s.size?e.getRadius()/h:1)*a*(i.factor||1)*o,u=e.retina.maxSpeed;s.spin.enable?function(e,i,s,n){if(!i.spin)return;const a=i.spin.direction===t.RotateDirection.clockwise,r={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*r.x(i.spin.angle)*n,i.position.y=i.spin.center.y+i.spin.radius*r.y(i.spin.angle)*n,i.spin.radius+=i.spin.acceleration*n;const l=Math.max(e.canvas.size.width,e.canvas.size.height),c=l*o;i.spin.radius>c?(i.spin.radius=c,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*s*(1-i.spin.radius/l)}(n,e,d,r):na(e,s,d,u,c,r,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=N(e,t.position),n=Math.abs(i),a=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&n>=l||c&&a>=c)&&!t.misplaced)t.misplaced=!!l&&n>l||!!c&&a>c,l&&(t.velocity.x=t.velocity.y*o-t.velocity.x),c&&(t.velocity.y=t.velocity.x*o-t.velocity.y);else if((!l||n<l)&&(!c||a<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-A()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-A())}}(e)}preInit(){return this.#_e()}redrawInit(){return this.#_e()}update(){for(const t of this.pathGenerators.values())t.update()}async#_e(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var oa=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#b;constructor(t,e){this.#b=t,this.#u=e,this.#b.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(I(t))for(const e of t)await this.#b.addEmitter(this.#u,e);else await this.#b.addEmitter(this.#u,t)}pause(){for(const t of this.#b.getArray(this.#u))t.pause()}play(){for(const t of this.#b.getArray(this.#u))t.play()}resize(){for(const t of this.#b.getArray(this.#u))t.resize()}stop(){this.#b.clear(this.#u)}update(t){this.#b.getArray(this.#u).forEach(e=>{e.update(t)})}}});const ra=new Map;var la=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||ra.set(t,e)}getShapeGenerator(t){return ra.get(t)}getSupportedShapeGenerators(){return ra.keys()}}});var ca=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Ae;#p;constructor(t){this.#Ae=new Map,this.#p=t}async addEmitter(t,e,i){const s=new ms;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return ga}),a=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this.#Ae.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Ae.get(t);return e||(e=[],this.#Ae.set(t,e)),e}initContainer(t){this.#Ae.has(t)||(this.#Ae.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||k(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});var ha=Object.freeze({__proto__:null,ImagePreloaderInstance:class{#u;#n;constructor(t,e){this.#n=t,this.#u=e}destroy(){this.#n.images?.delete(this.#u)}}});var da=Object.freeze({__proto__:null,MotionPluginInstance:class{#u;constructor(t){this.#u=t}async init(){const t=this.#u,e=t.actualOptions.motion;if(!e||!e.disable&&!e.reduce.value)return void(t.retina.reduceFactor=1);const i=rt("(prefers-reduced-motion: reduce)");if(!i)return void(t.retina.reduceFactor=1);this.#Fe(i);i.addEventListener("change",()=>{(async()=>{this.#Fe(i);try{await t.refresh()}catch{}})()}),await Promise.resolve()}#Fe(t){const e=this.#u,i=e.actualOptions.motion;i&&(t.matches?i.disable?e.retina.reduceFactor=0:e.retina.reduceFactor=i.reduce.value?1/i.reduce.factor:1:e.retina.reduceFactor=1)}}});function ua(t,e,i,s){(t.paint??=new Pe).fill={color:ae.create(void 0,{value:e}),enable:s,opacity:i}}function pa(t,e,i,s){(t.paint??=new Pe).stroke={color:ae.create(void 0,{value:e}),opacity:i,width:s}}var ga=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#Le;#Be;#Ve;#xe;#Ue;#Ge;#$e;#je;#qe;#Z;#We;#Oe;#p;#Ne;#pt;#He;#Qe;#Ke;#Xe;constructor(e,i,s,n,o){this.#p=e,this.#u=i,this.#Ne=s,this.#Le=0,this.#Be=0,this.#Ve=0,this.#je=o,n instanceof ms?this.options=n:(this.options=new ms,this.options.load(n)),this.#Ke=i.retina.reduceFactor?$(this.options.life.delay??0)*r/i.retina.reduceFactor:1/0,this.position=this.#je??this.#Dt(),this.name=this.options.name,this.fill=this.options.fill,this.#Ge=!this.options.life.wait,this.#Xe=!1;const l=gt({},this.options.particles);if(l.move??={},l.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=Be(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=Be(this.#p,this.options.spawn.stroke.color)),this.#Oe=!this.options.autoPlay,this.#We=l,this.#Qe=this.#Ye(),this.size=this.#Qe.mode===t.PixelMode.percent?{width:this.#Qe.width/a*this.#u.canvas.size.width,height:this.#Qe.height/a*this.#u.canvas.size.height}:{width:this.#Qe.width,height:this.#Qe.height},this.#qe=this.options.life.count??-1,this.#$e=this.#qe<=0,this.options.domId){const t=ot().getElementById(this.options.domId);t&&(this.#Z=new MutationObserver(()=>{this.resize()}),this.#pt=new ResizeObserver(()=>{this.resize()}),this.#Z.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#pt.observe(t))}const c=this.options.shape,h=this.#p.emitterShapeManager?.getShapeGenerator(c.type);h&&(this.#He=h.generate(this.#u,this.position,this.size,this.fill,c.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#Oe=!0,this.pause()}externalPlay(){this.#Oe=!1,this.play()}async init(){await(this.#He?.init())}pause(){this.#Oe||(this.#Ue=void 0)}play(){if(this.#Oe)return;if(!(this.#qe>0||this.#$e)&&this.options.life.count||!(this.#Ge||this.#Ve>=(this.#Ke??0)))return;const t=this.#u;if(void 0===this.#Ue){const e=$(this.options.rate.delay);this.#Ue=t.retina.reduceFactor?e*r/t.retina.reduceFactor:1/0}(this.#qe>0||this.#$e)&&this.#Ze()}resize(){const e=this.#je,i=this.#u;this.position=e&&dt(e,i.canvas.size,C.origin)?e:this.#Dt(),this.#Qe=this.#Ye(),this.size=this.#Qe.mode===t.PixelMode.percent?{width:this.#Qe.width/a*i.canvas.size.width,height:this.#Qe.height/a*i.canvas.size.height}:{width:this.#Qe.width,height:this.#Qe.height},this.#He?.resize(this.position,this.size)}update(t){if(this.#Oe)return;const e=this.#u;this.#Ge&&(this.#Ge=!1,this.#Ve=this.#Ke??0,this.#Be=this.#Ue??0),this.#Xe||(this.#Xe=!0,this.#Je(this.options.startCount)),void 0!==this.#xe&&(this.#Le+=t.value,this.#Le>=this.#xe&&(this.pause(),void 0!==this.#Ke&&(this.#Ke=void 0),this.#$e||this.#qe--,this.#qe>0||this.#$e?(this.position=this.#Dt(),this.#He?.resize(this.position,this.size),this.#Ke=e.retina.reduceFactor?$(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0):this.#ti(),this.#Le-=this.#xe,this.#xe=void 0)),void 0!==this.#Ke&&(this.#Ve+=t.value,this.#Ve>=this.#Ke&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#Ve-=this.#Ke,this.#Ke=void 0)),void 0!==this.#Ue&&(this.#Be+=t.value,this.#Be>=this.#Ue&&(this.#ei(),this.#Be-=this.#Ue))}#Dt(){const t=this.#u;if(this.options.domId){const e=ot().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*o)*s,y:(i.y+i.height*o)*s}}}return et({size:t.canvas.size,position:this.options.position})}#Ye(){const e=this.#u;if(this.options.domId){const i=ot().getElementById(this.options.domId);if(i){const s=i.getBoundingClientRect();return{width:s.width*e.retina.pixelRatio,height:s.height*e.retina.pixelRatio,mode:t.PixelMode.precise}}}return this.options.size??(()=>{const e=new gs;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}#ti(){this.#Z?.disconnect(),this.#Z=void 0,this.#pt?.disconnect(),this.#pt=void 0,this.#Ne(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#ei(){if(this.#Oe)return;const t=$(this.options.rate.quantity);this.#Je(t)}#Je(t){const e=mt(this.#We)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:$(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,o=void 0===this.options.spawn.stroke?.opacity?1:$(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:$(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,h=!!a,d=!!this.#He,u=c||h,p=u||d,g=u?{h:y,s:v,l:w}:null,f=this.options.shape;for(let c=0;c<t*l;c++){const t=p?gt({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=o,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&g&&(this.spawnFillColor.h=this.#ii(i.h,this.spawnFillColor.h,g.h,3.6),this.spawnFillColor.s=this.#ii(i.s,this.spawnFillColor.s,g.s),this.spawnFillColor.l=this.#ii(i.l,this.spawnFillColor.l,g.l)),ua(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&g&&(this.spawnStrokeColor.h=this.#ii(a.h,this.spawnStrokeColor.h,g.h,3.6),this.spawnStrokeColor.s=this.#ii(a.s,this.spawnStrokeColor.s,g.s),this.spawnStrokeColor.l=this.#ii(a.l,this.spawnStrokeColor.l,g.l)),pa(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#He){const e=this.#He.randomPosition();if(e){l=e.position;const i=f.replace;i.color&&e.color&&ua(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#Ze(){if(this.#Oe)return;const t=void 0!==this.options.life.duration?$(this.options.life.duration):void 0;(this.#qe>0||this.#$e)&&void 0!==t&&t>0&&(this.#xe=t*r)}#ii(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const a=G(t.offset),o=$(this.options.rate.delay),l=n.retina.reduceFactor?o*r/n.retina.reduceFactor:1/0;return(e+$(t.speed)*n.fpsLimit/l+a*s)%i}}});t.AnimatableColor=ae,t.AnimationOptions=te,t.AnimationValueWithRandom=fe,t.Background=oe,t.BaseRange=qt,t.Circle=Wt,t.ColorAnimation=ie,t.Fill=he,t.FullScreen=re,t.HslAnimation=se,t.Move=be,t.MoveAngle=de,t.MoveCenter=ue,t.MoveGravity=pe,t.MovePath=ye,t.OptionLoader=Ht,t.Options=Re,t.OptionsColor=ne,t.OutModes=ve,t.Paint=Pe,t.ParticlesBounce=ze,t.ParticlesBounceFactor=Me,t.ParticlesDensity=Ce,t.ParticlesNumber=De,t.ParticlesNumberLimit=Se,t.ParticlesOptions=Ie,t.RangedAnimationOptions=ee,t.RangedAnimationValueWithRandom=me,t.Rectangle=Nt,t.ResizeEvent=le,t.Shape=ke,t.Spin=we,t.Stroke=xe,t.ValueWithRandom=ge,t.Vector=C,t.Vector3d=z,t.ZIndex=Oe,t.alterHsl=Je,t.animate=L,t.areBoundsInside=ut,t.calcExactPositionOrRandomFromSize=it,t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/a,y:t.position.y*t.size.height/a}:void 0},t.calcPositionOrRandomFromSize=tt,t.calcPositionOrRandomFromSizeRanged=et,t.calculateBounds=pt,t.cancelAnimation=B,t.canvasFirstIndex=0,t.canvasTag=f,t.checkDistance=K,t.circleBounce=function(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=N(a,n);if(i*o+s*r<0)return;const l=-Math.atan2(r,o),c=t.mass,h=e.mass,d=t.velocity.rotate(l),u=e.velocity.rotate(l),p=J(d,u,c,h),g=J(u,d,c,h),f=p.rotate(-l),m=g.rotate(-l);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=m.x*e.factor.x,e.velocity.y=m.y*e.factor.y},t.circleBounceDataFromParticle=function(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:C.create($(t.options.bounce.horizontal.value),$(t.options.bounce.vertical.value))}},t.clamp=V,t.cloneStyle=vt,t.collisionVelocity=J,t.colorMix=He,t.colorToRgb=Le,t.confetti=Vn,t.countOffset=1,t.decayOffset=1,t.deepExtend=gt,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=i,t.defaultDensityFactor=1,t.defaultFps=60,t.defaultFpsLimit=120,t.defaultLoops=0,t.defaultOpacity=1,t.defaultRatio=1,t.defaultReduceFactor=1,t.defaultRemoveQuantity=1,t.defaultRetryCount=0,t.defaultRgbMin=0,t.defaultTime=0,t.defaultTransform=c,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=X,t.deleteCount=1,t.double=2,t.doublePI=u,t.empty=0,t.executeOnSingleOrMultiple=ft,t.generatedAttribute=e,t.generatedFalse=g,t.generatedTrue=p,t.getDistance=Q,t.getDistanceSq=H,t.getDistances=N,t.getFullScreenStyle=xt,t.getHslAnimationFromHsl=Ke,t.getHslFromAnimation=Qe,t.getItemMapFromInitializer=zt,t.getItemsFromInitializer=Mt,t.getLinkColor=function(t,e,i){if(i===h)return qe();if(i!==d)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return He(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return $e(t)}}},t.getLinkRandomColor=function(t,e,i,s){const n=D(e)?e:e.value;return n===h?s?Fe(t,{value:n}):i?h:d:n===d?d:Fe(t,{value:n})},t.getLogger=It,t.getParticleBaseVelocity=Z,t.getParticleDirectionAngle=Y,t.getPosition=yt,t.getRandom=A,t.getRandomFn=function(){return E},t.getRandomInRange=F,t.getRandomRgbColor=qe,t.getRangeMax=q,t.getRangeMin=j,t.getRangeValue=$,t.getStyleFromHsl=Ne,t.getStyleFromRgb=We,t.hMax=y,t.hMin=0,t.hPhase=60,t.half=o,t.hslToRgb=$e,t.hslaToRgba=je,t.identity=1,t.inverseFactorNumerator=1,t.isArray=I,t.isBoolean=S,t.isFunction=function(t){return"function"==typeof t},t.isInArray=ct,t.isNull=T,t.isNumber=k,t.isObject=O,t.isPointInside=dt,t.isString=D,t.itemFromArray=ht,t.itemFromSingleOrMultiple=mt,t.lFactor=1,t.lMax=w,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){void 0!==i&&(t[e]=gt(t[e]??{},i))},t.loadLazyProperty=Zt,t.loadMinIndex=0,t.loadNestedProperty=Yt,t.loadOptionProperty=Jt,t.loadOptions=Qt,t.loadParticlesOptions=Te,t.loadProperty=Kt,t.loadRandomFactor=1e4,t.loadRangeProperty=Xt,t.manageListener=Pt,t.maxNits=400,t.midColorValue=d,t.millisecondsToSeconds=r,t.minCount=0,t.minDistance=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minRadius=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=U,t.none=0,t.one=1,t.originPoint=l,t.parseAlpha=st,t.percentDenominator=a,t.phaseNumerator=1,t.quarter=b,t.randomColorValue=h,t.randomInRangeValue=G,t.rangeColorToHsl=Be,t.rangeColorToRgb=Fe,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=m,t.rgbToHsl=Ve,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=ot,t.safeMatchMedia=rt,t.safeMutationObserver=lt,t.setAnimationFunctions=function(t,e){_.nextFrame=t,_.cancel=e},t.setLogger=function(t){t.debug&&(Ot.debug=kt(t.debug)),t.error&&(Ot.error=kt(t.error)),t.info&&(Ot.info=kt(t.info)),t.log&&(Ot.log=kt(t.log)),t.trace&&(Ot.trace=kt(t.trace)),t.verbose&&(Ot.verbose=kt(t.verbose)),t.warning&&(Ot.warning=kt(t.warning))},t.setRandom=function(t=Math.random){E=t},t.setRangeValue=W,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Ae(t,e)?.a},t.stringToRgb=Ue,t.threeQuarter=x,t.triple=3,t.tryCountIncrement=1,t.tsParticles=ti,t.updateColor=Ze,t.updateColorValue=Ye,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{confetti:(globalThis.__tsParticlesInternals.bundles.confetti||{}).confetti}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
1
+ !function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.confetti=t.__tsParticlesInternals.bundles.confetti||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",a=100,o=.5,r=1e3,l={x:0,y:0,z:0},c={a:1,b:0,c:0,d:1},h="random",d="mid",u=2*Math.PI,p="true",g="false",f="canvas",m=255,y=360,v=100,w=100,b=.25,x=.75;var P;function M(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(P=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",P.bottomLeft="bottom-left",P.bottomRight="bottom-right",P.left="left",P.none="none",P.right="right",P.top="top",P.topLeft="top-left",P.topRight="top-right",P.outside="outside",P.inside="inside";class z{x;y;z;constructor(t=l.x,e=l.y,i=l.z){this.x=t,this.y=e,this.z=i}static get origin(){return z.create(l.x,l.y,l.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return z.create(t.x,t.y,M(t))}static create(t,e,i){return"number"==typeof t?new z(t,e??l.y,i??l.z):new z(t.x,t.y,M(t))}add(t){return z.create(this.x+t.x,this.y+t.y,this.z+M(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=M(t)}copy(){return z.clone(this)}div(t){return z.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return z.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return z.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),l.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=M(t)}sub(t){return z.create(this.x-t.x,this.y-t.y,this.z-M(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=M(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class C extends z{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return C.create(l.x,l.y)}static clone(t){return C.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new C(t,e??l.y):new C(t.x,t.y)}}function S(t){return"boolean"==typeof t}function D(t){return"string"==typeof t}function k(t){return"number"==typeof t}function O(t){return"object"==typeof t&&null!==t}function I(t){return Array.isArray(t)}function T(t){return null==t}const R=Math.PI/180;let E=Math.random;const _={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return V(E(),0,1-Number.EPSILON)}function F(t,e){return A()*(e-t)+t}function L(t){return _.nextFrame(t)}function B(t){_.cancel(t)}function V(t,e,i){return Math.min(Math.max(t,e),i)}function U(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function G(t){const e=q(t);let i=j(t);return e===i&&(i=0),F(i,e)}function $(t){return k(t)?t:G(t)}function j(t){return k(t)?t:t.min}function q(t){return k(t)?t:t.max}function W(t,e){if(t===e||void 0===e&&k(t))return t;const i=j(t),s=q(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:W(i,s)}function N(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function H(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function Q(t,e){return Math.sqrt(H(t,e))}function K(t,e,i){return H(t,e)<=i*i}function X(t){return t*R}function Y(e,i,s){if(k(e))return X(e);switch(e){case t.MoveDirection.top:return-Math.PI*o;case t.MoveDirection.topRight:return-Math.PI*b;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*b;case t.MoveDirection.bottom:return Math.PI*o;case t.MoveDirection.bottomLeft:return Math.PI*x;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*x;case t.MoveDirection.inside:return Math.atan2(s.y-i.y,s.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-s.y,i.x-s.x);default:return A()*u}}function Z(t){const e=C.origin;return e.length=1,e.angle=t,e}function J(t,e,i,s){return C.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function tt(t){return{x:(t.position?.x??A()*a)*t.size.width/a,y:(t.position?.y??A()*a)*t.size.height/a}}function et(t){const e={x:void 0!==t.position?.x?$(t.position.x):void 0,y:void 0!==t.position?.y?$(t.position.y):void 0};return tt({size:t.size,position:e})}function it(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}function st(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1}var nt,at;t.OutModeDirection=void 0,(nt=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",nt.left="left",nt.right="right",nt.top="top",t.PixelMode=void 0,(at=t.PixelMode||(t.PixelMode={})).precise="precise",at.percent="percent";function ot(){return globalThis.document}function rt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function lt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function ct(t,e){return t===e||I(e)&&e.includes(t)}function ht(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(A()*t.length)]}function dt(t,e,i,s,n){return ut(pt(t,s??0),e,i,n)}function ut(e,i,s,n){let a=!0;return n&&n!==t.OutModeDirection.bottom||(a=e.top<i.height+s.x),!a||n&&n!==t.OutModeDirection.left||(a=e.right>s.x),!a||n&&n!==t.OutModeDirection.right||(a=e.left<i.width+s.y),!a||n&&n!==t.OutModeDirection.top||(a=e.bottom>s.y),a}function pt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function gt(t,...e){for(const i of e){if(T(i))continue;if(!O(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):O(t)&&!Array.isArray(t)||(t={});const e=Object.keys(i),s=new Set(["__proto__","constructor","prototype"]);if(!e.some(t=>{const e=i[t];return O(e)||Array.isArray(e)})){const n=i,a=t;for(const t of e)if(!s.has(t)&&t in n){const e=n[t];void 0!==e&&(a[t]=e)}continue}for(const n of e){if(s.has(n))continue;const e=t,a=i[n];e[n]=Array.isArray(a)?a.map(t=>gt(void 0,t)):gt(e[n],a)}}return t}function ft(t,e){return I(t)?t.map((t,i)=>e(t,i)):e(t,0)}function mt(t,e,i){return I(t)?ht(t,e,i):t}function yt(e,i){return function(e,i){if(e.mode!==t.PixelMode.percent){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/a*i.width,y:e.y/a*i.height}:{width:e.width/a*i.width,height:e.height/a*i.height}}(e,i)}function vt(t){const e=ot().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||T(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}let wt,bt;function xt(t){if(wt!==t||!bt){wt=t;const e=ot().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}bt=e}return bt}function Pt(t,e,i,s,n){if(s){let s={passive:!0};S(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function Mt(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,n)),n}async function zt(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class Ct{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var St;t.EventType=void 0,(St=t.EventType||(t.EventType={})).configAdded="configAdded",St.containerInit="containerInit",St.particlesSetup="particlesSetup",St.containerStarted="containerStarted",St.containerStopped="containerStopped",St.containerDestroyed="containerDestroyed",St.containerPaused="containerPaused",St.containerPlay="containerPlay",St.containerBuilt="containerBuilt",St.particleAdded="particleAdded",St.particleDestroyed="particleDestroyed",St.particleRemoved="particleRemoved";class Dt{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#s.set(i,e),this.#n.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return zt(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return zt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return Mt(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#a,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#a,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const kt=t=>(...e)=>{t(...e)},Ot={debug:kt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:kt(console.info),log:kt(console.log),trace:kt(console.trace),verbose:kt(console.log),warning:kt(console.warn)};function It(){return Ot}const Tt="100%";class Rt{pluginManager=new Dt(this);#h=[];#d=new Ct;#o=!1;get items(){return this.#h}get version(){return"4.2.1"}addEventListener(t,e){this.#d.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#d.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return ia}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=mt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(It().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=mt(r,a),{items:c}=this,h=c.findIndex(t=>t.id.description===n),d=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,d)}else c.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=ot();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)s=t,s.dataset[e]??=g,s.dataset[e]===p&&(s.style.width||=Tt,s.style.height||=Tt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(f).item(0);n?(s=n,s.dataset[e]=g):(s=i.createElement(f),s.dataset[e]=p,t.appendChild(s)),s.style.width||=Tt,s.style.height||=Tt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=ot();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}var Et,_t,At,Ft,Lt,Bt,Vt,Ut,Gt,$t,jt;!function(t){t.circle="circle",t.rectangle="rectangle"}(Et||(Et={}));class qt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Wt extends qt{radius;constructor(t,e,i){super(t,e,Et.circle),this.radius=i}contains(t){return K(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Wt||t.type===Et.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Nt||t.type===Et.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(n-i,2)+Math.pow(a-o,2)<=s**2||n<=s+i&&a<=s+o||n<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Nt extends qt{size;constructor(t,e,i,s){super(t,e,Et.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof Wt)return t.intersects(this);if(!(t instanceof Nt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,o=a.width,r=a.height;return n.x<s.x+e&&n.x+o>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}t.RotateDirection=void 0,(_t=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",_t.counterClockwise="counter-clockwise",_t.random="random",t.AnimationMode=void 0,(At=t.AnimationMode||(t.AnimationMode={})).auto="auto",At.increase="increase",At.decrease="decrease",At.random="random",t.LimitMode=void 0,(Ft=t.LimitMode||(t.LimitMode={})).delete="delete",Ft.wait="wait",t.OutMode=void 0,(Lt=t.OutMode||(t.OutMode={})).bounce="bounce",Lt.none="none",Lt.out="out",Lt.destroy="destroy",Lt.split="split",t.AlterType=void 0,(Bt=t.AlterType||(t.AlterType={})).darken="darken",Bt.enlighten="enlighten",t.DestroyType=void 0,(Vt=t.DestroyType||(t.DestroyType={})).none="none",Vt.max="max",Vt.min="min",t.GradientType=void 0,(Ut=t.GradientType||(t.GradientType={})).linear="linear",Ut.radial="radial",Ut.random="random",t.ParticleOutType=void 0,(Gt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Gt.inside="inside",Gt.outside="outside",t.StartValueType=void 0,($t=t.StartValueType||(t.StartValueType={})).max="max",$t.min="min",$t.random="random",t.AnimationStatus=void 0,(jt=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",jt.decreasing="decreasing";class Ht{load(t){T(t)||this.doLoad(t)}}function Qt(t,...e){for(const i of e)t.load(i)}function Kt(t,e,i){void 0!==i&&(t[e]=i)}function Xt(t,e,i){void 0!==i&&(t[e]=W(i))}function Yt(t,e,i){void 0!==i&&t[e].load(i)}function Zt(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function Jt(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class te extends Ht{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Xt(this,"count",t.count),Kt(this,"enable",t.enable),Xt(this,"speed",t.speed),Xt(this,"decay",t.decay),Xt(this,"delay",t.delay),Kt(this,"sync",t.sync)}}class ee extends te{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),Kt(this,"mode",t.mode),Kt(this,"startValue",t.startValue)}}class ie extends te{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Kt(this,"max",t.max),Kt(this,"min",t.min),Xt(this,"offset",t.offset)}}class se extends Ht{h=new ie(0,y);l=new ie(0,w);s=new ie(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class ne extends Ht{value="";static create(t,e){const i=new ne;return i.load(t),void 0!==e&&(D(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){T(t.value)||(this.value=t.value)}}class ae extends ne{animation=new se;static create(t,e){const i=new ae;return i.load(t),void 0!==e&&(D(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class oe extends Ht{color;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new ne,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=ne.create(this.color,t.color)),Kt(this,"image",t.image),Kt(this,"position",t.position),Kt(this,"repeat",t.repeat),Kt(this,"size",t.size),Kt(this,"opacity",t.opacity)}}class re extends Ht{enable=!0;zIndex=0;doLoad(t){Kt(this,"enable",t.enable),Kt(this,"zIndex",t.zIndex)}}class le extends Ht{delay=.5;enable=!0;doLoad(t){Kt(this,"delay",t.delay),Kt(this,"enable",t.enable)}}class ce extends Ht{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=gt(this.options[t]??{},i))}Kt(this,"close",t.close),Kt(this,"type",t.type)}}class he extends Ht{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=ae.create(this.color,t.color)),Kt(this,"enable",t.enable),Xt(this,"opacity",t.opacity)}}class de extends Ht{offset=0;value=90;doLoad(t){Xt(this,"offset",t.offset),Xt(this,"value",t.value)}}class ue extends Ht{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){Kt(this,"x",t.x),Kt(this,"y",t.y),Kt(this,"mode",t.mode),Kt(this,"radius",t.radius)}}class pe extends Ht{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Xt(this,"acceleration",t.acceleration),Kt(this,"enable",t.enable),Kt(this,"inverse",t.inverse),Xt(this,"maxSpeed",t.maxSpeed)}}class ge extends Ht{value=0;doLoad(t){T(t.value)||(this.value=W(t.value))}}class fe extends ge{animation=new te;doLoad(t){super.doLoad(t),Yt(this,"animation",t.animation)}}class me extends fe{animation=new ee}class ye extends Ht{clamp=!0;delay=new ge;enable=!1;generator;options={};doLoad(t){Kt(this,"clamp",t.clamp),this.delay.load(t.delay),Kt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=gt(this.options,t.options))}}class ve extends Ht{bottom;default=t.OutMode.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class we extends Ht{acceleration=0;enable=!1;position;doLoad(t){Xt(this,"acceleration",t.acceleration),Kt(this,"enable",t.enable),t.position&&(this.position=gt({},t.position))}}class be extends Ht{angle=new de;center=new ue;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new pe;outModes=new ve;path=new ye;random=!1;size=!1;speed=2;spin=new we;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(k(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Xt(this,"decay",t.decay),Kt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=k(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Xt(this,"drift",t.drift),Kt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(O(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Kt(this,"random",t.random),Kt(this,"size",t.size),Xt(this,"speed",t.speed),this.spin.load(t.spin),Kt(this,"straight",t.straight),Kt(this,"vibrate",t.vibrate),Kt(this,"warp",t.warp)}}class xe extends Ht{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=ae.create(this.color,t.color)),Xt(this,"width",t.width),Xt(this,"opacity",t.opacity)}}class Pe extends Ht{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=ae.create(this.color,t.color)),Zt(this,"fill",t.fill,()=>new he),Zt(this,"stroke",t.stroke,()=>new xe)}}class Me extends ge{value=1}class ze extends Ht{horizontal=new Me;vertical=new Me;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Ce extends Ht{enable=!1;height=1080;width=1920;doLoad(t){Kt(this,"enable",t.enable),Kt(this,"width",t.width),Kt(this,"height",t.height)}}class Se extends Ht{mode=t.LimitMode.delete;value=0;doLoad(t){Kt(this,"mode",t.mode),Kt(this,"value",t.value)}}class De extends Ht{density=new Ce;limit=new Se;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Kt(this,"value",t.value)}}class ke extends Ht{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=gt(this.options[t]??{},i))}Kt(this,"close",t.close),Kt(this,"type",t.type)}}class Oe extends ge{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Kt(this,"opacityRate",t.opacityRate),Kt(this,"sizeRate",t.sizeRate),Kt(this,"velocityRate",t.velocityRate)}}class Ie extends Ht{bounce=new ze;effect=new ce;groups={};move=new be;number=new De;paint;palette;reduceDuplicates=!1;shape=new ke;zIndex=new Oe;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Pe,this.paint.color=new ae,this.paint.color.value="#fff",this.paint.fill=new he,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#g(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=gt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(I(e)?this.paint=ft(e,t=>{const e=new Pe;return e.load(t),e}):I(this.paint)?(this.paint=new Pe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#g(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(I(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function Te(t,e,...i){const s=new Ie(t,e);return Qt(s,...i),s}class Re extends Ht{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new oe,this.fullScreen=new re,this.particles=Te(this.#p,this.#u),this.resize=new le}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,ft(this.preset,t=>{this.#f(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#g(this.palette)),Kt(this,"autoPlay",t.autoPlay),Kt(this,"clear",t.clear),Kt(this,"key",t.key),Kt(this,"name",t.name),Xt(this,"delay",t.delay),Kt(this,"detectRetina",t.detectRetina),Xt(this,"duration",t.duration),Kt(this,"fpsLimit",t.fpsLimit),Kt(this,"hdr",t.hdr),Kt(this,"pauseOnBlur",t.pauseOnBlur),Kt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Kt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;S(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=gt(this.style,t.style),Kt(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#g(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#f(t){this.load(this.#p.getPreset(t))}}const Ee=new Map;function _e(t,e){let i=Ee.get(t);return i||(i=e(),Ee.size>2e3&&Ee.clear(),Ee.set(t,i)),i}function Ae(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Fe(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return Le(t,n.value,i,s);if(I(n.value)){const e=ht(n.value,i,s);if(!e)return;return Fe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Le(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return n.value===h?qe():Ue(t,n.value);if(I(n.value)){const e=ht(n.value,i,s);if(!e)return;return Le(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Be(t,e,i,s=!0){const n=Fe(t,e,i,s);return n?Ve(n):void 0}function Ve(t){const e=t.r/m,i=t.g/m,s=t.b/m,n=Math.max(e,i,s),a=Math.min(e,i,s),r={h:0,l:(n+a)*o,s:0};return n!==a&&(r.s=r.l<o?(n-a)/(n+a):(n-a)/(2-n-a),r.h=e===n?(i-s)/(n-a):i===n?2+(s-e)/(n-a):4+(e-i)/(n-a)),r.l*=w,r.s*=v,r.h*=60,r.h<0&&(r.h+=y),r.h>=y&&(r.h-=y),r}function Ue(t,e){return Ae(t,e)}function Ge(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function $e(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),n=e/y,a=i/v,r=s/w;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const l=r<o?r*(1+a):r+a-r*a,c=2*r-l,h=1/3,d=Math.min(m,m*Ge(c,l,n+h)),u=Math.min(m,m*Ge(c,l,n)),p=Math.min(m,m*Ge(c,l,n-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function je(t){const e=$e(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function qe(t){const e=t??0,i=()=>Math.floor(F(e,256));return{b:i(),g:i(),r:i()}}function We(t,e,i){const s=i??1;return _e(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/m*s).toString()} ${(t.g/m*s).toString()} ${(t.b/m*s).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Ne(t,e,i){const s=i??1;return _e(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?We($e(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${s.toString()})`)}function He(t,e,i,s){let n=t,a=e;return"r"in n||(n=$e(t)),"r"in a||(a=$e(e)),{b:U(n.b,a.b,i,s),g:U(n.g,a.g,i,s),r:U(n.r,a.r,i,s)}}function Qe(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Ke(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:y},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:w}};return e&&(Xe(s.h,e.h,i),Xe(s.s,e.s,i),Xe(s.l,e.l,i)),s}function Xe(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=$(i.speed)/a*s,e.decay=1-$(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=$(i.count),e.time=0,e.delayTime=$(i.delay)*r,i.sync||(e.velocity*=A(),e.value*=A()),e.initialValue=e.value,e.offset=W(i.offset)):e.velocity=0}function Ye(e,i,s){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const n=e.offset?G(e.offset):0,a=(e.velocity??0)*s.factor+3.6*n,o=e.decay??1,r=e.max,l=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=a,e.value<l&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=a,e.value>r&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=r)),e.velocity&&1!==o&&(e.velocity*=o),e.value=V(e.value,l,r)}function Ze(t,e){if(!t)return;const{h:i,s:s,l:n}=t;Ye(i,!1,e),Ye(s,!0,e),Ye(n,!0,e)}function Je(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const ti=new Rt;class ei{enable=!1;mode="destination-out";load(t){T(t)||(Kt(this,"mode",t.mode),Kt(this,"enable",t.enable))}}class ii{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return sa});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new ei),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new ei,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function si(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new ii)})}class ni{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(l.x,l.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=O(s)?{min:X(s.min),max:X(s.max)}:{min:0,max:X(s)}}}async function ai(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new ni))})}var oi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(oi||(oi={}));const ri=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,li=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class ci{accepts(t){return t.startsWith("#")}handleColor(t){return this.#m(t.value)}handleRangeColor(t){return this.#m(t.value)}parseString(t){return this.#m(t)}#m(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(ri,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=li.exec(e);return i?{a:i[oi.a]?Number.parseInt(i[oi.a],16)/255:1,b:Number.parseInt(i[oi.b]??"0",16),g:Number.parseInt(i[oi.g]??"0",16),r:Number.parseInt(i[oi.r]??"0",16)}:void 0}}async function hi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new ci)})}var di;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(di||(di={}));const ui=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class pi{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return $e(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return $e({h:$(e.h),l:$(e.l),s:$(e.s)})}parseString(t){if(!this.accepts(t))return;const e=ui.exec(t);return e?je({a:e.length>4?st(e[di.a]):1,h:Number.parseInt(e[di.h]??"0",10),l:Number.parseInt(e[di.l]??"0",10),s:Number.parseInt(e[di.s]??"0",10)}):void 0}}async function gi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new pi)})}class fi{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return aa});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function mi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,zt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new fi(t.pluginManager))})}function yi(e,i){const s=e.value,n=e.animation,a={delayTime:$(n.delay)*r,enable:n.enable,value:$(e.value)*i,max:q(s)*i,min:j(s)*i,loops:0,maxLoops:$(n.count),time:0};if(n.enable){switch(a.decay=1-$(n.decay),n.mode){case t.AnimationMode.increase:a.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:a.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:a.value=a.min,e&&(a.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:a.value=a.max,e&&(a.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:a.value=G(a),e&&(a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function vi(e,i,s,n,a){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const o=(i.velocity??0)*a.factor,r=i.min,l=i.max,c=i.decay??1;i.time??=0;const h=i.delayTime??0;if(!(h>0&&i.time<h&&(i.time+=a.value,i.time<h))){switch(i.status){case t.AnimationStatus.increasing:i.value+=o;break;case t.AnimationStatus.decreasing:i.value-=o}switch(i.velocity&&1!==c&&(i.velocity*=c),i.status){case t.AnimationStatus.increasing:i.value>=l&&(s?i.status=t.AnimationStatus.decreasing:i.value-=l,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(s?i.status=t.AnimationStatus.increasing:i.value+=l,i.loops??=0,i.loops++)}!function(e,i,s,n,a){switch(i){case t.DestroyType.max:s>=a&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,l),e.destroyed||(i.value=V(i.value,r,l))}}class wi extends ee{destroy=t.DestroyType.none;load(t){super.load(t),T(t)||Kt(this,"destroy",t.destroy)}}class bi extends me{animation=new wi;value=1;load(t){if(T(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class xi{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=yi(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=$(i.speed)/a*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=A()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){Jt(t,"opacity",bi,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&vi(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function Pi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new xi(t)))})}class Mi{modes;#u;#y;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#y=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;let o=!1;for(const t of this.#y)if(o=t.particleBounce?.(e,s,i)??!1,o)break;if(o)return;const r=e.getPosition(),l=e.offset,c=e.getRadius(),h=pt(r,c),d=a.canvas.size,u=!e.isInsideCanvasForOutMode(n,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.left&&e.direction!==t.OutModeDirection.right)return;e.bounds.right<0&&e.direction===t.OutModeDirection.left?e.particle.position.x=e.size+e.offset.x:e.bounds.left>e.canvasSize.width&&e.direction===t.OutModeDirection.right&&(e.particle.position.x=e.canvasSize.width-e.size-e.offset.x);const i=e.particle.velocity.x;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.right&&i>0||e.direction===t.OutModeDirection.left&&i<0)){const t=$(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,s=!0}if(!s)return;const n=e.offset.x+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-n:e.outOfCanvas&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:d,offset:l,outOfCanvas:u,size:c}),function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.bottom&&e.direction!==t.OutModeDirection.top)return;e.bounds.bottom<0&&e.direction===t.OutModeDirection.top?e.particle.position.y=e.size+e.offset.y:e.bounds.top>e.canvasSize.height&&e.direction===t.OutModeDirection.bottom&&(e.particle.position.y=e.canvasSize.height-e.size-e.offset.y);const i=e.particle.velocity.y;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.bottom&&i>0||e.direction===t.OutModeDirection.top&&i<0)){const t=$(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,s=!0}if(!s)return;const n=e.offset.y+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-n:e.outOfCanvas&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:d,offset:l,outOfCanvas:u,size:c})}}class zi{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(this.modes.includes(n)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(n,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=N(e.position,e.moveCenter),{x:s,y:n}=e.velocity;if(s<0&&t>e.moveCenter.radius||n<0&&i>e.moveCenter.radius||s>=0&&t<-e.moveCenter.radius||n>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class Ci{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,s,n){if(!this.modes.includes(n))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const a=e.options.move.gravity,o=this.#u,r=o.canvas.size,c=e.getRadius();if(a.enable){const s=e.position;(!a.inverse&&s.y>r.height+c&&i===t.OutModeDirection.bottom||a.inverse&&s.y<-c&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+c||e.velocity.y<0&&e.position.y>=-c||e.velocity.x>0&&e.position.x<=r.width+c||e.velocity.x<0&&e.position.x>=-c)return;dt(e.position,o.canvas.size,l,c,i)||e.destroy()}}}const Si=C.origin;class Di{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;Si.setTo(l),Si.length=e.moveCenter.radius,Si.angle=e.velocity.angle+Math.PI,Si.addTo(e.moveCenter);const{dx:s,dy:n}=N(e.position,Si);if(t<=0&&s>=0||i<=0&&n>=0||t>=0&&s<=0||i>=0&&n<=0)return;e.position.x=Math.floor(G({min:0,max:a.canvas.size.width})),e.position.y=Math.floor(G({min:0,max:a.canvas.size.height}));const{dx:o,dy:r}=N(e.position,e.moveCenter);e.direction=Math.atan2(-r,-o),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(e.isInsideCanvasForOutMode(n,i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor(G({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(G({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=N(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction),e.justWarped=!0;break}case t.ParticleOutType.normal:{const s=e.options.move.warp,n=a.canvas.size,o={bottom:n.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:n.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),l=pt(e.position,r);i===t.OutModeDirection.right&&l.left>n.width+e.offset.x?(e.position.x=o.left,e.initialPosition.x=e.position.x,s||(e.position.y=A()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0):i===t.OutModeDirection.left&&l.right<-e.offset.x&&(e.position.x=o.right,e.initialPosition.x=e.position.x,s||(e.position.y=A()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0),i===t.OutModeDirection.bottom&&l.top>n.height+e.offset.y?(s||(e.position.x=A()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.top,e.initialPosition.y=e.position.y,e.justWarped=!0):i===t.OutModeDirection.top&&l.bottom<-e.offset.y&&(s||(e.position.x=A()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0);break}}}}}class ki{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#v(e,t.OutMode.bounce,t=>new Mi(t)),this.#v(e,t.OutMode.out,t=>new Di(t)),this.#v(e,t.OutMode.destroy,t=>new zi(t)),this.#v(e,t.OutMode.none,t=>new Ci(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#w(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#w(e,i,s.left??s.default,t.OutModeDirection.left),this.#w(e,i,s.right??s.default,t.OutModeDirection.right),this.#w(e,i,s.top??s.default,t.OutModeDirection.top)}#v(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#w(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function Oi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new ki(t)))})}class Ii{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=mt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=ae.create(void 0===a?void 0:ae.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=$(o.opacity),t.fillAnimation=i.animation;const s=Be(this.#p,i);s&&(t.fillColor=Ke(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=ae.create(void 0===a?void 0:ae.create(void 0,a),r.color);t.strokeWidth=$(r.width)*e.retina.pixelRatio,t.strokeOpacity=$(r.opacity??1),t.strokeAnimation=i.animation;const s=Be(this.#p,i)??t.getFillColor();s&&(t.strokeColor=Ke(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(Ze(t.fillColor,e),Ze(t.strokeColor,e))}}async function Ti(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Ii(t.pluginManager,e)))})}var Ri;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Ri||(Ri={}));const Ei=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class _i{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:$(e.r),g:$(e.g),b:$(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Ei.exec(t);return e?{a:e.length>4?st(e[Ri.a]):1,b:parseInt(e[Ri.b]??"0",10),g:parseInt(e[Ri.g]??"0",10),r:parseInt(e[Ri.r]??"0",10)}:void 0}}async function Ai(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new _i)})}class Fi extends ee{destroy=t.DestroyType.none;load(t){super.load(t),T(t)||Kt(this,"destroy",t.destroy)}}class Li extends me{animation=new Fi;value=3;load(t){if(super.load(t),T(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Bi{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/a*e.retina.reduceFactor,s.sync||(t.size.velocity*=A()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){Jt(t,"size",Li,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=yi(i,e),t.retina.sizeAnimationSpeed=$(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&vi(t,t.size,!0,t.options.size.animation.destroy,e)}}async function Vi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Bi(t)))})}async function Ui(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{await Promise.all([si(t),hi(t),gi(t),Ai(t),mi(t),ai(t),Ti(t),Pi(t),Oi(t),Vi(t)])})}var Gi;!function(t){t.move="move",t.line="line",t.bezier="bezier",t.quadratic="quadratic",t.arc="arc",t.ellipse="ellipse"}(Gi||(Gi={}));function $i(t,e,i){const s=i.segments[0];if(!s)return;const n=s.values[0];if(!n)return;t.moveTo(n.x*e,n.y*e);for(const s of i.segments){const i=s.values[0];if(!i)continue;const n=s.values[1],a=s.values[2],o=s.values[3];switch(s.type){case Gi.move:t.moveTo(i.x*e,i.y*e);break;case Gi.line:t.lineTo(i.x*e,i.y*e);break;case Gi.bezier:if(!n||!a||!o)continue;t.bezierCurveTo(n.x*e,n.y*e,a.x*e,a.y*e,o.x*e,o.y*e);break;case Gi.quadratic:if(!n||!a)continue;t.quadraticCurveTo(n.x*e,n.y*e,a.x*e,a.y*e);break;case Gi.arc:if(!n||!a)continue;t.arc(i.x*e,i.y*e,n.x*e,a.x,a.y);break;case Gi.ellipse:if(!n||!a||!o)continue;t.ellipse(i.x*e,i.y*e,n.x*e,n.y*e,a.x,o.x,o.y)}}if(!i.half)return;for(let s=i.segments.length-1;s>=0;s--){const n=i.segments[s];if(!n)continue;const a=n.values[0],o=1,r=2,l=n.values[o],c=n.values[r];switch(n.type){case Gi.line:if(!a)break;t.lineTo(a.x*-e,a.y*e);break;case Gi.bezier:if(!a||!l||!c)break;t.bezierCurveTo(-c.x*e,c.y*e,-l.x*e,l.y*e,-a.x*e,a.y*e);break;case Gi.quadratic:if(!l||!c)break;t.quadraticCurveTo(-l.x*e,l.y*e,-c.x*e,c.y*e);case Gi.arc:case Gi.ellipse:}}}var ji;!function(t){t.hearts="hearts",t.diamonds="diamonds",t.clubs="clubs",t.spades="spades"}(ji||(ji={}));const qi=o,Wi=.25,Ni=-qi,Hi=-.25,Qi=.0625,Ki=.375,Xi={half:!0,segments:[{type:Gi.bezier,values:[{x:0,y:Ni},{x:0,y:Ni},{x:Wi,y:Ni},{x:Wi,y:Hi}]},{type:Gi.bezier,values:[{x:Wi,y:Hi},{x:Wi,y:Hi},{x:qi,y:Hi},{x:qi,y:0}]},{type:Gi.bezier,values:[{x:qi,y:0},{x:qi,y:0},{x:qi,y:Wi},{x:Wi,y:Wi}]},{type:Gi.bezier,values:[{x:Wi,y:Wi},{x:Wi,y:Wi},{x:Qi,y:Wi},{x:Qi,y:Qi}]},{type:Gi.bezier,values:[{x:Qi,y:Qi},{x:Qi,y:Wi},{x:Wi,y:qi},{x:Wi,y:qi}]},{type:Gi.bezier,values:[{x:Wi,y:qi},{x:Wi,y:qi},{x:0,y:qi},{x:0,y:qi}]}]},Yi={half:!0,segments:[{type:Gi.bezier,values:[{x:0,y:qi},{x:0,y:qi},{x:Ki,y:0},{x:Ki,y:0}]},{type:Gi.bezier,values:[{x:Ki,y:0},{x:Ki,y:0},{x:0,y:Ni},{x:0,y:Ni}]}]},Zi={half:!0,segments:[{type:Gi.bezier,values:[{x:0,y:qi},{x:0,y:qi},{x:qi,y:0},{x:qi,y:Hi}]},{type:Gi.bezier,values:[{x:qi,y:Hi},{x:qi,y:Hi},{x:qi,y:Ni},{x:Wi,y:Ni}]},{type:Gi.bezier,values:[{x:Wi,y:Ni},{x:Wi,y:Ni},{x:0,y:Ni},{x:0,y:Hi}]}]},Ji={half:!0,segments:[{type:Gi.bezier,values:[{x:0,y:Ni},{x:0,y:Ni},{x:qi,y:Hi},{x:qi,y:0}]},{type:Gi.bezier,values:[{x:qi,y:0},{x:qi,y:0},{x:qi,y:Wi},{x:Wi,y:Wi}]},{type:Gi.bezier,values:[{x:Wi,y:Wi},{x:Wi,y:Wi},{x:Qi,y:Wi},{x:Qi,y:Qi}]},{type:Gi.bezier,values:[{x:Qi,y:Qi},{x:Qi,y:Wi},{x:Wi,y:qi},{x:Wi,y:qi}]},{type:Gi.bezier,values:[{x:Wi,y:qi},{x:Wi,y:qi},{x:0,y:qi},{x:0,y:qi}]}]},ts={[ji.hearts]:Zi,[ji.diamonds]:Yi,[ji.clubs]:Xi,[ji.spades]:Ji};class es{draw(t){const{context:e,radius:i}=t;$i(e,i,ts.clubs)}}async function is(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["club","clubs"],()=>Promise.resolve(new es))})}class ss{draw(t){const{context:e,radius:i}=t;$i(e,i,ts.diamonds)}}async function ns(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["diamond","diamonds"],()=>Promise.resolve(new ss))})}let as=class{draw(t){const{context:e,radius:i}=t;$i(e,i,ts.hearts)}};async function os(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["heart","hearts"],()=>Promise.resolve(new as))})}class rs{draw(t){const{context:e,radius:i}=t;$i(e,i,ts.spades)}}async function ls(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["spade","spades"],()=>Promise.resolve(new rs))})}async function cs(t){t.checkVersion("4.2.1"),await Promise.all([is(t),ns(t),os(t),ls(t)])}class hs{count;delay;duration;wait=!1;load(t){T(t)||(Kt(this,"count",t.count),Xt(this,"delay",t.delay),Xt(this,"duration",t.duration),Kt(this,"wait",t.wait))}}class ds{delay=.1;quantity=1;load(t){T(t)||(Xt(this,"quantity",t.quantity),Xt(this,"delay",t.delay))}}class us{color=!1;opacity=!1;load(t){T(t)||(Kt(this,"color",t.color),Kt(this,"opacity",t.opacity))}}class ps{options={};replace=new us;type="square";load(t){T(t)||(void 0!==t.options&&(this.options=gt({},t.options??{})),this.replace.load(t.replace),Kt(this,"type",t.type))}}class gs{height=0;mode=t.PixelMode.percent;width=0;load(t){T(t)||(Kt(this,"mode",t.mode),Kt(this,"height",t.height),Kt(this,"width",t.width))}}class fs{fill;stroke;load(t){T(t)||(t.fill&&(this.fill??=new he,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new xe,this.stroke.load(t.stroke)))}}class ms{autoPlay=!0;direction;domId;fill=!0;life=new hs;name;particles;position;rate=new ds;shape=new ps;size;spawn=new fs;spawnFillColor;spawnStrokeColor;startCount=0;load(t){T(t)||(Kt(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new gs,this.size.load(t.size)),Kt(this,"direction",t.direction),Kt(this,"domId",t.domId),Kt(this,"fill",t.fill),this.life.load(t.life),Kt(this,"name",t.name),this.particles=ft(t.particles,t=>gt({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=W(t.position.x)),void 0!==t.position.y&&(this.position.y=W(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new ae,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new ae,this.spawnStrokeColor.load(t.spawnStrokeColor)),Kt(this,"startCount",t.startCount))}}class ys{id="emitters";#b;constructor(t){this.#b=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return oa});return new e(this.#b,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=ft(i.emitters,t=>{const e=new ms;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return I(e)&&!!e.length||void 0!==e}}const vs=new WeakMap;var ws;async function bs(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=vs.get(e);return i||(i=Promise.resolve().then(function(){return ca}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw vs.delete(e),t}),vs.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return la}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new ys(e))})}!function(t){t.emitter="emitter"}(ws||(ws={}));const xs=["emoji"];async function Ps(t,e){try{await ot().fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}const Ms='"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';class zs{#x=new Map;destroy(){for(const[t,e]of this.#x)e instanceof ImageBitmap&&e.close(),this.#x.delete(t)}draw(t){const e=t.particle.emojiDataKey;if(!e)return;const i=this.#x.get(e);i&&function(t,e){const{context:i,opacity:s}=t,n=i.globalAlpha,a=e.width,r=a*o;i.globalAlpha=s,i.drawImage(e,-r,-r,a,a),i.globalAlpha=n}(t,i)}async init(t){const e=t.actualOptions.particles.shape;if(!xs.some(t=>ct(t,e.type)))return;const i=[Ps(Ms)];ft(xs.map(t=>e.options[t])[0],t=>{t.font&&i.push(Ps(t.font))}),await Promise.all(i)}particleDestroy(t){t.emojiDataKey=void 0}particleInit(t,e){const i=e.shapeData;if(!i.value)return;const s=mt(i.value,e.randomIndexData);if(!s)return;const n="string"==typeof s?{font:i.font??Ms,padding:i.padding??0,value:s}:{font:Ms,padding:0,...i,...s},a=n.font,o=n.value,r=`${o}_${a}`;if(this.#x.has(r))return void(e.emojiDataKey=r);const l=2*n.padding,c=q(e.size.value),h=c+l,d=2*h,u=new OffscreenCanvas(d,d),p=u.getContext("2d",t.canvas.render.settings);if(!p)return;p.font=`400 ${(2*c).toString()}px ${a}`,p.textBaseline="middle",p.textAlign="center",p.fillText(o,h,h);const g=u instanceof HTMLCanvasElement?u:u.transferToImageBitmap();this.#x.set(r,g),e.emojiDataKey=r}}async function Cs(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(xs,()=>Promise.resolve(new zs))})}class Ss{draw(t){!function(t){const{context:e,radius:i}=t,s=2*i,n=i*o,a=i+n,r=-i,l=-i;e.moveTo(r,l+n),e.quadraticCurveTo(r,l,r+n,l),e.quadraticCurveTo(r+i,l,r+i,l+n),e.quadraticCurveTo(r+i,l,r+a,l),e.quadraticCurveTo(r+s,l,r+s,l+n),e.quadraticCurveTo(r+s,l+i,r+a,l+a),e.lineTo(r+i,l+s),e.lineTo(r+n,l+a),e.quadraticCurveTo(r,l+i,r,l+n)}(t)}}async function Ds(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["heart"],()=>Promise.resolve(new Ss))})}const ks=["image","images"],Os=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function Is(t){return new Promise(e=>{t.loading=!0;const i=new Image;t.element=i,i.addEventListener("load",()=>{t.loading=!1,e()}),i.addEventListener("error",()=>{t.element=void 0,t.error=!0,t.loading=!1,It().error(`Error loading image: ${t.source}`),e()}),i.src=t.source})}async function Ts(t){if("svg"!==t.type)return void await Is(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(It().error("Image not found"),t.error=!0),t.loading=!1}function Rs(t,e,i,s,n=!1){const a=function(t,e,i,s=!1){const{svgData:n}=t;if(!n)return"";const a=Ne(e,s,i);if(n.includes("fill"))return n.replaceAll(Os,()=>a);const o=n.indexOf(">");return`${n.substring(0,o)} fill="${a}"${n.substring(o)}`}(t,i,s.opacity?.value??1,n),o={color:i,gif:e.gif,data:{...t,svgData:a},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise(e=>{const i=new Blob([a],{type:"image/svg+xml"}),s=URL.createObjectURL(i),n=new Image;n.addEventListener("load",()=>{o.loaded=!0,o.element=n,e(o),URL.revokeObjectURL(s)});n.addEventListener("error",()=>{(async()=>{URL.revokeObjectURL(s);const i={...t,error:!1,loading:!0};await Is(i),o.loaded=!0,o.element=i.element,e(o)})()}),n.src=s})}const Es=[0,4,2,1],_s=[8,8,4,2];class As{data;pos;constructor(t){this.pos=0,this.data=new Uint8ClampedArray(t)}getString(t){const e=this.data.slice(this.pos,this.pos+t);return this.pos+=e.length,e.reduce((t,e)=>t+String.fromCharCode(e),"")}nextByte(){return this.data[this.pos++]}nextTwoBytes(){return this.pos+=2,this.data[this.pos-2]+(this.data[this.pos-1]<<8)}readSubBlocks(){let t,e="";do{t=this.data[this.pos++];for(let i=t;--i>=0;e+=String.fromCharCode(this.data[this.pos++]));}while(0!==t);return e}readSubBlocksBin(){let t=this.data[this.pos],e=0;for(let i=0;0!==t;i+=t+1,t=this.data[this.pos+i])e+=t;const i=new Uint8Array(e);t=this.data[this.pos++];for(let e=0;0!==t;t=this.data[this.pos++])for(let s=t;--s>=0;i[e++]=this.data[this.pos++]);return i}skipSubBlocks(){for(const t=1,e=0;this.data[this.pos]!==e;this.pos+=this.data[this.pos]+t);this.pos++}}var Fs,Ls;!function(t){t[t.Replace=0]="Replace",t[t.Combine=1]="Combine",t[t.RestoreBackground=2]="RestoreBackground",t[t.RestorePrevious=3]="RestorePrevious",t[t.UndefinedA=4]="UndefinedA",t[t.UndefinedB=5]="UndefinedB",t[t.UndefinedC=6]="UndefinedC",t[t.UndefinedD=7]="UndefinedD"}(Fs||(Fs={})),function(t){t[t.Extension=33]="Extension",t[t.ApplicationExtension=255]="ApplicationExtension",t[t.GraphicsControlExtension=249]="GraphicsControlExtension",t[t.PlainTextExtension=1]="PlainTextExtension",t[t.CommentExtension=254]="CommentExtension",t[t.Image=44]="Image",t[t.EndOfFile=59]="EndOfFile"}(Ls||(Ls={}));function Bs(t,e){const i=[];for(let s=0;s<e;s++)i.push({r:t.data[t.pos],g:t.data[t.pos+1],b:t.data[t.pos+2]}),t.pos+=3;return i}function Vs(t,e,i){const s=e>>>3,n=7&e;return(t[s]+(t[s+1]<<8)+(t[s+2]<<16)&(1<<i)-1<<n)>>>n}async function Us(t,e,i,s,n,a,o){switch(t.nextByte()){case Ls.EndOfFile:return!0;case Ls.Image:await async function(t,e,i,s,n,a){const o=e.frames[s(!0)];o.left=t.nextTwoBytes(),o.top=t.nextTwoBytes(),o.width=t.nextTwoBytes(),o.height=t.nextTwoBytes();const r=t.nextByte(),l=!(128&~r),c=!(64&~r);o.sortFlag=!(32&~r),o.reserved=(24&r)>>>3;const h=1<<1+(7&r);l&&(o.localColorTable=Bs(t,h));const d=t=>{const{r:s,g:a,b:r}=(l?o.localColorTable:e.globalColorTable)[t];return t!==n(null)?{r:s,g:a,b:r,a:255}:{r:s,g:a,b:r,a:i?Math.trunc((s+a+r)/3):0}},u=(()=>{try{return new ImageData(o.width,o.height,a)}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==u)throw new EvalError("GIF frame size is to large");const p=t.nextByte(),g=t.readSubBlocksBin(),f=1<<p;if(c){for(let t=0,e=p+1,i=0,s=[[0]],n=0;n<4;n++)if(Es[n]<o.height){let a=0,r=0,l=!1;for(;!l;){const c=t;if(t=Vs(g,i,e),i+=e+1,t===f){e=p+1,s.length=f+2;for(let t=0;t<s.length;t++)s[t]=t<f?[t]:[]}else{t>=s.length?s.push(s[c].concat(s[c][0])):c!==f&&s.push(s[c].concat(s[t][0]));for(const e of s[t]){const{r:t,g:i,b:s,a:l}=d(e);u.data.set([t,i,s,l],Es[n]*o.width+_s[n]*r+a%(4*o.width)),a+=4}s.length===1<<e&&e<12&&e++}a===4*o.width*(r+1)&&(r++,Es[n]+_s[n]*r>=o.height&&(l=!0))}}o.image=u,o.bitmap=await createImageBitmap(u)}else{let t=0,e=p+1,i=0,s=-4;const n=[[0]];for(;;){const a=t;if(t=Vs(g,i,e),i+=e,t===f){e=p+1,n.length=f+2;for(let t=0;t<n.length;t++)n[t]=t<f?[t]:[]}else{if(t===f+1)break;t>=n.length?n.push(n[a].concat(n[a][0])):a!==f&&n.push(n[a].concat(n[t][0]));for(const e of n[t]){const{r:t,g:i,b:n,a:a}=d(e);s+=4,u.data.set([t,i,n,a],s)}n.length>=1<<e&&e<12&&e++}}o.image=u,o.bitmap=await createImageBitmap(u)}}(t,e,i,s,n,a);break;case Ls.Extension:!function(t,e,i,s){switch(t.nextByte()){case Ls.GraphicsControlExtension:{const n=e.frames[i(!1)];t.pos++;const a=t.nextByte();n.GCreserved=(224&a)>>>5,n.disposalMethod=(28&a)>>>2,n.userInputDelayFlag=!(2&~a);const o=!(1&~a);n.delayTime=10*t.nextTwoBytes();const r=t.nextByte();o&&s(r),t.pos++;break}case Ls.ApplicationExtension:{t.pos++;const i={identifier:t.getString(8),authenticationCode:t.getString(3),data:t.readSubBlocksBin()};e.applicationExtensions.push(i);break}case Ls.CommentExtension:e.comments.push([i(!1),t.readSubBlocks()]);break;case Ls.PlainTextExtension:if(0===e.globalColorTable.length)throw new EvalError("plain text extension without global color table");t.pos++,e.frames[i(!1)].plainTextData={left:t.nextTwoBytes(),top:t.nextTwoBytes(),width:t.nextTwoBytes(),height:t.nextTwoBytes(),charSize:{width:t.nextTwoBytes(),height:t.nextTwoBytes()},foregroundColor:t.nextByte(),backgroundColor:t.nextByte(),text:t.readSubBlocks()};break;default:t.skipSubBlocks()}}(t,e,s,n);break;default:throw new EvalError("undefined block found")}return!1}async function Gs(t,e){if("gif"===t.type){t.loading=!0;try{t.gifData=await async function(t,e,i,s){s??=!1;const n=await fetch(t);if(!n.ok&&404===n.status)throw new EvalError("file not found");const a=await n.arrayBuffer(),o={width:0,height:0,totalTime:0,colorRes:0,pixelAspectRatio:0,frames:[],sortFlag:!1,globalColorTable:[],backgroundImage:new ImageData(1,1,e),comments:[],applicationExtensions:[]},r=new As(new Uint8ClampedArray(a));if("GIF89a"!==r.getString(6))throw new Error("not a supported GIF file");o.width=r.nextTwoBytes(),o.height=r.nextTwoBytes();const l=r.nextByte(),c=!(128&~l);o.colorRes=(112&l)>>>4,o.sortFlag=!(8&~l);const h=1<<1+(7&l),d=r.nextByte();o.pixelAspectRatio=r.nextByte(),0!==o.pixelAspectRatio&&(o.pixelAspectRatio=(o.pixelAspectRatio+15)/64),c&&(o.globalColorTable=Bs(r,h));const u=(()=>{try{return new ImageData(o.width,o.height,e)}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==u)throw new Error("GIF frame size is to large");const{r:p,g:g,b:f}=o.globalColorTable[d];u.data.set(c?[p,g,f,255]:[0,0,0,0]);for(let t=4;t<u.data.length;t*=2)u.data.copyWithin(t,0,t);o.backgroundImage=u;let m=-1,y=!0,v=-1;const w=t=>(t&&(y=!0),m),b=t=>(null!=t&&(v=t),v);try{do{y&&(o.frames.push({left:0,top:0,width:0,height:0,disposalMethod:Fs.Replace,image:new ImageData(1,1,e),plainTextData:null,userInputDelayFlag:!1,delayTime:0,sortFlag:!1,localColorTable:[],reserved:0,GCreserved:0}),m++,v=-1,y=!1)}while(!await Us(r,o,s,w,b,e));o.frames.length--;for(const t of o.frames){if(t.userInputDelayFlag&&0===t.delayTime){o.totalTime=1/0;break}o.totalTime+=t.delayTime}return o}catch(t){if(t instanceof EvalError)throw new Error(`error while parsing frame ${m.toString()} "${t.message}"`,{cause:t});throw t}}(t.source,e),t.gifLoopCount=function(t){for(const e of t.applicationExtensions)if(e.identifier+e.authenticationCode==="NETSCAPE2.0")return e.data[1]+(e.data[2]<<8);return Number.NaN}(t.gifData),t.gifLoopCount||(t.gifLoopCount=1/0)}catch{t.error=!0}t.loading=!1}else await Is(t)}class $s{#u;#n;constructor(t,e){this.#n=t,this.#u=e}draw(t){const{context:e,radius:i,particle:s,opacity:n}=t,a=s.image,r=a?.element;if(a){if(e.globalAlpha=n,a.gif&&a.gifData)!function(t,e){const{context:i,radius:s,particle:n,delta:a}=t,r=n.image;if(!r?.gifData||!r.gif)return;const c=new OffscreenCanvas(r.gifData.width,r.gifData.height),h=c.getContext("2d",e);if(!h)throw new Error("could not create offscreen canvas context");h.imageSmoothingQuality="low",h.imageSmoothingEnabled=!1,h.clearRect(l.x,l.y,c.width,c.height),n.gifLoopCount??=r.gifLoopCount??0;let d=n.gifFrame??0;const u={x:-r.gifData.width*o,y:-r.gifData.height*o},p=r.gifData.frames[d];if(n.gifTime??=0,p.bitmap){switch(i.scale(s/r.gifData.width,s/r.gifData.height),p.disposalMethod){case Fs.UndefinedA:case Fs.UndefinedB:case Fs.UndefinedC:case Fs.UndefinedD:case Fs.Replace:h.drawImage(p.bitmap,p.left,p.top),i.drawImage(c,u.x,u.y),h.clearRect(l.x,l.y,c.width,c.height);break;case Fs.Combine:h.drawImage(p.bitmap,p.left,p.top),i.drawImage(c,u.x,u.y);break;case Fs.RestoreBackground:h.drawImage(p.bitmap,p.left,p.top),i.drawImage(c,u.x,u.y),h.clearRect(l.x,l.y,c.width,c.height),r.gifData.globalColorTable.length?h.putImageData(r.gifData.backgroundImage,u.x,u.y):h.putImageData(r.gifData.frames[0].image,u.x+p.left,u.y+p.top);break;case Fs.RestorePrevious:{const t=h.getImageData(l.x,l.y,c.width,c.height);h.drawImage(p.bitmap,p.left,p.top),i.drawImage(c,u.x,u.y),h.clearRect(l.x,l.y,c.width,c.height),h.putImageData(t,l.x,l.y)}}if(n.gifTime+=a.value,n.gifTime>p.delayTime){if(n.gifTime-=p.delayTime,++d>=r.gifData.frames.length){if(--n.gifLoopCount<=0)return;d=0,h.clearRect(l.x,l.y,c.width,c.height)}n.gifFrame=d}i.scale(r.gifData.width/s,r.gifData.height/s)}}(t,this.#u.canvas.render.settings);else if(r){const t=a.ratio,s={x:-i,y:-i},n=2*i;e.drawImage(r,s.x,s.y,n,n/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(!e.preload||!this.#n.loadImage)return;const i=[];for(const s of e.preload)i.push(this.#n.loadImage(t,s));await Promise.all(i)}loadShape(t){const e=this.#u;if(!t.shape||!ks.includes(t.shape))return;const i=t.shapeData;if(!i)return;const s=this.#n.getImages?.(e),n=s?.find(t=>t.name===i.name||t.source===i.src);n||this.#P(e,i).then(()=>{this.loadShape(t)})}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;const i=this.#n.getImages?.(t),s=e.shapeData;if(!s)return;const n=e.getFillColor(),a=i?.find(t=>t.name===s.name||t.source===s.src);if(!a)return;const o=s.replaceColor;a.loading?setTimeout(()=>{this.particleInit(t,e)}):(async()=>{let i;i=a.svgData&&n?await Rs(a,s,n,e,t.hdr):{color:n,data:a,element:a.element,gif:a.gif,gifData:a.gifData,gifLoopCount:a.gifLoopCount,loaded:!0,ratio:s.width&&s.height?s.width/s.height:a.ratio??1,replaceColor:o,source:s.src},i.ratio||(i.ratio=1);const r={image:i,close:s.close??e.shapeClose};e.image=r.image,e.shapeClose=r.close})()}#P=async(t,e)=>{if(!this.#n.loadImage)throw new Error("Image shape not initialized");await this.#n.loadImage(t,{gif:e.gif,name:e.name,replaceColor:e.replaceColor,src:e.src})}}class js{gif=!1;height;name;replaceColor;src="";width;load(t){T(t)||(Kt(this,"gif",t.gif),Kt(this,"height",t.height),Kt(this,"name",t.name),Kt(this,"replaceColor",t.replaceColor),Kt(this,"src",t.src),Kt(this,"width",t.width))}}class qs{id="image-preloader";#n;constructor(t){this.#n=t}async getPlugin(t){const{ImagePreloaderInstance:e}=await Promise.resolve().then(function(){return ha});return new e(this.#n,t)}loadOptions(t,e,i){if(!i?.preload)return;e.preload??=[];const s=e.preload;for(const t of i.preload){const e=s.find(e=>e.name===t.name||e.src===t.src);if(e)e.load(t);else{const e=new js;e.load(t),s.push(e)}}}needsPlugin(){return!0}}async function Ws(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{!function(t){t.getImages??=e=>{t.images??=new Map;let i=t.images.get(e);return i||(i=[],t.images.set(e,i)),i},t.loadImage??=async(e,i)=>{if(!t.getImages)throw new Error("No images collection found");if(!i.name&&!i.src)throw new Error("No image source provided");t.images??=new Map;const s=t.getImages(e);if(!s.some(t=>t.name===i.name||t.source===i.src))try{const n={gif:i.gif,name:i.name??i.src,source:i.src,type:i.src.substring(i.src.length-3),error:!1,loading:!0,replaceColor:i.replaceColor,ratio:i.width&&i.height?i.width/i.height:void 0};let a;s.push(n),t.images.set(e,s),a=i.gif?t=>Gs(t,{colorSpace:"srgb"}):i.replaceColor?Ts:Is,await a(n)}catch{throw new Error(`${i.name??i.src} not found`)}}}(t),t.pluginManager.addPlugin(new qs(t)),t.pluginManager.addShape(ks,e=>Promise.resolve(new $s(t,e)))})}class Ns extends ge{sync=!1;load(t){T(t)||(super.load(t),Kt(this,"sync",t.sync))}}class Hs extends ge{sync=!1;load(t){T(t)||(super.load(t),Kt(this,"sync",t.sync))}}class Qs{count=0;delay=new Ns;duration=new Hs;load(t){T(t)||(Kt(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Ks{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const s=i.delay.sync?1:A(),n=i.duration.sync?1:A();t.life={delay:e.retina.reduceFactor?$(i.delay.value)*s/e.retina.reduceFactor*r:0,delayTime:0,duration:e.retina.reduceFactor?$(i.duration.value)*n/e.retina.reduceFactor*r:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){Jt(t,"life",Qs,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const a=W(0,i.width),o=W(0,i.width);t.position.x=G(a),t.position.y=G(o),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const l=t.options.life;l&&(s.delay=$(l.delay.value)*r,s.duration=$(l.duration.value)*r)}(t,e,this.#u.canvas.size)}}async function Xs(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new Ks(t)))})}class Ys{factor=4;value=!0;load(t){T(t)||(Kt(this,"factor",t.factor),Kt(this,"value",t.value))}}class Zs{disable=!0;reduce=new Ys;load(t){T(t)||(Kt(this,"disable",t.disable),this.reduce.load(t.reduce))}}class Js{id="motion";async getPlugin(t){const{MotionPluginInstance:e}=await Promise.resolve().then(function(){return da});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.motion;s?.load||(e.motion=s=new Zs),s.load(i?.motion)}needsPlugin(){return!0}}async function tn(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Js)})}const en=new Map;function sn(t,e){const{context:i,radius:s}=t,n=function(t){const e=en.get(t);if(e)return e;const i=u/t,s=!!(t%2),n=(-Math.PI+(s?0:i))*o,a=[];for(let e=0;e<t;e++){const t=n+e*i;a[e]={x:Math.cos(t),y:Math.sin(t)}}return en.set(t,a),a}(e.count.numerator/e.count.denominator);i.beginPath();for(let t=0;t<n.length;t++){const e=n[t];if(!e)continue;const a=e.x*s,o=e.y*s;t?i.lineTo(a,o):i.moveTo(a,o)}i.closePath()}class nn{draw(t){const{particle:e,radius:i}=t;sn(t,this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round($(e?.sides??5))}}class an extends nn{getSidesData(t,e){const{sides:i}=t;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class on extends nn{getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:1,numerator:3},length:2.66*e/1}}}async function rn(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["polygon"],()=>Promise.resolve(new an))})}async function ln(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["triangle"],()=>Promise.resolve(new on))})}async function cn(t){t.checkVersion("4.2.1"),await Promise.all([rn(t),ln(t)])}var hn;!function(t){t.both="both",t.horizontal="horizontal",t.vertical="vertical"}(hn||(hn={}));class dn{enable=!1;value=0;load(t){T(t)||(Kt(this,"enable",t.enable),Xt(this,"value",t.value))}}class un{backColor;darken=new dn;enable=!1;enlighten=new dn;mode=hn.vertical;speed=25;load(t){T(t)||(void 0!==t.backColor&&(this.backColor=ne.create(this.backColor,t.backColor)),this.darken.load(t.darken),Kt(this,"enable",t.enable),this.enlighten.load(t.enlighten),Kt(this,"mode",t.mode),Xt(this,"speed",t.speed))}}class pn{#p;constructor(t){this.#p=t}getTransformValues(t){const e=t.roll?.enable&&t.roll,i=e&&e.horizontal,s=e&&e.vertical;return{a:i?Math.cos(e.angle):void 0,d:s?Math.sin(e.angle):void 0}}init(e){!function(e,i){const s=i.options.roll;if(s?.enable)if(i.roll={enable:s.enable,horizontal:s.mode===hn.horizontal||s.mode===hn.both,vertical:s.mode===hn.vertical||s.mode===hn.both,angle:A()*u,speed:$(s.speed)/360},s.backColor)i.backColor=Be(e,s.backColor);else if(s.darken.enable&&s.enlighten.enable){const e=A()>=o?t.AlterType.darken:t.AlterType.enlighten;i.roll.alter={type:e,value:$(e===t.AlterType.darken?s.darken.value:s.enlighten.value)}}else s.darken.enable?i.roll.alter={type:t.AlterType.darken,value:$(s.darken.value)}:s.enlighten.enable&&(i.roll.alter={type:t.AlterType.enlighten,value:$(s.enlighten.value)});else i.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this.#p,e)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){Jt(t,"roll",un,...e)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.options.roll,s=t.roll;if(!s||!i?.enable)return;const n=s.speed*e.factor,a=u;s.angle+=n,s.angle>a&&(s.angle-=a)}(t,e)}}async function gn(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("roll",()=>Promise.resolve(new pn(t.pluginManager)))})}class fn{decay=0;enable=!1;speed=0;sync=!1;load(t){T(t)||(Kt(this,"enable",t.enable),Xt(this,"speed",t.speed),Xt(this,"decay",t.decay),Kt(this,"sync",t.sync))}}class mn extends ge{animation=new fn;direction=t.RotateDirection.clockwise;path=!1;load(t){T(t)||(super.load(t),Kt(this,"direction",t.direction),this.animation.load(t.animation),Kt(this,"path",t.path))}}class yn{#u;constructor(t){this.#u=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:X($(i.value)),min:0,max:u},e.pathRotation=i.path;let s=i.direction;if(s===t.RotateDirection.random){s=Math.floor(2*A())>0?t.RotateDirection.counterClockwise:t.RotateDirection.clockwise}switch(s){case t.RotateDirection.counterClockwise:case"counterClockwise":e.rotate.status=t.AnimationStatus.decreasing;break;case t.RotateDirection.clockwise:e.rotate.status=t.AnimationStatus.increasing}const n=i.animation;n.enable&&(e.rotate.decay=1-$(n.decay),e.rotate.velocity=$(n.speed)/360*this.#u.retina.reduceFactor,n.sync||(e.rotate.velocity*=A())),e.rotation=e.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){Jt(t,"rotate",mn,...e)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(vi(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function vn(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new yn(t)))})}class wn{draw(t){!function(t){const{context:e,radius:i}=t,s=i*Math.SQRT1_2,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}async function bn(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new wn))})}const xn=0,Pn=0;class Mn{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.sides,a=i.starInset??2;e.moveTo(xn,Pn-s);for(let t=0;t<n;t++)e.rotate(Math.PI/n),e.lineTo(xn,Pn-s*a),e.rotate(Math.PI/n),e.lineTo(xn,Pn-s)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round($(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=$(i?.inset??2)}}async function zn(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["star"],()=>Promise.resolve(new Mn))})}var Cn;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(Cn||(Cn={}));class Sn{decay=0;enable=!1;speed=0;sync=!1;load(t){T(t)||(Kt(this,"enable",t.enable),Xt(this,"speed",t.speed),Xt(this,"decay",t.decay),Kt(this,"sync",t.sync))}}class Dn extends ge{animation=new Sn;direction=Cn.clockwise;enable=!1;load(t){super.load(t),T(t)||(this.animation.load(t.animation),Kt(this,"direction",t.direction),Kt(this,"enable",t.enable))}}class kn{#u;constructor(t){this.#u=t}getTransformValues(t){const e=t.tilt?.enable&&t.tilt;return{b:e?Math.cos(e.value)*e.cosDirection:void 0,c:e?Math.sin(e.value)*e.sinDirection:void 0}}init(e){const i=e.options.tilt;if(!i)return;e.tilt={enable:i.enable,value:X($(i.value)),sinDirection:A()>=o?1:-1,cosDirection:A()>=o?1:-1,min:0,max:u};let s=i.direction;if(s===Cn.random){s=Math.floor(2*A())>0?Cn.counterClockwise:Cn.clockwise}switch(s){case Cn.counterClockwise:case"counterClockwise":e.tilt.status=t.AnimationStatus.decreasing;break;case Cn.clockwise:e.tilt.status=t.AnimationStatus.increasing}const n=e.options.tilt?.animation;n?.enable&&(e.tilt.decay=1-$(n.decay),e.tilt.velocity=$(n.speed)/360*this.#u.retina.reduceFactor,n.sync||(e.tilt.velocity*=A()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){Jt(t,"tilt",Dn,...e)}update(e,i){this.isEnabled(e)&&e.tilt&&vi(e,e.tilt,!1,t.DestroyType.none,i)}}async function On(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("tilt",t=>Promise.resolve(new kn(t)))})}class In{angle=50;move=10;load(t){T(t)||(Xt(this,"angle",t.angle),Xt(this,"move",t.move))}}class Tn{distance=5;enable=!1;speed=new In;load(t){if(!T(t)&&(Xt(this,"distance",t.distance),Kt(this,"enable",t.enable),void 0!==t.speed))if(k(t.speed))this.speed.load({angle:t.speed});else{const e=t.speed;"min"in e?this.speed.load({angle:e}):this.speed.load(t.speed)}}}class Rn{#u;constructor(t){this.#u=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:A()*u,angleSpeed:$(e.speed.angle)/360,moveSpeed:$(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=$(e?.distance??0)*this.#u.retina.pixelRatio}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.options.wobble?.enable}loadOptions(t,...e){Jt(t,"wobble",Tn,...e)}update(t,e){this.isEnabled(t)&&function(t,e,i){const{wobble:s}=e.options,{wobble:n}=e;if(!s?.enable||!n)return;const a=t.retina.reduceFactor,o=n.angleSpeed*i.factor*a,r=n.moveSpeed*i.factor*a*(e.retina.wobbleDistance??0)/16.666666666666668,l=u,{position:c}=e;n.angle+=o,n.angle>l&&(n.angle-=l),c.x+=r*Math.cos(n.angle),c.y+=r*Math.abs(Math.sin(n.angle))}(this.#u,t,e)}}async function En(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("wobble",t=>Promise.resolve(new Rn(t)))})}class _n{angle;colors;count;decay;disableForReducedMotion;drift;flat;gravity;position;scalar;shapeOptions;shapes;spread;startVelocity;ticks;zIndex;constructor(){this.angle=90,this.count=50,this.spread=45,this.startVelocity=45,this.decay=.9,this.gravity=1,this.drift=0,this.ticks=200,this.position={x:50,y:50},this.colors=["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],this.shapes=["square","circle"],this.scalar=1,this.zIndex=100,this.disableForReducedMotion=!0,this.flat=!1,this.shapeOptions={}}get origin(){return{x:this.position.x/a,y:this.position.y/a}}set origin(t){this.position.x=t.x*a,this.position.y=t.y*a}get particleCount(){return this.count}set particleCount(t){this.count=t}load(t){if(T(t))return;Kt(this,"angle",t.angle);const e=t.count??t.particleCount;void 0!==e&&(this.count=e),Kt(this,"spread",t.spread),Kt(this,"startVelocity",t.startVelocity),Kt(this,"decay",t.decay),Kt(this,"flat",t.flat),Kt(this,"gravity",t.gravity),Kt(this,"drift",t.drift),Kt(this,"ticks",t.ticks);const i=t.origin;i&&!t.position&&(t.position={x:void 0===i.x?void 0:i.x*a,y:void 0===i.y?void 0:i.y*a});const s=t.position;s&&(void 0!==s.x&&(this.position.x=s.x),void 0!==s.y&&(this.position.y=s.y)),void 0!==t.colors&&(I(t.colors)?this.colors=[...t.colors]:this.colors=t.colors);const n=t.shapeOptions;if(void 0!==n)for(const t in n){const e=n[t];e&&(this.shapeOptions[t]=gt(this.shapeOptions[t]??{},e))}void 0!==t.shapes&&(I(t.shapes)?this.shapes=[...t.shapes]:this.shapes=t.shapes),Kt(this,"scalar",t.scalar),Kt(this,"zIndex",t.zIndex),Kt(this,"disableForReducedMotion",t.disableForReducedMotion)}}const An=new Map;async function Fn(t,e){const i=new _n;i.load(e.options);const s=Number.isFinite(i.ticks)&&i.ticks>0?i.ticks:void 0,n=void 0===s?0:12e3/(60*s);let a=An.get(e.id);a instanceof Promise&&(await a,a=An.get(e.id));const o=a;if(o&&!o.destroyed){const t=o;if("addEmitter"in t)return await async function(t,e,i){await(t.addEmitter?.({startCount:e.count,position:e.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{paint:{fill:{color:{value:e.colors},enable:!0}},shape:{type:e.shapes,options:e.shapeOptions},life:{count:1},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:i,startValue:"max",destroy:"min",count:1}},size:{value:5*e.scalar},move:{angle:{value:e.spread,offset:0},drift:{min:-e.drift,max:e.drift},gravity:{acceleration:9.81*e.gravity},speed:3*e.startVelocity,decay:1-e.decay,direction:-e.angle},rotate:{value:e.flat?0:{min:0,max:360},direction:"random",animation:{enable:!e.flat,speed:60}},tilt:{direction:"random",enable:!e.flat,value:e.flat?0:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!e.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!e.flat,speed:{min:-15,max:15}}}}))}(t,i,n),o}const r=(async()=>{const s=function(t,e,i){return{fullScreen:{enable:!e.canvas,zIndex:t.zIndex},fpsLimit:120,particles:{number:{value:0},paint:{fill:{color:{value:t.colors},enable:!0}},shape:{type:t.shapes,options:t.shapeOptions},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:i,startValue:"max",destroy:"min",count:1}},size:{value:5*t.scalar},links:{enable:!1},life:{count:1},move:{angle:{value:t.spread,offset:0},drift:{min:-t.drift,max:t.drift},enable:!0,gravity:{enable:!0,acceleration:9.81*t.gravity},speed:3*t.startVelocity,decay:1-t.decay,direction:-t.angle,random:!0,straight:!1,outModes:{top:"none",default:"destroy"}},rotate:{value:t.flat?0:{min:0,max:360},direction:"random",animation:{enable:!t.flat,speed:60}},tilt:{direction:"random",enable:!t.flat,value:t.flat?0:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!t.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!t.flat,speed:{min:-15,max:15}}},motion:{disable:t.disableForReducedMotion},emitters:{name:"confetti",startCount:t.count,position:t.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}}}(i,e,n),a=await t.load({id:e.id,element:e.canvas,options:s});return An.set(e.id,a),a})();return An.set(e.id,r),r}let Ln=null;async function Bn(t){return Ln||(Ln=async function(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{await Promise.all([Ui(t),tn(t),bs(t),cs(t),Ds(t),Ws(t),cn(t),bn(t),zn(t),Cs(t),vn(t),Xs(t),gn(t),On(t),En(t)])})}(t),Ln)}async function Vn(t,e){let i,s;return await Bn(ti),D(t)?(s=t,i=e??{}):(s="confetti",i=t),Fn(ti,{id:s,options:i})}Vn.create=async(t,e={})=>{await Bn(ti);const i=t?.getAttribute("id")??"confetti";return t?.setAttribute("id",i),await Fn(ti,{id:i,canvas:t??void 0,options:e}),async(s,n)=>{let a,o;return D(s)?(o=s,a=n??e):(o=i,a=s),Fn(ti,{id:o,canvas:t??void 0,options:a})}},Vn.init=async()=>{await Bn(ti)},Vn.version="4.2.1",globalThis.confetti=Vn;const Un=globalThis;Un.confetti=Vn,Un.tsParticles=ti;function Gn(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class $n{#M;#z;#C;#S;#D;#u;#k;#O;#I;#T;#R;#E;#_;#A;#p;#F;#L;#B={};#V=[void 0,void 0];#U={};constructor(t,e,i){this.#p=t,this.#u=e,this.#z=i,this.#k=null,this.#L=[],this.#F=[],this.#D=[],this.#M=[],this.#C=[],this.#S=[],this.#I=[],this.#T=[],this.#R=[],this.#E=[],this.#A=[],this.#_=[]}get settings(){return this.#O}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(l.x,l.y,this.#z.size.width,this.#z.size.height)})}clear(){let t=!1;for(const e of this.#M)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this.#L=[],this.#F=[],this.#D=[],this.#M=[],this.#C=[],this.#S=[],this.#I=[],this.#T=[],this.#R=[],this.#E=[],this.#A=[],this.#_=[]}draw(t){const e=this.#k;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[a,o]=this.#G(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#U,g=this.#B,f=a?Ne(a,r.hdr,h*d):void 0,m=o?Ne(o,r.hdr,u*d):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=m,this.draw(s=>{for(const i of this.#R)i.drawParticleSetup?.(s,t,e);this.#$(s,t,i,d,g,p),this.#j({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#q(t);for(const i of this.#T)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#I)this.#W(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#u;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#A)e.drawSettingsSetup?.(i,t);for(const e of this.#E)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#S)e.clearDraw?.(i,t);for(const e of this.#_)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#D=[],this.#M=[],this.#C=[],this.#S=[],this.#I=[],this.#R=[],this.#T=[],this.#E=[],this.#A=[],this.#_=[];for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#D.push(t),t.canvasClear&&this.#M.push(t),t.canvasPaint&&this.#C.push(t),t.drawParticle&&this.#I.push(t),t.drawParticleSetup&&this.#R.push(t),t.drawParticleCleanup&&this.#T.push(t),t.draw&&this.#E.push(t),t.drawSettingsSetup&&this.#A.push(t),t.drawSettingsCleanup&&this.#_.push(t),t.clearDraw&&this.#S.push(t)}initUpdaters(){this.#L=[],this.#F=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#F.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#L.push(t)}paint(){let t=!1;for(const e of this.#C)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(l.x,l.y,this.#z.size.width,this.#z.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,l.x,l.y,this.#z.size.width,this.#z.size.height),i.globalAlpha=s})}setContext(t){this.#k=t,this.#k&&(this.#k.globalCompositeOperation=i)}setContextSettings(t){this.#O=t}stop(){this.draw(t=>{t.clearRect(l.x,l.y,this.#z.size.width,this.#z.size.height)})}#q(t){for(const e of this.#F)e.afterDraw?.(t)}#$(t,e,i,s,n,a){for(const o of this.#L){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,s);a&&(n.fill=a),r&&(n.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)Gn(a,t,e)}o.beforeDraw?.(e)}}#N(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#H(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#j(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(l),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.y),a.fill&&(i.fillStyle=a.fill);const g=!!s.fillEnabled,f=s.strokeWidth??0;i.lineWidth=f,a.stroke&&(i.strokeStyle=a.stroke);const m={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:g,stroke:f>0,transformData:u,position:{...d},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;this.#H(y,m),this.#Q(v,m),this.#K(v,m),this.#X(v,m),this.#N(y,m),i.resetTransform()}#W(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#K(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:a}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),a&&i.stroke())}#X(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#Q(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#G(t){let e,i;for(const s of this.#D)if(!e&&s.particleFillColor&&(e=Be(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Be(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#V[0]=e,this.#V[1]=i,this.#V}}const jn=new WeakMap;function qn(t,e,i=!1){if(!e)return;const s=t.style,n=new Set;for(let t=0;t<s.length;t++){const e=s.item(t);e&&n.add(e)}for(let t=0;t<e.length;t++){const i=e.item(t);i&&n.add(i)}for(const t of n){const n=e.getPropertyValue(t);n?s.setProperty(t,n,i?"important":""):s.removeProperty(t)}}class Wn{domElement;render;renderCanvas;size;zoom=1;#u;#Y;#Z;#J;#p;#tt;#et;#it;#st;constructor(t,e){this.#p=t,this.#u=e,this.render=new $n(t,e,this),this.#it={height:0,width:0};const i=e.retina.pixelRatio,s=this.#it;this.size={height:s.height*i,width:s.width*i},this.#Y=!1,this.#et=[],this.#tt="none"}get#nt(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#Y){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#at();this.render.destroy(),this.#et=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#st?this.#st:{x:e*o/t,y:i*o/t}}init(){this.#ot(t=>{t.disconnect()}),this.#Z=lt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#rt()}),this.resize(),this.#lt(),this.initBackground(),this.#ot(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#ct(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Fe(this.#p,e.color);s.backgroundColor=n?We(n,t.actualOptions.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#et=[];for(const t of this.#u.plugins)t.resize&&this.#et.push(t)}loadCanvas(t){this.#Y&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#Y=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=jn.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return jn.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#J=vt(s.style));const n=this.#it,a=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=a.height,n.width=a.width);const o=this.#u.retina.pixelRatio,r=this.size;a.height=r.height=n.height*o,a.width=r.width=n.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#it,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=o.width,i.height=l.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#tt=t,this.#rt())}setZoom(t,e){this.zoom=t,this.#st=e}stop(){this.#ot(t=>{t.disconnect()}),this.#Z=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#ht(),e&&await t.refresh()}#ht(){for(const t of this.#et)t.resize?.()}#ct(){const t=this.#u.actualOptions.hdr&&rt("(color-gamut: p3)")?.matches&&rt("(dynamic-range: high)")?.matches;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...t?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});const e=this.renderCanvas;e&&this.render.setContext(e.getContext("2d",this.render.settings))}#lt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#nt?this.#dt():this.#at();for(const i in e.style){if(!i||!(i in e.style))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}}#rt(){const t=this.domElement;if(!t)return;this.#ot(t=>{t.disconnect()}),this.#lt(),this.initBackground();const e=this.#tt;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#ot(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#at(){const t=this.domElement,e=this.#J;t&&e&&qn(t,e,!0)}#ot(t){this.#Z&&t(this.#Z)}#dt(){const t=this.domElement;t&&qn(t,xt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Nn{#u;#ut;#pt;#gt;constructor(t){this.#u=t,this.#ut={visibilityChange:()=>{this.#ft()},resize:()=>{this.#mt()}}}addListeners(){this.#yt(!0)}removeListeners(){this.#yt(!1)}#ft(){const t=this.#u;t.actualOptions.pauseOnBlur&&(ot().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#mt(){this.#gt&&(clearTimeout(this.#gt),this.#gt=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#gt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*r)}#yt(t){const e=this.#ut;this.#vt(t),Pt(document,n,e.visibilityChange,t,!1)}#vt(t){const e=this.#ut,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Pt(globalThis,s,e.resize,t);const n=i.canvas.domElement;this.#pt&&!t?(n&&this.#pt.unobserve(n),this.#pt.disconnect(),this.#pt=void 0):!this.#pt&&t&&n&&(this.#pt=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this.#mt()}),this.#pt.observe(n))}}function Hn(t){if(!ct(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}function Qn(t,e){const i=t%e;return i<0?i+e:i}function Kn(t,e,i,s){const n=Te(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=mt(n.effect.type,t.id,a),t.shape=mt(n.shape.type,t.id,a);const o=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=mt(e,t.id,a);i&&(t.effect=i)}o.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=mt(e,t.id,a);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===h){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(A()*i.length)]}if(t.shape===h){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(A()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return gt({close:e.close},mt(n,i,s))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return gt({close:e.close},mt(n,i,s))}(t.shape,r,t.id,a):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class Xn{backColor;bubble;destroyed;direction;effect;effectClose;effectData;fillColor;fillEnabled;fillOpacity;group;id;ignoresResizeRatio;initialPosition;initialVelocity;isRotating;justWarped;lastPathTime;misplaced;moveCenter;offset;opacity;options;outType;pathRotation;position;randomIndexData;retina;roll;rotation;shape;shapeClose;shapeData;sides;size;slow;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;#wt={fillOpacity:1,opacity:1,strokeOpacity:1};#bt=z.origin;#xt={sin:0,cos:0};#Pt={a:1,b:0,c:0,d:1};#u;#p;constructor(t,e){this.#p=t,this.#u=e}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0;s?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this.#u.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#Mt(this.bubble.color??Qe(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*o}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??$(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this.#wt.fillOpacity=i*s*e,this.#wt.opacity=i*e,this.#wt.strokeOpacity=i*n*e,this.#wt}getPosition(){return this.#bt.x=this.position.x+this.offset.x,this.#bt.y=this.position.y+this.offset.y,this.#bt.z=this.position.z,this.#bt}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#xt.sin=Math.sin(t),this.#xt.cos=Math.cos(t),this.#xt}getStrokeColor(){return this.#Mt(this.bubble.color??Qe(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#Pt.a=e.cos*(t.a??c.a),this.#Pt.b=i?e.sin*(t.b??1):t.b??c.b,this.#Pt.c=i?-e.sin*(t.c??1):t.c??c.c,this.#Pt.d=e.cos*(t.d??c.d),this.#Pt}init(e,i,s,n){const a=this.#u;!function(e,i,s){e.id=i,e.group=s,e.justWarped=!1,e.effectClose=!0,e.shapeClose=!0,e.pathRotation=!1,e.lastPathTime=0,e.destroyed=!1,e.unbreakable=!1,e.isRotating=!1,e.rotation=0,e.misplaced=!1,e.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},e.size={value:1,max:1,min:1,enable:!1},e.outType=t.ParticleOutType.normal,e.ignoresResizeRatio=!0}(this,e,n),this.options=Kn(this,a,this.#p,s),a.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(a.particleUpdaters,this),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#zt(i),this.initialVelocity=this.#Ct(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,a),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(a.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(a,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(a,this)}isInsideCanvas(t){return this.#St({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#St({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=Qn(t,u);return e>=Math.PI*o&&e<3*Math.PI*o}if(this.roll.horizontal){const e=Qn(t+Math.PI*o,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Qn(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Dt(t,e){let i=0,s=t?z.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return z.create(i.x,i.y,e)}const t=it({size:l,position:s}),c=z.create(t.x,t.y,e);this.#kt(c,r,o.left??o.default),this.#kt(c,r,o.right??o.default),this.#Ot(c,r,o.top??o.default),this.#Ot(c,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}}#Ct(){const e=this.options.move,i=Z(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=X($(e.angle.value)),n=X($(e.angle.offset)),a={left:n-s*o,right:n+s*o};return e.straight||(i.angle+=G(W(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=A()),i}#kt(e,i,s){Hn({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#Ot(e,i,s){Hn({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#It(e,i){const s=this.getRadius(),n=this.#u.canvas.size,a=this.position,o=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:o?a.y+s<n.height:a.y-s<n.height,reason:"default"}:e===t.OutModeDirection.left?{inside:o?a.x-s>0:a.x+s>0,reason:"default"}:e===t.OutModeDirection.right?{inside:o?a.x+s<n.width:a.x-s<n.width,reason:"default"}:e===t.OutModeDirection.top?{inside:o?a.y-s>0:a.y+s>0,reason:"default"}:{inside:a.x>=-s&&a.y>=-s&&a.y<=n.height+s&&a.x<=n.width+s,reason:"default"}}#Tt(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#St(t){const e=this.#It(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#Tt(t.direction,t.outMode),l=a?this.#Rt(a(r),"shape"):void 0,c=o?this.#Rt(o(r),"effect"):void 0;if(l&&c){const t=Math.max(l.margin??0,c.margin??0);return{inside:l.inside&&c.inside,margin:t>0?t:void 0,reason:"combined"}}return l??c??e}#Mt(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?Je(t,this.roll.alter.type,this.roll.alter.value):t:t}#zt(e){const i=this.#u,s=Math.floor($(this.options.zIndex.value)),n=this.#Dt(e,V(s,0,i.zLayers));if(!n)throw new Error("a valid position cannot be found for particle");this.position=n,this.initialPosition=this.position.copy();const a=i.canvas.size;switch(this.moveCenter={...yt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=Y(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case t.MoveDirection.inside:this.outType=t.ParticleOutType.inside;break;case t.MoveDirection.outside:this.outType=t.ParticleOutType.outside}this.offset=C.origin}#Rt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Yn{#Et;#_t=new Map;#At=[];#Ft;#Lt;#Bt=[];#Vt;constructor(t){this.#Et=t,this.#Ft=0,this.#Vt=0}clear(){this.#_t.clear();const t=this.#Lt;t&&(this.#Et=t),this.#Lt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Ut(e,i);this.#_t.has(s)||this.#_t.set(s,[]),this.#_t.get(s)?.push(t)}query(t,e,i=[]){const s=this.#Gt(t);if(!s)return i;const n=Math.floor(s.minX/this.#Et),a=Math.floor(s.maxX/this.#Et),o=Math.floor(s.minY/this.#Et),r=Math.floor(s.maxY/this.#Et);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#_t.get(a);if(o)for(const s of o)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this.#$t(t.x,t.y,e),a=this.query(n,i,s);return this.#jt(),a}queryRectangle(t,e,i,s=[]){const n=this.#qt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#jt(),a}setCellSize(t){this.#Lt=t}#$t(t,e,i){return(this.#At[this.#Ft++]??=new Wt(t,e,i)).reset(t,e,i)}#qt(t,e,i,s){return(this.#Bt[this.#Vt++]??=new Nt(t,e,i,s)).reset(t,e,i,s)}#Ut(t,e){return`${Math.floor(t/this.#Et)}_${Math.floor(e/this.#Et)}`}#Gt(t){if(t instanceof Wt){const e=t.radius,{x:i,y:s}=t.position;return{minX:i-e,maxX:i+e,minY:s-e,maxY:s+e}}if(t instanceof Nt){const{x:e,y:i}=t.position,{width:s,height:n}=t.size;return{minX:e,maxX:e+s,minY:i,maxY:i+n}}return null}#jt(){this.#Ft=0,this.#Vt=0}}class Zn{checkParticlePositionPlugins;grid;#Wt;#u;#Nt;#Ht;#Qt;#Kt;#Xt;#Yt;#p;#Zt;#Jt;#te;#ee;#ie;#se;constructor(t,e){this.#p=t,this.#u=e,this.#Qt=0,this.#Wt=[],this.#Zt=[],this.#Ht=0,this.#Nt=new Map,this.#Kt=new Map,this.#se=this.#ne(this.#u.zLayers),this.grid=new Yn(100),this.checkParticlePositionPlugins=[],this.#Xt=[],this.#Yt=[],this.#te=[],this.#Jt=[],this.#ie=[]}get count(){return this.#Wt.length}addParticle(e,i,s,n){const a=this.#u.actualOptions.particles.number.limit.mode,o=void 0===s?this.#Ht:this.#Nt.get(s)??this.#Ht,r=this.count;if(o>0)switch(a){case t.LimitMode.delete:{const t=r+1-o;t>0&&this.removeQuantity(t);break}case t.LimitMode.wait:if(r>=o)return}try{const a=this.#Zt.pop()??new Xn(this.#p,this.#u);a.init(this.#Qt,e,i,s);let o=!0;return n&&(o=n(a)),o?(this.#Wt.push(a),this.#ae(a),this.#Qt++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this.#Zt.push(a)}catch(t){It().warning(`error adding particle: ${t}`)}}clear(){this.#Wt=[],this.#Kt.clear(),this.#oe(this.#u.zLayers)}destroy(){this.#Wt=[],this.#Zt.length=0,this.#Kt.clear(),this.#se=[],this.checkParticlePositionPlugins=[],this.#Xt=[],this.#Yt=[],this.#te=[],this.#Jt=[],this.#ie=[]}drawParticles(t){for(let e=this.#se.length-1;e>=0;e--){const i=this.#se[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Wt.filter(t)}find(t){return this.#Wt.find(t)}get(t){return this.#Wt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#ie=[],this.#Yt=[],this.#te=[],this.#Xt=[],this.#Jt=[],this.#Kt.clear(),this.#oe(t.zLayers),this.grid=new Yn(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#ie.push(e),e.particleUpdate&&this.#Yt.push(e),e.postUpdate&&this.#te.push(e),e.particleReset&&this.#Xt.push(e),e.postParticleUpdate&&this.#Jt.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#Wt.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let a=t;n<e&&a<this.count;a++)this.#re(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Te(this.#p,this.#u,s);this.#le(n,i,t)}this.#le(t.particles,i)}setResizeFactor(t){this.#ee=t}update(t){this.grid.clear();for(const e of this.#ie)e.update?.(t);const e=this.#ce(t);for(const e of this.#te)e.postUpdate?.(t);if(this.#he(t,e),e.size)for(const t of e)this.remove(t);this.#ee=void 0}#de(...t){this.#Zt.push(...t)}#le(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Ht=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Nt.set(i,s?.number.limit.value??n.limit.value));const a=this.#ue(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,l=Math.min(o,r)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#Ht=n.limit.value*a:this.#Nt.set(i,n.limit.value*a),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)}#ne(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#pe(t){const e=this.#se.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#ue(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1}#ae(t){const e=this.#pe(t.position.z),i=this.#se[e];i&&(i.push(t),this.#Kt.set(t.id,e))}#re(e,i,s){const n=this.#Wt[e];return!!n&&(n.group===i&&(this.#Wt.splice(e,1),this.#ge(n),n.destroy(s),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this.#de(n),!0))}#ge(t){const e=this.#Kt.get(t.id)??this.#pe(t.position.z),i=this.#se[e];if(!i)return void this.#Kt.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Kt.delete(t.id)}#oe(t){const e=Math.max(Math.floor(t),1);if(this.#se.length===e)for(const t of this.#se)t.length=0;else this.#se=this.#ne(e)}#fe(t){const e=this.#pe(t.position.z),i=this.#Kt.get(t.id);if(void 0===i)return void this.#ae(t);if(i===e)return;const s=this.#se[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#se[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#Kt.set(t.id,e)}else this.#Kt.set(t.id,e)}#ce(t){const e=new Set,i=this.#ee;for(const s of this.#Wt){i&&!s.ignoresResizeRatio&&(s.position.x*=i.width,s.position.y*=i.height,s.initialPosition.x*=i.width,s.initialPosition.y*=i.height),s.ignoresResizeRatio=!1;for(const t of this.#Xt)t.particleReset?.(s);for(const e of this.#Yt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#he(t,e){for(const i of this.#Wt)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#Jt)e.postParticleUpdate?.(i,t);this.#fe(i)}}}class Jn{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=$(s.gravity.maxSpeed)*i,a.moveDrift=$(s.drift)*i,a.moveSpeed=$(s.speed)*i;const o=a.maxDistance;o.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,o.vertical=void 0===n.vertical?void 0:n.vertical*i}}function ta(t){return!t.destroyed}function ea(t,e,...i){const s=new Re(t,e);return Qt(s,...i),s}var ia=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#me;#ye;#ve={value:0,factor:0};#we;#be;#xe;#Pe;#Me;#ze;#Ce;#Se;#De;#ke;#Oe;#p;#Ie;#Te;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this.#p=s,this.#we=i,this.#De=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.#Ie=!1,this.#me=0,this.#xe=0,this.#Se=0,this.#Me=!0,this.started=!1,this.destroyed=!1,this.#Oe=!0,this.#Ce=0,this.zLayers=100,this.pageHidden=!1,this.#Te=o,this.#ze=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Jn(this),this.canvas=new Wn(this.#p,this),this.particles=new Zn(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#ke=ea(this.#p,this),this.actualOptions=ea(this.#p,this),this.#Pe=new Nn(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#Oe&&!this.pageHidden&&ta(this)}get options(){return this.#ke}get sourceOptions(){return this.#Te}addLifeTime(t){this.#Se+=t}alive(){return!this.#xe||this.#Se<=this.#xe}destroy(e=!0){if(ta(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#De(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#we(t,{container:this,data:e})}draw(t){if(!ta(this))return;let e=t;this.#be=L(t=>{e&&(this.#Ce=void 0,e=!1),this.#Re(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}It().error(`Export plugin with type ${t} not found`)}async init(){if(!ta(this))return;const e=new Map;for(const t of this.#p.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this.#ke=ea(this.#p,this,this.#ze,this.sourceOptions),this.actualOptions=ea(this.#p,this,this.#ke),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[t,i]of e)t.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:i,duration:s,fpsLimit:n,hdr:a,smooth:o,zLayers:l}=this.actualOptions;this.hdr=a,this.zLayers=l,this.#xe=$(s)*r,this.#me=$(i)*r,this.#Se=0,this.fpsLimit=n>0?n:120,this.#Ie=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(t.EventType.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(t.EventType.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){if(ta(this)&&(void 0!==this.#be&&(B(this.#be),this.#be=void 0),!this.#Oe)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Oe=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!ta(this))return;const i=this.#Oe||e;if(!this.#Me||this.actualOptions.autoPlay){if(this.#Oe&&(this.#Oe=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#Me=!1}async refresh(){if(ta(this))return this.stop(),this.start()}async reset(t){if(ta(this))return this.#ze=t,this.#Te=t,this.#ke=ea(this.#p,this,this.#ze,this.sourceOptions),this.actualOptions=ea(this.#p,this,this.#ke),this.refresh()}async start(){ta(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#Pe.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#ye=setTimeout(()=>{i()},this.#me)}))}stop(){if(ta(this)&&this.started){this.#ye&&(clearTimeout(this.#ye),this.#ye=void 0),this.#Me=!0,this.started=!1,this.#Pe.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this.#Te=this.#ke,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Re(t){try{if(!this.#Ie&&void 0!==this.#Ce&&t<this.#Ce+r/this.fpsLimit)return void this.draw(!1);if(this.#Ce??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this.#ve,t-this.#Ce,this.fpsLimit,this.#Ie),this.addLifeTime(this.#ve.value),this.#Ce=t,this.#ve.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#ve),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){It().error("error in animation loop",t)}}}});var sa=Object.freeze({__proto__:null,BlendPluginInstance:class{#u;#Ee;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#Ee&&(t.globalCompositeOperation=this.#Ee)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Ee=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function na(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=V(t.velocity.x,-1,1),t.velocity.y=V(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=l*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(a);const{position:p}=t;p.addTo(h),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}var aa=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(e){const i=e.options.move,s=i.gravity,n=i.path;if(e.moveDecay=1-$(i.decay),e.pathDelay=$(n.delay.value)*r,n.generator){let t=this.pathGenerators.get(n.generator);t||(t=this.availablePathGenerators.get(n.generator),t&&(this.pathGenerators.set(n.generator,t),t.init())),e.pathGenerator=t}e.gravity={enable:s.enable,acceleration:$(s.acceleration),inverse:s.inverse},function(e,i){const s=i.options.move.spin;if(!s.enable)return;const n=s.position??{x:50,y:50},a={x:.01*n.x*e.canvas.size.width,y:.01*n.y*e.canvas.size.height},o=Q(i.getPosition(),a),r=$(s.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:a,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:A()*u,radius:o,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options.move;if(!s.enable)return;const n=this.#u,a=function(t){return t.slow.inRange?t.slow.factor:1}(e),r=n.retina.reduceFactor,l=e.retina.moveSpeed,c=e.retina.moveDrift,h=e.size.max,d=l*(s.size?e.getRadius()/h:1)*a*(i.factor||1)*o,u=e.retina.maxSpeed;s.spin.enable?function(e,i,s,n){if(!i.spin)return;const a=i.spin.direction===t.RotateDirection.clockwise,r={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*r.x(i.spin.angle)*n,i.position.y=i.spin.center.y+i.spin.radius*r.y(i.spin.angle)*n,i.spin.radius+=i.spin.acceleration*n;const l=Math.max(e.canvas.size.width,e.canvas.size.height),c=l*o;i.spin.radius>c?(i.spin.radius=c,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*s*(1-i.spin.radius/l)}(n,e,d,r):na(e,s,d,u,c,r,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=N(e,t.position),n=Math.abs(i),a=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&n>=l||c&&a>=c)&&!t.misplaced)t.misplaced=!!l&&n>l||!!c&&a>c,l&&(t.velocity.x=t.velocity.y*o-t.velocity.x),c&&(t.velocity.y=t.velocity.x*o-t.velocity.y);else if((!l||n<l)&&(!c||a<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-A()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-A())}}(e)}preInit(){return this.#_e()}redrawInit(){return this.#_e()}update(){for(const t of this.pathGenerators.values())t.update()}async#_e(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var oa=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#b;constructor(t,e){this.#b=t,this.#u=e,this.#b.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(I(t))for(const e of t)await this.#b.addEmitter(this.#u,e);else await this.#b.addEmitter(this.#u,t)}pause(){for(const t of this.#b.getArray(this.#u))t.pause()}play(){for(const t of this.#b.getArray(this.#u))t.play()}resize(){for(const t of this.#b.getArray(this.#u))t.resize()}stop(){this.#b.clear(this.#u)}update(t){this.#b.getArray(this.#u).forEach(e=>{e.update(t)})}}});const ra=new Map;var la=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||ra.set(t,e)}getShapeGenerator(t){return ra.get(t)}getSupportedShapeGenerators(){return ra.keys()}}});var ca=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Ae;#p;constructor(t){this.#Ae=new Map,this.#p=t}async addEmitter(t,e,i){const s=new ms;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return ga}),a=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this.#Ae.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Ae.get(t);return e||(e=[],this.#Ae.set(t,e)),e}initContainer(t){this.#Ae.has(t)||(this.#Ae.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||k(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});var ha=Object.freeze({__proto__:null,ImagePreloaderInstance:class{#u;#n;constructor(t,e){this.#n=t,this.#u=e}destroy(){this.#n.images?.delete(this.#u)}}});var da=Object.freeze({__proto__:null,MotionPluginInstance:class{#u;constructor(t){this.#u=t}async init(){const t=this.#u,e=t.actualOptions.motion;if(!e||!e.disable&&!e.reduce.value)return void(t.retina.reduceFactor=1);const i=rt("(prefers-reduced-motion: reduce)");if(!i)return void(t.retina.reduceFactor=1);this.#Fe(i);i.addEventListener("change",()=>{(async()=>{this.#Fe(i);try{await t.refresh()}catch{}})()}),await Promise.resolve()}#Fe(t){const e=this.#u,i=e.actualOptions.motion;i&&(t.matches?i.disable?e.retina.reduceFactor=0:e.retina.reduceFactor=i.reduce.value?1/i.reduce.factor:1:e.retina.reduceFactor=1)}}});function ua(t,e,i,s){(t.paint??=new Pe).fill={color:ae.create(void 0,{value:e}),enable:s,opacity:i}}function pa(t,e,i,s){(t.paint??=new Pe).stroke={color:ae.create(void 0,{value:e}),opacity:i,width:s}}var ga=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#Le;#Be;#Ve;#xe;#Ue;#Ge;#$e;#je;#qe;#Z;#We;#Oe;#p;#Ne;#pt;#He;#Qe;#Ke;#Xe;constructor(e,i,s,n,o){this.#p=e,this.#u=i,this.#Ne=s,this.#Le=0,this.#Be=0,this.#Ve=0,this.#je=o,n instanceof ms?this.options=n:(this.options=new ms,this.options.load(n)),this.#Ke=i.retina.reduceFactor?$(this.options.life.delay??0)*r/i.retina.reduceFactor:1/0,this.position=this.#je??this.#Dt(),this.name=this.options.name,this.fill=this.options.fill,this.#Ge=!this.options.life.wait,this.#Xe=!1;const l=gt({},this.options.particles);if(l.move??={},l.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=Be(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=Be(this.#p,this.options.spawn.stroke.color)),this.#Oe=!this.options.autoPlay,this.#We=l,this.#Qe=this.#Ye(),this.size=this.#Qe.mode===t.PixelMode.percent?{width:this.#Qe.width/a*this.#u.canvas.size.width,height:this.#Qe.height/a*this.#u.canvas.size.height}:{width:this.#Qe.width,height:this.#Qe.height},this.#qe=this.options.life.count??-1,this.#$e=this.#qe<=0,this.options.domId){const t=ot().getElementById(this.options.domId);t&&(this.#Z=new MutationObserver(()=>{this.resize()}),this.#pt=new ResizeObserver(()=>{this.resize()}),this.#Z.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#pt.observe(t))}const c=this.options.shape,h=this.#p.emitterShapeManager?.getShapeGenerator(c.type);h&&(this.#He=h.generate(this.#u,this.position,this.size,this.fill,c.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#Oe=!0,this.pause()}externalPlay(){this.#Oe=!1,this.play()}async init(){await(this.#He?.init())}pause(){this.#Oe||(this.#Ue=void 0)}play(){if(this.#Oe)return;if(!(this.#qe>0||this.#$e)&&this.options.life.count||!(this.#Ge||this.#Ve>=(this.#Ke??0)))return;const t=this.#u;if(void 0===this.#Ue){const e=$(this.options.rate.delay);this.#Ue=t.retina.reduceFactor?e*r/t.retina.reduceFactor:1/0}(this.#qe>0||this.#$e)&&this.#Ze()}resize(){const e=this.#je,i=this.#u;this.position=e&&dt(e,i.canvas.size,C.origin)?e:this.#Dt(),this.#Qe=this.#Ye(),this.size=this.#Qe.mode===t.PixelMode.percent?{width:this.#Qe.width/a*i.canvas.size.width,height:this.#Qe.height/a*i.canvas.size.height}:{width:this.#Qe.width,height:this.#Qe.height},this.#He?.resize(this.position,this.size)}update(t){if(this.#Oe)return;const e=this.#u;this.#Ge&&(this.#Ge=!1,this.#Ve=this.#Ke??0,this.#Be=this.#Ue??0),this.#Xe||(this.#Xe=!0,this.#Je(this.options.startCount)),void 0!==this.#xe&&(this.#Le+=t.value,this.#Le>=this.#xe&&(this.pause(),void 0!==this.#Ke&&(this.#Ke=void 0),this.#$e||this.#qe--,this.#qe>0||this.#$e?(this.position=this.#Dt(),this.#He?.resize(this.position,this.size),this.#Ke=e.retina.reduceFactor?$(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0):this.#ti(),this.#Le-=this.#xe,this.#xe=void 0)),void 0!==this.#Ke&&(this.#Ve+=t.value,this.#Ve>=this.#Ke&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#Ve-=this.#Ke,this.#Ke=void 0)),void 0!==this.#Ue&&(this.#Be+=t.value,this.#Be>=this.#Ue&&(this.#ei(),this.#Be-=this.#Ue))}#Dt(){const t=this.#u;if(this.options.domId){const e=ot().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*o)*s,y:(i.y+i.height*o)*s}}}return et({size:t.canvas.size,position:this.options.position})}#Ye(){const e=this.#u;if(this.options.domId){const i=ot().getElementById(this.options.domId);if(i){const s=i.getBoundingClientRect();return{width:s.width*e.retina.pixelRatio,height:s.height*e.retina.pixelRatio,mode:t.PixelMode.precise}}}return this.options.size??(()=>{const e=new gs;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}#ti(){this.#Z?.disconnect(),this.#Z=void 0,this.#pt?.disconnect(),this.#pt=void 0,this.#Ne(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#ei(){if(this.#Oe)return;const t=$(this.options.rate.quantity);this.#Je(t)}#Je(t){const e=mt(this.#We)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:$(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,o=void 0===this.options.spawn.stroke?.opacity?1:$(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:$(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,h=!!a,d=!!this.#He,u=c||h,p=u||d,g=u?{h:y,s:v,l:w}:null,f=this.options.shape;for(let c=0;c<t*l;c++){const t=p?gt({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=o,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&g&&(this.spawnFillColor.h=this.#ii(i.h,this.spawnFillColor.h,g.h,3.6),this.spawnFillColor.s=this.#ii(i.s,this.spawnFillColor.s,g.s),this.spawnFillColor.l=this.#ii(i.l,this.spawnFillColor.l,g.l)),ua(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&g&&(this.spawnStrokeColor.h=this.#ii(a.h,this.spawnStrokeColor.h,g.h,3.6),this.spawnStrokeColor.s=this.#ii(a.s,this.spawnStrokeColor.s,g.s),this.spawnStrokeColor.l=this.#ii(a.l,this.spawnStrokeColor.l,g.l)),pa(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#He){const e=this.#He.randomPosition();if(e){l=e.position;const i=f.replace;i.color&&e.color&&ua(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#Ze(){if(this.#Oe)return;const t=void 0!==this.options.life.duration?$(this.options.life.duration):void 0;(this.#qe>0||this.#$e)&&void 0!==t&&t>0&&(this.#xe=t*r)}#ii(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const a=G(t.offset),o=$(this.options.rate.delay),l=n.retina.reduceFactor?o*r/n.retina.reduceFactor:1/0;return(e+$(t.speed)*n.fpsLimit/l+a*s)%i}}});t.AnimatableColor=ae,t.AnimationOptions=te,t.AnimationValueWithRandom=fe,t.Background=oe,t.BaseRange=qt,t.Circle=Wt,t.ColorAnimation=ie,t.Fill=he,t.FullScreen=re,t.HslAnimation=se,t.Move=be,t.MoveAngle=de,t.MoveCenter=ue,t.MoveGravity=pe,t.MovePath=ye,t.OptionLoader=Ht,t.Options=Re,t.OptionsColor=ne,t.OutModes=ve,t.Paint=Pe,t.ParticlesBounce=ze,t.ParticlesBounceFactor=Me,t.ParticlesDensity=Ce,t.ParticlesNumber=De,t.ParticlesNumberLimit=Se,t.ParticlesOptions=Ie,t.RangedAnimationOptions=ee,t.RangedAnimationValueWithRandom=me,t.Rectangle=Nt,t.ResizeEvent=le,t.Shape=ke,t.Spin=we,t.Stroke=xe,t.ValueWithRandom=ge,t.Vector=C,t.Vector3d=z,t.ZIndex=Oe,t.alterHsl=Je,t.animate=L,t.areBoundsInside=ut,t.calcExactPositionOrRandomFromSize=it,t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/a,y:t.position.y*t.size.height/a}:void 0},t.calcPositionOrRandomFromSize=tt,t.calcPositionOrRandomFromSizeRanged=et,t.calculateBounds=pt,t.cancelAnimation=B,t.canvasFirstIndex=0,t.canvasTag=f,t.checkDistance=K,t.circleBounce=function(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=N(a,n);if(i*o+s*r<0)return;const l=-Math.atan2(r,o),c=t.mass,h=e.mass,d=t.velocity.rotate(l),u=e.velocity.rotate(l),p=J(d,u,c,h),g=J(u,d,c,h),f=p.rotate(-l),m=g.rotate(-l);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=m.x*e.factor.x,e.velocity.y=m.y*e.factor.y},t.circleBounceDataFromParticle=function(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:C.create($(t.options.bounce.horizontal.value),$(t.options.bounce.vertical.value))}},t.clamp=V,t.cloneStyle=vt,t.collisionVelocity=J,t.colorMix=He,t.colorToRgb=Le,t.confetti=Vn,t.countOffset=1,t.decayOffset=1,t.deepExtend=gt,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=i,t.defaultDensityFactor=1,t.defaultFps=60,t.defaultFpsLimit=120,t.defaultLoops=0,t.defaultOpacity=1,t.defaultRatio=1,t.defaultReduceFactor=1,t.defaultRemoveQuantity=1,t.defaultRetryCount=0,t.defaultRgbMin=0,t.defaultTime=0,t.defaultTransform=c,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=X,t.deleteCount=1,t.double=2,t.doublePI=u,t.empty=0,t.executeOnSingleOrMultiple=ft,t.generatedAttribute=e,t.generatedFalse=g,t.generatedTrue=p,t.getDistance=Q,t.getDistanceSq=H,t.getDistances=N,t.getFullScreenStyle=xt,t.getHslAnimationFromHsl=Ke,t.getHslFromAnimation=Qe,t.getItemMapFromInitializer=zt,t.getItemsFromInitializer=Mt,t.getLinkColor=function(t,e,i){if(i===h)return qe();if(i!==d)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return He(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return $e(t)}}},t.getLinkRandomColor=function(t,e,i,s){const n=D(e)?e:e.value;return n===h?s?Fe(t,{value:n}):i?h:d:n===d?d:Fe(t,{value:n})},t.getLogger=It,t.getParticleBaseVelocity=Z,t.getParticleDirectionAngle=Y,t.getPosition=yt,t.getRandom=A,t.getRandomFn=function(){return E},t.getRandomInRange=F,t.getRandomRgbColor=qe,t.getRangeMax=q,t.getRangeMin=j,t.getRangeValue=$,t.getStyleFromHsl=Ne,t.getStyleFromRgb=We,t.hMax=y,t.hMin=0,t.hPhase=60,t.half=o,t.hslToRgb=$e,t.hslaToRgba=je,t.identity=1,t.inverseFactorNumerator=1,t.isArray=I,t.isBoolean=S,t.isFunction=function(t){return"function"==typeof t},t.isInArray=ct,t.isNull=T,t.isNumber=k,t.isObject=O,t.isPointInside=dt,t.isString=D,t.itemFromArray=ht,t.itemFromSingleOrMultiple=mt,t.lFactor=1,t.lMax=w,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){void 0!==i&&(t[e]=gt(t[e]??{},i))},t.loadLazyProperty=Zt,t.loadMinIndex=0,t.loadNestedProperty=Yt,t.loadOptionProperty=Jt,t.loadOptions=Qt,t.loadParticlesOptions=Te,t.loadProperty=Kt,t.loadRandomFactor=1e4,t.loadRangeProperty=Xt,t.manageListener=Pt,t.maxNits=400,t.midColorValue=d,t.millisecondsToSeconds=r,t.minCount=0,t.minDistance=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minRadius=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=U,t.none=0,t.one=1,t.originPoint=l,t.parseAlpha=st,t.percentDenominator=a,t.phaseNumerator=1,t.quarter=b,t.randomColorValue=h,t.randomInRangeValue=G,t.rangeColorToHsl=Be,t.rangeColorToRgb=Fe,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=m,t.rgbToHsl=Ve,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=ot,t.safeMatchMedia=rt,t.safeMutationObserver=lt,t.setAnimationFunctions=function(t,e){_.nextFrame=t,_.cancel=e},t.setLogger=function(t){t.debug&&(Ot.debug=kt(t.debug)),t.error&&(Ot.error=kt(t.error)),t.info&&(Ot.info=kt(t.info)),t.log&&(Ot.log=kt(t.log)),t.trace&&(Ot.trace=kt(t.trace)),t.verbose&&(Ot.verbose=kt(t.verbose)),t.warning&&(Ot.warning=kt(t.warning))},t.setRandom=function(t=Math.random){E=t},t.setRangeValue=W,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Ae(t,e)?.a},t.stringToRgb=Ue,t.threeQuarter=x,t.triple=3,t.tryCountIncrement=1,t.tsParticles=ti,t.updateColor=Ze,t.updateColorValue=Ye,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{confetti:(globalThis.__tsParticlesInternals.bundles.confetti||{}).confetti}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
@@ -1,5 +1,5 @@
1
1
  (function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
2
- /* tsParticles v4.2.0 */
2
+ /* tsParticles v4.2.1 */
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/engine'), require('@tsparticles/basic'), require('@tsparticles/shape-cards/suits'), require('@tsparticles/plugin-emitters/plugin'), require('@tsparticles/shape-emoji'), require('@tsparticles/shape-heart'), require('@tsparticles/shape-image'), require('@tsparticles/updater-life'), require('@tsparticles/plugin-motion'), require('@tsparticles/shape-polygon'), require('@tsparticles/updater-roll'), require('@tsparticles/updater-rotate'), require('@tsparticles/shape-square'), require('@tsparticles/shape-star'), require('@tsparticles/updater-tilt'), require('@tsparticles/updater-wobble')) :
5
5
  typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/engine', '@tsparticles/basic', '@tsparticles/shape-cards/suits', '@tsparticles/plugin-emitters/plugin', '@tsparticles/shape-emoji', '@tsparticles/shape-heart', '@tsparticles/shape-image', '@tsparticles/updater-life', '@tsparticles/plugin-motion', '@tsparticles/shape-polygon', '@tsparticles/updater-roll', '@tsparticles/updater-rotate', '@tsparticles/shape-square', '@tsparticles/shape-star', '@tsparticles/updater-tilt', '@tsparticles/updater-wobble'], factory) :
@@ -403,7 +403,7 @@
403
403
 
404
404
  let initPromise = null;
405
405
  async function doInitPlugins(engine) {
406
- engine.checkVersion("4.2.0");
406
+ engine.checkVersion("4.2.1");
407
407
  await engine.pluginManager.register(async (e) => {
408
408
  await Promise.all([
409
409
  basic.loadBasic(e),
@@ -476,7 +476,7 @@
476
476
  confetti.init = async () => {
477
477
  await initPlugins(engine.tsParticles);
478
478
  };
479
- confetti.version = "4.2.0";
479
+ confetti.version = "4.2.1";
480
480
  globalThis.confetti = confetti;
481
481
 
482
482
  const globalObject = globalThis;
@@ -1 +1 @@
1
- !function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/shape-cards/suits"),require("@tsparticles/plugin-emitters/plugin"),require("@tsparticles/shape-emoji"),require("@tsparticles/shape-heart"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/shape-polygon"),require("@tsparticles/updater-roll"),require("@tsparticles/updater-rotate"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/engine","@tsparticles/basic","@tsparticles/shape-cards/suits","@tsparticles/plugin-emitters/plugin","@tsparticles/shape-emoji","@tsparticles/shape-heart","@tsparticles/shape-image","@tsparticles/updater-life","@tsparticles/plugin-motion","@tsparticles/shape-polygon","@tsparticles/updater-roll","@tsparticles/updater-rotate","@tsparticles/shape-square","@tsparticles/shape-star","@tsparticles/updater-tilt","@tsparticles/updater-wobble"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.confetti=t.__tsParticlesInternals.bundles.confetti||{}),t.__tsParticlesInternals.engine,t.__tsParticlesInternals.bundles.basic,t.__tsParticlesInternals.shapes["cards/suits"],t.__tsParticlesInternals.plugins["emitters/plugin"],t.__tsParticlesInternals.shapes.emoji,t.__tsParticlesInternals.shapes.heart,t.__tsParticlesInternals.shapes.image,t.__tsParticlesInternals.updaters.life,t.__tsParticlesInternals.plugins.motion,t.__tsParticlesInternals.shapes.polygon,t.__tsParticlesInternals.updaters.roll,t.__tsParticlesInternals.updaters.rotate,t.__tsParticlesInternals.shapes.square,t.__tsParticlesInternals.shapes.star,t.__tsParticlesInternals.updaters.tilt,t.__tsParticlesInternals.updaters.wobble)}(this,function(t,e,s,a,i,n,r,l,o,c,p,d,_,u,h,P,f){"use strict";class I{angle;colors;count;decay;disableForReducedMotion;drift;flat;gravity;position;scalar;shapeOptions;shapes;spread;startVelocity;ticks;zIndex;constructor(){this.angle=90,this.count=50,this.spread=45,this.startVelocity=45,this.decay=.9,this.gravity=1,this.drift=0,this.ticks=200,this.position={x:50,y:50},this.colors=["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],this.shapes=["square","circle"],this.scalar=1,this.zIndex=100,this.disableForReducedMotion=!0,this.flat=!1,this.shapeOptions={}}get origin(){return{x:this.position.x/e.percentDenominator,y:this.position.y/e.percentDenominator}}set origin(t){this.position.x=t.x*e.percentDenominator,this.position.y=t.y*e.percentDenominator}get particleCount(){return this.count}set particleCount(t){this.count=t}load(t){if(e.isNull(t))return;e.loadProperty(this,"angle",t.angle);const s=t.count??t.particleCount;void 0!==s&&(this.count=s),e.loadProperty(this,"spread",t.spread),e.loadProperty(this,"startVelocity",t.startVelocity),e.loadProperty(this,"decay",t.decay),e.loadProperty(this,"flat",t.flat),e.loadProperty(this,"gravity",t.gravity),e.loadProperty(this,"drift",t.drift),e.loadProperty(this,"ticks",t.ticks);const a=t.origin;a&&!t.position&&(t.position={x:void 0===a.x?void 0:a.x*e.percentDenominator,y:void 0===a.y?void 0:a.y*e.percentDenominator});const i=t.position;i&&(void 0!==i.x&&(this.position.x=i.x),void 0!==i.y&&(this.position.y=i.y)),void 0!==t.colors&&(e.isArray(t.colors)?this.colors=[...t.colors]:this.colors=t.colors);const n=t.shapeOptions;if(void 0!==n)for(const t in n){const s=n[t];s&&(this.shapeOptions[t]=e.deepExtend(this.shapeOptions[t]??{},s))}void 0!==t.shapes&&(e.isArray(t.shapes)?this.shapes=[...t.shapes]:this.shapes=t.shapes),e.loadProperty(this,"scalar",t.scalar),e.loadProperty(this,"zIndex",t.zIndex),e.loadProperty(this,"disableForReducedMotion",t.disableForReducedMotion)}}const y=new Map;async function m(t,s){const a=new I;a.load(s.options);const i=Number.isFinite(a.ticks)&&a.ticks>0?a.ticks:void 0,n=void 0===i?0:120*e.percentDenominator/(e.defaultFps*i);let r=y.get(s.id);r instanceof Promise&&(await r,r=y.get(s.id));const l=r;if(l&&!l.destroyed){const t=l;if("addEmitter"in t)return await async function(t,e,s){await(t.addEmitter?.({startCount:e.count,position:e.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{paint:{fill:{color:{value:e.colors},enable:!0}},shape:{type:e.shapes,options:e.shapeOptions},life:{count:1},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:s,startValue:"max",destroy:"min",count:1}},size:{value:5*e.scalar},move:{angle:{value:e.spread,offset:0},drift:{min:-e.drift,max:e.drift},gravity:{acceleration:9.81*e.gravity},speed:3*e.startVelocity,decay:1-e.decay,direction:-e.angle},rotate:{value:e.flat?0:{min:0,max:360},direction:"random",animation:{enable:!e.flat,speed:60}},tilt:{direction:"random",enable:!e.flat,value:e.flat?0:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!e.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!e.flat,speed:{min:-15,max:15}}}}))}(t,a,n),l}const o=(async()=>{const e=function(t,e,s){return{fullScreen:{enable:!e.canvas,zIndex:t.zIndex},fpsLimit:120,particles:{number:{value:0},paint:{fill:{color:{value:t.colors},enable:!0}},shape:{type:t.shapes,options:t.shapeOptions},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:s,startValue:"max",destroy:"min",count:1}},size:{value:5*t.scalar},links:{enable:!1},life:{count:1},move:{angle:{value:t.spread,offset:0},drift:{min:-t.drift,max:t.drift},enable:!0,gravity:{enable:!0,acceleration:9.81*t.gravity},speed:3*t.startVelocity,decay:1-t.decay,direction:-t.angle,random:!0,straight:!1,outModes:{top:"none",default:"destroy"}},rotate:{value:t.flat?0:{min:0,max:360},direction:"random",animation:{enable:!t.flat,speed:60}},tilt:{direction:"random",enable:!t.flat,value:t.flat?0:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!t.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!t.flat,speed:{min:-15,max:15}}},motion:{disable:t.disableForReducedMotion},emitters:{name:"confetti",startCount:t.count,position:t.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}}}(a,s,n),i=await t.load({id:s.id,element:s.canvas,options:e});return y.set(s.id,i),i})();return y.set(s.id,o),o}let g=null;async function b(t){return g||(g=async function(t){t.checkVersion("4.2.0"),await t.pluginManager.register(async t=>{await Promise.all([s.loadBasic(t),c.loadMotionPlugin(t),i.loadEmittersPluginSimple(t),a.loadCardSuitsShape(t),r.loadHeartShape(t),l.loadImageShape(t),p.loadPolygonShape(t),u.loadSquareShape(t),h.loadStarShape(t),n.loadEmojiShape(t),_.loadRotateUpdater(t),o.loadLifeUpdater(t),d.loadRollUpdater(t),P.loadTiltUpdater(t),f.loadWobbleUpdater(t)])})}(t),g)}async function v(t,s){let a,i;return await b(e.tsParticles),e.isString(t)?(i=t,a=s??{}):(i="confetti",a=t),m(e.tsParticles,{id:i,options:a})}v.create=async(t,s={})=>{await b(e.tsParticles);const a=t?.getAttribute("id")??"confetti";return t?.setAttribute("id",a),await m(e.tsParticles,{id:a,canvas:t??void 0,options:s}),async(i,n)=>{let r,l;return e.isString(i)?(l=i,r=n??s):(l=a,r=i),m(e.tsParticles,{id:l,canvas:t??void 0,options:r})}},v.init=async()=>{await b(e.tsParticles)},v.version="4.2.0",globalThis.confetti=v;const x=globalThis;x.__tsParticlesInternals=x.__tsParticlesInternals??{},x.confetti=v,t.confetti=v}),Object.assign(globalThis.window||globalThis,{confetti:(globalThis.__tsParticlesInternals.bundles.confetti||{}).confetti}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
1
+ !function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/shape-cards/suits"),require("@tsparticles/plugin-emitters/plugin"),require("@tsparticles/shape-emoji"),require("@tsparticles/shape-heart"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/shape-polygon"),require("@tsparticles/updater-roll"),require("@tsparticles/updater-rotate"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/engine","@tsparticles/basic","@tsparticles/shape-cards/suits","@tsparticles/plugin-emitters/plugin","@tsparticles/shape-emoji","@tsparticles/shape-heart","@tsparticles/shape-image","@tsparticles/updater-life","@tsparticles/plugin-motion","@tsparticles/shape-polygon","@tsparticles/updater-roll","@tsparticles/updater-rotate","@tsparticles/shape-square","@tsparticles/shape-star","@tsparticles/updater-tilt","@tsparticles/updater-wobble"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.confetti=t.__tsParticlesInternals.bundles.confetti||{}),t.__tsParticlesInternals.engine,t.__tsParticlesInternals.bundles.basic,t.__tsParticlesInternals.shapes["cards/suits"],t.__tsParticlesInternals.plugins["emitters/plugin"],t.__tsParticlesInternals.shapes.emoji,t.__tsParticlesInternals.shapes.heart,t.__tsParticlesInternals.shapes.image,t.__tsParticlesInternals.updaters.life,t.__tsParticlesInternals.plugins.motion,t.__tsParticlesInternals.shapes.polygon,t.__tsParticlesInternals.updaters.roll,t.__tsParticlesInternals.updaters.rotate,t.__tsParticlesInternals.shapes.square,t.__tsParticlesInternals.shapes.star,t.__tsParticlesInternals.updaters.tilt,t.__tsParticlesInternals.updaters.wobble)}(this,function(t,e,s,a,i,n,r,l,o,c,p,d,_,u,h,P,f){"use strict";class I{angle;colors;count;decay;disableForReducedMotion;drift;flat;gravity;position;scalar;shapeOptions;shapes;spread;startVelocity;ticks;zIndex;constructor(){this.angle=90,this.count=50,this.spread=45,this.startVelocity=45,this.decay=.9,this.gravity=1,this.drift=0,this.ticks=200,this.position={x:50,y:50},this.colors=["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],this.shapes=["square","circle"],this.scalar=1,this.zIndex=100,this.disableForReducedMotion=!0,this.flat=!1,this.shapeOptions={}}get origin(){return{x:this.position.x/e.percentDenominator,y:this.position.y/e.percentDenominator}}set origin(t){this.position.x=t.x*e.percentDenominator,this.position.y=t.y*e.percentDenominator}get particleCount(){return this.count}set particleCount(t){this.count=t}load(t){if(e.isNull(t))return;e.loadProperty(this,"angle",t.angle);const s=t.count??t.particleCount;void 0!==s&&(this.count=s),e.loadProperty(this,"spread",t.spread),e.loadProperty(this,"startVelocity",t.startVelocity),e.loadProperty(this,"decay",t.decay),e.loadProperty(this,"flat",t.flat),e.loadProperty(this,"gravity",t.gravity),e.loadProperty(this,"drift",t.drift),e.loadProperty(this,"ticks",t.ticks);const a=t.origin;a&&!t.position&&(t.position={x:void 0===a.x?void 0:a.x*e.percentDenominator,y:void 0===a.y?void 0:a.y*e.percentDenominator});const i=t.position;i&&(void 0!==i.x&&(this.position.x=i.x),void 0!==i.y&&(this.position.y=i.y)),void 0!==t.colors&&(e.isArray(t.colors)?this.colors=[...t.colors]:this.colors=t.colors);const n=t.shapeOptions;if(void 0!==n)for(const t in n){const s=n[t];s&&(this.shapeOptions[t]=e.deepExtend(this.shapeOptions[t]??{},s))}void 0!==t.shapes&&(e.isArray(t.shapes)?this.shapes=[...t.shapes]:this.shapes=t.shapes),e.loadProperty(this,"scalar",t.scalar),e.loadProperty(this,"zIndex",t.zIndex),e.loadProperty(this,"disableForReducedMotion",t.disableForReducedMotion)}}const y=new Map;async function m(t,s){const a=new I;a.load(s.options);const i=Number.isFinite(a.ticks)&&a.ticks>0?a.ticks:void 0,n=void 0===i?0:120*e.percentDenominator/(e.defaultFps*i);let r=y.get(s.id);r instanceof Promise&&(await r,r=y.get(s.id));const l=r;if(l&&!l.destroyed){const t=l;if("addEmitter"in t)return await async function(t,e,s){await(t.addEmitter?.({startCount:e.count,position:e.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{paint:{fill:{color:{value:e.colors},enable:!0}},shape:{type:e.shapes,options:e.shapeOptions},life:{count:1},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:s,startValue:"max",destroy:"min",count:1}},size:{value:5*e.scalar},move:{angle:{value:e.spread,offset:0},drift:{min:-e.drift,max:e.drift},gravity:{acceleration:9.81*e.gravity},speed:3*e.startVelocity,decay:1-e.decay,direction:-e.angle},rotate:{value:e.flat?0:{min:0,max:360},direction:"random",animation:{enable:!e.flat,speed:60}},tilt:{direction:"random",enable:!e.flat,value:e.flat?0:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!e.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!e.flat,speed:{min:-15,max:15}}}}))}(t,a,n),l}const o=(async()=>{const e=function(t,e,s){return{fullScreen:{enable:!e.canvas,zIndex:t.zIndex},fpsLimit:120,particles:{number:{value:0},paint:{fill:{color:{value:t.colors},enable:!0}},shape:{type:t.shapes,options:t.shapeOptions},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:s,startValue:"max",destroy:"min",count:1}},size:{value:5*t.scalar},links:{enable:!1},life:{count:1},move:{angle:{value:t.spread,offset:0},drift:{min:-t.drift,max:t.drift},enable:!0,gravity:{enable:!0,acceleration:9.81*t.gravity},speed:3*t.startVelocity,decay:1-t.decay,direction:-t.angle,random:!0,straight:!1,outModes:{top:"none",default:"destroy"}},rotate:{value:t.flat?0:{min:0,max:360},direction:"random",animation:{enable:!t.flat,speed:60}},tilt:{direction:"random",enable:!t.flat,value:t.flat?0:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!t.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!t.flat,speed:{min:-15,max:15}}},motion:{disable:t.disableForReducedMotion},emitters:{name:"confetti",startCount:t.count,position:t.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}}}(a,s,n),i=await t.load({id:s.id,element:s.canvas,options:e});return y.set(s.id,i),i})();return y.set(s.id,o),o}let g=null;async function b(t){return g||(g=async function(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{await Promise.all([s.loadBasic(t),c.loadMotionPlugin(t),i.loadEmittersPluginSimple(t),a.loadCardSuitsShape(t),r.loadHeartShape(t),l.loadImageShape(t),p.loadPolygonShape(t),u.loadSquareShape(t),h.loadStarShape(t),n.loadEmojiShape(t),_.loadRotateUpdater(t),o.loadLifeUpdater(t),d.loadRollUpdater(t),P.loadTiltUpdater(t),f.loadWobbleUpdater(t)])})}(t),g)}async function v(t,s){let a,i;return await b(e.tsParticles),e.isString(t)?(i=t,a=s??{}):(i="confetti",a=t),m(e.tsParticles,{id:i,options:a})}v.create=async(t,s={})=>{await b(e.tsParticles);const a=t?.getAttribute("id")??"confetti";return t?.setAttribute("id",a),await m(e.tsParticles,{id:a,canvas:t??void 0,options:s}),async(i,n)=>{let r,l;return e.isString(i)?(l=i,r=n??s):(l=a,r=i),m(e.tsParticles,{id:l,canvas:t??void 0,options:r})}},v.init=async()=>{await b(e.tsParticles)},v.version="4.2.1",globalThis.confetti=v;const x=globalThis;x.__tsParticlesInternals=x.__tsParticlesInternals??{},x.confetti=v,t.confetti=v}),Object.assign(globalThis.window||globalThis,{confetti:(globalThis.__tsParticlesInternals.bundles.confetti||{}).confetti}),delete(globalThis.window||globalThis).tsparticlesInternalExports;