nemesischart 0.1.20 → 1.0.0
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/README.md +254 -35
- package/dist/nemesischart.js +3485 -0
- package/dist/nemesischart.umd.cjs +15 -0
- package/dist/style.css +1 -0
- package/package.json +78 -53
- package/dist/nemesischart.css +0 -1
- package/dist/nemesischart.es.js +0 -9136
- package/dist/nemesischart.umd.js +0 -3
- package/types/index.d.ts +0 -354
|
@@ -0,0 +1,3485 @@
|
|
|
1
|
+
import { useSlots as vn, computed as F, ref as W, onMounted as Rr, openBlock as M, createElementBlock as A, normalizeStyle as B, normalizeClass as et, createElementVNode as P, toDisplayString as q, renderSlot as $e, createCommentVNode as rt, withModifiers as yn, onBeforeUnmount as Se, nextTick as ve, watch as dt, createVNode as ye, mergeProps as ae, withCtx as Bt, unref as D, Transition as Or, Fragment as nt, renderList as bt, createBlock as tr, createTextVNode as bn } from "vue";
|
|
2
|
+
import { Chart as Wt, LineController as xn, LineElement as kn, PointElement as Tn, LinearScale as wn, CategoryScale as Cn, Tooltip as er, Legend as rr, Filler as Sn, PolarAreaController as Pn, RadialLinearScale as Rn, ArcElement as Mr, DoughnutController as pi } from "chart.js";
|
|
3
|
+
function Ft(o) {
|
|
4
|
+
if (o === void 0)
|
|
5
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6
|
+
return o;
|
|
7
|
+
}
|
|
8
|
+
function mi(o, t) {
|
|
9
|
+
o.prototype = Object.create(t.prototype), o.prototype.constructor = o, o.__proto__ = t;
|
|
10
|
+
}
|
|
11
|
+
/*!
|
|
12
|
+
* GSAP 3.14.2
|
|
13
|
+
* https://gsap.com
|
|
14
|
+
*
|
|
15
|
+
* @license Copyright 2008-2025, GreenSock. All rights reserved.
|
|
16
|
+
* Subject to the terms at https://gsap.com/standard-license
|
|
17
|
+
* @author: Jack Doyle, jack@greensock.com
|
|
18
|
+
*/
|
|
19
|
+
var wt = {
|
|
20
|
+
autoSleep: 120,
|
|
21
|
+
force3D: "auto",
|
|
22
|
+
nullTargetWarn: 1,
|
|
23
|
+
units: {
|
|
24
|
+
lineHeight: ""
|
|
25
|
+
}
|
|
26
|
+
}, be = {
|
|
27
|
+
duration: 0.5,
|
|
28
|
+
overwrite: !1,
|
|
29
|
+
delay: 0
|
|
30
|
+
}, Dr, at, j, Ot = 1e8, G = 1 / Ot, _r = Math.PI * 2, On = _r / 4, Mn = 0, gi = Math.sqrt, Dn = Math.cos, An = Math.sin, it = function(t) {
|
|
31
|
+
return typeof t == "string";
|
|
32
|
+
}, K = function(t) {
|
|
33
|
+
return typeof t == "function";
|
|
34
|
+
}, Vt = function(t) {
|
|
35
|
+
return typeof t == "number";
|
|
36
|
+
}, Ar = function(t) {
|
|
37
|
+
return typeof t > "u";
|
|
38
|
+
}, zt = function(t) {
|
|
39
|
+
return typeof t == "object";
|
|
40
|
+
}, ht = function(t) {
|
|
41
|
+
return t !== !1;
|
|
42
|
+
}, Er = function() {
|
|
43
|
+
return typeof window < "u";
|
|
44
|
+
}, Xe = function(t) {
|
|
45
|
+
return K(t) || it(t);
|
|
46
|
+
}, vi = typeof ArrayBuffer == "function" && ArrayBuffer.isView || function() {
|
|
47
|
+
}, ut = Array.isArray, En = /random\([^)]+\)/g, Bn = /,\s*/g, Zr = /(?:-?\.?\d|\.)+/gi, yi = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, he = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, sr = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, bi = /[+-]=-?[.\d]+/, zn = /[^,'"\[\]\s]+/gi, Fn = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, H, Dt, pr, Br, Ct = {}, Ge = {}, xi, ki = function(t) {
|
|
48
|
+
return (Ge = xe(t, Ct)) && gt;
|
|
49
|
+
}, zr = function(t, e) {
|
|
50
|
+
return console.warn("Invalid property", t, "set to", e, "Missing plugin? gsap.registerPlugin()");
|
|
51
|
+
}, Ee = function(t, e) {
|
|
52
|
+
return !e && console.warn(t);
|
|
53
|
+
}, Ti = function(t, e) {
|
|
54
|
+
return t && (Ct[t] = e) && Ge && (Ge[t] = e) || Ct;
|
|
55
|
+
}, Be = function() {
|
|
56
|
+
return 0;
|
|
57
|
+
}, qn = {
|
|
58
|
+
suppressEvents: !0,
|
|
59
|
+
isStart: !0,
|
|
60
|
+
kill: !1
|
|
61
|
+
}, Ue = {
|
|
62
|
+
suppressEvents: !0,
|
|
63
|
+
kill: !1
|
|
64
|
+
}, Vn = {
|
|
65
|
+
suppressEvents: !0
|
|
66
|
+
}, Fr = {}, Xt = [], mr = {}, wi, yt = {}, or = {}, Kr = 30, We = [], qr = "", Vr = function(t) {
|
|
67
|
+
var e = t[0], r, i;
|
|
68
|
+
if (zt(e) || K(e) || (t = [t]), !(r = (e._gsap || {}).harness)) {
|
|
69
|
+
for (i = We.length; i-- && !We[i].targetTest(e); )
|
|
70
|
+
;
|
|
71
|
+
r = We[i];
|
|
72
|
+
}
|
|
73
|
+
for (i = t.length; i--; )
|
|
74
|
+
t[i] && (t[i]._gsap || (t[i]._gsap = new ji(t[i], r))) || t.splice(i, 1);
|
|
75
|
+
return t;
|
|
76
|
+
}, ee = function(t) {
|
|
77
|
+
return t._gsap || Vr(Mt(t))[0]._gsap;
|
|
78
|
+
}, Ci = function(t, e, r) {
|
|
79
|
+
return (r = t[e]) && K(r) ? t[e]() : Ar(r) && t.getAttribute && t.getAttribute(e) || r;
|
|
80
|
+
}, _t = function(t, e) {
|
|
81
|
+
return (t = t.split(",")).forEach(e) || t;
|
|
82
|
+
}, J = function(t) {
|
|
83
|
+
return Math.round(t * 1e5) / 1e5 || 0;
|
|
84
|
+
}, Q = function(t) {
|
|
85
|
+
return Math.round(t * 1e7) / 1e7 || 0;
|
|
86
|
+
}, pe = function(t, e) {
|
|
87
|
+
var r = e.charAt(0), i = parseFloat(e.substr(2));
|
|
88
|
+
return t = parseFloat(t), r === "+" ? t + i : r === "-" ? t - i : r === "*" ? t * i : t / i;
|
|
89
|
+
}, Ln = function(t, e) {
|
|
90
|
+
for (var r = e.length, i = 0; t.indexOf(e[i]) < 0 && ++i < r; )
|
|
91
|
+
;
|
|
92
|
+
return i < r;
|
|
93
|
+
}, je = function() {
|
|
94
|
+
var t = Xt.length, e = Xt.slice(0), r, i;
|
|
95
|
+
for (mr = {}, Xt.length = 0, r = 0; r < t; r++)
|
|
96
|
+
i = e[r], i && i._lazy && (i.render(i._lazy[0], i._lazy[1], !0)._lazy = 0);
|
|
97
|
+
}, Lr = function(t) {
|
|
98
|
+
return !!(t._initted || t._startAt || t.add);
|
|
99
|
+
}, Si = function(t, e, r, i) {
|
|
100
|
+
Xt.length && !at && je(), t.render(e, r, !!(at && e < 0 && Lr(t))), Xt.length && !at && je();
|
|
101
|
+
}, Pi = function(t) {
|
|
102
|
+
var e = parseFloat(t);
|
|
103
|
+
return (e || e === 0) && (t + "").match(zn).length < 2 ? e : it(t) ? t.trim() : t;
|
|
104
|
+
}, Ri = function(t) {
|
|
105
|
+
return t;
|
|
106
|
+
}, St = function(t, e) {
|
|
107
|
+
for (var r in e)
|
|
108
|
+
r in t || (t[r] = e[r]);
|
|
109
|
+
return t;
|
|
110
|
+
}, In = function(t) {
|
|
111
|
+
return function(e, r) {
|
|
112
|
+
for (var i in r)
|
|
113
|
+
i in e || i === "duration" && t || i === "ease" || (e[i] = r[i]);
|
|
114
|
+
};
|
|
115
|
+
}, xe = function(t, e) {
|
|
116
|
+
for (var r in e)
|
|
117
|
+
t[r] = e[r];
|
|
118
|
+
return t;
|
|
119
|
+
}, Jr = function o(t, e) {
|
|
120
|
+
for (var r in e)
|
|
121
|
+
r !== "__proto__" && r !== "constructor" && r !== "prototype" && (t[r] = zt(e[r]) ? o(t[r] || (t[r] = {}), e[r]) : e[r]);
|
|
122
|
+
return t;
|
|
123
|
+
}, Qe = function(t, e) {
|
|
124
|
+
var r = {}, i;
|
|
125
|
+
for (i in t)
|
|
126
|
+
i in e || (r[i] = t[i]);
|
|
127
|
+
return r;
|
|
128
|
+
}, Me = function(t) {
|
|
129
|
+
var e = t.parent || H, r = t.keyframes ? In(ut(t.keyframes)) : St;
|
|
130
|
+
if (ht(t.inherit))
|
|
131
|
+
for (; e; )
|
|
132
|
+
r(t, e.vars.defaults), e = e.parent || e._dp;
|
|
133
|
+
return t;
|
|
134
|
+
}, Nn = function(t, e) {
|
|
135
|
+
for (var r = t.length, i = r === e.length; i && r-- && t[r] === e[r]; )
|
|
136
|
+
;
|
|
137
|
+
return r < 0;
|
|
138
|
+
}, Oi = function(t, e, r, i, n) {
|
|
139
|
+
var a = t[i], s;
|
|
140
|
+
if (n)
|
|
141
|
+
for (s = e[n]; a && a[n] > s; )
|
|
142
|
+
a = a._prev;
|
|
143
|
+
return a ? (e._next = a._next, a._next = e) : (e._next = t[r], t[r] = e), e._next ? e._next._prev = e : t[i] = e, e._prev = a, e.parent = e._dp = t, e;
|
|
144
|
+
}, ir = function(t, e, r, i) {
|
|
145
|
+
r === void 0 && (r = "_first"), i === void 0 && (i = "_last");
|
|
146
|
+
var n = e._prev, a = e._next;
|
|
147
|
+
n ? n._next = a : t[r] === e && (t[r] = a), a ? a._prev = n : t[i] === e && (t[i] = n), e._next = e._prev = e.parent = null;
|
|
148
|
+
}, Yt = function(t, e) {
|
|
149
|
+
t.parent && (!e || t.parent.autoRemoveChildren) && t.parent.remove && t.parent.remove(t), t._act = 0;
|
|
150
|
+
}, re = function(t, e) {
|
|
151
|
+
if (t && (!e || e._end > t._dur || e._start < 0))
|
|
152
|
+
for (var r = t; r; )
|
|
153
|
+
r._dirty = 1, r = r.parent;
|
|
154
|
+
return t;
|
|
155
|
+
}, $n = function(t) {
|
|
156
|
+
for (var e = t.parent; e && e.parent; )
|
|
157
|
+
e._dirty = 1, e.totalDuration(), e = e.parent;
|
|
158
|
+
return t;
|
|
159
|
+
}, gr = function(t, e, r, i) {
|
|
160
|
+
return t._startAt && (at ? t._startAt.revert(Ue) : t.vars.immediateRender && !t.vars.autoRevert || t._startAt.render(e, !0, i));
|
|
161
|
+
}, Xn = function o(t) {
|
|
162
|
+
return !t || t._ts && o(t.parent);
|
|
163
|
+
}, ti = function(t) {
|
|
164
|
+
return t._repeat ? ke(t._tTime, t = t.duration() + t._rDelay) * t : 0;
|
|
165
|
+
}, ke = function(t, e) {
|
|
166
|
+
var r = Math.floor(t = Q(t / e));
|
|
167
|
+
return t && r === t ? r - 1 : r;
|
|
168
|
+
}, He = function(t, e) {
|
|
169
|
+
return (t - e._start) * e._ts + (e._ts >= 0 ? 0 : e._dirty ? e.totalDuration() : e._tDur);
|
|
170
|
+
}, nr = function(t) {
|
|
171
|
+
return t._end = Q(t._start + (t._tDur / Math.abs(t._ts || t._rts || G) || 0));
|
|
172
|
+
}, ar = function(t, e) {
|
|
173
|
+
var r = t._dp;
|
|
174
|
+
return r && r.smoothChildTiming && t._ts && (t._start = Q(r._time - (t._ts > 0 ? e / t._ts : ((t._dirty ? t.totalDuration() : t._tDur) - e) / -t._ts)), nr(t), r._dirty || re(r, t)), t;
|
|
175
|
+
}, Mi = function(t, e) {
|
|
176
|
+
var r;
|
|
177
|
+
if ((e._time || !e._dur && e._initted || e._start < t._time && (e._dur || !e.add)) && (r = He(t.rawTime(), e), (!e._dur || Ie(0, e.totalDuration(), r) - e._tTime > G) && e.render(r, !0)), re(t, e)._dp && t._initted && t._time >= t._dur && t._ts) {
|
|
178
|
+
if (t._dur < t.duration())
|
|
179
|
+
for (r = t; r._dp; )
|
|
180
|
+
r.rawTime() >= 0 && r.totalTime(r._tTime), r = r._dp;
|
|
181
|
+
t._zTime = -G;
|
|
182
|
+
}
|
|
183
|
+
}, At = function(t, e, r, i) {
|
|
184
|
+
return e.parent && Yt(e), e._start = Q((Vt(r) ? r : r || t !== H ? Rt(t, r, e) : t._time) + e._delay), e._end = Q(e._start + (e.totalDuration() / Math.abs(e.timeScale()) || 0)), Oi(t, e, "_first", "_last", t._sort ? "_start" : 0), vr(e) || (t._recent = e), i || Mi(t, e), t._ts < 0 && ar(t, t._tTime), t;
|
|
185
|
+
}, Di = function(t, e) {
|
|
186
|
+
return (Ct.ScrollTrigger || zr("scrollTrigger", e)) && Ct.ScrollTrigger.create(e, t);
|
|
187
|
+
}, Ai = function(t, e, r, i, n) {
|
|
188
|
+
if (Nr(t, e, n), !t._initted)
|
|
189
|
+
return 1;
|
|
190
|
+
if (!r && t._pt && !at && (t._dur && t.vars.lazy !== !1 || !t._dur && t.vars.lazy) && wi !== xt.frame)
|
|
191
|
+
return Xt.push(t), t._lazy = [n, i], 1;
|
|
192
|
+
}, Un = function o(t) {
|
|
193
|
+
var e = t.parent;
|
|
194
|
+
return e && e._ts && e._initted && !e._lock && (e.rawTime() < 0 || o(e));
|
|
195
|
+
}, vr = function(t) {
|
|
196
|
+
var e = t.data;
|
|
197
|
+
return e === "isFromStart" || e === "isStart";
|
|
198
|
+
}, Wn = function(t, e, r, i) {
|
|
199
|
+
var n = t.ratio, a = e < 0 || !e && (!t._start && Un(t) && !(!t._initted && vr(t)) || (t._ts < 0 || t._dp._ts < 0) && !vr(t)) ? 0 : 1, s = t._rDelay, u = 0, c, l, d;
|
|
200
|
+
if (s && t._repeat && (u = Ie(0, t._tDur, e), l = ke(u, s), t._yoyo && l & 1 && (a = 1 - a), l !== ke(t._tTime, s) && (n = 1 - a, t.vars.repeatRefresh && t._initted && t.invalidate())), a !== n || at || i || t._zTime === G || !e && t._zTime) {
|
|
201
|
+
if (!t._initted && Ai(t, e, i, r, u))
|
|
202
|
+
return;
|
|
203
|
+
for (d = t._zTime, t._zTime = e || (r ? G : 0), r || (r = e && !d), t.ratio = a, t._from && (a = 1 - a), t._time = 0, t._tTime = u, c = t._pt; c; )
|
|
204
|
+
c.r(a, c.d), c = c._next;
|
|
205
|
+
e < 0 && gr(t, e, r, !0), t._onUpdate && !r && kt(t, "onUpdate"), u && t._repeat && !r && t.parent && kt(t, "onRepeat"), (e >= t._tDur || e < 0) && t.ratio === a && (a && Yt(t, 1), !r && !at && (kt(t, a ? "onComplete" : "onReverseComplete", !0), t._prom && t._prom()));
|
|
206
|
+
} else t._zTime || (t._zTime = e);
|
|
207
|
+
}, Yn = function(t, e, r) {
|
|
208
|
+
var i;
|
|
209
|
+
if (r > e)
|
|
210
|
+
for (i = t._first; i && i._start <= r; ) {
|
|
211
|
+
if (i.data === "isPause" && i._start > e)
|
|
212
|
+
return i;
|
|
213
|
+
i = i._next;
|
|
214
|
+
}
|
|
215
|
+
else
|
|
216
|
+
for (i = t._last; i && i._start >= r; ) {
|
|
217
|
+
if (i.data === "isPause" && i._start < e)
|
|
218
|
+
return i;
|
|
219
|
+
i = i._prev;
|
|
220
|
+
}
|
|
221
|
+
}, Te = function(t, e, r, i) {
|
|
222
|
+
var n = t._repeat, a = Q(e) || 0, s = t._tTime / t._tDur;
|
|
223
|
+
return s && !i && (t._time *= a / t._dur), t._dur = a, t._tDur = n ? n < 0 ? 1e10 : Q(a * (n + 1) + t._rDelay * n) : a, s > 0 && !i && ar(t, t._tTime = t._tDur * s), t.parent && nr(t), r || re(t.parent, t), t;
|
|
224
|
+
}, ei = function(t) {
|
|
225
|
+
return t instanceof ft ? re(t) : Te(t, t._dur);
|
|
226
|
+
}, Gn = {
|
|
227
|
+
_start: 0,
|
|
228
|
+
endTime: Be,
|
|
229
|
+
totalDuration: Be
|
|
230
|
+
}, Rt = function o(t, e, r) {
|
|
231
|
+
var i = t.labels, n = t._recent || Gn, a = t.duration() >= Ot ? n.endTime(!1) : t._dur, s, u, c;
|
|
232
|
+
return it(e) && (isNaN(e) || e in i) ? (u = e.charAt(0), c = e.substr(-1) === "%", s = e.indexOf("="), u === "<" || u === ">" ? (s >= 0 && (e = e.replace(/=/, "")), (u === "<" ? n._start : n.endTime(n._repeat >= 0)) + (parseFloat(e.substr(1)) || 0) * (c ? (s < 0 ? n : r).totalDuration() / 100 : 1)) : s < 0 ? (e in i || (i[e] = a), i[e]) : (u = parseFloat(e.charAt(s - 1) + e.substr(s + 1)), c && r && (u = u / 100 * (ut(r) ? r[0] : r).totalDuration()), s > 1 ? o(t, e.substr(0, s - 1), r) + u : a + u)) : e == null ? a : +e;
|
|
233
|
+
}, De = function(t, e, r) {
|
|
234
|
+
var i = Vt(e[1]), n = (i ? 2 : 1) + (t < 2 ? 0 : 1), a = e[n], s, u;
|
|
235
|
+
if (i && (a.duration = e[1]), a.parent = r, t) {
|
|
236
|
+
for (s = a, u = r; u && !("immediateRender" in s); )
|
|
237
|
+
s = u.vars.defaults || {}, u = ht(u.vars.inherit) && u.parent;
|
|
238
|
+
a.immediateRender = ht(s.immediateRender), t < 2 ? a.runBackwards = 1 : a.startAt = e[n - 1];
|
|
239
|
+
}
|
|
240
|
+
return new tt(e[0], a, e[n + 1]);
|
|
241
|
+
}, Qt = function(t, e) {
|
|
242
|
+
return t || t === 0 ? e(t) : e;
|
|
243
|
+
}, Ie = function(t, e, r) {
|
|
244
|
+
return r < t ? t : r > e ? e : r;
|
|
245
|
+
}, lt = function(t, e) {
|
|
246
|
+
return !it(t) || !(e = Fn.exec(t)) ? "" : e[1];
|
|
247
|
+
}, jn = function(t, e, r) {
|
|
248
|
+
return Qt(r, function(i) {
|
|
249
|
+
return Ie(t, e, i);
|
|
250
|
+
});
|
|
251
|
+
}, yr = [].slice, Ei = function(t, e) {
|
|
252
|
+
return t && zt(t) && "length" in t && (!e && !t.length || t.length - 1 in t && zt(t[0])) && !t.nodeType && t !== Dt;
|
|
253
|
+
}, Qn = function(t, e, r) {
|
|
254
|
+
return r === void 0 && (r = []), t.forEach(function(i) {
|
|
255
|
+
var n;
|
|
256
|
+
return it(i) && !e || Ei(i, 1) ? (n = r).push.apply(n, Mt(i)) : r.push(i);
|
|
257
|
+
}) || r;
|
|
258
|
+
}, Mt = function(t, e, r) {
|
|
259
|
+
return j && !e && j.selector ? j.selector(t) : it(t) && !r && (pr || !we()) ? yr.call((e || Br).querySelectorAll(t), 0) : ut(t) ? Qn(t, r) : Ei(t) ? yr.call(t, 0) : t ? [t] : [];
|
|
260
|
+
}, br = function(t) {
|
|
261
|
+
return t = Mt(t)[0] || Ee("Invalid scope") || {}, function(e) {
|
|
262
|
+
var r = t.current || t.nativeElement || t;
|
|
263
|
+
return Mt(e, r.querySelectorAll ? r : r === t ? Ee("Invalid scope") || Br.createElement("div") : t);
|
|
264
|
+
};
|
|
265
|
+
}, Bi = function(t) {
|
|
266
|
+
return t.sort(function() {
|
|
267
|
+
return 0.5 - Math.random();
|
|
268
|
+
});
|
|
269
|
+
}, zi = function(t) {
|
|
270
|
+
if (K(t))
|
|
271
|
+
return t;
|
|
272
|
+
var e = zt(t) ? t : {
|
|
273
|
+
each: t
|
|
274
|
+
}, r = ie(e.ease), i = e.from || 0, n = parseFloat(e.base) || 0, a = {}, s = i > 0 && i < 1, u = isNaN(i) || s, c = e.axis, l = i, d = i;
|
|
275
|
+
return it(i) ? l = d = {
|
|
276
|
+
center: 0.5,
|
|
277
|
+
edges: 0.5,
|
|
278
|
+
end: 1
|
|
279
|
+
}[i] || 0 : !s && u && (l = i[0], d = i[1]), function(_, h, m) {
|
|
280
|
+
var f = (m || e).length, p = a[f], g, b, y, x, v, T, C, S, k;
|
|
281
|
+
if (!p) {
|
|
282
|
+
if (k = e.grid === "auto" ? 0 : (e.grid || [1, Ot])[1], !k) {
|
|
283
|
+
for (C = -Ot; C < (C = m[k++].getBoundingClientRect().left) && k < f; )
|
|
284
|
+
;
|
|
285
|
+
k < f && k--;
|
|
286
|
+
}
|
|
287
|
+
for (p = a[f] = [], g = u ? Math.min(k, f) * l - 0.5 : i % k, b = k === Ot ? 0 : u ? f * d / k - 0.5 : i / k | 0, C = 0, S = Ot, T = 0; T < f; T++)
|
|
288
|
+
y = T % k - g, x = b - (T / k | 0), p[T] = v = c ? Math.abs(c === "y" ? x : y) : gi(y * y + x * x), v > C && (C = v), v < S && (S = v);
|
|
289
|
+
i === "random" && Bi(p), p.max = C - S, p.min = S, p.v = f = (parseFloat(e.amount) || parseFloat(e.each) * (k > f ? f - 1 : c ? c === "y" ? f / k : k : Math.max(k, f / k)) || 0) * (i === "edges" ? -1 : 1), p.b = f < 0 ? n - f : n, p.u = lt(e.amount || e.each) || 0, r = r && f < 0 ? Wi(r) : r;
|
|
290
|
+
}
|
|
291
|
+
return f = (p[_] - p.min) / p.max || 0, Q(p.b + (r ? r(f) : f) * p.v) + p.u;
|
|
292
|
+
};
|
|
293
|
+
}, xr = function(t) {
|
|
294
|
+
var e = Math.pow(10, ((t + "").split(".")[1] || "").length);
|
|
295
|
+
return function(r) {
|
|
296
|
+
var i = Q(Math.round(parseFloat(r) / t) * t * e);
|
|
297
|
+
return (i - i % 1) / e + (Vt(r) ? 0 : lt(r));
|
|
298
|
+
};
|
|
299
|
+
}, Fi = function(t, e) {
|
|
300
|
+
var r = ut(t), i, n;
|
|
301
|
+
return !r && zt(t) && (i = r = t.radius || Ot, t.values ? (t = Mt(t.values), (n = !Vt(t[0])) && (i *= i)) : t = xr(t.increment)), Qt(e, r ? K(t) ? function(a) {
|
|
302
|
+
return n = t(a), Math.abs(n - a) <= i ? n : a;
|
|
303
|
+
} : function(a) {
|
|
304
|
+
for (var s = parseFloat(n ? a.x : a), u = parseFloat(n ? a.y : 0), c = Ot, l = 0, d = t.length, _, h; d--; )
|
|
305
|
+
n ? (_ = t[d].x - s, h = t[d].y - u, _ = _ * _ + h * h) : _ = Math.abs(t[d] - s), _ < c && (c = _, l = d);
|
|
306
|
+
return l = !i || c <= i ? t[l] : a, n || l === a || Vt(a) ? l : l + lt(a);
|
|
307
|
+
} : xr(t));
|
|
308
|
+
}, qi = function(t, e, r, i) {
|
|
309
|
+
return Qt(ut(t) ? !e : r === !0 ? !!(r = 0) : !i, function() {
|
|
310
|
+
return ut(t) ? t[~~(Math.random() * t.length)] : (r = r || 1e-5) && (i = r < 1 ? Math.pow(10, (r + "").length - 2) : 1) && Math.floor(Math.round((t - r / 2 + Math.random() * (e - t + r * 0.99)) / r) * r * i) / i;
|
|
311
|
+
});
|
|
312
|
+
}, Hn = function() {
|
|
313
|
+
for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++)
|
|
314
|
+
e[r] = arguments[r];
|
|
315
|
+
return function(i) {
|
|
316
|
+
return e.reduce(function(n, a) {
|
|
317
|
+
return a(n);
|
|
318
|
+
}, i);
|
|
319
|
+
};
|
|
320
|
+
}, Zn = function(t, e) {
|
|
321
|
+
return function(r) {
|
|
322
|
+
return t(parseFloat(r)) + (e || lt(r));
|
|
323
|
+
};
|
|
324
|
+
}, Kn = function(t, e, r) {
|
|
325
|
+
return Li(t, e, 0, 1, r);
|
|
326
|
+
}, Vi = function(t, e, r) {
|
|
327
|
+
return Qt(r, function(i) {
|
|
328
|
+
return t[~~e(i)];
|
|
329
|
+
});
|
|
330
|
+
}, Jn = function o(t, e, r) {
|
|
331
|
+
var i = e - t;
|
|
332
|
+
return ut(t) ? Vi(t, o(0, t.length), e) : Qt(r, function(n) {
|
|
333
|
+
return (i + (n - t) % i) % i + t;
|
|
334
|
+
});
|
|
335
|
+
}, ta = function o(t, e, r) {
|
|
336
|
+
var i = e - t, n = i * 2;
|
|
337
|
+
return ut(t) ? Vi(t, o(0, t.length - 1), e) : Qt(r, function(a) {
|
|
338
|
+
return a = (n + (a - t) % n) % n || 0, t + (a > i ? n - a : a);
|
|
339
|
+
});
|
|
340
|
+
}, ze = function(t) {
|
|
341
|
+
return t.replace(En, function(e) {
|
|
342
|
+
var r = e.indexOf("[") + 1, i = e.substring(r || 7, r ? e.indexOf("]") : e.length - 1).split(Bn);
|
|
343
|
+
return qi(r ? i : +i[0], r ? 0 : +i[1], +i[2] || 1e-5);
|
|
344
|
+
});
|
|
345
|
+
}, Li = function(t, e, r, i, n) {
|
|
346
|
+
var a = e - t, s = i - r;
|
|
347
|
+
return Qt(n, function(u) {
|
|
348
|
+
return r + ((u - t) / a * s || 0);
|
|
349
|
+
});
|
|
350
|
+
}, ea = function o(t, e, r, i) {
|
|
351
|
+
var n = isNaN(t + e) ? 0 : function(h) {
|
|
352
|
+
return (1 - h) * t + h * e;
|
|
353
|
+
};
|
|
354
|
+
if (!n) {
|
|
355
|
+
var a = it(t), s = {}, u, c, l, d, _;
|
|
356
|
+
if (r === !0 && (i = 1) && (r = null), a)
|
|
357
|
+
t = {
|
|
358
|
+
p: t
|
|
359
|
+
}, e = {
|
|
360
|
+
p: e
|
|
361
|
+
};
|
|
362
|
+
else if (ut(t) && !ut(e)) {
|
|
363
|
+
for (l = [], d = t.length, _ = d - 2, c = 1; c < d; c++)
|
|
364
|
+
l.push(o(t[c - 1], t[c]));
|
|
365
|
+
d--, n = function(m) {
|
|
366
|
+
m *= d;
|
|
367
|
+
var f = Math.min(_, ~~m);
|
|
368
|
+
return l[f](m - f);
|
|
369
|
+
}, r = e;
|
|
370
|
+
} else i || (t = xe(ut(t) ? [] : {}, t));
|
|
371
|
+
if (!l) {
|
|
372
|
+
for (u in e)
|
|
373
|
+
Ir.call(s, t, u, "get", e[u]);
|
|
374
|
+
n = function(m) {
|
|
375
|
+
return Ur(m, s) || (a ? t.p : t);
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
return Qt(r, n);
|
|
380
|
+
}, ri = function(t, e, r) {
|
|
381
|
+
var i = t.labels, n = Ot, a, s, u;
|
|
382
|
+
for (a in i)
|
|
383
|
+
s = i[a] - e, s < 0 == !!r && s && n > (s = Math.abs(s)) && (u = a, n = s);
|
|
384
|
+
return u;
|
|
385
|
+
}, kt = function(t, e, r) {
|
|
386
|
+
var i = t.vars, n = i[e], a = j, s = t._ctx, u, c, l;
|
|
387
|
+
if (n)
|
|
388
|
+
return u = i[e + "Params"], c = i.callbackScope || t, r && Xt.length && je(), s && (j = s), l = u ? n.apply(c, u) : n.call(c), j = a, l;
|
|
389
|
+
}, Re = function(t) {
|
|
390
|
+
return Yt(t), t.scrollTrigger && t.scrollTrigger.kill(!!at), t.progress() < 1 && kt(t, "onInterrupt"), t;
|
|
391
|
+
}, _e, Ii = [], Ni = function(t) {
|
|
392
|
+
if (t)
|
|
393
|
+
if (t = !t.name && t.default || t, Er() || t.headless) {
|
|
394
|
+
var e = t.name, r = K(t), i = e && !r && t.init ? function() {
|
|
395
|
+
this._props = [];
|
|
396
|
+
} : t, n = {
|
|
397
|
+
init: Be,
|
|
398
|
+
render: Ur,
|
|
399
|
+
add: Ir,
|
|
400
|
+
kill: ga,
|
|
401
|
+
modifier: ma,
|
|
402
|
+
rawVars: 0
|
|
403
|
+
}, a = {
|
|
404
|
+
targetTest: 0,
|
|
405
|
+
get: 0,
|
|
406
|
+
getSetter: Xr,
|
|
407
|
+
aliases: {},
|
|
408
|
+
register: 0
|
|
409
|
+
};
|
|
410
|
+
if (we(), t !== i) {
|
|
411
|
+
if (yt[e])
|
|
412
|
+
return;
|
|
413
|
+
St(i, St(Qe(t, n), a)), xe(i.prototype, xe(n, Qe(t, a))), yt[i.prop = e] = i, t.targetTest && (We.push(i), Fr[e] = 1), e = (e === "css" ? "CSS" : e.charAt(0).toUpperCase() + e.substr(1)) + "Plugin";
|
|
414
|
+
}
|
|
415
|
+
Ti(e, i), t.register && t.register(gt, i, pt);
|
|
416
|
+
} else
|
|
417
|
+
Ii.push(t);
|
|
418
|
+
}, Y = 255, Oe = {
|
|
419
|
+
aqua: [0, Y, Y],
|
|
420
|
+
lime: [0, Y, 0],
|
|
421
|
+
silver: [192, 192, 192],
|
|
422
|
+
black: [0, 0, 0],
|
|
423
|
+
maroon: [128, 0, 0],
|
|
424
|
+
teal: [0, 128, 128],
|
|
425
|
+
blue: [0, 0, Y],
|
|
426
|
+
navy: [0, 0, 128],
|
|
427
|
+
white: [Y, Y, Y],
|
|
428
|
+
olive: [128, 128, 0],
|
|
429
|
+
yellow: [Y, Y, 0],
|
|
430
|
+
orange: [Y, 165, 0],
|
|
431
|
+
gray: [128, 128, 128],
|
|
432
|
+
purple: [128, 0, 128],
|
|
433
|
+
green: [0, 128, 0],
|
|
434
|
+
red: [Y, 0, 0],
|
|
435
|
+
pink: [Y, 192, 203],
|
|
436
|
+
cyan: [0, Y, Y],
|
|
437
|
+
transparent: [Y, Y, Y, 0]
|
|
438
|
+
}, lr = function(t, e, r) {
|
|
439
|
+
return t += t < 0 ? 1 : t > 1 ? -1 : 0, (t * 6 < 1 ? e + (r - e) * t * 6 : t < 0.5 ? r : t * 3 < 2 ? e + (r - e) * (2 / 3 - t) * 6 : e) * Y + 0.5 | 0;
|
|
440
|
+
}, $i = function(t, e, r) {
|
|
441
|
+
var i = t ? Vt(t) ? [t >> 16, t >> 8 & Y, t & Y] : 0 : Oe.black, n, a, s, u, c, l, d, _, h, m;
|
|
442
|
+
if (!i) {
|
|
443
|
+
if (t.substr(-1) === "," && (t = t.substr(0, t.length - 1)), Oe[t])
|
|
444
|
+
i = Oe[t];
|
|
445
|
+
else if (t.charAt(0) === "#") {
|
|
446
|
+
if (t.length < 6 && (n = t.charAt(1), a = t.charAt(2), s = t.charAt(3), t = "#" + n + n + a + a + s + s + (t.length === 5 ? t.charAt(4) + t.charAt(4) : "")), t.length === 9)
|
|
447
|
+
return i = parseInt(t.substr(1, 6), 16), [i >> 16, i >> 8 & Y, i & Y, parseInt(t.substr(7), 16) / 255];
|
|
448
|
+
t = parseInt(t.substr(1), 16), i = [t >> 16, t >> 8 & Y, t & Y];
|
|
449
|
+
} else if (t.substr(0, 3) === "hsl") {
|
|
450
|
+
if (i = m = t.match(Zr), !e)
|
|
451
|
+
u = +i[0] % 360 / 360, c = +i[1] / 100, l = +i[2] / 100, a = l <= 0.5 ? l * (c + 1) : l + c - l * c, n = l * 2 - a, i.length > 3 && (i[3] *= 1), i[0] = lr(u + 1 / 3, n, a), i[1] = lr(u, n, a), i[2] = lr(u - 1 / 3, n, a);
|
|
452
|
+
else if (~t.indexOf("="))
|
|
453
|
+
return i = t.match(yi), r && i.length < 4 && (i[3] = 1), i;
|
|
454
|
+
} else
|
|
455
|
+
i = t.match(Zr) || Oe.transparent;
|
|
456
|
+
i = i.map(Number);
|
|
457
|
+
}
|
|
458
|
+
return e && !m && (n = i[0] / Y, a = i[1] / Y, s = i[2] / Y, d = Math.max(n, a, s), _ = Math.min(n, a, s), l = (d + _) / 2, d === _ ? u = c = 0 : (h = d - _, c = l > 0.5 ? h / (2 - d - _) : h / (d + _), u = d === n ? (a - s) / h + (a < s ? 6 : 0) : d === a ? (s - n) / h + 2 : (n - a) / h + 4, u *= 60), i[0] = ~~(u + 0.5), i[1] = ~~(c * 100 + 0.5), i[2] = ~~(l * 100 + 0.5)), r && i.length < 4 && (i[3] = 1), i;
|
|
459
|
+
}, Xi = function(t) {
|
|
460
|
+
var e = [], r = [], i = -1;
|
|
461
|
+
return t.split(Ut).forEach(function(n) {
|
|
462
|
+
var a = n.match(he) || [];
|
|
463
|
+
e.push.apply(e, a), r.push(i += a.length + 1);
|
|
464
|
+
}), e.c = r, e;
|
|
465
|
+
}, ii = function(t, e, r) {
|
|
466
|
+
var i = "", n = (t + i).match(Ut), a = e ? "hsla(" : "rgba(", s = 0, u, c, l, d;
|
|
467
|
+
if (!n)
|
|
468
|
+
return t;
|
|
469
|
+
if (n = n.map(function(_) {
|
|
470
|
+
return (_ = $i(_, e, 1)) && a + (e ? _[0] + "," + _[1] + "%," + _[2] + "%," + _[3] : _.join(",")) + ")";
|
|
471
|
+
}), r && (l = Xi(t), u = r.c, u.join(i) !== l.c.join(i)))
|
|
472
|
+
for (c = t.replace(Ut, "1").split(he), d = c.length - 1; s < d; s++)
|
|
473
|
+
i += c[s] + (~u.indexOf(s) ? n.shift() || a + "0,0,0,0)" : (l.length ? l : n.length ? n : r).shift());
|
|
474
|
+
if (!c)
|
|
475
|
+
for (c = t.split(Ut), d = c.length - 1; s < d; s++)
|
|
476
|
+
i += c[s] + n[s];
|
|
477
|
+
return i + c[d];
|
|
478
|
+
}, Ut = function() {
|
|
479
|
+
var o = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b", t;
|
|
480
|
+
for (t in Oe)
|
|
481
|
+
o += "|" + t + "\\b";
|
|
482
|
+
return new RegExp(o + ")", "gi");
|
|
483
|
+
}(), ra = /hsl[a]?\(/, Ui = function(t) {
|
|
484
|
+
var e = t.join(" "), r;
|
|
485
|
+
if (Ut.lastIndex = 0, Ut.test(e))
|
|
486
|
+
return r = ra.test(e), t[1] = ii(t[1], r), t[0] = ii(t[0], r, Xi(t[1])), !0;
|
|
487
|
+
}, Fe, xt = function() {
|
|
488
|
+
var o = Date.now, t = 500, e = 33, r = o(), i = r, n = 1e3 / 240, a = n, s = [], u, c, l, d, _, h, m = function f(p) {
|
|
489
|
+
var g = o() - i, b = p === !0, y, x, v, T;
|
|
490
|
+
if ((g > t || g < 0) && (r += g - e), i += g, v = i - r, y = v - a, (y > 0 || b) && (T = ++d.frame, _ = v - d.time * 1e3, d.time = v = v / 1e3, a += y + (y >= n ? 4 : n - y), x = 1), b || (u = c(f)), x)
|
|
491
|
+
for (h = 0; h < s.length; h++)
|
|
492
|
+
s[h](v, _, T, p);
|
|
493
|
+
};
|
|
494
|
+
return d = {
|
|
495
|
+
time: 0,
|
|
496
|
+
frame: 0,
|
|
497
|
+
tick: function() {
|
|
498
|
+
m(!0);
|
|
499
|
+
},
|
|
500
|
+
deltaRatio: function(p) {
|
|
501
|
+
return _ / (1e3 / (p || 60));
|
|
502
|
+
},
|
|
503
|
+
wake: function() {
|
|
504
|
+
xi && (!pr && Er() && (Dt = pr = window, Br = Dt.document || {}, Ct.gsap = gt, (Dt.gsapVersions || (Dt.gsapVersions = [])).push(gt.version), ki(Ge || Dt.GreenSockGlobals || !Dt.gsap && Dt || {}), Ii.forEach(Ni)), l = typeof requestAnimationFrame < "u" && requestAnimationFrame, u && d.sleep(), c = l || function(p) {
|
|
505
|
+
return setTimeout(p, a - d.time * 1e3 + 1 | 0);
|
|
506
|
+
}, Fe = 1, m(2));
|
|
507
|
+
},
|
|
508
|
+
sleep: function() {
|
|
509
|
+
(l ? cancelAnimationFrame : clearTimeout)(u), Fe = 0, c = Be;
|
|
510
|
+
},
|
|
511
|
+
lagSmoothing: function(p, g) {
|
|
512
|
+
t = p || 1 / 0, e = Math.min(g || 33, t);
|
|
513
|
+
},
|
|
514
|
+
fps: function(p) {
|
|
515
|
+
n = 1e3 / (p || 240), a = d.time * 1e3 + n;
|
|
516
|
+
},
|
|
517
|
+
add: function(p, g, b) {
|
|
518
|
+
var y = g ? function(x, v, T, C) {
|
|
519
|
+
p(x, v, T, C), d.remove(y);
|
|
520
|
+
} : p;
|
|
521
|
+
return d.remove(p), s[b ? "unshift" : "push"](y), we(), y;
|
|
522
|
+
},
|
|
523
|
+
remove: function(p, g) {
|
|
524
|
+
~(g = s.indexOf(p)) && s.splice(g, 1) && h >= g && h--;
|
|
525
|
+
},
|
|
526
|
+
_listeners: s
|
|
527
|
+
}, d;
|
|
528
|
+
}(), we = function() {
|
|
529
|
+
return !Fe && xt.wake();
|
|
530
|
+
}, X = {}, ia = /^[\d.\-M][\d.\-,\s]/, na = /["']/g, aa = function(t) {
|
|
531
|
+
for (var e = {}, r = t.substr(1, t.length - 3).split(":"), i = r[0], n = 1, a = r.length, s, u, c; n < a; n++)
|
|
532
|
+
u = r[n], s = n !== a - 1 ? u.lastIndexOf(",") : u.length, c = u.substr(0, s), e[i] = isNaN(c) ? c.replace(na, "").trim() : +c, i = u.substr(s + 1).trim();
|
|
533
|
+
return e;
|
|
534
|
+
}, sa = function(t) {
|
|
535
|
+
var e = t.indexOf("(") + 1, r = t.indexOf(")"), i = t.indexOf("(", e);
|
|
536
|
+
return t.substring(e, ~i && i < r ? t.indexOf(")", r + 1) : r);
|
|
537
|
+
}, oa = function(t) {
|
|
538
|
+
var e = (t + "").split("("), r = X[e[0]];
|
|
539
|
+
return r && e.length > 1 && r.config ? r.config.apply(null, ~t.indexOf("{") ? [aa(e[1])] : sa(t).split(",").map(Pi)) : X._CE && ia.test(t) ? X._CE("", t) : r;
|
|
540
|
+
}, Wi = function(t) {
|
|
541
|
+
return function(e) {
|
|
542
|
+
return 1 - t(1 - e);
|
|
543
|
+
};
|
|
544
|
+
}, Yi = function o(t, e) {
|
|
545
|
+
for (var r = t._first, i; r; )
|
|
546
|
+
r instanceof ft ? o(r, e) : r.vars.yoyoEase && (!r._yoyo || !r._repeat) && r._yoyo !== e && (r.timeline ? o(r.timeline, e) : (i = r._ease, r._ease = r._yEase, r._yEase = i, r._yoyo = e)), r = r._next;
|
|
547
|
+
}, ie = function(t, e) {
|
|
548
|
+
return t && (K(t) ? t : X[t] || oa(t)) || e;
|
|
549
|
+
}, se = function(t, e, r, i) {
|
|
550
|
+
r === void 0 && (r = function(u) {
|
|
551
|
+
return 1 - e(1 - u);
|
|
552
|
+
}), i === void 0 && (i = function(u) {
|
|
553
|
+
return u < 0.5 ? e(u * 2) / 2 : 1 - e((1 - u) * 2) / 2;
|
|
554
|
+
});
|
|
555
|
+
var n = {
|
|
556
|
+
easeIn: e,
|
|
557
|
+
easeOut: r,
|
|
558
|
+
easeInOut: i
|
|
559
|
+
}, a;
|
|
560
|
+
return _t(t, function(s) {
|
|
561
|
+
X[s] = Ct[s] = n, X[a = s.toLowerCase()] = r;
|
|
562
|
+
for (var u in n)
|
|
563
|
+
X[a + (u === "easeIn" ? ".in" : u === "easeOut" ? ".out" : ".inOut")] = X[s + "." + u] = n[u];
|
|
564
|
+
}), n;
|
|
565
|
+
}, Gi = function(t) {
|
|
566
|
+
return function(e) {
|
|
567
|
+
return e < 0.5 ? (1 - t(1 - e * 2)) / 2 : 0.5 + t((e - 0.5) * 2) / 2;
|
|
568
|
+
};
|
|
569
|
+
}, ur = function o(t, e, r) {
|
|
570
|
+
var i = e >= 1 ? e : 1, n = (r || (t ? 0.3 : 0.45)) / (e < 1 ? e : 1), a = n / _r * (Math.asin(1 / i) || 0), s = function(l) {
|
|
571
|
+
return l === 1 ? 1 : i * Math.pow(2, -10 * l) * An((l - a) * n) + 1;
|
|
572
|
+
}, u = t === "out" ? s : t === "in" ? function(c) {
|
|
573
|
+
return 1 - s(1 - c);
|
|
574
|
+
} : Gi(s);
|
|
575
|
+
return n = _r / n, u.config = function(c, l) {
|
|
576
|
+
return o(t, c, l);
|
|
577
|
+
}, u;
|
|
578
|
+
}, cr = function o(t, e) {
|
|
579
|
+
e === void 0 && (e = 1.70158);
|
|
580
|
+
var r = function(a) {
|
|
581
|
+
return a ? --a * a * ((e + 1) * a + e) + 1 : 0;
|
|
582
|
+
}, i = t === "out" ? r : t === "in" ? function(n) {
|
|
583
|
+
return 1 - r(1 - n);
|
|
584
|
+
} : Gi(r);
|
|
585
|
+
return i.config = function(n) {
|
|
586
|
+
return o(t, n);
|
|
587
|
+
}, i;
|
|
588
|
+
};
|
|
589
|
+
_t("Linear,Quad,Cubic,Quart,Quint,Strong", function(o, t) {
|
|
590
|
+
var e = t < 5 ? t + 1 : t;
|
|
591
|
+
se(o + ",Power" + (e - 1), t ? function(r) {
|
|
592
|
+
return Math.pow(r, e);
|
|
593
|
+
} : function(r) {
|
|
594
|
+
return r;
|
|
595
|
+
}, function(r) {
|
|
596
|
+
return 1 - Math.pow(1 - r, e);
|
|
597
|
+
}, function(r) {
|
|
598
|
+
return r < 0.5 ? Math.pow(r * 2, e) / 2 : 1 - Math.pow((1 - r) * 2, e) / 2;
|
|
599
|
+
});
|
|
600
|
+
});
|
|
601
|
+
X.Linear.easeNone = X.none = X.Linear.easeIn;
|
|
602
|
+
se("Elastic", ur("in"), ur("out"), ur());
|
|
603
|
+
(function(o, t) {
|
|
604
|
+
var e = 1 / t, r = 2 * e, i = 2.5 * e, n = function(s) {
|
|
605
|
+
return s < e ? o * s * s : s < r ? o * Math.pow(s - 1.5 / t, 2) + 0.75 : s < i ? o * (s -= 2.25 / t) * s + 0.9375 : o * Math.pow(s - 2.625 / t, 2) + 0.984375;
|
|
606
|
+
};
|
|
607
|
+
se("Bounce", function(a) {
|
|
608
|
+
return 1 - n(1 - a);
|
|
609
|
+
}, n);
|
|
610
|
+
})(7.5625, 2.75);
|
|
611
|
+
se("Expo", function(o) {
|
|
612
|
+
return Math.pow(2, 10 * (o - 1)) * o + o * o * o * o * o * o * (1 - o);
|
|
613
|
+
});
|
|
614
|
+
se("Circ", function(o) {
|
|
615
|
+
return -(gi(1 - o * o) - 1);
|
|
616
|
+
});
|
|
617
|
+
se("Sine", function(o) {
|
|
618
|
+
return o === 1 ? 1 : -Dn(o * On) + 1;
|
|
619
|
+
});
|
|
620
|
+
se("Back", cr("in"), cr("out"), cr());
|
|
621
|
+
X.SteppedEase = X.steps = Ct.SteppedEase = {
|
|
622
|
+
config: function(t, e) {
|
|
623
|
+
t === void 0 && (t = 1);
|
|
624
|
+
var r = 1 / t, i = t + (e ? 0 : 1), n = e ? 1 : 0, a = 1 - G;
|
|
625
|
+
return function(s) {
|
|
626
|
+
return ((i * Ie(0, a, s) | 0) + n) * r;
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
};
|
|
630
|
+
be.ease = X["quad.out"];
|
|
631
|
+
_t("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", function(o) {
|
|
632
|
+
return qr += o + "," + o + "Params,";
|
|
633
|
+
});
|
|
634
|
+
var ji = function(t, e) {
|
|
635
|
+
this.id = Mn++, t._gsap = this, this.target = t, this.harness = e, this.get = e ? e.get : Ci, this.set = e ? e.getSetter : Xr;
|
|
636
|
+
}, qe = /* @__PURE__ */ function() {
|
|
637
|
+
function o(e) {
|
|
638
|
+
this.vars = e, this._delay = +e.delay || 0, (this._repeat = e.repeat === 1 / 0 ? -2 : e.repeat || 0) && (this._rDelay = e.repeatDelay || 0, this._yoyo = !!e.yoyo || !!e.yoyoEase), this._ts = 1, Te(this, +e.duration, 1, 1), this.data = e.data, j && (this._ctx = j, j.data.push(this)), Fe || xt.wake();
|
|
639
|
+
}
|
|
640
|
+
var t = o.prototype;
|
|
641
|
+
return t.delay = function(r) {
|
|
642
|
+
return r || r === 0 ? (this.parent && this.parent.smoothChildTiming && this.startTime(this._start + r - this._delay), this._delay = r, this) : this._delay;
|
|
643
|
+
}, t.duration = function(r) {
|
|
644
|
+
return arguments.length ? this.totalDuration(this._repeat > 0 ? r + (r + this._rDelay) * this._repeat : r) : this.totalDuration() && this._dur;
|
|
645
|
+
}, t.totalDuration = function(r) {
|
|
646
|
+
return arguments.length ? (this._dirty = 0, Te(this, this._repeat < 0 ? r : (r - this._repeat * this._rDelay) / (this._repeat + 1))) : this._tDur;
|
|
647
|
+
}, t.totalTime = function(r, i) {
|
|
648
|
+
if (we(), !arguments.length)
|
|
649
|
+
return this._tTime;
|
|
650
|
+
var n = this._dp;
|
|
651
|
+
if (n && n.smoothChildTiming && this._ts) {
|
|
652
|
+
for (ar(this, r), !n._dp || n.parent || Mi(n, this); n && n.parent; )
|
|
653
|
+
n.parent._time !== n._start + (n._ts >= 0 ? n._tTime / n._ts : (n.totalDuration() - n._tTime) / -n._ts) && n.totalTime(n._tTime, !0), n = n.parent;
|
|
654
|
+
!this.parent && this._dp.autoRemoveChildren && (this._ts > 0 && r < this._tDur || this._ts < 0 && r > 0 || !this._tDur && !r) && At(this._dp, this, this._start - this._delay);
|
|
655
|
+
}
|
|
656
|
+
return (this._tTime !== r || !this._dur && !i || this._initted && Math.abs(this._zTime) === G || !this._initted && this._dur && r || !r && !this._initted && (this.add || this._ptLookup)) && (this._ts || (this._pTime = r), Si(this, r, i)), this;
|
|
657
|
+
}, t.time = function(r, i) {
|
|
658
|
+
return arguments.length ? this.totalTime(Math.min(this.totalDuration(), r + ti(this)) % (this._dur + this._rDelay) || (r ? this._dur : 0), i) : this._time;
|
|
659
|
+
}, t.totalProgress = function(r, i) {
|
|
660
|
+
return arguments.length ? this.totalTime(this.totalDuration() * r, i) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.rawTime() >= 0 && this._initted ? 1 : 0;
|
|
661
|
+
}, t.progress = function(r, i) {
|
|
662
|
+
return arguments.length ? this.totalTime(this.duration() * (this._yoyo && !(this.iteration() & 1) ? 1 - r : r) + ti(this), i) : this.duration() ? Math.min(1, this._time / this._dur) : this.rawTime() > 0 ? 1 : 0;
|
|
663
|
+
}, t.iteration = function(r, i) {
|
|
664
|
+
var n = this.duration() + this._rDelay;
|
|
665
|
+
return arguments.length ? this.totalTime(this._time + (r - 1) * n, i) : this._repeat ? ke(this._tTime, n) + 1 : 1;
|
|
666
|
+
}, t.timeScale = function(r, i) {
|
|
667
|
+
if (!arguments.length)
|
|
668
|
+
return this._rts === -G ? 0 : this._rts;
|
|
669
|
+
if (this._rts === r)
|
|
670
|
+
return this;
|
|
671
|
+
var n = this.parent && this._ts ? He(this.parent._time, this) : this._tTime;
|
|
672
|
+
return this._rts = +r || 0, this._ts = this._ps || r === -G ? 0 : this._rts, this.totalTime(Ie(-Math.abs(this._delay), this.totalDuration(), n), i !== !1), nr(this), $n(this);
|
|
673
|
+
}, t.paused = function(r) {
|
|
674
|
+
return arguments.length ? (this._ps !== r && (this._ps = r, r ? (this._pTime = this._tTime || Math.max(-this._delay, this.rawTime()), this._ts = this._act = 0) : (we(), this._ts = this._rts, this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, this.progress() === 1 && Math.abs(this._zTime) !== G && (this._tTime -= G)))), this) : this._ps;
|
|
675
|
+
}, t.startTime = function(r) {
|
|
676
|
+
if (arguments.length) {
|
|
677
|
+
this._start = Q(r);
|
|
678
|
+
var i = this.parent || this._dp;
|
|
679
|
+
return i && (i._sort || !this.parent) && At(i, this, this._start - this._delay), this;
|
|
680
|
+
}
|
|
681
|
+
return this._start;
|
|
682
|
+
}, t.endTime = function(r) {
|
|
683
|
+
return this._start + (ht(r) ? this.totalDuration() : this.duration()) / Math.abs(this._ts || 1);
|
|
684
|
+
}, t.rawTime = function(r) {
|
|
685
|
+
var i = this.parent || this._dp;
|
|
686
|
+
return i ? r && (!this._ts || this._repeat && this._time && this.totalProgress() < 1) ? this._tTime % (this._dur + this._rDelay) : this._ts ? He(i.rawTime(r), this) : this._tTime : this._tTime;
|
|
687
|
+
}, t.revert = function(r) {
|
|
688
|
+
r === void 0 && (r = Vn);
|
|
689
|
+
var i = at;
|
|
690
|
+
return at = r, Lr(this) && (this.timeline && this.timeline.revert(r), this.totalTime(-0.01, r.suppressEvents)), this.data !== "nested" && r.kill !== !1 && this.kill(), at = i, this;
|
|
691
|
+
}, t.globalTime = function(r) {
|
|
692
|
+
for (var i = this, n = arguments.length ? r : i.rawTime(); i; )
|
|
693
|
+
n = i._start + n / (Math.abs(i._ts) || 1), i = i._dp;
|
|
694
|
+
return !this.parent && this._sat ? this._sat.globalTime(r) : n;
|
|
695
|
+
}, t.repeat = function(r) {
|
|
696
|
+
return arguments.length ? (this._repeat = r === 1 / 0 ? -2 : r, ei(this)) : this._repeat === -2 ? 1 / 0 : this._repeat;
|
|
697
|
+
}, t.repeatDelay = function(r) {
|
|
698
|
+
if (arguments.length) {
|
|
699
|
+
var i = this._time;
|
|
700
|
+
return this._rDelay = r, ei(this), i ? this.time(i) : this;
|
|
701
|
+
}
|
|
702
|
+
return this._rDelay;
|
|
703
|
+
}, t.yoyo = function(r) {
|
|
704
|
+
return arguments.length ? (this._yoyo = r, this) : this._yoyo;
|
|
705
|
+
}, t.seek = function(r, i) {
|
|
706
|
+
return this.totalTime(Rt(this, r), ht(i));
|
|
707
|
+
}, t.restart = function(r, i) {
|
|
708
|
+
return this.play().totalTime(r ? -this._delay : 0, ht(i)), this._dur || (this._zTime = -G), this;
|
|
709
|
+
}, t.play = function(r, i) {
|
|
710
|
+
return r != null && this.seek(r, i), this.reversed(!1).paused(!1);
|
|
711
|
+
}, t.reverse = function(r, i) {
|
|
712
|
+
return r != null && this.seek(r || this.totalDuration(), i), this.reversed(!0).paused(!1);
|
|
713
|
+
}, t.pause = function(r, i) {
|
|
714
|
+
return r != null && this.seek(r, i), this.paused(!0);
|
|
715
|
+
}, t.resume = function() {
|
|
716
|
+
return this.paused(!1);
|
|
717
|
+
}, t.reversed = function(r) {
|
|
718
|
+
return arguments.length ? (!!r !== this.reversed() && this.timeScale(-this._rts || (r ? -G : 0)), this) : this._rts < 0;
|
|
719
|
+
}, t.invalidate = function() {
|
|
720
|
+
return this._initted = this._act = 0, this._zTime = -G, this;
|
|
721
|
+
}, t.isActive = function() {
|
|
722
|
+
var r = this.parent || this._dp, i = this._start, n;
|
|
723
|
+
return !!(!r || this._ts && this._initted && r.isActive() && (n = r.rawTime(!0)) >= i && n < this.endTime(!0) - G);
|
|
724
|
+
}, t.eventCallback = function(r, i, n) {
|
|
725
|
+
var a = this.vars;
|
|
726
|
+
return arguments.length > 1 ? (i ? (a[r] = i, n && (a[r + "Params"] = n), r === "onUpdate" && (this._onUpdate = i)) : delete a[r], this) : a[r];
|
|
727
|
+
}, t.then = function(r) {
|
|
728
|
+
var i = this, n = i._prom;
|
|
729
|
+
return new Promise(function(a) {
|
|
730
|
+
var s = K(r) ? r : Ri, u = function() {
|
|
731
|
+
var l = i.then;
|
|
732
|
+
i.then = null, n && n(), K(s) && (s = s(i)) && (s.then || s === i) && (i.then = l), a(s), i.then = l;
|
|
733
|
+
};
|
|
734
|
+
i._initted && i.totalProgress() === 1 && i._ts >= 0 || !i._tTime && i._ts < 0 ? u() : i._prom = u;
|
|
735
|
+
});
|
|
736
|
+
}, t.kill = function() {
|
|
737
|
+
Re(this);
|
|
738
|
+
}, o;
|
|
739
|
+
}();
|
|
740
|
+
St(qe.prototype, {
|
|
741
|
+
_time: 0,
|
|
742
|
+
_start: 0,
|
|
743
|
+
_end: 0,
|
|
744
|
+
_tTime: 0,
|
|
745
|
+
_tDur: 0,
|
|
746
|
+
_dirty: 0,
|
|
747
|
+
_repeat: 0,
|
|
748
|
+
_yoyo: !1,
|
|
749
|
+
parent: null,
|
|
750
|
+
_initted: !1,
|
|
751
|
+
_rDelay: 0,
|
|
752
|
+
_ts: 1,
|
|
753
|
+
_dp: 0,
|
|
754
|
+
ratio: 0,
|
|
755
|
+
_zTime: -G,
|
|
756
|
+
_prom: 0,
|
|
757
|
+
_ps: !1,
|
|
758
|
+
_rts: 1
|
|
759
|
+
});
|
|
760
|
+
var ft = /* @__PURE__ */ function(o) {
|
|
761
|
+
mi(t, o);
|
|
762
|
+
function t(r, i) {
|
|
763
|
+
var n;
|
|
764
|
+
return r === void 0 && (r = {}), n = o.call(this, r) || this, n.labels = {}, n.smoothChildTiming = !!r.smoothChildTiming, n.autoRemoveChildren = !!r.autoRemoveChildren, n._sort = ht(r.sortChildren), H && At(r.parent || H, Ft(n), i), r.reversed && n.reverse(), r.paused && n.paused(!0), r.scrollTrigger && Di(Ft(n), r.scrollTrigger), n;
|
|
765
|
+
}
|
|
766
|
+
var e = t.prototype;
|
|
767
|
+
return e.to = function(i, n, a) {
|
|
768
|
+
return De(0, arguments, this), this;
|
|
769
|
+
}, e.from = function(i, n, a) {
|
|
770
|
+
return De(1, arguments, this), this;
|
|
771
|
+
}, e.fromTo = function(i, n, a, s) {
|
|
772
|
+
return De(2, arguments, this), this;
|
|
773
|
+
}, e.set = function(i, n, a) {
|
|
774
|
+
return n.duration = 0, n.parent = this, Me(n).repeatDelay || (n.repeat = 0), n.immediateRender = !!n.immediateRender, new tt(i, n, Rt(this, a), 1), this;
|
|
775
|
+
}, e.call = function(i, n, a) {
|
|
776
|
+
return At(this, tt.delayedCall(0, i, n), a);
|
|
777
|
+
}, e.staggerTo = function(i, n, a, s, u, c, l) {
|
|
778
|
+
return a.duration = n, a.stagger = a.stagger || s, a.onComplete = c, a.onCompleteParams = l, a.parent = this, new tt(i, a, Rt(this, u)), this;
|
|
779
|
+
}, e.staggerFrom = function(i, n, a, s, u, c, l) {
|
|
780
|
+
return a.runBackwards = 1, Me(a).immediateRender = ht(a.immediateRender), this.staggerTo(i, n, a, s, u, c, l);
|
|
781
|
+
}, e.staggerFromTo = function(i, n, a, s, u, c, l, d) {
|
|
782
|
+
return s.startAt = a, Me(s).immediateRender = ht(s.immediateRender), this.staggerTo(i, n, s, u, c, l, d);
|
|
783
|
+
}, e.render = function(i, n, a) {
|
|
784
|
+
var s = this._time, u = this._dirty ? this.totalDuration() : this._tDur, c = this._dur, l = i <= 0 ? 0 : Q(i), d = this._zTime < 0 != i < 0 && (this._initted || !c), _, h, m, f, p, g, b, y, x, v, T, C;
|
|
785
|
+
if (this !== H && l > u && i >= 0 && (l = u), l !== this._tTime || a || d) {
|
|
786
|
+
if (s !== this._time && c && (l += this._time - s, i += this._time - s), _ = l, x = this._start, y = this._ts, g = !y, d && (c || (s = this._zTime), (i || !n) && (this._zTime = i)), this._repeat) {
|
|
787
|
+
if (T = this._yoyo, p = c + this._rDelay, this._repeat < -1 && i < 0)
|
|
788
|
+
return this.totalTime(p * 100 + i, n, a);
|
|
789
|
+
if (_ = Q(l % p), l === u ? (f = this._repeat, _ = c) : (v = Q(l / p), f = ~~v, f && f === v && (_ = c, f--), _ > c && (_ = c)), v = ke(this._tTime, p), !s && this._tTime && v !== f && this._tTime - v * p - this._dur <= 0 && (v = f), T && f & 1 && (_ = c - _, C = 1), f !== v && !this._lock) {
|
|
790
|
+
var S = T && v & 1, k = S === (T && f & 1);
|
|
791
|
+
if (f < v && (S = !S), s = S ? 0 : l % c ? c : l, this._lock = 1, this.render(s || (C ? 0 : Q(f * p)), n, !c)._lock = 0, this._tTime = l, !n && this.parent && kt(this, "onRepeat"), this.vars.repeatRefresh && !C && (this.invalidate()._lock = 1, v = f), s && s !== this._time || g !== !this._ts || this.vars.onRepeat && !this.parent && !this._act)
|
|
792
|
+
return this;
|
|
793
|
+
if (c = this._dur, u = this._tDur, k && (this._lock = 2, s = S ? c : -1e-4, this.render(s, !0), this.vars.repeatRefresh && !C && this.invalidate()), this._lock = 0, !this._ts && !g)
|
|
794
|
+
return this;
|
|
795
|
+
Yi(this, C);
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
if (this._hasPause && !this._forcing && this._lock < 2 && (b = Yn(this, Q(s), Q(_)), b && (l -= _ - (_ = b._start))), this._tTime = l, this._time = _, this._act = !y, this._initted || (this._onUpdate = this.vars.onUpdate, this._initted = 1, this._zTime = i, s = 0), !s && l && c && !n && !v && (kt(this, "onStart"), this._tTime !== l))
|
|
799
|
+
return this;
|
|
800
|
+
if (_ >= s && i >= 0)
|
|
801
|
+
for (h = this._first; h; ) {
|
|
802
|
+
if (m = h._next, (h._act || _ >= h._start) && h._ts && b !== h) {
|
|
803
|
+
if (h.parent !== this)
|
|
804
|
+
return this.render(i, n, a);
|
|
805
|
+
if (h.render(h._ts > 0 ? (_ - h._start) * h._ts : (h._dirty ? h.totalDuration() : h._tDur) + (_ - h._start) * h._ts, n, a), _ !== this._time || !this._ts && !g) {
|
|
806
|
+
b = 0, m && (l += this._zTime = -G);
|
|
807
|
+
break;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
h = m;
|
|
811
|
+
}
|
|
812
|
+
else {
|
|
813
|
+
h = this._last;
|
|
814
|
+
for (var V = i < 0 ? i : _; h; ) {
|
|
815
|
+
if (m = h._prev, (h._act || V <= h._end) && h._ts && b !== h) {
|
|
816
|
+
if (h.parent !== this)
|
|
817
|
+
return this.render(i, n, a);
|
|
818
|
+
if (h.render(h._ts > 0 ? (V - h._start) * h._ts : (h._dirty ? h.totalDuration() : h._tDur) + (V - h._start) * h._ts, n, a || at && Lr(h)), _ !== this._time || !this._ts && !g) {
|
|
819
|
+
b = 0, m && (l += this._zTime = V ? -G : G);
|
|
820
|
+
break;
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
h = m;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
if (b && !n && (this.pause(), b.render(_ >= s ? 0 : -G)._zTime = _ >= s ? 1 : -1, this._ts))
|
|
827
|
+
return this._start = x, nr(this), this.render(i, n, a);
|
|
828
|
+
this._onUpdate && !n && kt(this, "onUpdate", !0), (l === u && this._tTime >= this.totalDuration() || !l && s) && (x === this._start || Math.abs(y) !== Math.abs(this._ts)) && (this._lock || ((i || !c) && (l === u && this._ts > 0 || !l && this._ts < 0) && Yt(this, 1), !n && !(i < 0 && !s) && (l || s || !u) && (kt(this, l === u && i >= 0 ? "onComplete" : "onReverseComplete", !0), this._prom && !(l < u && this.timeScale() > 0) && this._prom())));
|
|
829
|
+
}
|
|
830
|
+
return this;
|
|
831
|
+
}, e.add = function(i, n) {
|
|
832
|
+
var a = this;
|
|
833
|
+
if (Vt(n) || (n = Rt(this, n, i)), !(i instanceof qe)) {
|
|
834
|
+
if (ut(i))
|
|
835
|
+
return i.forEach(function(s) {
|
|
836
|
+
return a.add(s, n);
|
|
837
|
+
}), this;
|
|
838
|
+
if (it(i))
|
|
839
|
+
return this.addLabel(i, n);
|
|
840
|
+
if (K(i))
|
|
841
|
+
i = tt.delayedCall(0, i);
|
|
842
|
+
else
|
|
843
|
+
return this;
|
|
844
|
+
}
|
|
845
|
+
return this !== i ? At(this, i, n) : this;
|
|
846
|
+
}, e.getChildren = function(i, n, a, s) {
|
|
847
|
+
i === void 0 && (i = !0), n === void 0 && (n = !0), a === void 0 && (a = !0), s === void 0 && (s = -Ot);
|
|
848
|
+
for (var u = [], c = this._first; c; )
|
|
849
|
+
c._start >= s && (c instanceof tt ? n && u.push(c) : (a && u.push(c), i && u.push.apply(u, c.getChildren(!0, n, a)))), c = c._next;
|
|
850
|
+
return u;
|
|
851
|
+
}, e.getById = function(i) {
|
|
852
|
+
for (var n = this.getChildren(1, 1, 1), a = n.length; a--; )
|
|
853
|
+
if (n[a].vars.id === i)
|
|
854
|
+
return n[a];
|
|
855
|
+
}, e.remove = function(i) {
|
|
856
|
+
return it(i) ? this.removeLabel(i) : K(i) ? this.killTweensOf(i) : (i.parent === this && ir(this, i), i === this._recent && (this._recent = this._last), re(this));
|
|
857
|
+
}, e.totalTime = function(i, n) {
|
|
858
|
+
return arguments.length ? (this._forcing = 1, !this._dp && this._ts && (this._start = Q(xt.time - (this._ts > 0 ? i / this._ts : (this.totalDuration() - i) / -this._ts))), o.prototype.totalTime.call(this, i, n), this._forcing = 0, this) : this._tTime;
|
|
859
|
+
}, e.addLabel = function(i, n) {
|
|
860
|
+
return this.labels[i] = Rt(this, n), this;
|
|
861
|
+
}, e.removeLabel = function(i) {
|
|
862
|
+
return delete this.labels[i], this;
|
|
863
|
+
}, e.addPause = function(i, n, a) {
|
|
864
|
+
var s = tt.delayedCall(0, n || Be, a);
|
|
865
|
+
return s.data = "isPause", this._hasPause = 1, At(this, s, Rt(this, i));
|
|
866
|
+
}, e.removePause = function(i) {
|
|
867
|
+
var n = this._first;
|
|
868
|
+
for (i = Rt(this, i); n; )
|
|
869
|
+
n._start === i && n.data === "isPause" && Yt(n), n = n._next;
|
|
870
|
+
}, e.killTweensOf = function(i, n, a) {
|
|
871
|
+
for (var s = this.getTweensOf(i, a), u = s.length; u--; )
|
|
872
|
+
It !== s[u] && s[u].kill(i, n);
|
|
873
|
+
return this;
|
|
874
|
+
}, e.getTweensOf = function(i, n) {
|
|
875
|
+
for (var a = [], s = Mt(i), u = this._first, c = Vt(n), l; u; )
|
|
876
|
+
u instanceof tt ? Ln(u._targets, s) && (c ? (!It || u._initted && u._ts) && u.globalTime(0) <= n && u.globalTime(u.totalDuration()) > n : !n || u.isActive()) && a.push(u) : (l = u.getTweensOf(s, n)).length && a.push.apply(a, l), u = u._next;
|
|
877
|
+
return a;
|
|
878
|
+
}, e.tweenTo = function(i, n) {
|
|
879
|
+
n = n || {};
|
|
880
|
+
var a = this, s = Rt(a, i), u = n, c = u.startAt, l = u.onStart, d = u.onStartParams, _ = u.immediateRender, h, m = tt.to(a, St({
|
|
881
|
+
ease: n.ease || "none",
|
|
882
|
+
lazy: !1,
|
|
883
|
+
immediateRender: !1,
|
|
884
|
+
time: s,
|
|
885
|
+
overwrite: "auto",
|
|
886
|
+
duration: n.duration || Math.abs((s - (c && "time" in c ? c.time : a._time)) / a.timeScale()) || G,
|
|
887
|
+
onStart: function() {
|
|
888
|
+
if (a.pause(), !h) {
|
|
889
|
+
var p = n.duration || Math.abs((s - (c && "time" in c ? c.time : a._time)) / a.timeScale());
|
|
890
|
+
m._dur !== p && Te(m, p, 0, 1).render(m._time, !0, !0), h = 1;
|
|
891
|
+
}
|
|
892
|
+
l && l.apply(m, d || []);
|
|
893
|
+
}
|
|
894
|
+
}, n));
|
|
895
|
+
return _ ? m.render(0) : m;
|
|
896
|
+
}, e.tweenFromTo = function(i, n, a) {
|
|
897
|
+
return this.tweenTo(n, St({
|
|
898
|
+
startAt: {
|
|
899
|
+
time: Rt(this, i)
|
|
900
|
+
}
|
|
901
|
+
}, a));
|
|
902
|
+
}, e.recent = function() {
|
|
903
|
+
return this._recent;
|
|
904
|
+
}, e.nextLabel = function(i) {
|
|
905
|
+
return i === void 0 && (i = this._time), ri(this, Rt(this, i));
|
|
906
|
+
}, e.previousLabel = function(i) {
|
|
907
|
+
return i === void 0 && (i = this._time), ri(this, Rt(this, i), 1);
|
|
908
|
+
}, e.currentLabel = function(i) {
|
|
909
|
+
return arguments.length ? this.seek(i, !0) : this.previousLabel(this._time + G);
|
|
910
|
+
}, e.shiftChildren = function(i, n, a) {
|
|
911
|
+
a === void 0 && (a = 0);
|
|
912
|
+
var s = this._first, u = this.labels, c;
|
|
913
|
+
for (i = Q(i); s; )
|
|
914
|
+
s._start >= a && (s._start += i, s._end += i), s = s._next;
|
|
915
|
+
if (n)
|
|
916
|
+
for (c in u)
|
|
917
|
+
u[c] >= a && (u[c] += i);
|
|
918
|
+
return re(this);
|
|
919
|
+
}, e.invalidate = function(i) {
|
|
920
|
+
var n = this._first;
|
|
921
|
+
for (this._lock = 0; n; )
|
|
922
|
+
n.invalidate(i), n = n._next;
|
|
923
|
+
return o.prototype.invalidate.call(this, i);
|
|
924
|
+
}, e.clear = function(i) {
|
|
925
|
+
i === void 0 && (i = !0);
|
|
926
|
+
for (var n = this._first, a; n; )
|
|
927
|
+
a = n._next, this.remove(n), n = a;
|
|
928
|
+
return this._dp && (this._time = this._tTime = this._pTime = 0), i && (this.labels = {}), re(this);
|
|
929
|
+
}, e.totalDuration = function(i) {
|
|
930
|
+
var n = 0, a = this, s = a._last, u = Ot, c, l, d;
|
|
931
|
+
if (arguments.length)
|
|
932
|
+
return a.timeScale((a._repeat < 0 ? a.duration() : a.totalDuration()) / (a.reversed() ? -i : i));
|
|
933
|
+
if (a._dirty) {
|
|
934
|
+
for (d = a.parent; s; )
|
|
935
|
+
c = s._prev, s._dirty && s.totalDuration(), l = s._start, l > u && a._sort && s._ts && !a._lock ? (a._lock = 1, At(a, s, l - s._delay, 1)._lock = 0) : u = l, l < 0 && s._ts && (n -= l, (!d && !a._dp || d && d.smoothChildTiming) && (a._start += Q(l / a._ts), a._time -= l, a._tTime -= l), a.shiftChildren(-l, !1, -1 / 0), u = 0), s._end > n && s._ts && (n = s._end), s = c;
|
|
936
|
+
Te(a, a === H && a._time > n ? a._time : n, 1, 1), a._dirty = 0;
|
|
937
|
+
}
|
|
938
|
+
return a._tDur;
|
|
939
|
+
}, t.updateRoot = function(i) {
|
|
940
|
+
if (H._ts && (Si(H, He(i, H)), wi = xt.frame), xt.frame >= Kr) {
|
|
941
|
+
Kr += wt.autoSleep || 120;
|
|
942
|
+
var n = H._first;
|
|
943
|
+
if ((!n || !n._ts) && wt.autoSleep && xt._listeners.length < 2) {
|
|
944
|
+
for (; n && !n._ts; )
|
|
945
|
+
n = n._next;
|
|
946
|
+
n || xt.sleep();
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
}, t;
|
|
950
|
+
}(qe);
|
|
951
|
+
St(ft.prototype, {
|
|
952
|
+
_lock: 0,
|
|
953
|
+
_hasPause: 0,
|
|
954
|
+
_forcing: 0
|
|
955
|
+
});
|
|
956
|
+
var la = function(t, e, r, i, n, a, s) {
|
|
957
|
+
var u = new pt(this._pt, t, e, 0, 1, tn, null, n), c = 0, l = 0, d, _, h, m, f, p, g, b;
|
|
958
|
+
for (u.b = r, u.e = i, r += "", i += "", (g = ~i.indexOf("random(")) && (i = ze(i)), a && (b = [r, i], a(b, t, e), r = b[0], i = b[1]), _ = r.match(sr) || []; d = sr.exec(i); )
|
|
959
|
+
m = d[0], f = i.substring(c, d.index), h ? h = (h + 1) % 5 : f.substr(-5) === "rgba(" && (h = 1), m !== _[l++] && (p = parseFloat(_[l - 1]) || 0, u._pt = {
|
|
960
|
+
_next: u._pt,
|
|
961
|
+
p: f || l === 1 ? f : ",",
|
|
962
|
+
//note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.
|
|
963
|
+
s: p,
|
|
964
|
+
c: m.charAt(1) === "=" ? pe(p, m) - p : parseFloat(m) - p,
|
|
965
|
+
m: h && h < 4 ? Math.round : 0
|
|
966
|
+
}, c = sr.lastIndex);
|
|
967
|
+
return u.c = c < i.length ? i.substring(c, i.length) : "", u.fp = s, (bi.test(i) || g) && (u.e = 0), this._pt = u, u;
|
|
968
|
+
}, Ir = function(t, e, r, i, n, a, s, u, c, l) {
|
|
969
|
+
K(i) && (i = i(n || 0, t, a));
|
|
970
|
+
var d = t[e], _ = r !== "get" ? r : K(d) ? c ? t[e.indexOf("set") || !K(t["get" + e.substr(3)]) ? e : "get" + e.substr(3)](c) : t[e]() : d, h = K(d) ? c ? ha : Ki : $r, m;
|
|
971
|
+
if (it(i) && (~i.indexOf("random(") && (i = ze(i)), i.charAt(1) === "=" && (m = pe(_, i) + (lt(_) || 0), (m || m === 0) && (i = m))), !l || _ !== i || kr)
|
|
972
|
+
return !isNaN(_ * i) && i !== "" ? (m = new pt(this._pt, t, e, +_ || 0, i - (_ || 0), typeof d == "boolean" ? pa : Ji, 0, h), c && (m.fp = c), s && m.modifier(s, this, t), this._pt = m) : (!d && !(e in t) && zr(e, i), la.call(this, t, e, _, i, h, u || wt.stringFilter, c));
|
|
973
|
+
}, ua = function(t, e, r, i, n) {
|
|
974
|
+
if (K(t) && (t = Ae(t, n, e, r, i)), !zt(t) || t.style && t.nodeType || ut(t) || vi(t))
|
|
975
|
+
return it(t) ? Ae(t, n, e, r, i) : t;
|
|
976
|
+
var a = {}, s;
|
|
977
|
+
for (s in t)
|
|
978
|
+
a[s] = Ae(t[s], n, e, r, i);
|
|
979
|
+
return a;
|
|
980
|
+
}, Qi = function(t, e, r, i, n, a) {
|
|
981
|
+
var s, u, c, l;
|
|
982
|
+
if (yt[t] && (s = new yt[t]()).init(n, s.rawVars ? e[t] : ua(e[t], i, n, a, r), r, i, a) !== !1 && (r._pt = u = new pt(r._pt, n, t, 0, 1, s.render, s, 0, s.priority), r !== _e))
|
|
983
|
+
for (c = r._ptLookup[r._targets.indexOf(n)], l = s._props.length; l--; )
|
|
984
|
+
c[s._props[l]] = u;
|
|
985
|
+
return s;
|
|
986
|
+
}, It, kr, Nr = function o(t, e, r) {
|
|
987
|
+
var i = t.vars, n = i.ease, a = i.startAt, s = i.immediateRender, u = i.lazy, c = i.onUpdate, l = i.runBackwards, d = i.yoyoEase, _ = i.keyframes, h = i.autoRevert, m = t._dur, f = t._startAt, p = t._targets, g = t.parent, b = g && g.data === "nested" ? g.vars.targets : p, y = t._overwrite === "auto" && !Dr, x = t.timeline, v, T, C, S, k, V, U, L, $, E, z, w, R;
|
|
988
|
+
if (x && (!_ || !n) && (n = "none"), t._ease = ie(n, be.ease), t._yEase = d ? Wi(ie(d === !0 ? n : d, be.ease)) : 0, d && t._yoyo && !t._repeat && (d = t._yEase, t._yEase = t._ease, t._ease = d), t._from = !x && !!i.runBackwards, !x || _ && !i.stagger) {
|
|
989
|
+
if (L = p[0] ? ee(p[0]).harness : 0, w = L && i[L.prop], v = Qe(i, Fr), f && (f._zTime < 0 && f.progress(1), e < 0 && l && s && !h ? f.render(-1, !0) : f.revert(l && m ? Ue : qn), f._lazy = 0), a) {
|
|
990
|
+
if (Yt(t._startAt = tt.set(p, St({
|
|
991
|
+
data: "isStart",
|
|
992
|
+
overwrite: !1,
|
|
993
|
+
parent: g,
|
|
994
|
+
immediateRender: !0,
|
|
995
|
+
lazy: !f && ht(u),
|
|
996
|
+
startAt: null,
|
|
997
|
+
delay: 0,
|
|
998
|
+
onUpdate: c && function() {
|
|
999
|
+
return kt(t, "onUpdate");
|
|
1000
|
+
},
|
|
1001
|
+
stagger: 0
|
|
1002
|
+
}, a))), t._startAt._dp = 0, t._startAt._sat = t, e < 0 && (at || !s && !h) && t._startAt.revert(Ue), s && m && e <= 0 && r <= 0) {
|
|
1003
|
+
e && (t._zTime = e);
|
|
1004
|
+
return;
|
|
1005
|
+
}
|
|
1006
|
+
} else if (l && m && !f) {
|
|
1007
|
+
if (e && (s = !1), C = St({
|
|
1008
|
+
overwrite: !1,
|
|
1009
|
+
data: "isFromStart",
|
|
1010
|
+
//we tag the tween with as "isFromStart" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a "from()" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in.
|
|
1011
|
+
lazy: s && !f && ht(u),
|
|
1012
|
+
immediateRender: s,
|
|
1013
|
+
//zero-duration tweens render immediately by default, but if we're not specifically instructed to render this tween immediately, we should skip this and merely _init() to record the starting values (rendering them immediately would push them to completion which is wasteful in that case - we'd have to render(-1) immediately after)
|
|
1014
|
+
stagger: 0,
|
|
1015
|
+
parent: g
|
|
1016
|
+
//ensures that nested tweens that had a stagger are handled properly, like gsap.from(".class", {y: gsap.utils.wrap([-100,100]), stagger: 0.5})
|
|
1017
|
+
}, v), w && (C[L.prop] = w), Yt(t._startAt = tt.set(p, C)), t._startAt._dp = 0, t._startAt._sat = t, e < 0 && (at ? t._startAt.revert(Ue) : t._startAt.render(-1, !0)), t._zTime = e, !s)
|
|
1018
|
+
o(t._startAt, G, G);
|
|
1019
|
+
else if (!e)
|
|
1020
|
+
return;
|
|
1021
|
+
}
|
|
1022
|
+
for (t._pt = t._ptCache = 0, u = m && ht(u) || u && !m, T = 0; T < p.length; T++) {
|
|
1023
|
+
if (k = p[T], U = k._gsap || Vr(p)[T]._gsap, t._ptLookup[T] = E = {}, mr[U.id] && Xt.length && je(), z = b === p ? T : b.indexOf(k), L && ($ = new L()).init(k, w || v, t, z, b) !== !1 && (t._pt = S = new pt(t._pt, k, $.name, 0, 1, $.render, $, 0, $.priority), $._props.forEach(function(O) {
|
|
1024
|
+
E[O] = S;
|
|
1025
|
+
}), $.priority && (V = 1)), !L || w)
|
|
1026
|
+
for (C in v)
|
|
1027
|
+
yt[C] && ($ = Qi(C, v, t, z, k, b)) ? $.priority && (V = 1) : E[C] = S = Ir.call(t, k, C, "get", v[C], z, b, 0, i.stringFilter);
|
|
1028
|
+
t._op && t._op[T] && t.kill(k, t._op[T]), y && t._pt && (It = t, H.killTweensOf(k, E, t.globalTime(e)), R = !t.parent, It = 0), t._pt && u && (mr[U.id] = 1);
|
|
1029
|
+
}
|
|
1030
|
+
V && en(t), t._onInit && t._onInit(t);
|
|
1031
|
+
}
|
|
1032
|
+
t._onUpdate = c, t._initted = (!t._op || t._pt) && !R, _ && e <= 0 && x.render(Ot, !0, !0);
|
|
1033
|
+
}, ca = function(t, e, r, i, n, a, s, u) {
|
|
1034
|
+
var c = (t._pt && t._ptCache || (t._ptCache = {}))[e], l, d, _, h;
|
|
1035
|
+
if (!c)
|
|
1036
|
+
for (c = t._ptCache[e] = [], _ = t._ptLookup, h = t._targets.length; h--; ) {
|
|
1037
|
+
if (l = _[h][e], l && l.d && l.d._pt)
|
|
1038
|
+
for (l = l.d._pt; l && l.p !== e && l.fp !== e; )
|
|
1039
|
+
l = l._next;
|
|
1040
|
+
if (!l)
|
|
1041
|
+
return kr = 1, t.vars[e] = "+=0", Nr(t, s), kr = 0, u ? Ee(e + " not eligible for reset") : 1;
|
|
1042
|
+
c.push(l);
|
|
1043
|
+
}
|
|
1044
|
+
for (h = c.length; h--; )
|
|
1045
|
+
d = c[h], l = d._pt || d, l.s = (i || i === 0) && !n ? i : l.s + (i || 0) + a * l.c, l.c = r - l.s, d.e && (d.e = J(r) + lt(d.e)), d.b && (d.b = l.s + lt(d.b));
|
|
1046
|
+
}, fa = function(t, e) {
|
|
1047
|
+
var r = t[0] ? ee(t[0]).harness : 0, i = r && r.aliases, n, a, s, u;
|
|
1048
|
+
if (!i)
|
|
1049
|
+
return e;
|
|
1050
|
+
n = xe({}, e);
|
|
1051
|
+
for (a in i)
|
|
1052
|
+
if (a in n)
|
|
1053
|
+
for (u = i[a].split(","), s = u.length; s--; )
|
|
1054
|
+
n[u[s]] = n[a];
|
|
1055
|
+
return n;
|
|
1056
|
+
}, da = function(t, e, r, i) {
|
|
1057
|
+
var n = e.ease || i || "power1.inOut", a, s;
|
|
1058
|
+
if (ut(e))
|
|
1059
|
+
s = r[t] || (r[t] = []), e.forEach(function(u, c) {
|
|
1060
|
+
return s.push({
|
|
1061
|
+
t: c / (e.length - 1) * 100,
|
|
1062
|
+
v: u,
|
|
1063
|
+
e: n
|
|
1064
|
+
});
|
|
1065
|
+
});
|
|
1066
|
+
else
|
|
1067
|
+
for (a in e)
|
|
1068
|
+
s = r[a] || (r[a] = []), a === "ease" || s.push({
|
|
1069
|
+
t: parseFloat(t),
|
|
1070
|
+
v: e[a],
|
|
1071
|
+
e: n
|
|
1072
|
+
});
|
|
1073
|
+
}, Ae = function(t, e, r, i, n) {
|
|
1074
|
+
return K(t) ? t.call(e, r, i, n) : it(t) && ~t.indexOf("random(") ? ze(t) : t;
|
|
1075
|
+
}, Hi = qr + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert", Zi = {};
|
|
1076
|
+
_t(Hi + ",id,stagger,delay,duration,paused,scrollTrigger", function(o) {
|
|
1077
|
+
return Zi[o] = 1;
|
|
1078
|
+
});
|
|
1079
|
+
var tt = /* @__PURE__ */ function(o) {
|
|
1080
|
+
mi(t, o);
|
|
1081
|
+
function t(r, i, n, a) {
|
|
1082
|
+
var s;
|
|
1083
|
+
typeof i == "number" && (n.duration = i, i = n, n = null), s = o.call(this, a ? i : Me(i)) || this;
|
|
1084
|
+
var u = s.vars, c = u.duration, l = u.delay, d = u.immediateRender, _ = u.stagger, h = u.overwrite, m = u.keyframes, f = u.defaults, p = u.scrollTrigger, g = u.yoyoEase, b = i.parent || H, y = (ut(r) || vi(r) ? Vt(r[0]) : "length" in i) ? [r] : Mt(r), x, v, T, C, S, k, V, U;
|
|
1085
|
+
if (s._targets = y.length ? Vr(y) : Ee("GSAP target " + r + " not found. https://gsap.com", !wt.nullTargetWarn) || [], s._ptLookup = [], s._overwrite = h, m || _ || Xe(c) || Xe(l)) {
|
|
1086
|
+
if (i = s.vars, x = s.timeline = new ft({
|
|
1087
|
+
data: "nested",
|
|
1088
|
+
defaults: f || {},
|
|
1089
|
+
targets: b && b.data === "nested" ? b.vars.targets : y
|
|
1090
|
+
}), x.kill(), x.parent = x._dp = Ft(s), x._start = 0, _ || Xe(c) || Xe(l)) {
|
|
1091
|
+
if (C = y.length, V = _ && zi(_), zt(_))
|
|
1092
|
+
for (S in _)
|
|
1093
|
+
~Hi.indexOf(S) && (U || (U = {}), U[S] = _[S]);
|
|
1094
|
+
for (v = 0; v < C; v++)
|
|
1095
|
+
T = Qe(i, Zi), T.stagger = 0, g && (T.yoyoEase = g), U && xe(T, U), k = y[v], T.duration = +Ae(c, Ft(s), v, k, y), T.delay = (+Ae(l, Ft(s), v, k, y) || 0) - s._delay, !_ && C === 1 && T.delay && (s._delay = l = T.delay, s._start += l, T.delay = 0), x.to(k, T, V ? V(v, k, y) : 0), x._ease = X.none;
|
|
1096
|
+
x.duration() ? c = l = 0 : s.timeline = 0;
|
|
1097
|
+
} else if (m) {
|
|
1098
|
+
Me(St(x.vars.defaults, {
|
|
1099
|
+
ease: "none"
|
|
1100
|
+
})), x._ease = ie(m.ease || i.ease || "none");
|
|
1101
|
+
var L = 0, $, E, z;
|
|
1102
|
+
if (ut(m))
|
|
1103
|
+
m.forEach(function(w) {
|
|
1104
|
+
return x.to(y, w, ">");
|
|
1105
|
+
}), x.duration();
|
|
1106
|
+
else {
|
|
1107
|
+
T = {};
|
|
1108
|
+
for (S in m)
|
|
1109
|
+
S === "ease" || S === "easeEach" || da(S, m[S], T, m.easeEach);
|
|
1110
|
+
for (S in T)
|
|
1111
|
+
for ($ = T[S].sort(function(w, R) {
|
|
1112
|
+
return w.t - R.t;
|
|
1113
|
+
}), L = 0, v = 0; v < $.length; v++)
|
|
1114
|
+
E = $[v], z = {
|
|
1115
|
+
ease: E.e,
|
|
1116
|
+
duration: (E.t - (v ? $[v - 1].t : 0)) / 100 * c
|
|
1117
|
+
}, z[S] = E.v, x.to(y, z, L), L += z.duration;
|
|
1118
|
+
x.duration() < c && x.to({}, {
|
|
1119
|
+
duration: c - x.duration()
|
|
1120
|
+
});
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
c || s.duration(c = x.duration());
|
|
1124
|
+
} else
|
|
1125
|
+
s.timeline = 0;
|
|
1126
|
+
return h === !0 && !Dr && (It = Ft(s), H.killTweensOf(y), It = 0), At(b, Ft(s), n), i.reversed && s.reverse(), i.paused && s.paused(!0), (d || !c && !m && s._start === Q(b._time) && ht(d) && Xn(Ft(s)) && b.data !== "nested") && (s._tTime = -G, s.render(Math.max(0, -l) || 0)), p && Di(Ft(s), p), s;
|
|
1127
|
+
}
|
|
1128
|
+
var e = t.prototype;
|
|
1129
|
+
return e.render = function(i, n, a) {
|
|
1130
|
+
var s = this._time, u = this._tDur, c = this._dur, l = i < 0, d = i > u - G && !l ? u : i < G ? 0 : i, _, h, m, f, p, g, b, y, x;
|
|
1131
|
+
if (!c)
|
|
1132
|
+
Wn(this, i, n, a);
|
|
1133
|
+
else if (d !== this._tTime || !i || a || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== l || this._lazy) {
|
|
1134
|
+
if (_ = d, y = this.timeline, this._repeat) {
|
|
1135
|
+
if (f = c + this._rDelay, this._repeat < -1 && l)
|
|
1136
|
+
return this.totalTime(f * 100 + i, n, a);
|
|
1137
|
+
if (_ = Q(d % f), d === u ? (m = this._repeat, _ = c) : (p = Q(d / f), m = ~~p, m && m === p ? (_ = c, m--) : _ > c && (_ = c)), g = this._yoyo && m & 1, g && (x = this._yEase, _ = c - _), p = ke(this._tTime, f), _ === s && !a && this._initted && m === p)
|
|
1138
|
+
return this._tTime = d, this;
|
|
1139
|
+
m !== p && (y && this._yEase && Yi(y, g), this.vars.repeatRefresh && !g && !this._lock && _ !== f && this._initted && (this._lock = a = 1, this.render(Q(f * m), !0).invalidate()._lock = 0));
|
|
1140
|
+
}
|
|
1141
|
+
if (!this._initted) {
|
|
1142
|
+
if (Ai(this, l ? i : _, a, n, d))
|
|
1143
|
+
return this._tTime = 0, this;
|
|
1144
|
+
if (s !== this._time && !(a && this.vars.repeatRefresh && m !== p))
|
|
1145
|
+
return this;
|
|
1146
|
+
if (c !== this._dur)
|
|
1147
|
+
return this.render(i, n, a);
|
|
1148
|
+
}
|
|
1149
|
+
if (this._tTime = d, this._time = _, !this._act && this._ts && (this._act = 1, this._lazy = 0), this.ratio = b = (x || this._ease)(_ / c), this._from && (this.ratio = b = 1 - b), !s && d && !n && !p && (kt(this, "onStart"), this._tTime !== d))
|
|
1150
|
+
return this;
|
|
1151
|
+
for (h = this._pt; h; )
|
|
1152
|
+
h.r(b, h.d), h = h._next;
|
|
1153
|
+
y && y.render(i < 0 ? i : y._dur * y._ease(_ / this._dur), n, a) || this._startAt && (this._zTime = i), this._onUpdate && !n && (l && gr(this, i, n, a), kt(this, "onUpdate")), this._repeat && m !== p && this.vars.onRepeat && !n && this.parent && kt(this, "onRepeat"), (d === this._tDur || !d) && this._tTime === d && (l && !this._onUpdate && gr(this, i, !0, !0), (i || !c) && (d === this._tDur && this._ts > 0 || !d && this._ts < 0) && Yt(this, 1), !n && !(l && !s) && (d || s || g) && (kt(this, d === u ? "onComplete" : "onReverseComplete", !0), this._prom && !(d < u && this.timeScale() > 0) && this._prom()));
|
|
1154
|
+
}
|
|
1155
|
+
return this;
|
|
1156
|
+
}, e.targets = function() {
|
|
1157
|
+
return this._targets;
|
|
1158
|
+
}, e.invalidate = function(i) {
|
|
1159
|
+
return (!i || !this.vars.runBackwards) && (this._startAt = 0), this._pt = this._op = this._onUpdate = this._lazy = this.ratio = 0, this._ptLookup = [], this.timeline && this.timeline.invalidate(i), o.prototype.invalidate.call(this, i);
|
|
1160
|
+
}, e.resetTo = function(i, n, a, s, u) {
|
|
1161
|
+
Fe || xt.wake(), this._ts || this.play();
|
|
1162
|
+
var c = Math.min(this._dur, (this._dp._time - this._start) * this._ts), l;
|
|
1163
|
+
return this._initted || Nr(this, c), l = this._ease(c / this._dur), ca(this, i, n, a, s, l, c, u) ? this.resetTo(i, n, a, s, 1) : (ar(this, 0), this.parent || Oi(this._dp, this, "_first", "_last", this._dp._sort ? "_start" : 0), this.render(0));
|
|
1164
|
+
}, e.kill = function(i, n) {
|
|
1165
|
+
if (n === void 0 && (n = "all"), !i && (!n || n === "all"))
|
|
1166
|
+
return this._lazy = this._pt = 0, this.parent ? Re(this) : this.scrollTrigger && this.scrollTrigger.kill(!!at), this;
|
|
1167
|
+
if (this.timeline) {
|
|
1168
|
+
var a = this.timeline.totalDuration();
|
|
1169
|
+
return this.timeline.killTweensOf(i, n, It && It.vars.overwrite !== !0)._first || Re(this), this.parent && a !== this.timeline.totalDuration() && Te(this, this._dur * this.timeline._tDur / a, 0, 1), this;
|
|
1170
|
+
}
|
|
1171
|
+
var s = this._targets, u = i ? Mt(i) : s, c = this._ptLookup, l = this._pt, d, _, h, m, f, p, g;
|
|
1172
|
+
if ((!n || n === "all") && Nn(s, u))
|
|
1173
|
+
return n === "all" && (this._pt = 0), Re(this);
|
|
1174
|
+
for (d = this._op = this._op || [], n !== "all" && (it(n) && (f = {}, _t(n, function(b) {
|
|
1175
|
+
return f[b] = 1;
|
|
1176
|
+
}), n = f), n = fa(s, n)), g = s.length; g--; )
|
|
1177
|
+
if (~u.indexOf(s[g])) {
|
|
1178
|
+
_ = c[g], n === "all" ? (d[g] = n, m = _, h = {}) : (h = d[g] = d[g] || {}, m = n);
|
|
1179
|
+
for (f in m)
|
|
1180
|
+
p = _ && _[f], p && ((!("kill" in p.d) || p.d.kill(f) === !0) && ir(this, p, "_pt"), delete _[f]), h !== "all" && (h[f] = 1);
|
|
1181
|
+
}
|
|
1182
|
+
return this._initted && !this._pt && l && Re(this), this;
|
|
1183
|
+
}, t.to = function(i, n) {
|
|
1184
|
+
return new t(i, n, arguments[2]);
|
|
1185
|
+
}, t.from = function(i, n) {
|
|
1186
|
+
return De(1, arguments);
|
|
1187
|
+
}, t.delayedCall = function(i, n, a, s) {
|
|
1188
|
+
return new t(n, 0, {
|
|
1189
|
+
immediateRender: !1,
|
|
1190
|
+
lazy: !1,
|
|
1191
|
+
overwrite: !1,
|
|
1192
|
+
delay: i,
|
|
1193
|
+
onComplete: n,
|
|
1194
|
+
onReverseComplete: n,
|
|
1195
|
+
onCompleteParams: a,
|
|
1196
|
+
onReverseCompleteParams: a,
|
|
1197
|
+
callbackScope: s
|
|
1198
|
+
});
|
|
1199
|
+
}, t.fromTo = function(i, n, a) {
|
|
1200
|
+
return De(2, arguments);
|
|
1201
|
+
}, t.set = function(i, n) {
|
|
1202
|
+
return n.duration = 0, n.repeatDelay || (n.repeat = 0), new t(i, n);
|
|
1203
|
+
}, t.killTweensOf = function(i, n, a) {
|
|
1204
|
+
return H.killTweensOf(i, n, a);
|
|
1205
|
+
}, t;
|
|
1206
|
+
}(qe);
|
|
1207
|
+
St(tt.prototype, {
|
|
1208
|
+
_targets: [],
|
|
1209
|
+
_lazy: 0,
|
|
1210
|
+
_startAt: 0,
|
|
1211
|
+
_op: 0,
|
|
1212
|
+
_onInit: 0
|
|
1213
|
+
});
|
|
1214
|
+
_t("staggerTo,staggerFrom,staggerFromTo", function(o) {
|
|
1215
|
+
tt[o] = function() {
|
|
1216
|
+
var t = new ft(), e = yr.call(arguments, 0);
|
|
1217
|
+
return e.splice(o === "staggerFromTo" ? 5 : 4, 0, 0), t[o].apply(t, e);
|
|
1218
|
+
};
|
|
1219
|
+
});
|
|
1220
|
+
var $r = function(t, e, r) {
|
|
1221
|
+
return t[e] = r;
|
|
1222
|
+
}, Ki = function(t, e, r) {
|
|
1223
|
+
return t[e](r);
|
|
1224
|
+
}, ha = function(t, e, r, i) {
|
|
1225
|
+
return t[e](i.fp, r);
|
|
1226
|
+
}, _a = function(t, e, r) {
|
|
1227
|
+
return t.setAttribute(e, r);
|
|
1228
|
+
}, Xr = function(t, e) {
|
|
1229
|
+
return K(t[e]) ? Ki : Ar(t[e]) && t.setAttribute ? _a : $r;
|
|
1230
|
+
}, Ji = function(t, e) {
|
|
1231
|
+
return e.set(e.t, e.p, Math.round((e.s + e.c * t) * 1e6) / 1e6, e);
|
|
1232
|
+
}, pa = function(t, e) {
|
|
1233
|
+
return e.set(e.t, e.p, !!(e.s + e.c * t), e);
|
|
1234
|
+
}, tn = function(t, e) {
|
|
1235
|
+
var r = e._pt, i = "";
|
|
1236
|
+
if (!t && e.b)
|
|
1237
|
+
i = e.b;
|
|
1238
|
+
else if (t === 1 && e.e)
|
|
1239
|
+
i = e.e;
|
|
1240
|
+
else {
|
|
1241
|
+
for (; r; )
|
|
1242
|
+
i = r.p + (r.m ? r.m(r.s + r.c * t) : Math.round((r.s + r.c * t) * 1e4) / 1e4) + i, r = r._next;
|
|
1243
|
+
i += e.c;
|
|
1244
|
+
}
|
|
1245
|
+
e.set(e.t, e.p, i, e);
|
|
1246
|
+
}, Ur = function(t, e) {
|
|
1247
|
+
for (var r = e._pt; r; )
|
|
1248
|
+
r.r(t, r.d), r = r._next;
|
|
1249
|
+
}, ma = function(t, e, r, i) {
|
|
1250
|
+
for (var n = this._pt, a; n; )
|
|
1251
|
+
a = n._next, n.p === i && n.modifier(t, e, r), n = a;
|
|
1252
|
+
}, ga = function(t) {
|
|
1253
|
+
for (var e = this._pt, r, i; e; )
|
|
1254
|
+
i = e._next, e.p === t && !e.op || e.op === t ? ir(this, e, "_pt") : e.dep || (r = 1), e = i;
|
|
1255
|
+
return !r;
|
|
1256
|
+
}, va = function(t, e, r, i) {
|
|
1257
|
+
i.mSet(t, e, i.m.call(i.tween, r, i.mt), i);
|
|
1258
|
+
}, en = function(t) {
|
|
1259
|
+
for (var e = t._pt, r, i, n, a; e; ) {
|
|
1260
|
+
for (r = e._next, i = n; i && i.pr > e.pr; )
|
|
1261
|
+
i = i._next;
|
|
1262
|
+
(e._prev = i ? i._prev : a) ? e._prev._next = e : n = e, (e._next = i) ? i._prev = e : a = e, e = r;
|
|
1263
|
+
}
|
|
1264
|
+
t._pt = n;
|
|
1265
|
+
}, pt = /* @__PURE__ */ function() {
|
|
1266
|
+
function o(e, r, i, n, a, s, u, c, l) {
|
|
1267
|
+
this.t = r, this.s = n, this.c = a, this.p = i, this.r = s || Ji, this.d = u || this, this.set = c || $r, this.pr = l || 0, this._next = e, e && (e._prev = this);
|
|
1268
|
+
}
|
|
1269
|
+
var t = o.prototype;
|
|
1270
|
+
return t.modifier = function(r, i, n) {
|
|
1271
|
+
this.mSet = this.mSet || this.set, this.set = va, this.m = r, this.mt = n, this.tween = i;
|
|
1272
|
+
}, o;
|
|
1273
|
+
}();
|
|
1274
|
+
_t(qr + "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger", function(o) {
|
|
1275
|
+
return Fr[o] = 1;
|
|
1276
|
+
});
|
|
1277
|
+
Ct.TweenMax = Ct.TweenLite = tt;
|
|
1278
|
+
Ct.TimelineLite = Ct.TimelineMax = ft;
|
|
1279
|
+
H = new ft({
|
|
1280
|
+
sortChildren: !1,
|
|
1281
|
+
defaults: be,
|
|
1282
|
+
autoRemoveChildren: !0,
|
|
1283
|
+
id: "root",
|
|
1284
|
+
smoothChildTiming: !0
|
|
1285
|
+
});
|
|
1286
|
+
wt.stringFilter = Ui;
|
|
1287
|
+
var ne = [], Ye = {}, ya = [], ni = 0, ba = 0, fr = function(t) {
|
|
1288
|
+
return (Ye[t] || ya).map(function(e) {
|
|
1289
|
+
return e();
|
|
1290
|
+
});
|
|
1291
|
+
}, Tr = function() {
|
|
1292
|
+
var t = Date.now(), e = [];
|
|
1293
|
+
t - ni > 2 && (fr("matchMediaInit"), ne.forEach(function(r) {
|
|
1294
|
+
var i = r.queries, n = r.conditions, a, s, u, c;
|
|
1295
|
+
for (s in i)
|
|
1296
|
+
a = Dt.matchMedia(i[s]).matches, a && (u = 1), a !== n[s] && (n[s] = a, c = 1);
|
|
1297
|
+
c && (r.revert(), u && e.push(r));
|
|
1298
|
+
}), fr("matchMediaRevert"), e.forEach(function(r) {
|
|
1299
|
+
return r.onMatch(r, function(i) {
|
|
1300
|
+
return r.add(null, i);
|
|
1301
|
+
});
|
|
1302
|
+
}), ni = t, fr("matchMedia"));
|
|
1303
|
+
}, rn = /* @__PURE__ */ function() {
|
|
1304
|
+
function o(e, r) {
|
|
1305
|
+
this.selector = r && br(r), this.data = [], this._r = [], this.isReverted = !1, this.id = ba++, e && this.add(e);
|
|
1306
|
+
}
|
|
1307
|
+
var t = o.prototype;
|
|
1308
|
+
return t.add = function(r, i, n) {
|
|
1309
|
+
K(r) && (n = i, i = r, r = K);
|
|
1310
|
+
var a = this, s = function() {
|
|
1311
|
+
var c = j, l = a.selector, d;
|
|
1312
|
+
return c && c !== a && c.data.push(a), n && (a.selector = br(n)), j = a, d = i.apply(a, arguments), K(d) && a._r.push(d), j = c, a.selector = l, a.isReverted = !1, d;
|
|
1313
|
+
};
|
|
1314
|
+
return a.last = s, r === K ? s(a, function(u) {
|
|
1315
|
+
return a.add(null, u);
|
|
1316
|
+
}) : r ? a[r] = s : s;
|
|
1317
|
+
}, t.ignore = function(r) {
|
|
1318
|
+
var i = j;
|
|
1319
|
+
j = null, r(this), j = i;
|
|
1320
|
+
}, t.getTweens = function() {
|
|
1321
|
+
var r = [];
|
|
1322
|
+
return this.data.forEach(function(i) {
|
|
1323
|
+
return i instanceof o ? r.push.apply(r, i.getTweens()) : i instanceof tt && !(i.parent && i.parent.data === "nested") && r.push(i);
|
|
1324
|
+
}), r;
|
|
1325
|
+
}, t.clear = function() {
|
|
1326
|
+
this._r.length = this.data.length = 0;
|
|
1327
|
+
}, t.kill = function(r, i) {
|
|
1328
|
+
var n = this;
|
|
1329
|
+
if (r ? function() {
|
|
1330
|
+
for (var s = n.getTweens(), u = n.data.length, c; u--; )
|
|
1331
|
+
c = n.data[u], c.data === "isFlip" && (c.revert(), c.getChildren(!0, !0, !1).forEach(function(l) {
|
|
1332
|
+
return s.splice(s.indexOf(l), 1);
|
|
1333
|
+
}));
|
|
1334
|
+
for (s.map(function(l) {
|
|
1335
|
+
return {
|
|
1336
|
+
g: l._dur || l._delay || l._sat && !l._sat.vars.immediateRender ? l.globalTime(0) : -1 / 0,
|
|
1337
|
+
t: l
|
|
1338
|
+
};
|
|
1339
|
+
}).sort(function(l, d) {
|
|
1340
|
+
return d.g - l.g || -1 / 0;
|
|
1341
|
+
}).forEach(function(l) {
|
|
1342
|
+
return l.t.revert(r);
|
|
1343
|
+
}), u = n.data.length; u--; )
|
|
1344
|
+
c = n.data[u], c instanceof ft ? c.data !== "nested" && (c.scrollTrigger && c.scrollTrigger.revert(), c.kill()) : !(c instanceof tt) && c.revert && c.revert(r);
|
|
1345
|
+
n._r.forEach(function(l) {
|
|
1346
|
+
return l(r, n);
|
|
1347
|
+
}), n.isReverted = !0;
|
|
1348
|
+
}() : this.data.forEach(function(s) {
|
|
1349
|
+
return s.kill && s.kill();
|
|
1350
|
+
}), this.clear(), i)
|
|
1351
|
+
for (var a = ne.length; a--; )
|
|
1352
|
+
ne[a].id === this.id && ne.splice(a, 1);
|
|
1353
|
+
}, t.revert = function(r) {
|
|
1354
|
+
this.kill(r || {});
|
|
1355
|
+
}, o;
|
|
1356
|
+
}(), xa = /* @__PURE__ */ function() {
|
|
1357
|
+
function o(e) {
|
|
1358
|
+
this.contexts = [], this.scope = e, j && j.data.push(this);
|
|
1359
|
+
}
|
|
1360
|
+
var t = o.prototype;
|
|
1361
|
+
return t.add = function(r, i, n) {
|
|
1362
|
+
zt(r) || (r = {
|
|
1363
|
+
matches: r
|
|
1364
|
+
});
|
|
1365
|
+
var a = new rn(0, n || this.scope), s = a.conditions = {}, u, c, l;
|
|
1366
|
+
j && !a.selector && (a.selector = j.selector), this.contexts.push(a), i = a.add("onMatch", i), a.queries = r;
|
|
1367
|
+
for (c in r)
|
|
1368
|
+
c === "all" ? l = 1 : (u = Dt.matchMedia(r[c]), u && (ne.indexOf(a) < 0 && ne.push(a), (s[c] = u.matches) && (l = 1), u.addListener ? u.addListener(Tr) : u.addEventListener("change", Tr)));
|
|
1369
|
+
return l && i(a, function(d) {
|
|
1370
|
+
return a.add(null, d);
|
|
1371
|
+
}), this;
|
|
1372
|
+
}, t.revert = function(r) {
|
|
1373
|
+
this.kill(r || {});
|
|
1374
|
+
}, t.kill = function(r) {
|
|
1375
|
+
this.contexts.forEach(function(i) {
|
|
1376
|
+
return i.kill(r, !0);
|
|
1377
|
+
});
|
|
1378
|
+
}, o;
|
|
1379
|
+
}(), Ze = {
|
|
1380
|
+
registerPlugin: function() {
|
|
1381
|
+
for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++)
|
|
1382
|
+
e[r] = arguments[r];
|
|
1383
|
+
e.forEach(function(i) {
|
|
1384
|
+
return Ni(i);
|
|
1385
|
+
});
|
|
1386
|
+
},
|
|
1387
|
+
timeline: function(t) {
|
|
1388
|
+
return new ft(t);
|
|
1389
|
+
},
|
|
1390
|
+
getTweensOf: function(t, e) {
|
|
1391
|
+
return H.getTweensOf(t, e);
|
|
1392
|
+
},
|
|
1393
|
+
getProperty: function(t, e, r, i) {
|
|
1394
|
+
it(t) && (t = Mt(t)[0]);
|
|
1395
|
+
var n = ee(t || {}).get, a = r ? Ri : Pi;
|
|
1396
|
+
return r === "native" && (r = ""), t && (e ? a((yt[e] && yt[e].get || n)(t, e, r, i)) : function(s, u, c) {
|
|
1397
|
+
return a((yt[s] && yt[s].get || n)(t, s, u, c));
|
|
1398
|
+
});
|
|
1399
|
+
},
|
|
1400
|
+
quickSetter: function(t, e, r) {
|
|
1401
|
+
if (t = Mt(t), t.length > 1) {
|
|
1402
|
+
var i = t.map(function(l) {
|
|
1403
|
+
return gt.quickSetter(l, e, r);
|
|
1404
|
+
}), n = i.length;
|
|
1405
|
+
return function(l) {
|
|
1406
|
+
for (var d = n; d--; )
|
|
1407
|
+
i[d](l);
|
|
1408
|
+
};
|
|
1409
|
+
}
|
|
1410
|
+
t = t[0] || {};
|
|
1411
|
+
var a = yt[e], s = ee(t), u = s.harness && (s.harness.aliases || {})[e] || e, c = a ? function(l) {
|
|
1412
|
+
var d = new a();
|
|
1413
|
+
_e._pt = 0, d.init(t, r ? l + r : l, _e, 0, [t]), d.render(1, d), _e._pt && Ur(1, _e);
|
|
1414
|
+
} : s.set(t, u);
|
|
1415
|
+
return a ? c : function(l) {
|
|
1416
|
+
return c(t, u, r ? l + r : l, s, 1);
|
|
1417
|
+
};
|
|
1418
|
+
},
|
|
1419
|
+
quickTo: function(t, e, r) {
|
|
1420
|
+
var i, n = gt.to(t, St((i = {}, i[e] = "+=0.1", i.paused = !0, i.stagger = 0, i), r || {})), a = function(u, c, l) {
|
|
1421
|
+
return n.resetTo(e, u, c, l);
|
|
1422
|
+
};
|
|
1423
|
+
return a.tween = n, a;
|
|
1424
|
+
},
|
|
1425
|
+
isTweening: function(t) {
|
|
1426
|
+
return H.getTweensOf(t, !0).length > 0;
|
|
1427
|
+
},
|
|
1428
|
+
defaults: function(t) {
|
|
1429
|
+
return t && t.ease && (t.ease = ie(t.ease, be.ease)), Jr(be, t || {});
|
|
1430
|
+
},
|
|
1431
|
+
config: function(t) {
|
|
1432
|
+
return Jr(wt, t || {});
|
|
1433
|
+
},
|
|
1434
|
+
registerEffect: function(t) {
|
|
1435
|
+
var e = t.name, r = t.effect, i = t.plugins, n = t.defaults, a = t.extendTimeline;
|
|
1436
|
+
(i || "").split(",").forEach(function(s) {
|
|
1437
|
+
return s && !yt[s] && !Ct[s] && Ee(e + " effect requires " + s + " plugin.");
|
|
1438
|
+
}), or[e] = function(s, u, c) {
|
|
1439
|
+
return r(Mt(s), St(u || {}, n), c);
|
|
1440
|
+
}, a && (ft.prototype[e] = function(s, u, c) {
|
|
1441
|
+
return this.add(or[e](s, zt(u) ? u : (c = u) && {}, this), c);
|
|
1442
|
+
});
|
|
1443
|
+
},
|
|
1444
|
+
registerEase: function(t, e) {
|
|
1445
|
+
X[t] = ie(e);
|
|
1446
|
+
},
|
|
1447
|
+
parseEase: function(t, e) {
|
|
1448
|
+
return arguments.length ? ie(t, e) : X;
|
|
1449
|
+
},
|
|
1450
|
+
getById: function(t) {
|
|
1451
|
+
return H.getById(t);
|
|
1452
|
+
},
|
|
1453
|
+
exportRoot: function(t, e) {
|
|
1454
|
+
t === void 0 && (t = {});
|
|
1455
|
+
var r = new ft(t), i, n;
|
|
1456
|
+
for (r.smoothChildTiming = ht(t.smoothChildTiming), H.remove(r), r._dp = 0, r._time = r._tTime = H._time, i = H._first; i; )
|
|
1457
|
+
n = i._next, (e || !(!i._dur && i instanceof tt && i.vars.onComplete === i._targets[0])) && At(r, i, i._start - i._delay), i = n;
|
|
1458
|
+
return At(H, r, 0), r;
|
|
1459
|
+
},
|
|
1460
|
+
context: function(t, e) {
|
|
1461
|
+
return t ? new rn(t, e) : j;
|
|
1462
|
+
},
|
|
1463
|
+
matchMedia: function(t) {
|
|
1464
|
+
return new xa(t);
|
|
1465
|
+
},
|
|
1466
|
+
matchMediaRefresh: function() {
|
|
1467
|
+
return ne.forEach(function(t) {
|
|
1468
|
+
var e = t.conditions, r, i;
|
|
1469
|
+
for (i in e)
|
|
1470
|
+
e[i] && (e[i] = !1, r = 1);
|
|
1471
|
+
r && t.revert();
|
|
1472
|
+
}) || Tr();
|
|
1473
|
+
},
|
|
1474
|
+
addEventListener: function(t, e) {
|
|
1475
|
+
var r = Ye[t] || (Ye[t] = []);
|
|
1476
|
+
~r.indexOf(e) || r.push(e);
|
|
1477
|
+
},
|
|
1478
|
+
removeEventListener: function(t, e) {
|
|
1479
|
+
var r = Ye[t], i = r && r.indexOf(e);
|
|
1480
|
+
i >= 0 && r.splice(i, 1);
|
|
1481
|
+
},
|
|
1482
|
+
utils: {
|
|
1483
|
+
wrap: Jn,
|
|
1484
|
+
wrapYoyo: ta,
|
|
1485
|
+
distribute: zi,
|
|
1486
|
+
random: qi,
|
|
1487
|
+
snap: Fi,
|
|
1488
|
+
normalize: Kn,
|
|
1489
|
+
getUnit: lt,
|
|
1490
|
+
clamp: jn,
|
|
1491
|
+
splitColor: $i,
|
|
1492
|
+
toArray: Mt,
|
|
1493
|
+
selector: br,
|
|
1494
|
+
mapRange: Li,
|
|
1495
|
+
pipe: Hn,
|
|
1496
|
+
unitize: Zn,
|
|
1497
|
+
interpolate: ea,
|
|
1498
|
+
shuffle: Bi
|
|
1499
|
+
},
|
|
1500
|
+
install: ki,
|
|
1501
|
+
effects: or,
|
|
1502
|
+
ticker: xt,
|
|
1503
|
+
updateRoot: ft.updateRoot,
|
|
1504
|
+
plugins: yt,
|
|
1505
|
+
globalTimeline: H,
|
|
1506
|
+
core: {
|
|
1507
|
+
PropTween: pt,
|
|
1508
|
+
globals: Ti,
|
|
1509
|
+
Tween: tt,
|
|
1510
|
+
Timeline: ft,
|
|
1511
|
+
Animation: qe,
|
|
1512
|
+
getCache: ee,
|
|
1513
|
+
_removeLinkedListItem: ir,
|
|
1514
|
+
reverting: function() {
|
|
1515
|
+
return at;
|
|
1516
|
+
},
|
|
1517
|
+
context: function(t) {
|
|
1518
|
+
return t && j && (j.data.push(t), t._ctx = j), j;
|
|
1519
|
+
},
|
|
1520
|
+
suppressOverwrites: function(t) {
|
|
1521
|
+
return Dr = t;
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
};
|
|
1525
|
+
_t("to,from,fromTo,delayedCall,set,killTweensOf", function(o) {
|
|
1526
|
+
return Ze[o] = tt[o];
|
|
1527
|
+
});
|
|
1528
|
+
xt.add(ft.updateRoot);
|
|
1529
|
+
_e = Ze.to({}, {
|
|
1530
|
+
duration: 0
|
|
1531
|
+
});
|
|
1532
|
+
var ka = function(t, e) {
|
|
1533
|
+
for (var r = t._pt; r && r.p !== e && r.op !== e && r.fp !== e; )
|
|
1534
|
+
r = r._next;
|
|
1535
|
+
return r;
|
|
1536
|
+
}, Ta = function(t, e) {
|
|
1537
|
+
var r = t._targets, i, n, a;
|
|
1538
|
+
for (i in e)
|
|
1539
|
+
for (n = r.length; n--; )
|
|
1540
|
+
a = t._ptLookup[n][i], a && (a = a.d) && (a._pt && (a = ka(a, i)), a && a.modifier && a.modifier(e[i], t, r[n], i));
|
|
1541
|
+
}, dr = function(t, e) {
|
|
1542
|
+
return {
|
|
1543
|
+
name: t,
|
|
1544
|
+
headless: 1,
|
|
1545
|
+
rawVars: 1,
|
|
1546
|
+
//don't pre-process function-based values or "random()" strings.
|
|
1547
|
+
init: function(i, n, a) {
|
|
1548
|
+
a._onInit = function(s) {
|
|
1549
|
+
var u, c;
|
|
1550
|
+
if (it(n) && (u = {}, _t(n, function(l) {
|
|
1551
|
+
return u[l] = 1;
|
|
1552
|
+
}), n = u), e) {
|
|
1553
|
+
u = {};
|
|
1554
|
+
for (c in n)
|
|
1555
|
+
u[c] = e(n[c]);
|
|
1556
|
+
n = u;
|
|
1557
|
+
}
|
|
1558
|
+
Ta(s, n);
|
|
1559
|
+
};
|
|
1560
|
+
}
|
|
1561
|
+
};
|
|
1562
|
+
}, gt = Ze.registerPlugin({
|
|
1563
|
+
name: "attr",
|
|
1564
|
+
init: function(t, e, r, i, n) {
|
|
1565
|
+
var a, s, u;
|
|
1566
|
+
this.tween = r;
|
|
1567
|
+
for (a in e)
|
|
1568
|
+
u = t.getAttribute(a) || "", s = this.add(t, "setAttribute", (u || 0) + "", e[a], i, n, 0, 0, a), s.op = a, s.b = u, this._props.push(a);
|
|
1569
|
+
},
|
|
1570
|
+
render: function(t, e) {
|
|
1571
|
+
for (var r = e._pt; r; )
|
|
1572
|
+
at ? r.set(r.t, r.p, r.b, r) : r.r(t, r.d), r = r._next;
|
|
1573
|
+
}
|
|
1574
|
+
}, {
|
|
1575
|
+
name: "endArray",
|
|
1576
|
+
headless: 1,
|
|
1577
|
+
init: function(t, e) {
|
|
1578
|
+
for (var r = e.length; r--; )
|
|
1579
|
+
this.add(t, r, t[r] || 0, e[r], 0, 0, 0, 0, 0, 1);
|
|
1580
|
+
}
|
|
1581
|
+
}, dr("roundProps", xr), dr("modifiers"), dr("snap", Fi)) || Ze;
|
|
1582
|
+
tt.version = ft.version = gt.version = "3.14.2";
|
|
1583
|
+
xi = 1;
|
|
1584
|
+
Er() && we();
|
|
1585
|
+
X.Power0;
|
|
1586
|
+
X.Power1;
|
|
1587
|
+
X.Power2;
|
|
1588
|
+
X.Power3;
|
|
1589
|
+
X.Power4;
|
|
1590
|
+
X.Linear;
|
|
1591
|
+
X.Quad;
|
|
1592
|
+
X.Cubic;
|
|
1593
|
+
X.Quart;
|
|
1594
|
+
X.Quint;
|
|
1595
|
+
X.Strong;
|
|
1596
|
+
X.Elastic;
|
|
1597
|
+
X.Back;
|
|
1598
|
+
X.SteppedEase;
|
|
1599
|
+
X.Bounce;
|
|
1600
|
+
X.Sine;
|
|
1601
|
+
X.Expo;
|
|
1602
|
+
X.Circ;
|
|
1603
|
+
/*!
|
|
1604
|
+
* CSSPlugin 3.14.2
|
|
1605
|
+
* https://gsap.com
|
|
1606
|
+
*
|
|
1607
|
+
* Copyright 2008-2025, GreenSock. All rights reserved.
|
|
1608
|
+
* Subject to the terms at https://gsap.com/standard-license
|
|
1609
|
+
* @author: Jack Doyle, jack@greensock.com
|
|
1610
|
+
*/
|
|
1611
|
+
var ai, Nt, me, Wr, te, si, Yr, wa = function() {
|
|
1612
|
+
return typeof window < "u";
|
|
1613
|
+
}, Lt = {}, Jt = 180 / Math.PI, ge = Math.PI / 180, de = Math.atan2, oi = 1e8, Gr = /([A-Z])/g, Ca = /(left|right|width|margin|padding|x)/i, Sa = /[\s,\(]\S/, Et = {
|
|
1614
|
+
autoAlpha: "opacity,visibility",
|
|
1615
|
+
scale: "scaleX,scaleY",
|
|
1616
|
+
alpha: "opacity"
|
|
1617
|
+
}, wr = function(t, e) {
|
|
1618
|
+
return e.set(e.t, e.p, Math.round((e.s + e.c * t) * 1e4) / 1e4 + e.u, e);
|
|
1619
|
+
}, Pa = function(t, e) {
|
|
1620
|
+
return e.set(e.t, e.p, t === 1 ? e.e : Math.round((e.s + e.c * t) * 1e4) / 1e4 + e.u, e);
|
|
1621
|
+
}, Ra = function(t, e) {
|
|
1622
|
+
return e.set(e.t, e.p, t ? Math.round((e.s + e.c * t) * 1e4) / 1e4 + e.u : e.b, e);
|
|
1623
|
+
}, Oa = function(t, e) {
|
|
1624
|
+
return e.set(e.t, e.p, t === 1 ? e.e : t ? Math.round((e.s + e.c * t) * 1e4) / 1e4 + e.u : e.b, e);
|
|
1625
|
+
}, Ma = function(t, e) {
|
|
1626
|
+
var r = e.s + e.c * t;
|
|
1627
|
+
e.set(e.t, e.p, ~~(r + (r < 0 ? -0.5 : 0.5)) + e.u, e);
|
|
1628
|
+
}, nn = function(t, e) {
|
|
1629
|
+
return e.set(e.t, e.p, t ? e.e : e.b, e);
|
|
1630
|
+
}, an = function(t, e) {
|
|
1631
|
+
return e.set(e.t, e.p, t !== 1 ? e.b : e.e, e);
|
|
1632
|
+
}, Da = function(t, e, r) {
|
|
1633
|
+
return t.style[e] = r;
|
|
1634
|
+
}, Aa = function(t, e, r) {
|
|
1635
|
+
return t.style.setProperty(e, r);
|
|
1636
|
+
}, Ea = function(t, e, r) {
|
|
1637
|
+
return t._gsap[e] = r;
|
|
1638
|
+
}, Ba = function(t, e, r) {
|
|
1639
|
+
return t._gsap.scaleX = t._gsap.scaleY = r;
|
|
1640
|
+
}, za = function(t, e, r, i, n) {
|
|
1641
|
+
var a = t._gsap;
|
|
1642
|
+
a.scaleX = a.scaleY = r, a.renderTransform(n, a);
|
|
1643
|
+
}, Fa = function(t, e, r, i, n) {
|
|
1644
|
+
var a = t._gsap;
|
|
1645
|
+
a[e] = r, a.renderTransform(n, a);
|
|
1646
|
+
}, Z = "transform", mt = Z + "Origin", qa = function o(t, e) {
|
|
1647
|
+
var r = this, i = this.target, n = i.style, a = i._gsap;
|
|
1648
|
+
if (t in Lt && n) {
|
|
1649
|
+
if (this.tfm = this.tfm || {}, t !== "transform")
|
|
1650
|
+
t = Et[t] || t, ~t.indexOf(",") ? t.split(",").forEach(function(s) {
|
|
1651
|
+
return r.tfm[s] = qt(i, s);
|
|
1652
|
+
}) : this.tfm[t] = a.x ? a[t] : qt(i, t), t === mt && (this.tfm.zOrigin = a.zOrigin);
|
|
1653
|
+
else
|
|
1654
|
+
return Et.transform.split(",").forEach(function(s) {
|
|
1655
|
+
return o.call(r, s, e);
|
|
1656
|
+
});
|
|
1657
|
+
if (this.props.indexOf(Z) >= 0)
|
|
1658
|
+
return;
|
|
1659
|
+
a.svg && (this.svgo = i.getAttribute("data-svg-origin"), this.props.push(mt, e, "")), t = Z;
|
|
1660
|
+
}
|
|
1661
|
+
(n || e) && this.props.push(t, e, n[t]);
|
|
1662
|
+
}, sn = function(t) {
|
|
1663
|
+
t.translate && (t.removeProperty("translate"), t.removeProperty("scale"), t.removeProperty("rotate"));
|
|
1664
|
+
}, Va = function() {
|
|
1665
|
+
var t = this.props, e = this.target, r = e.style, i = e._gsap, n, a;
|
|
1666
|
+
for (n = 0; n < t.length; n += 3)
|
|
1667
|
+
t[n + 1] ? t[n + 1] === 2 ? e[t[n]](t[n + 2]) : e[t[n]] = t[n + 2] : t[n + 2] ? r[t[n]] = t[n + 2] : r.removeProperty(t[n].substr(0, 2) === "--" ? t[n] : t[n].replace(Gr, "-$1").toLowerCase());
|
|
1668
|
+
if (this.tfm) {
|
|
1669
|
+
for (a in this.tfm)
|
|
1670
|
+
i[a] = this.tfm[a];
|
|
1671
|
+
i.svg && (i.renderTransform(), e.setAttribute("data-svg-origin", this.svgo || "")), n = Yr(), (!n || !n.isStart) && !r[Z] && (sn(r), i.zOrigin && r[mt] && (r[mt] += " " + i.zOrigin + "px", i.zOrigin = 0, i.renderTransform()), i.uncache = 1);
|
|
1672
|
+
}
|
|
1673
|
+
}, on = function(t, e) {
|
|
1674
|
+
var r = {
|
|
1675
|
+
target: t,
|
|
1676
|
+
props: [],
|
|
1677
|
+
revert: Va,
|
|
1678
|
+
save: qa
|
|
1679
|
+
};
|
|
1680
|
+
return t._gsap || gt.core.getCache(t), e && t.style && t.nodeType && e.split(",").forEach(function(i) {
|
|
1681
|
+
return r.save(i);
|
|
1682
|
+
}), r;
|
|
1683
|
+
}, ln, Cr = function(t, e) {
|
|
1684
|
+
var r = Nt.createElementNS ? Nt.createElementNS((e || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), t) : Nt.createElement(t);
|
|
1685
|
+
return r && r.style ? r : Nt.createElement(t);
|
|
1686
|
+
}, Tt = function o(t, e, r) {
|
|
1687
|
+
var i = getComputedStyle(t);
|
|
1688
|
+
return i[e] || i.getPropertyValue(e.replace(Gr, "-$1").toLowerCase()) || i.getPropertyValue(e) || !r && o(t, Ce(e) || e, 1) || "";
|
|
1689
|
+
}, li = "O,Moz,ms,Ms,Webkit".split(","), Ce = function(t, e, r) {
|
|
1690
|
+
var i = e || te, n = i.style, a = 5;
|
|
1691
|
+
if (t in n && !r)
|
|
1692
|
+
return t;
|
|
1693
|
+
for (t = t.charAt(0).toUpperCase() + t.substr(1); a-- && !(li[a] + t in n); )
|
|
1694
|
+
;
|
|
1695
|
+
return a < 0 ? null : (a === 3 ? "ms" : a >= 0 ? li[a] : "") + t;
|
|
1696
|
+
}, Sr = function() {
|
|
1697
|
+
wa() && window.document && (ai = window, Nt = ai.document, me = Nt.documentElement, te = Cr("div") || {
|
|
1698
|
+
style: {}
|
|
1699
|
+
}, Cr("div"), Z = Ce(Z), mt = Z + "Origin", te.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0", ln = !!Ce("perspective"), Yr = gt.core.reverting, Wr = 1);
|
|
1700
|
+
}, ui = function(t) {
|
|
1701
|
+
var e = t.ownerSVGElement, r = Cr("svg", e && e.getAttribute("xmlns") || "http://www.w3.org/2000/svg"), i = t.cloneNode(!0), n;
|
|
1702
|
+
i.style.display = "block", r.appendChild(i), me.appendChild(r);
|
|
1703
|
+
try {
|
|
1704
|
+
n = i.getBBox();
|
|
1705
|
+
} catch {
|
|
1706
|
+
}
|
|
1707
|
+
return r.removeChild(i), me.removeChild(r), n;
|
|
1708
|
+
}, ci = function(t, e) {
|
|
1709
|
+
for (var r = e.length; r--; )
|
|
1710
|
+
if (t.hasAttribute(e[r]))
|
|
1711
|
+
return t.getAttribute(e[r]);
|
|
1712
|
+
}, un = function(t) {
|
|
1713
|
+
var e, r;
|
|
1714
|
+
try {
|
|
1715
|
+
e = t.getBBox();
|
|
1716
|
+
} catch {
|
|
1717
|
+
e = ui(t), r = 1;
|
|
1718
|
+
}
|
|
1719
|
+
return e && (e.width || e.height) || r || (e = ui(t)), e && !e.width && !e.x && !e.y ? {
|
|
1720
|
+
x: +ci(t, ["x", "cx", "x1"]) || 0,
|
|
1721
|
+
y: +ci(t, ["y", "cy", "y1"]) || 0,
|
|
1722
|
+
width: 0,
|
|
1723
|
+
height: 0
|
|
1724
|
+
} : e;
|
|
1725
|
+
}, cn = function(t) {
|
|
1726
|
+
return !!(t.getCTM && (!t.parentNode || t.ownerSVGElement) && un(t));
|
|
1727
|
+
}, Gt = function(t, e) {
|
|
1728
|
+
if (e) {
|
|
1729
|
+
var r = t.style, i;
|
|
1730
|
+
e in Lt && e !== mt && (e = Z), r.removeProperty ? (i = e.substr(0, 2), (i === "ms" || e.substr(0, 6) === "webkit") && (e = "-" + e), r.removeProperty(i === "--" ? e : e.replace(Gr, "-$1").toLowerCase())) : r.removeAttribute(e);
|
|
1731
|
+
}
|
|
1732
|
+
}, $t = function(t, e, r, i, n, a) {
|
|
1733
|
+
var s = new pt(t._pt, e, r, 0, 1, a ? an : nn);
|
|
1734
|
+
return t._pt = s, s.b = i, s.e = n, t._props.push(r), s;
|
|
1735
|
+
}, fi = {
|
|
1736
|
+
deg: 1,
|
|
1737
|
+
rad: 1,
|
|
1738
|
+
turn: 1
|
|
1739
|
+
}, La = {
|
|
1740
|
+
grid: 1,
|
|
1741
|
+
flex: 1
|
|
1742
|
+
}, jt = function o(t, e, r, i) {
|
|
1743
|
+
var n = parseFloat(r) || 0, a = (r + "").trim().substr((n + "").length) || "px", s = te.style, u = Ca.test(e), c = t.tagName.toLowerCase() === "svg", l = (c ? "client" : "offset") + (u ? "Width" : "Height"), d = 100, _ = i === "px", h = i === "%", m, f, p, g;
|
|
1744
|
+
if (i === a || !n || fi[i] || fi[a])
|
|
1745
|
+
return n;
|
|
1746
|
+
if (a !== "px" && !_ && (n = o(t, e, r, "px")), g = t.getCTM && cn(t), (h || a === "%") && (Lt[e] || ~e.indexOf("adius")))
|
|
1747
|
+
return m = g ? t.getBBox()[u ? "width" : "height"] : t[l], J(h ? n / m * d : n / 100 * m);
|
|
1748
|
+
if (s[u ? "width" : "height"] = d + (_ ? a : i), f = i !== "rem" && ~e.indexOf("adius") || i === "em" && t.appendChild && !c ? t : t.parentNode, g && (f = (t.ownerSVGElement || {}).parentNode), (!f || f === Nt || !f.appendChild) && (f = Nt.body), p = f._gsap, p && h && p.width && u && p.time === xt.time && !p.uncache)
|
|
1749
|
+
return J(n / p.width * d);
|
|
1750
|
+
if (h && (e === "height" || e === "width")) {
|
|
1751
|
+
var b = t.style[e];
|
|
1752
|
+
t.style[e] = d + i, m = t[l], b ? t.style[e] = b : Gt(t, e);
|
|
1753
|
+
} else
|
|
1754
|
+
(h || a === "%") && !La[Tt(f, "display")] && (s.position = Tt(t, "position")), f === t && (s.position = "static"), f.appendChild(te), m = te[l], f.removeChild(te), s.position = "absolute";
|
|
1755
|
+
return u && h && (p = ee(f), p.time = xt.time, p.width = f[l]), J(_ ? m * n / d : m && n ? d / m * n : 0);
|
|
1756
|
+
}, qt = function(t, e, r, i) {
|
|
1757
|
+
var n;
|
|
1758
|
+
return Wr || Sr(), e in Et && e !== "transform" && (e = Et[e], ~e.indexOf(",") && (e = e.split(",")[0])), Lt[e] && e !== "transform" ? (n = Le(t, i), n = e !== "transformOrigin" ? n[e] : n.svg ? n.origin : Je(Tt(t, mt)) + " " + n.zOrigin + "px") : (n = t.style[e], (!n || n === "auto" || i || ~(n + "").indexOf("calc(")) && (n = Ke[e] && Ke[e](t, e, r) || Tt(t, e) || Ci(t, e) || (e === "opacity" ? 1 : 0))), r && !~(n + "").trim().indexOf(" ") ? jt(t, e, n, r) + r : n;
|
|
1759
|
+
}, Ia = function(t, e, r, i) {
|
|
1760
|
+
if (!r || r === "none") {
|
|
1761
|
+
var n = Ce(e, t, 1), a = n && Tt(t, n, 1);
|
|
1762
|
+
a && a !== r ? (e = n, r = a) : e === "borderColor" && (r = Tt(t, "borderTopColor"));
|
|
1763
|
+
}
|
|
1764
|
+
var s = new pt(this._pt, t.style, e, 0, 1, tn), u = 0, c = 0, l, d, _, h, m, f, p, g, b, y, x, v;
|
|
1765
|
+
if (s.b = r, s.e = i, r += "", i += "", i.substring(0, 6) === "var(--" && (i = Tt(t, i.substring(4, i.indexOf(")")))), i === "auto" && (f = t.style[e], t.style[e] = i, i = Tt(t, e) || i, f ? t.style[e] = f : Gt(t, e)), l = [r, i], Ui(l), r = l[0], i = l[1], _ = r.match(he) || [], v = i.match(he) || [], v.length) {
|
|
1766
|
+
for (; d = he.exec(i); )
|
|
1767
|
+
p = d[0], b = i.substring(u, d.index), m ? m = (m + 1) % 5 : (b.substr(-5) === "rgba(" || b.substr(-5) === "hsla(") && (m = 1), p !== (f = _[c++] || "") && (h = parseFloat(f) || 0, x = f.substr((h + "").length), p.charAt(1) === "=" && (p = pe(h, p) + x), g = parseFloat(p), y = p.substr((g + "").length), u = he.lastIndex - y.length, y || (y = y || wt.units[e] || x, u === i.length && (i += y, s.e += y)), x !== y && (h = jt(t, e, f, y) || 0), s._pt = {
|
|
1768
|
+
_next: s._pt,
|
|
1769
|
+
p: b || c === 1 ? b : ",",
|
|
1770
|
+
//note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.
|
|
1771
|
+
s: h,
|
|
1772
|
+
c: g - h,
|
|
1773
|
+
m: m && m < 4 || e === "zIndex" ? Math.round : 0
|
|
1774
|
+
});
|
|
1775
|
+
s.c = u < i.length ? i.substring(u, i.length) : "";
|
|
1776
|
+
} else
|
|
1777
|
+
s.r = e === "display" && i === "none" ? an : nn;
|
|
1778
|
+
return bi.test(i) && (s.e = 0), this._pt = s, s;
|
|
1779
|
+
}, di = {
|
|
1780
|
+
top: "0%",
|
|
1781
|
+
bottom: "100%",
|
|
1782
|
+
left: "0%",
|
|
1783
|
+
right: "100%",
|
|
1784
|
+
center: "50%"
|
|
1785
|
+
}, Na = function(t) {
|
|
1786
|
+
var e = t.split(" "), r = e[0], i = e[1] || "50%";
|
|
1787
|
+
return (r === "top" || r === "bottom" || i === "left" || i === "right") && (t = r, r = i, i = t), e[0] = di[r] || r, e[1] = di[i] || i, e.join(" ");
|
|
1788
|
+
}, $a = function(t, e) {
|
|
1789
|
+
if (e.tween && e.tween._time === e.tween._dur) {
|
|
1790
|
+
var r = e.t, i = r.style, n = e.u, a = r._gsap, s, u, c;
|
|
1791
|
+
if (n === "all" || n === !0)
|
|
1792
|
+
i.cssText = "", u = 1;
|
|
1793
|
+
else
|
|
1794
|
+
for (n = n.split(","), c = n.length; --c > -1; )
|
|
1795
|
+
s = n[c], Lt[s] && (u = 1, s = s === "transformOrigin" ? mt : Z), Gt(r, s);
|
|
1796
|
+
u && (Gt(r, Z), a && (a.svg && r.removeAttribute("transform"), i.scale = i.rotate = i.translate = "none", Le(r, 1), a.uncache = 1, sn(i)));
|
|
1797
|
+
}
|
|
1798
|
+
}, Ke = {
|
|
1799
|
+
clearProps: function(t, e, r, i, n) {
|
|
1800
|
+
if (n.data !== "isFromStart") {
|
|
1801
|
+
var a = t._pt = new pt(t._pt, e, r, 0, 0, $a);
|
|
1802
|
+
return a.u = i, a.pr = -10, a.tween = n, t._props.push(r), 1;
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
/* className feature (about 0.4kb gzipped).
|
|
1806
|
+
, className(plugin, target, property, endValue, tween) {
|
|
1807
|
+
let _renderClassName = (ratio, data) => {
|
|
1808
|
+
data.css.render(ratio, data.css);
|
|
1809
|
+
if (!ratio || ratio === 1) {
|
|
1810
|
+
let inline = data.rmv,
|
|
1811
|
+
target = data.t,
|
|
1812
|
+
p;
|
|
1813
|
+
target.setAttribute("class", ratio ? data.e : data.b);
|
|
1814
|
+
for (p in inline) {
|
|
1815
|
+
_removeProperty(target, p);
|
|
1816
|
+
}
|
|
1817
|
+
}
|
|
1818
|
+
},
|
|
1819
|
+
_getAllStyles = (target) => {
|
|
1820
|
+
let styles = {},
|
|
1821
|
+
computed = getComputedStyle(target),
|
|
1822
|
+
p;
|
|
1823
|
+
for (p in computed) {
|
|
1824
|
+
if (isNaN(p) && p !== "cssText" && p !== "length") {
|
|
1825
|
+
styles[p] = computed[p];
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
_setDefaults(styles, _parseTransform(target, 1));
|
|
1829
|
+
return styles;
|
|
1830
|
+
},
|
|
1831
|
+
startClassList = target.getAttribute("class"),
|
|
1832
|
+
style = target.style,
|
|
1833
|
+
cssText = style.cssText,
|
|
1834
|
+
cache = target._gsap,
|
|
1835
|
+
classPT = cache.classPT,
|
|
1836
|
+
inlineToRemoveAtEnd = {},
|
|
1837
|
+
data = {t:target, plugin:plugin, rmv:inlineToRemoveAtEnd, b:startClassList, e:(endValue.charAt(1) !== "=") ? endValue : startClassList.replace(new RegExp("(?:\\s|^)" + endValue.substr(2) + "(?![\\w-])"), "") + ((endValue.charAt(0) === "+") ? " " + endValue.substr(2) : "")},
|
|
1838
|
+
changingVars = {},
|
|
1839
|
+
startVars = _getAllStyles(target),
|
|
1840
|
+
transformRelated = /(transform|perspective)/i,
|
|
1841
|
+
endVars, p;
|
|
1842
|
+
if (classPT) {
|
|
1843
|
+
classPT.r(1, classPT.d);
|
|
1844
|
+
_removeLinkedListItem(classPT.d.plugin, classPT, "_pt");
|
|
1845
|
+
}
|
|
1846
|
+
target.setAttribute("class", data.e);
|
|
1847
|
+
endVars = _getAllStyles(target, true);
|
|
1848
|
+
target.setAttribute("class", startClassList);
|
|
1849
|
+
for (p in endVars) {
|
|
1850
|
+
if (endVars[p] !== startVars[p] && !transformRelated.test(p)) {
|
|
1851
|
+
changingVars[p] = endVars[p];
|
|
1852
|
+
if (!style[p] && style[p] !== "0") {
|
|
1853
|
+
inlineToRemoveAtEnd[p] = 1;
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
cache.classPT = plugin._pt = new PropTween(plugin._pt, target, "className", 0, 0, _renderClassName, data, 0, -11);
|
|
1858
|
+
if (style.cssText !== cssText) { //only apply if things change. Otherwise, in cases like a background-image that's pulled dynamically, it could cause a refresh. See https://gsap.com/forums/topic/20368-possible-gsap-bug-switching-classnames-in-chrome/.
|
|
1859
|
+
style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity).
|
|
1860
|
+
}
|
|
1861
|
+
_parseTransform(target, true); //to clear the caching of transforms
|
|
1862
|
+
data.css = new gsap.plugins.css();
|
|
1863
|
+
data.css.init(target, changingVars, tween);
|
|
1864
|
+
plugin._props.push(...data.css._props);
|
|
1865
|
+
return 1;
|
|
1866
|
+
}
|
|
1867
|
+
*/
|
|
1868
|
+
}, Ve = [1, 0, 0, 1, 0, 0], fn = {}, dn = function(t) {
|
|
1869
|
+
return t === "matrix(1, 0, 0, 1, 0, 0)" || t === "none" || !t;
|
|
1870
|
+
}, hi = function(t) {
|
|
1871
|
+
var e = Tt(t, Z);
|
|
1872
|
+
return dn(e) ? Ve : e.substr(7).match(yi).map(J);
|
|
1873
|
+
}, jr = function(t, e) {
|
|
1874
|
+
var r = t._gsap || ee(t), i = t.style, n = hi(t), a, s, u, c;
|
|
1875
|
+
return r.svg && t.getAttribute("transform") ? (u = t.transform.baseVal.consolidate().matrix, n = [u.a, u.b, u.c, u.d, u.e, u.f], n.join(",") === "1,0,0,1,0,0" ? Ve : n) : (n === Ve && !t.offsetParent && t !== me && !r.svg && (u = i.display, i.display = "block", a = t.parentNode, (!a || !t.offsetParent && !t.getBoundingClientRect().width) && (c = 1, s = t.nextElementSibling, me.appendChild(t)), n = hi(t), u ? i.display = u : Gt(t, "display"), c && (s ? a.insertBefore(t, s) : a ? a.appendChild(t) : me.removeChild(t))), e && n.length > 6 ? [n[0], n[1], n[4], n[5], n[12], n[13]] : n);
|
|
1876
|
+
}, Pr = function(t, e, r, i, n, a) {
|
|
1877
|
+
var s = t._gsap, u = n || jr(t, !0), c = s.xOrigin || 0, l = s.yOrigin || 0, d = s.xOffset || 0, _ = s.yOffset || 0, h = u[0], m = u[1], f = u[2], p = u[3], g = u[4], b = u[5], y = e.split(" "), x = parseFloat(y[0]) || 0, v = parseFloat(y[1]) || 0, T, C, S, k;
|
|
1878
|
+
r ? u !== Ve && (C = h * p - m * f) && (S = x * (p / C) + v * (-f / C) + (f * b - p * g) / C, k = x * (-m / C) + v * (h / C) - (h * b - m * g) / C, x = S, v = k) : (T = un(t), x = T.x + (~y[0].indexOf("%") ? x / 100 * T.width : x), v = T.y + (~(y[1] || y[0]).indexOf("%") ? v / 100 * T.height : v)), i || i !== !1 && s.smooth ? (g = x - c, b = v - l, s.xOffset = d + (g * h + b * f) - g, s.yOffset = _ + (g * m + b * p) - b) : s.xOffset = s.yOffset = 0, s.xOrigin = x, s.yOrigin = v, s.smooth = !!i, s.origin = e, s.originIsAbsolute = !!r, t.style[mt] = "0px 0px", a && ($t(a, s, "xOrigin", c, x), $t(a, s, "yOrigin", l, v), $t(a, s, "xOffset", d, s.xOffset), $t(a, s, "yOffset", _, s.yOffset)), t.setAttribute("data-svg-origin", x + " " + v);
|
|
1879
|
+
}, Le = function(t, e) {
|
|
1880
|
+
var r = t._gsap || new ji(t);
|
|
1881
|
+
if ("x" in r && !e && !r.uncache)
|
|
1882
|
+
return r;
|
|
1883
|
+
var i = t.style, n = r.scaleX < 0, a = "px", s = "deg", u = getComputedStyle(t), c = Tt(t, mt) || "0", l, d, _, h, m, f, p, g, b, y, x, v, T, C, S, k, V, U, L, $, E, z, w, R, O, I, N, ct, st, Pt, ot, vt;
|
|
1884
|
+
return l = d = _ = f = p = g = b = y = x = 0, h = m = 1, r.svg = !!(t.getCTM && cn(t)), u.translate && ((u.translate !== "none" || u.scale !== "none" || u.rotate !== "none") && (i[Z] = (u.translate !== "none" ? "translate3d(" + (u.translate + " 0 0").split(" ").slice(0, 3).join(", ") + ") " : "") + (u.rotate !== "none" ? "rotate(" + u.rotate + ") " : "") + (u.scale !== "none" ? "scale(" + u.scale.split(" ").join(",") + ") " : "") + (u[Z] !== "none" ? u[Z] : "")), i.scale = i.rotate = i.translate = "none"), C = jr(t, r.svg), r.svg && (r.uncache ? (O = t.getBBox(), c = r.xOrigin - O.x + "px " + (r.yOrigin - O.y) + "px", R = "") : R = !e && t.getAttribute("data-svg-origin"), Pr(t, R || c, !!R || r.originIsAbsolute, r.smooth !== !1, C)), v = r.xOrigin || 0, T = r.yOrigin || 0, C !== Ve && (U = C[0], L = C[1], $ = C[2], E = C[3], l = z = C[4], d = w = C[5], C.length === 6 ? (h = Math.sqrt(U * U + L * L), m = Math.sqrt(E * E + $ * $), f = U || L ? de(L, U) * Jt : 0, b = $ || E ? de($, E) * Jt + f : 0, b && (m *= Math.abs(Math.cos(b * ge))), r.svg && (l -= v - (v * U + T * $), d -= T - (v * L + T * E))) : (vt = C[6], Pt = C[7], N = C[8], ct = C[9], st = C[10], ot = C[11], l = C[12], d = C[13], _ = C[14], S = de(vt, st), p = S * Jt, S && (k = Math.cos(-S), V = Math.sin(-S), R = z * k + N * V, O = w * k + ct * V, I = vt * k + st * V, N = z * -V + N * k, ct = w * -V + ct * k, st = vt * -V + st * k, ot = Pt * -V + ot * k, z = R, w = O, vt = I), S = de(-$, st), g = S * Jt, S && (k = Math.cos(-S), V = Math.sin(-S), R = U * k - N * V, O = L * k - ct * V, I = $ * k - st * V, ot = E * V + ot * k, U = R, L = O, $ = I), S = de(L, U), f = S * Jt, S && (k = Math.cos(S), V = Math.sin(S), R = U * k + L * V, O = z * k + w * V, L = L * k - U * V, w = w * k - z * V, U = R, z = O), p && Math.abs(p) + Math.abs(f) > 359.9 && (p = f = 0, g = 180 - g), h = J(Math.sqrt(U * U + L * L + $ * $)), m = J(Math.sqrt(w * w + vt * vt)), S = de(z, w), b = Math.abs(S) > 2e-4 ? S * Jt : 0, x = ot ? 1 / (ot < 0 ? -ot : ot) : 0), r.svg && (R = t.getAttribute("transform"), r.forceCSS = t.setAttribute("transform", "") || !dn(Tt(t, Z)), R && t.setAttribute("transform", R))), Math.abs(b) > 90 && Math.abs(b) < 270 && (n ? (h *= -1, b += f <= 0 ? 180 : -180, f += f <= 0 ? 180 : -180) : (m *= -1, b += b <= 0 ? 180 : -180)), e = e || r.uncache, r.x = l - ((r.xPercent = l && (!e && r.xPercent || (Math.round(t.offsetWidth / 2) === Math.round(-l) ? -50 : 0))) ? t.offsetWidth * r.xPercent / 100 : 0) + a, r.y = d - ((r.yPercent = d && (!e && r.yPercent || (Math.round(t.offsetHeight / 2) === Math.round(-d) ? -50 : 0))) ? t.offsetHeight * r.yPercent / 100 : 0) + a, r.z = _ + a, r.scaleX = J(h), r.scaleY = J(m), r.rotation = J(f) + s, r.rotationX = J(p) + s, r.rotationY = J(g) + s, r.skewX = b + s, r.skewY = y + s, r.transformPerspective = x + a, (r.zOrigin = parseFloat(c.split(" ")[2]) || !e && r.zOrigin || 0) && (i[mt] = Je(c)), r.xOffset = r.yOffset = 0, r.force3D = wt.force3D, r.renderTransform = r.svg ? Ua : ln ? hn : Xa, r.uncache = 0, r;
|
|
1885
|
+
}, Je = function(t) {
|
|
1886
|
+
return (t = t.split(" "))[0] + " " + t[1];
|
|
1887
|
+
}, hr = function(t, e, r) {
|
|
1888
|
+
var i = lt(e);
|
|
1889
|
+
return J(parseFloat(e) + parseFloat(jt(t, "x", r + "px", i))) + i;
|
|
1890
|
+
}, Xa = function(t, e) {
|
|
1891
|
+
e.z = "0px", e.rotationY = e.rotationX = "0deg", e.force3D = 0, hn(t, e);
|
|
1892
|
+
}, Zt = "0deg", Pe = "0px", Kt = ") ", hn = function(t, e) {
|
|
1893
|
+
var r = e || this, i = r.xPercent, n = r.yPercent, a = r.x, s = r.y, u = r.z, c = r.rotation, l = r.rotationY, d = r.rotationX, _ = r.skewX, h = r.skewY, m = r.scaleX, f = r.scaleY, p = r.transformPerspective, g = r.force3D, b = r.target, y = r.zOrigin, x = "", v = g === "auto" && t && t !== 1 || g === !0;
|
|
1894
|
+
if (y && (d !== Zt || l !== Zt)) {
|
|
1895
|
+
var T = parseFloat(l) * ge, C = Math.sin(T), S = Math.cos(T), k;
|
|
1896
|
+
T = parseFloat(d) * ge, k = Math.cos(T), a = hr(b, a, C * k * -y), s = hr(b, s, -Math.sin(T) * -y), u = hr(b, u, S * k * -y + y);
|
|
1897
|
+
}
|
|
1898
|
+
p !== Pe && (x += "perspective(" + p + Kt), (i || n) && (x += "translate(" + i + "%, " + n + "%) "), (v || a !== Pe || s !== Pe || u !== Pe) && (x += u !== Pe || v ? "translate3d(" + a + ", " + s + ", " + u + ") " : "translate(" + a + ", " + s + Kt), c !== Zt && (x += "rotate(" + c + Kt), l !== Zt && (x += "rotateY(" + l + Kt), d !== Zt && (x += "rotateX(" + d + Kt), (_ !== Zt || h !== Zt) && (x += "skew(" + _ + ", " + h + Kt), (m !== 1 || f !== 1) && (x += "scale(" + m + ", " + f + Kt), b.style[Z] = x || "translate(0, 0)";
|
|
1899
|
+
}, Ua = function(t, e) {
|
|
1900
|
+
var r = e || this, i = r.xPercent, n = r.yPercent, a = r.x, s = r.y, u = r.rotation, c = r.skewX, l = r.skewY, d = r.scaleX, _ = r.scaleY, h = r.target, m = r.xOrigin, f = r.yOrigin, p = r.xOffset, g = r.yOffset, b = r.forceCSS, y = parseFloat(a), x = parseFloat(s), v, T, C, S, k;
|
|
1901
|
+
u = parseFloat(u), c = parseFloat(c), l = parseFloat(l), l && (l = parseFloat(l), c += l, u += l), u || c ? (u *= ge, c *= ge, v = Math.cos(u) * d, T = Math.sin(u) * d, C = Math.sin(u - c) * -_, S = Math.cos(u - c) * _, c && (l *= ge, k = Math.tan(c - l), k = Math.sqrt(1 + k * k), C *= k, S *= k, l && (k = Math.tan(l), k = Math.sqrt(1 + k * k), v *= k, T *= k)), v = J(v), T = J(T), C = J(C), S = J(S)) : (v = d, S = _, T = C = 0), (y && !~(a + "").indexOf("px") || x && !~(s + "").indexOf("px")) && (y = jt(h, "x", a, "px"), x = jt(h, "y", s, "px")), (m || f || p || g) && (y = J(y + m - (m * v + f * C) + p), x = J(x + f - (m * T + f * S) + g)), (i || n) && (k = h.getBBox(), y = J(y + i / 100 * k.width), x = J(x + n / 100 * k.height)), k = "matrix(" + v + "," + T + "," + C + "," + S + "," + y + "," + x + ")", h.setAttribute("transform", k), b && (h.style[Z] = k);
|
|
1902
|
+
}, Wa = function(t, e, r, i, n) {
|
|
1903
|
+
var a = 360, s = it(n), u = parseFloat(n) * (s && ~n.indexOf("rad") ? Jt : 1), c = u - i, l = i + c + "deg", d, _;
|
|
1904
|
+
return s && (d = n.split("_")[1], d === "short" && (c %= a, c !== c % (a / 2) && (c += c < 0 ? a : -a)), d === "cw" && c < 0 ? c = (c + a * oi) % a - ~~(c / a) * a : d === "ccw" && c > 0 && (c = (c - a * oi) % a - ~~(c / a) * a)), t._pt = _ = new pt(t._pt, e, r, i, c, Pa), _.e = l, _.u = "deg", t._props.push(r), _;
|
|
1905
|
+
}, _i = function(t, e) {
|
|
1906
|
+
for (var r in e)
|
|
1907
|
+
t[r] = e[r];
|
|
1908
|
+
return t;
|
|
1909
|
+
}, Ya = function(t, e, r) {
|
|
1910
|
+
var i = _i({}, r._gsap), n = "perspective,force3D,transformOrigin,svgOrigin", a = r.style, s, u, c, l, d, _, h, m;
|
|
1911
|
+
i.svg ? (c = r.getAttribute("transform"), r.setAttribute("transform", ""), a[Z] = e, s = Le(r, 1), Gt(r, Z), r.setAttribute("transform", c)) : (c = getComputedStyle(r)[Z], a[Z] = e, s = Le(r, 1), a[Z] = c);
|
|
1912
|
+
for (u in Lt)
|
|
1913
|
+
c = i[u], l = s[u], c !== l && n.indexOf(u) < 0 && (h = lt(c), m = lt(l), d = h !== m ? jt(r, u, c, m) : parseFloat(c), _ = parseFloat(l), t._pt = new pt(t._pt, s, u, d, _ - d, wr), t._pt.u = m || 0, t._props.push(u));
|
|
1914
|
+
_i(s, i);
|
|
1915
|
+
};
|
|
1916
|
+
_t("padding,margin,Width,Radius", function(o, t) {
|
|
1917
|
+
var e = "Top", r = "Right", i = "Bottom", n = "Left", a = (t < 3 ? [e, r, i, n] : [e + n, e + r, i + r, i + n]).map(function(s) {
|
|
1918
|
+
return t < 2 ? o + s : "border" + s + o;
|
|
1919
|
+
});
|
|
1920
|
+
Ke[t > 1 ? "border" + o : o] = function(s, u, c, l, d) {
|
|
1921
|
+
var _, h;
|
|
1922
|
+
if (arguments.length < 4)
|
|
1923
|
+
return _ = a.map(function(m) {
|
|
1924
|
+
return qt(s, m, c);
|
|
1925
|
+
}), h = _.join(" "), h.split(_[0]).length === 5 ? _[0] : h;
|
|
1926
|
+
_ = (l + "").split(" "), h = {}, a.forEach(function(m, f) {
|
|
1927
|
+
return h[m] = _[f] = _[f] || _[(f - 1) / 2 | 0];
|
|
1928
|
+
}), s.init(u, h, d);
|
|
1929
|
+
};
|
|
1930
|
+
});
|
|
1931
|
+
var _n = {
|
|
1932
|
+
name: "css",
|
|
1933
|
+
register: Sr,
|
|
1934
|
+
targetTest: function(t) {
|
|
1935
|
+
return t.style && t.nodeType;
|
|
1936
|
+
},
|
|
1937
|
+
init: function(t, e, r, i, n) {
|
|
1938
|
+
var a = this._props, s = t.style, u = r.vars.startAt, c, l, d, _, h, m, f, p, g, b, y, x, v, T, C, S, k;
|
|
1939
|
+
Wr || Sr(), this.styles = this.styles || on(t), S = this.styles.props, this.tween = r;
|
|
1940
|
+
for (f in e)
|
|
1941
|
+
if (f !== "autoRound" && (l = e[f], !(yt[f] && Qi(f, e, r, i, t, n)))) {
|
|
1942
|
+
if (h = typeof l, m = Ke[f], h === "function" && (l = l.call(r, i, t, n), h = typeof l), h === "string" && ~l.indexOf("random(") && (l = ze(l)), m)
|
|
1943
|
+
m(this, t, f, l, r) && (C = 1);
|
|
1944
|
+
else if (f.substr(0, 2) === "--")
|
|
1945
|
+
c = (getComputedStyle(t).getPropertyValue(f) + "").trim(), l += "", Ut.lastIndex = 0, Ut.test(c) || (p = lt(c), g = lt(l), g ? p !== g && (c = jt(t, f, c, g) + g) : p && (l += p)), this.add(s, "setProperty", c, l, i, n, 0, 0, f), a.push(f), S.push(f, 0, s[f]);
|
|
1946
|
+
else if (h !== "undefined") {
|
|
1947
|
+
if (u && f in u ? (c = typeof u[f] == "function" ? u[f].call(r, i, t, n) : u[f], it(c) && ~c.indexOf("random(") && (c = ze(c)), lt(c + "") || c === "auto" || (c += wt.units[f] || lt(qt(t, f)) || ""), (c + "").charAt(1) === "=" && (c = qt(t, f))) : c = qt(t, f), _ = parseFloat(c), b = h === "string" && l.charAt(1) === "=" && l.substr(0, 2), b && (l = l.substr(2)), d = parseFloat(l), f in Et && (f === "autoAlpha" && (_ === 1 && qt(t, "visibility") === "hidden" && d && (_ = 0), S.push("visibility", 0, s.visibility), $t(this, s, "visibility", _ ? "inherit" : "hidden", d ? "inherit" : "hidden", !d)), f !== "scale" && f !== "transform" && (f = Et[f], ~f.indexOf(",") && (f = f.split(",")[0]))), y = f in Lt, y) {
|
|
1948
|
+
if (this.styles.save(f), k = l, h === "string" && l.substring(0, 6) === "var(--") {
|
|
1949
|
+
if (l = Tt(t, l.substring(4, l.indexOf(")"))), l.substring(0, 5) === "calc(") {
|
|
1950
|
+
var V = t.style.perspective;
|
|
1951
|
+
t.style.perspective = l, l = Tt(t, "perspective"), V ? t.style.perspective = V : Gt(t, "perspective");
|
|
1952
|
+
}
|
|
1953
|
+
d = parseFloat(l);
|
|
1954
|
+
}
|
|
1955
|
+
if (x || (v = t._gsap, v.renderTransform && !e.parseTransform || Le(t, e.parseTransform), T = e.smoothOrigin !== !1 && v.smooth, x = this._pt = new pt(this._pt, s, Z, 0, 1, v.renderTransform, v, 0, -1), x.dep = 1), f === "scale")
|
|
1956
|
+
this._pt = new pt(this._pt, v, "scaleY", v.scaleY, (b ? pe(v.scaleY, b + d) : d) - v.scaleY || 0, wr), this._pt.u = 0, a.push("scaleY", f), f += "X";
|
|
1957
|
+
else if (f === "transformOrigin") {
|
|
1958
|
+
S.push(mt, 0, s[mt]), l = Na(l), v.svg ? Pr(t, l, 0, T, 0, this) : (g = parseFloat(l.split(" ")[2]) || 0, g !== v.zOrigin && $t(this, v, "zOrigin", v.zOrigin, g), $t(this, s, f, Je(c), Je(l)));
|
|
1959
|
+
continue;
|
|
1960
|
+
} else if (f === "svgOrigin") {
|
|
1961
|
+
Pr(t, l, 1, T, 0, this);
|
|
1962
|
+
continue;
|
|
1963
|
+
} else if (f in fn) {
|
|
1964
|
+
Wa(this, v, f, _, b ? pe(_, b + l) : l);
|
|
1965
|
+
continue;
|
|
1966
|
+
} else if (f === "smoothOrigin") {
|
|
1967
|
+
$t(this, v, "smooth", v.smooth, l);
|
|
1968
|
+
continue;
|
|
1969
|
+
} else if (f === "force3D") {
|
|
1970
|
+
v[f] = l;
|
|
1971
|
+
continue;
|
|
1972
|
+
} else if (f === "transform") {
|
|
1973
|
+
Ya(this, l, t);
|
|
1974
|
+
continue;
|
|
1975
|
+
}
|
|
1976
|
+
} else f in s || (f = Ce(f) || f);
|
|
1977
|
+
if (y || (d || d === 0) && (_ || _ === 0) && !Sa.test(l) && f in s)
|
|
1978
|
+
p = (c + "").substr((_ + "").length), d || (d = 0), g = lt(l) || (f in wt.units ? wt.units[f] : p), p !== g && (_ = jt(t, f, c, g)), this._pt = new pt(this._pt, y ? v : s, f, _, (b ? pe(_, b + d) : d) - _, !y && (g === "px" || f === "zIndex") && e.autoRound !== !1 ? Ma : wr), this._pt.u = g || 0, y && k !== l ? (this._pt.b = c, this._pt.e = k, this._pt.r = Oa) : p !== g && g !== "%" && (this._pt.b = c, this._pt.r = Ra);
|
|
1979
|
+
else if (f in s)
|
|
1980
|
+
Ia.call(this, t, f, c, b ? b + l : l);
|
|
1981
|
+
else if (f in t)
|
|
1982
|
+
this.add(t, f, c || t[f], b ? b + l : l, i, n);
|
|
1983
|
+
else if (f !== "parseTransform") {
|
|
1984
|
+
zr(f, l);
|
|
1985
|
+
continue;
|
|
1986
|
+
}
|
|
1987
|
+
y || (f in s ? S.push(f, 0, s[f]) : typeof t[f] == "function" ? S.push(f, 2, t[f]()) : S.push(f, 1, c || t[f])), a.push(f);
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
C && en(this);
|
|
1991
|
+
},
|
|
1992
|
+
render: function(t, e) {
|
|
1993
|
+
if (e.tween._time || !Yr())
|
|
1994
|
+
for (var r = e._pt; r; )
|
|
1995
|
+
r.r(t, r.d), r = r._next;
|
|
1996
|
+
else
|
|
1997
|
+
e.styles.revert();
|
|
1998
|
+
},
|
|
1999
|
+
get: qt,
|
|
2000
|
+
aliases: Et,
|
|
2001
|
+
getSetter: function(t, e, r) {
|
|
2002
|
+
var i = Et[e];
|
|
2003
|
+
return i && i.indexOf(",") < 0 && (e = i), e in Lt && e !== mt && (t._gsap.x || qt(t, "x")) ? r && si === r ? e === "scale" ? Ba : Ea : (si = r || {}) && (e === "scale" ? za : Fa) : t.style && !Ar(t.style[e]) ? Da : ~e.indexOf("-") ? Aa : Xr(t, e);
|
|
2004
|
+
},
|
|
2005
|
+
core: {
|
|
2006
|
+
_removeProperty: Gt,
|
|
2007
|
+
_getMatrix: jr
|
|
2008
|
+
}
|
|
2009
|
+
};
|
|
2010
|
+
gt.utils.checkPrefix = Ce;
|
|
2011
|
+
gt.core.getStyleSaver = on;
|
|
2012
|
+
(function(o, t, e, r) {
|
|
2013
|
+
var i = _t(o + "," + t + "," + e, function(n) {
|
|
2014
|
+
Lt[n] = 1;
|
|
2015
|
+
});
|
|
2016
|
+
_t(t, function(n) {
|
|
2017
|
+
wt.units[n] = "deg", fn[n] = 1;
|
|
2018
|
+
}), Et[i[13]] = o + "," + t, _t(r, function(n) {
|
|
2019
|
+
var a = n.split(":");
|
|
2020
|
+
Et[a[1]] = i[a[0]];
|
|
2021
|
+
});
|
|
2022
|
+
})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent", "rotation,rotationX,rotationY,skewX,skewY", "transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective", "0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");
|
|
2023
|
+
_t("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective", function(o) {
|
|
2024
|
+
wt.units[o] = "px";
|
|
2025
|
+
});
|
|
2026
|
+
gt.registerPlugin(_n);
|
|
2027
|
+
var pn = gt.registerPlugin(_n) || gt;
|
|
2028
|
+
pn.core.Tween;
|
|
2029
|
+
const Ht = (o, t) => {
|
|
2030
|
+
const e = o.__vccOpts || o;
|
|
2031
|
+
for (const [r, i] of t)
|
|
2032
|
+
e[r] = i;
|
|
2033
|
+
return e;
|
|
2034
|
+
}, Ga = { class: "anim-item" }, ja = { class: "anim-item" }, Qa = { class: "anim-item" }, Ha = {
|
|
2035
|
+
__name: "CardBase",
|
|
2036
|
+
props: {
|
|
2037
|
+
tema: {
|
|
2038
|
+
type: String,
|
|
2039
|
+
default: "Light",
|
|
2040
|
+
validator: (o) => ["Light", "Dark", "Transparent"].includes(o)
|
|
2041
|
+
},
|
|
2042
|
+
corFundo: {
|
|
2043
|
+
type: String
|
|
2044
|
+
},
|
|
2045
|
+
legenda: {
|
|
2046
|
+
type: String
|
|
2047
|
+
},
|
|
2048
|
+
sublegenda: {
|
|
2049
|
+
type: String
|
|
2050
|
+
},
|
|
2051
|
+
tituloVisivel: {
|
|
2052
|
+
type: Boolean,
|
|
2053
|
+
default: !0
|
|
2054
|
+
},
|
|
2055
|
+
titulo: {
|
|
2056
|
+
type: String,
|
|
2057
|
+
default: ""
|
|
2058
|
+
},
|
|
2059
|
+
descricao: {
|
|
2060
|
+
type: String,
|
|
2061
|
+
default: ""
|
|
2062
|
+
},
|
|
2063
|
+
botaoVisivel: {
|
|
2064
|
+
type: Boolean,
|
|
2065
|
+
default: !1
|
|
2066
|
+
},
|
|
2067
|
+
textoBotao: {
|
|
2068
|
+
type: String,
|
|
2069
|
+
default: "Ver Todos"
|
|
2070
|
+
},
|
|
2071
|
+
direcao: {
|
|
2072
|
+
type: String,
|
|
2073
|
+
default: "vertical",
|
|
2074
|
+
validator: (o) => ["vertical", "horizontal"].includes(o)
|
|
2075
|
+
},
|
|
2076
|
+
carregamento: {
|
|
2077
|
+
type: Boolean,
|
|
2078
|
+
default: !1
|
|
2079
|
+
},
|
|
2080
|
+
minHeight: {
|
|
2081
|
+
type: String,
|
|
2082
|
+
default: "0px"
|
|
2083
|
+
}
|
|
2084
|
+
},
|
|
2085
|
+
emits: ["botao-click", "anim-complete"],
|
|
2086
|
+
setup(o, { emit: t }) {
|
|
2087
|
+
const e = o, r = t, i = vn();
|
|
2088
|
+
function n() {
|
|
2089
|
+
r("botao-click");
|
|
2090
|
+
}
|
|
2091
|
+
function a() {
|
|
2092
|
+
e.botaoVisivel && !i["slot-content"] && n();
|
|
2093
|
+
}
|
|
2094
|
+
const s = F(() => e.botaoVisivel && !i["slot-content"]), u = W(null);
|
|
2095
|
+
Rr(() => {
|
|
2096
|
+
pn.timeline({ defaults: { ease: "power3.out" } }).from(u.value, {
|
|
2097
|
+
duration: 0.4,
|
|
2098
|
+
opacity: 0,
|
|
2099
|
+
y: 16,
|
|
2100
|
+
clearProps: "all"
|
|
2101
|
+
}).from(
|
|
2102
|
+
u.value.querySelectorAll(".anim-item"),
|
|
2103
|
+
{
|
|
2104
|
+
duration: 0.35,
|
|
2105
|
+
opacity: 0,
|
|
2106
|
+
y: 8,
|
|
2107
|
+
stagger: 0.07,
|
|
2108
|
+
clearProps: "all"
|
|
2109
|
+
},
|
|
2110
|
+
"-=0.15"
|
|
2111
|
+
).call(() => r("anim-complete"));
|
|
2112
|
+
});
|
|
2113
|
+
function c() {
|
|
2114
|
+
const l = {};
|
|
2115
|
+
return e.corFundo && (l.backgroundColor = e.corFundo), s.value && e.corFundo && (l["--hover-brightness"] = "0.93"), l;
|
|
2116
|
+
}
|
|
2117
|
+
return (l, d) => (M(), A("div", {
|
|
2118
|
+
ref_key: "cardRef",
|
|
2119
|
+
ref: u,
|
|
2120
|
+
class: et(["card-root border-1 surface-border border-round-lg select-none", [
|
|
2121
|
+
e.direcao !== "vertical" ? "p-3" : "",
|
|
2122
|
+
s.value ? `cursor-pointer ${e.corFundo ? "" : e.tema === "Dark" ? "hover:bg-black-alpha-90" : "hover:bg-gray-50"}` : "",
|
|
2123
|
+
e.corFundo ? "" : e.tema === "Dark" ? "bg-black text-white" : e.tema === "Transparent" ? "bg-transparent" : "bg-white"
|
|
2124
|
+
]]),
|
|
2125
|
+
style: B(c()),
|
|
2126
|
+
onClick: a
|
|
2127
|
+
}, [
|
|
2128
|
+
P("div", {
|
|
2129
|
+
class: et(["flex flex-column justify-content-between md:flex-row gap-3", e.direcao === "vertical" ? "p-3 pb-0" : ""])
|
|
2130
|
+
}, [
|
|
2131
|
+
P("div", Ga, [
|
|
2132
|
+
P("p", {
|
|
2133
|
+
class: et(["text-xs font-medium m-0", e.tema === "Dark" ? "text-white" : ""])
|
|
2134
|
+
}, q(e.legenda), 3),
|
|
2135
|
+
e.legenda ? rt("", !0) : $e(l.$slots, "slot-legenda", { key: 0 }, void 0, !0),
|
|
2136
|
+
P("p", {
|
|
2137
|
+
class: et(["text-xs font-light m-0", e.tema === "Dark" ? "text-gray-400" : "text-gray-500"])
|
|
2138
|
+
}, q(e.sublegenda), 3),
|
|
2139
|
+
e.sublegenda ? rt("", !0) : $e(l.$slots, "slot-sublegenda", { key: 1 }, void 0, !0)
|
|
2140
|
+
]),
|
|
2141
|
+
P("div", ja, [
|
|
2142
|
+
$e(l.$slots, "slot-actions", {}, void 0, !0)
|
|
2143
|
+
])
|
|
2144
|
+
], 2),
|
|
2145
|
+
P("div", {
|
|
2146
|
+
class: et(e.direcao === "horizontal" ? "mt-3 flex flex-row gap-3 justify-content-between align-items-center" : "mt-3 flex flex-column gap-3")
|
|
2147
|
+
}, [
|
|
2148
|
+
e.tituloVisivel ? (M(), A("div", {
|
|
2149
|
+
key: 0,
|
|
2150
|
+
class: et(["flex flex-column gap-3", e.direcao === "vertical" ? "px-3" : ""]),
|
|
2151
|
+
style: B([e.direcao === "vertical" ? "" : "min-width: 150px;"])
|
|
2152
|
+
}, [
|
|
2153
|
+
P("div", Qa, [
|
|
2154
|
+
P("p", {
|
|
2155
|
+
class: et(["m-0 text-3xl font-medium", e.tema === "Dark" ? "text-white" : ""]),
|
|
2156
|
+
style: { "line-break": "anywhere" }
|
|
2157
|
+
}, q(e.titulo), 3),
|
|
2158
|
+
P("p", {
|
|
2159
|
+
class: et(["m-0 text-sm", e.tema === "Dark" ? "text-gray-400" : "text-gray-500"])
|
|
2160
|
+
}, q(e.descricao), 3)
|
|
2161
|
+
]),
|
|
2162
|
+
e.botaoVisivel ? (M(), A("p", {
|
|
2163
|
+
key: 0,
|
|
2164
|
+
class: et(["anim-item m-0 text-xs cursor-pointer font-medium w-max", e.tema == "Dark" ? "text-white hover:text-gray-200" : "hover:text-gray-800"]),
|
|
2165
|
+
onClick: yn(n, ["stop"])
|
|
2166
|
+
}, q(e.textoBotao), 3)) : rt("", !0)
|
|
2167
|
+
], 6)) : rt("", !0),
|
|
2168
|
+
P("div", {
|
|
2169
|
+
class: et(e.direcao === "vertical" ? "slot-content-fill" : "w-full anim-item max-w-full flex align-items-center"),
|
|
2170
|
+
style: B({ minHeight: e.minHeight })
|
|
2171
|
+
}, [
|
|
2172
|
+
$e(l.$slots, "slot-content", {}, void 0, !0)
|
|
2173
|
+
], 6)
|
|
2174
|
+
], 2)
|
|
2175
|
+
], 6));
|
|
2176
|
+
}
|
|
2177
|
+
}, oe = /* @__PURE__ */ Ht(Ha, [["__scopeId", "data-v-d7afbfb4"]]);
|
|
2178
|
+
function Za(o, t = 7) {
|
|
2179
|
+
const e = o.replace("#", "");
|
|
2180
|
+
let r = parseInt(e.slice(0, 2), 16), i = parseInt(e.slice(2, 4), 16), n = parseInt(e.slice(4, 6), 16);
|
|
2181
|
+
r /= 255, i /= 255, n /= 255;
|
|
2182
|
+
const a = Math.max(r, i, n), s = Math.min(r, i, n);
|
|
2183
|
+
let u, c, l = (a + s) / 2;
|
|
2184
|
+
if (a === s)
|
|
2185
|
+
u = c = 0;
|
|
2186
|
+
else {
|
|
2187
|
+
const f = a - s;
|
|
2188
|
+
switch (c = l > 0.5 ? f / (2 - a - s) : f / (a + s), a) {
|
|
2189
|
+
case r:
|
|
2190
|
+
u = ((i - n) / f + (i < n ? 6 : 0)) / 6;
|
|
2191
|
+
break;
|
|
2192
|
+
case i:
|
|
2193
|
+
u = ((n - r) / f + 2) / 6;
|
|
2194
|
+
break;
|
|
2195
|
+
case n:
|
|
2196
|
+
u = ((r - i) / f + 4) / 6;
|
|
2197
|
+
break;
|
|
2198
|
+
}
|
|
2199
|
+
}
|
|
2200
|
+
const d = Math.max(0.2, l - 0.3), _ = Math.min(0.92, l + 0.35), h = t > 1 ? (_ - d) / (t - 1) : 0;
|
|
2201
|
+
function m(f, p, g) {
|
|
2202
|
+
const b = p * Math.min(g, 1 - g), y = (x) => {
|
|
2203
|
+
const v = (x + f * 12) % 12, T = g - b * Math.max(-1, Math.min(v - 3, 9 - v, 1));
|
|
2204
|
+
return Math.round(255 * T).toString(16).padStart(2, "0");
|
|
2205
|
+
};
|
|
2206
|
+
return `#${y(0)}${y(8)}${y(4)}`;
|
|
2207
|
+
}
|
|
2208
|
+
return Array.from({ length: t }, (f, p) => m(u, c, d + h * p));
|
|
2209
|
+
}
|
|
2210
|
+
function Ne(o, t) {
|
|
2211
|
+
return { cores: F(() => Za(o.value, t.value)) };
|
|
2212
|
+
}
|
|
2213
|
+
function le(o) {
|
|
2214
|
+
const t = F(() => o.value === "Dark"), e = F(() => ({
|
|
2215
|
+
"--tt-bg": t.value ? "rgba(15,15,20,0.92)" : "rgba(255,255,255,0.95)",
|
|
2216
|
+
"--tt-border": t.value ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.08)",
|
|
2217
|
+
"--tt-label": t.value ? "#9ca3af" : "#6b7280",
|
|
2218
|
+
"--tt-shadow": t.value ? "0 4px 20px rgba(0,0,0,0.4)" : "0 4px 20px rgba(0,0,0,0.12)"
|
|
2219
|
+
})), r = F(() => ({
|
|
2220
|
+
bg: t.value ? "#1f2937" : "#ffffff",
|
|
2221
|
+
border: t.value ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.08)",
|
|
2222
|
+
titleColor: t.value ? "#f9fafb" : "#111827",
|
|
2223
|
+
bodyColor: t.value ? "#d1d5db" : "#374151"
|
|
2224
|
+
}));
|
|
2225
|
+
return { isDark: t, tooltipCssVars: e, chartTooltipColors: r };
|
|
2226
|
+
}
|
|
2227
|
+
function mn(o, t) {
|
|
2228
|
+
let e = null;
|
|
2229
|
+
Rr(() => {
|
|
2230
|
+
o.value && (e = new ResizeObserver(([r]) => t(r)), e.observe(o.value));
|
|
2231
|
+
}), Se(() => {
|
|
2232
|
+
e && e.disconnect();
|
|
2233
|
+
});
|
|
2234
|
+
}
|
|
2235
|
+
function ue(o, t = 320) {
|
|
2236
|
+
const e = W(!1);
|
|
2237
|
+
return mn(o, (r) => {
|
|
2238
|
+
e.value = r.contentRect.width < t;
|
|
2239
|
+
}), { estreito: e };
|
|
2240
|
+
}
|
|
2241
|
+
function Qr(o, t, e = { threshold: 0.1 }) {
|
|
2242
|
+
let r = null;
|
|
2243
|
+
Rr(() => {
|
|
2244
|
+
o.value && (r = new IntersectionObserver(([i]) => {
|
|
2245
|
+
i.isIntersecting && (t(), r.disconnect());
|
|
2246
|
+
}, e), r.observe(o.value));
|
|
2247
|
+
}), Se(() => {
|
|
2248
|
+
r && r.disconnect();
|
|
2249
|
+
});
|
|
2250
|
+
}
|
|
2251
|
+
function gn(o, t) {
|
|
2252
|
+
const e = W({ visible: !1, x: 0, y: 0, label: "", value: "", acima: !0, translateX: "-50%" });
|
|
2253
|
+
function r(a) {
|
|
2254
|
+
ve(() => {
|
|
2255
|
+
if (!t.value || !o.value) return;
|
|
2256
|
+
const s = t.value.offsetWidth, u = o.value.offsetWidth, c = s / 2;
|
|
2257
|
+
let l = -c;
|
|
2258
|
+
a - c < 0 ? l = -a : a + c > u && (l = u - a - s), e.value.translateX = l + "px";
|
|
2259
|
+
});
|
|
2260
|
+
}
|
|
2261
|
+
function i({ x: a, y: s, label: u, value: c, acima: l = !0 }) {
|
|
2262
|
+
e.value = { visible: !0, x: a, y: s, label: u, value: c, acima: l, translateX: "-50%" }, r(a);
|
|
2263
|
+
}
|
|
2264
|
+
function n() {
|
|
2265
|
+
e.value.visible = !1;
|
|
2266
|
+
}
|
|
2267
|
+
return { tooltip: e, mostrar: i, esconder: n };
|
|
2268
|
+
}
|
|
2269
|
+
const ce = {
|
|
2270
|
+
tema: {
|
|
2271
|
+
type: String,
|
|
2272
|
+
default: "Light",
|
|
2273
|
+
validator: (o) => ["Light", "Dark", "Transparent"].includes(o)
|
|
2274
|
+
},
|
|
2275
|
+
corFundo: { type: String },
|
|
2276
|
+
legenda: { type: String },
|
|
2277
|
+
sublegenda: { type: String },
|
|
2278
|
+
tituloVisivel: { type: Boolean, default: !0 },
|
|
2279
|
+
titulo: { type: String, default: "" },
|
|
2280
|
+
descricao: { type: String, default: "" },
|
|
2281
|
+
botaoVisivel: { type: Boolean, default: !1 },
|
|
2282
|
+
textoBotao: { type: String, default: "Ver Todos" },
|
|
2283
|
+
direcao: {
|
|
2284
|
+
type: String,
|
|
2285
|
+
default: "vertical",
|
|
2286
|
+
validator: (o) => ["vertical", "horizontal"].includes(o)
|
|
2287
|
+
},
|
|
2288
|
+
carregamento: { type: Boolean, default: !1 }
|
|
2289
|
+
};
|
|
2290
|
+
function fe(o) {
|
|
2291
|
+
return F(() => ({
|
|
2292
|
+
tema: o.tema,
|
|
2293
|
+
corFundo: o.corFundo,
|
|
2294
|
+
legenda: o.legenda,
|
|
2295
|
+
sublegenda: o.sublegenda,
|
|
2296
|
+
tituloVisivel: o.tituloVisivel,
|
|
2297
|
+
titulo: o.titulo,
|
|
2298
|
+
descricao: o.descricao,
|
|
2299
|
+
botaoVisivel: o.botaoVisivel,
|
|
2300
|
+
textoBotao: o.textoBotao,
|
|
2301
|
+
direcao: o.direcao,
|
|
2302
|
+
carregamento: o.carregamento
|
|
2303
|
+
}));
|
|
2304
|
+
}
|
|
2305
|
+
const Ka = { class: "nc-barra-tt-label" }, Ja = { class: "nc-barra-tt-label" }, ts = { class: "nc-barra-tt-line-label" }, es = { class: "nc-barra-tt-line-value" }, rs = {
|
|
2306
|
+
key: 0,
|
|
2307
|
+
class: "flex flex-column gap-2 w-full"
|
|
2308
|
+
}, is = ["onMouseenter", "onMousemove"], ns = {
|
|
2309
|
+
key: 1,
|
|
2310
|
+
class: "flex flex-column gap-2 w-full"
|
|
2311
|
+
}, as = ["onMouseenter", "onMousemove"], ss = { class: "nc-barra-track-dual" }, os = {
|
|
2312
|
+
__name: "CardBarra",
|
|
2313
|
+
props: {
|
|
2314
|
+
...ce,
|
|
2315
|
+
dados: {
|
|
2316
|
+
type: Array,
|
|
2317
|
+
default: () => [
|
|
2318
|
+
{ rotulo: "Categoria A", quantidade: 80 },
|
|
2319
|
+
{ rotulo: "Categoria B", quantidade: 65 },
|
|
2320
|
+
{ rotulo: "Categoria C", quantidade: 50 },
|
|
2321
|
+
{ rotulo: "Categoria D", quantidade: 35 },
|
|
2322
|
+
{ rotulo: "Categoria E", quantidade: 20 }
|
|
2323
|
+
]
|
|
2324
|
+
},
|
|
2325
|
+
corPaleta: { type: String, default: "#1D4ED8" },
|
|
2326
|
+
moeda: { type: Boolean, default: !1 },
|
|
2327
|
+
// ── Modo dual ───────────────────────────────────────────────────────────
|
|
2328
|
+
// Quando 'dual', cada item deve ter campos nomeados pelos keys de segmentos.
|
|
2329
|
+
// Ex: { rotulo: 'Vendas', total_previsto: 100, total_recebido: 60 }
|
|
2330
|
+
modo: {
|
|
2331
|
+
type: String,
|
|
2332
|
+
default: "simples",
|
|
2333
|
+
validator: (o) => ["simples", "dual"].includes(o)
|
|
2334
|
+
},
|
|
2335
|
+
// [{ key: 'total_previsto', label: 'Previsto' }, { key: 'total_recebido', label: 'Recebido' }]
|
|
2336
|
+
// Ordem: maior (fundo) → menor (frente)
|
|
2337
|
+
segmentos: {
|
|
2338
|
+
type: Array,
|
|
2339
|
+
default: () => [
|
|
2340
|
+
{ key: "total_previsto", label: "Previsto" },
|
|
2341
|
+
{ key: "total_recebido", label: "Recebido" }
|
|
2342
|
+
]
|
|
2343
|
+
},
|
|
2344
|
+
// Campo extra exibido apenas no tooltip. Ex: { key: 'total_em_aberto', label: 'Em aberto' }
|
|
2345
|
+
segmentoTooltip: {
|
|
2346
|
+
type: Object,
|
|
2347
|
+
default: null
|
|
2348
|
+
}
|
|
2349
|
+
},
|
|
2350
|
+
emits: ["botao-click"],
|
|
2351
|
+
setup(o, { emit: t }) {
|
|
2352
|
+
const e = o, { isDark: r, tooltipCssVars: i } = le(F(() => e.tema)), { cores: n } = Ne(F(() => e.corPaleta), F(() => e.dados.length)), a = F(() => r.value ? "#252525" : "#E9E9E9"), s = W(null), u = W(null), c = W(null), l = W(null), { estreito: d } = ue(c), _ = fe(e), h = F(() => ({
|
|
2353
|
+
..._.value,
|
|
2354
|
+
direcao: d.value ? "vertical" : e.direcao
|
|
2355
|
+
}));
|
|
2356
|
+
function m(E) {
|
|
2357
|
+
return e.moeda ? Number(E).toLocaleString("pt-BR", { style: "currency", currency: "BRL" }) : `${E}`;
|
|
2358
|
+
}
|
|
2359
|
+
const f = W(null), { tooltip: p, esconder: g } = gn(s, l);
|
|
2360
|
+
function b() {
|
|
2361
|
+
ve(() => {
|
|
2362
|
+
if (!l.value || !s.value) return;
|
|
2363
|
+
const E = l.value.offsetWidth, z = s.value.offsetWidth, w = p.value.x, R = E / 2;
|
|
2364
|
+
let O = -R;
|
|
2365
|
+
w - R < 0 ? O = -w : w + R > z && (O = z - w - E), p.value.translateX = O + "px";
|
|
2366
|
+
});
|
|
2367
|
+
}
|
|
2368
|
+
function y(E, z) {
|
|
2369
|
+
const w = e.dados[E], R = s.value.getBoundingClientRect(), O = z.currentTarget.getBoundingClientRect(), I = z.currentTarget.querySelector(".nc-barra-bar"), N = I ? I.getBoundingClientRect() : O, ct = N.left - R.left + N.width / 2, st = O.top - R.top;
|
|
2370
|
+
p.value = { visible: !0, x: ct, y: st, label: w.rotulo, value: m(w.quantidade), lines: null, acima: !0, translateX: "-50%" }, b();
|
|
2371
|
+
}
|
|
2372
|
+
function x(E, z) {
|
|
2373
|
+
const w = e.dados[E], R = s.value.getBoundingClientRect(), O = z.currentTarget.getBoundingClientRect(), I = z.currentTarget.querySelector(".nc-barra-track-dual"), N = I ? I.getBoundingClientRect() : O, ct = I ? I.querySelector(".nc-barra-seg") : null, st = ct ? ct.getBoundingClientRect() : N, Pt = st.left - R.left + st.width / 2, ot = O.top - R.top, vt = e.segmentos.map((Hr) => ({
|
|
2374
|
+
label: Hr.label,
|
|
2375
|
+
valor: m(Number(w[Hr.key]) || 0),
|
|
2376
|
+
cor: a.value
|
|
2377
|
+
}));
|
|
2378
|
+
vt.length > 0 && (vt[vt.length - 1].cor = n.value[E] ?? e.corPaleta), e.segmentoTooltip && vt.push({
|
|
2379
|
+
label: e.segmentoTooltip.label,
|
|
2380
|
+
valor: m(Number(w[e.segmentoTooltip.key]) || 0),
|
|
2381
|
+
cor: r.value ? "#666" : "#bbb"
|
|
2382
|
+
}), p.value = { visible: !0, x: Pt, y: ot, label: w.rotulo, value: null, lines: vt, acima: !0, translateX: "-50%" }, b();
|
|
2383
|
+
}
|
|
2384
|
+
function v(E, z) {
|
|
2385
|
+
f.value = E, e.modo === "dual" ? x(E, z) : y(E, z);
|
|
2386
|
+
}
|
|
2387
|
+
function T(E, z) {
|
|
2388
|
+
e.modo === "dual" ? x(E, z) : y(E, z);
|
|
2389
|
+
}
|
|
2390
|
+
function C() {
|
|
2391
|
+
f.value = null, g();
|
|
2392
|
+
}
|
|
2393
|
+
const S = F(
|
|
2394
|
+
() => Math.max(1, ...e.dados.map((E) => {
|
|
2395
|
+
var z;
|
|
2396
|
+
return Number(E[(z = e.segmentos[0]) == null ? void 0 : z.key]) || 0;
|
|
2397
|
+
}))
|
|
2398
|
+
);
|
|
2399
|
+
function k(E) {
|
|
2400
|
+
return e.segmentos.map((z, w) => ({
|
|
2401
|
+
key: z.key,
|
|
2402
|
+
valor: Number(E[z.key]) || 0,
|
|
2403
|
+
cor: w === e.segmentos.length - 1 ? n.value[e.dados.indexOf(E)] ?? e.corPaleta : a.value
|
|
2404
|
+
}));
|
|
2405
|
+
}
|
|
2406
|
+
const V = F(() => Math.max(...e.dados.map((E) => E.quantidade), 1)), U = W([]);
|
|
2407
|
+
function L() {
|
|
2408
|
+
U.value = e.dados.map((E) => E.quantidade / V.value * 100);
|
|
2409
|
+
}
|
|
2410
|
+
function $() {
|
|
2411
|
+
U.value = e.dados.map(() => 0), ve(() => {
|
|
2412
|
+
setTimeout(() => L(), 30);
|
|
2413
|
+
});
|
|
2414
|
+
}
|
|
2415
|
+
return L(), Qr(u, $), dt(() => e.dados, () => {
|
|
2416
|
+
$();
|
|
2417
|
+
}, { deep: !0 }), dt(() => e.corPaleta, () => {
|
|
2418
|
+
L();
|
|
2419
|
+
}), (E, z) => (M(), A("div", {
|
|
2420
|
+
ref_key: "rootRef",
|
|
2421
|
+
ref: c
|
|
2422
|
+
}, [
|
|
2423
|
+
ye(oe, ae(h.value, {
|
|
2424
|
+
onBotaoClick: z[0] || (z[0] = (w) => E.$emit("botao-click"))
|
|
2425
|
+
}), {
|
|
2426
|
+
"slot-content": Bt(() => [
|
|
2427
|
+
P("div", {
|
|
2428
|
+
ref_key: "wrapperRef",
|
|
2429
|
+
ref: u,
|
|
2430
|
+
class: et(["px-3 py-4 nc-barra-wrapper", h.value.direcao === "horizontal" ? "nc-barra-horizontal" : "nc-barra-vertical"]),
|
|
2431
|
+
style: B({ ...D(i) })
|
|
2432
|
+
}, [
|
|
2433
|
+
P("div", {
|
|
2434
|
+
ref_key: "chartRef",
|
|
2435
|
+
ref: s,
|
|
2436
|
+
class: "nc-barra-chart-container"
|
|
2437
|
+
}, [
|
|
2438
|
+
ye(Or, { name: "nc-barra-tt" }, {
|
|
2439
|
+
default: Bt(() => [
|
|
2440
|
+
D(p).visible ? (M(), A("div", {
|
|
2441
|
+
key: 0,
|
|
2442
|
+
ref_key: "tooltipRef",
|
|
2443
|
+
ref: l,
|
|
2444
|
+
class: et(["nc-barra-tooltip", D(p).acima ? "nc-barra-tt--acima" : "nc-barra-tt--abaixo"]),
|
|
2445
|
+
style: B({ left: D(p).x + "px", top: D(p).y + "px", "--tx": D(p).translateX })
|
|
2446
|
+
}, [
|
|
2447
|
+
D(p).lines ? (M(), A(nt, { key: 1 }, [
|
|
2448
|
+
P("span", Ja, q(D(p).label), 1),
|
|
2449
|
+
(M(!0), A(nt, null, bt(D(p).lines, (w) => (M(), A("div", {
|
|
2450
|
+
key: w.label,
|
|
2451
|
+
class: "nc-barra-tt-line"
|
|
2452
|
+
}, [
|
|
2453
|
+
P("span", {
|
|
2454
|
+
class: "nc-barra-tt-dot",
|
|
2455
|
+
style: B({ backgroundColor: w.cor })
|
|
2456
|
+
}, null, 4),
|
|
2457
|
+
P("span", ts, q(w.label) + ":", 1),
|
|
2458
|
+
P("span", es, q(w.valor), 1)
|
|
2459
|
+
]))), 128))
|
|
2460
|
+
], 64)) : (M(), A(nt, { key: 0 }, [
|
|
2461
|
+
P("span", Ka, q(D(p).label), 1),
|
|
2462
|
+
P("span", {
|
|
2463
|
+
class: "nc-barra-tt-value",
|
|
2464
|
+
style: B({ color: e.corPaleta })
|
|
2465
|
+
}, q(D(p).value), 5)
|
|
2466
|
+
], 64))
|
|
2467
|
+
], 6)) : rt("", !0)
|
|
2468
|
+
]),
|
|
2469
|
+
_: 1
|
|
2470
|
+
}),
|
|
2471
|
+
e.modo === "simples" ? (M(), A("div", rs, [
|
|
2472
|
+
(M(!0), A(nt, null, bt(e.dados, (w, R) => (M(), A("div", {
|
|
2473
|
+
key: R,
|
|
2474
|
+
class: "nc-barra-row",
|
|
2475
|
+
onMouseenter: (O) => v(R, O),
|
|
2476
|
+
onMousemove: (O) => T(R, O),
|
|
2477
|
+
onMouseleave: C
|
|
2478
|
+
}, [
|
|
2479
|
+
P("span", {
|
|
2480
|
+
class: "nc-barra-rotulo",
|
|
2481
|
+
style: B({ color: D(r) ? "#9ca3af" : "#6b7280" })
|
|
2482
|
+
}, q(w.rotulo), 5),
|
|
2483
|
+
P("div", {
|
|
2484
|
+
class: "nc-barra-track",
|
|
2485
|
+
style: B({ backgroundColor: a.value })
|
|
2486
|
+
}, [
|
|
2487
|
+
P("div", {
|
|
2488
|
+
class: "nc-barra-bar",
|
|
2489
|
+
style: B({
|
|
2490
|
+
width: (U.value[R] ?? 0) + "%",
|
|
2491
|
+
backgroundColor: D(n)[R],
|
|
2492
|
+
opacity: f.value === null || f.value === R ? 1 : 0.4
|
|
2493
|
+
})
|
|
2494
|
+
}, null, 4)
|
|
2495
|
+
], 4)
|
|
2496
|
+
], 40, is))), 128))
|
|
2497
|
+
])) : (M(), A("div", ns, [
|
|
2498
|
+
(M(!0), A(nt, null, bt(e.dados, (w, R) => (M(), A("div", {
|
|
2499
|
+
key: R,
|
|
2500
|
+
class: "nc-barra-row",
|
|
2501
|
+
onMouseenter: (O) => v(R, O),
|
|
2502
|
+
onMousemove: (O) => T(R, O),
|
|
2503
|
+
onMouseleave: C
|
|
2504
|
+
}, [
|
|
2505
|
+
P("span", {
|
|
2506
|
+
class: "nc-barra-rotulo",
|
|
2507
|
+
style: B({ color: D(r) ? "#9ca3af" : "#6b7280" })
|
|
2508
|
+
}, q(w.rotulo), 5),
|
|
2509
|
+
P("div", ss, [
|
|
2510
|
+
(M(!0), A(nt, null, bt(k(w), (O) => (M(), A("div", {
|
|
2511
|
+
key: O.key,
|
|
2512
|
+
class: "nc-barra-seg",
|
|
2513
|
+
style: B({
|
|
2514
|
+
width: O.valor / S.value * 100 + "%",
|
|
2515
|
+
backgroundColor: O.cor
|
|
2516
|
+
})
|
|
2517
|
+
}, null, 4))), 128))
|
|
2518
|
+
])
|
|
2519
|
+
], 40, as))), 128))
|
|
2520
|
+
]))
|
|
2521
|
+
], 512)
|
|
2522
|
+
], 6)
|
|
2523
|
+
]),
|
|
2524
|
+
_: 1
|
|
2525
|
+
}, 16)
|
|
2526
|
+
], 512));
|
|
2527
|
+
}
|
|
2528
|
+
}, Ns = /* @__PURE__ */ Ht(os, [["__scopeId", "data-v-039f1af9"]]), ls = { class: "nc-barra-tt-label" }, us = { class: "nc-barra-tt-label" }, cs = { class: "nc-barra-tt-line-label" }, fs = { class: "nc-barra-tt-line-value" }, ds = ["onMouseenter", "onMousemove"], hs = ["onMouseenter", "onMousemove"], _s = { class: "flex gap-1 w-full mt-1" }, ps = {
|
|
2529
|
+
__name: "CardColuna",
|
|
2530
|
+
props: {
|
|
2531
|
+
...ce,
|
|
2532
|
+
dados: {
|
|
2533
|
+
type: Array,
|
|
2534
|
+
default: () => [
|
|
2535
|
+
{ rotulo: "Jan", quantidade: 40 },
|
|
2536
|
+
{ rotulo: "Fev", quantidade: 65 },
|
|
2537
|
+
{ rotulo: "Mar", quantidade: 30 },
|
|
2538
|
+
{ rotulo: "Abr", quantidade: 80 },
|
|
2539
|
+
{ rotulo: "Mai", quantidade: 55 },
|
|
2540
|
+
{ rotulo: "Jun", quantidade: 70 }
|
|
2541
|
+
]
|
|
2542
|
+
},
|
|
2543
|
+
corPaleta: { type: String, default: "#1D4ED8" },
|
|
2544
|
+
moeda: { type: Boolean, default: !1 },
|
|
2545
|
+
// ── Modo dual ───────────────────────────────────────────────────────────
|
|
2546
|
+
// Quando 'dual', cada item de dados deve ter campos nomeados pelos keys de segmentos.
|
|
2547
|
+
// Ex: { rotulo: 'Jan', total_previsto: 100, total_recebido: 60 }
|
|
2548
|
+
modo: {
|
|
2549
|
+
type: String,
|
|
2550
|
+
default: "simples",
|
|
2551
|
+
validator: (o) => ["simples", "dual"].includes(o)
|
|
2552
|
+
},
|
|
2553
|
+
// [{ key: 'total_previsto', label: 'Previsto' }, { key: 'total_recebido', label: 'Recebido' }]
|
|
2554
|
+
// Ordem: maior (fundo) → menor (frente)
|
|
2555
|
+
segmentos: {
|
|
2556
|
+
type: Array,
|
|
2557
|
+
default: () => [
|
|
2558
|
+
{ key: "total_previsto", label: "Previsto" },
|
|
2559
|
+
{ key: "total_recebido", label: "Recebido" }
|
|
2560
|
+
]
|
|
2561
|
+
},
|
|
2562
|
+
// Campo extra exibido apenas no tooltip. Ex: { key: 'total_em_aberto', label: 'Em aberto' }
|
|
2563
|
+
segmentoTooltip: {
|
|
2564
|
+
type: Object,
|
|
2565
|
+
default: null
|
|
2566
|
+
}
|
|
2567
|
+
},
|
|
2568
|
+
emits: ["botao-click"],
|
|
2569
|
+
setup(o, { emit: t }) {
|
|
2570
|
+
const e = o, { isDark: r, tooltipCssVars: i } = le(F(() => e.tema)), { cores: n } = Ne(F(() => e.corPaleta), F(() => e.dados.length)), a = F(() => r.value ? "#252525" : "#E9E9E9"), s = W(null), u = W(null), c = W(null), l = W(120), d = W(null), { estreito: _ } = ue(c), h = fe(e), m = F(() => ({
|
|
2571
|
+
...h.value,
|
|
2572
|
+
direcao: _.value ? "vertical" : e.direcao
|
|
2573
|
+
}));
|
|
2574
|
+
mn(s, (w) => {
|
|
2575
|
+
l.value = w.contentRect.height || 120;
|
|
2576
|
+
});
|
|
2577
|
+
const f = F(() => Math.max(...e.dados.map((w) => w.quantidade), 1)), p = W(null), { tooltip: g, esconder: b } = gn(s, d);
|
|
2578
|
+
function y(w) {
|
|
2579
|
+
return e.moeda ? Number(w).toLocaleString("pt-BR", { style: "currency", currency: "BRL" }) : `${w}`;
|
|
2580
|
+
}
|
|
2581
|
+
function x() {
|
|
2582
|
+
ve(() => {
|
|
2583
|
+
if (!d.value || !s.value) return;
|
|
2584
|
+
const w = d.value.offsetWidth, R = s.value.offsetWidth, O = g.value.x, I = w / 2;
|
|
2585
|
+
let N = -I;
|
|
2586
|
+
O - I < 0 ? N = -O : O + I > R && (N = R - O - w), g.value.translateX = N + "px";
|
|
2587
|
+
});
|
|
2588
|
+
}
|
|
2589
|
+
function v(w, R) {
|
|
2590
|
+
const O = e.dados[w], I = s.value.getBoundingClientRect(), N = R.currentTarget.getBoundingClientRect(), ct = R.currentTarget.querySelector(".nc-barra-bar"), st = ct ? ct.getBoundingClientRect() : N, Pt = N.left - I.left + N.width / 2, ot = st.top - I.top;
|
|
2591
|
+
g.value = { visible: !0, x: Pt, y: ot, label: O.rotulo, value: y(O.quantidade), lines: null, acima: !0, translateX: "-50%" }, x();
|
|
2592
|
+
}
|
|
2593
|
+
function T(w, R) {
|
|
2594
|
+
const O = e.dados[w], I = s.value.getBoundingClientRect(), N = R.currentTarget.getBoundingClientRect(), ct = N.left - I.left + N.width / 2, st = N.top - I.top, Pt = e.segmentos.map((ot) => ({
|
|
2595
|
+
label: ot.label,
|
|
2596
|
+
valor: y(Number(O[ot.key]) || 0),
|
|
2597
|
+
cor: a.value
|
|
2598
|
+
}));
|
|
2599
|
+
Pt.length > 0 && (Pt[Pt.length - 1].cor = n.value[w] ?? e.corPaleta), e.segmentoTooltip && Pt.push({
|
|
2600
|
+
label: e.segmentoTooltip.label,
|
|
2601
|
+
valor: y(Number(O[e.segmentoTooltip.key]) || 0),
|
|
2602
|
+
cor: r.value ? "#666" : "#bbb"
|
|
2603
|
+
}), g.value = { visible: !0, x: ct, y: st, label: O.rotulo, value: null, lines: Pt, acima: !0, translateX: "-50%" }, x();
|
|
2604
|
+
}
|
|
2605
|
+
function C(w, R) {
|
|
2606
|
+
p.value = w, e.modo === "dual" ? T(w, R) : v(w, R);
|
|
2607
|
+
}
|
|
2608
|
+
function S(w, R) {
|
|
2609
|
+
e.modo === "dual" ? T(w, R) : v(w, R);
|
|
2610
|
+
}
|
|
2611
|
+
function k() {
|
|
2612
|
+
p.value = null, b();
|
|
2613
|
+
}
|
|
2614
|
+
const V = F(
|
|
2615
|
+
() => Math.max(1, ...e.dados.map((w) => {
|
|
2616
|
+
var R;
|
|
2617
|
+
return Number(w[(R = e.segmentos[0]) == null ? void 0 : R.key]) || 0;
|
|
2618
|
+
}))
|
|
2619
|
+
);
|
|
2620
|
+
function U(w) {
|
|
2621
|
+
return e.segmentos.map((R, O) => ({
|
|
2622
|
+
key: R.key,
|
|
2623
|
+
valor: Number(w[R.key]) || 0,
|
|
2624
|
+
// último segmento (frente) usa a cor da paleta, os demais ficam idle
|
|
2625
|
+
cor: O === e.segmentos.length - 1 ? n.value[e.dados.indexOf(w)] ?? e.corPaleta : a.value
|
|
2626
|
+
}));
|
|
2627
|
+
}
|
|
2628
|
+
const L = W(!1), $ = W([]);
|
|
2629
|
+
function E() {
|
|
2630
|
+
$.value = e.dados.map((w) => w.quantidade / f.value * 100);
|
|
2631
|
+
}
|
|
2632
|
+
function z() {
|
|
2633
|
+
$.value = e.dados.map(() => 0), ve(() => {
|
|
2634
|
+
L.value = !0, setTimeout(() => E(), 30);
|
|
2635
|
+
});
|
|
2636
|
+
}
|
|
2637
|
+
return E(), Qr(u, z), dt(() => e.dados, () => {
|
|
2638
|
+
z();
|
|
2639
|
+
}, { deep: !0 }), dt(() => e.corPaleta, () => {
|
|
2640
|
+
E();
|
|
2641
|
+
}), (w, R) => (M(), A("div", {
|
|
2642
|
+
ref_key: "rootRef",
|
|
2643
|
+
ref: c
|
|
2644
|
+
}, [
|
|
2645
|
+
ye(oe, ae(m.value, {
|
|
2646
|
+
onBotaoClick: R[0] || (R[0] = (O) => w.$emit("botao-click"))
|
|
2647
|
+
}), {
|
|
2648
|
+
"slot-content": Bt(() => [
|
|
2649
|
+
P("div", {
|
|
2650
|
+
ref_key: "wrapperRef",
|
|
2651
|
+
ref: u,
|
|
2652
|
+
class: "px-3 py-4 nc-coluna-wrapper",
|
|
2653
|
+
style: B(D(i))
|
|
2654
|
+
}, [
|
|
2655
|
+
P("div", {
|
|
2656
|
+
ref_key: "chartRef",
|
|
2657
|
+
ref: s,
|
|
2658
|
+
class: "nc-barra-chart-container"
|
|
2659
|
+
}, [
|
|
2660
|
+
ye(Or, { name: "nc-barra-tt" }, {
|
|
2661
|
+
default: Bt(() => [
|
|
2662
|
+
D(g).visible ? (M(), A("div", {
|
|
2663
|
+
key: 0,
|
|
2664
|
+
ref_key: "tooltipRef",
|
|
2665
|
+
ref: d,
|
|
2666
|
+
class: et(["nc-barra-tooltip", "nc-barra-tt--acima"]),
|
|
2667
|
+
style: B({ left: D(g).x + "px", top: D(g).y + "px", "--tx": D(g).translateX })
|
|
2668
|
+
}, [
|
|
2669
|
+
D(g).lines ? (M(), A(nt, { key: 1 }, [
|
|
2670
|
+
P("span", us, q(D(g).label), 1),
|
|
2671
|
+
(M(!0), A(nt, null, bt(D(g).lines, (O) => (M(), A("div", {
|
|
2672
|
+
key: O.label,
|
|
2673
|
+
class: "nc-barra-tt-line"
|
|
2674
|
+
}, [
|
|
2675
|
+
P("span", {
|
|
2676
|
+
class: "nc-barra-tt-dot",
|
|
2677
|
+
style: B({ backgroundColor: O.cor })
|
|
2678
|
+
}, null, 4),
|
|
2679
|
+
P("span", cs, q(O.label) + ":", 1),
|
|
2680
|
+
P("span", fs, q(O.valor), 1)
|
|
2681
|
+
]))), 128))
|
|
2682
|
+
], 64)) : (M(), A(nt, { key: 0 }, [
|
|
2683
|
+
P("span", ls, q(D(g).label), 1),
|
|
2684
|
+
P("span", {
|
|
2685
|
+
class: "nc-barra-tt-value",
|
|
2686
|
+
style: B({ color: o.corPaleta })
|
|
2687
|
+
}, q(D(g).value), 5)
|
|
2688
|
+
], 64))
|
|
2689
|
+
], 4)) : rt("", !0)
|
|
2690
|
+
]),
|
|
2691
|
+
_: 1
|
|
2692
|
+
}),
|
|
2693
|
+
o.modo === "simples" ? (M(), A("div", {
|
|
2694
|
+
key: 0,
|
|
2695
|
+
class: "flex align-items-end gap-1 w-full",
|
|
2696
|
+
style: B({ height: l.value - 20 + "px" })
|
|
2697
|
+
}, [
|
|
2698
|
+
(M(!0), A(nt, null, bt(o.dados, (O, I) => (M(), A("div", {
|
|
2699
|
+
key: I,
|
|
2700
|
+
class: "flex-1 nc-barra-col",
|
|
2701
|
+
onMouseenter: (N) => C(I, N),
|
|
2702
|
+
onMousemove: (N) => S(I, N),
|
|
2703
|
+
onMouseleave: k
|
|
2704
|
+
}, [
|
|
2705
|
+
P("div", {
|
|
2706
|
+
class: "nc-barra-bar",
|
|
2707
|
+
style: B({
|
|
2708
|
+
height: ($.value[I] ?? 0) + "%",
|
|
2709
|
+
backgroundColor: p.value === I ? D(n)[I] : a.value
|
|
2710
|
+
})
|
|
2711
|
+
}, null, 4)
|
|
2712
|
+
], 40, ds))), 128))
|
|
2713
|
+
], 4)) : (M(), A("div", {
|
|
2714
|
+
key: 1,
|
|
2715
|
+
class: "flex align-items-end gap-1 w-full",
|
|
2716
|
+
style: B({ height: l.value - 20 + "px" })
|
|
2717
|
+
}, [
|
|
2718
|
+
(M(!0), A(nt, null, bt(o.dados, (O, I) => (M(), A("div", {
|
|
2719
|
+
key: I,
|
|
2720
|
+
class: "flex-1 nc-barra-col-dual",
|
|
2721
|
+
onMouseenter: (N) => C(I, N),
|
|
2722
|
+
onMousemove: (N) => S(I, N),
|
|
2723
|
+
onMouseleave: k
|
|
2724
|
+
}, [
|
|
2725
|
+
(M(!0), A(nt, null, bt(U(O), (N) => (M(), A("div", {
|
|
2726
|
+
key: N.key,
|
|
2727
|
+
class: "nc-barra-seg",
|
|
2728
|
+
style: B({
|
|
2729
|
+
height: N.valor / V.value * (l.value - 20) + "px",
|
|
2730
|
+
backgroundColor: N.cor
|
|
2731
|
+
})
|
|
2732
|
+
}, null, 4))), 128))
|
|
2733
|
+
], 40, hs))), 128))
|
|
2734
|
+
], 4)),
|
|
2735
|
+
P("div", _s, [
|
|
2736
|
+
(M(!0), A(nt, null, bt(o.dados, (O, I) => (M(), A("div", {
|
|
2737
|
+
key: I,
|
|
2738
|
+
class: "flex-1 text-center nc-barra-rotulo",
|
|
2739
|
+
style: B({ color: D(r) ? "#888" : "#aaa" })
|
|
2740
|
+
}, q(O.rotulo), 5))), 128))
|
|
2741
|
+
])
|
|
2742
|
+
], 512)
|
|
2743
|
+
], 4)
|
|
2744
|
+
]),
|
|
2745
|
+
_: 1
|
|
2746
|
+
}, 16)
|
|
2747
|
+
], 512));
|
|
2748
|
+
}
|
|
2749
|
+
}, $s = /* @__PURE__ */ Ht(ps, [["__scopeId", "data-v-b5e11a34"]]), ms = { class: "nc-tooltip-label" }, gs = {
|
|
2750
|
+
key: 1,
|
|
2751
|
+
style: { position: "absolute", bottom: "8px", left: "0", right: "0", display: "flex", "justify-content": "space-between", padding: "0 4px", "pointer-events": "none" }
|
|
2752
|
+
}, vs = {
|
|
2753
|
+
__name: "CardLinhas",
|
|
2754
|
+
props: {
|
|
2755
|
+
...ce,
|
|
2756
|
+
corDetalhe: {
|
|
2757
|
+
type: String
|
|
2758
|
+
},
|
|
2759
|
+
dados: {
|
|
2760
|
+
type: Array,
|
|
2761
|
+
default: () => [
|
|
2762
|
+
{ rotulo: "Jan", quantidade: 30 },
|
|
2763
|
+
{ rotulo: "Fev", quantidade: 55 },
|
|
2764
|
+
{ rotulo: "Mar", quantidade: 40 },
|
|
2765
|
+
{ rotulo: "Abr", quantidade: 70 },
|
|
2766
|
+
{ rotulo: "Mai", quantidade: 50 },
|
|
2767
|
+
{ rotulo: "Jun", quantidade: 90 }
|
|
2768
|
+
]
|
|
2769
|
+
},
|
|
2770
|
+
legendaGraficoVisivel: {
|
|
2771
|
+
type: Boolean,
|
|
2772
|
+
default: !1
|
|
2773
|
+
},
|
|
2774
|
+
moeda: { type: Boolean, default: !1 },
|
|
2775
|
+
opcoes: {
|
|
2776
|
+
type: Object,
|
|
2777
|
+
default: () => ({})
|
|
2778
|
+
},
|
|
2779
|
+
minHeight: {
|
|
2780
|
+
type: String,
|
|
2781
|
+
default: "250px"
|
|
2782
|
+
}
|
|
2783
|
+
},
|
|
2784
|
+
setup(o) {
|
|
2785
|
+
Wt.register(xn, kn, Tn, wn, Cn, er, rr, Sn);
|
|
2786
|
+
const t = o, { tooltipCssVars: e } = le(F(() => t.tema)), r = fe(t), i = W(null), n = W(null), a = W(null), { estreito: s } = ue(a, 480), u = F(() => s.value ? "vertical" : t.direcao), c = W(!1);
|
|
2787
|
+
let l = null;
|
|
2788
|
+
const d = W({ visible: !1, x: 0, y: 0, label: "", value: "", acima: !0, translateX: "-50%" }), _ = W(0), h = W(null);
|
|
2789
|
+
function m(y, x) {
|
|
2790
|
+
const v = t.corDetalhe || "#0400FF", T = y.createLinearGradient(0, x.top, 0, x.bottom);
|
|
2791
|
+
return T.addColorStop(0.16, v + "33"), T.addColorStop(1, "#7C7C7C00"), T;
|
|
2792
|
+
}
|
|
2793
|
+
const f = F(() => ({
|
|
2794
|
+
labels: t.dados.map((y) => y.rotulo),
|
|
2795
|
+
datasets: [
|
|
2796
|
+
{
|
|
2797
|
+
label: t.titulo || "Série 1",
|
|
2798
|
+
data: t.dados.map((y) => y.quantidade),
|
|
2799
|
+
borderColor: t.corDetalhe || "#1D4ED8",
|
|
2800
|
+
backgroundColor: (y) => {
|
|
2801
|
+
const x = y.chart, { ctx: v, chartArea: T } = x;
|
|
2802
|
+
return T ? m(v, T) : "transparent";
|
|
2803
|
+
},
|
|
2804
|
+
fill: !0,
|
|
2805
|
+
tension: 0.4
|
|
2806
|
+
}
|
|
2807
|
+
]
|
|
2808
|
+
})), p = F(() => ({
|
|
2809
|
+
responsive: !0,
|
|
2810
|
+
maintainAspectRatio: !1,
|
|
2811
|
+
clip: !1,
|
|
2812
|
+
layout: { padding: 0 },
|
|
2813
|
+
plugins: {
|
|
2814
|
+
legend: { display: !1 },
|
|
2815
|
+
tooltip: {
|
|
2816
|
+
enabled: !1,
|
|
2817
|
+
external({ chart: y, tooltip: x }) {
|
|
2818
|
+
var z, w;
|
|
2819
|
+
if (x.opacity === 0) {
|
|
2820
|
+
d.value.visible = !1;
|
|
2821
|
+
return;
|
|
2822
|
+
}
|
|
2823
|
+
const v = (z = x.dataPoints) == null ? void 0 : z[0];
|
|
2824
|
+
if (!v) return;
|
|
2825
|
+
const T = v.raw, C = t.moeda ? Number(T).toLocaleString("pt-BR", { style: "currency", currency: "BRL" }) : v.formattedValue, S = y.canvas.getBoundingClientRect(), k = (w = n.value) == null ? void 0 : w.getBoundingClientRect();
|
|
2826
|
+
if (!k) return;
|
|
2827
|
+
const V = S.left + v.element.x, U = S.top + v.element.y, L = V - k.left, $ = U - k.top, E = $ > 56;
|
|
2828
|
+
_.value = L, d.value = {
|
|
2829
|
+
visible: !0,
|
|
2830
|
+
x: L,
|
|
2831
|
+
y: $,
|
|
2832
|
+
label: v.label,
|
|
2833
|
+
value: C,
|
|
2834
|
+
acima: E,
|
|
2835
|
+
translateX: "-50%"
|
|
2836
|
+
}, ve(() => {
|
|
2837
|
+
if (!h.value || !n.value) return;
|
|
2838
|
+
const R = h.value.offsetWidth, O = n.value.offsetWidth, I = R / 2;
|
|
2839
|
+
let N = -I;
|
|
2840
|
+
L - I < 0 ? N = -L : L + I > O && (N = O - L - R), d.value.translateX = N + "px";
|
|
2841
|
+
});
|
|
2842
|
+
}
|
|
2843
|
+
}
|
|
2844
|
+
},
|
|
2845
|
+
scales: {
|
|
2846
|
+
x: { display: !1 },
|
|
2847
|
+
y: { beginAtZero: !0, display: !1 }
|
|
2848
|
+
},
|
|
2849
|
+
animation: {
|
|
2850
|
+
duration: 600,
|
|
2851
|
+
easing: "easeInOutQuart"
|
|
2852
|
+
}
|
|
2853
|
+
}));
|
|
2854
|
+
function g() {
|
|
2855
|
+
i.value && (l && l.destroy(), l = new Wt(i.value, {
|
|
2856
|
+
type: "line",
|
|
2857
|
+
data: f.value,
|
|
2858
|
+
options: { ...p.value, ...t.opcoes }
|
|
2859
|
+
}));
|
|
2860
|
+
}
|
|
2861
|
+
function b() {
|
|
2862
|
+
if (!l) {
|
|
2863
|
+
g();
|
|
2864
|
+
return;
|
|
2865
|
+
}
|
|
2866
|
+
const y = f.value;
|
|
2867
|
+
l.data.labels = y.labels, l.data.datasets[0].data = y.datasets[0].data, l.data.datasets[0].borderColor = y.datasets[0].borderColor, l.update("active");
|
|
2868
|
+
}
|
|
2869
|
+
return Qr(n, () => {
|
|
2870
|
+
c.value = !0, g();
|
|
2871
|
+
}), Se(() => {
|
|
2872
|
+
l && (l.destroy(), l = null);
|
|
2873
|
+
}), dt(
|
|
2874
|
+
() => t.dados,
|
|
2875
|
+
() => b(),
|
|
2876
|
+
{ deep: !0 }
|
|
2877
|
+
), dt(
|
|
2878
|
+
() => t.legendaGraficoVisivel,
|
|
2879
|
+
() => g()
|
|
2880
|
+
), (y, x) => (M(), A("div", {
|
|
2881
|
+
ref_key: "containerRef",
|
|
2882
|
+
ref: a,
|
|
2883
|
+
style: { width: "100%" }
|
|
2884
|
+
}, [
|
|
2885
|
+
ye(oe, ae(D(r), {
|
|
2886
|
+
direcao: u.value,
|
|
2887
|
+
minHeight: o.minHeight
|
|
2888
|
+
}), {
|
|
2889
|
+
"slot-content": Bt(() => [
|
|
2890
|
+
P("div", {
|
|
2891
|
+
ref_key: "wrapperRef",
|
|
2892
|
+
ref: n,
|
|
2893
|
+
class: et(["nc-chart-wrapper", { "nc-chart-visible": c.value }]),
|
|
2894
|
+
style: B({
|
|
2895
|
+
position: u.value === "horizontal" ? "relative" : "absolute",
|
|
2896
|
+
inset: u.value === "horizontal" ? "unset" : "0px -5px 0px -5px",
|
|
2897
|
+
width: u.value === "horizontal" ? "100%" : void 0,
|
|
2898
|
+
height: u.value === "horizontal" ? "160px" : void 0,
|
|
2899
|
+
...D(e)
|
|
2900
|
+
})
|
|
2901
|
+
}, [
|
|
2902
|
+
P("canvas", {
|
|
2903
|
+
ref_key: "canvasRef",
|
|
2904
|
+
ref: i,
|
|
2905
|
+
style: { width: "100%", height: "100%" }
|
|
2906
|
+
}, null, 512),
|
|
2907
|
+
d.value.visible ? (M(), A("div", {
|
|
2908
|
+
key: 0,
|
|
2909
|
+
class: "nc-tooltip-line",
|
|
2910
|
+
style: B({ left: _.value + "px" })
|
|
2911
|
+
}, null, 4)) : rt("", !0),
|
|
2912
|
+
ye(Or, { name: "nc-tooltip" }, {
|
|
2913
|
+
default: Bt(() => [
|
|
2914
|
+
d.value.visible ? (M(), A("div", {
|
|
2915
|
+
key: 0,
|
|
2916
|
+
ref_key: "tooltipRef",
|
|
2917
|
+
ref: h,
|
|
2918
|
+
class: et(["nc-tooltip", d.value.acima ? "nc-tooltip--acima" : "nc-tooltip--abaixo"]),
|
|
2919
|
+
style: B({ left: d.value.x + "px", top: d.value.y + "px", "--tx": d.value.translateX })
|
|
2920
|
+
}, [
|
|
2921
|
+
P("span", ms, q(d.value.label), 1),
|
|
2922
|
+
P("span", {
|
|
2923
|
+
class: "nc-tooltip-value",
|
|
2924
|
+
style: B({ color: o.corDetalhe || "#1D4ED8" })
|
|
2925
|
+
}, q(d.value.value), 5)
|
|
2926
|
+
], 6)) : rt("", !0)
|
|
2927
|
+
]),
|
|
2928
|
+
_: 1
|
|
2929
|
+
}),
|
|
2930
|
+
o.legendaGraficoVisivel ? (M(), A("div", gs, [
|
|
2931
|
+
(M(!0), A(nt, null, bt(o.dados, (v) => (M(), A("span", {
|
|
2932
|
+
key: v.rotulo,
|
|
2933
|
+
style: { "font-size": "10px", color: "#9ca3af" }
|
|
2934
|
+
}, q(v.rotulo), 1))), 128))
|
|
2935
|
+
])) : rt("", !0)
|
|
2936
|
+
], 6)
|
|
2937
|
+
]),
|
|
2938
|
+
_: 1
|
|
2939
|
+
}, 16, ["direcao", "minHeight"])
|
|
2940
|
+
], 512));
|
|
2941
|
+
}
|
|
2942
|
+
}, Xs = /* @__PURE__ */ Ht(vs, [["__scopeId", "data-v-894401e8"]]), ys = { class: "nc-polar-chart" }, bs = {
|
|
2943
|
+
key: 0,
|
|
2944
|
+
class: "flex flex-column gap-2 w-full"
|
|
2945
|
+
}, xs = { class: "flex align-items-center gap-2" }, ks = {
|
|
2946
|
+
__name: "CardPolar",
|
|
2947
|
+
props: {
|
|
2948
|
+
...ce,
|
|
2949
|
+
dados: {
|
|
2950
|
+
type: Array,
|
|
2951
|
+
default: () => [
|
|
2952
|
+
{ rotulo: "Vendas", quantidade: 30 },
|
|
2953
|
+
{ rotulo: "Marketing", quantidade: 20 },
|
|
2954
|
+
{ rotulo: "Suporte", quantidade: 15 },
|
|
2955
|
+
{ rotulo: "TI", quantidade: 25 },
|
|
2956
|
+
{ rotulo: "RH", quantidade: 10 }
|
|
2957
|
+
]
|
|
2958
|
+
},
|
|
2959
|
+
corPaleta: { type: String, default: "#1D4ED8" },
|
|
2960
|
+
labelRotulo: { type: String, default: "Rótulo" },
|
|
2961
|
+
labelQuantidade: { type: String, default: "Qtd." },
|
|
2962
|
+
legendaGraficoVisivel: { type: Boolean, default: !0 },
|
|
2963
|
+
opcoes: { type: Object, default: () => ({}) }
|
|
2964
|
+
},
|
|
2965
|
+
emits: ["botao-click"],
|
|
2966
|
+
setup(o, { emit: t }) {
|
|
2967
|
+
Wt.register(Pn, Rn, Mr, er, rr);
|
|
2968
|
+
const e = o, { isDark: r, chartTooltipColors: i } = le(F(() => e.tema)), n = fe(e), { cores: a } = Ne(F(() => e.corPaleta), F(() => e.dados.length)), s = W(null), u = W(null), { estreito: c } = ue(u);
|
|
2969
|
+
let l = null;
|
|
2970
|
+
const d = F(() => ({
|
|
2971
|
+
labels: e.dados.map((m) => m.rotulo),
|
|
2972
|
+
datasets: [{
|
|
2973
|
+
data: e.dados.map((m) => m.quantidade),
|
|
2974
|
+
backgroundColor: a.value,
|
|
2975
|
+
borderWidth: 0,
|
|
2976
|
+
borderColor: "transparent"
|
|
2977
|
+
}]
|
|
2978
|
+
})), _ = F(() => {
|
|
2979
|
+
const { bg: m, border: f, titleColor: p, bodyColor: g } = i.value, b = r.value ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.05)";
|
|
2980
|
+
return {
|
|
2981
|
+
responsive: !0,
|
|
2982
|
+
maintainAspectRatio: !1,
|
|
2983
|
+
animation: { duration: 800, easing: "easeOutQuart" },
|
|
2984
|
+
plugins: {
|
|
2985
|
+
legend: { display: !1 },
|
|
2986
|
+
tooltip: {
|
|
2987
|
+
enabled: !0,
|
|
2988
|
+
backgroundColor: m,
|
|
2989
|
+
titleColor: p,
|
|
2990
|
+
bodyColor: g,
|
|
2991
|
+
borderColor: f,
|
|
2992
|
+
borderWidth: 1,
|
|
2993
|
+
padding: { x: 12, y: 8 },
|
|
2994
|
+
cornerRadius: 8,
|
|
2995
|
+
boxPadding: 4,
|
|
2996
|
+
titleFont: { size: 12, weight: "bold" },
|
|
2997
|
+
bodyFont: { size: 12 },
|
|
2998
|
+
callbacks: {
|
|
2999
|
+
label: (y) => ` ${y.formattedValue}`
|
|
3000
|
+
}
|
|
3001
|
+
}
|
|
3002
|
+
},
|
|
3003
|
+
scales: {
|
|
3004
|
+
r: {
|
|
3005
|
+
ticks: { display: !1 },
|
|
3006
|
+
grid: { color: b },
|
|
3007
|
+
pointLabels: { display: !1 }
|
|
3008
|
+
}
|
|
3009
|
+
},
|
|
3010
|
+
...e.opcoes
|
|
3011
|
+
};
|
|
3012
|
+
});
|
|
3013
|
+
function h() {
|
|
3014
|
+
if (!s.value) return;
|
|
3015
|
+
l && l.destroy();
|
|
3016
|
+
const m = {
|
|
3017
|
+
labels: d.value.labels,
|
|
3018
|
+
datasets: [{
|
|
3019
|
+
...d.value.datasets[0],
|
|
3020
|
+
data: d.value.datasets[0].data.map(() => 0)
|
|
3021
|
+
}]
|
|
3022
|
+
};
|
|
3023
|
+
l = new Wt(s.value, {
|
|
3024
|
+
type: "polarArea",
|
|
3025
|
+
data: m,
|
|
3026
|
+
options: { ..._.value, animation: !1 }
|
|
3027
|
+
}), requestAnimationFrame(() => {
|
|
3028
|
+
l && (l.options.animation = _.value.animation, l.data = d.value, l.update());
|
|
3029
|
+
});
|
|
3030
|
+
}
|
|
3031
|
+
return Se(() => {
|
|
3032
|
+
l && (l.destroy(), l = null);
|
|
3033
|
+
}), dt(() => e.dados, () => h(), { deep: !0 }), dt(() => e.corPaleta, () => h()), dt(() => e.tema, () => h()), (m, f) => (M(), tr(oe, ae(D(n), {
|
|
3034
|
+
onAnimComplete: h,
|
|
3035
|
+
onBotaoClick: f[0] || (f[0] = (p) => m.$emit("botao-click"))
|
|
3036
|
+
}), {
|
|
3037
|
+
"slot-content": Bt(() => [
|
|
3038
|
+
P("div", {
|
|
3039
|
+
ref_key: "wrapperRef",
|
|
3040
|
+
ref: u,
|
|
3041
|
+
class: et(["px-3 py-5 nc-polar-wrapper", !D(c) && e.direcao === "horizontal" ? "nc-polar-horizontal" : "nc-polar-vertical"])
|
|
3042
|
+
}, [
|
|
3043
|
+
P("div", ys, [
|
|
3044
|
+
P("canvas", {
|
|
3045
|
+
ref_key: "canvasRef",
|
|
3046
|
+
ref: s
|
|
3047
|
+
}, null, 512)
|
|
3048
|
+
]),
|
|
3049
|
+
o.legendaGraficoVisivel ? (M(), A("div", bs, [
|
|
3050
|
+
P("div", {
|
|
3051
|
+
class: "flex justify-content-between pb-2 border-bottom-1",
|
|
3052
|
+
style: B({ borderColor: D(r) ? "rgba(255,255,255,0.1)" : "#e5e7eb" })
|
|
3053
|
+
}, [
|
|
3054
|
+
P("span", {
|
|
3055
|
+
class: "nc-polar-legenda-label",
|
|
3056
|
+
style: B({ color: D(r) ? "#9ca3af" : "#6b7280" })
|
|
3057
|
+
}, q(o.labelRotulo), 5),
|
|
3058
|
+
P("span", {
|
|
3059
|
+
class: "nc-polar-legenda-label",
|
|
3060
|
+
style: B({ color: D(r) ? "#9ca3af" : "#6b7280" })
|
|
3061
|
+
}, q(o.labelQuantidade), 5)
|
|
3062
|
+
], 4),
|
|
3063
|
+
(M(!0), A(nt, null, bt(o.dados, (p, g) => (M(), A("div", {
|
|
3064
|
+
key: p.rotulo,
|
|
3065
|
+
class: "flex align-items-center justify-content-between"
|
|
3066
|
+
}, [
|
|
3067
|
+
P("div", xs, [
|
|
3068
|
+
P("span", {
|
|
3069
|
+
class: "nc-polar-dot",
|
|
3070
|
+
style: B({ backgroundColor: D(a)[g] })
|
|
3071
|
+
}, null, 4),
|
|
3072
|
+
P("span", {
|
|
3073
|
+
class: "nc-polar-legenda-text",
|
|
3074
|
+
style: B({ color: D(r) ? "#e5e7eb" : "#374151" })
|
|
3075
|
+
}, q(p.rotulo), 5)
|
|
3076
|
+
]),
|
|
3077
|
+
P("span", {
|
|
3078
|
+
class: "nc-polar-legenda-qtd",
|
|
3079
|
+
style: B({ color: D(r) ? "#fff" : "#111" })
|
|
3080
|
+
}, q(p.quantidade), 5)
|
|
3081
|
+
]))), 128))
|
|
3082
|
+
])) : rt("", !0)
|
|
3083
|
+
], 2)
|
|
3084
|
+
]),
|
|
3085
|
+
_: 1
|
|
3086
|
+
}, 16));
|
|
3087
|
+
}
|
|
3088
|
+
}, Us = /* @__PURE__ */ Ht(ks, [["__scopeId", "data-v-feaf2b5f"]]), Ts = {
|
|
3089
|
+
key: 1,
|
|
3090
|
+
class: "flex justify-content-between align-items-baseline mt-1"
|
|
3091
|
+
}, ws = { class: "flex align-items-center gap-1" }, Cs = {
|
|
3092
|
+
key: 0,
|
|
3093
|
+
class: "nc-progresso-badge text-xs font-semibold"
|
|
3094
|
+
}, Ss = {
|
|
3095
|
+
__name: "CardProgresso",
|
|
3096
|
+
props: {
|
|
3097
|
+
...ce,
|
|
3098
|
+
total: { type: Number, default: 100 },
|
|
3099
|
+
executado: { type: Number, default: 0 },
|
|
3100
|
+
rotulo: { type: String, default: "" },
|
|
3101
|
+
exibirValores: { type: Boolean, default: !0 },
|
|
3102
|
+
animado: { type: Boolean, default: !0 },
|
|
3103
|
+
moeda: { type: Boolean, default: !1 }
|
|
3104
|
+
},
|
|
3105
|
+
emits: ["botao-click"],
|
|
3106
|
+
setup(o, { emit: t }) {
|
|
3107
|
+
const e = o, { isDark: r } = le(F(() => e.tema)), i = fe(e), n = W(null);
|
|
3108
|
+
ue(n);
|
|
3109
|
+
const a = W(!1), s = F(() => !e.total || e.total <= 0 ? 0 : e.executado / e.total * 100), u = F(() => s.value > 100), c = F(() => Math.min(100, Math.max(0, s.value))), l = F(() => {
|
|
3110
|
+
if (u.value) return "#ef4444";
|
|
3111
|
+
const m = s.value;
|
|
3112
|
+
return m < 75 ? "#22c55e" : m < 90 ? "#eab308" : "#ef4444";
|
|
3113
|
+
}), d = (m) => e.moeda ? m.toLocaleString("pt-BR", { style: "currency", currency: "BRL" }) : m.toLocaleString("pt-BR"), _ = F(() => `${Math.round(s.value)}%`);
|
|
3114
|
+
function h() {
|
|
3115
|
+
e.animado ? (a.value = !1, requestAnimationFrame(() => {
|
|
3116
|
+
requestAnimationFrame(() => {
|
|
3117
|
+
a.value = !0;
|
|
3118
|
+
});
|
|
3119
|
+
})) : a.value = !0;
|
|
3120
|
+
}
|
|
3121
|
+
return (m, f) => (M(), tr(oe, ae(D(i), {
|
|
3122
|
+
onAnimComplete: h,
|
|
3123
|
+
onBotaoClick: f[0] || (f[0] = (p) => m.$emit("botao-click"))
|
|
3124
|
+
}), {
|
|
3125
|
+
"slot-content": Bt(() => [
|
|
3126
|
+
P("div", {
|
|
3127
|
+
ref_key: "wrapperRef",
|
|
3128
|
+
ref: n,
|
|
3129
|
+
class: "flex flex-column gap-2 px-3 py-4"
|
|
3130
|
+
}, [
|
|
3131
|
+
o.rotulo ? (M(), A("div", {
|
|
3132
|
+
key: 0,
|
|
3133
|
+
class: "nc-progresso-rotulo uppercase font-medium",
|
|
3134
|
+
style: B({ color: D(r) ? "#9ca3af" : "#6b7280" })
|
|
3135
|
+
}, q(o.rotulo), 5)) : rt("", !0),
|
|
3136
|
+
P("div", {
|
|
3137
|
+
class: "nc-progresso-trilha w-full overflow-hidden border-round-xl",
|
|
3138
|
+
style: B({ backgroundColor: D(r) ? "rgba(255,255,255,0.1)" : "#e5e7eb" })
|
|
3139
|
+
}, [
|
|
3140
|
+
P("div", {
|
|
3141
|
+
class: et(["nc-progresso-barra border-round-xl", { "nc-progresso-barra--animado": a.value }]),
|
|
3142
|
+
style: B({
|
|
3143
|
+
backgroundColor: l.value,
|
|
3144
|
+
width: a.value ? c.value + "%" : "0%"
|
|
3145
|
+
})
|
|
3146
|
+
}, null, 6)
|
|
3147
|
+
], 4),
|
|
3148
|
+
o.exibirValores ? (M(), A("div", Ts, [
|
|
3149
|
+
P("span", {
|
|
3150
|
+
class: "text-xl font-bold",
|
|
3151
|
+
style: B({ color: l.value })
|
|
3152
|
+
}, [
|
|
3153
|
+
bn(q(d(o.executado)) + " ", 1),
|
|
3154
|
+
P("span", {
|
|
3155
|
+
class: "text-xs font-medium",
|
|
3156
|
+
style: B({ color: D(r) ? "#6b7280" : "#9ca3af" })
|
|
3157
|
+
}, " de " + q(d(o.total)), 5)
|
|
3158
|
+
], 4),
|
|
3159
|
+
P("span", ws, [
|
|
3160
|
+
u.value ? (M(), A("span", Cs, " Limite ultrapassado ")) : rt("", !0),
|
|
3161
|
+
P("span", {
|
|
3162
|
+
class: "text-xs font-medium opacity-80",
|
|
3163
|
+
style: B({ color: l.value })
|
|
3164
|
+
}, q(_.value), 5)
|
|
3165
|
+
])
|
|
3166
|
+
])) : rt("", !0)
|
|
3167
|
+
], 512)
|
|
3168
|
+
]),
|
|
3169
|
+
_: 1
|
|
3170
|
+
}, 16));
|
|
3171
|
+
}
|
|
3172
|
+
}, Ws = /* @__PURE__ */ Ht(Ss, [["__scopeId", "data-v-54c93bd4"]]), Ps = { class: "nc-rosquinha-chart" }, Rs = {
|
|
3173
|
+
key: 0,
|
|
3174
|
+
class: "nc-rosquinha-center"
|
|
3175
|
+
}, Os = {
|
|
3176
|
+
key: 0,
|
|
3177
|
+
class: "nc-rosquinha-valor-desc"
|
|
3178
|
+
}, Ms = {
|
|
3179
|
+
key: 0,
|
|
3180
|
+
class: "flex flex-column gap-2 w-full"
|
|
3181
|
+
}, Ds = { class: "flex align-items-center gap-2" }, As = {
|
|
3182
|
+
__name: "CardRosquinha",
|
|
3183
|
+
props: {
|
|
3184
|
+
...ce,
|
|
3185
|
+
dados: {
|
|
3186
|
+
type: Array,
|
|
3187
|
+
default: () => [
|
|
3188
|
+
{ rotulo: "Categoria A", quantidade: 40 },
|
|
3189
|
+
{ rotulo: "Categoria B", quantidade: 25 },
|
|
3190
|
+
{ rotulo: "Categoria C", quantidade: 20 },
|
|
3191
|
+
{ rotulo: "Categoria D", quantidade: 15 }
|
|
3192
|
+
]
|
|
3193
|
+
},
|
|
3194
|
+
corPaleta: { type: String, default: "#1D4ED8" },
|
|
3195
|
+
valor: { type: String, default: "" },
|
|
3196
|
+
valorDescricao: { type: String, default: "" },
|
|
3197
|
+
labelRotulo: { type: String, default: "Rótulo" },
|
|
3198
|
+
labelQuantidade: { type: String, default: "Qtd." },
|
|
3199
|
+
legendaGraficoVisivel: { type: Boolean, default: !0 },
|
|
3200
|
+
opcoes: { type: Object, default: () => ({}) }
|
|
3201
|
+
},
|
|
3202
|
+
setup(o) {
|
|
3203
|
+
Wt.register(pi, Mr, er, rr);
|
|
3204
|
+
const t = o, { isDark: e, chartTooltipColors: r } = le(F(() => t.tema)), i = fe(t), { cores: n } = Ne(F(() => t.corPaleta), F(() => t.dados.length)), a = W(null), s = W(null), { estreito: u } = ue(s);
|
|
3205
|
+
let c = null;
|
|
3206
|
+
const l = F(() => ({
|
|
3207
|
+
labels: t.dados.map((h) => h.rotulo),
|
|
3208
|
+
datasets: [{
|
|
3209
|
+
data: t.dados.map((h) => h.quantidade),
|
|
3210
|
+
backgroundColor: n.value,
|
|
3211
|
+
borderWidth: 0,
|
|
3212
|
+
borderColor: "transparent"
|
|
3213
|
+
}]
|
|
3214
|
+
})), d = F(() => {
|
|
3215
|
+
const { bg: h, border: m, titleColor: f, bodyColor: p } = r.value;
|
|
3216
|
+
return {
|
|
3217
|
+
responsive: !0,
|
|
3218
|
+
maintainAspectRatio: !1,
|
|
3219
|
+
cutout: t.valor ? "68%" : "55%",
|
|
3220
|
+
animation: { duration: 800, easing: "easeOutQuart", animateRotate: !0, animateScale: !1 },
|
|
3221
|
+
plugins: {
|
|
3222
|
+
legend: { display: !1 },
|
|
3223
|
+
tooltip: {
|
|
3224
|
+
enabled: !0,
|
|
3225
|
+
backgroundColor: h,
|
|
3226
|
+
titleColor: f,
|
|
3227
|
+
bodyColor: p,
|
|
3228
|
+
borderColor: m,
|
|
3229
|
+
borderWidth: 1,
|
|
3230
|
+
padding: { x: 12, y: 8 },
|
|
3231
|
+
cornerRadius: 8,
|
|
3232
|
+
boxPadding: 4,
|
|
3233
|
+
titleFont: { size: 12, weight: "bold" },
|
|
3234
|
+
bodyFont: { size: 12 },
|
|
3235
|
+
callbacks: {
|
|
3236
|
+
label: (g) => ` ${g.formattedValue}`
|
|
3237
|
+
}
|
|
3238
|
+
}
|
|
3239
|
+
},
|
|
3240
|
+
...t.opcoes
|
|
3241
|
+
};
|
|
3242
|
+
});
|
|
3243
|
+
function _() {
|
|
3244
|
+
if (!a.value) return;
|
|
3245
|
+
c && c.destroy();
|
|
3246
|
+
const h = {
|
|
3247
|
+
labels: l.value.labels,
|
|
3248
|
+
datasets: [{ ...l.value.datasets[0], data: l.value.datasets[0].data.map(() => 0) }]
|
|
3249
|
+
};
|
|
3250
|
+
c = new Wt(a.value, {
|
|
3251
|
+
type: "doughnut",
|
|
3252
|
+
data: h,
|
|
3253
|
+
options: { ...d.value, animation: !1 }
|
|
3254
|
+
}), requestAnimationFrame(() => {
|
|
3255
|
+
c && (c.options.animation = d.value.animation, c.data = l.value, c.update());
|
|
3256
|
+
});
|
|
3257
|
+
}
|
|
3258
|
+
return Se(() => {
|
|
3259
|
+
c && (c.destroy(), c = null);
|
|
3260
|
+
}), dt(() => t.dados, () => _(), { deep: !0 }), dt(() => t.corPaleta, () => _()), dt(() => t.valor, () => _()), (h, m) => (M(), tr(oe, ae(D(i), { onAnimComplete: _ }), {
|
|
3261
|
+
"slot-content": Bt(() => [
|
|
3262
|
+
P("div", {
|
|
3263
|
+
ref_key: "wrapperRef",
|
|
3264
|
+
ref: s,
|
|
3265
|
+
class: et(["px-3 py-5 nc-rosquinha-wrapper", !D(u) && t.direcao === "horizontal" ? "nc-rosquinha-horizontal" : "nc-rosquinha-vertical"])
|
|
3266
|
+
}, [
|
|
3267
|
+
P("div", Ps, [
|
|
3268
|
+
P("canvas", {
|
|
3269
|
+
ref_key: "canvasRef",
|
|
3270
|
+
ref: a
|
|
3271
|
+
}, null, 512),
|
|
3272
|
+
o.valor ? (M(), A("div", Rs, [
|
|
3273
|
+
P("span", {
|
|
3274
|
+
class: "nc-rosquinha-valor",
|
|
3275
|
+
style: B({ color: D(e) ? "#fff" : "#111" })
|
|
3276
|
+
}, q(o.valor), 5),
|
|
3277
|
+
o.valorDescricao ? (M(), A("span", Os, q(o.valorDescricao), 1)) : rt("", !0)
|
|
3278
|
+
])) : rt("", !0)
|
|
3279
|
+
]),
|
|
3280
|
+
o.legendaGraficoVisivel ? (M(), A("div", Ms, [
|
|
3281
|
+
P("div", {
|
|
3282
|
+
class: "flex justify-content-between pb-2 border-bottom-1",
|
|
3283
|
+
style: B({ borderColor: D(e) ? "rgba(255,255,255,0.1)" : "#e5e7eb" })
|
|
3284
|
+
}, [
|
|
3285
|
+
P("span", {
|
|
3286
|
+
class: "nc-rosquinha-legenda-label",
|
|
3287
|
+
style: B({ color: D(e) ? "#9ca3af" : "#6b7280" })
|
|
3288
|
+
}, q(o.labelRotulo), 5),
|
|
3289
|
+
P("span", {
|
|
3290
|
+
class: "nc-rosquinha-legenda-label",
|
|
3291
|
+
style: B({ color: D(e) ? "#9ca3af" : "#6b7280" })
|
|
3292
|
+
}, q(o.labelQuantidade), 5)
|
|
3293
|
+
], 4),
|
|
3294
|
+
(M(!0), A(nt, null, bt(o.dados, (f, p) => (M(), A("div", {
|
|
3295
|
+
key: f.rotulo,
|
|
3296
|
+
class: "nc-rosquinha-legenda-item flex align-items-center justify-content-between"
|
|
3297
|
+
}, [
|
|
3298
|
+
P("div", Ds, [
|
|
3299
|
+
P("span", {
|
|
3300
|
+
class: "nc-rosquinha-dot",
|
|
3301
|
+
style: B({ backgroundColor: D(n)[p] })
|
|
3302
|
+
}, null, 4),
|
|
3303
|
+
P("span", {
|
|
3304
|
+
class: "nc-rosquinha-legenda-text",
|
|
3305
|
+
style: B({ color: D(e) ? "#e5e7eb" : "#374151" })
|
|
3306
|
+
}, q(f.rotulo), 5)
|
|
3307
|
+
]),
|
|
3308
|
+
P("span", {
|
|
3309
|
+
class: "nc-rosquinha-legenda-qtd",
|
|
3310
|
+
style: B({ color: D(e) ? "#fff" : "#111" })
|
|
3311
|
+
}, q(f.quantidade), 5)
|
|
3312
|
+
]))), 128))
|
|
3313
|
+
])) : rt("", !0)
|
|
3314
|
+
], 2)
|
|
3315
|
+
]),
|
|
3316
|
+
_: 1
|
|
3317
|
+
}, 16));
|
|
3318
|
+
}
|
|
3319
|
+
}, Ys = /* @__PURE__ */ Ht(As, [["__scopeId", "data-v-cc18903b"]]), Es = { class: "nc-semicirculo-chart flex-shrink-0" }, Bs = {
|
|
3320
|
+
key: 0,
|
|
3321
|
+
class: "nc-semicirculo-center"
|
|
3322
|
+
}, zs = {
|
|
3323
|
+
key: 0,
|
|
3324
|
+
class: "nc-semicirculo-valor-desc"
|
|
3325
|
+
}, Fs = {
|
|
3326
|
+
key: 0,
|
|
3327
|
+
class: "flex flex-column gap-2 w-full"
|
|
3328
|
+
}, qs = { class: "flex align-items-center gap-2" }, Vs = {
|
|
3329
|
+
__name: "CardSemiCirculo",
|
|
3330
|
+
props: {
|
|
3331
|
+
...ce,
|
|
3332
|
+
dados: {
|
|
3333
|
+
type: Array,
|
|
3334
|
+
default: () => [
|
|
3335
|
+
{ rotulo: "Categoria A", quantidade: 40 },
|
|
3336
|
+
{ rotulo: "Categoria B", quantidade: 25 },
|
|
3337
|
+
{ rotulo: "Categoria C", quantidade: 20 },
|
|
3338
|
+
{ rotulo: "Categoria D", quantidade: 15 }
|
|
3339
|
+
]
|
|
3340
|
+
},
|
|
3341
|
+
corPaleta: { type: String, default: "#1D4ED8" },
|
|
3342
|
+
labelRotulo: { type: String, default: "Rótulo" },
|
|
3343
|
+
labelQuantidade: { type: String, default: "Qtd." },
|
|
3344
|
+
legendaGraficoVisivel: { type: Boolean, default: !0 },
|
|
3345
|
+
opcoes: { type: Object, default: () => ({}) },
|
|
3346
|
+
valor: { type: String, default: "" },
|
|
3347
|
+
valorDescricao: { type: String, default: "" }
|
|
3348
|
+
},
|
|
3349
|
+
emits: ["botao-click"],
|
|
3350
|
+
setup(o, { emit: t }) {
|
|
3351
|
+
Wt.register(pi, Mr, er, rr);
|
|
3352
|
+
const e = o, { isDark: r, chartTooltipColors: i } = le(F(() => e.tema)), n = fe(e), { cores: a } = Ne(F(() => e.corPaleta), F(() => e.dados.length)), s = W(null), u = W(null), { estreito: c } = ue(u);
|
|
3353
|
+
let l = null;
|
|
3354
|
+
const d = F(() => ({
|
|
3355
|
+
labels: e.dados.map((m) => m.rotulo),
|
|
3356
|
+
datasets: [{
|
|
3357
|
+
data: e.dados.map((m) => m.quantidade),
|
|
3358
|
+
backgroundColor: a.value,
|
|
3359
|
+
borderWidth: 0,
|
|
3360
|
+
borderColor: "transparent"
|
|
3361
|
+
}]
|
|
3362
|
+
})), _ = F(() => {
|
|
3363
|
+
const { bg: m, border: f, titleColor: p, bodyColor: g } = i.value;
|
|
3364
|
+
return {
|
|
3365
|
+
responsive: !0,
|
|
3366
|
+
maintainAspectRatio: !1,
|
|
3367
|
+
rotation: -90,
|
|
3368
|
+
circumference: 180,
|
|
3369
|
+
cutout: "60%",
|
|
3370
|
+
animation: { duration: 800, easing: "easeOutQuart", animateRotate: !0, animateScale: !1 },
|
|
3371
|
+
plugins: {
|
|
3372
|
+
legend: { display: !1 },
|
|
3373
|
+
tooltip: {
|
|
3374
|
+
enabled: !0,
|
|
3375
|
+
backgroundColor: m,
|
|
3376
|
+
titleColor: p,
|
|
3377
|
+
bodyColor: g,
|
|
3378
|
+
borderColor: f,
|
|
3379
|
+
borderWidth: 1,
|
|
3380
|
+
padding: { x: 12, y: 8 },
|
|
3381
|
+
cornerRadius: 8,
|
|
3382
|
+
boxPadding: 4,
|
|
3383
|
+
titleFont: { size: 12, weight: "bold" },
|
|
3384
|
+
bodyFont: { size: 12 },
|
|
3385
|
+
callbacks: {
|
|
3386
|
+
label: (b) => ` ${b.formattedValue}`
|
|
3387
|
+
}
|
|
3388
|
+
}
|
|
3389
|
+
},
|
|
3390
|
+
...e.opcoes
|
|
3391
|
+
};
|
|
3392
|
+
});
|
|
3393
|
+
function h() {
|
|
3394
|
+
if (!s.value) return;
|
|
3395
|
+
l && l.destroy();
|
|
3396
|
+
const m = {
|
|
3397
|
+
labels: d.value.labels,
|
|
3398
|
+
datasets: [{
|
|
3399
|
+
...d.value.datasets[0],
|
|
3400
|
+
data: d.value.datasets[0].data.map(() => 0)
|
|
3401
|
+
}]
|
|
3402
|
+
};
|
|
3403
|
+
l = new Wt(s.value, {
|
|
3404
|
+
type: "doughnut",
|
|
3405
|
+
data: m,
|
|
3406
|
+
options: { ..._.value, animation: !1 }
|
|
3407
|
+
}), requestAnimationFrame(() => {
|
|
3408
|
+
l && (l.options.animation = _.value.animation, l.data = d.value, l.update());
|
|
3409
|
+
});
|
|
3410
|
+
}
|
|
3411
|
+
return Se(() => {
|
|
3412
|
+
l && (l.destroy(), l = null);
|
|
3413
|
+
}), dt(() => e.dados, () => h(), { deep: !0 }), dt(() => e.corPaleta, () => h()), dt(() => e.tema, () => h()), (m, f) => (M(), tr(oe, ae(D(n), {
|
|
3414
|
+
onAnimComplete: h,
|
|
3415
|
+
onBotaoClick: f[0] || (f[0] = (p) => m.$emit("botao-click"))
|
|
3416
|
+
}), {
|
|
3417
|
+
"slot-content": Bt(() => [
|
|
3418
|
+
P("div", {
|
|
3419
|
+
ref_key: "wrapperRef",
|
|
3420
|
+
ref: u,
|
|
3421
|
+
class: et(["px-3 py-4 flex align-items-center nc-semicirculo-wrapper", !D(c) && e.direcao === "horizontal" ? "nc-semicirculo-horizontal" : "nc-semicirculo-vertical"])
|
|
3422
|
+
}, [
|
|
3423
|
+
P("div", Es, [
|
|
3424
|
+
P("canvas", {
|
|
3425
|
+
ref_key: "canvasRef",
|
|
3426
|
+
ref: s
|
|
3427
|
+
}, null, 512),
|
|
3428
|
+
o.valor ? (M(), A("div", Bs, [
|
|
3429
|
+
P("span", {
|
|
3430
|
+
class: "font-bold",
|
|
3431
|
+
style: B({ color: D(r) ? "#fff" : "#111" })
|
|
3432
|
+
}, q(o.valor), 5),
|
|
3433
|
+
o.valorDescricao ? (M(), A("span", zs, q(o.valorDescricao), 1)) : rt("", !0)
|
|
3434
|
+
])) : rt("", !0)
|
|
3435
|
+
]),
|
|
3436
|
+
o.legendaGraficoVisivel ? (M(), A("div", Fs, [
|
|
3437
|
+
P("div", {
|
|
3438
|
+
class: "flex justify-content-between pb-2 border-bottom-1",
|
|
3439
|
+
style: B({ borderColor: D(r) ? "rgba(255,255,255,0.1)" : "#e5e7eb" })
|
|
3440
|
+
}, [
|
|
3441
|
+
P("span", {
|
|
3442
|
+
class: "nc-semicirculo-legenda-label",
|
|
3443
|
+
style: B({ color: D(r) ? "#9ca3af" : "#6b7280" })
|
|
3444
|
+
}, q(o.labelRotulo), 5),
|
|
3445
|
+
P("span", {
|
|
3446
|
+
class: "nc-semicirculo-legenda-label",
|
|
3447
|
+
style: B({ color: D(r) ? "#9ca3af" : "#6b7280" })
|
|
3448
|
+
}, q(o.labelQuantidade), 5)
|
|
3449
|
+
], 4),
|
|
3450
|
+
(M(!0), A(nt, null, bt(o.dados, (p, g) => (M(), A("div", {
|
|
3451
|
+
key: p.rotulo,
|
|
3452
|
+
class: "flex align-items-center justify-content-between"
|
|
3453
|
+
}, [
|
|
3454
|
+
P("div", qs, [
|
|
3455
|
+
P("span", {
|
|
3456
|
+
class: "nc-semicirculo-dot",
|
|
3457
|
+
style: B({ backgroundColor: D(a)[g] })
|
|
3458
|
+
}, null, 4),
|
|
3459
|
+
P("span", {
|
|
3460
|
+
class: "nc-semicirculo-legenda-text",
|
|
3461
|
+
style: B({ color: D(r) ? "#e5e7eb" : "#374151" })
|
|
3462
|
+
}, q(p.rotulo), 5)
|
|
3463
|
+
]),
|
|
3464
|
+
P("span", {
|
|
3465
|
+
class: "nc-semicirculo-legenda-qtd font-semibold",
|
|
3466
|
+
style: B({ color: D(r) ? "#fff" : "#111" })
|
|
3467
|
+
}, q(p.quantidade), 5)
|
|
3468
|
+
]))), 128))
|
|
3469
|
+
])) : rt("", !0)
|
|
3470
|
+
], 2)
|
|
3471
|
+
]),
|
|
3472
|
+
_: 1
|
|
3473
|
+
}, 16));
|
|
3474
|
+
}
|
|
3475
|
+
}, Gs = /* @__PURE__ */ Ht(Vs, [["__scopeId", "data-v-5fa4b01e"]]);
|
|
3476
|
+
export {
|
|
3477
|
+
Ns as CardBarra,
|
|
3478
|
+
oe as CardBase,
|
|
3479
|
+
$s as CardColuna,
|
|
3480
|
+
Xs as CardLinhas,
|
|
3481
|
+
Us as CardPolar,
|
|
3482
|
+
Ws as CardProgresso,
|
|
3483
|
+
Ys as CardRosquinha,
|
|
3484
|
+
Gs as CardSemiCirculo
|
|
3485
|
+
};
|