1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | (function webpackUniversalModuleDefinition(root, factory) {
|
10 | if(typeof exports === 'object' && typeof module === 'object')
|
11 | module.exports = factory(require("tsparticles-engine"), require("tsparticles-updater-angle"), require("tsparticles-move-base"), require("tsparticles-shape-cards"), require("tsparticles-shape-circle"), require("tsparticles-updater-color"), require("tsparticles-plugin-emitters"), require("tsparticles-shape-heart"), require("tsparticles-shape-image"), require("tsparticles-updater-life"), require("tsparticles-plugin-motion"), require("tsparticles-updater-opacity"), require("tsparticles-updater-out-modes"), require("tsparticles-shape-polygon"), require("tsparticles-updater-roll"), require("tsparticles-updater-size"), require("tsparticles-shape-square"), require("tsparticles-shape-star"), require("tsparticles-shape-text"), require("tsparticles-updater-tilt"), require("tsparticles-updater-wobble"));
|
12 | else if(typeof define === 'function' && define.amd)
|
13 | define(["tsparticles-engine", "tsparticles-updater-angle", "tsparticles-move-base", "tsparticles-shape-cards", "tsparticles-shape-circle", "tsparticles-updater-color", "tsparticles-plugin-emitters", "tsparticles-shape-heart", "tsparticles-shape-image", "tsparticles-updater-life", "tsparticles-plugin-motion", "tsparticles-updater-opacity", "tsparticles-updater-out-modes", "tsparticles-shape-polygon", "tsparticles-updater-roll", "tsparticles-updater-size", "tsparticles-shape-square", "tsparticles-shape-star", "tsparticles-shape-text", "tsparticles-updater-tilt", "tsparticles-updater-wobble"], factory);
|
14 | else {
|
15 | var a = typeof exports === 'object' ? factory(require("tsparticles-engine"), require("tsparticles-updater-angle"), require("tsparticles-move-base"), require("tsparticles-shape-cards"), require("tsparticles-shape-circle"), require("tsparticles-updater-color"), require("tsparticles-plugin-emitters"), require("tsparticles-shape-heart"), require("tsparticles-shape-image"), require("tsparticles-updater-life"), require("tsparticles-plugin-motion"), require("tsparticles-updater-opacity"), require("tsparticles-updater-out-modes"), require("tsparticles-shape-polygon"), require("tsparticles-updater-roll"), require("tsparticles-updater-size"), require("tsparticles-shape-square"), require("tsparticles-shape-star"), require("tsparticles-shape-text"), require("tsparticles-updater-tilt"), require("tsparticles-updater-wobble")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
|
16 | for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
17 | }
|
18 | })(this, (__WEBPACK_EXTERNAL_MODULE__961__, __WEBPACK_EXTERNAL_MODULE__490__, __WEBPACK_EXTERNAL_MODULE__565__, __WEBPACK_EXTERNAL_MODULE__522__, __WEBPACK_EXTERNAL_MODULE__851__, __WEBPACK_EXTERNAL_MODULE__613__, __WEBPACK_EXTERNAL_MODULE__716__, __WEBPACK_EXTERNAL_MODULE__516__, __WEBPACK_EXTERNAL_MODULE__520__, __WEBPACK_EXTERNAL_MODULE__86__, __WEBPACK_EXTERNAL_MODULE__255__, __WEBPACK_EXTERNAL_MODULE__515__, __WEBPACK_EXTERNAL_MODULE__509__, __WEBPACK_EXTERNAL_MODULE__841__, __WEBPACK_EXTERNAL_MODULE__852__, __WEBPACK_EXTERNAL_MODULE__694__, __WEBPACK_EXTERNAL_MODULE__860__, __WEBPACK_EXTERNAL_MODULE__208__, __WEBPACK_EXTERNAL_MODULE__706__, __WEBPACK_EXTERNAL_MODULE__95__, __WEBPACK_EXTERNAL_MODULE__585__) => {
|
19 | return (() => {
|
20 | "use strict";
|
21 | var __webpack_modules__ = ({
|
22 |
|
23 | 961:
|
24 | ((module) => {
|
25 |
|
26 | module.exports = __WEBPACK_EXTERNAL_MODULE__961__;
|
27 |
|
28 | }),
|
29 |
|
30 | 565:
|
31 | ((module) => {
|
32 |
|
33 | module.exports = __WEBPACK_EXTERNAL_MODULE__565__;
|
34 |
|
35 | }),
|
36 |
|
37 | 716:
|
38 | ((module) => {
|
39 |
|
40 | module.exports = __WEBPACK_EXTERNAL_MODULE__716__;
|
41 |
|
42 | }),
|
43 |
|
44 | 255:
|
45 | ((module) => {
|
46 |
|
47 | module.exports = __WEBPACK_EXTERNAL_MODULE__255__;
|
48 |
|
49 | }),
|
50 |
|
51 | 522:
|
52 | ((module) => {
|
53 |
|
54 | module.exports = __WEBPACK_EXTERNAL_MODULE__522__;
|
55 |
|
56 | }),
|
57 |
|
58 | 851:
|
59 | ((module) => {
|
60 |
|
61 | module.exports = __WEBPACK_EXTERNAL_MODULE__851__;
|
62 |
|
63 | }),
|
64 |
|
65 | 516:
|
66 | ((module) => {
|
67 |
|
68 | module.exports = __WEBPACK_EXTERNAL_MODULE__516__;
|
69 |
|
70 | }),
|
71 |
|
72 | 520:
|
73 | ((module) => {
|
74 |
|
75 | module.exports = __WEBPACK_EXTERNAL_MODULE__520__;
|
76 |
|
77 | }),
|
78 |
|
79 | 841:
|
80 | ((module) => {
|
81 |
|
82 | module.exports = __WEBPACK_EXTERNAL_MODULE__841__;
|
83 |
|
84 | }),
|
85 |
|
86 | 860:
|
87 | ((module) => {
|
88 |
|
89 | module.exports = __WEBPACK_EXTERNAL_MODULE__860__;
|
90 |
|
91 | }),
|
92 |
|
93 | 208:
|
94 | ((module) => {
|
95 |
|
96 | module.exports = __WEBPACK_EXTERNAL_MODULE__208__;
|
97 |
|
98 | }),
|
99 |
|
100 | 706:
|
101 | ((module) => {
|
102 |
|
103 | module.exports = __WEBPACK_EXTERNAL_MODULE__706__;
|
104 |
|
105 | }),
|
106 |
|
107 | 490:
|
108 | ((module) => {
|
109 |
|
110 | module.exports = __WEBPACK_EXTERNAL_MODULE__490__;
|
111 |
|
112 | }),
|
113 |
|
114 | 613:
|
115 | ((module) => {
|
116 |
|
117 | module.exports = __WEBPACK_EXTERNAL_MODULE__613__;
|
118 |
|
119 | }),
|
120 |
|
121 | 86:
|
122 | ((module) => {
|
123 |
|
124 | module.exports = __WEBPACK_EXTERNAL_MODULE__86__;
|
125 |
|
126 | }),
|
127 |
|
128 | 515:
|
129 | ((module) => {
|
130 |
|
131 | module.exports = __WEBPACK_EXTERNAL_MODULE__515__;
|
132 |
|
133 | }),
|
134 |
|
135 | 509:
|
136 | ((module) => {
|
137 |
|
138 | module.exports = __WEBPACK_EXTERNAL_MODULE__509__;
|
139 |
|
140 | }),
|
141 |
|
142 | 852:
|
143 | ((module) => {
|
144 |
|
145 | module.exports = __WEBPACK_EXTERNAL_MODULE__852__;
|
146 |
|
147 | }),
|
148 |
|
149 | 694:
|
150 | ((module) => {
|
151 |
|
152 | module.exports = __WEBPACK_EXTERNAL_MODULE__694__;
|
153 |
|
154 | }),
|
155 |
|
156 | 95:
|
157 | ((module) => {
|
158 |
|
159 | module.exports = __WEBPACK_EXTERNAL_MODULE__95__;
|
160 |
|
161 | }),
|
162 |
|
163 | 585:
|
164 | ((module) => {
|
165 |
|
166 | module.exports = __WEBPACK_EXTERNAL_MODULE__585__;
|
167 |
|
168 | })
|
169 |
|
170 | });
|
171 |
|
172 |
|
173 | var __webpack_module_cache__ = {};
|
174 |
|
175 |
|
176 | function __webpack_require__(moduleId) {
|
177 |
|
178 | var cachedModule = __webpack_module_cache__[moduleId];
|
179 | if (cachedModule !== undefined) {
|
180 | return cachedModule.exports;
|
181 | }
|
182 |
|
183 | var module = __webpack_module_cache__[moduleId] = {
|
184 |
|
185 |
|
186 | exports: {}
|
187 | };
|
188 |
|
189 |
|
190 | __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
191 |
|
192 |
|
193 | return module.exports;
|
194 | }
|
195 |
|
196 |
|
197 |
|
198 | (() => {
|
199 |
|
200 | __webpack_require__.d = (exports, definition) => {
|
201 | for(var key in definition) {
|
202 | if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
203 | Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
204 | }
|
205 | }
|
206 | };
|
207 | })();
|
208 |
|
209 |
|
210 | (() => {
|
211 | __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
212 | })();
|
213 |
|
214 |
|
215 | (() => {
|
216 |
|
217 | __webpack_require__.r = (exports) => {
|
218 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
219 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
220 | }
|
221 | Object.defineProperty(exports, '__esModule', { value: true });
|
222 | };
|
223 | })();
|
224 |
|
225 |
|
226 | var __webpack_exports__ = {};
|
227 |
|
228 | (() => {
|
229 |
|
230 | __webpack_require__.r(__webpack_exports__);
|
231 |
|
232 |
|
233 | __webpack_require__.d(__webpack_exports__, {
|
234 | "confetti": () => ( confetti)
|
235 | });
|
236 |
|
237 |
|
238 | var external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_ = __webpack_require__(961);
|
239 | ;
|
240 |
|
241 | class ConfettiOptions {
|
242 | constructor() {
|
243 | this.angle = 90;
|
244 | this.count = 50;
|
245 | this.spread = 45;
|
246 | this.startVelocity = 45;
|
247 | this.decay = 0.9;
|
248 | this.gravity = 1;
|
249 | this.drift = 0;
|
250 | this.ticks = 200;
|
251 | this.position = {
|
252 | x: 50,
|
253 | y: 50
|
254 | };
|
255 | this.colors = ["#26ccff", "#a25afd", "#ff5e7e", "#88ff5a", "#fcff42", "#ffa62d", "#ff36ff"];
|
256 | this.shapes = ["square", "circle"];
|
257 | this.scalar = 1;
|
258 | this.zIndex = 100;
|
259 | this.disableForReducedMotion = true;
|
260 | this.shapeOptions = {};
|
261 | }
|
262 | get origin() {
|
263 | return {
|
264 | x: this.position.x / 100,
|
265 | y: this.position.y / 100
|
266 | };
|
267 | }
|
268 | set origin(value) {
|
269 | this.position.x = value.x * 100;
|
270 | this.position.y = value.y * 100;
|
271 | }
|
272 | get particleCount() {
|
273 | return this.count;
|
274 | }
|
275 | set particleCount(value) {
|
276 | this.count = value;
|
277 | }
|
278 | load(data) {
|
279 | var _a, _b;
|
280 | if (!data) {
|
281 | return;
|
282 | }
|
283 | if (data.angle !== undefined) {
|
284 | this.angle = data.angle;
|
285 | }
|
286 | const count = (_a = data.count) !== null && _a !== void 0 ? _a : data.particleCount;
|
287 | if (count !== undefined) {
|
288 | this.count = count;
|
289 | }
|
290 | if (data.spread !== undefined) {
|
291 | this.spread = data.spread;
|
292 | }
|
293 | if (data.startVelocity !== undefined) {
|
294 | this.startVelocity = data.startVelocity;
|
295 | }
|
296 | if (data.decay !== undefined) {
|
297 | this.decay = data.decay;
|
298 | }
|
299 | if (data.gravity !== undefined) {
|
300 | this.gravity = data.gravity;
|
301 | }
|
302 | if (data.drift !== undefined) {
|
303 | this.drift = data.drift;
|
304 | }
|
305 | if (data.ticks !== undefined) {
|
306 | this.ticks = data.ticks;
|
307 | }
|
308 | const origin = data.origin;
|
309 | if (origin && !data.position) {
|
310 | data.position = {
|
311 | x: origin.x !== undefined ? origin.x * 100 : undefined,
|
312 | y: origin.y !== undefined ? origin.y * 100 : undefined
|
313 | };
|
314 | }
|
315 | const position = data.position;
|
316 | if (position) {
|
317 | if (position.x !== undefined) {
|
318 | this.position.x = position.x;
|
319 | }
|
320 | if (position.y !== undefined) {
|
321 | this.position.y = position.y;
|
322 | }
|
323 | }
|
324 | if (data.colors !== undefined) {
|
325 | if (data.colors instanceof Array) {
|
326 | this.colors = [...data.colors];
|
327 | } else {
|
328 | this.colors = data.colors;
|
329 | }
|
330 | }
|
331 | const options = data.shapeOptions;
|
332 | if (options !== undefined) {
|
333 | for (const shape in options) {
|
334 | const item = options[shape];
|
335 | if (item) {
|
336 | this.shapeOptions[shape] = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.deepExtend)((_b = this.shapeOptions[shape]) !== null && _b !== void 0 ? _b : {}, item);
|
337 | }
|
338 | }
|
339 | }
|
340 | if (data.shapes !== undefined) {
|
341 | if (data.shapes instanceof Array) {
|
342 | this.shapes = [...data.shapes];
|
343 | } else {
|
344 | this.shapes = data.shapes;
|
345 | }
|
346 | }
|
347 | if (data.scalar !== undefined) {
|
348 | this.scalar = data.scalar;
|
349 | }
|
350 | if (data.zIndex !== undefined) {
|
351 | this.zIndex = data.zIndex;
|
352 | }
|
353 | if (data.disableForReducedMotion !== undefined) {
|
354 | this.disableForReducedMotion = data.disableForReducedMotion;
|
355 | }
|
356 | }
|
357 | }
|
358 |
|
359 | var external_commonjs_tsparticles_updater_angle_commonjs2_tsparticles_updater_angle_amd_tsparticles_updater_angle_root_window_ = __webpack_require__(490);
|
360 |
|
361 | var external_commonjs_tsparticles_move_base_commonjs2_tsparticles_move_base_amd_tsparticles_move_base_root_window_ = __webpack_require__(565);
|
362 |
|
363 | var external_commonjs_tsparticles_shape_cards_commonjs2_tsparticles_shape_cards_amd_tsparticles_shape_cards_root_window_ = __webpack_require__(522);
|
364 |
|
365 | var external_commonjs_tsparticles_shape_circle_commonjs2_tsparticles_shape_circle_amd_tsparticles_shape_circle_root_window_ = __webpack_require__(851);
|
366 |
|
367 | var external_commonjs_tsparticles_updater_color_commonjs2_tsparticles_updater_color_amd_tsparticles_updater_color_root_window_ = __webpack_require__(613);
|
368 |
|
369 | var external_commonjs_tsparticles_plugin_emitters_commonjs2_tsparticles_plugin_emitters_amd_tsparticles_plugin_emitters_root_window_ = __webpack_require__(716);
|
370 |
|
371 | var external_commonjs_tsparticles_shape_heart_commonjs2_tsparticles_shape_heart_amd_tsparticles_shape_heart_root_window_ = __webpack_require__(516);
|
372 |
|
373 | var external_commonjs_tsparticles_shape_image_commonjs2_tsparticles_shape_image_amd_tsparticles_shape_image_root_window_ = __webpack_require__(520);
|
374 |
|
375 | var external_commonjs_tsparticles_updater_life_commonjs2_tsparticles_updater_life_amd_tsparticles_updater_life_root_window_ = __webpack_require__(86);
|
376 |
|
377 | var external_commonjs_tsparticles_plugin_motion_commonjs2_tsparticles_plugin_motion_amd_tsparticles_plugin_motion_root_window_ = __webpack_require__(255);
|
378 |
|
379 | var external_commonjs_tsparticles_updater_opacity_commonjs2_tsparticles_updater_opacity_amd_tsparticles_updater_opacity_root_window_ = __webpack_require__(515);
|
380 |
|
381 | var external_commonjs_tsparticles_updater_out_modes_commonjs2_tsparticles_updater_out_modes_amd_tsparticles_updater_out_modes_root_window_ = __webpack_require__(509);
|
382 |
|
383 | var external_commonjs_tsparticles_shape_polygon_commonjs2_tsparticles_shape_polygon_amd_tsparticles_shape_polygon_root_window_ = __webpack_require__(841);
|
384 |
|
385 | var external_commonjs_tsparticles_updater_roll_commonjs2_tsparticles_updater_roll_amd_tsparticles_updater_roll_root_window_ = __webpack_require__(852);
|
386 |
|
387 | var external_commonjs_tsparticles_updater_size_commonjs2_tsparticles_updater_size_amd_tsparticles_updater_size_root_window_ = __webpack_require__(694);
|
388 |
|
389 | var external_commonjs_tsparticles_shape_square_commonjs2_tsparticles_shape_square_amd_tsparticles_shape_square_root_window_ = __webpack_require__(860);
|
390 |
|
391 | var external_commonjs_tsparticles_shape_star_commonjs2_tsparticles_shape_star_amd_tsparticles_shape_star_root_window_ = __webpack_require__(208);
|
392 |
|
393 | var external_commonjs_tsparticles_shape_text_commonjs2_tsparticles_shape_text_amd_tsparticles_shape_text_root_window_ = __webpack_require__(706);
|
394 |
|
395 | var external_commonjs_tsparticles_updater_tilt_commonjs2_tsparticles_updater_tilt_amd_tsparticles_updater_tilt_root_window_ = __webpack_require__(95);
|
396 |
|
397 | var external_commonjs_tsparticles_updater_wobble_commonjs2_tsparticles_updater_wobble_amd_tsparticles_updater_wobble_root_window_ = __webpack_require__(585);
|
398 | ;
|
399 |
|
400 |
|
401 |
|
402 |
|
403 |
|
404 |
|
405 |
|
406 |
|
407 |
|
408 |
|
409 |
|
410 |
|
411 |
|
412 |
|
413 |
|
414 |
|
415 |
|
416 |
|
417 |
|
418 |
|
419 |
|
420 |
|
421 | let initialized = false;
|
422 | let initializing = false;
|
423 | const ids = new Map();
|
424 | async function initPlugins() {
|
425 | if (initialized) {
|
426 | return;
|
427 | }
|
428 | if (initializing) {
|
429 | return new Promise(resolve => {
|
430 | const interval = setInterval(() => {
|
431 | if (initialized) {
|
432 | clearInterval(interval);
|
433 | resolve();
|
434 | }
|
435 | }, 100);
|
436 | });
|
437 | }
|
438 | initializing = true;
|
439 | await (0,external_commonjs_tsparticles_move_base_commonjs2_tsparticles_move_base_amd_tsparticles_move_base_root_window_.loadBaseMover)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
440 | await (0,external_commonjs_tsparticles_plugin_emitters_commonjs2_tsparticles_plugin_emitters_amd_tsparticles_plugin_emitters_root_window_.loadEmittersPlugin)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
441 | await (0,external_commonjs_tsparticles_plugin_motion_commonjs2_tsparticles_plugin_motion_amd_tsparticles_plugin_motion_root_window_.loadMotionPlugin)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
442 | await (0,external_commonjs_tsparticles_shape_cards_commonjs2_tsparticles_shape_cards_amd_tsparticles_shape_cards_root_window_.loadCardsShape)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
443 | await (0,external_commonjs_tsparticles_shape_circle_commonjs2_tsparticles_shape_circle_amd_tsparticles_shape_circle_root_window_.loadCircleShape)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
444 | await (0,external_commonjs_tsparticles_shape_heart_commonjs2_tsparticles_shape_heart_amd_tsparticles_shape_heart_root_window_.loadHeartShape)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
445 | await (0,external_commonjs_tsparticles_shape_image_commonjs2_tsparticles_shape_image_amd_tsparticles_shape_image_root_window_.loadImageShape)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
446 | await (0,external_commonjs_tsparticles_shape_polygon_commonjs2_tsparticles_shape_polygon_amd_tsparticles_shape_polygon_root_window_.loadPolygonShape)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
447 | await (0,external_commonjs_tsparticles_shape_square_commonjs2_tsparticles_shape_square_amd_tsparticles_shape_square_root_window_.loadSquareShape)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
448 | await (0,external_commonjs_tsparticles_shape_star_commonjs2_tsparticles_shape_star_amd_tsparticles_shape_star_root_window_.loadStarShape)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
449 | await (0,external_commonjs_tsparticles_shape_text_commonjs2_tsparticles_shape_text_amd_tsparticles_shape_text_root_window_.loadTextShape)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
450 | await (0,external_commonjs_tsparticles_updater_angle_commonjs2_tsparticles_updater_angle_amd_tsparticles_updater_angle_root_window_.loadAngleUpdater)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
451 | await (0,external_commonjs_tsparticles_updater_color_commonjs2_tsparticles_updater_color_amd_tsparticles_updater_color_root_window_.loadColorUpdater)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
452 | await (0,external_commonjs_tsparticles_updater_life_commonjs2_tsparticles_updater_life_amd_tsparticles_updater_life_root_window_.loadLifeUpdater)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
453 | await (0,external_commonjs_tsparticles_updater_opacity_commonjs2_tsparticles_updater_opacity_amd_tsparticles_updater_opacity_root_window_.loadOpacityUpdater)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
454 | await (0,external_commonjs_tsparticles_updater_out_modes_commonjs2_tsparticles_updater_out_modes_amd_tsparticles_updater_out_modes_root_window_.loadOutModesUpdater)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
455 | await (0,external_commonjs_tsparticles_updater_roll_commonjs2_tsparticles_updater_roll_amd_tsparticles_updater_roll_root_window_.loadRollUpdater)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
456 | await (0,external_commonjs_tsparticles_updater_size_commonjs2_tsparticles_updater_size_amd_tsparticles_updater_size_root_window_.loadSizeUpdater)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
457 | await (0,external_commonjs_tsparticles_updater_tilt_commonjs2_tsparticles_updater_tilt_amd_tsparticles_updater_tilt_root_window_.loadTiltUpdater)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
458 | await (0,external_commonjs_tsparticles_updater_wobble_commonjs2_tsparticles_updater_wobble_amd_tsparticles_updater_wobble_root_window_.loadWobbleUpdater)(external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles);
|
459 | initializing = false;
|
460 | initialized = true;
|
461 | }
|
462 | async function setConfetti(params) {
|
463 | const actualOptions = new ConfettiOptions();
|
464 | actualOptions.load(params.options);
|
465 | let container;
|
466 | if (ids.has(params.id)) {
|
467 | container = ids.get(params.id);
|
468 | if (container && !container.destroyed) {
|
469 | const alias = container;
|
470 | if (alias.addEmitter) {
|
471 | alias.addEmitter({
|
472 | startCount: actualOptions.count,
|
473 | position: actualOptions.position,
|
474 | size: {
|
475 | width: 0,
|
476 | height: 0
|
477 | },
|
478 | rate: {
|
479 | delay: 0,
|
480 | quantity: 0
|
481 | },
|
482 | life: {
|
483 | duration: 0.1,
|
484 | count: 1
|
485 | },
|
486 | particles: {
|
487 | color: {
|
488 | value: actualOptions.colors
|
489 | },
|
490 | shape: {
|
491 | type: actualOptions.shapes,
|
492 | options: actualOptions.shapeOptions
|
493 | },
|
494 | size: {
|
495 | value: 5 * actualOptions.scalar
|
496 | },
|
497 | life: {
|
498 | duration: {
|
499 | value: actualOptions.ticks / 60
|
500 | }
|
501 | },
|
502 | move: {
|
503 | angle: {
|
504 | value: actualOptions.spread,
|
505 | offset: 0
|
506 | },
|
507 | drift: {
|
508 | min: -actualOptions.drift,
|
509 | max: actualOptions.drift
|
510 | },
|
511 | gravity: {
|
512 | acceleration: actualOptions.gravity * 9.81
|
513 | },
|
514 | speed: actualOptions.startVelocity * 3,
|
515 | decay: 1 - actualOptions.decay,
|
516 | direction: -actualOptions.angle
|
517 | }
|
518 | }
|
519 | });
|
520 | return;
|
521 | }
|
522 | }
|
523 | }
|
524 | const particlesOptions = {
|
525 | fullScreen: {
|
526 | enable: !params.canvas,
|
527 | zIndex: actualOptions.zIndex
|
528 | },
|
529 | fpsLimit: 120,
|
530 | particles: {
|
531 | number: {
|
532 | value: 0
|
533 | },
|
534 | color: {
|
535 | value: actualOptions.colors
|
536 | },
|
537 | shape: {
|
538 | type: actualOptions.shapes,
|
539 | options: actualOptions.shapeOptions
|
540 | },
|
541 | opacity: {
|
542 | value: {
|
543 | min: 0,
|
544 | max: 1
|
545 | },
|
546 | animation: {
|
547 | enable: true,
|
548 | speed: 0.5,
|
549 | startValue: "max",
|
550 | destroy: "min"
|
551 | }
|
552 | },
|
553 | size: {
|
554 | value: 5 * actualOptions.scalar
|
555 | },
|
556 | links: {
|
557 | enable: false
|
558 | },
|
559 | life: {
|
560 | duration: {
|
561 | sync: true,
|
562 | value: actualOptions.ticks / 60
|
563 | },
|
564 | count: 1
|
565 | },
|
566 | move: {
|
567 | angle: {
|
568 | value: actualOptions.spread,
|
569 | offset: 0
|
570 | },
|
571 | drift: {
|
572 | min: -actualOptions.drift,
|
573 | max: actualOptions.drift
|
574 | },
|
575 | enable: true,
|
576 | gravity: {
|
577 | enable: true,
|
578 | acceleration: actualOptions.gravity * 9.81
|
579 | },
|
580 | speed: actualOptions.startVelocity * 3,
|
581 | decay: 1 - actualOptions.decay,
|
582 | direction: -actualOptions.angle,
|
583 | random: true,
|
584 | straight: false,
|
585 | outModes: {
|
586 | default: "none",
|
587 | bottom: "destroy"
|
588 | }
|
589 | },
|
590 | rotate: {
|
591 | value: {
|
592 | min: 0,
|
593 | max: 360
|
594 | },
|
595 | direction: "random",
|
596 | animation: {
|
597 | enable: true,
|
598 | speed: 60
|
599 | }
|
600 | },
|
601 | tilt: {
|
602 | direction: "random",
|
603 | enable: true,
|
604 | value: {
|
605 | min: 0,
|
606 | max: 360
|
607 | },
|
608 | animation: {
|
609 | enable: true,
|
610 | speed: 60
|
611 | }
|
612 | },
|
613 | roll: {
|
614 | darken: {
|
615 | enable: true,
|
616 | value: 25
|
617 | },
|
618 | enable: true,
|
619 | speed: {
|
620 | min: 15,
|
621 | max: 25
|
622 | }
|
623 | },
|
624 | wobble: {
|
625 | distance: 30,
|
626 | enable: true,
|
627 | speed: {
|
628 | min: -15,
|
629 | max: 15
|
630 | }
|
631 | }
|
632 | },
|
633 | detectRetina: true,
|
634 | motion: {
|
635 | disable: actualOptions.disableForReducedMotion
|
636 | },
|
637 | emitters: {
|
638 | name: "confetti",
|
639 | startCount: actualOptions.count,
|
640 | position: actualOptions.position,
|
641 | size: {
|
642 | width: 0,
|
643 | height: 0
|
644 | },
|
645 | rate: {
|
646 | delay: 0,
|
647 | quantity: 0
|
648 | },
|
649 | life: {
|
650 | duration: 0.1,
|
651 | count: 1
|
652 | }
|
653 | }
|
654 | };
|
655 | if (params.id) {
|
656 | container = await external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles.load(params.id, particlesOptions);
|
657 | } else if (params.canvas) {
|
658 | container = await external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles.set(params.id, params.canvas, particlesOptions);
|
659 | }
|
660 | ids.set(params.id, container);
|
661 | return container;
|
662 | }
|
663 | async function confetti(idOrOptions, confettiOptions) {
|
664 | await initPlugins();
|
665 | let options;
|
666 | let id;
|
667 | if (typeof idOrOptions === "string") {
|
668 | id = idOrOptions;
|
669 | options = confettiOptions !== null && confettiOptions !== void 0 ? confettiOptions : {};
|
670 | } else {
|
671 | id = "confetti";
|
672 | options = idOrOptions;
|
673 | }
|
674 | return setConfetti({
|
675 | id,
|
676 | options
|
677 | });
|
678 | }
|
679 | confetti.create = async (canvas, options) => {
|
680 | if (!canvas) {
|
681 | return confetti;
|
682 | }
|
683 | await initPlugins();
|
684 | const id = canvas.getAttribute("id") || "confetti";
|
685 | canvas.setAttribute("id", id);
|
686 | return async (idOrOptions, confettiOptions) => {
|
687 | let subOptions;
|
688 | let subId;
|
689 | if (typeof idOrOptions === "string") {
|
690 | subId = idOrOptions;
|
691 | subOptions = confettiOptions !== null && confettiOptions !== void 0 ? confettiOptions : options;
|
692 | } else {
|
693 | subId = id;
|
694 | subOptions = idOrOptions;
|
695 | }
|
696 | return setConfetti({
|
697 | id: subId,
|
698 | canvas,
|
699 | options: subOptions
|
700 | });
|
701 | };
|
702 | };
|
703 | ;
|
704 |
|
705 | })();
|
706 |
|
707 | return __webpack_exports__;
|
708 | })()
|
709 | ;
|
710 | }); |
\ | No newline at end of file |