3029 lines
150 KiB
JavaScript
3029 lines
150 KiB
JavaScript
/*!
|
|
* ScrollTrigger 3.10.5
|
|
* https://greensock.com
|
|
*
|
|
* @license Copyright 2022, GreenSock. All rights reserved.
|
|
* Subject to the terms at https://greensock.com/standard-license or for Club GreenSock members, the agreement issued with that membership.
|
|
* @author: Jack Doyle, jack@greensock.com
|
|
*/
|
|
! function(t, e) {
|
|
"object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e((t = t || self).window = t.window || {})
|
|
}(this, function(e) {
|
|
"use strict";
|
|
|
|
function _inheritsLoose(t, e) {
|
|
t.prototype = Object.create(e.prototype), (t.prototype.constructor = t).__proto__ = e
|
|
}
|
|
|
|
function _assertThisInitialized(t) {
|
|
if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
return t
|
|
}
|
|
|
|
function n(t) {
|
|
return "string" == typeof t
|
|
}
|
|
|
|
function o(t) {
|
|
return "function" == typeof t
|
|
}
|
|
|
|
function p(t) {
|
|
return "number" == typeof t
|
|
}
|
|
|
|
function q(t) {
|
|
return void 0 === t
|
|
}
|
|
|
|
function r(t) {
|
|
return "object" == typeof t
|
|
}
|
|
|
|
function s(t) {
|
|
return !1 !== t
|
|
}
|
|
|
|
function t() {
|
|
return "undefined" != typeof window
|
|
}
|
|
|
|
function u(t) {
|
|
return o(t) || n(t)
|
|
}
|
|
|
|
function K(t) {
|
|
return (l = mt(t, ot)) && ae
|
|
}
|
|
|
|
function L(t, e) {
|
|
return console.warn("Invalid property", t, "set to", e, "Missing plugin? gsap.registerPlugin()")
|
|
}
|
|
|
|
function M(t, e) {
|
|
return !e && console.warn(t)
|
|
}
|
|
|
|
function N(t, e) {
|
|
return t && (ot[t] = e) && l && (l[t] = e) || ot
|
|
}
|
|
|
|
function O() {
|
|
return 0
|
|
}
|
|
|
|
function Y(t) {
|
|
var e, i, n = t[0];
|
|
if (r(n) || o(n) || (t = [t]), !(e = (n._gsap || {}).harness)) {
|
|
for (i = _t.length; i-- && !_t[i].targetTest(n););
|
|
e = _t[i]
|
|
}
|
|
for (i = t.length; i--;) t[i] && (t[i]._gsap || (t[i]._gsap = new It(t[i], e))) || t.splice(i, 1);
|
|
return t
|
|
}
|
|
|
|
function Z(t) {
|
|
return t._gsap || Y(bt(t))[0]._gsap
|
|
}
|
|
|
|
function $(t, e, r) {
|
|
return (r = t[e]) && o(r) ? t[e]() : q(r) && t.getAttribute && t.getAttribute(e) || r
|
|
}
|
|
|
|
function _(t, e) {
|
|
return (t = t.split(",")).forEach(e) || t
|
|
}
|
|
|
|
function aa(t) {
|
|
return Math.round(1e5 * t) / 1e5 || 0
|
|
}
|
|
|
|
function ba(t, e) {
|
|
for (var r = e.length, i = 0; t.indexOf(e[i]) < 0 && ++i < r;);
|
|
return i < r
|
|
}
|
|
|
|
function ca(t, e, r) {
|
|
var i, n = p(t[1]),
|
|
a = (n ? 2 : 1) + (e < 2 ? 0 : 1),
|
|
o = t[a];
|
|
if (n && (o.duration = t[1]), o.parent = r, e) {
|
|
for (i = o; r && !("immediateRender" in i);) i = r.vars.defaults || {}, r = s(r.vars.inherit) && r.parent;
|
|
o.immediateRender = s(i.immediateRender), e < 2 ? o.runBackwards = 1 : o.startAt = t[a - 1]
|
|
}
|
|
return o
|
|
}
|
|
|
|
function da() {
|
|
var t, e, r = ht.length,
|
|
i = ht.slice(0);
|
|
for (lt = {}, t = ht.length = 0; t < r; t++)(e = i[t]) && e._lazy && (e.render(e._lazy[0], e._lazy[1], !0)._lazy = 0)
|
|
}
|
|
|
|
function ea(t, e, r, i) {
|
|
ht.length && da(), t.render(e, r, i), ht.length && da()
|
|
}
|
|
|
|
function fa(t) {
|
|
var e = parseFloat(t);
|
|
return (e || 0 === e) && (t + "").match(st).length < 2 ? e : n(t) ? t.trim() : t
|
|
}
|
|
|
|
function ga(t) {
|
|
return t
|
|
}
|
|
|
|
function ha(t, e) {
|
|
for (var r in e) r in t || (t[r] = e[r]);
|
|
return t
|
|
}
|
|
|
|
function ia(t, e) {
|
|
for (var r in e) r in t || "duration" === r || "ease" === r || (t[r] = e[r])
|
|
}
|
|
|
|
function ka(t, e) {
|
|
for (var i in e) t[i] = r(e[i]) ? ka(t[i] || (t[i] = {}), e[i]) : e[i];
|
|
return t
|
|
}
|
|
|
|
function la(t, e) {
|
|
var r, i = {};
|
|
for (r in t) r in e || (i[r] = t[r]);
|
|
return i
|
|
}
|
|
|
|
function ma(t) {
|
|
var e = t.parent || E,
|
|
r = t.keyframes ? ia : ha;
|
|
if (s(t.inherit))
|
|
for (; e;) r(t, e.vars.defaults), e = e.parent || e._dp;
|
|
return t
|
|
}
|
|
|
|
function pa(t, e, r, i) {
|
|
void 0 === r && (r = "_first"), void 0 === i && (i = "_last");
|
|
var n = e._prev,
|
|
a = e._next;
|
|
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
|
|
}
|
|
|
|
function qa(t, e) {
|
|
!t.parent || e && !t.parent.autoRemoveChildren || t.parent.remove(t), t._act = 0
|
|
}
|
|
|
|
function ra(t, e) {
|
|
if (!e || e._end > t._dur || e._start < 0)
|
|
for (var r = t; r;) r._dirty = 1, r = r.parent;
|
|
return t
|
|
}
|
|
|
|
function ua(t) {
|
|
return t._repeat ? gt(t._tTime, t = t.duration() + t._rDelay) * t : 0
|
|
}
|
|
|
|
function wa(t, e) {
|
|
return (t - e._start) * e._ts + (0 <= e._ts ? 0 : e._dirty ? e.totalDuration() : e._tDur)
|
|
}
|
|
|
|
function xa(t) {
|
|
return t._end = aa(t._start + (t._tDur / Math.abs(t._ts || t._rts || U) || 0))
|
|
}
|
|
|
|
function ya(t, e) {
|
|
var r = t._dp;
|
|
return r && r.smoothChildTiming && t._ts && (t._start = aa(t._dp._time - (0 < t._ts ? e / t._ts : ((t._dirty ? t.totalDuration() : t._tDur) - e) / -t._ts)), xa(t), r._dirty || ra(r, t)), t
|
|
}
|
|
|
|
function za(t, e) {
|
|
var r;
|
|
if ((e._time || e._initted && !e._dur) && (r = wa(t.rawTime(), e), (!e._dur || yt(0, e.totalDuration(), r) - e._tTime > U) && e.render(r, !0)), ra(t, e)._dp && t._initted && t._time >= t._dur && t._ts) {
|
|
if (t._dur < t.duration())
|
|
for (r = t; r._dp;) 0 <= r.rawTime() && r.totalTime(r._tTime), r = r._dp;
|
|
t._zTime = -U
|
|
}
|
|
}
|
|
|
|
function Aa(t, e, r, i) {
|
|
return e.parent && qa(e), e._start = aa(r + e._delay), e._end = aa(e._start + (e.totalDuration() / Math.abs(e.timeScale()) || 0)),
|
|
function _addLinkedListItem(t, e, r, i, n) {
|
|
void 0 === r && (r = "_first"), void 0 === i && (i = "_last");
|
|
var a, s = t[i];
|
|
if (n)
|
|
for (a = e[n]; s && s[n] > a;) s = s._prev;
|
|
s ? (e._next = s._next, s._next = e) : (e._next = t[r], t[r] = e), e._next ? e._next._prev = e : t[i] = e, e._prev = s, e.parent = e._dp = t
|
|
}(t, e, "_first", "_last", t._sort ? "_start" : 0), t._recent = e, i || za(t, e), t
|
|
}
|
|
|
|
function Ba(t, e) {
|
|
return (ot.ScrollTrigger || L("scrollTrigger", e)) && ot.ScrollTrigger.create(e, t)
|
|
}
|
|
|
|
function Ca(t, e, r, i) {
|
|
return Nt(t, e), t._initted ? !r && t._pt && (t._dur && !1 !== t.vars.lazy || !t._dur && t.vars.lazy) && d !== At.frame ? (ht.push(t), t._lazy = [e, i], 1) : void 0 : 1
|
|
}
|
|
|
|
function Fa(t, e, r, i) {
|
|
var n = t._repeat,
|
|
a = aa(e) || 0,
|
|
s = t._tTime / t._tDur;
|
|
return s && !i && (t._time *= a / t._dur), t._dur = a, t._tDur = n ? n < 0 ? 1e10 : aa(a * (n + 1) + t._rDelay * n) : a, s && !i ? ya(t, t._tTime = t._tDur * s) : t.parent && xa(t), r || ra(t.parent, t), t
|
|
}
|
|
|
|
function Ga(t) {
|
|
return t instanceof Bt ? ra(t) : Fa(t, t._dur)
|
|
}
|
|
|
|
function Ia(t, e) {
|
|
var r, i, a = t.labels,
|
|
s = t._recent || vt,
|
|
o = t.duration() >= B ? s.endTime(!1) : t._dur;
|
|
return n(e) && (isNaN(e) || e in a) ? "<" === (r = e.charAt(0)) || ">" === r ? ("<" === r ? s._start : s.endTime(0 <= s._repeat)) + (parseFloat(e.substr(1)) || 0) : (r = e.indexOf("=")) < 0 ? (e in a || (a[e] = o), a[e]) : (i = +(e.charAt(r - 1) + e.substr(r + 1)), 1 < r ? Ia(t, e.substr(0, r - 1)) + i : o + i) : null == e ? o : +e
|
|
}
|
|
|
|
function Ja(t, e) {
|
|
return t || 0 === t ? e(t) : e
|
|
}
|
|
|
|
function La(t) {
|
|
return (t + "").substr((parseFloat(t) + "").length)
|
|
}
|
|
|
|
function Oa(t, e) {
|
|
return t && r(t) && "length" in t && (!e && !t.length || t.length - 1 in t && r(t[0])) && !t.nodeType && t !== i
|
|
}
|
|
|
|
function Ra(t) {
|
|
return t.sort(function() {
|
|
return .5 - Math.random()
|
|
})
|
|
}
|
|
|
|
function Sa(t) {
|
|
if (o(t)) return t;
|
|
var _ = r(t) ? t : {
|
|
each: t
|
|
},
|
|
c = Rt(_.ease),
|
|
m = _.from || 0,
|
|
g = parseFloat(_.base) || 0,
|
|
v = {},
|
|
e = 0 < m && m < 1,
|
|
y = isNaN(m) || e,
|
|
T = _.axis,
|
|
b = m,
|
|
w = m;
|
|
return n(m) ? b = w = {
|
|
center: .5,
|
|
edges: .5,
|
|
end: 1
|
|
}[m] || 0 : !e && y && (b = m[0], w = m[1]),
|
|
function(t, e, r) {
|
|
var i, n, a, s, o, u, h, l, f, d = (r || _).length,
|
|
p = v[d];
|
|
if (!p) {
|
|
if (!(f = "auto" === _.grid ? 0 : (_.grid || [1, B])[1])) {
|
|
for (h = -B; h < (h = r[f++].getBoundingClientRect().left) && f < d;);
|
|
f--
|
|
}
|
|
for (p = v[d] = [], i = y ? Math.min(f, d) * b - .5 : m % f, n = y ? d * w / f - .5 : m / f | 0, l = B, u = h = 0; u < d; u++) a = u % f - i, s = n - (u / f | 0), p[u] = o = T ? Math.abs("y" === T ? s : a) : J(a * a + s * s), h < o && (h = o), o < l && (l = o);
|
|
"random" === m && Ra(p), p.max = h - l, p.min = l, p.v = d = (parseFloat(_.amount) || parseFloat(_.each) * (d < f ? d - 1 : T ? "y" === T ? d / f : f : Math.max(f, d / f)) || 0) * ("edges" === m ? -1 : 1), p.b = d < 0 ? g - d : g, p.u = La(_.amount || _.each) || 0, c = c && d < 0 ? Ft(c) : c
|
|
}
|
|
return d = (p[t] - p.min) / p.max || 0, aa(p.b + (c ? c(d) : d) * p.v) + p.u
|
|
}
|
|
}
|
|
|
|
function Ta(e) {
|
|
var r = e < 1 ? Math.pow(10, (e + "").length - 2) : 1;
|
|
return function(t) {
|
|
return Math.floor(Math.round(parseFloat(t) / e) * e * r) / r + (p(t) ? 0 : La(t))
|
|
}
|
|
}
|
|
|
|
function Ua(u, t) {
|
|
var h, l, e = tt(u);
|
|
return !e && r(u) && (h = e = u.radius || B, u.values ? (u = bt(u.values), (l = !p(u[0])) && (h *= h)) : u = Ta(u.increment)), Ja(t, e ? o(u) ? function(t) {
|
|
return l = u(t), Math.abs(l - t) <= h ? l : t
|
|
} : function(t) {
|
|
for (var e, r, i = parseFloat(l ? t.x : t), n = parseFloat(l ? t.y : 0), a = B, s = 0, o = u.length; o--;)(e = l ? (e = u[o].x - i) * e + (r = u[o].y - n) * r : Math.abs(u[o] - i)) < a && (a = e, s = o);
|
|
return s = !h || a <= h ? u[s] : t, l || s === t || p(t) ? s : s + La(t)
|
|
} : Ta(u))
|
|
}
|
|
|
|
function Va(t, e, r, i) {
|
|
return Ja(tt(t) ? !e : !0 === r ? !!(r = 0) : !i, function() {
|
|
return tt(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 + Math.random() * (e - t)) / r) * r * i) / i
|
|
})
|
|
}
|
|
|
|
function Za(e, r, t) {
|
|
return Ja(t, function(t) {
|
|
return e[~~r(t)]
|
|
})
|
|
}
|
|
|
|
function ab(t) {
|
|
for (var e, r, i, n, a = 0, s = ""; ~(e = t.indexOf("random(", a));) i = t.indexOf(")", e), n = "[" === t.charAt(e + 7), r = t.substr(e + 7, i - e - 7).match(n ? st : et), s += t.substr(a, e - a) + Va(n ? r : +r[0], n ? 0 : +r[1], +r[2] || 1e-5), a = i + 1;
|
|
return s + t.substr(a, t.length - a)
|
|
}
|
|
|
|
function db(t, e, r) {
|
|
var i, n, a, s = t.labels,
|
|
o = B;
|
|
for (i in s)(n = s[i] - e) < 0 == !!r && n && o > (n = Math.abs(n)) && (a = i, o = n);
|
|
return a
|
|
}
|
|
|
|
function fb(t) {
|
|
return qa(t), t.progress() < 1 && xt(t, "onInterrupt"), t
|
|
}
|
|
|
|
function kb(t, e, r) {
|
|
return (6 * (t = t < 0 ? t + 1 : 1 < t ? t - 1 : t) < 1 ? e + (r - e) * t * 6 : t < .5 ? r : 3 * t < 2 ? e + (r - e) * (2 / 3 - t) * 6 : e) * kt + .5 | 0
|
|
}
|
|
|
|
function lb(t, e, r) {
|
|
var i, n, a, s, o, u, h, l, f, d, _ = t ? p(t) ? [t >> 16, t >> 8 & kt, t & kt] : 0 : Ot.black;
|
|
if (!_) {
|
|
if ("," === t.substr(-1) && (t = t.substr(0, t.length - 1)), Ot[t]) _ = Ot[t];
|
|
else if ("#" === t.charAt(0)) 4 === t.length && (t = "#" + (i = t.charAt(1)) + i + (n = t.charAt(2)) + n + (a = t.charAt(3)) + a), _ = [(t = parseInt(t.substr(1), 16)) >> 16, t >> 8 & kt, t & kt];
|
|
else if ("hsl" === t.substr(0, 3))
|
|
if (_ = d = t.match(et), e) {
|
|
if (~t.indexOf("=")) return _ = t.match(rt), r && _.length < 4 && (_[3] = 1), _
|
|
} else s = +_[0] % 360 / 360, o = _[1] / 100, i = 2 * (u = _[2] / 100) - (n = u <= .5 ? u * (o + 1) : u + o - u * o), 3 < _.length && (_[3] *= 1), _[0] = kb(s + 1 / 3, i, n), _[1] = kb(s, i, n), _[2] = kb(s - 1 / 3, i, n);
|
|
else _ = t.match(et) || Ot.transparent;
|
|
_ = _.map(Number)
|
|
}
|
|
return e && !d && (i = _[0] / kt, n = _[1] / kt, a = _[2] / kt, u = ((h = Math.max(i, n, a)) + (l = Math.min(i, n, a))) / 2, h === l ? s = o = 0 : (f = h - l, o = .5 < u ? f / (2 - h - l) : f / (h + l), s = h === i ? (n - a) / f + (n < a ? 6 : 0) : h === n ? (a - i) / f + 2 : (i - n) / f + 4, s *= 60), _[0] = ~~(s + .5), _[1] = ~~(100 * o + .5), _[2] = ~~(100 * u + .5)), r && _.length < 4 && (_[3] = 1), _
|
|
}
|
|
|
|
function mb(t) {
|
|
var r = [],
|
|
i = [],
|
|
n = -1;
|
|
return t.split(Mt).forEach(function(t) {
|
|
var e = t.match(it) || [];
|
|
r.push.apply(r, e), i.push(n += e.length + 1)
|
|
}), r.c = i, r
|
|
}
|
|
|
|
function nb(t, e, r) {
|
|
var i, n, a, s, o = "",
|
|
u = (t + o).match(Mt),
|
|
h = e ? "hsla(" : "rgba(",
|
|
l = 0;
|
|
if (!u) return t;
|
|
if (u = u.map(function(t) {
|
|
return (t = lb(t, e, 1)) && h + (e ? t[0] + "," + t[1] + "%," + t[2] + "%," + t[3] : t.join(",")) + ")"
|
|
}), r && (a = mb(t), (i = r.c).join(o) !== a.c.join(o)))
|
|
for (s = (n = t.replace(Mt, "1").split(it)).length - 1; l < s; l++) o += n[l] + (~i.indexOf(l) ? u.shift() || h + "0,0,0,0)" : (a.length ? a : u.length ? u : r).shift());
|
|
if (!n)
|
|
for (s = (n = t.split(Mt)).length - 1; l < s; l++) o += n[l] + u[l];
|
|
return o + n[s]
|
|
}
|
|
|
|
function qb(t) {
|
|
var e, r = t.join(" ");
|
|
if (Mt.lastIndex = 0, Mt.test(r)) return e = Ct.test(r), t[1] = nb(t[1], e), t[0] = nb(t[0], e, mb(t[1])), !0
|
|
}
|
|
|
|
function zb(t) {
|
|
var e = (t + "").split("("),
|
|
r = Dt[e[0]];
|
|
return r && 1 < e.length && r.config ? r.config.apply(null, ~t.indexOf("{") ? [function _parseObjectInString(t) {
|
|
for (var e, r, i, n = {}, a = t.substr(1, t.length - 3).split(":"), s = a[0], o = 1, u = a.length; o < u; o++) r = a[o], e = o !== u - 1 ? r.lastIndexOf(",") : r.length, i = r.substr(0, e), n[s] = isNaN(i) ? i.replace(zt, "").trim() : +i, s = r.substr(e + 1).trim();
|
|
return n
|
|
}(e[1])] : function _valueInParentheses(t) {
|
|
var e = t.indexOf("(") + 1,
|
|
r = t.indexOf(")"),
|
|
i = t.indexOf("(", e);
|
|
return t.substring(e, ~i && i < r ? t.indexOf(")", r + 1) : r)
|
|
}(t).split(",").map(fa)) : Dt._CE && St.test(t) ? Dt._CE("", t) : r
|
|
}
|
|
|
|
function Bb(t, e) {
|
|
for (var r, i = t._first; i;) i instanceof Bt ? Bb(i, e) : !i.vars.yoyoEase || i._yoyo && i._repeat || i._yoyo === e || (i.timeline ? Bb(i.timeline, e) : (r = i._ease, i._ease = i._yEase, i._yEase = r, i._yoyo = e)), i = i._next
|
|
}
|
|
|
|
function Db(t, e, r, i) {
|
|
void 0 === r && (r = function easeOut(t) {
|
|
return 1 - e(1 - t)
|
|
}), void 0 === i && (i = function easeInOut(t) {
|
|
return t < .5 ? e(2 * t) / 2 : 1 - e(2 * (1 - t)) / 2
|
|
});
|
|
var n, a = {
|
|
easeIn: e,
|
|
easeOut: r,
|
|
easeInOut: i
|
|
};
|
|
return _(t, function(t) {
|
|
for (var e in Dt[t] = ot[t] = a, Dt[n = t.toLowerCase()] = r, a) Dt[n + ("easeIn" === e ? ".in" : "easeOut" === e ? ".out" : ".inOut")] = Dt[t + "." + e] = a[e]
|
|
}), a
|
|
}
|
|
|
|
function Eb(e) {
|
|
return function(t) {
|
|
return t < .5 ? (1 - e(1 - 2 * t)) / 2 : .5 + e(2 * (t - .5)) / 2
|
|
}
|
|
}
|
|
|
|
function Fb(r, t, e) {
|
|
function ul(t) {
|
|
return 1 === t ? 1 : i * Math.pow(2, -10 * t) * W((t - a) * n) + 1
|
|
}
|
|
var i = 1 <= t ? t : 1,
|
|
n = (e || (r ? .3 : .45)) / (t < 1 ? t : 1),
|
|
a = n / V * (Math.asin(1 / i) || 0),
|
|
s = "out" === r ? ul : "in" === r ? function(t) {
|
|
return 1 - ul(1 - t)
|
|
} : Eb(ul);
|
|
return n = V / n, s.config = function(t, e) {
|
|
return Fb(r, t, e)
|
|
}, s
|
|
}
|
|
|
|
function Gb(e, r) {
|
|
function Cl(t) {
|
|
return t ? --t * t * ((r + 1) * t + r) + 1 : 0
|
|
}
|
|
void 0 === r && (r = 1.70158);
|
|
var t = "out" === e ? Cl : "in" === e ? function(t) {
|
|
return 1 - Cl(1 - t)
|
|
} : Eb(Cl);
|
|
return t.config = function(t) {
|
|
return Gb(e, t)
|
|
}, t
|
|
}
|
|
var E, i, a, h, l, f, d, c, m, g, v, y, T, b, w, x, k, C, A, P, D, S, z, F, R, j = {
|
|
autoSleep: 120,
|
|
force3D: "auto",
|
|
nullTargetWarn: 1,
|
|
units: {
|
|
lineHeight: ""
|
|
}
|
|
},
|
|
I = {
|
|
duration: .5,
|
|
overwrite: !1,
|
|
delay: 0
|
|
},
|
|
B = 1e8,
|
|
U = 1 / B,
|
|
V = 2 * Math.PI,
|
|
X = V / 4,
|
|
G = 0,
|
|
J = Math.sqrt,
|
|
Q = Math.cos,
|
|
W = Math.sin,
|
|
H = "function" == typeof ArrayBuffer ? ArrayBuffer.isView : function() {},
|
|
tt = Array.isArray,
|
|
et = /(?:-?\.?\d|\.)+/gi,
|
|
rt = /[-+=.]*\d+[.e\-+]*\d*[e\-\+]*\d*/g,
|
|
it = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g,
|
|
nt = /[-+=.]*\d+(?:\.|e-|e)*\d*/gi,
|
|
at = /[+-]=-?[\.\d]+/,
|
|
st = /[#\-+.]*\b[a-z\d-=+%.]+/gi,
|
|
ot = {},
|
|
ut = {},
|
|
ht = [],
|
|
lt = {},
|
|
ft = {},
|
|
dt = {},
|
|
pt = 30,
|
|
_t = [],
|
|
ct = "",
|
|
mt = function _merge(t, e) {
|
|
for (var r in e) t[r] = e[r];
|
|
return t
|
|
},
|
|
gt = function _animationCycle(t, e) {
|
|
return (t /= e) && ~~t === t ? ~~t - 1 : ~~t
|
|
},
|
|
vt = {
|
|
_start: 0,
|
|
endTime: O
|
|
},
|
|
yt = function _clamp(t, e, r) {
|
|
return r < t ? t : e < r ? e : r
|
|
},
|
|
Tt = [].slice,
|
|
bt = function toArray(t, e) {
|
|
return !n(t) || e || !a && Pt() ? tt(t) ? function _flatten(t, e, r) {
|
|
return void 0 === r && (r = []), t.forEach(function(t) {
|
|
return n(t) && !e || Oa(t, 1) ? r.push.apply(r, bt(t)) : r.push(t)
|
|
}) || r
|
|
}(t, e) : Oa(t) ? Tt.call(t, 0) : t ? [t] : [] : Tt.call(h.querySelectorAll(t), 0)
|
|
},
|
|
wt = function mapRange(e, t, r, i, n) {
|
|
var a = t - e,
|
|
s = i - r;
|
|
return Ja(n, function(t) {
|
|
return r + ((t - e) / a * s || 0)
|
|
})
|
|
},
|
|
xt = function _callback(t, e, r) {
|
|
var i, n, a = t.vars,
|
|
s = a[e];
|
|
if (s) return i = a[e + "Params"], n = a.callbackScope || t, r && ht.length && da(), i ? s.apply(n, i) : s.call(n)
|
|
},
|
|
kt = 255,
|
|
Ot = {
|
|
aqua: [0, kt, kt],
|
|
lime: [0, kt, 0],
|
|
silver: [192, 192, 192],
|
|
black: [0, 0, 0],
|
|
maroon: [128, 0, 0],
|
|
teal: [0, 128, 128],
|
|
blue: [0, 0, kt],
|
|
navy: [0, 0, 128],
|
|
white: [kt, kt, kt],
|
|
olive: [128, 128, 0],
|
|
yellow: [kt, kt, 0],
|
|
orange: [kt, 165, 0],
|
|
gray: [128, 128, 128],
|
|
purple: [128, 0, 128],
|
|
green: [0, 128, 0],
|
|
red: [kt, 0, 0],
|
|
pink: [kt, 192, 203],
|
|
cyan: [0, kt, kt],
|
|
transparent: [kt, kt, kt, 0]
|
|
},
|
|
Mt = function() {
|
|
var t, e = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";
|
|
for (t in Ot) e += "|" + t + "\\b";
|
|
return new RegExp(e + ")", "gi")
|
|
}(),
|
|
Ct = /hsl[a]?\(/,
|
|
At = (x = Date.now, k = 500, C = 33, A = x(), P = A, S = D = 1e3 / 240, T = {
|
|
time: 0,
|
|
frame: 0,
|
|
tick: function tick() {
|
|
qk(!0)
|
|
},
|
|
deltaRatio: function deltaRatio(t) {
|
|
return b / (1e3 / (t || 60))
|
|
},
|
|
wake: function wake() {
|
|
f && (!a && t() && (i = a = window, h = i.document || {}, ot.gsap = ae, (i.gsapVersions || (i.gsapVersions = [])).push(ae.version), K(l || i.GreenSockGlobals || !i.gsap && i || {}), y = i.requestAnimationFrame), g && T.sleep(), v = y || function(t) {
|
|
return setTimeout(t, S - 1e3 * T.time + 1 | 0)
|
|
}, m = 1, qk(2))
|
|
},
|
|
sleep: function sleep() {
|
|
(y ? i.cancelAnimationFrame : clearTimeout)(g), m = 0, v = O
|
|
},
|
|
lagSmoothing: function lagSmoothing(t, e) {
|
|
k = t || 1e8, C = Math.min(e, k, 0)
|
|
},
|
|
fps: function fps(t) {
|
|
D = 1e3 / (t || 240), S = 1e3 * T.time + D
|
|
},
|
|
add: function add(t) {
|
|
z.indexOf(t) < 0 && z.push(t), Pt()
|
|
},
|
|
remove: function remove(t) {
|
|
var e;
|
|
~(e = z.indexOf(t)) && z.splice(e, 1) && e <= w && w--
|
|
},
|
|
_listeners: z = []
|
|
}),
|
|
Pt = function _wake() {
|
|
return !m && At.wake()
|
|
},
|
|
Dt = {},
|
|
St = /^[\d.\-M][\d.\-,\s]/,
|
|
zt = /["']/g,
|
|
Ft = function _invertEase(e) {
|
|
return function(t) {
|
|
return 1 - e(1 - t)
|
|
}
|
|
},
|
|
Rt = function _parseEase(t, e) {
|
|
return t && (o(t) ? t : Dt[t] || zb(t)) || e
|
|
};
|
|
|
|
function qk(t) {
|
|
var e, r, i, n, a = x() - P,
|
|
s = !0 === t;
|
|
if (k < a && (A += a - C), (0 < (e = (i = (P += a) - A) - S) || s) && (n = ++T.frame, b = i - 1e3 * T.time, T.time = i /= 1e3, S += e + (D <= e ? 4 : D - e), r = 1), s || (g = v(qk)), r)
|
|
for (w = 0; w < z.length; w++) z[w](i, b, n, t)
|
|
}
|
|
|
|
function Tl(t) {
|
|
return t < R ? F * t * t : t < .7272727272727273 ? F * Math.pow(t - 1.5 / 2.75, 2) + .75 : t < .9090909090909092 ? F * (t -= 2.25 / 2.75) * t + .9375 : F * Math.pow(t - 2.625 / 2.75, 2) + .984375
|
|
}
|
|
_("Linear,Quad,Cubic,Quart,Quint,Strong", function(t, e) {
|
|
var r = e < 5 ? e + 1 : e;
|
|
Db(t + ",Power" + (r - 1), e ? function(t) {
|
|
return Math.pow(t, r)
|
|
} : function(t) {
|
|
return t
|
|
}, function(t) {
|
|
return 1 - Math.pow(1 - t, r)
|
|
}, function(t) {
|
|
return t < .5 ? Math.pow(2 * t, r) / 2 : 1 - Math.pow(2 * (1 - t), r) / 2
|
|
})
|
|
}), Dt.Linear.easeNone = Dt.none = Dt.Linear.easeIn, Db("Elastic", Fb("in"), Fb("out"), Fb()), F = 7.5625, R = 1 / 2.75, Db("Bounce", function(t) {
|
|
return 1 - Tl(1 - t)
|
|
}, Tl), Db("Expo", function(t) {
|
|
return t ? Math.pow(2, 10 * (t - 1)) : 0
|
|
}), Db("Circ", function(t) {
|
|
return -(J(1 - t * t) - 1)
|
|
}), Db("Sine", function(t) {
|
|
return 1 === t ? 1 : 1 - Q(t * X)
|
|
}), Db("Back", Gb("in"), Gb("out"), Gb()), Dt.SteppedEase = Dt.steps = ot.SteppedEase = {
|
|
config: function config(t, e) {
|
|
void 0 === t && (t = 1);
|
|
var r = 1 / t,
|
|
i = t + (e ? 0 : 1),
|
|
n = e ? 1 : 0;
|
|
return function(t) {
|
|
return ((i * yt(0, .99999999, t) | 0) + n) * r
|
|
}
|
|
}
|
|
}, I.ease = Dt["quad.out"], _("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", function(t) {
|
|
return ct += t + "," + t + "Params,"
|
|
});
|
|
var Et, It = function GSCache(t, e) {
|
|
this.id = G++, (t._gsap = this).target = t, this.harness = e, this.get = e ? e.get : $, this.set = e ? e.getSetter : Qt
|
|
},
|
|
Lt = ((Et = Animation.prototype).delay = function delay(t) {
|
|
return t || 0 === t ? (this.parent && this.parent.smoothChildTiming && this.startTime(this._start + t - this._delay), this._delay = t, this) : this._delay
|
|
}, Et.duration = function duration(t) {
|
|
return arguments.length ? this.totalDuration(0 < this._repeat ? t + (t + this._rDelay) * this._repeat : t) : this.totalDuration() && this._dur
|
|
}, Et.totalDuration = function totalDuration(t) {
|
|
return arguments.length ? (this._dirty = 0, Fa(this, this._repeat < 0 ? t : (t - this._repeat * this._rDelay) / (this._repeat + 1))) : this._tDur
|
|
}, Et.totalTime = function totalTime(t, e) {
|
|
if (Pt(), !arguments.length) return this._tTime;
|
|
var r = this._dp;
|
|
if (r && r.smoothChildTiming && this._ts) {
|
|
for (ya(this, t); r.parent;) r.parent._time !== r._start + (0 <= r._ts ? r._tTime / r._ts : (r.totalDuration() - r._tTime) / -r._ts) && r.totalTime(r._tTime, !0), r = r.parent;
|
|
!this.parent && this._dp.autoRemoveChildren && (0 < this._ts && t < this._tDur || this._ts < 0 && 0 < t || !this._tDur && !t) && Aa(this._dp, this, this._start - this._delay)
|
|
}
|
|
return (this._tTime !== t || !this._dur && !e || this._initted && Math.abs(this._zTime) === U || !t && !this._initted && (this.add || this._ptLookup)) && (this._ts || (this._pTime = t), ea(this, t, e)), this
|
|
}, Et.time = function time(t, e) {
|
|
return arguments.length ? this.totalTime(Math.min(this.totalDuration(), t + ua(this)) % this._dur || (t ? this._dur : 0), e) : this._time
|
|
}, Et.totalProgress = function totalProgress(t, e) {
|
|
return arguments.length ? this.totalTime(this.totalDuration() * t, e) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.ratio
|
|
}, Et.progress = function progress(t, e) {
|
|
return arguments.length ? this.totalTime(this.duration() * (!this._yoyo || 1 & this.iteration() ? t : 1 - t) + ua(this), e) : this.duration() ? Math.min(1, this._time / this._dur) : this.ratio
|
|
}, Et.iteration = function iteration(t, e) {
|
|
var r = this.duration() + this._rDelay;
|
|
return arguments.length ? this.totalTime(this._time + (t - 1) * r, e) : this._repeat ? gt(this._tTime, r) + 1 : 1
|
|
}, Et.timeScale = function timeScale(t) {
|
|
if (!arguments.length) return this._rts === -U ? 0 : this._rts;
|
|
if (this._rts === t) return this;
|
|
var e = this.parent && this._ts ? wa(this.parent._time, this) : this._tTime;
|
|
return this._rts = +t || 0, this._ts = this._ps || t === -U ? 0 : this._rts,
|
|
function _recacheAncestors(t) {
|
|
for (var e = t.parent; e && e.parent;) e._dirty = 1, e.totalDuration(), e = e.parent;
|
|
return t
|
|
}(this.totalTime(yt(-this._delay, this._tDur, e), !0))
|
|
}, Et.paused = function paused(t) {
|
|
return arguments.length ? (this._ps !== t && ((this._ps = t) ? (this._pTime = this._tTime || Math.max(-this._delay, this.rawTime()), this._ts = this._act = 0) : (Pt(), this._ts = this._rts, this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, 1 === this.progress() && (this._tTime -= U) && Math.abs(this._zTime) !== U))), this) : this._ps
|
|
}, Et.startTime = function startTime(t) {
|
|
if (arguments.length) {
|
|
this._start = t;
|
|
var e = this.parent || this._dp;
|
|
return !e || !e._sort && this.parent || Aa(e, this, t - this._delay), this
|
|
}
|
|
return this._start
|
|
}, Et.endTime = function endTime(t) {
|
|
return this._start + (s(t) ? this.totalDuration() : this.duration()) / Math.abs(this._ts)
|
|
}, Et.rawTime = function rawTime(t) {
|
|
var e = this.parent || this._dp;
|
|
return e ? t && (!this._ts || this._repeat && this._time && this.totalProgress() < 1) ? this._tTime % (this._dur + this._rDelay) : this._ts ? wa(e.rawTime(t), this) : this._tTime : this._tTime
|
|
}, Et.globalTime = function globalTime(t) {
|
|
for (var e = this, r = arguments.length ? t : e.rawTime(); e;) r = e._start + r / (e._ts || 1), e = e._dp;
|
|
return r
|
|
}, Et.repeat = function repeat(t) {
|
|
return arguments.length ? (this._repeat = t, Ga(this)) : this._repeat
|
|
}, Et.repeatDelay = function repeatDelay(t) {
|
|
return arguments.length ? (this._rDelay = t, Ga(this)) : this._rDelay
|
|
}, Et.yoyo = function yoyo(t) {
|
|
return arguments.length ? (this._yoyo = t, this) : this._yoyo
|
|
}, Et.seek = function seek(t, e) {
|
|
return this.totalTime(Ia(this, t), s(e))
|
|
}, Et.restart = function restart(t, e) {
|
|
return this.play().totalTime(t ? -this._delay : 0, s(e))
|
|
}, Et.play = function play(t, e) {
|
|
return null != t && this.seek(t, e), this.reversed(!1).paused(!1)
|
|
}, Et.reverse = function reverse(t, e) {
|
|
return null != t && this.seek(t || this.totalDuration(), e), this.reversed(!0).paused(!1)
|
|
}, Et.pause = function pause(t, e) {
|
|
return null != t && this.seek(t, e), this.paused(!0)
|
|
}, Et.resume = function resume() {
|
|
return this.paused(!1)
|
|
}, Et.reversed = function reversed(t) {
|
|
return arguments.length ? (!!t !== this.reversed() && this.timeScale(-this._rts || (t ? -U : 0)), this) : this._rts < 0
|
|
}, Et.invalidate = function invalidate() {
|
|
return this._initted = 0, this._zTime = -U, this
|
|
}, Et.isActive = function isActive() {
|
|
var t, e = this.parent || this._dp,
|
|
r = this._start;
|
|
return !(e && !(this._ts && this._initted && e.isActive() && (t = e.rawTime(!0)) >= r && t < this.endTime(!0) - U))
|
|
}, Et.eventCallback = function eventCallback(t, e, r) {
|
|
var i = this.vars;
|
|
return 1 < arguments.length ? (e ? (i[t] = e, r && (i[t + "Params"] = r), "onUpdate" === t && (this._onUpdate = e)) : delete i[t], this) : i[t]
|
|
}, Et.then = function then(t) {
|
|
var i = this;
|
|
return new Promise(function(e) {
|
|
function jn() {
|
|
var t = i.then;
|
|
i.then = null, o(r) && (r = r(i)) && (r.then || r === i) && (i.then = t), e(r), i.then = t
|
|
}
|
|
var r = o(t) ? t : ga;
|
|
i._initted && 1 === i.totalProgress() && 0 <= i._ts || !i._tTime && i._ts < 0 ? jn() : i._prom = jn
|
|
})
|
|
}, Et.kill = function kill() {
|
|
fb(this)
|
|
}, Animation);
|
|
|
|
function Animation(t, e) {
|
|
var r = t.parent || E;
|
|
this.vars = t, this._delay = +t.delay || 0, (this._repeat = t.repeat || 0) && (this._rDelay = t.repeatDelay || 0, this._yoyo = !!t.yoyo || !!t.yoyoEase), this._ts = 1, Fa(this, +t.duration, 1, 1), this.data = t.data, m || At.wake(), r && Aa(r, this, e || 0 === e ? e : r._time, 1), t.reversed && this.reverse(), t.paused && this.paused(!0)
|
|
}
|
|
ha(Lt.prototype, {
|
|
_time: 0,
|
|
_start: 0,
|
|
_end: 0,
|
|
_tTime: 0,
|
|
_tDur: 0,
|
|
_dirty: 0,
|
|
_repeat: 0,
|
|
_yoyo: !1,
|
|
parent: null,
|
|
_initted: !1,
|
|
_rDelay: 0,
|
|
_ts: 1,
|
|
_dp: 0,
|
|
ratio: 0,
|
|
_zTime: -U,
|
|
_prom: 0,
|
|
_ps: !1,
|
|
_rts: 1
|
|
});
|
|
var Bt = function(i) {
|
|
function Timeline(t, e) {
|
|
var r;
|
|
return void 0 === t && (t = {}), (r = i.call(this, t, e) || this).labels = {}, r.smoothChildTiming = !!t.smoothChildTiming, r.autoRemoveChildren = !!t.autoRemoveChildren, r._sort = s(t.sortChildren), r.parent && za(r.parent, _assertThisInitialized(r)), t.scrollTrigger && Ba(_assertThisInitialized(r), t.scrollTrigger), r
|
|
}
|
|
_inheritsLoose(Timeline, i);
|
|
var t = Timeline.prototype;
|
|
return t.to = function to(t, e, r, i) {
|
|
return new Xt(t, ca(arguments, 0, this), Ia(this, p(e) ? i : r)), this
|
|
}, t.from = function from(t, e, r, i) {
|
|
return new Xt(t, ca(arguments, 1, this), Ia(this, p(e) ? i : r)), this
|
|
}, t.fromTo = function fromTo(t, e, r, i, n) {
|
|
return new Xt(t, ca(arguments, 2, this), Ia(this, p(e) ? n : i)), this
|
|
}, t.set = function set(t, e, r) {
|
|
return e.duration = 0, e.parent = this, ma(e).repeatDelay || (e.repeat = 0), e.immediateRender = !!e.immediateRender, new Xt(t, e, Ia(this, r), 1), this
|
|
}, t.call = function call(t, e, r) {
|
|
return Aa(this, Xt.delayedCall(0, t, e), Ia(this, r))
|
|
}, t.staggerTo = function staggerTo(t, e, r, i, n, a, s) {
|
|
return r.duration = e, r.stagger = r.stagger || i, r.onComplete = a, r.onCompleteParams = s, r.parent = this, new Xt(t, r, Ia(this, n)), this
|
|
}, t.staggerFrom = function staggerFrom(t, e, r, i, n, a, o) {
|
|
return r.runBackwards = 1, ma(r).immediateRender = s(r.immediateRender), this.staggerTo(t, e, r, i, n, a, o)
|
|
}, t.staggerFromTo = function staggerFromTo(t, e, r, i, n, a, o, u) {
|
|
return i.startAt = r, ma(i).immediateRender = s(i.immediateRender), this.staggerTo(t, e, i, n, a, o, u)
|
|
}, t.render = function render(t, e, r) {
|
|
var i, n, a, s, o, u, h, l, f, d, p, _, c = this._time,
|
|
m = this._dirty ? this.totalDuration() : this._tDur,
|
|
g = this._dur,
|
|
v = this !== E && m - U < t && 0 <= t ? m : t < U ? 0 : t,
|
|
y = this._zTime < 0 != t < 0 && (this._initted || !g);
|
|
if (v !== this._tTime || r || y) {
|
|
if (c !== this._time && g && (v += this._time - c, t += this._time - c), i = v, f = this._start, u = !(l = this._ts), y && (g || (c = this._zTime), !t && e || (this._zTime = t)), this._repeat && (p = this._yoyo, o = g + this._rDelay, i = aa(v % o), v === m ? (s = this._repeat, i = g) : ((s = ~~(v / o)) && s === v / o && (i = g, s--), g < i && (i = g)), d = gt(this._tTime, o), !c && this._tTime && d !== s && (d = s), p && 1 & s && (i = g - i, _ = 1), s !== d && !this._lock)) {
|
|
var T = p && 1 & d,
|
|
b = T === (p && 1 & s);
|
|
if (s < d && (T = !T), c = T ? 0 : g, this._lock = 1, this.render(c || (_ ? 0 : aa(s * o)), e, !g)._lock = 0, !e && this.parent && xt(this, "onRepeat"), this.vars.repeatRefresh && !_ && (this.invalidate()._lock = 1), c !== this._time || u != !this._ts) return this;
|
|
if (g = this._dur, m = this._tDur, b && (this._lock = 2, c = T ? g + 1e-4 : -1e-4, this.render(c, !0), this.vars.repeatRefresh && !_ && this.invalidate()), this._lock = 0, !this._ts && !u) return this;
|
|
Bb(this, _)
|
|
}
|
|
if (this._hasPause && !this._forcing && this._lock < 2 && (h = function _findNextPauseTween(t, e, r) {
|
|
var i;
|
|
if (e < r)
|
|
for (i = t._first; i && i._start <= r;) {
|
|
if (!i._dur && "isPause" === i.data && i._start > e) return i;
|
|
i = i._next
|
|
} else
|
|
for (i = t._last; i && i._start >= r;) {
|
|
if (!i._dur && "isPause" === i.data && i._start < e) return i;
|
|
i = i._prev
|
|
}
|
|
}(this, aa(c), aa(i))) && (v -= i - (i = h._start)), this._tTime = v, this._time = i, this._act = !l, this._initted || (this._onUpdate = this.vars.onUpdate, this._initted = 1, this._zTime = t), c || !i || e || xt(this, "onStart"), c <= i && 0 <= t)
|
|
for (n = this._first; n;) {
|
|
if (a = n._next, (n._act || i >= n._start) && n._ts && h !== n) {
|
|
if (n.parent !== this) return this.render(t, e, r);
|
|
if (n.render(0 < n._ts ? (i - n._start) * n._ts : (n._dirty ? n.totalDuration() : n._tDur) + (i - n._start) * n._ts, e, r), i !== this._time || !this._ts && !u) {
|
|
h = 0, a && (v += this._zTime = -U);
|
|
break
|
|
}
|
|
}
|
|
n = a
|
|
} else {
|
|
n = this._last;
|
|
for (var w = t < 0 ? t : i; n;) {
|
|
if (a = n._prev, (n._act || w <= n._end) && n._ts && h !== n) {
|
|
if (n.parent !== this) return this.render(t, e, r);
|
|
if (n.render(0 < n._ts ? (w - n._start) * n._ts : (n._dirty ? n.totalDuration() : n._tDur) + (w - n._start) * n._ts, e, r), i !== this._time || !this._ts && !u) {
|
|
h = 0, a && (v += this._zTime = w ? -U : U);
|
|
break
|
|
}
|
|
}
|
|
n = a
|
|
}
|
|
}
|
|
if (h && !e && (this.pause(), h.render(c <= i ? 0 : -U)._zTime = c <= i ? 1 : -1, this._ts)) return this._start = f, xa(this), this.render(t, e, r);
|
|
this._onUpdate && !e && xt(this, "onUpdate", !0), (v === m && m >= this.totalDuration() || !v && c) && (f !== this._start && Math.abs(l) === Math.abs(this._ts) || this._lock || (!t && g || !(v === m && 0 < this._ts || !v && this._ts < 0) || qa(this, 1), e || t < 0 && !c || !v && !c || (xt(this, v === m ? "onComplete" : "onReverseComplete", !0), !this._prom || v < m && 0 < this.timeScale() || this._prom())))
|
|
}
|
|
return this
|
|
}, t.add = function add(t, e) {
|
|
var r = this;
|
|
if (p(e) || (e = Ia(this, e)), !(t instanceof Lt)) {
|
|
if (tt(t)) return t.forEach(function(t) {
|
|
return r.add(t, e)
|
|
}), this;
|
|
if (n(t)) return this.addLabel(t, e);
|
|
if (!o(t)) return this;
|
|
t = Xt.delayedCall(0, t)
|
|
}
|
|
return this !== t ? Aa(this, t, e) : this
|
|
}, t.getChildren = function getChildren(t, e, r, i) {
|
|
void 0 === t && (t = !0), void 0 === e && (e = !0), void 0 === r && (r = !0), void 0 === i && (i = -B);
|
|
for (var n = [], a = this._first; a;) a._start >= i && (a instanceof Xt ? e && n.push(a) : (r && n.push(a), t && n.push.apply(n, a.getChildren(!0, e, r)))), a = a._next;
|
|
return n
|
|
}, t.getById = function getById(t) {
|
|
for (var e = this.getChildren(1, 1, 1), r = e.length; r--;)
|
|
if (e[r].vars.id === t) return e[r]
|
|
}, t.remove = function remove(t) {
|
|
return n(t) ? this.removeLabel(t) : o(t) ? this.killTweensOf(t) : (pa(this, t), t === this._recent && (this._recent = this._last), ra(this))
|
|
}, t.totalTime = function totalTime(t, e) {
|
|
return arguments.length ? (this._forcing = 1, !this._dp && this._ts && (this._start = aa(At.time - (0 < this._ts ? t / this._ts : (this.totalDuration() - t) / -this._ts))), i.prototype.totalTime.call(this, t, e), this._forcing = 0, this) : this._tTime
|
|
}, t.addLabel = function addLabel(t, e) {
|
|
return this.labels[t] = Ia(this, e), this
|
|
}, t.removeLabel = function removeLabel(t) {
|
|
return delete this.labels[t], this
|
|
}, t.addPause = function addPause(t, e, r) {
|
|
var i = Xt.delayedCall(0, e || O, r);
|
|
return i.data = "isPause", this._hasPause = 1, Aa(this, i, Ia(this, t))
|
|
}, t.removePause = function removePause(t) {
|
|
var e = this._first;
|
|
for (t = Ia(this, t); e;) e._start === t && "isPause" === e.data && qa(e), e = e._next
|
|
}, t.killTweensOf = function killTweensOf(t, e, r) {
|
|
for (var i = this.getTweensOf(t, r), n = i.length; n--;) qt !== i[n] && i[n].kill(t, e);
|
|
return this
|
|
}, t.getTweensOf = function getTweensOf(t, e) {
|
|
for (var r, i = [], n = bt(t), a = this._first, s = p(e); a;) a instanceof Xt ? ba(a._targets, n) && (s ? (!qt || a._initted && a._ts) && a.globalTime(0) <= e && a.globalTime(a.totalDuration()) > e : !e || a.isActive()) && i.push(a) : (r = a.getTweensOf(n, e)).length && i.push.apply(i, r), a = a._next;
|
|
return i
|
|
}, t.tweenTo = function tweenTo(t, e) {
|
|
e = e || {};
|
|
var r = this,
|
|
i = Ia(r, t),
|
|
n = e.startAt,
|
|
a = e.onStart,
|
|
s = e.onStartParams,
|
|
o = Xt.to(r, ha(e, {
|
|
ease: "none",
|
|
lazy: !1,
|
|
time: i,
|
|
duration: e.duration || Math.abs((i - (n && "time" in n ? n.time : r._time)) / r.timeScale()) || U,
|
|
onStart: function onStart() {
|
|
r.pause();
|
|
var t = e.duration || Math.abs((i - r._time) / r.timeScale());
|
|
o._dur !== t && Fa(o, t, 0, 1).render(o._time, !0, !0), a && a.apply(o, s || [])
|
|
}
|
|
}));
|
|
return o
|
|
}, t.tweenFromTo = function tweenFromTo(t, e, r) {
|
|
return this.tweenTo(e, ha({
|
|
startAt: {
|
|
time: Ia(this, t)
|
|
}
|
|
}, r))
|
|
}, t.recent = function recent() {
|
|
return this._recent
|
|
}, t.nextLabel = function nextLabel(t) {
|
|
return void 0 === t && (t = this._time), db(this, Ia(this, t))
|
|
}, t.previousLabel = function previousLabel(t) {
|
|
return void 0 === t && (t = this._time), db(this, Ia(this, t), 1)
|
|
}, t.currentLabel = function currentLabel(t) {
|
|
return arguments.length ? this.seek(t, !0) : this.previousLabel(this._time + U)
|
|
}, t.shiftChildren = function shiftChildren(t, e, r) {
|
|
void 0 === r && (r = 0);
|
|
for (var i, n = this._first, a = this.labels; n;) n._start >= r && (n._start += t, n._end += t), n = n._next;
|
|
if (e)
|
|
for (i in a) a[i] >= r && (a[i] += t);
|
|
return ra(this)
|
|
}, t.invalidate = function invalidate() {
|
|
var t = this._first;
|
|
for (this._lock = 0; t;) t.invalidate(), t = t._next;
|
|
return i.prototype.invalidate.call(this)
|
|
}, t.clear = function clear(t) {
|
|
void 0 === t && (t = !0);
|
|
for (var e, r = this._first; r;) e = r._next, this.remove(r), r = e;
|
|
return this._time = this._tTime = this._pTime = 0, t && (this.labels = {}), ra(this)
|
|
}, t.totalDuration = function totalDuration(t) {
|
|
var e, r, i, n = 0,
|
|
a = this,
|
|
s = a._last,
|
|
o = B;
|
|
if (arguments.length) return a.timeScale((a._repeat < 0 ? a.duration() : a.totalDuration()) / (a.reversed() ? -t : t));
|
|
if (a._dirty) {
|
|
for (i = a.parent; s;) e = s._prev, s._dirty && s.totalDuration(), o < (r = s._start) && a._sort && s._ts && !a._lock ? (a._lock = 1, Aa(a, s, r - s._delay, 1)._lock = 0) : o = r, r < 0 && s._ts && (n -= r, (!i && !a._dp || i && i.smoothChildTiming) && (a._start += r / a._ts, a._time -= r, a._tTime -= r), a.shiftChildren(-r, !1, -Infinity), o = 0), s._end > n && s._ts && (n = s._end), s = e;
|
|
Fa(a, a === E && a._time > n ? a._time : n, 1, 1), a._dirty = 0
|
|
}
|
|
return a._tDur
|
|
}, Timeline.updateRoot = function updateRoot(t) {
|
|
if (E._ts && (ea(E, wa(t, E)), d = At.frame), At.frame >= pt) {
|
|
pt += j.autoSleep || 120;
|
|
var e = E._first;
|
|
if ((!e || !e._ts) && j.autoSleep && At._listeners.length < 2) {
|
|
for (; e && !e._ts;) e = e._next;
|
|
e || At.sleep()
|
|
}
|
|
}
|
|
}, Timeline
|
|
}(Lt);
|
|
ha(Bt.prototype, {
|
|
_lock: 0,
|
|
_hasPause: 0,
|
|
_forcing: 0
|
|
});
|
|
|
|
function Nb(t, e, i, a, s, u) {
|
|
var h, l, f, d;
|
|
if (ft[t] && !1 !== (h = new ft[t]).init(s, h.rawVars ? e[t] : function _processVars(t, e, i, a, s) {
|
|
if (o(t) && (t = jt(t, s, e, i, a)), !r(t) || t.style && t.nodeType || tt(t) || H(t)) return n(t) ? jt(t, s, e, i, a) : t;
|
|
var u, h = {};
|
|
for (u in t) h[u] = jt(t[u], s, e, i, a);
|
|
return h
|
|
}(e[t], a, s, u, i), i, a, u) && (i._pt = l = new ie(i._pt, s, t, 0, 1, h.render, h, 0, h.priority), i !== c))
|
|
for (f = i._ptLookup[i._targets.indexOf(s)], d = h._props.length; d--;) f[h._props[d]] = l;
|
|
return h
|
|
}
|
|
var qt, Yt = function _addPropTween(t, e, r, i, a, s, u, h, l) {
|
|
o(i) && (i = i(a || 0, t, s));
|
|
var f, d = t[e],
|
|
p = "get" !== r ? r : o(d) ? l ? t[e.indexOf("set") || !o(t["get" + e.substr(3)]) ? e : "get" + e.substr(3)](l) : t[e]() : d,
|
|
_ = o(d) ? l ? Jt : Zt : Gt;
|
|
if (n(i) && (~i.indexOf("random(") && (i = ab(i)), "=" === i.charAt(1) && (i = parseFloat(p) + parseFloat(i.substr(2)) * ("-" === i.charAt(0) ? -1 : 1) + (La(p) || 0))), p !== i) return isNaN(p * i) ? (d || e in t || L(e, i), function _addComplexStringPropTween(t, e, r, i, n, a, s) {
|
|
var o, u, h, l, f, d, p, _, c = new ie(this._pt, t, e, 0, 1, Ht, null, n),
|
|
m = 0,
|
|
g = 0;
|
|
for (c.b = r, c.e = i, r += "", (p = ~(i += "").indexOf("random(")) && (i = ab(i)), a && (a(_ = [r, i], t, e), r = _[0], i = _[1]), u = r.match(nt) || []; o = nt.exec(i);) l = o[0], f = i.substring(m, o.index), h ? h = (h + 1) % 5 : "rgba(" === f.substr(-5) && (h = 1), l !== u[g++] && (d = parseFloat(u[g - 1]) || 0, c._pt = {
|
|
_next: c._pt,
|
|
p: f || 1 === g ? f : ",",
|
|
s: d,
|
|
c: "=" === l.charAt(1) ? parseFloat(l.substr(2)) * ("-" === l.charAt(0) ? -1 : 1) : parseFloat(l) - d,
|
|
m: h && h < 4 ? Math.round : 0
|
|
}, m = nt.lastIndex);
|
|
return c.c = m < i.length ? i.substring(m, i.length) : "", c.fp = s, (at.test(i) || p) && (c.e = 0), this._pt = c
|
|
}.call(this, t, e, p, i, _, h || j.stringFilter, l)) : (f = new ie(this._pt, t, e, +p || 0, i - (p || 0), "boolean" == typeof d ? $t : Wt, 0, _), l && (f.fp = l), u && f.modifier(u, this, t), this._pt = f)
|
|
},
|
|
Nt = function _initTween(t, e) {
|
|
var r, i, n, a, o, u, h, l, f, d, p, _, c, m = t.vars,
|
|
g = m.ease,
|
|
v = m.startAt,
|
|
y = m.immediateRender,
|
|
T = m.lazy,
|
|
b = m.onUpdate,
|
|
w = m.onUpdateParams,
|
|
x = m.callbackScope,
|
|
k = m.runBackwards,
|
|
O = m.yoyoEase,
|
|
M = m.keyframes,
|
|
C = m.autoRevert,
|
|
A = t._dur,
|
|
P = t._startAt,
|
|
D = t._targets,
|
|
S = t.parent,
|
|
z = S && "nested" === S.data ? S.parent._targets : D,
|
|
F = "auto" === t._overwrite,
|
|
R = t.timeline;
|
|
if (!R || M && g || (g = "none"), t._ease = Rt(g, I.ease), t._yEase = O ? Ft(Rt(!0 === O ? g : O, I.ease)) : 0, O && t._yoyo && !t._repeat && (O = t._yEase, t._yEase = t._ease, t._ease = O), !R) {
|
|
if (_ = (l = D[0] ? Z(D[0]).harness : 0) && m[l.prop], r = la(m, ut), P && P.render(-1, !0).kill(), v) {
|
|
if (qa(t._startAt = Xt.set(D, ha({
|
|
data: "isStart",
|
|
overwrite: !1,
|
|
parent: S,
|
|
immediateRender: !0,
|
|
lazy: s(T),
|
|
startAt: null,
|
|
delay: 0,
|
|
onUpdate: b,
|
|
onUpdateParams: w,
|
|
callbackScope: x,
|
|
stagger: 0
|
|
}, v))), y)
|
|
if (0 < e) C || (t._startAt = 0);
|
|
else if (A && !(e < 0 && P)) return void(e && (t._zTime = e))
|
|
} else if (k && A)
|
|
if (P) C || (t._startAt = 0);
|
|
else if (e && (y = !1), n = ha({
|
|
overwrite: !1,
|
|
data: "isFromStart",
|
|
lazy: y && s(T),
|
|
immediateRender: y,
|
|
stagger: 0,
|
|
parent: S
|
|
}, r), _ && (n[l.prop] = _), qa(t._startAt = Xt.set(D, n)), y) {
|
|
if (!e) return
|
|
} else _initTween(t._startAt, U);
|
|
for (t._pt = 0, T = A && s(T) || T && !A, i = 0; i < D.length; i++) {
|
|
if (h = (o = D[i])._gsap || Y(D)[i]._gsap, t._ptLookup[i] = d = {}, lt[h.id] && da(), p = z === D ? i : z.indexOf(o), l && !1 !== (f = new l).init(o, _ || r, t, p, z) && (t._pt = a = new ie(t._pt, o, f.name, 0, 1, f.render, f, 0, f.priority), f._props.forEach(function(t) {
|
|
d[t] = a
|
|
}), f.priority && (u = 1)), !l || _)
|
|
for (n in r) ft[n] && (f = Nb(n, r, t, p, o, z)) ? f.priority && (u = 1) : d[n] = a = Yt.call(t, o, n, "get", r[n], p, z, 0, m.stringFilter);
|
|
t._op && t._op[i] && t.kill(o, t._op[i]), F && t._pt && (qt = t, E.killTweensOf(o, d, t.globalTime(0)), c = !t.parent, qt = 0), t._pt && T && (lt[h.id] = 1)
|
|
}
|
|
u && re(t), t._onInit && t._onInit(t)
|
|
}
|
|
t._from = !R && !!m.runBackwards, t._onUpdate = b, t._initted = (!t._op || t._pt) && !c
|
|
},
|
|
jt = function _parseFuncOrString(t, e, r, i, a) {
|
|
return o(t) ? t.call(e, r, i, a) : n(t) && ~t.indexOf("random(") ? ab(t) : t
|
|
},
|
|
Ut = ct + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase",
|
|
Vt = (Ut + ",id,stagger,delay,duration,paused,scrollTrigger").split(","),
|
|
Xt = function(S) {
|
|
function Tween(t, e, i, n) {
|
|
var a;
|
|
"number" == typeof e && (i.duration = e, e = i, i = null);
|
|
var o, h, l, f, d, _, c, m, g = (a = S.call(this, n ? e : ma(e), i) || this).vars,
|
|
v = g.duration,
|
|
y = g.delay,
|
|
T = g.immediateRender,
|
|
b = g.stagger,
|
|
w = g.overwrite,
|
|
x = g.keyframes,
|
|
k = g.defaults,
|
|
C = g.scrollTrigger,
|
|
A = g.yoyoEase,
|
|
P = a.parent,
|
|
D = (tt(t) || H(t) ? p(t[0]) : "length" in e) ? [t] : bt(t);
|
|
if (a._targets = D.length ? Y(D) : M("GSAP target " + t + " not found. https://greensock.com", !j.nullTargetWarn) || [], a._ptLookup = [], a._overwrite = w, x || b || u(v) || u(y)) {
|
|
if (e = a.vars, (o = a.timeline = new Bt({
|
|
data: "nested",
|
|
defaults: k || {}
|
|
})).kill(), o.parent = _assertThisInitialized(a), x) ha(o.vars.defaults, {
|
|
ease: "none"
|
|
}), x.forEach(function(t) {
|
|
return o.to(D, t, ">")
|
|
});
|
|
else {
|
|
if (f = D.length, c = b ? Sa(b) : O, r(b))
|
|
for (d in b) ~Ut.indexOf(d) && ((m = m || {})[d] = b[d]);
|
|
for (h = 0; h < f; h++) {
|
|
for (d in l = {}, e) Vt.indexOf(d) < 0 && (l[d] = e[d]);
|
|
l.stagger = 0, A && (l.yoyoEase = A), m && mt(l, m), _ = D[h], l.duration = +jt(v, _assertThisInitialized(a), h, _, D), l.delay = (+jt(y, _assertThisInitialized(a), h, _, D) || 0) - a._delay, !b && 1 === f && l.delay && (a._delay = y = l.delay, a._start += y, l.delay = 0), o.to(_, l, c(h, _, D))
|
|
}
|
|
o.duration() ? v = y = 0 : a.timeline = 0
|
|
}
|
|
v || a.duration(v = o.duration())
|
|
} else a.timeline = 0;
|
|
return !0 === w && (qt = _assertThisInitialized(a), E.killTweensOf(D), qt = 0), P && za(P, _assertThisInitialized(a)), (T || !v && !x && a._start === aa(P._time) && s(T) && function _hasNoPausedAncestors(t) {
|
|
return !t || t._ts && _hasNoPausedAncestors(t.parent)
|
|
}(_assertThisInitialized(a)) && "nested" !== P.data) && (a._tTime = -U, a.render(Math.max(0, -y))), C && Ba(_assertThisInitialized(a), C), a
|
|
}
|
|
_inheritsLoose(Tween, S);
|
|
var t = Tween.prototype;
|
|
return t.render = function render(t, e, r) {
|
|
var i, n, a, s, o, u, h, l, f, d = this._time,
|
|
p = this._tDur,
|
|
_ = this._dur,
|
|
c = p - U < t && 0 <= t ? p : t < U ? 0 : t;
|
|
if (_) {
|
|
if (c !== this._tTime || !t || r || this._startAt && this._zTime < 0 != t < 0) {
|
|
if (i = c, l = this.timeline, this._repeat) {
|
|
if (s = _ + this._rDelay, i = aa(c % s), c === p ? (a = this._repeat, i = _) : ((a = ~~(c / s)) && a === c / s && (i = _, a--), _ < i && (i = _)), (u = this._yoyo && 1 & a) && (f = this._yEase, i = _ - i), o = gt(this._tTime, s), i === d && !r && this._initted) return this;
|
|
a !== o && (l && this._yEase && Bb(l, u), !this.vars.repeatRefresh || u || this._lock || (this._lock = r = 1, this.render(aa(s * a), !0).invalidate()._lock = 0))
|
|
}
|
|
if (!this._initted) {
|
|
if (Ca(this, t < 0 ? t : i, r, e)) return this._tTime = 0, this;
|
|
if (_ !== this._dur) return this.render(t, e, r)
|
|
}
|
|
for (this._tTime = c, this._time = i, !this._act && this._ts && (this._act = 1, this._lazy = 0), this.ratio = h = (f || this._ease)(i / _), this._from && (this.ratio = h = 1 - h), !i || d || e || xt(this, "onStart"), n = this._pt; n;) n.r(h, n.d), n = n._next;
|
|
l && l.render(t < 0 ? t : !i && u ? -U : l._dur * h, e, r) || this._startAt && (this._zTime = t), this._onUpdate && !e && (t < 0 && this._startAt && this._startAt.render(t, !0, r), xt(this, "onUpdate")), this._repeat && a !== o && this.vars.onRepeat && !e && this.parent && xt(this, "onRepeat"), c !== this._tDur && c || this._tTime !== c || (t < 0 && this._startAt && !this._onUpdate && this._startAt.render(t, !0, !0), !t && _ || !(c === this._tDur && 0 < this._ts || !c && this._ts < 0) || qa(this, 1), e || t < 0 && !d || !c && !d || (xt(this, c === p ? "onComplete" : "onReverseComplete", !0), !this._prom || c < p && 0 < this.timeScale() || this._prom()))
|
|
}
|
|
} else ! function _renderZeroDurationTween(t, e, r, i) {
|
|
var n, a, s = t.ratio,
|
|
o = e < 0 || !e && s && !t._start && t._zTime > U && !t._dp._lock || (t._ts < 0 || t._dp._ts < 0) && "isFromStart" !== t.data && "isStart" !== t.data ? 0 : 1,
|
|
u = t._rDelay,
|
|
h = 0;
|
|
if (u && t._repeat && (h = yt(0, t._tDur, e), gt(h, u) !== (a = gt(t._tTime, u)) && (s = 1 - o, t.vars.repeatRefresh && t._initted && t.invalidate())), t._initted || !Ca(t, e, i, r))
|
|
if (o !== s || i || t._zTime === U || !e && t._zTime) {
|
|
for (a = t._zTime, t._zTime = e || (r ? U : 0), r = r || e && !a, t.ratio = o, t._from && (o = 1 - o), t._time = 0, t._tTime = h, r || xt(t, "onStart"), n = t._pt; n;) n.r(o, n.d), n = n._next;
|
|
t._startAt && e < 0 && t._startAt.render(e, !0, !0), t._onUpdate && !r && xt(t, "onUpdate"), h && t._repeat && !r && t.parent && xt(t, "onRepeat"), (e >= t._tDur || e < 0) && t.ratio === o && (o && qa(t, 1), r || (xt(t, o ? "onComplete" : "onReverseComplete", !0), t._prom && t._prom()))
|
|
} else t._zTime || (t._zTime = e)
|
|
}(this, t, e, r);
|
|
return this
|
|
}, t.targets = function targets() {
|
|
return this._targets
|
|
}, t.invalidate = function invalidate() {
|
|
return this._pt = this._op = this._startAt = this._onUpdate = this._act = this._lazy = 0, this._ptLookup = [], this.timeline && this.timeline.invalidate(), S.prototype.invalidate.call(this)
|
|
}, t.kill = function kill(t, e) {
|
|
if (void 0 === e && (e = "all"), !(t || e && "all" !== e) && (this._lazy = 0, this.parent)) return fb(this);
|
|
if (this.timeline) {
|
|
var r = this.timeline.totalDuration();
|
|
return this.timeline.killTweensOf(t, e, qt && !0 !== qt.vars.overwrite)._first || fb(this), this.parent && r !== this.timeline.totalDuration() && Fa(this, this._dur * this.timeline._tDur / r, 0, 1), this
|
|
}
|
|
var i, a, s, o, u, h, l, f = this._targets,
|
|
d = t ? bt(t) : f,
|
|
p = this._ptLookup,
|
|
c = this._pt;
|
|
if ((!e || "all" === e) && function _arraysMatch(t, e) {
|
|
for (var r = t.length, i = r === e.length; i && r-- && t[r] === e[r];);
|
|
return r < 0
|
|
}(f, d)) return "all" === e && (this._pt = 0), fb(this);
|
|
for (i = this._op = this._op || [], "all" !== e && (n(e) && (u = {}, _(e, function(t) {
|
|
return u[t] = 1
|
|
}), e = u), e = function _addAliasesToVars(t, e) {
|
|
var r, i, n, a, s = t[0] ? Z(t[0]).harness : 0,
|
|
o = s && s.aliases;
|
|
if (!o) return e;
|
|
for (i in r = mt({}, e), o)
|
|
if (i in r)
|
|
for (n = (a = o[i].split(",")).length; n--;) r[a[n]] = r[i];
|
|
return r
|
|
}(f, e)), l = f.length; l--;)
|
|
if (~d.indexOf(f[l]))
|
|
for (u in a = p[l], "all" === e ? (i[l] = e, o = a, s = {}) : (s = i[l] = i[l] || {}, o = e), o)(h = a && a[u]) && ("kill" in h.d && !0 !== h.d.kill(u) || pa(this, h, "_pt"), delete a[u]), "all" !== s && (s[u] = 1);
|
|
return this._initted && !this._pt && c && fb(this), this
|
|
}, Tween.to = function to(t, e, r) {
|
|
return new Tween(t, e, r)
|
|
}, Tween.from = function from(t, e) {
|
|
return new Tween(t, ca(arguments, 1))
|
|
}, Tween.delayedCall = function delayedCall(t, e, r, i) {
|
|
return new Tween(e, 0, {
|
|
immediateRender: !1,
|
|
lazy: !1,
|
|
overwrite: !1,
|
|
delay: t,
|
|
onComplete: e,
|
|
onReverseComplete: e,
|
|
onCompleteParams: r,
|
|
onReverseCompleteParams: r,
|
|
callbackScope: i
|
|
})
|
|
}, Tween.fromTo = function fromTo(t, e, r) {
|
|
return new Tween(t, ca(arguments, 2))
|
|
}, Tween.set = function set(t, e) {
|
|
return e.duration = 0, e.repeatDelay || (e.repeat = 0), new Tween(t, e)
|
|
}, Tween.killTweensOf = function killTweensOf(t, e, r) {
|
|
return E.killTweensOf(t, e, r)
|
|
}, Tween
|
|
}(Lt);
|
|
ha(Xt.prototype, {
|
|
_targets: [],
|
|
_lazy: 0,
|
|
_startAt: 0,
|
|
_op: 0,
|
|
_onInit: 0
|
|
}), _("staggerTo,staggerFrom,staggerFromTo", function(r) {
|
|
Xt[r] = function() {
|
|
var t = new Bt,
|
|
e = Tt.call(arguments, 0);
|
|
return e.splice("staggerFromTo" === r ? 5 : 4, 0, 0), t[r].apply(t, e)
|
|
}
|
|
});
|
|
|
|
function Yb(t, e, r) {
|
|
return t.setAttribute(e, r)
|
|
}
|
|
|
|
function ec(t, e, r, i) {
|
|
i.mSet(t, e, i.m.call(i.tween, r, i.mt), i)
|
|
}
|
|
var Gt = function _setterPlain(t, e, r) {
|
|
return t[e] = r
|
|
},
|
|
Zt = function _setterFunc(t, e, r) {
|
|
return t[e](r)
|
|
},
|
|
Jt = function _setterFuncWithParam(t, e, r, i) {
|
|
return t[e](i.fp, r)
|
|
},
|
|
Qt = function _getSetter(t, e) {
|
|
return o(t[e]) ? Zt : q(t[e]) && t.setAttribute ? Yb : Gt
|
|
},
|
|
Wt = function _renderPlain(t, e) {
|
|
return e.set(e.t, e.p, Math.round(1e4 * (e.s + e.c * t)) / 1e4, e)
|
|
},
|
|
$t = function _renderBoolean(t, e) {
|
|
return e.set(e.t, e.p, !!(e.s + e.c * t), e)
|
|
},
|
|
Ht = function _renderComplexString(t, e) {
|
|
var r = e._pt,
|
|
i = "";
|
|
if (!t && e.b) i = e.b;
|
|
else if (1 === t && e.e) i = e.e;
|
|
else {
|
|
for (; r;) i = r.p + (r.m ? r.m(r.s + r.c * t) : Math.round(1e4 * (r.s + r.c * t)) / 1e4) + i, r = r._next;
|
|
i += e.c
|
|
}
|
|
e.set(e.t, e.p, i, e)
|
|
},
|
|
Kt = function _renderPropTweens(t, e) {
|
|
for (var r = e._pt; r;) r.r(t, r.d), r = r._next
|
|
},
|
|
te = function _addPluginModifier(t, e, r, i) {
|
|
for (var n, a = this._pt; a;) n = a._next, a.p === i && a.modifier(t, e, r), a = n
|
|
},
|
|
ee = function _killPropTweensOf(t) {
|
|
for (var e, r, i = this._pt; i;) r = i._next, i.p === t && !i.op || i.op === t ? pa(this, i, "_pt") : i.dep || (e = 1), i = r;
|
|
return !e
|
|
},
|
|
re = function _sortPropTweensByPriority(t) {
|
|
for (var e, r, i, n, a = t._pt; a;) {
|
|
for (e = a._next, r = i; r && r.pr > a.pr;) r = r._next;
|
|
(a._prev = r ? r._prev : n) ? a._prev._next = a: i = a, (a._next = r) ? r._prev = a : n = a, a = e
|
|
}
|
|
t._pt = i
|
|
},
|
|
ie = (PropTween.prototype.modifier = function modifier(t, e, r) {
|
|
this.mSet = this.mSet || this.set, this.set = ec, this.m = t, this.mt = r, this.tween = e
|
|
}, PropTween);
|
|
|
|
function PropTween(t, e, r, i, n, a, s, o, u) {
|
|
this.t = e, this.s = i, this.c = n, this.p = r, this.r = a || Wt, this.d = s || this, this.set = o || Gt, this.pr = u || 0, (this._next = t) && (t._prev = this)
|
|
}
|
|
_(ct + "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(t) {
|
|
return ut[t] = 1
|
|
}), ot.TweenMax = ot.TweenLite = Xt, ot.TimelineLite = ot.TimelineMax = Bt, E = new Bt({
|
|
sortChildren: !1,
|
|
defaults: I,
|
|
autoRemoveChildren: !0,
|
|
id: "root",
|
|
smoothChildTiming: !0
|
|
}), j.stringFilter = qb;
|
|
var ne = {
|
|
registerPlugin: function registerPlugin() {
|
|
for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++) e[r] = arguments[r];
|
|
e.forEach(function(t) {
|
|
return function _createPlugin(t) {
|
|
var e = (t = !t.name && t.default || t).name,
|
|
r = o(t),
|
|
i = e && !r && t.init ? function() {
|
|
this._props = []
|
|
} : t,
|
|
n = {
|
|
init: O,
|
|
render: Kt,
|
|
add: Yt,
|
|
kill: ee,
|
|
modifier: te,
|
|
rawVars: 0
|
|
},
|
|
a = {
|
|
targetTest: 0,
|
|
get: 0,
|
|
getSetter: Qt,
|
|
aliases: {},
|
|
register: 0
|
|
};
|
|
if (Pt(), t !== i) {
|
|
if (ft[e]) return;
|
|
ha(i, ha(la(t, n), a)), mt(i.prototype, mt(n, la(t, a))), ft[i.prop = e] = i, t.targetTest && (_t.push(i), ut[e] = 1), e = ("css" === e ? "CSS" : e.charAt(0).toUpperCase() + e.substr(1)) + "Plugin"
|
|
}
|
|
N(e, i), t.register && t.register(ae, i, ie)
|
|
}(t)
|
|
})
|
|
},
|
|
timeline: function timeline(t) {
|
|
return new Bt(t)
|
|
},
|
|
getTweensOf: function getTweensOf(t, e) {
|
|
return E.getTweensOf(t, e)
|
|
},
|
|
getProperty: function getProperty(i, t, e, r) {
|
|
n(i) && (i = bt(i)[0]);
|
|
var a = Z(i || {}).get,
|
|
s = e ? ga : fa;
|
|
return "native" === e && (e = ""), i ? t ? s((ft[t] && ft[t].get || a)(i, t, e, r)) : function(t, e, r) {
|
|
return s((ft[t] && ft[t].get || a)(i, t, e, r))
|
|
} : i
|
|
},
|
|
quickSetter: function quickSetter(r, e, i) {
|
|
if (1 < (r = bt(r)).length) {
|
|
var n = r.map(function(t) {
|
|
return ae.quickSetter(t, e, i)
|
|
}),
|
|
a = n.length;
|
|
return function(t) {
|
|
for (var e = a; e--;) n[e](t)
|
|
}
|
|
}
|
|
r = r[0] || {};
|
|
var s = ft[e],
|
|
o = Z(r),
|
|
u = o.harness && (o.harness.aliases || {})[e] || e,
|
|
h = s ? function(t) {
|
|
var e = new s;
|
|
c._pt = 0, e.init(r, i ? t + i : t, c, 0, [r]), e.render(1, e), c._pt && Kt(1, c)
|
|
} : o.set(r, u);
|
|
return s ? h : function(t) {
|
|
return h(r, u, i ? t + i : t, o, 1)
|
|
}
|
|
},
|
|
isTweening: function isTweening(t) {
|
|
return 0 < E.getTweensOf(t, !0).length
|
|
},
|
|
defaults: function defaults(t) {
|
|
return t && t.ease && (t.ease = Rt(t.ease, I.ease)), ka(I, t || {})
|
|
},
|
|
config: function config(t) {
|
|
return ka(j, t || {})
|
|
},
|
|
registerEffect: function registerEffect(t) {
|
|
var n = t.name,
|
|
i = t.effect,
|
|
e = t.plugins,
|
|
a = t.defaults,
|
|
s = t.extendTimeline;
|
|
(e || "").split(",").forEach(function(t) {
|
|
return t && !ft[t] && !ot[t] && M(n + " effect requires " + t + " plugin.")
|
|
}), dt[n] = function(t, e, r) {
|
|
return i(bt(t), ha(e || {}, a), r)
|
|
}, s && (Bt.prototype[n] = function(t, e, i) {
|
|
return this.add(dt[n](t, r(e) ? e : (i = e) && {}, this), i)
|
|
})
|
|
},
|
|
registerEase: function registerEase(t, e) {
|
|
Dt[t] = Rt(e)
|
|
},
|
|
parseEase: function parseEase(t, e) {
|
|
return arguments.length ? Rt(t, e) : Dt
|
|
},
|
|
getById: function getById(t) {
|
|
return E.getById(t)
|
|
},
|
|
exportRoot: function exportRoot(t, e) {
|
|
void 0 === t && (t = {});
|
|
var r, i, n = new Bt(t);
|
|
for (n.smoothChildTiming = s(t.smoothChildTiming), E.remove(n), n._dp = 0, n._time = n._tTime = E._time, r = E._first; r;) i = r._next, !e && !r._dur && r instanceof Xt && r.vars.onComplete === r._targets[0] || Aa(n, r, r._start - r._delay), r = i;
|
|
return Aa(E, n, 0), n
|
|
},
|
|
utils: {
|
|
wrap: function wrap(e, t, r) {
|
|
var i = t - e;
|
|
return tt(e) ? Za(e, wrap(0, e.length), t) : Ja(r, function(t) {
|
|
return (i + (t - e) % i) % i + e
|
|
})
|
|
},
|
|
wrapYoyo: function wrapYoyo(e, t, r) {
|
|
var i = t - e,
|
|
n = 2 * i;
|
|
return tt(e) ? Za(e, wrapYoyo(0, e.length - 1), t) : Ja(r, function(t) {
|
|
return e + (i < (t = (n + (t - e) % n) % n || 0) ? n - t : t)
|
|
})
|
|
},
|
|
distribute: Sa,
|
|
random: Va,
|
|
snap: Ua,
|
|
normalize: function normalize(t, e, r) {
|
|
return wt(t, e, 0, 1, r)
|
|
},
|
|
getUnit: La,
|
|
clamp: function clamp(e, r, t) {
|
|
return Ja(t, function(t) {
|
|
return yt(e, r, t)
|
|
})
|
|
},
|
|
splitColor: lb,
|
|
toArray: bt,
|
|
mapRange: wt,
|
|
pipe: function pipe() {
|
|
for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++) e[r] = arguments[r];
|
|
return function(t) {
|
|
return e.reduce(function(t, e) {
|
|
return e(t)
|
|
}, t)
|
|
}
|
|
},
|
|
unitize: function unitize(e, r) {
|
|
return function(t) {
|
|
return e(parseFloat(t)) + (r || La(t))
|
|
}
|
|
},
|
|
interpolate: function interpolate(e, r, t, i) {
|
|
var a = isNaN(e + r) ? 0 : function(t) {
|
|
return (1 - t) * e + t * r
|
|
};
|
|
if (!a) {
|
|
var s, o, u, h, l, f = n(e),
|
|
d = {};
|
|
if (!0 === t && (i = 1) && (t = null), f) e = {
|
|
p: e
|
|
}, r = {
|
|
p: r
|
|
};
|
|
else if (tt(e) && !tt(r)) {
|
|
for (u = [], h = e.length, l = h - 2, o = 1; o < h; o++) u.push(interpolate(e[o - 1], e[o]));
|
|
h--, a = function func(t) {
|
|
t *= h;
|
|
var e = Math.min(l, ~~t);
|
|
return u[e](t - e)
|
|
}, t = r
|
|
} else i || (e = mt(tt(e) ? [] : {}, e));
|
|
if (!u) {
|
|
for (s in r) Yt.call(d, e, s, "get", r[s]);
|
|
a = function func(t) {
|
|
return Kt(t, d) || (f ? e.p : e)
|
|
}
|
|
}
|
|
}
|
|
return Ja(t, a)
|
|
},
|
|
shuffle: Ra
|
|
},
|
|
install: K,
|
|
effects: dt,
|
|
ticker: At,
|
|
updateRoot: Bt.updateRoot,
|
|
plugins: ft,
|
|
globalTimeline: E,
|
|
core: {
|
|
PropTween: ie,
|
|
globals: N,
|
|
Tween: Xt,
|
|
Timeline: Bt,
|
|
Animation: Lt,
|
|
getCache: Z,
|
|
_removeLinkedListItem: pa
|
|
}
|
|
};
|
|
_("to,from,fromTo,delayedCall,set,killTweensOf", function(t) {
|
|
return ne[t] = Xt[t]
|
|
}), At.add(Bt.updateRoot), c = ne.to({}, {
|
|
duration: 0
|
|
});
|
|
|
|
function ic(t, e) {
|
|
for (var r = t._pt; r && r.p !== e && r.op !== e && r.fp !== e;) r = r._next;
|
|
return r
|
|
}
|
|
|
|
function kc(t, a) {
|
|
return {
|
|
name: t,
|
|
rawVars: 1,
|
|
init: function init(t, i, e) {
|
|
e._onInit = function(t) {
|
|
var e, r;
|
|
if (n(i) && (e = {}, _(i, function(t) {
|
|
return e[t] = 1
|
|
}), i = e), a) {
|
|
for (r in e = {}, i) e[r] = a(i[r]);
|
|
i = e
|
|
}! function _addModifiers(t, e) {
|
|
var r, i, n, a = t._targets;
|
|
for (r in e)
|
|
for (i = a.length; i--;)(n = (n = t._ptLookup[i][r]) && n.d) && (n._pt && (n = ic(n, r)), n && n.modifier && n.modifier(e[r], t, a[i], r))
|
|
}(t, i)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
var ae = ne.registerPlugin({
|
|
name: "attr",
|
|
init: function init(t, e, r, i, n) {
|
|
var a, s;
|
|
for (a in e)(s = this.add(t, "setAttribute", (t.getAttribute(a) || 0) + "", e[a], i, n, 0, 0, a)) && (s.op = a), this._props.push(a)
|
|
}
|
|
}, {
|
|
name: "endArray",
|
|
init: function init(t, e) {
|
|
for (var r = e.length; r--;) this.add(t, r, t[r] || 0, e[r])
|
|
}
|
|
}, kc("roundProps", Ta), kc("modifiers"), kc("snap", Ua)) || ne;
|
|
Xt.version = Bt.version = ae.version = "3.5.0", f = 1, t() && Pt();
|
|
|
|
function Vc(t, e) {
|
|
return e.set(e.t, e.p, Math.round(1e4 * (e.s + e.c * t)) / 1e4 + e.u, e)
|
|
}
|
|
|
|
function Wc(t, e) {
|
|
return e.set(e.t, e.p, 1 === t ? e.e : Math.round(1e4 * (e.s + e.c * t)) / 1e4 + e.u, e)
|
|
}
|
|
|
|
function Xc(t, e) {
|
|
return e.set(e.t, e.p, t ? Math.round(1e4 * (e.s + e.c * t)) / 1e4 + e.u : e.b, e)
|
|
}
|
|
|
|
function Yc(t, e) {
|
|
var r = e.s + e.c * t;
|
|
e.set(e.t, e.p, ~~(r + (r < 0 ? -.5 : .5)) + e.u, e)
|
|
}
|
|
|
|
function Zc(t, e) {
|
|
return e.set(e.t, e.p, t ? e.e : e.b, e)
|
|
}
|
|
|
|
function $c(t, e) {
|
|
return e.set(e.t, e.p, 1 !== t ? e.b : e.e, e)
|
|
}
|
|
|
|
function _c(t, e, r) {
|
|
return t.style[e] = r
|
|
}
|
|
|
|
function ad(t, e, r) {
|
|
return t.style.setProperty(e, r)
|
|
}
|
|
|
|
function bd(t, e, r) {
|
|
return t._gsap[e] = r
|
|
}
|
|
|
|
function cd(t, e, r) {
|
|
return t._gsap.scaleX = t._gsap.scaleY = r
|
|
}
|
|
|
|
function dd(t, e, r, i, n) {
|
|
var a = t._gsap;
|
|
a.scaleX = a.scaleY = r, a.renderTransform(n, a)
|
|
}
|
|
|
|
function ed(t, e, r, i, n) {
|
|
var a = t._gsap;
|
|
a[e] = r, a.renderTransform(n, a)
|
|
}
|
|
|
|
function id(t, e) {
|
|
var r = oe.createElementNS ? oe.createElementNS((e || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), t) : oe.createElement(t);
|
|
return r.style ? r : oe.createElement(t)
|
|
}
|
|
|
|
function jd(t, e, r) {
|
|
var i = getComputedStyle(t);
|
|
return i[e] || i.getPropertyValue(e.replace(Ie, "-$1").toLowerCase()) || i.getPropertyValue(e) || !r && jd(t, Ue(e) || e, 1) || ""
|
|
}
|
|
|
|
function md() {
|
|
(function _windowExists() {
|
|
return "undefined" != typeof window
|
|
})() && window.document && (se = window, oe = se.document, ue = oe.documentElement, le = id("div") || {
|
|
style: {}
|
|
}, fe = id("div"), Ye = Ue(Ye), Ne = Ye + "Origin", le.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0", pe = !!Ue("perspective"), he = 1)
|
|
}
|
|
|
|
function nd(t) {
|
|
var e, r = id("svg", this.ownerSVGElement && this.ownerSVGElement.getAttribute("xmlns") || "http://www.w3.org/2000/svg"),
|
|
i = this.parentNode,
|
|
n = this.nextSibling,
|
|
a = this.style.cssText;
|
|
if (ue.appendChild(r), r.appendChild(this), this.style.display = "block", t) try {
|
|
e = this.getBBox(), this._gsapBBox = this.getBBox, this.getBBox = nd
|
|
} catch (t) {} else this._gsapBBox && (e = this._gsapBBox());
|
|
return i && (n ? i.insertBefore(this, n) : i.appendChild(this)), ue.removeChild(r), this.style.cssText = a, e
|
|
}
|
|
|
|
function od(t, e) {
|
|
for (var r = e.length; r--;)
|
|
if (t.hasAttribute(e[r])) return t.getAttribute(e[r])
|
|
}
|
|
|
|
function pd(e) {
|
|
var r;
|
|
try {
|
|
r = e.getBBox()
|
|
} catch (t) {
|
|
r = nd.call(e, !0)
|
|
}
|
|
return r && (r.width || r.height) || e.getBBox === nd || (r = nd.call(e, !0)), !r || r.width || r.x || r.y ? r : {
|
|
x: +od(e, ["x", "cx", "x1"]) || 0,
|
|
y: +od(e, ["y", "cy", "y1"]) || 0,
|
|
width: 0,
|
|
height: 0
|
|
}
|
|
}
|
|
|
|
function qd(t) {
|
|
return !(!t.getCTM || t.parentNode && !t.ownerSVGElement || !pd(t))
|
|
}
|
|
|
|
function rd(t, e) {
|
|
if (e) {
|
|
var r = t.style;
|
|
e in ze && e !== Ne && (e = Ye), r.removeProperty ? ("ms" !== e.substr(0, 2) && "webkit" !== e.substr(0, 6) || (e = "-" + e), r.removeProperty(e.replace(Ie, "-$1").toLowerCase())) : r.removeAttribute(e)
|
|
}
|
|
}
|
|
|
|
function sd(t, e, r, i, n, a) {
|
|
var s = new ie(t._pt, e, r, 0, 1, a ? $c : Zc);
|
|
return (t._pt = s).b = i, s.e = n, t._props.push(r), s
|
|
}
|
|
|
|
function ud(t, e, r, i) {
|
|
var n, a, s, o, u = parseFloat(r) || 0,
|
|
h = (r + "").trim().substr((u + "").length) || "px",
|
|
l = le.style,
|
|
f = Le.test(e),
|
|
d = "svg" === t.tagName.toLowerCase(),
|
|
p = (d ? "client" : "offset") + (f ? "Width" : "Height"),
|
|
_ = "px" === i,
|
|
c = "%" === i;
|
|
return i === h || !u || Ve[i] || Ve[h] ? u : ("px" === h || _ || (u = ud(t, e, r, "px")), o = t.getCTM && qd(t), c && (ze[e] || ~e.indexOf("adius")) ? aa(u / (o ? t.getBBox()[f ? "width" : "height"] : t[p]) * 100) : (l[f ? "width" : "height"] = 100 + (_ ? h : i), a = ~e.indexOf("adius") || "em" === i && t.appendChild && !d ? t : t.parentNode, o && (a = (t.ownerSVGElement || {}).parentNode), a && a !== oe && a.appendChild || (a = oe.body), (s = a._gsap) && c && s.width && f && s.time === At.time ? aa(u / s.width * 100) : (!c && "%" !== h || (l.position = jd(t, "position")), a === t && (l.position = "static"), a.appendChild(le), n = le[p], a.removeChild(le), l.position = "absolute", f && c && ((s = Z(a)).time = At.time, s.width = a[p]), aa(_ ? n * u / 100 : n && u ? 100 / n * u : 0))))
|
|
}
|
|
|
|
function vd(t, e, r, i) {
|
|
var n;
|
|
return he || md(), e in qe && "transform" !== e && ~(e = qe[e]).indexOf(",") && (e = e.split(",")[0]), ze[e] && "transform" !== e ? (n = Qe(t, i), n = "transformOrigin" !== e ? n[e] : We(jd(t, Ne)) + " " + n.zOrigin + "px") : (n = t.style[e]) && "auto" !== n && !i && !~(n + "").indexOf("calc(") || (n = Ge[e] && Ge[e](t, e, r) || jd(t, e) || $(t, e) || ("opacity" === e ? 1 : 0)), r && !~(n + "").indexOf(" ") ? ud(t, e, n, r) + r : n
|
|
}
|
|
|
|
function wd(t, e, r, i) {
|
|
if (!r || "none" === r) {
|
|
var n = Ue(e, t, 1),
|
|
a = n && jd(t, n, 1);
|
|
a && a !== r ? (e = n, r = a) : "borderColor" === e && (r = jd(t, "borderTopColor"))
|
|
}
|
|
var s, o, u, h, l, f, d, p, _, c, m, g, v = new ie(this._pt, t.style, e, 0, 1, Ht),
|
|
y = 0,
|
|
T = 0;
|
|
if (v.b = r, v.e = i, r += "", "auto" === (i += "") && (t.style[e] = i, i = jd(t, e) || i, t.style[e] = r), qb(s = [r, i]), i = s[1], u = (r = s[0]).match(it) || [], (i.match(it) || []).length) {
|
|
for (; o = it.exec(i);) d = o[0], _ = i.substring(y, o.index), l ? l = (l + 1) % 5 : "rgba(" !== _.substr(-5) && "hsla(" !== _.substr(-5) || (l = 1), d !== (f = u[T++] || "") && (h = parseFloat(f) || 0, m = f.substr((h + "").length), (g = "=" === d.charAt(1) ? +(d.charAt(0) + "1") : 0) && (d = d.substr(2)), p = parseFloat(d), c = d.substr((p + "").length), y = it.lastIndex - c.length, c || (c = c || j.units[e] || m, y === i.length && (i += c, v.e += c)), m !== c && (h = ud(t, e, f, c) || 0), v._pt = {
|
|
_next: v._pt,
|
|
p: _ || 1 === T ? _ : ",",
|
|
s: h,
|
|
c: g ? g * p : p - h,
|
|
m: l && l < 4 ? Math.round : 0
|
|
});
|
|
v.c = y < i.length ? i.substring(y, i.length) : ""
|
|
} else v.r = "display" === e && "none" === i ? $c : Zc;
|
|
return at.test(i) && (v.e = 0), this._pt = v
|
|
}
|
|
|
|
function yd(t) {
|
|
var e = t.split(" "),
|
|
r = e[0],
|
|
i = e[1] || "50%";
|
|
return "top" !== r && "bottom" !== r && "left" !== i && "right" !== i || (t = r, r = i, i = t), e[0] = Xe[r] || r, e[1] = Xe[i] || i, e.join(" ")
|
|
}
|
|
|
|
function zd(t, e) {
|
|
if (e.tween && e.tween._time === e.tween._dur) {
|
|
var r, i, n, a = e.t,
|
|
s = a.style,
|
|
o = e.u,
|
|
u = a._gsap;
|
|
if ("all" === o || !0 === o) s.cssText = "", i = 1;
|
|
else
|
|
for (n = (o = o.split(",")).length; - 1 < --n;) r = o[n], ze[r] && (i = 1, r = "transformOrigin" === r ? Ne : Ye), rd(a, r);
|
|
i && (rd(a, Ye), u && (u.svg && a.removeAttribute("transform"), Qe(a, 1), u.uncache = 1))
|
|
}
|
|
}
|
|
|
|
function Dd(t) {
|
|
return "matrix(1, 0, 0, 1, 0, 0)" === t || "none" === t || !t
|
|
}
|
|
|
|
function Ed(t) {
|
|
var e = jd(t, Ye);
|
|
return Dd(e) ? Ze : e.substr(7).match(rt).map(aa)
|
|
}
|
|
|
|
function Fd(t, e) {
|
|
var r, i, n, a, s = t._gsap || Z(t),
|
|
o = t.style,
|
|
u = Ed(t);
|
|
return s.svg && t.getAttribute("transform") ? "1,0,0,1,0,0" === (u = [(n = t.transform.baseVal.consolidate().matrix).a, n.b, n.c, n.d, n.e, n.f]).join(",") ? Ze : u : (u !== Ze || t.offsetParent || t === ue || s.svg || (n = o.display, o.display = "block", (r = t.parentNode) && t.offsetParent || (a = 1, i = t.nextSibling, ue.appendChild(t)), u = Ed(t), n ? o.display = n : rd(t, "display"), a && (i ? r.insertBefore(t, i) : r ? r.appendChild(t) : ue.removeChild(t))), e && 6 < u.length ? [u[0], u[1], u[4], u[5], u[12], u[13]] : u)
|
|
}
|
|
|
|
function Gd(t, e, r, i, n, a) {
|
|
var s, o, u, h = t._gsap,
|
|
l = n || Fd(t, !0),
|
|
f = h.xOrigin || 0,
|
|
d = h.yOrigin || 0,
|
|
p = h.xOffset || 0,
|
|
_ = h.yOffset || 0,
|
|
c = l[0],
|
|
m = l[1],
|
|
g = l[2],
|
|
v = l[3],
|
|
y = l[4],
|
|
T = l[5],
|
|
b = e.split(" "),
|
|
w = parseFloat(b[0]) || 0,
|
|
x = parseFloat(b[1]) || 0;
|
|
r ? l !== Ze && (o = c * v - m * g) && (u = w * (-m / o) + x * (c / o) - (c * T - m * y) / o, w = w * (v / o) + x * (-g / o) + (g * T - v * y) / o, x = u) : (w = (s = pd(t)).x + (~b[0].indexOf("%") ? w / 100 * s.width : w), x = s.y + (~(b[1] || b[0]).indexOf("%") ? x / 100 * s.height : x)), i || !1 !== i && h.smooth ? (y = w - f, T = x - d, h.xOffset = p + (y * c + T * g) - y, h.yOffset = _ + (y * m + T * v) - T) : h.xOffset = h.yOffset = 0, h.xOrigin = w, h.yOrigin = x, h.smooth = !!i, h.origin = e, h.originIsAbsolute = !!r, t.style[Ne] = "0px 0px", a && (sd(a, h, "xOrigin", f, w), sd(a, h, "yOrigin", d, x), sd(a, h, "xOffset", p, h.xOffset), sd(a, h, "yOffset", _, h.yOffset)), t.setAttribute("data-svg-origin", w + " " + x)
|
|
}
|
|
|
|
function Jd(t, e, r) {
|
|
var i = La(e);
|
|
return aa(parseFloat(e) + parseFloat(ud(t, "x", r + "px", i))) + i
|
|
}
|
|
|
|
function Qd(t, e, r, i, a, s) {
|
|
var o, u, h = 360,
|
|
l = n(a),
|
|
f = parseFloat(a) * (l && ~a.indexOf("rad") ? Fe : 1),
|
|
d = s ? f * s : f - i,
|
|
p = i + d + "deg";
|
|
return l && ("short" === (o = a.split("_")[1]) && (d %= h) !== d % 180 && (d += d < 0 ? h : -h), "cw" === o && d < 0 ? d = (d + 36e9) % h - ~~(d / h) * h : "ccw" === o && 0 < d && (d = (d - 36e9) % h - ~~(d / h) * h)), t._pt = u = new ie(t._pt, e, r, i, d, Wc), u.e = p, u.u = "deg", t._props.push(r), u
|
|
}
|
|
|
|
function Rd(t, e, r) {
|
|
var i, n, a, s, o, u, h, l = fe.style,
|
|
f = r._gsap;
|
|
for (n in l.cssText = getComputedStyle(r).cssText + ";position:absolute;display:block;", l[Ye] = e, oe.body.appendChild(fe), i = Qe(fe, 1), ze)(a = f[n]) !== (s = i[n]) && "perspective,force3D,transformOrigin,svgOrigin".indexOf(n) < 0 && (o = La(a) !== (h = La(s)) ? ud(r, n, a, h) : parseFloat(a), u = parseFloat(s), t._pt = new ie(t._pt, f, n, o, u - o, Vc), t._pt.u = h || 0, t._props.push(n));
|
|
oe.body.removeChild(fe)
|
|
}
|
|
var se, oe, ue, he, le, fe, de, pe, _e = Dt.Power0,
|
|
ce = Dt.Power1,
|
|
me = Dt.Power2,
|
|
ge = Dt.Power3,
|
|
ve = Dt.Power4,
|
|
ye = Dt.Linear,
|
|
Te = Dt.Quad,
|
|
be = Dt.Cubic,
|
|
we = Dt.Quart,
|
|
xe = Dt.Quint,
|
|
ke = Dt.Strong,
|
|
Oe = Dt.Elastic,
|
|
Me = Dt.Back,
|
|
Ce = Dt.SteppedEase,
|
|
Ae = Dt.Bounce,
|
|
Pe = Dt.Sine,
|
|
De = Dt.Expo,
|
|
Se = Dt.Circ,
|
|
ze = {},
|
|
Fe = 180 / Math.PI,
|
|
Re = Math.PI / 180,
|
|
Ee = Math.atan2,
|
|
Ie = /([A-Z])/g,
|
|
Le = /(?:left|right|width|margin|padding|x)/i,
|
|
Be = /[\s,\(]\S/,
|
|
qe = {
|
|
autoAlpha: "opacity,visibility",
|
|
scale: "scaleX,scaleY",
|
|
alpha: "opacity"
|
|
},
|
|
Ye = "transform",
|
|
Ne = Ye + "Origin",
|
|
je = "O,Moz,ms,Ms,Webkit".split(","),
|
|
Ue = function _checkPropPrefix(t, e, r) {
|
|
var i = (e || le).style,
|
|
n = 5;
|
|
if (t in i && !r) return t;
|
|
for (t = t.charAt(0).toUpperCase() + t.substr(1); n-- && !(je[n] + t in i););
|
|
return n < 0 ? null : (3 === n ? "ms" : 0 <= n ? je[n] : "") + t
|
|
},
|
|
Ve = {
|
|
deg: 1,
|
|
rad: 1,
|
|
turn: 1
|
|
},
|
|
Xe = {
|
|
top: "0%",
|
|
bottom: "100%",
|
|
left: "0%",
|
|
right: "100%",
|
|
center: "50%"
|
|
},
|
|
Ge = {
|
|
clearProps: function clearProps(t, e, r, i, n) {
|
|
if ("isFromStart" !== n.data) {
|
|
var a = t._pt = new ie(t._pt, e, r, 0, 0, zd);
|
|
return a.u = i, a.pr = -10, a.tween = n, t._props.push(r), 1
|
|
}
|
|
}
|
|
},
|
|
Ze = [1, 0, 0, 1, 0, 0],
|
|
Je = {},
|
|
Qe = function _parseTransform(t, e) {
|
|
var r = t._gsap || new It(t);
|
|
if ("x" in r && !e && !r.uncache) return r;
|
|
var i, n, a, s, o, u, h, l, f, d, p, _, c, m, g, v, y, T, b, w, x, k, O, M, C, A, P, D, S, z, F, R, E = t.style,
|
|
I = r.scaleX < 0,
|
|
L = "deg",
|
|
B = jd(t, Ne) || "0";
|
|
return i = n = a = u = h = l = f = d = p = 0, s = o = 1, r.svg = !(!t.getCTM || !qd(t)), m = Fd(t, r.svg), r.svg && (M = !r.uncache && t.getAttribute("data-svg-origin"), Gd(t, M || B, !!M || r.originIsAbsolute, !1 !== r.smooth, m)), _ = r.xOrigin || 0, c = r.yOrigin || 0, m !== Ze && (T = m[0], b = m[1], w = m[2], x = m[3], i = k = m[4], n = O = m[5], 6 === m.length ? (s = Math.sqrt(T * T + b * b), o = Math.sqrt(x * x + w * w), u = T || b ? Ee(b, T) * Fe : 0, (f = w || x ? Ee(w, x) * Fe + u : 0) && (o *= Math.cos(f * Re)), r.svg && (i -= _ - (_ * T + c * w), n -= c - (_ * b + c * x))) : (R = m[6], z = m[7], P = m[8], D = m[9], S = m[10], F = m[11], i = m[12], n = m[13], a = m[14], h = (g = Ee(R, S)) * Fe, g && (M = k * (v = Math.cos(-g)) + P * (y = Math.sin(-g)), C = O * v + D * y, A = R * v + S * y, P = k * -y + P * v, D = O * -y + D * v, S = R * -y + S * v, F = z * -y + F * v, k = M, O = C, R = A), l = (g = Ee(-w, S)) * Fe, g && (v = Math.cos(-g), F = x * (y = Math.sin(-g)) + F * v, T = M = T * v - P * y, b = C = b * v - D * y, w = A = w * v - S * y), u = (g = Ee(b, T)) * Fe, g && (M = T * (v = Math.cos(g)) + b * (y = Math.sin(g)), C = k * v + O * y, b = b * v - T * y, O = O * v - k * y, T = M, k = C), h && 359.9 < Math.abs(h) + Math.abs(u) && (h = u = 0, l = 180 - l), s = aa(Math.sqrt(T * T + b * b + w * w)), o = aa(Math.sqrt(O * O + R * R)), g = Ee(k, O), f = 2e-4 < Math.abs(g) ? g * Fe : 0, p = F ? 1 / (F < 0 ? -F : F) : 0), r.svg && (M = t.getAttribute("transform"), r.forceCSS = t.setAttribute("transform", "") || !Dd(jd(t, Ye)), M && t.setAttribute("transform", M))), 90 < Math.abs(f) && Math.abs(f) < 270 && (I ? (s *= -1, f += u <= 0 ? 180 : -180, u += u <= 0 ? 180 : -180) : (o *= -1, f += f <= 0 ? 180 : -180)), r.x = ((r.xPercent = i && Math.round(t.offsetWidth / 2) === Math.round(-i) ? -50 : 0) ? 0 : i) + "px", r.y = ((r.yPercent = n && Math.round(t.offsetHeight / 2) === Math.round(-n) ? -50 : 0) ? 0 : n) + "px", r.z = a + "px", r.scaleX = aa(s), r.scaleY = aa(o), r.rotation = aa(u) + L, r.rotationX = aa(h) + L, r.rotationY = aa(l) + L, r.skewX = f + L, r.skewY = d + L, r.transformPerspective = p + "px", (r.zOrigin = parseFloat(B.split(" ")[2]) || 0) && (E[Ne] = We(B)), r.xOffset = r.yOffset = 0, r.force3D = j.force3D, r.renderTransform = r.svg ? rr : pe ? er : $e, r.uncache = 0, r
|
|
},
|
|
We = function _firstTwoOnly(t) {
|
|
return (t = t.split(" "))[0] + " " + t[1]
|
|
},
|
|
$e = function _renderNon3DTransforms(t, e) {
|
|
e.z = "0px", e.rotationY = e.rotationX = "0deg", e.force3D = 0, er(t, e)
|
|
},
|
|
He = "0deg",
|
|
Ke = "0px",
|
|
tr = ") ",
|
|
er = function _renderCSSTransforms(t, e) {
|
|
var r = e || this,
|
|
i = r.xPercent,
|
|
n = r.yPercent,
|
|
a = r.x,
|
|
s = r.y,
|
|
o = r.z,
|
|
u = r.rotation,
|
|
h = r.rotationY,
|
|
l = r.rotationX,
|
|
f = r.skewX,
|
|
d = r.skewY,
|
|
p = r.scaleX,
|
|
_ = r.scaleY,
|
|
c = r.transformPerspective,
|
|
m = r.force3D,
|
|
g = r.target,
|
|
v = r.zOrigin,
|
|
y = "",
|
|
T = "auto" === m && t && 1 !== t || !0 === m;
|
|
if (v && (l !== He || h !== He)) {
|
|
var b, w = parseFloat(h) * Re,
|
|
x = Math.sin(w),
|
|
k = Math.cos(w);
|
|
w = parseFloat(l) * Re, b = Math.cos(w), a = Jd(g, a, x * b * -v), s = Jd(g, s, -Math.sin(w) * -v), o = Jd(g, o, k * b * -v + v)
|
|
}
|
|
c !== Ke && (y += "perspective(" + c + tr), (i || n) && (y += "translate(" + i + "%, " + n + "%) "), !T && a === Ke && s === Ke && o === Ke || (y += o !== Ke || T ? "translate3d(" + a + ", " + s + ", " + o + ") " : "translate(" + a + ", " + s + tr), u !== He && (y += "rotate(" + u + tr), h !== He && (y += "rotateY(" + h + tr), l !== He && (y += "rotateX(" + l + tr), f === He && d === He || (y += "skew(" + f + ", " + d + tr), 1 === p && 1 === _ || (y += "scale(" + p + ", " + _ + tr), g.style[Ye] = y || "translate(0, 0)"
|
|
},
|
|
rr = function _renderSVGTransforms(t, e) {
|
|
var r, i, n, a, s, o = e || this,
|
|
u = o.xPercent,
|
|
h = o.yPercent,
|
|
l = o.x,
|
|
f = o.y,
|
|
d = o.rotation,
|
|
p = o.skewX,
|
|
_ = o.skewY,
|
|
c = o.scaleX,
|
|
m = o.scaleY,
|
|
g = o.target,
|
|
v = o.xOrigin,
|
|
y = o.yOrigin,
|
|
T = o.xOffset,
|
|
b = o.yOffset,
|
|
w = o.forceCSS,
|
|
x = parseFloat(l),
|
|
k = parseFloat(f);
|
|
d = parseFloat(d), p = parseFloat(p), (_ = parseFloat(_)) && (p += _ = parseFloat(_), d += _), d || p ? (d *= Re, p *= Re, r = Math.cos(d) * c, i = Math.sin(d) * c, n = Math.sin(d - p) * -m, a = Math.cos(d - p) * m, p && (_ *= Re, s = Math.tan(p - _), n *= s = Math.sqrt(1 + s * s), a *= s, _ && (s = Math.tan(_), r *= s = Math.sqrt(1 + s * s), i *= s)), r = aa(r), i = aa(i), n = aa(n), a = aa(a)) : (r = c, a = m, i = n = 0), (x && !~(l + "").indexOf("px") || k && !~(f + "").indexOf("px")) && (x = ud(g, "x", l, "px"), k = ud(g, "y", f, "px")), (v || y || T || b) && (x = aa(x + v - (v * r + y * n) + T), k = aa(k + y - (v * i + y * a) + b)), (u || h) && (s = g.getBBox(), x = aa(x + u / 100 * s.width), k = aa(k + h / 100 * s.height)), s = "matrix(" + r + "," + i + "," + n + "," + a + "," + x + "," + k + ")", g.setAttribute("transform", s), w && (g.style[Ye] = s)
|
|
};
|
|
_("padding,margin,Width,Radius", function(e, r) {
|
|
var t = "Right",
|
|
i = "Bottom",
|
|
n = "Left",
|
|
o = (r < 3 ? ["Top", t, i, n] : ["Top" + n, "Top" + t, i + t, i + n]).map(function(t) {
|
|
return r < 2 ? e + t : "border" + t + e
|
|
});
|
|
Ge[1 < r ? "border" + e : e] = function(e, t, r, i, n) {
|
|
var a, s;
|
|
if (arguments.length < 4) return a = o.map(function(t) {
|
|
return vd(e, t, r)
|
|
}), 5 === (s = a.join(" ")).split(a[0]).length ? a[0] : s;
|
|
a = (i + "").split(" "), s = {}, o.forEach(function(t, e) {
|
|
return s[t] = a[e] = a[e] || a[(e - 1) / 2 | 0]
|
|
}), e.init(t, s, n)
|
|
}
|
|
});
|
|
var ir, nr, ar, sr = {
|
|
name: "css",
|
|
register: md,
|
|
targetTest: function targetTest(t) {
|
|
return t.style && t.nodeType
|
|
},
|
|
init: function init(t, e, r, i, n) {
|
|
var a, s, o, u, h, l, f, d, p, _, c, m, g, v, y, T = this._props,
|
|
b = t.style;
|
|
for (f in he || md(), e)
|
|
if ("autoRound" !== f && (s = e[f], !ft[f] || !Nb(f, e, r, i, t, n)))
|
|
if (h = typeof s, l = Ge[f], "function" === h && (h = typeof(s = s.call(r, i, t, n))), "string" === h && ~s.indexOf("random(") && (s = ab(s)), l) l(this, t, f, s, r) && (y = 1);
|
|
else if ("--" === f.substr(0, 2)) this.add(b, "setProperty", getComputedStyle(t).getPropertyValue(f) + "", s + "", i, n, 0, 0, f);
|
|
else if ("undefined" !== h) {
|
|
if (a = vd(t, f), u = parseFloat(a), (_ = "string" === h && "=" === s.charAt(1) ? +(s.charAt(0) + "1") : 0) && (s = s.substr(2)), o = parseFloat(s), f in qe && ("autoAlpha" === f && (1 === u && "hidden" === vd(t, "visibility") && o && (u = 0), sd(this, b, "visibility", u ? "inherit" : "hidden", o ? "inherit" : "hidden", !o)), "scale" !== f && "transform" !== f && ~(f = qe[f]).indexOf(",") && (f = f.split(",")[0])), c = f in ze)
|
|
if (m || ((g = t._gsap).renderTransform || Qe(t), v = !1 !== e.smoothOrigin && g.smooth, (m = this._pt = new ie(this._pt, b, Ye, 0, 1, g.renderTransform, g, 0, -1)).dep = 1), "scale" === f) this._pt = new ie(this._pt, g, "scaleY", g.scaleY, _ ? _ * o : o - g.scaleY), T.push("scaleY", f), f += "X";
|
|
else {
|
|
if ("transformOrigin" === f) {
|
|
s = yd(s), g.svg ? Gd(t, s, 0, v, 0, this) : ((p = parseFloat(s.split(" ")[2]) || 0) !== g.zOrigin && sd(this, g, "zOrigin", g.zOrigin, p), sd(this, b, f, We(a), We(s)));
|
|
continue
|
|
}
|
|
if ("svgOrigin" === f) {
|
|
Gd(t, s, 1, v, 0, this);
|
|
continue
|
|
}
|
|
if (f in Je) {
|
|
Qd(this, g, f, u, s, _);
|
|
continue
|
|
}
|
|
if ("smoothOrigin" === f) {
|
|
sd(this, g, "smooth", g.smooth, s);
|
|
continue
|
|
}
|
|
if ("force3D" === f) {
|
|
g[f] = s;
|
|
continue
|
|
}
|
|
if ("transform" === f) {
|
|
Rd(this, s, t);
|
|
continue
|
|
}
|
|
}
|
|
else f in b || (f = Ue(f) || f);
|
|
if (c || (o || 0 === o) && (u || 0 === u) && !Be.test(s) && f in b)(d = (a + "").substr((u + "").length)) !== (p = (s + "").substr(((o = o || 0) + "").length) || (f in j.units ? j.units[f] : d)) && (u = ud(t, f, a, p)), this._pt = new ie(this._pt, c ? g : b, f, u, _ ? _ * o : o - u, "px" !== p || !1 === e.autoRound || c ? Vc : Yc), this._pt.u = p || 0, d !== p && (this._pt.b = a, this._pt.r = Xc);
|
|
else if (f in b) wd.call(this, t, f, a, s);
|
|
else {
|
|
if (!(f in t)) {
|
|
L(f, s);
|
|
continue
|
|
}
|
|
this.add(t, f, t[f], s, i, n)
|
|
}
|
|
T.push(f)
|
|
}
|
|
y && re(this)
|
|
},
|
|
get: vd,
|
|
aliases: qe,
|
|
getSetter: function getSetter(t, e, r) {
|
|
var i = qe[e];
|
|
return i && i.indexOf(",") < 0 && (e = i), e in ze && e !== Ne && (t._gsap.x || vd(t, "x")) ? r && de === r ? "scale" === e ? cd : bd : (de = r || {}) && ("scale" === e ? dd : ed) : t.style && !q(t.style[e]) ? _c : ~e.indexOf("-") ? ad : Qt(t, e)
|
|
},
|
|
core: {
|
|
_removeProperty: rd,
|
|
_getMatrix: Fd
|
|
}
|
|
};
|
|
ae.utils.checkPrefix = Ue, ar = _((ir = "x,y,z,scale,scaleX,scaleY,xPercent,yPercent") + "," + (nr = "rotation,rotationX,rotationY,skewX,skewY") + ",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective", function(t) {
|
|
ze[t] = 1
|
|
}), _(nr, function(t) {
|
|
j.units[t] = "deg", Je[t] = 1
|
|
}), qe[ar[13]] = ir + "," + nr, _("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY", function(t) {
|
|
var e = t.split(":");
|
|
qe[e[1]] = ar[e[0]]
|
|
}), _("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective", function(t) {
|
|
j.units[t] = "px"
|
|
}), ae.registerPlugin(sr);
|
|
var or = ae.registerPlugin(sr) || ae,
|
|
ur = or.core.Tween;
|
|
e.Back = Me, e.Bounce = Ae, e.CSSPlugin = sr, e.Circ = Se, e.Cubic = be, e.Elastic = Oe, e.Expo = De, e.Linear = ye, e.Power0 = _e, e.Power1 = ce, e.Power2 = me, e.Power3 = ge, e.Power4 = ve, e.Quad = Te, e.Quart = we, e.Quint = xe, e.Sine = Pe, e.SteppedEase = Ce, e.Strong = ke, e.TimelineLite = Bt, e.TimelineMax = Bt, e.TweenLite = Xt, e.TweenMax = ur, e.default = or, e.gsap = or;
|
|
if (typeof(window) === "undefined" || window !== e) {
|
|
Object.defineProperty(e, "__esModule", {
|
|
value: !0
|
|
})
|
|
} else {
|
|
delete e.default
|
|
}
|
|
});
|
|
|
|
! function(a, b) {
|
|
"object" == typeof exports && "undefined" != typeof module ? b(exports) : "function" == typeof define && define.amd ? define(["exports"], b) : b((a = a || self).window = a.window || {})
|
|
}(this, function(ax) {
|
|
"use strict";
|
|
var t, bg, v, X, Q, ab, bu, O, aB, bA, F, C, bC, $, e, E, am, aO, aL, aA, q, l, i, a, T, b, g, G, f, bF, aJ, aK, Z, aC, aI, m, ao, aQ, p, bx, bw, ac, bv, aW, bo, y, bk, bj, bi, R, bb, bc, _, bh, aj, S, ai, s, a_, A, ap, Y, a$, aX, M, U, af, ad, ah, ag, k, z, au, bM, r, I, bB, av, ay, az, c, aP, al, bI, h, N, B, by, aD, aM, aa, br, aE, an, be, aG, bV, ak, aH, bY, d, bz, bD, cb, bt;
|
|
|
|
function cf(d, c) {
|
|
for (var b = 0, a; b < c.length; b++) a = c[b], a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(d, a.key, a)
|
|
}
|
|
|
|
function bZ() {
|
|
return t || "undefined" != typeof window && (t = window.gsap) && t.registerPlugin && t
|
|
}
|
|
|
|
function P(a, b) {
|
|
return ~E.indexOf(a) && E[E.indexOf(a) + 1][b]
|
|
}
|
|
|
|
function bf(a) {
|
|
return !!~bA.indexOf(a)
|
|
}
|
|
|
|
function w(a, b, c, d, e) {
|
|
return a.addEventListener(b, c, {
|
|
passive: !d,
|
|
capture: !!e
|
|
})
|
|
}
|
|
|
|
function u(a, b, c, d) {
|
|
return a.removeEventListener(b, c, !!d)
|
|
}
|
|
|
|
function bW() {
|
|
return F && F.isPressed || e.cache++
|
|
}
|
|
|
|
function aN(b, c) {
|
|
function a(d) {
|
|
if (d || 0 === d) {
|
|
bC && (v.history.scrollRestoration = "manual");
|
|
var f = F && F.isPressed;
|
|
d = a.v = Math.round(d) || (F && F.iOS ? 1 : 0), b(d), a.cacheID = e.cache, f && aO("ss", d)
|
|
} else(c || e.cache !== a.cacheID || aO("ref")) && (a.cacheID = e.cache, a.v = b());
|
|
return a.v + a.offset
|
|
}
|
|
return a.offset = 0, b && a
|
|
}
|
|
|
|
function x(a) {
|
|
return t.utils.toArray(a)[0] || ("string" == typeof a && !1 !== t.config().nullTargetWarn ? console.warn("Element not found:", a) : null)
|
|
}
|
|
|
|
function V(a, d) {
|
|
var c = d.s,
|
|
f = d.sc,
|
|
b = e.indexOf(a),
|
|
g = f === l.sc ? 1 : 2;
|
|
return ~b || (b = e.push(a) - 1), e[b + g] || (e[b + g] = aN(P(a, c), !0) || (bf(a) ? f : aN(function(b) {
|
|
return arguments.length ? a[c] = b : a[c]
|
|
})))
|
|
}
|
|
|
|
function bp(g, i, e) {
|
|
function f(f, i) {
|
|
var g = am();
|
|
i || h < g - a ? (d = b, b = f, c = a, a = g) : e ? b += f : b = d + (f - d) / (g - c) * (a - c)
|
|
}
|
|
var b = g,
|
|
d = g,
|
|
a = am(),
|
|
c = a,
|
|
h = i || 50,
|
|
j = Math.max(500, 3 * h);
|
|
return {
|
|
update: f,
|
|
reset: function() {
|
|
d = b = e ? 0 : b, c = a = 0
|
|
},
|
|
getVelocity: function(g) {
|
|
var k = c,
|
|
h = d,
|
|
i = am();
|
|
return !g && 0 !== g || g === b || f(g), a === c || j < i - c ? 0 : (b + (e ? h : -h)) / ((e ? i : a) - k) * 1e3
|
|
}
|
|
}
|
|
}
|
|
|
|
function aF(a, b) {
|
|
return b && !a._gsapAllow && a.preventDefault(), a.changedTouches ? a.changedTouches[0] : a
|
|
}
|
|
|
|
function bR(a) {
|
|
var b = Math.max.apply(Math, a),
|
|
c = Math.min.apply(Math, a);
|
|
return Math.abs(b) >= Math.abs(c) ? b : c
|
|
}
|
|
|
|
function bP() {
|
|
(aB = t.core.globals().ScrollTrigger) && aB.core && function() {
|
|
var a = aB.core,
|
|
d = a.bridge || {},
|
|
b = a._scrollers,
|
|
c = a._proxies;
|
|
b.push.apply(b, e), c.push.apply(c, E), e = b, E = c, aO = function(a, b) {
|
|
return d[a](b)
|
|
}
|
|
}()
|
|
}
|
|
|
|
function bO(a) {
|
|
return (t = a || bZ()) && "undefined" != typeof document && document.body && (v = window, Q = (X = document).documentElement, ab = X.body, bA = [v, X, Q, ab], t.utils.clamp, O = "onpointerenter" in ab ? "pointer" : "mouse", bu = i.isTouch = v.matchMedia && v.matchMedia("(hover: none), (pointer: coarse)").matches ? 1 : "ontouchstart" in v || 0 < navigator.maxTouchPoints || 0 < navigator.msMaxTouchPoints ? 2 : 0, C = i.eventTypes = ("ontouchstart" in Q ? "touchstart,touchmove,touchcancel,touchend" : "onpointerdown" in Q ? "pointerdown,pointermove,pointercancel,pointerup" : "mousedown,mousemove,mouseup,mouseup").split(","), setTimeout(function() {
|
|
return bC = 0
|
|
}, 500), bP(), bg = 1), bg
|
|
}
|
|
bC = 1, $ = [], e = [], E = [], am = Date.now, aO = function(c, a) {
|
|
return a
|
|
}, aL = "scrollLeft", aA = "scrollTop", q = {
|
|
s: aL,
|
|
p: "left",
|
|
p2: "Left",
|
|
os: "right",
|
|
os2: "Right",
|
|
d: "width",
|
|
d2: "Width",
|
|
a: "x",
|
|
sc: aN(function(a) {
|
|
return arguments.length ? v.scrollTo(a, l.sc()) : v.pageXOffset || X[aL] || Q[aL] || ab[aL] || 0
|
|
})
|
|
}, l = {
|
|
s: aA,
|
|
p: "top",
|
|
p2: "Top",
|
|
os: "bottom",
|
|
os2: "Bottom",
|
|
d: "height",
|
|
d2: "Height",
|
|
a: "y",
|
|
op: q,
|
|
sc: aN(function(a) {
|
|
return arguments.length ? v.scrollTo(q.sc(), a) : v.pageYOffset || X[aA] || Q[aA] || ab[aA] || 0
|
|
})
|
|
}, q.op = l, e.cache = 0, i = (bE.prototype.init = function(b) {
|
|
var s, z, e, c, R, B, f, n, aI, o, P, aP, ai, aj, aq, aA, ar, at, af, av, az, U, ao, ay, ax, aw, al, ah, S, ag, j, aa, _, au, W, Y, Z, D, i, ac, aE, ae, r, m, A, H, G, E, p, a, I, J, T, N, ap, an, aM, y, d, g, h, ad, K;
|
|
bg || bO(t) || console.warn("Please gsap.registerPlugin(Observer)"), aB || bP(), s = b.tolerance, z = b.dragMinimum, e = b.type, c = b.target, R = b.lineHeight, B = b.debounce, f = b.preventDefault, n = b.onStop, aI = b.onStopDelay, o = b.ignore, P = b.wheelSpeed, aP = b.event, ai = b.onDragStart, aj = b.onDragEnd, aq = b.onDrag, aA = b.onPress, ar = b.onRelease, at = b.onRight, af = b.onLeft, av = b.onUp, az = b.onDown, U = b.onChangeX, ao = b.onChangeY, ay = b.onChange, ax = b.onToggleX, aw = b.onToggleY, al = b.onHover, ah = b.onHoverEnd, S = b.onMove, ag = b.ignoreCheck, j = b.isNormalizer, aa = b.onGestureStart, _ = b.onGestureEnd, au = b.onWheel, W = b.onEnable, Y = b.onDisable, Z = b.onClick, D = b.scrollSpeed, i = b.capture, ac = b.allowClicks, aE = b.lockAxis, ae = b.onLockAxis;
|
|
|
|
function aQ() {
|
|
return ad = am()
|
|
}
|
|
|
|
function k(b, c) {
|
|
return (a.event = b) && o && ~o.indexOf(b.target) || c && aM && "touch" !== b.pointerType || ag && ag(b, c)
|
|
}
|
|
|
|
function M() {
|
|
var b = a.deltaX = bR(g),
|
|
c = a.deltaY = bR(h),
|
|
d = Math.abs(b) >= s,
|
|
e = Math.abs(c) >= s;
|
|
ay && (d || e) && ay(a, b, c, g, h), d && (at && 0 < a.deltaX && at(a), af && a.deltaX < 0 && af(a), U && U(a), ax && a.deltaX < 0 != I < 0 && ax(a), I = a.deltaX, g[0] = g[1] = g[2] = 0), e && (az && 0 < a.deltaY && az(a), av && a.deltaY < 0 && av(a), ao && ao(a), aw && a.deltaY < 0 != J < 0 && aw(a), J = a.deltaY, h[0] = h[1] = h[2] = 0), (H || A) && (S && S(a), ae && E && ae(a), A && (aq(a), A = !1), H = E = !1), G && (au(a), G = !1), r = 0
|
|
}
|
|
|
|
function aO(b, c, d) {
|
|
g[d] += b, h[d] += c, a._vx.update(b), a._vy.update(c), B ? r = r || requestAnimationFrame(M) : M()
|
|
}
|
|
|
|
function aN(b, c) {
|
|
"y" !== p && (g[2] += b, a._vx.update(b, !0)), "x" !== p && (h[2] += c, a._vy.update(c, !0)), aE && !p && (a.axis = p = Math.abs(b) > Math.abs(c) ? "x" : "y", E = !0), B ? r = r || requestAnimationFrame(M) : M()
|
|
}
|
|
|
|
function ak(b) {
|
|
if (!k(b, 1)) {
|
|
var c = (b = aF(b, f)).clientX,
|
|
d = b.clientY,
|
|
g = c - a.x,
|
|
h = d - a.y,
|
|
e = a.isDragging;
|
|
a.x = c, a.y = d, (e || Math.abs(a.startX - c) >= z || Math.abs(a.startY - d) >= z) && (aq && (A = !0), e || (a.isDragging = !0), aN(g, h), e || ai && ai(a))
|
|
}
|
|
}
|
|
|
|
function L(b) {
|
|
if (!k(b, 1)) {
|
|
u(j ? c : d, C[1], ak, !0);
|
|
var g = a.isDragging && (3 < Math.abs(a.x - a.startX) || 3 < Math.abs(a.y - a.startY)),
|
|
e = aF(b);
|
|
g || (a._vx.reset(), a._vy.reset(), f && ac && t.delayedCall(.08, function() {
|
|
if (300 < am() - ad && !b.defaultPrevented)
|
|
if (b.target.click) b.target.click();
|
|
else if (d.createEvent) {
|
|
var a = d.createEvent("MouseEvents");
|
|
a.initMouseEvent("click", !0, !0, v, 1, e.screenX, e.screenY, e.clientX, e.clientY, !1, !1, !1, !1, 0, null), b.target.dispatchEvent(a)
|
|
}
|
|
})), a.isDragging = a.isGesturing = a.isPressed = !1, n && !j && m.restart(!0), aj && g && aj(a), ar && ar(a, g)
|
|
}
|
|
}
|
|
|
|
function aL(b) {
|
|
return b.touches && 1 < b.touches.length && (a.isGesturing = !0) && aa(b, a.isDragging)
|
|
}
|
|
|
|
function aR() {
|
|
return (a.isGesturing = !1) || _(a)
|
|
}
|
|
|
|
function aK(c) {
|
|
if (!k(c)) {
|
|
var a = T(),
|
|
b = N();
|
|
aO((a - ap) * D, (b - an) * D, 1), ap = a, an = b, n && m.restart(!0)
|
|
}
|
|
}
|
|
|
|
function aJ(a) {
|
|
if (!k(a)) {
|
|
a = aF(a, f), au && (G = !0);
|
|
var b = (1 === a.deltaMode ? R : 2 === a.deltaMode ? v.innerHeight : 1) * P;
|
|
aO(a.deltaX * b, a.deltaY * b, 0), n && !j && m.restart(!0)
|
|
}
|
|
}
|
|
|
|
function aH(b) {
|
|
if (!k(b)) {
|
|
var c = b.clientX,
|
|
d = b.clientY,
|
|
e = c - a.x,
|
|
f = d - a.y;
|
|
a.x = c, a.y = d, H = !0, (e || f) && aN(e, f)
|
|
}
|
|
}
|
|
|
|
function aG(b) {
|
|
a.event = b, al(a)
|
|
}
|
|
|
|
function aC(b) {
|
|
a.event = b, ah(a)
|
|
}
|
|
|
|
function aD(b) {
|
|
return k(b) || aF(b, f) && Z(a)
|
|
}
|
|
this.target = c = x(c) || Q, this.vars = b, o = o && t.utils.toArray(o), s = s || 0, z = z || 0, P = P || 1, D = D || 1, e = e || "wheel,touch,pointer", B = !1 !== B, R = R || parseFloat(v.getComputedStyle(ab).lineHeight) || 22, a = this, I = 0, J = 0, T = V(c, q), N = V(c, l), ap = T(), an = N(), aM = ~e.indexOf("touch") && !~e.indexOf("pointer") && "pointerdown" === C[0], y = bf(c), d = c.ownerDocument || X, g = [0, 0, 0], h = [0, 0, 0], ad = 0, K = a.onPress = function(b) {
|
|
k(b, 1) || (a.axis = p = null, m.pause(), a.isPressed = !0, b = aF(b), I = J = 0, a.startX = a.x = b.clientX, a.startY = a.y = b.clientY, a._vx.reset(), a._vy.reset(), w(j ? c : d, C[1], ak, f, !0), a.deltaX = a.deltaY = 0, aA && aA(a))
|
|
}, m = a._dc = t.delayedCall(aI || .25, function() {
|
|
a._vx.reset(), a._vy.reset(), m.pause(), n && n(a)
|
|
}).pause(), a.deltaX = a.deltaY = 0, a._vx = bp(0, 50, !0), a._vy = bp(0, 50, !0), a.scrollX = T, a.scrollY = N, a.isDragging = a.isGesturing = a.isPressed = !1, a.enable = function(b) {
|
|
return a.isEnabled || (w(y ? d : c, "scroll", bW), 0 <= e.indexOf("scroll") && w(y ? d : c, "scroll", aK, f, i), 0 <= e.indexOf("wheel") && w(c, "wheel", aJ, f, i), (0 <= e.indexOf("touch") && bu || 0 <= e.indexOf("pointer")) && (w(c, C[0], K, f, i), w(d, C[2], L), w(d, C[3], L), ac && w(c, "click", aQ, !1, !0), Z && w(c, "click", aD), aa && w(d, "gesturestart", aL), _ && w(d, "gestureend", aR), al && w(c, O + "enter", aG), ah && w(c, O + "leave", aC), S && w(c, O + "move", aH)), a.isEnabled = !0, b && b.type && K(b), W && W(a)), a
|
|
}, a.disable = function() {
|
|
a.isEnabled && ($.filter(function(b) {
|
|
return b !== a && bf(b.target)
|
|
}).length || u(y ? d : c, "scroll", bW), a.isPressed && (a._vx.reset(), a._vy.reset(), u(j ? c : d, C[1], ak, !0)), u(y ? d : c, "scroll", aK, i), u(c, "wheel", aJ, i), u(c, C[0], K, i), u(d, C[2], L), u(d, C[3], L), u(c, "click", aQ, !0), u(c, "click", aD), u(d, "gesturestart", aL), u(d, "gestureend", aR), u(c, O + "enter", aG), u(c, O + "leave", aC), u(c, O + "move", aH), a.isEnabled = a.isPressed = a.isDragging = !1, Y && Y(a))
|
|
}, a.kill = function() {
|
|
a.disable();
|
|
var b = $.indexOf(a);
|
|
0 <= b && $.splice(b, 1), F === a && (F = 0)
|
|
}, $.push(a), j && bf(c) && (F = a), a.enable(aP)
|
|
}, function(a, b, c) {
|
|
return b && cf(a.prototype, b), c && cf(a, c), a
|
|
}(bE, [{
|
|
key: "velocityX",
|
|
get: function() {
|
|
return this._vx.getVelocity()
|
|
}
|
|
}, {
|
|
key: "velocityY",
|
|
get: function() {
|
|
return this._vy.getVelocity()
|
|
}
|
|
}]), bE);
|
|
|
|
function bE(a) {
|
|
this.init(a)
|
|
}
|
|
i.version = "3.10.5", i.create = function(a) {
|
|
return new i(a)
|
|
}, i.register = bO, i.getAll = function() {
|
|
return $.slice()
|
|
}, i.getById = function(a) {
|
|
return $.filter(function(b) {
|
|
return b.vars.id === a
|
|
})[0]
|
|
}, bZ() && t.registerPlugin(i);
|
|
|
|
function bG() {
|
|
return ao = 1
|
|
}
|
|
|
|
function bH() {
|
|
return ao = 0
|
|
}
|
|
|
|
function K(a) {
|
|
return a
|
|
}
|
|
|
|
function aw(a) {
|
|
return Math.round(1e5 * a) / 1e5 || 0
|
|
}
|
|
|
|
function bJ() {
|
|
return "undefined" != typeof window
|
|
}
|
|
|
|
function bK() {
|
|
return a || bJ() && (a = window.gsap) && a.registerPlugin && a
|
|
}
|
|
|
|
function W(a) {
|
|
return !!~bF.indexOf(a)
|
|
}
|
|
|
|
function bL(a) {
|
|
return P(a, "getBoundingClientRect") || (W(a) ? function() {
|
|
return aH.width = b.innerWidth, aH.height = b.innerHeight, aH
|
|
} : function() {
|
|
return I(a)
|
|
})
|
|
}
|
|
|
|
function L(a, e) {
|
|
var c = e.s,
|
|
d = e.d2,
|
|
h = e.d,
|
|
g = e.a;
|
|
return (c = "scroll" + d) && (g = P(a, c)) ? g() - bL(a)()[h] : W(a) ? (G[c] || f[c]) - (b["inner" + d] || G["client" + d] || f["client" + d]) : a[c] - a["offset" + d]
|
|
}
|
|
|
|
function aS(c, b) {
|
|
for (var a = 0; a < ac.length; a += 3) b && !~b.indexOf(ac[a + 1]) || c(ac[a], ac[a + 1], ac[a + 2])
|
|
}
|
|
|
|
function J(a) {
|
|
return "string" == typeof a
|
|
}
|
|
|
|
function D(a) {
|
|
return "function" == typeof a
|
|
}
|
|
|
|
function ar(a) {
|
|
return "number" == typeof a
|
|
}
|
|
|
|
function aT(a) {
|
|
return "object" == typeof a
|
|
}
|
|
|
|
function aV(a) {
|
|
return D(a) && a()
|
|
}
|
|
|
|
function bN(a, b) {
|
|
return function() {
|
|
var c = aV(a),
|
|
d = aV(b);
|
|
return function() {
|
|
aV(c), aV(d)
|
|
}
|
|
}
|
|
}
|
|
|
|
function aq(a, b, c) {
|
|
return a && a.progress(b ? 0 : 1) && c && a.pause()
|
|
}
|
|
|
|
function bs(a, c) {
|
|
if (a.enabled) {
|
|
var b = c(a);
|
|
b && b.totalTime && (a.callbackAnimation = b)
|
|
}
|
|
}
|
|
|
|
function H(a) {
|
|
return b.getComputedStyle(a)
|
|
}
|
|
|
|
function bQ(a, c) {
|
|
for (var b in c) b in a || (a[b] = c[b]);
|
|
return a
|
|
}
|
|
|
|
function bq(a, c) {
|
|
var b = c.d2;
|
|
return a["offset" + b] || a["client" + b] || 0
|
|
}
|
|
|
|
function bS(a) {
|
|
var b, c = [],
|
|
d = a.labels,
|
|
e = a.duration();
|
|
for (b in d) c.push(d[b] / e);
|
|
return c
|
|
}
|
|
|
|
function bm(c) {
|
|
var d = a.utils.snap(c),
|
|
b = Array.isArray(c) && c.slice(0).sort(function(a, b) {
|
|
return a - b
|
|
});
|
|
return b ? function(c, f, e) {
|
|
var a;
|
|
if (void 0 === e && (e = .001), !f) return d(c);
|
|
if (0 < f) {
|
|
for (c -= e, a = 0; a < b.length; a++)
|
|
if (b[a] >= c) return b[a];
|
|
return b[a - 1]
|
|
}
|
|
for (a = b.length, c += e; a--;)
|
|
if (b[a] <= c) return b[a];
|
|
return b[0]
|
|
} : function(a, b, e) {
|
|
void 0 === e && (e = .001);
|
|
var f = d(a);
|
|
return !b || Math.abs(f - a) < e || f - a < 0 == b < 0 ? f : d(b < 0 ? a - c : a + c)
|
|
}
|
|
}
|
|
|
|
function ba(a, b, c, d) {
|
|
return c.split(",").forEach(function(c) {
|
|
return a(b, c, d)
|
|
})
|
|
}
|
|
|
|
function o(a, b, c, d, e) {
|
|
return a.addEventListener(b, c, {
|
|
passive: !d,
|
|
capture: !!e
|
|
})
|
|
}
|
|
|
|
function n(a, b, c, d) {
|
|
return a.removeEventListener(b, c, !!d)
|
|
}
|
|
|
|
function aY(b, c, a) {
|
|
return a && a.wheelHandler && b(c, "wheel", a)
|
|
}
|
|
|
|
function aZ(a, c) {
|
|
if (J(a)) {
|
|
var b = a.indexOf("="),
|
|
d = ~b ? (a.charAt(b - 1) + 1) * parseFloat(a.substr(b + 1)) : 0;
|
|
~b && (a.indexOf("%") > b && (d *= c / 100), a = a.substr(0, b - 1)), a = d + (a in ay ? ay[a] * c : ~a.indexOf("%") ? parseFloat(a) * c / 100 : parseFloat(a) || 0)
|
|
}
|
|
return a
|
|
}
|
|
|
|
function bd(b, c, k, i, d, t, q, n) {
|
|
var v = d.startColor,
|
|
u = d.endColor,
|
|
w = d.fontSize,
|
|
s = d.indent,
|
|
r = d.fontWeight,
|
|
a = g.createElement("div"),
|
|
m = W(k) || "fixed" === P(k, "pinType"),
|
|
p = -1 !== b.indexOf("scroller"),
|
|
e = m ? f : k,
|
|
j = -1 !== b.indexOf("start"),
|
|
o = j ? v : u,
|
|
h = "border-color:" + o + ";font-size:" + w + ";color:" + o + ";font-weight:" + r + ";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";
|
|
return h += "position:" + ((p || n) && m ? "fixed;" : "absolute;"), !p && !n && m || (h += (i === l ? a$ : aX) + ":" + (t + parseFloat(s)) + "px;"), q && (h += "box-sizing:border-box;text-align:left;width:" + q.offsetWidth + "px;"), a._isStart = j, a.setAttribute("class", "gsap-marker-" + b + (c ? " marker-" + c : "")), a.style.cssText = h, a.innerText = c || 0 === c ? b + "-" + c : b, e.children[0] ? e.insertBefore(a, e.children[0]) : e.appendChild(a), a._offset = a["offset" + i.op.d2], az(a, 0, i, j), a
|
|
}
|
|
|
|
function bT() {
|
|
return 34 < s() - A && an()
|
|
}
|
|
|
|
function ae() {
|
|
y && y.isPressed && !(y.startX > f.clientWidth) || (e.cache++, bc = bc || requestAnimationFrame(an), A || N("scrollStart"), A = s())
|
|
}
|
|
|
|
function bU() {
|
|
bi = b.innerWidth, bj = b.innerHeight
|
|
}
|
|
|
|
function at() {
|
|
e.cache++, m || bo || g.fullscreenElement || g.webkitFullscreenElement || bk && bi === b.innerWidth && !(Math.abs(b.innerHeight - bj) > .25 * b.innerHeight) || aJ.restart(!0)
|
|
}
|
|
|
|
function bX(g) {
|
|
var d, f = a.ticker.frame,
|
|
e = [],
|
|
c = 0;
|
|
if (bh !== f || ai) {
|
|
for (aD(); c < h.length; c += 4)(d = b.matchMedia(h[c]).matches) !== h[c + 3] && ((h[c + 3] = d) ? e.push(c) : aD(1, h[c]) || D(h[c + 2]) && h[c + 2]());
|
|
for (by(), c = 0; c < e.length; c++) d = e[c], _ = h[d], h[d + 2] = h[d + 1](g);
|
|
_ = 0, T && aa(0, 1), bh = f, N("matchMedia")
|
|
}
|
|
}
|
|
|
|
function bn() {
|
|
return n(d, "scrollEnd", bn) || aa(!0)
|
|
}
|
|
|
|
function b_() {
|
|
return e.cache++ && e.forEach(function(a) {
|
|
return "function" == typeof a && (a.rec = 0)
|
|
})
|
|
}
|
|
|
|
function bl(b, e, d, h) {
|
|
if (!b._gsap.swappedIn) {
|
|
for (var f, g = be.length, c = e.style, a = b.style; g--;) c[f = be[g]] = d[f];
|
|
c.position = "absolute" === d.position ? "absolute" : "relative", "inline" === d.display && (c.display = "inline-block"), a[aX] = a[a$] = c.flexBasis = "auto", c.overflow = "visible", c.boxSizing = "border-box", c[M] = bq(b, q) + r, c[U] = bq(b, l) + r, c[k] = a[z] = a.top = a.left = "0", ak(h), a[M] = a.maxWidth = d[M], a[U] = a.maxHeight = d[U], a[k] = d[k], b.parentNode !== e && (b.parentNode.insertBefore(e, b), e.appendChild(b)), b._gsap.swappedIn = !0
|
|
}
|
|
}
|
|
|
|
function aU(c) {
|
|
for (var d = aG.length, e = c.style, b = [], a = 0; a < d; a++) b.push(aG[a], e[aG[a]]);
|
|
return b.t = c, b
|
|
}
|
|
|
|
function ca(a, n, g, b, A, j, k, y, v, z, s, q, d) {
|
|
var e, p, c, w, i, u, h, m, t, l, o;
|
|
return D(a) && (a = a(y)), J(a) && "max" === a.substr(0, 3) && (a = q + ("=" === a.charAt(4) ? aZ("0" + a.substr(3), g) : 0)), w = d ? d.time() : 0, (d && d.seek(0), ar(a)) ? k && az(k, g, b, !0) : (D(n) && (n = n(y)), t = a.split(" "), c = x(n) || f, (i = I(c) || {}) && (i.left || i.top) || "none" !== H(c).display || (m = c.style.display, c.style.display = "block", i = I(c), m ? c.style.display = m : c.style.removeProperty("display")), u = aZ(t[0], i[b.d]), h = aZ(t[1] || "0", g), a = i[b.p] - v[b.p] - z + u + A - h, k && az(k, h, b, g - h < 20 || k._isStart && 20 < h), g -= g - h), j && (l = a + g, o = j._isStart, e = "scroll" + b.d2, az(j, l, b, o && 20 < l || !o && (s ? Math.max(f[e], G[e]) : j.parentNode[e]) <= l + 1), s && (v = I(k), s && (j.style[b.op.p] = v[b.op.p] - b.op.m - j._offset + r))), d && c && (e = I(c), d.seek(q), p = I(c), d._caScrollDist = e[b.p] - p[b.p], a = a / d._caScrollDist * q), d && d.seek(w), d ? a : Math.round(a)
|
|
}
|
|
|
|
function ce(c, e, h, i) {
|
|
if (c.parentNode !== e) {
|
|
var b, g, d = c.style;
|
|
if (e === f) {
|
|
for (b in c._stOrig = d.cssText, g = H(c)) + b || bY.test(b) || !g[b] || "string" != typeof d[b] || "0" === b || (d[b] = g[b]);
|
|
d.top = h, d.left = i
|
|
} else d.cssText = c._stOrig;
|
|
a.core.getCache(c).uncache = 1, e.appendChild(c)
|
|
}
|
|
}
|
|
|
|
function cd(d, h) {
|
|
function b(m, i, j, k, l) {
|
|
var h = b.tween,
|
|
n = i.onComplete,
|
|
o = {};
|
|
return j = j || e(), l = k && l || 0, k = k || m - j, h && h.kill(), c = Math.round(j), i[g] = m, (i.modifiers = o)[g] = function(a) {
|
|
return (a = Math.round(e())) !== c && a !== f && 3 < Math.abs(a - c) && 3 < Math.abs(a - f) ? (h.kill(), b.tween = 0) : a = j + k * h.ratio + l * h.ratio * h.ratio, f = c, c = Math.round(a)
|
|
}, i.onComplete = function() {
|
|
b.tween = 0, n && n.call(h)
|
|
}, h = b.tween = a.to(d, i)
|
|
}
|
|
var c, f, e = V(d, h),
|
|
g = "_scroll" + h.p2;
|
|
return (d[g] = e).wheelHandler = function() {
|
|
return b.tween && b.tween.kill() && (b.tween = 0)
|
|
}, o(d, "wheel", e.wheelHandler), b
|
|
}
|
|
ai = 1, s = Date.now, a_ = s(), A = 0, ap = 0, Y = Math.abs, a$ = "right", aX = "bottom", M = "width", U = "height", af = "Right", ad = "Left", ah = "Top", ag = "Bottom", k = "padding", z = "margin", au = "Width", bM = "Height", r = "px", I = function(b, d) {
|
|
var c = d && "matrix(1, 0, 0, 1, 0, 0)" !== H(b)[aQ] && a.to(b, {
|
|
x: 0,
|
|
y: 0,
|
|
xPercent: 0,
|
|
yPercent: 0,
|
|
rotation: 0,
|
|
rotationX: 0,
|
|
rotationY: 0,
|
|
scale: 1,
|
|
skewX: 0,
|
|
skewY: 0
|
|
}).progress(1),
|
|
e = b.getBoundingClientRect();
|
|
return c && c.progress(0).kill(), e
|
|
}, bB = {
|
|
startColor: "green",
|
|
endColor: "red",
|
|
indent: 0,
|
|
fontSize: "16px",
|
|
fontWeight: "normal"
|
|
}, av = {
|
|
toggleActions: "play",
|
|
anticipatePin: 0
|
|
}, ay = {
|
|
top: 0,
|
|
left: 0,
|
|
center: .5,
|
|
bottom: 1,
|
|
right: 1
|
|
}, az = function(e, g, c, d) {
|
|
var b = {
|
|
display: "block"
|
|
},
|
|
f = c[d ? "os2" : "p2"],
|
|
h = c[d ? "p2" : "os2"];
|
|
e._isFlipped = d, b[c.a + "Percent"] = d ? -100 : 0, b[c.a] = d ? "1px" : 0, b["border" + f + au] = 1, b["border" + h + au] = 0, b[c.p] = g + "px", a.set(e, b)
|
|
}, c = [], aP = {}, al = {}, bI = [], h = [], N = function(a) {
|
|
return al[a] && al[a].map(function(a) {
|
|
return a()
|
|
}) || bI
|
|
}, B = [], by = function(b) {
|
|
for (var a = 0; a < B.length; a += 5) b && B[a + 4] !== b || (B[a].style.cssText = B[a + 1], B[a].getBBox && B[a].setAttribute("transform", B[a + 2] || ""), B[a + 3].uncache = 1)
|
|
}, aD = function(d, a) {
|
|
var b;
|
|
for (p = 0; p < c.length; p++) b = c[p], a && b.media !== a || (d ? b.kill(1) : b.revert());
|
|
a && by(a), a || N("revert")
|
|
}, aM = 0, aa = function(a, b) {
|
|
if (!A || a) {
|
|
aj = !0;
|
|
var e = N("refreshInit");
|
|
bv && d.sort(), b || aD(), c.slice(0).forEach(function(a) {
|
|
return a.refresh()
|
|
}), c.forEach(function(a) {
|
|
return "max" === a.vars.end && a.setPositions(a.start, L(a.scroller, a._dir))
|
|
}), e.forEach(function(a) {
|
|
return a && a.render && a.render(-1)
|
|
}), b_(), aJ.pause(), aM++, aj = !1, N("refresh")
|
|
} else o(d, "scrollEnd", bn)
|
|
}, br = 0, aE = 1, an = function() {
|
|
if (!aj) {
|
|
d.isUpdating = !0, S && S.update(0);
|
|
var a = c.length,
|
|
b = s(),
|
|
e = 50 <= b - a_,
|
|
f = a && c[0].scroll();
|
|
if (aE = f < br ? -1 : 1, br = f, e && (A && !ao && 200 < b - A && (A = 0, N("scrollEnd")), aC = a_, a_ = b), aE < 0) {
|
|
for (p = a; 0 < p--;) c[p] && c[p].update(0, e);
|
|
aE = 1
|
|
} else
|
|
for (p = 0; p < a; p++) c[p] && c[p].update(0, e);
|
|
d.isUpdating = !1
|
|
}
|
|
bc = 0
|
|
}, be = ["left", "top", aX, a$, z + ag, z + af, z + ah, z + ad, "display", "flexShrink", "float", "zIndex", "gridColumnStart", "gridColumnEnd", "gridRowStart", "gridRowEnd", "gridArea", "justifySelf", "alignSelf", "placeSelf", "order"], aG = be.concat([M, U, "boxSizing", "max" + au, "max" + bM, "position", z, k, k + ah, k + af, k + ag, k + ad]), bV = /([A-Z])/g, ak = function(b) {
|
|
if (b) {
|
|
var d, e, f = b.t.style,
|
|
g = b.length,
|
|
c = 0;
|
|
for ((b.t._gsap || a.core.getCache(b.t)).uncache = 1; c < g; c += 2) e = b[c + 1], d = b[c], e ? f[d] = e : f[d] && f.removeProperty(d.replace(bV, "-$1").toLowerCase())
|
|
}
|
|
}, aH = {
|
|
left: 0,
|
|
top: 0
|
|
}, bY = /(webkit|moz|length|cssText|inset)/i, d = (j.prototype.init = function(h, e) {
|
|
var O, R, bK, aB, aM, y, X, al, aI, am, aD, aL, F, ba, bc, bk, T, bA, bp, br, aR, az, bM, aY, bI, be, by, aX, bx, w, bw, ay, ax, aF, aN, aV, bu, aQ, aJ, aA, $, bH, bG, a$, N, i, ab, bP, bg, bE, bD, bj, B, bz, aa, u, bt, a_, t, Q, v, bo, ac, an, aO, bh, bf, bJ, d, aG, bN, bO, aS, bi, C, bF, bC, bR;
|
|
this.progress = this.start = 0, this.vars && this.kill(!0, !0), ap ? (aJ = (h = bQ(J(h) || ar(h) || h.nodeType ? {
|
|
trigger: h
|
|
} : h, av)).onUpdate, aA = h.toggleClass, $ = h.id, bH = h.onToggle, bG = h.onRefresh, a$ = h.scrub, N = h.trigger, i = h.pin, ab = h.pinSpacing, bP = h.invalidateOnRefresh, bg = h.anticipatePin, bE = h.onScrubComplete, bD = h.onSnapComplete, bj = h.once, B = h.snap, bz = h.pinReparent, aa = h.pinSpacer, u = h.containerAnimation, bt = h.fastScrollEnd, a_ = h.preventOverlaps, t = h.horizontal || h.containerAnimation && !1 !== h.horizontal ? q : l, Q = !a$ && 0 !== a$, v = x(h.scroller || b), bo = a.core.getCache(v), ac = W(v), an = "fixed" === ("pinType" in h ? h.pinType : P(v, "pinType") || ac && "fixed"), aO = [h.onEnter, h.onLeave, h.onEnterBack, h.onLeaveBack], bh = Q && h.toggleActions.split(" "), bf = "markers" in h ? h.markers : av.markers, bJ = ac ? 0 : parseFloat(H(v)["border" + t.p2 + au]) || 0, d = this, aG = h.onRefreshInit && function() {
|
|
return h.onRefreshInit(d)
|
|
}, bN = function(d, f, a) {
|
|
var g = a.d,
|
|
e = a.d2,
|
|
c = a.a;
|
|
return (c = P(d, "getBoundingClientRect")) ? function() {
|
|
return c()[g]
|
|
} : function() {
|
|
return (f ? b["inner" + e] : d["client" + e]) || 0
|
|
}
|
|
}(v, ac, t), bO = function(a, b) {
|
|
return !b || ~E.indexOf(a) ? bL(a) : function() {
|
|
return aH
|
|
}
|
|
}(v, ac), aS = 0, bi = 0, C = V(v, t), (d.media = _, d._dir = t, bg *= 45, d.scroller = v, d.scroll = u ? u.time.bind(u) : C, aB = C(), d.vars = h, e = e || h.animation, "refreshPriority" in h && (bv = 1, -9999 === h.refreshPriority && (S = d)), bo.tweenScroll = bo.tweenScroll || {
|
|
top: cd(v, l),
|
|
left: cd(v, q)
|
|
}, d.tweenTo = O = bo.tweenScroll[t.p], d.scrubDuration = function(b) {
|
|
(bw = ar(b) && b) ? w ? w.duration(b) : w = a.to(e, {
|
|
ease: "expo",
|
|
totalProgress: "+=0.001",
|
|
duration: bw,
|
|
paused: !0,
|
|
onComplete: function() {
|
|
return bE && bE(d)
|
|
}
|
|
}): (w && w.progress(1).kill(), w = 0)
|
|
}, e && (e.vars.lazy = !1, e._initted || !1 !== e.vars.immediateRender && !1 !== h.immediateRender && e.render(0, !0, !0), d.animation = e.pause(), (e.scrollTrigger = d).scrubDuration(a$), aX = 0, $ = $ || e.vars.id), c.push(d), B && (aT(B) && !B.push || (B = {
|
|
snapTo: B
|
|
}), "scrollBehavior" in f.style && a.set(ac ? [f, G] : v, {
|
|
scrollBehavior: "auto"
|
|
}), bK = D(B.snapTo) ? B.snapTo : "labels" === B.snapTo ? function(b) {
|
|
return function(c) {
|
|
return a.utils.snap(bS(b), c)
|
|
}
|
|
}(e) : "labelsDirectional" === B.snapTo ? function(a) {
|
|
return function(b, c) {
|
|
return bm(bS(a))(b, c.direction)
|
|
}
|
|
}(e) : !1 !== B.directional ? function(a, b) {
|
|
return bm(B.snapTo)(a, s() - bi < 500 ? 0 : b.direction)
|
|
} : a.utils.snap(B.snapTo), ay = B.duration || {
|
|
min: .1,
|
|
max: 2
|
|
}, ay = aT(ay) ? Z(ay.min, ay.max) : Z(ay, ay), ax = a.delayedCall(B.delay || bw / 2 || .1, function() {
|
|
var b = C(),
|
|
m = s() - bi < 500,
|
|
g = O.tween,
|
|
f, j, i, h, l, k, c, n, o, p;
|
|
if (!(m || Math.abs(d.getVelocity()) < 10) || g || ao || aS === b) d.isActive && aS !== b && ax.restart(!0);
|
|
else if (f = (b - y) / F, j = e && !Q ? e.totalProgress() : f, i = m ? 0 : (j - bx) / (s() - aC) * 1e3 || 0, h = a.utils.clamp(-f, 1 - f, Y(i / 2) * i / .185), l = f + (!1 === B.inertia ? 0 : h), k = Z(0, 1, bK(l, d)), c = Math.round(y + k * F), n = B.onStart, o = B.onInterrupt, p = B.onComplete, b <= X && y <= b && c !== b) {
|
|
if (g && !g._initted && g.data <= Y(c - b)) return;
|
|
!1 === B.inertia && (h = k - f), O(c, {
|
|
duration: ay(Y(.185 * Math.max(Y(l - j), Y(k - j)) / i / .05 || 0)),
|
|
ease: B.ease || "power3",
|
|
data: Y(c - b),
|
|
onInterrupt: function() {
|
|
return ax.restart(!0) && o && o(d)
|
|
},
|
|
onComplete: function() {
|
|
d.update(), aS = C(), aX = bx = e && !Q ? e.totalProgress() : d.progress, bD && bD(d), p && p(d)
|
|
}
|
|
}, b, h * F, c - b - h * F), n && n(d, O.tween)
|
|
}
|
|
}).pause()), $ && (aP[$] = d), aQ = (aQ = (N = d.trigger = x(N || i)) && N._gsap && N._gsap.stRevert) && aQ(d), i = !0 === i ? N : x(i), J(aA) && (aA = {
|
|
targets: N,
|
|
className: aA
|
|
}), i && (!1 === ab || ab === z || (ab = !(!ab && "flex" === H(i.parentNode).display) && k), d.pin = i, !1 !== h.force3D && a.set(i, {
|
|
force3D: !0
|
|
}), (R = a.core.getCache(i)).spacer ? ba = R.pinState : (aa && ((aa = x(aa)) && !aa.nodeType && (aa = aa.current || aa.nativeElement), R.spacerIsNative = !!aa, aa && (R.spacerState = aU(aa))), R.spacer = T = aa || g.createElement("div"), T.classList.add("pin-spacer"), $ && T.classList.add("pin-spacer-" + $), R.pinState = ba = aU(i)), d.spacer = T = R.spacer, by = H(i), bM = by[ab + t.os2], bp = a.getProperty(i), br = a.quickSetter(i, t.a, r), bl(i, T, by), bk = aU(i)), bf) && (aL = aT(bf) ? bQ(bf, bB) : bB, am = bd("scroller-start", $, v, t, aL, 0), aD = bd("scroller-end", $, v, t, aL, 0, am), bA = am["offset" + t.op.d2], bF = x(P(v, "content") || v), al = this.markerStart = bd("start", $, bF, t, aL, bA, 0, u), aI = this.markerEnd = bd("end", $, bF, t, aL, bA, 0, u), u && (bu = a.quickSetter([al, aI], t.a, r)), an || E.length && !0 === P(v, "fixedMarkers") || (function(b) {
|
|
var a = H(b).position;
|
|
b.style.position = "absolute" === a || "fixed" === a ? a : "relative"
|
|
}(ac ? f : v), a.set([am, aD], {
|
|
force3D: !0
|
|
}), bI = a.quickSetter(am, t.a, r), be = a.quickSetter(aD, t.a, r))), u && (bC = u.vars.onUpdate, bR = u.vars.onUpdateParams, u.eventCallback("onUpdate", function() {
|
|
d.update(0, 0, 1), bC && bC.apply(bR || [])
|
|
})), d.previous = function() {
|
|
return c[c.indexOf(d) - 1]
|
|
}, d.next = function() {
|
|
return c[c.indexOf(d) + 1]
|
|
}, d.revert = function(b) {
|
|
var a = !1 !== b || !d.enabled,
|
|
c = m;
|
|
a !== d.isReverted && (a && (!d.scroll.rec && m && aj && (d.scroll.rec = C()), aN = Math.max(C(), d.scroll.rec || 0), aF = d.progress, aV = e && e.progress()), al && [al, aI, am, aD].forEach(function(b) {
|
|
return b.style.display = a ? "none" : "block"
|
|
}), a && (m = 1), d.update(a), m = c, i && (a ? function(a, c, e) {
|
|
var d, b;
|
|
ak(e), d = a._gsap, d.spacerIsNative ? ak(d.spacerState) : a._gsap.swappedIn && (b = c.parentNode, b && (b.insertBefore(a, c), b.removeChild(c))), a._gsap.swappedIn = !1
|
|
}(i, T, ba) : bz && d.isActive || bl(i, T, H(i), aY)), d.isReverted = a)
|
|
}, d.refresh = function(at, aq) {
|
|
if (!m && d.enabled || aq)
|
|
if (i && at && A) o(j, "scrollEnd", bn);
|
|
else {
|
|
!aj && aG && aG(d), m = 1, bi = s(), O.tween && (O.tween.kill(), O.tween = 0), w && w.pause(), bP && e && e.time(-.01, !0).invalidate(), d.isReverted || d.revert();
|
|
for (var n, p, aa, W, b, g, P, $, ap, Y, Z = bN(), ai = bO(), S = u ? u.duration() : L(v, t), K = 0, R = 0, B = h.end, ae = h.endTrigger || N, G = h.start || (0 !== h.start && N ? i ? "0 0" : "0 100%" : 0), ao = d.pinnedContainer = h.pinnedContainer && x(h.pinnedContainer), _ = N && Math.max(0, c.indexOf(d)) || 0, E = _; E--;)(g = c[E]).end || g.refresh(0, 1) || (m = 1), !(P = g.pin) || P !== N && P !== i || g.isReverted || ((Y = Y || []).unshift(g), g.revert()), g !== c[E] && (_--, E--);
|
|
for (D(G) && (G = G(d)), y = ca(G, N, Z, t, C(), al, am, d, ai, bJ, an, S, u) || (i ? -.001 : 0), D(B) && (B = B(d)), J(B) && !B.indexOf("+=") && (~B.indexOf(" ") ? B = (J(G) ? G.split(" ")[0] : "") + B : (K = aZ(B.substr(2), Z), B = J(G) ? G : y + K, ae = N)), X = Math.max(y, ca(B || (ae ? "100% 0" : S), ae, Z, t, C() + K, aI, aD, d, ai, bJ, an, S, u)) || -.001, F = X - y || (y -= .01) && .001, K = 0, E = _; E--;)(P = (g = c[E]).pin) && g.start - g._pinPush < y && !u && 0 < g.end && (n = g.end - g.start, P !== N && P !== ao || ar(G) || (K += n * (1 - g.progress)), P === i && (R += n));
|
|
if (y += K, X += K, d._pinPush = R, al && K && ((n = {})[t.a] = "+=" + K, ao && (n[t.p] = "-=" + C()), a.set([al, aI], n)), i) n = H(i), W = t === l, aa = C(), aR = parseFloat(bp(t.a)) + R, !S && 1 < X && ((ac ? f : v).style["overflow-" + t.a] = "scroll"), bl(i, T, n), bk = aU(i), p = I(i, !0), $ = an && V(v, W ? q : l)(), ab && ((aY = [ab + t.os2, F + R + r]).t = T, (E = ab === k ? bq(i, t) + F + R : 0) && aY.push(t.d, E + r), ak(aY), an && C(aN)), an && ((b = {
|
|
top: p.top + (W ? aa - y : $) + r,
|
|
left: p.left + (W ? $ : aa - y) + r,
|
|
boxSizing: "border-box",
|
|
position: "fixed"
|
|
})[M] = b.maxWidth = Math.ceil(p.width) + r, b[U] = b.maxHeight = Math.ceil(p.height) + r, b[z] = b[z + ah] = b[z + af] = b[z + ag] = b[z + ad] = "0", b[k] = n[k], b[k + ah] = n[k + ah], b[k + af] = n[k + af], b[k + ag] = n[k + ag], b[k + ad] = n[k + ad], bc = function(a, e, g) {
|
|
for (var b, d = [], f = a.length, c = g ? 8 : 0; c < f; c += 2) b = a[c], d.push(b, b in e ? e[b] : a[c + 1]);
|
|
return d.t = a.t, d
|
|
}(ba, b, bz)), e ? (ap = e._initted, aW(1), e.render(e.duration(), !0, !0), az = bp(t.a) - aR + F + R, F !== az && an && bc.splice(bc.length - 2, 2), e.render(0, !0, !0), ap || e.invalidate(), aW(0)) : az = F;
|
|
else if (N && C() && !u)
|
|
for (p = N.parentNode; p && p !== f;) p._pinOffset && (y -= p._pinOffset, X -= p._pinOffset), p = p.parentNode;
|
|
Y && Y.forEach(function(a) {
|
|
return a.revert(!1)
|
|
}), d.start = y, d.end = X, aB = aM = C(), u || (aB < aN && C(aN), d.scroll.rec = 0), d.revert(!1), ax && (aS = -1, d.isActive && C(y + F * aF), ax.restart(!0)), m = 0, e && Q && (e._initted || aV) && e.progress() !== aV && e.progress(aV, !0).render(e.time(), !0, !0), aF === d.progress && !u || (e && !Q && e.totalProgress(aF, !0), d.progress = aF, d.update(0, 0, 1)), i && ab && (T._pinOffset = Math.round(d.progress * az)), bG && bG(d)
|
|
}
|
|
}, d.getVelocity = function() {
|
|
return (C() - aM) / (s() - aC) * 1e3 || 0
|
|
}, d.endAnimation = function() {
|
|
aq(d.callbackAnimation), e && (w ? w.progress(1) : e.paused() ? Q || aq(e, d.direction < 0, 1) : aq(e, e.reversed()))
|
|
}, d.labelToScroll = function(a) {
|
|
return e && e.labels && (y || d.refresh() || y) + e.labels[a] / e.duration() * F || 0
|
|
}, d.getTrailing = function(a) {
|
|
var b = c.indexOf(d),
|
|
e = 0 < d.direction ? c.slice(0, b).reverse() : c.slice(b + 1);
|
|
return (J(a) ? e.filter(function(b) {
|
|
return b.vars.preventOverlaps === a
|
|
}) : e).filter(function(a) {
|
|
return 0 < d.direction ? a.end <= y : a.start >= X
|
|
})
|
|
}, d.update = function(n, J, H) {
|
|
var k, c, h, o, j, q, p, b, x, a, g, z, E, G;
|
|
(!u || H || n) && (b = d.scroll(), x = n ? 0 : (b - y) / F, a = x < 0 ? 0 : 1 < x ? 1 : x || 0, g = d.progress, (J && (aM = aB, aB = u ? C() : b, B && (bx = aX, aX = e && !Q ? e.totalProgress() : a)), bg && !a && i && !m && !ai && A && y < b + (b - aM) / (s() - aC) * bg && (a = 1e-4), a !== g && d.enabled) && (o = (j = (k = d.isActive = !!a && a < 1) != (!!g && g < 1)) || !!a != !!g, d.direction = g < a ? 1 : -1, d.progress = a, o && !m && (c = a && !g ? 0 : 1 === a ? 1 : 1 === g ? 2 : 3, Q && (h = !j && "none" !== bh[c + 1] && bh[c + 1] || bh[c], p = e && ("complete" === h || "reset" === h || h in e))), a_ && (j || p) && (p || a$ || !e) && (D(a_) ? a_(d) : d.getTrailing(a_).forEach(function(a) {
|
|
return a.endAnimation()
|
|
})), Q || (!w || m || ai ? e && e.totalProgress(a, !!m) : ((u || S && S !== d) && w.render(w._dp._time - w._start), w.resetTo ? w.resetTo("totalProgress", a, e._tTime / e._tDur) : (w.vars.totalProgress = a, w.invalidate().restart()))), i && (n && ab && (T.style[ab + t.os2] = bM), an ? o && (q = !n && g < a && b < X + 1 && b + 1 >= L(v, t), bz && (n || !k && !q ? ce(i, T) : (z = I(i, !0), E = b - y, ce(i, f, z.top + (t === l ? E : 0) + r, z.left + (t === l ? 0 : E) + r))), ak(k || q ? bc : bk), az !== F && a < 1 && k || br(aR + (1 !== a || q ? 0 : az))) : br(aw(aR + az * a))), !B || O.tween || m || ai || ax.restart(!0), aA && (j || bj && a && (a < 1 || !bb)) && aK(aA.targets).forEach(function(a) {
|
|
return a.classList[k || bj ? "add" : "remove"](aA.className)
|
|
}), !aJ || Q || n || aJ(d), o && !m ? (Q && (p && ("complete" === h ? e.pause().totalProgress(1) : "reset" === h ? e.restart(!0).pause() : "restart" === h ? e.restart(!0) : e[h]()), aJ && aJ(d)), !j && bb || (bH && j && bs(d, bH), aO[c] && bs(d, aO[c]), bj && (1 === a ? d.kill(!1, 1) : aO[c] = 0), j || aO[c = 1 === a ? 1 : 3] && bs(d, aO[c])), bt && !k && Math.abs(d.getVelocity()) > (ar(bt) ? bt : 2500) && (aq(d.callbackAnimation), w ? w.progress(1) : aq(e, !a, 1))) : Q && aJ && !m && aJ(d)), be && (G = u ? b / u.duration() * (u._caScrollDist || 0) : b, bI(G + (am._isFlipped ? 1 : 0)), be(G)), bu && bu(-b / u.duration() * (u._caScrollDist || 0)))
|
|
}, d.enable = function(a, b) {
|
|
d.enabled || (d.enabled = !0, o(v, "resize", at), o(ac ? g : v, "scroll", ae), aG && o(j, "refreshInit", aG), !1 !== a && (d.progress = aF = 0, aB = aM = aS = C()), !1 !== b && d.refresh())
|
|
}, d.getTween = function(a) {
|
|
return a && O ? O.tween : w
|
|
}, d.setPositions = function(a, b) {
|
|
i && (aR += a - y, az += b - a - F), d.start = y = a, d.end = X = b, F = b - a, d.update()
|
|
}, d.disable = function(b, e) {
|
|
if (d.enabled && (!1 !== b && d.revert(), d.enabled = d.isActive = !1, e || w && w.pause(), aN = 0, R && (R.uncache = 1), aG && n(j, "refreshInit", aG), ax && (ax.pause(), O.tween && O.tween.kill() && (O.tween = 0)), !ac)) {
|
|
for (var a = c.length; a--;)
|
|
if (c[a].scroller === v && c[a] !== d) return;
|
|
n(v, "resize", at), n(v, "scroll", ae)
|
|
}
|
|
}, d.kill = function(f, b) {
|
|
d.disable(f, b), w && !b && w.kill(), $ && delete aP[$];
|
|
var a = c.indexOf(d);
|
|
0 <= a && c.splice(a, 1), a === p && 0 < aE && p--, a = 0, c.forEach(function(b) {
|
|
return b.scroller === d.scroller && (a = 1)
|
|
}), a || (d.scroll.rec = 0), e && (e.scrollTrigger = null, f && e.render(-1), b || e.kill()), al && [al, aI, am, aD].forEach(function(a) {
|
|
return a.parentNode && a.parentNode.removeChild(a)
|
|
}), S === d && (S = 0), i && (R && (R.uncache = 1), a = 0, c.forEach(function(b) {
|
|
return b.pin === i && a++
|
|
}), a || (R.spacer = 0)), h.onKill && h.onKill(d)
|
|
}, d.enable(!1, !1), aQ && aQ(d), e && e.add && !F ? a.delayedCall(.01, function() {
|
|
return y || X || d.refresh()
|
|
}) && (F = .01) && (y = X = 0) : d.refresh()) : this.update = this.refresh = this.kill = K
|
|
}, j.register = function(b) {
|
|
return T || (a = b || bK(), bJ() && window.document && j.enable(), T = ap), T
|
|
}, j.defaults = function(a) {
|
|
if (a)
|
|
for (var b in a) av[b] = a[b];
|
|
return av
|
|
}, j.disable = function(d, h) {
|
|
ap = 0, c.forEach(function(a) {
|
|
return a[h ? "kill" : "disable"](d)
|
|
}), n(b, "wheel", ae), n(g, "scroll", ae), clearInterval(aI), n(g, "touchcancel", K), n(f, "touchstart", K), ba(n, g, "pointerdown,touchstart,mousedown", bG), ba(n, g, "pointerup,touchend,mouseup", bH), aJ.kill(), aS(n);
|
|
for (var a = 0; a < e.length; a += 3) aY(n, e[a], e[a + 1]), aY(n, e[a], e[a + 2])
|
|
}, j.enable = function() {
|
|
if (b = window, g = document, G = g.documentElement, f = g.body, a && (aK = a.utils.toArray, Z = a.utils.clamp, aW = a.core.suppressOverwrites || K, a.core.globals("ScrollTrigger", j), f)) {
|
|
ap = 1, i.register(a), j.isTouch = i.isTouch, R = i.isTouch && /(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent), o(b, "wheel", ae), bF = [b, g, G, f], j.matchMedia({
|
|
"(orientation: portrait)": function() {
|
|
return bU(), bU
|
|
}
|
|
}), o(g, "scroll", ae);
|
|
var k, d, h = f.style,
|
|
m = h.borderTopStyle;
|
|
for (h.borderTopStyle = "solid", k = I(f), l.m = Math.round(k.top + l.sc()) || 0, q.m = Math.round(k.left + q.sc()) || 0, m ? h.borderTopStyle = m : h.removeProperty("border-top-style"), aI = setInterval(bT, 250), a.delayedCall(.5, function() {
|
|
return ai = 0
|
|
}), o(g, "touchcancel", K), o(f, "touchstart", K), ba(o, g, "pointerdown,touchstart,mousedown", bG), ba(o, g, "pointerup,touchend,mouseup", bH), aQ = a.utils.checkPrefix("transform"), aG.push(aQ), T = s(), aJ = a.delayedCall(.2, aa).pause(), ac = [g, "visibilitychange", function() {
|
|
var a = b.innerWidth,
|
|
c = b.innerHeight;
|
|
g.hidden ? (bx = a, bw = c) : bx === a && bw === c || at()
|
|
}, g, "DOMContentLoaded", aa, b, "load", aa, b, "resize", at], aS(o), c.forEach(function(a) {
|
|
return a.enable(0, 1)
|
|
}), d = 0; d < e.length; d += 3) aY(n, e[d], e[d + 1]), aY(n, e[d], e[d + 2])
|
|
}
|
|
}, j.config = function(a) {
|
|
"limitCallbacks" in a && (bb = !!a.limitCallbacks);
|
|
var b = a.syncInterval;
|
|
b && clearInterval(aI) || (aI = b) && setInterval(bT, b), "ignoreMobileResize" in a && (bk = 1 === j.isTouch && a.ignoreMobileResize), "autoRefreshEvents" in a && (aS(n) || aS(o, a.autoRefreshEvents || "none"), bo = -1 === (a.autoRefreshEvents + "").indexOf("resize"))
|
|
}, j.scrollerProxy = function(h, a) {
|
|
var c = x(h),
|
|
d = e.indexOf(c),
|
|
g = W(c);
|
|
~d && e.splice(d, g ? 6 : 2), a && (g ? E.unshift(b, a, f, a, G, a) : E.unshift(c, a))
|
|
}, j.matchMedia = function(g) {
|
|
var c, d, a, e, f;
|
|
for (d in g) a = h.indexOf(d), e = g[d], "all" === (_ = d) ? e() : (c = b.matchMedia(d)) && (c.matches && (f = e()), ~a ? (h[a + 1] = bN(h[a + 1], e), h[a + 2] = bN(h[a + 2], f)) : (a = h.length, h.push(d, e, f), c.addListener ? c.addListener(bX) : c.addEventListener("change", bX)), h[a + 3] = c.matches), _ = 0;
|
|
return h
|
|
}, j.clearMatchMedia = function(a) {
|
|
a || (h.length = 0), 0 <= (a = h.indexOf(a)) && h.splice(a, 4)
|
|
}, j.isInViewport = function(d, f, e) {
|
|
var a = (J(d) ? x(d) : d).getBoundingClientRect(),
|
|
c = a[e ? M : U] * f || 0;
|
|
return e ? 0 < a.right - c && a.left + c < b.innerWidth : 0 < a.bottom - c && a.top + c < b.innerHeight
|
|
}, j.positionInViewport = function(c, a, g) {
|
|
J(c) && (c = x(c));
|
|
var d = c.getBoundingClientRect(),
|
|
e = d[g ? M : U],
|
|
f = null == a ? e / 2 : a in ay ? ay[a] * e : ~a.indexOf("%") ? parseFloat(a) * e / 100 : parseFloat(a) || 0;
|
|
return g ? (d.left + f) / b.innerWidth : (d.top + f) / b.innerHeight
|
|
}, j);
|
|
|
|
function j(b, c) {
|
|
T || j.register(a) || console.warn("Please gsap.registerPlugin(ScrollTrigger)"), this.init(b, c)
|
|
}
|
|
d.version = "3.10.5", d.saveStyles = function(b) {
|
|
return b ? aK(b).forEach(function(b) {
|
|
if (b && b.style) {
|
|
var c = B.indexOf(b);
|
|
0 <= c && B.splice(c, 5), B.push(b, b.style.cssText, b.getBBox && b.getAttribute("transform"), a.core.getCache(b), _)
|
|
}
|
|
}) : B
|
|
}, d.revert = function(a, b) {
|
|
return aD(!a, b)
|
|
}, d.create = function(a, b) {
|
|
return new d(a, b)
|
|
}, d.refresh = function(a) {
|
|
return a ? at() : (T || d.register()) && aa(!0)
|
|
}, d.update = an, d.clearScrollMemory = b_, d.maxScroll = function(a, b) {
|
|
return L(a, b ? q : l)
|
|
}, d.getScrollFunc = function(a, b) {
|
|
return V(x(a), b ? q : l)
|
|
}, d.getById = function(a) {
|
|
return aP[a]
|
|
}, d.getAll = function() {
|
|
return c.filter(function(a) {
|
|
return "ScrollSmoother" !== a.vars.id
|
|
})
|
|
}, d.isScrolling = function() {
|
|
return !!A
|
|
}, d.snapDirectional = bm, d.addEventListener = function(a, b) {
|
|
var c = al[a] || (al[a] = []);
|
|
~c.indexOf(b) || c.push(b)
|
|
}, d.removeEventListener = function(c, d) {
|
|
var a = al[c],
|
|
b = a && a.indexOf(d);
|
|
0 <= b && a.splice(b, 1)
|
|
}, d.batch = function(h, c) {
|
|
function i(g, f) {
|
|
var b = [],
|
|
c = [],
|
|
d = a.delayedCall(j, function() {
|
|
f(b, c), b = [], c = []
|
|
}).pause();
|
|
return function(a) {
|
|
b.length || d.restart(!0), b.push(a.trigger), c.push(a), e <= b.length && d.progress(1)
|
|
}
|
|
}
|
|
var b, g = [],
|
|
f = {},
|
|
j = c.interval || .016,
|
|
e = c.batchMax || 1e9;
|
|
for (b in c) f[b] = "on" === b.substr(0, 2) && D(c[b]) && "onRefreshInit" !== b ? i(0, c[b]) : c[b];
|
|
return D(e) && (e = e(), o(d, "refresh", function() {
|
|
return e = c.batchMax()
|
|
})), aK(h).forEach(function(c) {
|
|
var a = {};
|
|
for (b in f) a[b] = f[b];
|
|
a.trigger = c, g.push(d.create(a))
|
|
}), g
|
|
};
|
|
|
|
function b$(d, a, b, c) {
|
|
return c < a ? d(c) : a < 0 && d(0), c < b ? (c - a) / (b - a) : b < 0 ? a / (a - b) : 1
|
|
}
|
|
|
|
function aR(b, a) {
|
|
!0 === a ? b.style.removeProperty("touch-action") : b.style.touchAction = !0 === a ? "auto" : a ? "pan-" + a + (i.isTouch ? " pinch-zoom" : "") : "none", b === G && aR(f, a)
|
|
}
|
|
|
|
function ch(e) {
|
|
var f, d = e.event,
|
|
h = e.target,
|
|
i = e.axis,
|
|
b = (d.changedTouches ? d.changedTouches[0] : d).target,
|
|
c = b._gsap || a.core.getCache(b),
|
|
g = s();
|
|
if (!c._isScrollT || 2e3 < g - c._isScrollT) {
|
|
for (; b && b.scrollHeight <= b.clientHeight;) b = b.parentNode;
|
|
c._isScroll = b && !W(b) && b !== h && (bD[(f = H(b)).overflowY] || bD[f.overflowX]), c._isScrollT = g
|
|
}!c._isScroll && "x" !== i || (d._gsapAllow = !0)
|
|
}
|
|
|
|
function cc(b, c, d, a) {
|
|
return i.create({
|
|
target: b,
|
|
capture: !0,
|
|
debounce: !1,
|
|
lockAxis: !0,
|
|
type: c,
|
|
onWheel: a = a && ch,
|
|
onPress: a,
|
|
onDrag: a,
|
|
onScroll: a,
|
|
onEnable: function() {
|
|
return d && o(g, i.eventTypes[0], bt, !1, !0)
|
|
},
|
|
onDisable: function() {
|
|
return n(g, i.eventTypes[0], bt, !0)
|
|
}
|
|
})
|
|
}
|
|
|
|
function cg(c) {
|
|
function Q() {
|
|
return A = !1
|
|
}
|
|
|
|
function z() {
|
|
j = L(h, l), u = Z(R ? 1 : 0, j), m && (y = Z(0, L(h, q))), t = aM
|
|
}
|
|
|
|
function B() {
|
|
g._gsap.y = aw(parseFloat(g._gsap.y) + d.offset) + "px", g.style.transform = "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, " + parseFloat(g._gsap.y) + ", 0, 1)", d.offset = d.cacheID = 0
|
|
}
|
|
|
|
function v() {
|
|
z(), f.isActive() && f.vars.scrollY > j && (d() > j ? f.progress(1) && d(j) : f.resetTo("scrollY", j))
|
|
}
|
|
aT(c) || (c = {}), c.preventDefault = c.isNormalizer = c.allowClicks = !0, c.type || (c.type = "wheel,touch"), c.debounce = !!c.debounce, c.id = c.id || "normalizer";
|
|
var k, j, t, A, f, I, w, E, m = c.normalizeScrollX,
|
|
F = c.momentum,
|
|
P = c.allowNestedScroll,
|
|
h = x(c.target) || G,
|
|
H = a.core.globals().ScrollSmoother,
|
|
C = H && H.get(),
|
|
g = R && (c.content && x(c.content) || C && !1 !== c.content && !C.smooth() && C.content()),
|
|
d = V(h, l),
|
|
r = V(h, q),
|
|
p = 1,
|
|
N = (i.isTouch && b.visualViewport ? b.visualViewport.scale * b.visualViewport.width : b.outerWidth) / b.innerWidth,
|
|
J = 0,
|
|
O = D(F) ? function() {
|
|
return F(k)
|
|
} : function() {
|
|
return F || 2.8
|
|
},
|
|
M = cc(h, c.type, !0, P),
|
|
y = K,
|
|
u = K;
|
|
return g && a.set(g, {
|
|
y: "+=0"
|
|
}), c.ignoreCheck = function(a) {
|
|
return R && "touchmove" === a.type && function() {
|
|
var c, a, b;
|
|
if (A) return requestAnimationFrame(Q), c = aw(k.deltaY / 2), a = u(d.v - c), g && a !== d.v + d.offset && (d.offset = a - d.v, b = aw((parseFloat(g && g._gsap.y) || 0) - d.offset), g.style.transform = "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, " + b + ", 0, 1)", g._gsap.y = b + "px", d.cacheID = e.cache, an()), !0;
|
|
d.offset && B(), A = !0
|
|
}() || 1.05 < p && "touchstart" !== a.type || k.isGesturing || a.touches && 1 < a.touches.length
|
|
}, c.onPress = function() {
|
|
var a = p;
|
|
p = aw((b.visualViewport && b.visualViewport.scale || 1) / N), f.pause(), a !== p && aR(h, 1.01 < p || !m && "x"), I = r(), w = d(), z(), t = aM
|
|
}, c.onRelease = c.onGestureStart = function(i, k) {
|
|
if (d.offset && B(), k) {
|
|
e.cache++;
|
|
var g, b, c = O();
|
|
m && (b = (g = r()) + .05 * c * -i.velocityX / .227, c *= b$(r, g, b, L(h, q)), f.vars.scrollX = y(b)), b = (g = d()) + .05 * c * -i.velocityY / .227, c *= b$(d, g, b, L(h, l)), f.vars.scrollY = u(b), f.invalidate().duration(c).play(.01), (R && f.vars.scrollY >= j || j - 1 <= g) && a.to({}, {
|
|
onUpdate: v,
|
|
duration: c
|
|
})
|
|
} else E.restart(!0)
|
|
}, c.onWheel = function() {
|
|
f._ts && f.pause(), 1e3 < s() - J && (t = 0, J = s())
|
|
}, c.onChange = function(a, b, c, g, h) {
|
|
if (aM !== t && z(), b && m && r(y(g[2] === b ? I + (a.startX - a.x) : r() + b - g[1])), c) {
|
|
d.offset && B();
|
|
var i = h[2] === c,
|
|
e = i ? w + a.startY - a.y : d() + c - h[1],
|
|
f = u(e);
|
|
i && e !== f && (w += f - e), d(f)
|
|
}(c || b) && an()
|
|
}, c.onEnable = function() {
|
|
aR(h, !m && "x"), o(b, "resize", v), M.enable()
|
|
}, c.onDisable = function() {
|
|
aR(h, !0), n(b, "resize", v), M.kill()
|
|
}, c.lockAxis = !1 !== c.lockAxis, ((k = new i(c)).iOS = R) && !d() && d(1), R && a.ticker.add(K), E = k._dc, f = a.to(k, {
|
|
ease: "power4",
|
|
paused: !0,
|
|
scrollX: m ? "+=0.1" : "+=0",
|
|
scrollY: "+=0.1",
|
|
onComplete: E.vars.onComplete
|
|
}), k
|
|
}
|
|
bD = {
|
|
auto: 1,
|
|
scroll: 1
|
|
}, cb = /(input|label|select|textarea)/i, bt = function(a) {
|
|
var b = cb.test(a.target.tagName);
|
|
(b || bz) && (a._gsapAllow = !0, bz = b)
|
|
}, d.sort = function(a) {
|
|
return c.sort(a || function(a, b) {
|
|
return -1e6 * (a.vars.refreshPriority || 0) + a.start - (b.start + -1e6 * (b.vars.refreshPriority || 0))
|
|
})
|
|
}, d.observe = function(a) {
|
|
return new i(a)
|
|
}, d.normalizeScroll = function(a) {
|
|
if (void 0 === a) return y;
|
|
if (!0 === a && y) return y.enable();
|
|
if (!1 === a) return y && y.kill();
|
|
var b = a instanceof i ? a : cg(a);
|
|
return y && y.target === b.target && y.kill(), W(b.target) && (y = b), b
|
|
}, d.core = {
|
|
_getVelocityProp: bp,
|
|
_inputObserver: cc,
|
|
_scrollers: e,
|
|
_proxies: E,
|
|
bridge: {
|
|
ss: function() {
|
|
A || N("scrollStart"), A = s()
|
|
},
|
|
ref: function() {
|
|
return m
|
|
}
|
|
}
|
|
}, bK() && a.registerPlugin(d), ax.ScrollTrigger = d, ax.default = d, typeof window == "undefined" || window !== ax ? Object.defineProperty(ax, "__esModule", {
|
|
value: !0
|
|
}) : delete ax.default
|
|
}) |