lew-ui 2.4.13 → 2.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +46 -46
- package/README.zh-CN.md +48 -48
- package/dist/confetti.browser.min.js +456 -456
- package/dist/docs/views/form-engine/schema/compoments-menus.d.ts +31 -21
- package/dist/docs/views/form-engine/schema/components/slider-range.d.ts +0 -16
- package/dist/docs/views/form-engine/schema/components/slider.d.ts +0 -16
- package/dist/index.mjs +134 -95
- package/dist/index.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,456 +1,456 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minified by jsDelivr using Terser v5.10.0.
|
|
3
|
-
* Original file: /npm/canvas-confetti@1.5.1/dist/confetti.browser.js
|
|
4
|
-
*
|
|
5
|
-
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
|
6
|
-
*/
|
|
7
|
-
!(function (t, e) {
|
|
8
|
-
!(function t(e, n, a, i) {
|
|
9
|
-
let o = !!(
|
|
10
|
-
e.Worker &&
|
|
11
|
-
e.Blob &&
|
|
12
|
-
e.Promise &&
|
|
13
|
-
e.OffscreenCanvas &&
|
|
14
|
-
e.OffscreenCanvasRenderingContext2D &&
|
|
15
|
-
e.HTMLCanvasElement &&
|
|
16
|
-
e.HTMLCanvasElement.prototype.transferControlToOffscreen &&
|
|
17
|
-
e.URL &&
|
|
18
|
-
e.URL.createObjectURL
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
function r() {}
|
|
22
|
-
|
|
23
|
-
function l(t) {
|
|
24
|
-
let a = n.exports.Promise,
|
|
25
|
-
i = void 0 !== a ? a : e.Promise
|
|
26
|
-
return typeof i === 'function' ? new i(t) : (t(r, r), null)
|
|
27
|
-
}
|
|
28
|
-
let c,
|
|
29
|
-
s,
|
|
30
|
-
u,
|
|
31
|
-
d,
|
|
32
|
-
f,
|
|
33
|
-
h,
|
|
34
|
-
m,
|
|
35
|
-
g,
|
|
36
|
-
b,
|
|
37
|
-
v =
|
|
38
|
-
((u = Math.floor(1e3 / 60)),
|
|
39
|
-
(d = {}),
|
|
40
|
-
(f = 0),
|
|
41
|
-
typeof requestAnimationFrame === 'function' && typeof cancelAnimationFrame === 'function'
|
|
42
|
-
? ((c = function (t) {
|
|
43
|
-
let e = Math.random()
|
|
44
|
-
return (
|
|
45
|
-
(d[e] = requestAnimationFrame(function n(a) {
|
|
46
|
-
f === a || f + u - 1 < a
|
|
47
|
-
? ((f = a), delete d[e], t())
|
|
48
|
-
: (d[e] = requestAnimationFrame(n))
|
|
49
|
-
})),
|
|
50
|
-
e
|
|
51
|
-
)
|
|
52
|
-
}),
|
|
53
|
-
(s = function (t) {
|
|
54
|
-
d[t] && cancelAnimationFrame(d[t])
|
|
55
|
-
}))
|
|
56
|
-
: ((c = function (t) {
|
|
57
|
-
return setTimeout(t, u)
|
|
58
|
-
}),
|
|
59
|
-
(s = function (t) {
|
|
60
|
-
return clearTimeout(t)
|
|
61
|
-
})),
|
|
62
|
-
{ frame: c, cancel: s }),
|
|
63
|
-
p =
|
|
64
|
-
((g = {}),
|
|
65
|
-
function () {
|
|
66
|
-
if (h) return h
|
|
67
|
-
if (!a && o) {
|
|
68
|
-
let e = [
|
|
69
|
-
'var CONFETTI, SIZE = {}, module = {};',
|
|
70
|
-
'(' + t.toString() + ')(this, module, true, SIZE);',
|
|
71
|
-
'onmessage = function(msg) {',
|
|
72
|
-
' if (msg.data.options) {',
|
|
73
|
-
' CONFETTI(msg.data.options).then(function () {',
|
|
74
|
-
' if (msg.data.callback) {',
|
|
75
|
-
' postMessage({ callback: msg.data.callback });',
|
|
76
|
-
' }',
|
|
77
|
-
' });',
|
|
78
|
-
' } else if (msg.data.reset) {',
|
|
79
|
-
' CONFETTI.reset();',
|
|
80
|
-
' } else if (msg.data.resize) {',
|
|
81
|
-
' SIZE.width = msg.data.resize.width;',
|
|
82
|
-
' SIZE.height = msg.data.resize.height;',
|
|
83
|
-
' } else if (msg.data.canvas) {',
|
|
84
|
-
' SIZE.width = msg.data.canvas.width;',
|
|
85
|
-
' SIZE.height = msg.data.canvas.height;',
|
|
86
|
-
' CONFETTI = module.exports.create(msg.data.canvas);',
|
|
87
|
-
' }',
|
|
88
|
-
'}'
|
|
89
|
-
].join('\n')
|
|
90
|
-
try {
|
|
91
|
-
h = new Worker(URL.createObjectURL(new Blob([e])))
|
|
92
|
-
} catch (t) {
|
|
93
|
-
return (
|
|
94
|
-
void 0 !== typeof console &&
|
|
95
|
-
typeof console.warn === 'function' &&
|
|
96
|
-
console.warn('🎊 Could not load worker', t),
|
|
97
|
-
null
|
|
98
|
-
)
|
|
99
|
-
}
|
|
100
|
-
!(function (t) {
|
|
101
|
-
function e(e, n) {
|
|
102
|
-
t.postMessage({
|
|
103
|
-
options: e || {},
|
|
104
|
-
callback: n
|
|
105
|
-
})
|
|
106
|
-
}
|
|
107
|
-
;(t.init = function (e) {
|
|
108
|
-
let n = e.transferControlToOffscreen()
|
|
109
|
-
t.postMessage({ canvas: n }, [n])
|
|
110
|
-
}),
|
|
111
|
-
(t.fire = function (n, a, i) {
|
|
112
|
-
if (m) return e(n, null), m
|
|
113
|
-
let o = Math.random().toString(36).slice(2)
|
|
114
|
-
return (m = l(function (a) {
|
|
115
|
-
function r(e) {
|
|
116
|
-
e.data.callback === o &&
|
|
117
|
-
(delete g[o], t.removeEventListener('message', r), (m = null), i(), a())
|
|
118
|
-
}
|
|
119
|
-
t.addEventListener('message', r),
|
|
120
|
-
e(n, o),
|
|
121
|
-
(g[o] = r.bind(null, {
|
|
122
|
-
data: { callback: o }
|
|
123
|
-
}))
|
|
124
|
-
}))
|
|
125
|
-
}),
|
|
126
|
-
(t.reset = function () {
|
|
127
|
-
for (let e in (t.postMessage({ reset: !0 }), g)) g[e](), delete g[e]
|
|
128
|
-
})
|
|
129
|
-
})(h)
|
|
130
|
-
}
|
|
131
|
-
return h
|
|
132
|
-
}),
|
|
133
|
-
y = {
|
|
134
|
-
particleCount: 50,
|
|
135
|
-
angle: 90,
|
|
136
|
-
spread: 45,
|
|
137
|
-
startVelocity: 45,
|
|
138
|
-
decay: 0.9,
|
|
139
|
-
gravity: 1,
|
|
140
|
-
drift: 0,
|
|
141
|
-
ticks: 200,
|
|
142
|
-
x: 0.5,
|
|
143
|
-
y: 0.5,
|
|
144
|
-
shapes: ['square', 'circle'],
|
|
145
|
-
zIndex: 100,
|
|
146
|
-
colors: ['#26ccff', '#a25afd', '#ff5e7e', '#88ff5a', '#fcff42', '#ffa62d', '#ff36ff'],
|
|
147
|
-
disableForReducedMotion: !1,
|
|
148
|
-
scalar: 1
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function M(t, e, n) {
|
|
152
|
-
return (function (t, e) {
|
|
153
|
-
return e ? e(t) : t
|
|
154
|
-
})(t && t[e] != null ? t[e] : y[e], n)
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
function w(t) {
|
|
158
|
-
return t < 0 ? 0 : Math.floor(t)
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
function x(t) {
|
|
162
|
-
return parseInt(t, 16)
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
function C(t) {
|
|
166
|
-
return t.map(k)
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function k(t) {
|
|
170
|
-
let e = String(t).replace(/[^0-9a-f]/gi, '')
|
|
171
|
-
return (
|
|
172
|
-
e.length < 6 && (e = e[0] + e[0] + e[1] + e[1] + e[2] + e[2]),
|
|
173
|
-
{
|
|
174
|
-
r: x(e.substring(0, 2)),
|
|
175
|
-
g: x(e.substring(2, 4)),
|
|
176
|
-
b: x(e.substring(4, 6))
|
|
177
|
-
}
|
|
178
|
-
)
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
function I(t) {
|
|
182
|
-
;(t.width = document.documentElement.clientWidth), (t.height = document.documentElement.clientHeight)
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
function S(t) {
|
|
186
|
-
let e = t.getBoundingClientRect()
|
|
187
|
-
;(t.width = e.width), (t.height = e.height)
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
function T(t, e, n, o, r) {
|
|
191
|
-
let c,
|
|
192
|
-
s,
|
|
193
|
-
u = e.slice(),
|
|
194
|
-
d = t.getContext('2d'),
|
|
195
|
-
f = l(function (e) {
|
|
196
|
-
function l() {
|
|
197
|
-
;(c = s = null), d.clearRect(0, 0, o.width, o.height), r(), e()
|
|
198
|
-
}
|
|
199
|
-
;(c = v.frame(function e() {
|
|
200
|
-
!a ||
|
|
201
|
-
(o.width === i.width && o.height === i.height) ||
|
|
202
|
-
((o.width = t.width = i.width), (o.height = t.height = i.height)),
|
|
203
|
-
o.width || o.height || (n(t), (o.width = t.width), (o.height = t.height)),
|
|
204
|
-
d.clearRect(0, 0, o.width, o.height),
|
|
205
|
-
(u = u.filter(function (t) {
|
|
206
|
-
return (function (t, e) {
|
|
207
|
-
;(e.x += Math.cos(e.angle2D) * e.velocity + e.drift),
|
|
208
|
-
(e.y += Math.sin(e.angle2D) * e.velocity + e.gravity),
|
|
209
|
-
(e.wobble += e.wobbleSpeed),
|
|
210
|
-
(e.velocity *= e.decay),
|
|
211
|
-
(e.tiltAngle += 0.1),
|
|
212
|
-
(e.tiltSin = Math.sin(e.tiltAngle)),
|
|
213
|
-
(e.tiltCos = Math.cos(e.tiltAngle)),
|
|
214
|
-
(e.random = Math.random() + 2),
|
|
215
|
-
(e.wobbleX = e.x + 10 * e.scalar * Math.cos(e.wobble)),
|
|
216
|
-
(e.wobbleY = e.y + 10 * e.scalar * Math.sin(e.wobble))
|
|
217
|
-
let n = e.tick++ / e.totalTicks,
|
|
218
|
-
a = e.x + e.random * e.tiltCos,
|
|
219
|
-
i = e.y + e.random * e.tiltSin,
|
|
220
|
-
o = e.wobbleX + e.random * e.tiltCos,
|
|
221
|
-
r = e.wobbleY + e.random * e.tiltSin
|
|
222
|
-
return (
|
|
223
|
-
(t.fillStyle =
|
|
224
|
-
'rgba(' +
|
|
225
|
-
e.color.r +
|
|
226
|
-
', ' +
|
|
227
|
-
e.color.g +
|
|
228
|
-
', ' +
|
|
229
|
-
e.color.b +
|
|
230
|
-
', ' +
|
|
231
|
-
(1 - n) +
|
|
232
|
-
')'),
|
|
233
|
-
t.beginPath(),
|
|
234
|
-
e.shape === 'circle'
|
|
235
|
-
? t.ellipse
|
|
236
|
-
? t.ellipse(
|
|
237
|
-
e.x,
|
|
238
|
-
e.y,
|
|
239
|
-
Math.abs(o - a) * e.ovalScalar,
|
|
240
|
-
Math.abs(r - i) * e.ovalScalar,
|
|
241
|
-
(Math.PI / 10) * e.wobble,
|
|
242
|
-
0,
|
|
243
|
-
2 * Math.PI
|
|
244
|
-
)
|
|
245
|
-
: (function (t, e, n, a, i, o, r, l, c) {
|
|
246
|
-
t.save(),
|
|
247
|
-
t.translate(e, n),
|
|
248
|
-
t.rotate(o),
|
|
249
|
-
t.scale(a, i),
|
|
250
|
-
t.arc(0, 0, 1, r, l, c),
|
|
251
|
-
t.restore()
|
|
252
|
-
})(
|
|
253
|
-
t,
|
|
254
|
-
e.x,
|
|
255
|
-
e.y,
|
|
256
|
-
Math.abs(o - a) * e.ovalScalar,
|
|
257
|
-
Math.abs(r - i) * e.ovalScalar,
|
|
258
|
-
(Math.PI / 10) * e.wobble,
|
|
259
|
-
0,
|
|
260
|
-
2 * Math.PI
|
|
261
|
-
)
|
|
262
|
-
: (t.moveTo(Math.floor(e.x), Math.floor(e.y)),
|
|
263
|
-
t.lineTo(Math.floor(e.wobbleX), Math.floor(i)),
|
|
264
|
-
t.lineTo(Math.floor(o), Math.floor(r)),
|
|
265
|
-
t.lineTo(Math.floor(a), Math.floor(e.wobbleY))),
|
|
266
|
-
t.closePath(),
|
|
267
|
-
t.fill(),
|
|
268
|
-
e.tick < e.totalTicks
|
|
269
|
-
)
|
|
270
|
-
})(d, t)
|
|
271
|
-
})),
|
|
272
|
-
u.length ? (c = v.frame(e)) : l()
|
|
273
|
-
})),
|
|
274
|
-
(s = l)
|
|
275
|
-
})
|
|
276
|
-
return {
|
|
277
|
-
addFettis(t) {
|
|
278
|
-
return (u = u.concat(t)), f
|
|
279
|
-
},
|
|
280
|
-
canvas: t,
|
|
281
|
-
promise: f,
|
|
282
|
-
reset() {
|
|
283
|
-
c && v.cancel(c), s && s()
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
function E(t, n) {
|
|
289
|
-
let a,
|
|
290
|
-
i = !t,
|
|
291
|
-
r = !!M(n || {}, 'resize'),
|
|
292
|
-
c = M(n, 'disableForReducedMotion', Boolean),
|
|
293
|
-
s = o && !!M(n || {}, 'useWorker') ? p() : null,
|
|
294
|
-
u = i ? I : S,
|
|
295
|
-
d = !(!t || !s) && !!t.__confetti_initialized,
|
|
296
|
-
f = typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion)').matches
|
|
297
|
-
|
|
298
|
-
function h(e, n, i) {
|
|
299
|
-
for (
|
|
300
|
-
var o,
|
|
301
|
-
r,
|
|
302
|
-
l,
|
|
303
|
-
c,
|
|
304
|
-
s,
|
|
305
|
-
d = M(e, 'particleCount', w),
|
|
306
|
-
f = M(e, 'angle', Number),
|
|
307
|
-
h = M(e, 'spread', Number),
|
|
308
|
-
m = M(e, 'startVelocity', Number),
|
|
309
|
-
g = M(e, 'decay', Number),
|
|
310
|
-
b = M(e, 'gravity', Number),
|
|
311
|
-
v = M(e, 'drift', Number),
|
|
312
|
-
p = M(e, 'colors', C),
|
|
313
|
-
y = M(e, 'ticks', Number),
|
|
314
|
-
x = M(e, 'shapes'),
|
|
315
|
-
k = M(e, 'scalar'),
|
|
316
|
-
I = (function (t) {
|
|
317
|
-
let e = M(t, 'origin', Object)
|
|
318
|
-
return (e.x = M(e, 'x', Number)), (e.y = M(e, 'y', Number)), e
|
|
319
|
-
})(e),
|
|
320
|
-
S = d,
|
|
321
|
-
E = [],
|
|
322
|
-
F = t.width * I.x,
|
|
323
|
-
N = t.height * I.y;
|
|
324
|
-
S--;
|
|
325
|
-
|
|
326
|
-
)
|
|
327
|
-
E.push(
|
|
328
|
-
((o = {
|
|
329
|
-
x: F,
|
|
330
|
-
y: N,
|
|
331
|
-
angle: f,
|
|
332
|
-
spread: h,
|
|
333
|
-
startVelocity: m,
|
|
334
|
-
color: p[S % p.length],
|
|
335
|
-
shape: x[((c = 0), (s = x.length), Math.floor(Math.random() * (s - c)) + c)],
|
|
336
|
-
ticks: y,
|
|
337
|
-
decay: g,
|
|
338
|
-
gravity: b,
|
|
339
|
-
drift: v,
|
|
340
|
-
scalar: k
|
|
341
|
-
}),
|
|
342
|
-
(r = void 0),
|
|
343
|
-
(l = void 0),
|
|
344
|
-
(r = o.angle * (Math.PI / 180)),
|
|
345
|
-
(l = o.spread * (Math.PI / 180)),
|
|
346
|
-
{
|
|
347
|
-
x: o.x,
|
|
348
|
-
y: o.y,
|
|
349
|
-
wobble: 10 * Math.random(),
|
|
350
|
-
wobbleSpeed: Math.min(0.11, 0.1 * Math.random() + 0.05),
|
|
351
|
-
velocity: 0.5 * o.startVelocity + Math.random() * o.startVelocity,
|
|
352
|
-
angle2D: -r + (0.5 * l - Math.random() * l),
|
|
353
|
-
tiltAngle: (0.5 * Math.random() + 0.25) * Math.PI,
|
|
354
|
-
color: o.color,
|
|
355
|
-
shape: o.shape,
|
|
356
|
-
tick: 0,
|
|
357
|
-
totalTicks: o.ticks,
|
|
358
|
-
decay: o.decay,
|
|
359
|
-
drift: o.drift,
|
|
360
|
-
random: Math.random() + 2,
|
|
361
|
-
tiltSin: 0,
|
|
362
|
-
tiltCos: 0,
|
|
363
|
-
wobbleX: 0,
|
|
364
|
-
wobbleY: 0,
|
|
365
|
-
gravity: 3 * o.gravity,
|
|
366
|
-
ovalScalar: 0.6,
|
|
367
|
-
scalar: o.scalar
|
|
368
|
-
})
|
|
369
|
-
)
|
|
370
|
-
return a ? a.addFettis(E) : (a = T(t, E, u, n, i)).promise
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
function m(n) {
|
|
374
|
-
let o = c || M(n, 'disableForReducedMotion', Boolean),
|
|
375
|
-
m = M(n, 'zIndex', Number)
|
|
376
|
-
if (o && f)
|
|
377
|
-
return l(function (t) {
|
|
378
|
-
t()
|
|
379
|
-
})
|
|
380
|
-
i && a
|
|
381
|
-
? (t = a.canvas)
|
|
382
|
-
: i &&
|
|
383
|
-
!t &&
|
|
384
|
-
((t = (function (t) {
|
|
385
|
-
let e = document.createElement('canvas')
|
|
386
|
-
return (
|
|
387
|
-
(e.style.position = 'fixed'),
|
|
388
|
-
(e.style.top = '0px'),
|
|
389
|
-
(e.style.left = '0px'),
|
|
390
|
-
(e.style.pointerEvents = 'none'),
|
|
391
|
-
(e.style.zIndex = t),
|
|
392
|
-
e
|
|
393
|
-
)
|
|
394
|
-
})(m)),
|
|
395
|
-
document.body.appendChild(t)),
|
|
396
|
-
r && !d && u(t)
|
|
397
|
-
let g = { width: t.width, height: t.height }
|
|
398
|
-
|
|
399
|
-
function b() {
|
|
400
|
-
if (s) {
|
|
401
|
-
let e = {
|
|
402
|
-
getBoundingClientRect() {
|
|
403
|
-
if (!i) return t.getBoundingClientRect()
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
return (
|
|
407
|
-
u(e),
|
|
408
|
-
void s.postMessage({
|
|
409
|
-
resize: { width: e.width, height: e.height }
|
|
410
|
-
})
|
|
411
|
-
)
|
|
412
|
-
}
|
|
413
|
-
g.width = g.height = null
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
function v() {
|
|
417
|
-
;(a = null),
|
|
418
|
-
r && e.removeEventListener('resize', b),
|
|
419
|
-
i && t && (document.body.removeChild(t), (t = null), (d = !1))
|
|
420
|
-
}
|
|
421
|
-
return (
|
|
422
|
-
s && !d && s.init(t),
|
|
423
|
-
(d = !0),
|
|
424
|
-
s && (t.__confetti_initialized = !0),
|
|
425
|
-
r && e.addEventListener('resize', b, !1),
|
|
426
|
-
s ? s.fire(n, g, v) : h(n, g, v)
|
|
427
|
-
)
|
|
428
|
-
}
|
|
429
|
-
return (
|
|
430
|
-
(m.reset = function () {
|
|
431
|
-
s && s.reset(), a && a.reset()
|
|
432
|
-
}),
|
|
433
|
-
m
|
|
434
|
-
)
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
function F() {
|
|
438
|
-
return b || (b = E(null, { useWorker: !0, resize: !0 })), b
|
|
439
|
-
}
|
|
440
|
-
;(n.exports = function () {
|
|
441
|
-
return F().apply(this, arguments)
|
|
442
|
-
}),
|
|
443
|
-
(n.exports.reset = function () {
|
|
444
|
-
F().reset()
|
|
445
|
-
}),
|
|
446
|
-
(n.exports.create = E)
|
|
447
|
-
})(
|
|
448
|
-
(function () {
|
|
449
|
-
return void 0 !== t ? t : typeof self != 'undefined' ? self : this || {}
|
|
450
|
-
})(),
|
|
451
|
-
e,
|
|
452
|
-
!1
|
|
453
|
-
),
|
|
454
|
-
(t.confetti = e.exports)
|
|
455
|
-
})(window, {})
|
|
456
|
-
// # sourceMappingURL=/sm/ab60d7fb9bf5b5ded42c77782b65b071de85f56c21da42948364d6b2b1961762.map
|
|
1
|
+
/**
|
|
2
|
+
* Minified by jsDelivr using Terser v5.10.0.
|
|
3
|
+
* Original file: /npm/canvas-confetti@1.5.1/dist/confetti.browser.js
|
|
4
|
+
*
|
|
5
|
+
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
|
6
|
+
*/
|
|
7
|
+
!(function (t, e) {
|
|
8
|
+
!(function t(e, n, a, i) {
|
|
9
|
+
let o = !!(
|
|
10
|
+
e.Worker &&
|
|
11
|
+
e.Blob &&
|
|
12
|
+
e.Promise &&
|
|
13
|
+
e.OffscreenCanvas &&
|
|
14
|
+
e.OffscreenCanvasRenderingContext2D &&
|
|
15
|
+
e.HTMLCanvasElement &&
|
|
16
|
+
e.HTMLCanvasElement.prototype.transferControlToOffscreen &&
|
|
17
|
+
e.URL &&
|
|
18
|
+
e.URL.createObjectURL
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
function r() {}
|
|
22
|
+
|
|
23
|
+
function l(t) {
|
|
24
|
+
let a = n.exports.Promise,
|
|
25
|
+
i = void 0 !== a ? a : e.Promise
|
|
26
|
+
return typeof i === 'function' ? new i(t) : (t(r, r), null)
|
|
27
|
+
}
|
|
28
|
+
let c,
|
|
29
|
+
s,
|
|
30
|
+
u,
|
|
31
|
+
d,
|
|
32
|
+
f,
|
|
33
|
+
h,
|
|
34
|
+
m,
|
|
35
|
+
g,
|
|
36
|
+
b,
|
|
37
|
+
v =
|
|
38
|
+
((u = Math.floor(1e3 / 60)),
|
|
39
|
+
(d = {}),
|
|
40
|
+
(f = 0),
|
|
41
|
+
typeof requestAnimationFrame === 'function' && typeof cancelAnimationFrame === 'function'
|
|
42
|
+
? ((c = function (t) {
|
|
43
|
+
let e = Math.random()
|
|
44
|
+
return (
|
|
45
|
+
(d[e] = requestAnimationFrame(function n(a) {
|
|
46
|
+
f === a || f + u - 1 < a
|
|
47
|
+
? ((f = a), delete d[e], t())
|
|
48
|
+
: (d[e] = requestAnimationFrame(n))
|
|
49
|
+
})),
|
|
50
|
+
e
|
|
51
|
+
)
|
|
52
|
+
}),
|
|
53
|
+
(s = function (t) {
|
|
54
|
+
d[t] && cancelAnimationFrame(d[t])
|
|
55
|
+
}))
|
|
56
|
+
: ((c = function (t) {
|
|
57
|
+
return setTimeout(t, u)
|
|
58
|
+
}),
|
|
59
|
+
(s = function (t) {
|
|
60
|
+
return clearTimeout(t)
|
|
61
|
+
})),
|
|
62
|
+
{ frame: c, cancel: s }),
|
|
63
|
+
p =
|
|
64
|
+
((g = {}),
|
|
65
|
+
function () {
|
|
66
|
+
if (h) return h
|
|
67
|
+
if (!a && o) {
|
|
68
|
+
let e = [
|
|
69
|
+
'var CONFETTI, SIZE = {}, module = {};',
|
|
70
|
+
'(' + t.toString() + ')(this, module, true, SIZE);',
|
|
71
|
+
'onmessage = function(msg) {',
|
|
72
|
+
' if (msg.data.options) {',
|
|
73
|
+
' CONFETTI(msg.data.options).then(function () {',
|
|
74
|
+
' if (msg.data.callback) {',
|
|
75
|
+
' postMessage({ callback: msg.data.callback });',
|
|
76
|
+
' }',
|
|
77
|
+
' });',
|
|
78
|
+
' } else if (msg.data.reset) {',
|
|
79
|
+
' CONFETTI.reset();',
|
|
80
|
+
' } else if (msg.data.resize) {',
|
|
81
|
+
' SIZE.width = msg.data.resize.width;',
|
|
82
|
+
' SIZE.height = msg.data.resize.height;',
|
|
83
|
+
' } else if (msg.data.canvas) {',
|
|
84
|
+
' SIZE.width = msg.data.canvas.width;',
|
|
85
|
+
' SIZE.height = msg.data.canvas.height;',
|
|
86
|
+
' CONFETTI = module.exports.create(msg.data.canvas);',
|
|
87
|
+
' }',
|
|
88
|
+
'}'
|
|
89
|
+
].join('\n')
|
|
90
|
+
try {
|
|
91
|
+
h = new Worker(URL.createObjectURL(new Blob([e])))
|
|
92
|
+
} catch (t) {
|
|
93
|
+
return (
|
|
94
|
+
void 0 !== typeof console &&
|
|
95
|
+
typeof console.warn === 'function' &&
|
|
96
|
+
console.warn('🎊 Could not load worker', t),
|
|
97
|
+
null
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
!(function (t) {
|
|
101
|
+
function e(e, n) {
|
|
102
|
+
t.postMessage({
|
|
103
|
+
options: e || {},
|
|
104
|
+
callback: n
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
;(t.init = function (e) {
|
|
108
|
+
let n = e.transferControlToOffscreen()
|
|
109
|
+
t.postMessage({ canvas: n }, [n])
|
|
110
|
+
}),
|
|
111
|
+
(t.fire = function (n, a, i) {
|
|
112
|
+
if (m) return e(n, null), m
|
|
113
|
+
let o = Math.random().toString(36).slice(2)
|
|
114
|
+
return (m = l(function (a) {
|
|
115
|
+
function r(e) {
|
|
116
|
+
e.data.callback === o &&
|
|
117
|
+
(delete g[o], t.removeEventListener('message', r), (m = null), i(), a())
|
|
118
|
+
}
|
|
119
|
+
t.addEventListener('message', r),
|
|
120
|
+
e(n, o),
|
|
121
|
+
(g[o] = r.bind(null, {
|
|
122
|
+
data: { callback: o }
|
|
123
|
+
}))
|
|
124
|
+
}))
|
|
125
|
+
}),
|
|
126
|
+
(t.reset = function () {
|
|
127
|
+
for (let e in (t.postMessage({ reset: !0 }), g)) g[e](), delete g[e]
|
|
128
|
+
})
|
|
129
|
+
})(h)
|
|
130
|
+
}
|
|
131
|
+
return h
|
|
132
|
+
}),
|
|
133
|
+
y = {
|
|
134
|
+
particleCount: 50,
|
|
135
|
+
angle: 90,
|
|
136
|
+
spread: 45,
|
|
137
|
+
startVelocity: 45,
|
|
138
|
+
decay: 0.9,
|
|
139
|
+
gravity: 1,
|
|
140
|
+
drift: 0,
|
|
141
|
+
ticks: 200,
|
|
142
|
+
x: 0.5,
|
|
143
|
+
y: 0.5,
|
|
144
|
+
shapes: ['square', 'circle'],
|
|
145
|
+
zIndex: 100,
|
|
146
|
+
colors: ['#26ccff', '#a25afd', '#ff5e7e', '#88ff5a', '#fcff42', '#ffa62d', '#ff36ff'],
|
|
147
|
+
disableForReducedMotion: !1,
|
|
148
|
+
scalar: 1
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function M(t, e, n) {
|
|
152
|
+
return (function (t, e) {
|
|
153
|
+
return e ? e(t) : t
|
|
154
|
+
})(t && t[e] != null ? t[e] : y[e], n)
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function w(t) {
|
|
158
|
+
return t < 0 ? 0 : Math.floor(t)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function x(t) {
|
|
162
|
+
return parseInt(t, 16)
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
function C(t) {
|
|
166
|
+
return t.map(k)
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function k(t) {
|
|
170
|
+
let e = String(t).replace(/[^0-9a-f]/gi, '')
|
|
171
|
+
return (
|
|
172
|
+
e.length < 6 && (e = e[0] + e[0] + e[1] + e[1] + e[2] + e[2]),
|
|
173
|
+
{
|
|
174
|
+
r: x(e.substring(0, 2)),
|
|
175
|
+
g: x(e.substring(2, 4)),
|
|
176
|
+
b: x(e.substring(4, 6))
|
|
177
|
+
}
|
|
178
|
+
)
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function I(t) {
|
|
182
|
+
;(t.width = document.documentElement.clientWidth), (t.height = document.documentElement.clientHeight)
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function S(t) {
|
|
186
|
+
let e = t.getBoundingClientRect()
|
|
187
|
+
;(t.width = e.width), (t.height = e.height)
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function T(t, e, n, o, r) {
|
|
191
|
+
let c,
|
|
192
|
+
s,
|
|
193
|
+
u = e.slice(),
|
|
194
|
+
d = t.getContext('2d'),
|
|
195
|
+
f = l(function (e) {
|
|
196
|
+
function l() {
|
|
197
|
+
;(c = s = null), d.clearRect(0, 0, o.width, o.height), r(), e()
|
|
198
|
+
}
|
|
199
|
+
;(c = v.frame(function e() {
|
|
200
|
+
!a ||
|
|
201
|
+
(o.width === i.width && o.height === i.height) ||
|
|
202
|
+
((o.width = t.width = i.width), (o.height = t.height = i.height)),
|
|
203
|
+
o.width || o.height || (n(t), (o.width = t.width), (o.height = t.height)),
|
|
204
|
+
d.clearRect(0, 0, o.width, o.height),
|
|
205
|
+
(u = u.filter(function (t) {
|
|
206
|
+
return (function (t, e) {
|
|
207
|
+
;(e.x += Math.cos(e.angle2D) * e.velocity + e.drift),
|
|
208
|
+
(e.y += Math.sin(e.angle2D) * e.velocity + e.gravity),
|
|
209
|
+
(e.wobble += e.wobbleSpeed),
|
|
210
|
+
(e.velocity *= e.decay),
|
|
211
|
+
(e.tiltAngle += 0.1),
|
|
212
|
+
(e.tiltSin = Math.sin(e.tiltAngle)),
|
|
213
|
+
(e.tiltCos = Math.cos(e.tiltAngle)),
|
|
214
|
+
(e.random = Math.random() + 2),
|
|
215
|
+
(e.wobbleX = e.x + 10 * e.scalar * Math.cos(e.wobble)),
|
|
216
|
+
(e.wobbleY = e.y + 10 * e.scalar * Math.sin(e.wobble))
|
|
217
|
+
let n = e.tick++ / e.totalTicks,
|
|
218
|
+
a = e.x + e.random * e.tiltCos,
|
|
219
|
+
i = e.y + e.random * e.tiltSin,
|
|
220
|
+
o = e.wobbleX + e.random * e.tiltCos,
|
|
221
|
+
r = e.wobbleY + e.random * e.tiltSin
|
|
222
|
+
return (
|
|
223
|
+
(t.fillStyle =
|
|
224
|
+
'rgba(' +
|
|
225
|
+
e.color.r +
|
|
226
|
+
', ' +
|
|
227
|
+
e.color.g +
|
|
228
|
+
', ' +
|
|
229
|
+
e.color.b +
|
|
230
|
+
', ' +
|
|
231
|
+
(1 - n) +
|
|
232
|
+
')'),
|
|
233
|
+
t.beginPath(),
|
|
234
|
+
e.shape === 'circle'
|
|
235
|
+
? t.ellipse
|
|
236
|
+
? t.ellipse(
|
|
237
|
+
e.x,
|
|
238
|
+
e.y,
|
|
239
|
+
Math.abs(o - a) * e.ovalScalar,
|
|
240
|
+
Math.abs(r - i) * e.ovalScalar,
|
|
241
|
+
(Math.PI / 10) * e.wobble,
|
|
242
|
+
0,
|
|
243
|
+
2 * Math.PI
|
|
244
|
+
)
|
|
245
|
+
: (function (t, e, n, a, i, o, r, l, c) {
|
|
246
|
+
t.save(),
|
|
247
|
+
t.translate(e, n),
|
|
248
|
+
t.rotate(o),
|
|
249
|
+
t.scale(a, i),
|
|
250
|
+
t.arc(0, 0, 1, r, l, c),
|
|
251
|
+
t.restore()
|
|
252
|
+
})(
|
|
253
|
+
t,
|
|
254
|
+
e.x,
|
|
255
|
+
e.y,
|
|
256
|
+
Math.abs(o - a) * e.ovalScalar,
|
|
257
|
+
Math.abs(r - i) * e.ovalScalar,
|
|
258
|
+
(Math.PI / 10) * e.wobble,
|
|
259
|
+
0,
|
|
260
|
+
2 * Math.PI
|
|
261
|
+
)
|
|
262
|
+
: (t.moveTo(Math.floor(e.x), Math.floor(e.y)),
|
|
263
|
+
t.lineTo(Math.floor(e.wobbleX), Math.floor(i)),
|
|
264
|
+
t.lineTo(Math.floor(o), Math.floor(r)),
|
|
265
|
+
t.lineTo(Math.floor(a), Math.floor(e.wobbleY))),
|
|
266
|
+
t.closePath(),
|
|
267
|
+
t.fill(),
|
|
268
|
+
e.tick < e.totalTicks
|
|
269
|
+
)
|
|
270
|
+
})(d, t)
|
|
271
|
+
})),
|
|
272
|
+
u.length ? (c = v.frame(e)) : l()
|
|
273
|
+
})),
|
|
274
|
+
(s = l)
|
|
275
|
+
})
|
|
276
|
+
return {
|
|
277
|
+
addFettis(t) {
|
|
278
|
+
return (u = u.concat(t)), f
|
|
279
|
+
},
|
|
280
|
+
canvas: t,
|
|
281
|
+
promise: f,
|
|
282
|
+
reset() {
|
|
283
|
+
c && v.cancel(c), s && s()
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
function E(t, n) {
|
|
289
|
+
let a,
|
|
290
|
+
i = !t,
|
|
291
|
+
r = !!M(n || {}, 'resize'),
|
|
292
|
+
c = M(n, 'disableForReducedMotion', Boolean),
|
|
293
|
+
s = o && !!M(n || {}, 'useWorker') ? p() : null,
|
|
294
|
+
u = i ? I : S,
|
|
295
|
+
d = !(!t || !s) && !!t.__confetti_initialized,
|
|
296
|
+
f = typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion)').matches
|
|
297
|
+
|
|
298
|
+
function h(e, n, i) {
|
|
299
|
+
for (
|
|
300
|
+
var o,
|
|
301
|
+
r,
|
|
302
|
+
l,
|
|
303
|
+
c,
|
|
304
|
+
s,
|
|
305
|
+
d = M(e, 'particleCount', w),
|
|
306
|
+
f = M(e, 'angle', Number),
|
|
307
|
+
h = M(e, 'spread', Number),
|
|
308
|
+
m = M(e, 'startVelocity', Number),
|
|
309
|
+
g = M(e, 'decay', Number),
|
|
310
|
+
b = M(e, 'gravity', Number),
|
|
311
|
+
v = M(e, 'drift', Number),
|
|
312
|
+
p = M(e, 'colors', C),
|
|
313
|
+
y = M(e, 'ticks', Number),
|
|
314
|
+
x = M(e, 'shapes'),
|
|
315
|
+
k = M(e, 'scalar'),
|
|
316
|
+
I = (function (t) {
|
|
317
|
+
let e = M(t, 'origin', Object)
|
|
318
|
+
return (e.x = M(e, 'x', Number)), (e.y = M(e, 'y', Number)), e
|
|
319
|
+
})(e),
|
|
320
|
+
S = d,
|
|
321
|
+
E = [],
|
|
322
|
+
F = t.width * I.x,
|
|
323
|
+
N = t.height * I.y;
|
|
324
|
+
S--;
|
|
325
|
+
|
|
326
|
+
)
|
|
327
|
+
E.push(
|
|
328
|
+
((o = {
|
|
329
|
+
x: F,
|
|
330
|
+
y: N,
|
|
331
|
+
angle: f,
|
|
332
|
+
spread: h,
|
|
333
|
+
startVelocity: m,
|
|
334
|
+
color: p[S % p.length],
|
|
335
|
+
shape: x[((c = 0), (s = x.length), Math.floor(Math.random() * (s - c)) + c)],
|
|
336
|
+
ticks: y,
|
|
337
|
+
decay: g,
|
|
338
|
+
gravity: b,
|
|
339
|
+
drift: v,
|
|
340
|
+
scalar: k
|
|
341
|
+
}),
|
|
342
|
+
(r = void 0),
|
|
343
|
+
(l = void 0),
|
|
344
|
+
(r = o.angle * (Math.PI / 180)),
|
|
345
|
+
(l = o.spread * (Math.PI / 180)),
|
|
346
|
+
{
|
|
347
|
+
x: o.x,
|
|
348
|
+
y: o.y,
|
|
349
|
+
wobble: 10 * Math.random(),
|
|
350
|
+
wobbleSpeed: Math.min(0.11, 0.1 * Math.random() + 0.05),
|
|
351
|
+
velocity: 0.5 * o.startVelocity + Math.random() * o.startVelocity,
|
|
352
|
+
angle2D: -r + (0.5 * l - Math.random() * l),
|
|
353
|
+
tiltAngle: (0.5 * Math.random() + 0.25) * Math.PI,
|
|
354
|
+
color: o.color,
|
|
355
|
+
shape: o.shape,
|
|
356
|
+
tick: 0,
|
|
357
|
+
totalTicks: o.ticks,
|
|
358
|
+
decay: o.decay,
|
|
359
|
+
drift: o.drift,
|
|
360
|
+
random: Math.random() + 2,
|
|
361
|
+
tiltSin: 0,
|
|
362
|
+
tiltCos: 0,
|
|
363
|
+
wobbleX: 0,
|
|
364
|
+
wobbleY: 0,
|
|
365
|
+
gravity: 3 * o.gravity,
|
|
366
|
+
ovalScalar: 0.6,
|
|
367
|
+
scalar: o.scalar
|
|
368
|
+
})
|
|
369
|
+
)
|
|
370
|
+
return a ? a.addFettis(E) : (a = T(t, E, u, n, i)).promise
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
function m(n) {
|
|
374
|
+
let o = c || M(n, 'disableForReducedMotion', Boolean),
|
|
375
|
+
m = M(n, 'zIndex', Number)
|
|
376
|
+
if (o && f)
|
|
377
|
+
return l(function (t) {
|
|
378
|
+
t()
|
|
379
|
+
})
|
|
380
|
+
i && a
|
|
381
|
+
? (t = a.canvas)
|
|
382
|
+
: i &&
|
|
383
|
+
!t &&
|
|
384
|
+
((t = (function (t) {
|
|
385
|
+
let e = document.createElement('canvas')
|
|
386
|
+
return (
|
|
387
|
+
(e.style.position = 'fixed'),
|
|
388
|
+
(e.style.top = '0px'),
|
|
389
|
+
(e.style.left = '0px'),
|
|
390
|
+
(e.style.pointerEvents = 'none'),
|
|
391
|
+
(e.style.zIndex = t),
|
|
392
|
+
e
|
|
393
|
+
)
|
|
394
|
+
})(m)),
|
|
395
|
+
document.body.appendChild(t)),
|
|
396
|
+
r && !d && u(t)
|
|
397
|
+
let g = { width: t.width, height: t.height }
|
|
398
|
+
|
|
399
|
+
function b() {
|
|
400
|
+
if (s) {
|
|
401
|
+
let e = {
|
|
402
|
+
getBoundingClientRect() {
|
|
403
|
+
if (!i) return t.getBoundingClientRect()
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
return (
|
|
407
|
+
u(e),
|
|
408
|
+
void s.postMessage({
|
|
409
|
+
resize: { width: e.width, height: e.height }
|
|
410
|
+
})
|
|
411
|
+
)
|
|
412
|
+
}
|
|
413
|
+
g.width = g.height = null
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
function v() {
|
|
417
|
+
;(a = null),
|
|
418
|
+
r && e.removeEventListener('resize', b),
|
|
419
|
+
i && t && (document.body.removeChild(t), (t = null), (d = !1))
|
|
420
|
+
}
|
|
421
|
+
return (
|
|
422
|
+
s && !d && s.init(t),
|
|
423
|
+
(d = !0),
|
|
424
|
+
s && (t.__confetti_initialized = !0),
|
|
425
|
+
r && e.addEventListener('resize', b, !1),
|
|
426
|
+
s ? s.fire(n, g, v) : h(n, g, v)
|
|
427
|
+
)
|
|
428
|
+
}
|
|
429
|
+
return (
|
|
430
|
+
(m.reset = function () {
|
|
431
|
+
s && s.reset(), a && a.reset()
|
|
432
|
+
}),
|
|
433
|
+
m
|
|
434
|
+
)
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
function F() {
|
|
438
|
+
return b || (b = E(null, { useWorker: !0, resize: !0 })), b
|
|
439
|
+
}
|
|
440
|
+
;(n.exports = function () {
|
|
441
|
+
return F().apply(this, arguments)
|
|
442
|
+
}),
|
|
443
|
+
(n.exports.reset = function () {
|
|
444
|
+
F().reset()
|
|
445
|
+
}),
|
|
446
|
+
(n.exports.create = E)
|
|
447
|
+
})(
|
|
448
|
+
(function () {
|
|
449
|
+
return void 0 !== t ? t : typeof self != 'undefined' ? self : this || {}
|
|
450
|
+
})(),
|
|
451
|
+
e,
|
|
452
|
+
!1
|
|
453
|
+
),
|
|
454
|
+
(t.confetti = e.exports)
|
|
455
|
+
})(window, {})
|
|
456
|
+
// # sourceMappingURL=/sm/ab60d7fb9bf5b5ded42c77782b65b071de85f56c21da42948364d6b2b1961762.map
|