vue-zoomster
Version:
A Vue 2 component for image zoom, rotate, and download
3,056 lines • 158 kB
JavaScript
function ae(l) {
if (l === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return l;
}
function us(l, t) {
l.prototype = Object.create(t.prototype), l.prototype.constructor = l, l.__proto__ = t;
}
/*!
* GSAP 3.13.0
* https://gsap.com
*
* @license Copyright 2008-2025, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license
* @author: Jack Doyle, jack@greensock.com
*/
var It = {
autoSleep: 120,
force3D: "auto",
nullTargetWarn: 1,
units: {
lineHeight: ""
}
}, li = {
duration: 0.5,
overwrite: !1,
delay: 0
}, on, xt, et, Gt = 1e8, tt = 1 / Gt, Br = Math.PI * 2, bo = Br / 4, So = 0, fs = Math.sqrt, Co = Math.cos, Do = Math.sin, gt = function(t) {
return typeof t == "string";
}, st = function(t) {
return typeof t == "function";
}, ce = function(t) {
return typeof t == "number";
}, an = function(t) {
return typeof t > "u";
}, ne = function(t) {
return typeof t == "object";
}, bt = function(t) {
return t !== !1;
}, ln = function() {
return typeof window < "u";
}, $i = function(t) {
return st(t) || gt(t);
}, hs = typeof ArrayBuffer == "function" && ArrayBuffer.isView || function() {
}, At = Array.isArray, Nr = /(?:-?\.?\d|\.)+/gi, cs = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, ti = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, Tr = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, ds = /[+-]=-?[.\d]+/, _s = /[^,'"\[\]\s]+/gi, Po = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, it, ee, Fr, un, Lt = {}, rr = {}, ps, gs = function(t) {
return (rr = ui(t, Lt)) && Pt;
}, fn = function(t, e) {
return console.warn("Invalid property", t, "set to", e, "Missing plugin? gsap.registerPlugin()");
}, Li = function(t, e) {
return !e && console.warn(t);
}, ms = function(t, e) {
return t && (Lt[t] = e) && rr && (rr[t] = e) || Lt;
}, zi = function() {
return 0;
}, Mo = {
suppressEvents: !0,
isStart: !0,
kill: !1
}, Ki = {
suppressEvents: !0,
kill: !1
}, Eo = {
suppressEvents: !0
}, hn = {}, Ce = [], Xr = {}, ys, Et = {}, br = {}, In = 30, ji = [], cn = "", dn = function(t) {
var e = t[0], i, r;
if (ne(e) || st(e) || (t = [t]), !(i = (e._gsap || {}).harness)) {
for (r = ji.length; r-- && !ji[r].targetTest(e); )
;
i = ji[r];
}
for (r = t.length; r--; )
t[r] && (t[r]._gsap || (t[r]._gsap = new Vs(t[r], i))) || t.splice(r, 1);
return t;
}, Ve = function(t) {
return t._gsap || dn(Wt(t))[0]._gsap;
}, xs = function(t, e, i) {
return (i = t[e]) && st(i) ? t[e]() : an(i) && t.getAttribute && t.getAttribute(e) || i;
}, St = function(t, e) {
return (t = t.split(",")).forEach(e) || t;
}, lt = function(t) {
return Math.round(t * 1e5) / 1e5 || 0;
}, ct = function(t) {
return Math.round(t * 1e7) / 1e7 || 0;
}, ii = function(t, e) {
var i = e.charAt(0), r = parseFloat(e.substr(2));
return t = parseFloat(t), i === "+" ? t + r : i === "-" ? t - r : i === "*" ? t * r : t / r;
}, Oo = function(t, e) {
for (var i = e.length, r = 0; t.indexOf(e[r]) < 0 && ++r < i; )
;
return r < i;
}, nr = function() {
var t = Ce.length, e = Ce.slice(0), i, r;
for (Xr = {}, Ce.length = 0, i = 0; i < t; i++)
r = e[i], r && r._lazy && (r.render(r._lazy[0], r._lazy[1], !0)._lazy = 0);
}, _n = function(t) {
return !!(t._initted || t._startAt || t.add);
}, vs = function(t, e, i, r) {
Ce.length && !xt && nr(), t.render(e, i, r || !!(xt && e < 0 && _n(t))), Ce.length && !xt && nr();
}, ws = function(t) {
var e = parseFloat(t);
return (e || e === 0) && (t + "").match(_s).length < 2 ? e : gt(t) ? t.trim() : t;
}, As = function(t) {
return t;
}, zt = function(t, e) {
for (var i in e)
i in t || (t[i] = e[i]);
return t;
}, ko = function(t) {
return function(e, i) {
for (var r in i)
r in e || r === "duration" && t || r === "ease" || (e[r] = i[r]);
};
}, ui = function(t, e) {
for (var i in e)
t[i] = e[i];
return t;
}, Ln = function l(t, e) {
for (var i in e)
i !== "__proto__" && i !== "constructor" && i !== "prototype" && (t[i] = ne(e[i]) ? l(t[i] || (t[i] = {}), e[i]) : e[i]);
return t;
}, sr = function(t, e) {
var i = {}, r;
for (r in t)
r in e || (i[r] = t[r]);
return i;
}, Mi = function(t) {
var e = t.parent || it, i = t.keyframes ? ko(At(t.keyframes)) : zt;
if (bt(t.inherit))
for (; e; )
i(t, e.vars.defaults), e = e.parent || e._dp;
return t;
}, Ro = function(t, e) {
for (var i = t.length, r = i === e.length; r && i-- && t[i] === e[i]; )
;
return i < 0;
}, Ts = function(t, e, i, r, n) {
i === void 0 && (i = "_first"), r === void 0 && (r = "_last");
var s = t[r], o;
if (n)
for (o = e[n]; s && s[n] > o; )
s = s._prev;
return s ? (e._next = s._next, s._next = e) : (e._next = t[i], t[i] = e), e._next ? e._next._prev = e : t[r] = e, e._prev = s, e.parent = e._dp = t, e;
}, cr = function(t, e, i, r) {
i === void 0 && (i = "_first"), r === void 0 && (r = "_last");
var n = e._prev, s = e._next;
n ? n._next = s : t[i] === e && (t[i] = s), s ? s._prev = n : t[r] === e && (t[r] = n), e._next = e._prev = e.parent = null;
}, Pe = function(t, e) {
t.parent && (!e || t.parent.autoRemoveChildren) && t.parent.remove && t.parent.remove(t), t._act = 0;
}, Ue = function(t, e) {
if (t && (!e || e._end > t._dur || e._start < 0))
for (var i = t; i; )
i._dirty = 1, i = i.parent;
return t;
}, Io = function(t) {
for (var e = t.parent; e && e.parent; )
e._dirty = 1, e.totalDuration(), e = e.parent;
return t;
}, Vr = function(t, e, i, r) {
return t._startAt && (xt ? t._startAt.revert(Ki) : t.vars.immediateRender && !t.vars.autoRevert || t._startAt.render(e, !0, r));
}, Lo = function l(t) {
return !t || t._ts && l(t.parent);
}, zn = function(t) {
return t._repeat ? fi(t._tTime, t = t.duration() + t._rDelay) * t : 0;
}, fi = function(t, e) {
var i = Math.floor(t = ct(t / e));
return t && i === t ? i - 1 : i;
}, or = function(t, e) {
return (t - e._start) * e._ts + (e._ts >= 0 ? 0 : e._dirty ? e.totalDuration() : e._tDur);
}, dr = function(t) {
return t._end = ct(t._start + (t._tDur / Math.abs(t._ts || t._rts || tt) || 0));
}, _r = function(t, e) {
var i = t._dp;
return i && i.smoothChildTiming && t._ts && (t._start = ct(i._time - (t._ts > 0 ? e / t._ts : ((t._dirty ? t.totalDuration() : t._tDur) - e) / -t._ts)), dr(t), i._dirty || Ue(i, t)), t;
}, bs = function(t, e) {
var i;
if ((e._time || !e._dur && e._initted || e._start < t._time && (e._dur || !e.add)) && (i = or(t.rawTime(), e), (!e._dur || Gi(0, e.totalDuration(), i) - e._tTime > tt) && e.render(i, !0)), Ue(t, e)._dp && t._initted && t._time >= t._dur && t._ts) {
if (t._dur < t.duration())
for (i = t; i._dp; )
i.rawTime() >= 0 && i.totalTime(i._tTime), i = i._dp;
t._zTime = -tt;
}
}, ie = function(t, e, i, r) {
return e.parent && Pe(e), e._start = ct((ce(i) ? i : i || t !== it ? Ut(t, i, e) : t._time) + e._delay), e._end = ct(e._start + (e.totalDuration() / Math.abs(e.timeScale()) || 0)), Ts(t, e, "_first", "_last", t._sort ? "_start" : 0), Ur(e) || (t._recent = e), r || bs(t, e), t._ts < 0 && _r(t, t._tTime), t;
}, Ss = function(t, e) {
return (Lt.ScrollTrigger || fn("scrollTrigger", e)) && Lt.ScrollTrigger.create(e, t);
}, Cs = function(t, e, i, r, n) {
if (gn(t, e, n), !t._initted)
return 1;
if (!i && t._pt && !xt && (t._dur && t.vars.lazy !== !1 || !t._dur && t.vars.lazy) && ys !== Ot.frame)
return Ce.push(t), t._lazy = [n, r], 1;
}, zo = function l(t) {
var e = t.parent;
return e && e._ts && e._initted && !e._lock && (e.rawTime() < 0 || l(e));
}, Ur = function(t) {
var e = t.data;
return e === "isFromStart" || e === "isStart";
}, Yo = function(t, e, i, r) {
var n = t.ratio, s = e < 0 || !e && (!t._start && zo(t) && !(!t._initted && Ur(t)) || (t._ts < 0 || t._dp._ts < 0) && !Ur(t)) ? 0 : 1, o = t._rDelay, f = 0, u, h, c;
if (o && t._repeat && (f = Gi(0, t._tDur, e), h = fi(f, o), t._yoyo && h & 1 && (s = 1 - s), h !== fi(t._tTime, o) && (n = 1 - s, t.vars.repeatRefresh && t._initted && t.invalidate())), s !== n || xt || r || t._zTime === tt || !e && t._zTime) {
if (!t._initted && Cs(t, e, r, i, f))
return;
for (c = t._zTime, t._zTime = e || (i ? tt : 0), i || (i = e && !c), t.ratio = s, t._from && (s = 1 - s), t._time = 0, t._tTime = f, u = t._pt; u; )
u.r(s, u.d), u = u._next;
e < 0 && Vr(t, e, i, !0), t._onUpdate && !i && Rt(t, "onUpdate"), f && t._repeat && !i && t.parent && Rt(t, "onRepeat"), (e >= t._tDur || e < 0) && t.ratio === s && (s && Pe(t, 1), !i && !xt && (Rt(t, s ? "onComplete" : "onReverseComplete", !0), t._prom && t._prom()));
} else
t._zTime || (t._zTime = e);
}, Bo = function(t, e, i) {
var r;
if (i > e)
for (r = t._first; r && r._start <= i; ) {
if (r.data === "isPause" && r._start > e)
return r;
r = r._next;
}
else
for (r = t._last; r && r._start >= i; ) {
if (r.data === "isPause" && r._start < e)
return r;
r = r._prev;
}
}, hi = function(t, e, i, r) {
var n = t._repeat, s = ct(e) || 0, o = t._tTime / t._tDur;
return o && !r && (t._time *= s / t._dur), t._dur = s, t._tDur = n ? n < 0 ? 1e10 : ct(s * (n + 1) + t._rDelay * n) : s, o > 0 && !r && _r(t, t._tTime = t._tDur * o), t.parent && dr(t), i || Ue(t.parent, t), t;
}, Yn = function(t) {
return t instanceof Tt ? Ue(t) : hi(t, t._dur);
}, No = {
_start: 0,
endTime: zi,
totalDuration: zi
}, Ut = function l(t, e, i) {
var r = t.labels, n = t._recent || No, s = t.duration() >= Gt ? n.endTime(!1) : t._dur, o, f, u;
return gt(e) && (isNaN(e) || e in r) ? (f = e.charAt(0), u = e.substr(-1) === "%", o = e.indexOf("="), f === "<" || f === ">" ? (o >= 0 && (e = e.replace(/=/, "")), (f === "<" ? n._start : n.endTime(n._repeat >= 0)) + (parseFloat(e.substr(1)) || 0) * (u ? (o < 0 ? n : i).totalDuration() / 100 : 1)) : o < 0 ? (e in r || (r[e] = s), r[e]) : (f = parseFloat(e.charAt(o - 1) + e.substr(o + 1)), u && i && (f = f / 100 * (At(i) ? i[0] : i).totalDuration()), o > 1 ? l(t, e.substr(0, o - 1), i) + f : s + f)) : e == null ? s : +e;
}, Ei = function(t, e, i) {
var r = ce(e[1]), n = (r ? 2 : 1) + (t < 2 ? 0 : 1), s = e[n], o, f;
if (r && (s.duration = e[1]), s.parent = i, t) {
for (o = s, f = i; f && !("immediateRender" in o); )
o = f.vars.defaults || {}, f = bt(f.vars.inherit) && f.parent;
s.immediateRender = bt(o.immediateRender), t < 2 ? s.runBackwards = 1 : s.startAt = e[n - 1];
}
return new ht(e[0], s, e[n + 1]);
}, Ee = function(t, e) {
return t || t === 0 ? e(t) : e;
}, Gi = function(t, e, i) {
return i < t ? t : i > e ? e : i;
}, wt = function(t, e) {
return !gt(t) || !(e = Po.exec(t)) ? "" : e[1];
}, Fo = function(t, e, i) {
return Ee(i, function(r) {
return Gi(t, e, r);
});
}, Gr = [].slice, Ds = function(t, e) {
return t && ne(t) && "length" in t && (!e && !t.length || t.length - 1 in t && ne(t[0])) && !t.nodeType && t !== ee;
}, Xo = function(t, e, i) {
return i === void 0 && (i = []), t.forEach(function(r) {
var n;
return gt(r) && !e || Ds(r, 1) ? (n = i).push.apply(n, Wt(r)) : i.push(r);
}) || i;
}, Wt = function(t, e, i) {
return et && !e && et.selector ? et.selector(t) : gt(t) && !i && (Fr || !ci()) ? Gr.call((e || un).querySelectorAll(t), 0) : At(t) ? Xo(t, i) : Ds(t) ? Gr.call(t, 0) : t ? [t] : [];
}, Wr = function(t) {
return t = Wt(t)[0] || Li("Invalid scope") || {}, function(e) {
var i = t.current || t.nativeElement || t;
return Wt(e, i.querySelectorAll ? i : i === t ? Li("Invalid scope") || un.createElement("div") : t);
};
}, Ps = function(t) {
return t.sort(function() {
return 0.5 - Math.random();
});
}, Ms = function(t) {
if (st(t))
return t;
var e = ne(t) ? t : {
each: t
}, i = Ge(e.ease), r = e.from || 0, n = parseFloat(e.base) || 0, s = {}, o = r > 0 && r < 1, f = isNaN(r) || o, u = e.axis, h = r, c = r;
return gt(r) ? h = c = {
center: 0.5,
edges: 0.5,
end: 1
}[r] || 0 : !o && f && (h = r[0], c = r[1]), function(_, a, g) {
var d = (g || e).length, m = s[d], v, A, D, P, x, M, b, w, S;
if (!m) {
if (S = e.grid === "auto" ? 0 : (e.grid || [1, Gt])[1], !S) {
for (b = -Gt; b < (b = g[S++].getBoundingClientRect().left) && S < d; )
;
S < d && S--;
}
for (m = s[d] = [], v = f ? Math.min(S, d) * h - 0.5 : r % S, A = S === Gt ? 0 : f ? d * c / S - 0.5 : r / S | 0, b = 0, w = Gt, M = 0; M < d; M++)
D = M % S - v, P = A - (M / S | 0), m[M] = x = u ? Math.abs(u === "y" ? P : D) : fs(D * D + P * P), x > b && (b = x), x < w && (w = x);
r === "random" && Ps(m), m.max = b - w, m.min = w, m.v = d = (parseFloat(e.amount) || parseFloat(e.each) * (S > d ? d - 1 : u ? u === "y" ? d / S : S : Math.max(S, d / S)) || 0) * (r === "edges" ? -1 : 1), m.b = d < 0 ? n - d : n, m.u = wt(e.amount || e.each) || 0, i = i && d < 0 ? Ns(i) : i;
}
return d = (m[_] - m.min) / m.max || 0, ct(m.b + (i ? i(d) : d) * m.v) + m.u;
};
}, Qr = function(t) {
var e = Math.pow(10, ((t + "").split(".")[1] || "").length);
return function(i) {
var r = ct(Math.round(parseFloat(i) / t) * t * e);
return (r - r % 1) / e + (ce(i) ? 0 : wt(i));
};
}, Es = function(t, e) {
var i = At(t), r, n;
return !i && ne(t) && (r = i = t.radius || Gt, t.values ? (t = Wt(t.values), (n = !ce(t[0])) && (r *= r)) : t = Qr(t.increment)), Ee(e, i ? st(t) ? function(s) {
return n = t(s), Math.abs(n - s) <= r ? n : s;
} : function(s) {
for (var o = parseFloat(n ? s.x : s), f = parseFloat(n ? s.y : 0), u = Gt, h = 0, c = t.length, _, a; c--; )
n ? (_ = t[c].x - o, a = t[c].y - f, _ = _ * _ + a * a) : _ = Math.abs(t[c] - o), _ < u && (u = _, h = c);
return h = !r || u <= r ? t[h] : s, n || h === s || ce(s) ? h : h + wt(s);
} : Qr(t));
}, Os = function(t, e, i, r) {
return Ee(At(t) ? !e : i === !0 ? !!(i = 0) : !r, function() {
return At(t) ? t[~~(Math.random() * t.length)] : (i = i || 1e-5) && (r = i < 1 ? Math.pow(10, (i + "").length - 2) : 1) && Math.floor(Math.round((t - i / 2 + Math.random() * (e - t + i * 0.99)) / i) * i * r) / r;
});
}, Vo = function() {
for (var t = arguments.length, e = new Array(t), i = 0; i < t; i++)
e[i] = arguments[i];
return function(r) {
return e.reduce(function(n, s) {
return s(n);
}, r);
};
}, Uo = function(t, e) {
return function(i) {
return t(parseFloat(i)) + (e || wt(i));
};
}, Go = function(t, e, i) {
return Rs(t, e, 0, 1, i);
}, ks = function(t, e, i) {
return Ee(i, function(r) {
return t[~~e(r)];
});
}, Wo = function l(t, e, i) {
var r = e - t;
return At(t) ? ks(t, l(0, t.length), e) : Ee(i, function(n) {
return (r + (n - t) % r) % r + t;
});
}, Qo = function l(t, e, i) {
var r = e - t, n = r * 2;
return At(t) ? ks(t, l(0, t.length - 1), e) : Ee(i, function(s) {
return s = (n + (s - t) % n) % n || 0, t + (s > r ? n - s : s);
});
}, Yi = function(t) {
for (var e = 0, i = "", r, n, s, o; ~(r = t.indexOf("random(", e)); )
s = t.indexOf(")", r), o = t.charAt(r + 7) === "[", n = t.substr(r + 7, s - r - 7).match(o ? _s : Nr), i += t.substr(e, r - e) + Os(o ? n : +n[0], o ? 0 : +n[1], +n[2] || 1e-5), e = s + 1;
return i + t.substr(e, t.length - e);
}, Rs = function(t, e, i, r, n) {
var s = e - t, o = r - i;
return Ee(n, function(f) {
return i + ((f - t) / s * o || 0);
});
}, qo = function l(t, e, i, r) {
var n = isNaN(t + e) ? 0 : function(a) {
return (1 - a) * t + a * e;
};
if (!n) {
var s = gt(t), o = {}, f, u, h, c, _;
if (i === !0 && (r = 1) && (i = null), s)
t = {
p: t
}, e = {
p: e
};
else if (At(t) && !At(e)) {
for (h = [], c = t.length, _ = c - 2, u = 1; u < c; u++)
h.push(l(t[u - 1], t[u]));
c--, n = function(g) {
g *= c;
var d = Math.min(_, ~~g);
return h[d](g - d);
}, i = e;
} else
r || (t = ui(At(t) ? [] : {}, t));
if (!h) {
for (f in e)
pn.call(o, t, f, "get", e[f]);
n = function(g) {
return xn(g, o) || (s ? t.p : t);
};
}
}
return Ee(i, n);
}, Bn = function(t, e, i) {
var r = t.labels, n = Gt, s, o, f;
for (s in r)
o = r[s] - e, o < 0 == !!i && o && n > (o = Math.abs(o)) && (f = s, n = o);
return f;
}, Rt = function(t, e, i) {
var r = t.vars, n = r[e], s = et, o = t._ctx, f, u, h;
if (n)
return f = r[e + "Params"], u = r.callbackScope || t, i && Ce.length && nr(), o && (et = o), h = f ? n.apply(u, f) : n.call(u), et = s, h;
}, Ti = function(t) {
return Pe(t), t.scrollTrigger && t.scrollTrigger.kill(!!xt), t.progress() < 1 && Rt(t, "onInterrupt"), t;
}, ei, Is = [], Ls = function(t) {
if (t)
if (t = !t.name && t.default || t, ln() || t.headless) {
var e = t.name, i = st(t), r = e && !i && t.init ? function() {
this._props = [];
} : t, n = {
init: zi,
render: xn,
add: pn,
kill: ua,
modifier: la,
rawVars: 0
}, s = {
targetTest: 0,
get: 0,
getSetter: yn,
aliases: {},
register: 0
};
if (ci(), t !== r) {
if (Et[e])
return;
zt(r, zt(sr(t, n), s)), ui(r.prototype, ui(n, sr(t, s))), Et[r.prop = e] = r, t.targetTest && (ji.push(r), hn[e] = 1), e = (e === "css" ? "CSS" : e.charAt(0).toUpperCase() + e.substr(1)) + "Plugin";
}
ms(e, r), t.register && t.register(Pt, r, Ct);
} else
Is.push(t);
}, j = 255, bi = {
aqua: [0, j, j],
lime: [0, j, 0],
silver: [192, 192, 192],
black: [0, 0, 0],
maroon: [128, 0, 0],
teal: [0, 128, 128],
blue: [0, 0, j],
navy: [0, 0, 128],
white: [j, j, j],
olive: [128, 128, 0],
yellow: [j, j, 0],
orange: [j, 165, 0],
gray: [128, 128, 128],
purple: [128, 0, 128],
green: [0, 128, 0],
red: [j, 0, 0],
pink: [j, 192, 203],
cyan: [0, j, j],
transparent: [j, j, j, 0]
}, Sr = function(t, e, i) {
return t += t < 0 ? 1 : t > 1 ? -1 : 0, (t * 6 < 1 ? e + (i - e) * t * 6 : t < 0.5 ? i : t * 3 < 2 ? e + (i - e) * (2 / 3 - t) * 6 : e) * j + 0.5 | 0;
}, zs = function(t, e, i) {
var r = t ? ce(t) ? [t >> 16, t >> 8 & j, t & j] : 0 : bi.black, n, s, o, f, u, h, c, _, a, g;
if (!r) {
if (t.substr(-1) === "," && (t = t.substr(0, t.length - 1)), bi[t])
r = bi[t];
else if (t.charAt(0) === "#") {
if (t.length < 6 && (n = t.charAt(1), s = t.charAt(2), o = t.charAt(3), t = "#" + n + n + s + s + o + o + (t.length === 5 ? t.charAt(4) + t.charAt(4) : "")), t.length === 9)
return r = parseInt(t.substr(1, 6), 16), [r >> 16, r >> 8 & j, r & j, parseInt(t.substr(7), 16) / 255];
t = parseInt(t.substr(1), 16), r = [t >> 16, t >> 8 & j, t & j];
} else if (t.substr(0, 3) === "hsl") {
if (r = g = t.match(Nr), !e)
f = +r[0] % 360 / 360, u = +r[1] / 100, h = +r[2] / 100, s = h <= 0.5 ? h * (u + 1) : h + u - h * u, n = h * 2 - s, r.length > 3 && (r[3] *= 1), r[0] = Sr(f + 1 / 3, n, s), r[1] = Sr(f, n, s), r[2] = Sr(f - 1 / 3, n, s);
else if (~t.indexOf("="))
return r = t.match(cs), i && r.length < 4 && (r[3] = 1), r;
} else
r = t.match(Nr) || bi.transparent;
r = r.map(Number);
}
return e && !g && (n = r[0] / j, s = r[1] / j, o = r[2] / j, c = Math.max(n, s, o), _ = Math.min(n, s, o), h = (c + _) / 2, c === _ ? f = u = 0 : (a = c - _, u = h > 0.5 ? a / (2 - c - _) : a / (c + _), f = c === n ? (s - o) / a + (s < o ? 6 : 0) : c === s ? (o - n) / a + 2 : (n - s) / a + 4, f *= 60), r[0] = ~~(f + 0.5), r[1] = ~~(u * 100 + 0.5), r[2] = ~~(h * 100 + 0.5)), i && r.length < 4 && (r[3] = 1), r;
}, Ys = function(t) {
var e = [], i = [], r = -1;
return t.split(De).forEach(function(n) {
var s = n.match(ti) || [];
e.push.apply(e, s), i.push(r += s.length + 1);
}), e.c = i, e;
}, Nn = function(t, e, i) {
var r = "", n = (t + r).match(De), s = e ? "hsla(" : "rgba(", o = 0, f, u, h, c;
if (!n)
return t;
if (n = n.map(function(_) {
return (_ = zs(_, e, 1)) && s + (e ? _[0] + "," + _[1] + "%," + _[2] + "%," + _[3] : _.join(",")) + ")";
}), i && (h = Ys(t), f = i.c, f.join(r) !== h.c.join(r)))
for (u = t.replace(De, "1").split(ti), c = u.length - 1; o < c; o++)
r += u[o] + (~f.indexOf(o) ? n.shift() || s + "0,0,0,0)" : (h.length ? h : n.length ? n : i).shift());
if (!u)
for (u = t.split(De), c = u.length - 1; o < c; o++)
r += u[o] + n[o];
return r + u[c];
}, De = function() {
var l = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b", t;
for (t in bi)
l += "|" + t + "\\b";
return new RegExp(l + ")", "gi");
}(), $o = /hsl[a]?\(/, Bs = function(t) {
var e = t.join(" "), i;
if (De.lastIndex = 0, De.test(e))
return i = $o.test(e), t[1] = Nn(t[1], i), t[0] = Nn(t[0], i, Ys(t[1])), !0;
}, Bi, Ot = function() {
var l = Date.now, t = 500, e = 33, i = l(), r = i, n = 1e3 / 240, s = n, o = [], f, u, h, c, _, a, g = function d(m) {
var v = l() - r, A = m === !0, D, P, x, M;
if ((v > t || v < 0) && (i += v - e), r += v, x = r - i, D = x - s, (D > 0 || A) && (M = ++c.frame, _ = x - c.time * 1e3, c.time = x = x / 1e3, s += D + (D >= n ? 4 : n - D), P = 1), A || (f = u(d)), P)
for (a = 0; a < o.length; a++)
o[a](x, _, M, m);
};
return c = {
time: 0,
frame: 0,
tick: function() {
g(!0);
},
deltaRatio: function(m) {
return _ / (1e3 / (m || 60));
},
wake: function() {
ps && (!Fr && ln() && (ee = Fr = window, un = ee.document || {}, Lt.gsap = Pt, (ee.gsapVersions || (ee.gsapVersions = [])).push(Pt.version), gs(rr || ee.GreenSockGlobals || !ee.gsap && ee || {}), Is.forEach(Ls)), h = typeof requestAnimationFrame < "u" && requestAnimationFrame, f && c.sleep(), u = h || function(m) {
return setTimeout(m, s - c.time * 1e3 + 1 | 0);
}, Bi = 1, g(2));
},
sleep: function() {
(h ? cancelAnimationFrame : clearTimeout)(f), Bi = 0, u = zi;
},
lagSmoothing: function(m, v) {
t = m || 1 / 0, e = Math.min(v || 33, t);
},
fps: function(m) {
n = 1e3 / (m || 240), s = c.time * 1e3 + n;
},
add: function(m, v, A) {
var D = v ? function(P, x, M, b) {
m(P, x, M, b), c.remove(D);
} : m;
return c.remove(m), o[A ? "unshift" : "push"](D), ci(), D;
},
remove: function(m, v) {
~(v = o.indexOf(m)) && o.splice(v, 1) && a >= v && a--;
},
_listeners: o
}, c;
}(), ci = function() {
return !Bi && Ot.wake();
}, V = {}, Zo = /^[\d.\-M][\d.\-,\s]/, Ho = /["']/g, Ko = function(t) {
for (var e = {}, i = t.substr(1, t.length - 3).split(":"), r = i[0], n = 1, s = i.length, o, f, u; n < s; n++)
f = i[n], o = n !== s - 1 ? f.lastIndexOf(",") : f.length, u = f.substr(0, o), e[r] = isNaN(u) ? u.replace(Ho, "").trim() : +u, r = f.substr(o + 1).trim();
return e;
}, jo = function(t) {
var e = t.indexOf("(") + 1, i = t.indexOf(")"), r = t.indexOf("(", e);
return t.substring(e, ~r && r < i ? t.indexOf(")", i + 1) : i);
}, Jo = function(t) {
var e = (t + "").split("("), i = V[e[0]];
return i && e.length > 1 && i.config ? i.config.apply(null, ~t.indexOf("{") ? [Ko(e[1])] : jo(t).split(",").map(ws)) : V._CE && Zo.test(t) ? V._CE("", t) : i;
}, Ns = function(t) {
return function(e) {
return 1 - t(1 - e);
};
}, Fs = function l(t, e) {
for (var i = t._first, r; i; )
i instanceof Tt ? l(i, e) : i.vars.yoyoEase && (!i._yoyo || !i._repeat) && i._yoyo !== e && (i.timeline ? l(i.timeline, e) : (r = i._ease, i._ease = i._yEase, i._yEase = r, i._yoyo = e)), i = i._next;
}, Ge = function(t, e) {
return t && (st(t) ? t : V[t] || Jo(t)) || e;
}, He = function(t, e, i, r) {
i === void 0 && (i = function(f) {
return 1 - e(1 - f);
}), r === void 0 && (r = function(f) {
return f < 0.5 ? e(f * 2) / 2 : 1 - e((1 - f) * 2) / 2;
});
var n = {
easeIn: e,
easeOut: i,
easeInOut: r
}, s;
return St(t, function(o) {
V[o] = Lt[o] = n, V[s = o.toLowerCase()] = i;
for (var f in n)
V[s + (f === "easeIn" ? ".in" : f === "easeOut" ? ".out" : ".inOut")] = V[o + "." + f] = n[f];
}), n;
}, Xs = function(t) {
return function(e) {
return e < 0.5 ? (1 - t(1 - e * 2)) / 2 : 0.5 + t((e - 0.5) * 2) / 2;
};
}, Cr = function l(t, e, i) {
var r = e >= 1 ? e : 1, n = (i || (t ? 0.3 : 0.45)) / (e < 1 ? e : 1), s = n / Br * (Math.asin(1 / r) || 0), o = function(h) {
return h === 1 ? 1 : r * Math.pow(2, -10 * h) * Do((h - s) * n) + 1;
}, f = t === "out" ? o : t === "in" ? function(u) {
return 1 - o(1 - u);
} : Xs(o);
return n = Br / n, f.config = function(u, h) {
return l(t, u, h);
}, f;
}, Dr = function l(t, e) {
e === void 0 && (e = 1.70158);
var i = function(s) {
return s ? --s * s * ((e + 1) * s + e) + 1 : 0;
}, r = t === "out" ? i : t === "in" ? function(n) {
return 1 - i(1 - n);
} : Xs(i);
return r.config = function(n) {
return l(t, n);
}, r;
};
St("Linear,Quad,Cubic,Quart,Quint,Strong", function(l, t) {
var e = t < 5 ? t + 1 : t;
He(l + ",Power" + (e - 1), t ? function(i) {
return Math.pow(i, e);
} : function(i) {
return i;
}, function(i) {
return 1 - Math.pow(1 - i, e);
}, function(i) {
return i < 0.5 ? Math.pow(i * 2, e) / 2 : 1 - Math.pow((1 - i) * 2, e) / 2;
});
});
V.Linear.easeNone = V.none = V.Linear.easeIn;
He("Elastic", Cr("in"), Cr("out"), Cr());
(function(l, t) {
var e = 1 / t, i = 2 * e, r = 2.5 * e, n = function(o) {
return o < e ? l * o * o : o < i ? l * Math.pow(o - 1.5 / t, 2) + 0.75 : o < r ? l * (o -= 2.25 / t) * o + 0.9375 : l * Math.pow(o - 2.625 / t, 2) + 0.984375;
};
He("Bounce", function(s) {
return 1 - n(1 - s);
}, n);
})(7.5625, 2.75);
He("Expo", function(l) {
return Math.pow(2, 10 * (l - 1)) * l + l * l * l * l * l * l * (1 - l);
});
He("Circ", function(l) {
return -(fs(1 - l * l) - 1);
});
He("Sine", function(l) {
return l === 1 ? 1 : -Co(l * bo) + 1;
});
He("Back", Dr("in"), Dr("out"), Dr());
V.SteppedEase = V.steps = Lt.SteppedEase = {
config: function(t, e) {
t === void 0 && (t = 1);
var i = 1 / t, r = t + (e ? 0 : 1), n = e ? 1 : 0, s = 1 - tt;
return function(o) {
return ((r * Gi(0, s, o) | 0) + n) * i;
};
}
};
li.ease = V["quad.out"];
St("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", function(l) {
return cn += l + "," + l + "Params,";
});
var Vs = function(t, e) {
this.id = So++, t._gsap = this, this.target = t, this.harness = e, this.get = e ? e.get : xs, this.set = e ? e.getSetter : yn;
}, Ni = /* @__PURE__ */ function() {
function l(e) {
this.vars = e, this._delay = +e.delay || 0, (this._repeat = e.repeat === 1 / 0 ? -2 : e.repeat || 0) && (this._rDelay = e.repeatDelay || 0, this._yoyo = !!e.yoyo || !!e.yoyoEase), this._ts = 1, hi(this, +e.duration, 1, 1), this.data = e.data, et && (this._ctx = et, et.data.push(this)), Bi || Ot.wake();
}
var t = l.prototype;
return t.delay = function(i) {
return i || i === 0 ? (this.parent && this.parent.smoothChildTiming && this.startTime(this._start + i - this._delay), this._delay = i, this) : this._delay;
}, t.duration = function(i) {
return arguments.length ? this.totalDuration(this._repeat > 0 ? i + (i + this._rDelay) * this._repeat : i) : this.totalDuration() && this._dur;
}, t.totalDuration = function(i) {
return arguments.length ? (this._dirty = 0, hi(this, this._repeat < 0 ? i : (i - this._repeat * this._rDelay) / (this._repeat + 1))) : this._tDur;
}, t.totalTime = function(i, r) {
if (ci(), !arguments.length)
return this._tTime;
var n = this._dp;
if (n && n.smoothChildTiming && this._ts) {
for (_r(this, i), !n._dp || n.parent || bs(n, this); n && n.parent; )
n.parent._time !== n._start + (n._ts >= 0 ? n._tTime / n._ts : (n.totalDuration() - n._tTime) / -n._ts) && n.totalTime(n._tTime, !0), n = n.parent;
!this.parent && this._dp.autoRemoveChildren && (this._ts > 0 && i < this._tDur || this._ts < 0 && i > 0 || !this._tDur && !i) && ie(this._dp, this, this._start - this._delay);
}
return (this._tTime !== i || !this._dur && !r || this._initted && Math.abs(this._zTime) === tt || !i && !this._initted && (this.add || this._ptLookup)) && (this._ts || (this._pTime = i), vs(this, i, r)), this;
}, t.time = function(i, r) {
return arguments.length ? this.totalTime(Math.min(this.totalDuration(), i + zn(this)) % (this._dur + this._rDelay) || (i ? this._dur : 0), r) : this._time;
}, t.totalProgress = function(i, r) {
return arguments.length ? this.totalTime(this.totalDuration() * i, r) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.rawTime() >= 0 && this._initted ? 1 : 0;
}, t.progress = function(i, r) {
return arguments.length ? this.totalTime(this.duration() * (this._yoyo && !(this.iteration() & 1) ? 1 - i : i) + zn(this), r) : this.duration() ? Math.min(1, this._time / this._dur) : this.rawTime() > 0 ? 1 : 0;
}, t.iteration = function(i, r) {
var n = this.duration() + this._rDelay;
return arguments.length ? this.totalTime(this._time + (i - 1) * n, r) : this._repeat ? fi(this._tTime, n) + 1 : 1;
}, t.timeScale = function(i, r) {
if (!arguments.length)
return this._rts === -tt ? 0 : this._rts;
if (this._rts === i)
return this;
var n = this.parent && this._ts ? or(this.parent._time, this) : this._tTime;
return this._rts = +i || 0, this._ts = this._ps || i === -tt ? 0 : this._rts, this.totalTime(Gi(-Math.abs(this._delay), this.totalDuration(), n), r !== !1), dr(this), Io(this);
}, t.paused = function(i) {
return arguments.length ? (this._ps !== i && (this._ps = i, i ? (this._pTime = this._tTime || Math.max(-this._delay, this.rawTime()), this._ts = this._act = 0) : (ci(), this._ts = this._rts, this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, this.progress() === 1 && Math.abs(this._zTime) !== tt && (this._tTime -= tt)))), this) : this._ps;
}, t.startTime = function(i) {
if (arguments.length) {
this._start = i;
var r = this.parent || this._dp;
return r && (r._sort || !this.parent) && ie(r, this, i - this._delay), this;
}
return this._start;
}, t.endTime = function(i) {
return this._start + (bt(i) ? this.totalDuration() : this.duration()) / Math.abs(this._ts || 1);
}, t.rawTime = function(i) {
var r = this.parent || this._dp;
return r ? i && (!this._ts || this._repeat && this._time && this.totalProgress() < 1) ? this._tTime % (this._dur + this._rDelay) : this._ts ? or(r.rawTime(i), this) : this._tTime : this._tTime;
}, t.revert = function(i) {
i === void 0 && (i = Eo);
var r = xt;
return xt = i, _n(this) && (this.timeline && this.timeline.revert(i), this.totalTime(-0.01, i.suppressEvents)), this.data !== "nested" && i.kill !== !1 && this.kill(), xt = r, this;
}, t.globalTime = function(i) {
for (var r = this, n = arguments.length ? i : r.rawTime(); r; )
n = r._start + n / (Math.abs(r._ts) || 1), r = r._dp;
return !this.parent && this._sat ? this._sat.globalTime(i) : n;
}, t.repeat = function(i) {
return arguments.length ? (this._repeat = i === 1 / 0 ? -2 : i, Yn(this)) : this._repeat === -2 ? 1 / 0 : this._repeat;
}, t.repeatDelay = function(i) {
if (arguments.length) {
var r = this._time;
return this._rDelay = i, Yn(this), r ? this.time(r) : this;
}
return this._rDelay;
}, t.yoyo = function(i) {
return arguments.length ? (this._yoyo = i, this) : this._yoyo;
}, t.seek = function(i, r) {
return this.totalTime(Ut(this, i), bt(r));
}, t.restart = function(i, r) {
return this.play().totalTime(i ? -this._delay : 0, bt(r)), this._dur || (this._zTime = -tt), this;
}, t.play = function(i, r) {
return i != null && this.seek(i, r), this.reversed(!1).paused(!1);
}, t.reverse = function(i, r) {
return i != null && this.seek(i || this.totalDuration(), r), this.reversed(!0).paused(!1);
}, t.pause = function(i, r) {
return i != null && this.seek(i, r), this.paused(!0);
}, t.resume = function() {
return this.paused(!1);
}, t.reversed = function(i) {
return arguments.length ? (!!i !== this.reversed() && this.timeScale(-this._rts || (i ? -tt : 0)), this) : this._rts < 0;
}, t.invalidate = function() {
return this._initted = this._act = 0, this._zTime = -tt, this;
}, t.isActive = function() {
var i = this.parent || this._dp, r = this._start, n;
return !!(!i || this._ts && this._initted && i.isActive() && (n = i.rawTime(!0)) >= r && n < this.endTime(!0) - tt);
}, t.eventCallback = function(i, r, n) {
var s = this.vars;
return arguments.length > 1 ? (r ? (s[i] = r, n && (s[i + "Params"] = n), i === "onUpdate" && (this._onUpdate = r)) : delete s[i], this) : s[i];
}, t.then = function(i) {
var r = this;
return new Promise(function(n) {
var s = st(i) ? i : As, o = function() {
var u = r.then;
r.then = null, st(s) && (s = s(r)) && (s.then || s === r) && (r.then = u), n(s), r.then = u;
};
r._initted && r.totalProgress() === 1 && r._ts >= 0 || !r._tTime && r._ts < 0 ? o() : r._prom = o;
});
}, t.kill = function() {
Ti(this);
}, l;
}();
zt(Ni.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: -tt,
_prom: 0,
_ps: !1,
_rts: 1
});
var Tt = /* @__PURE__ */ function(l) {
us(t, l);
function t(i, r) {
var n;
return i === void 0 && (i = {}), n = l.call(this, i) || this, n.labels = {}, n.smoothChildTiming = !!i.smoothChildTiming, n.autoRemoveChildren = !!i.autoRemoveChildren, n._sort = bt(i.sortChildren), it && ie(i.parent || it, ae(n), r), i.reversed && n.reverse(), i.paused && n.paused(!0), i.scrollTrigger && Ss(ae(n), i.scrollTrigger), n;
}
var e = t.prototype;
return e.to = function(r, n, s) {
return Ei(0, arguments, this), this;
}, e.from = function(r, n, s) {
return Ei(1, arguments, this), this;
}, e.fromTo = function(r, n, s, o) {
return Ei(2, arguments, this), this;
}, e.set = function(r, n, s) {
return n.duration = 0, n.parent = this, Mi(n).repeatDelay || (n.repeat = 0), n.immediateRender = !!n.immediateRender, new ht(r, n, Ut(this, s), 1), this;
}, e.call = function(r, n, s) {
return ie(this, ht.delayedCall(0, r, n), s);
}, e.staggerTo = function(r, n, s, o, f, u, h) {
return s.duration = n, s.stagger = s.stagger || o, s.onComplete = u, s.onCompleteParams = h, s.parent = this, new ht(r, s, Ut(this, f)), this;
}, e.staggerFrom = function(r, n, s, o, f, u, h) {
return s.runBackwards = 1, Mi(s).immediateRender = bt(s.immediateRender), this.staggerTo(r, n, s, o, f, u, h);
}, e.staggerFromTo = function(r, n, s, o, f, u, h, c) {
return o.startAt = s, Mi(o).immediateRender = bt(o.immediateRender), this.staggerTo(r, n, o, f, u, h, c);
}, e.render = function(r, n, s) {
var o = this._time, f = this._dirty ? this.totalDuration() : this._tDur, u = this._dur, h = r <= 0 ? 0 : ct(r), c = this._zTime < 0 != r < 0 && (this._initted || !u), _, a, g, d, m, v, A, D, P, x, M, b;
if (this !== it && h > f && r >= 0 && (h = f), h !== this._tTime || s || c) {
if (o !== this._time && u && (h += this._time - o, r += this._time - o), _ = h, P = this._start, D = this._ts, v = !D, c && (u || (o = this._zTime), (r || !n) && (this._zTime = r)), this._repeat) {
if (M = this._yoyo, m = u + this._rDelay, this._repeat < -1 && r < 0)
return this.totalTime(m * 100 + r, n, s);
if (_ = ct(h % m), h === f ? (d = this._repeat, _ = u) : (x = ct(h / m), d = ~~x, d && d === x && (_ = u, d--), _ > u && (_ = u)), x = fi(this._tTime, m), !o && this._tTime && x !== d && this._tTime - x * m - this._dur <= 0 && (x = d), M && d & 1 && (_ = u - _, b = 1), d !== x && !this._lock) {
var w = M && x & 1, S = w === (M && d & 1);
if (d < x && (w = !w), o = w ? 0 : h % u ? u : h, this._lock = 1, this.render(o || (b ? 0 : ct(d * m)), n, !u)._lock = 0, this._tTime = h, !n && this.parent && Rt(this, "onRepeat"), this.vars.repeatRefresh && !b && (this.invalidate()._lock = 1), o && o !== this._time || v !== !this._ts || this.vars.onRepeat && !this.parent && !this._act)
return this;
if (u = this._dur, f = this._tDur, S && (this._lock = 2, o = w ? u : -1e-4, this.render(o, !0), this.vars.repeatRefresh && !b && this.invalidate()), this._lock = 0, !this._ts && !v)
return this;
Fs(this, b);
}
}
if (this._hasPause && !this._forcing && this._lock < 2 && (A = Bo(this, ct(o), ct(_)), A && (h -= _ - (_ = A._start))), this._tTime = h, this._time = _, this._act = !D, this._initted || (this._onUpdate = this.vars.onUpdate, this._initted = 1, this._zTime = r, o = 0), !o && h && !n && !x && (Rt(this, "onStart"), this._tTime !== h))
return this;
if (_ >= o && r >= 0)
for (a = this._first; a; ) {
if (g = a._next, (a._act || _ >= a._start) && a._ts && A !== a) {
if (a.parent !== this)
return this.render(r, n, s);
if (a.render(a._ts > 0 ? (_ - a._start) * a._ts : (a._dirty ? a.totalDuration() : a._tDur) + (_ - a._start) * a._ts, n, s), _ !== this._time || !this._ts && !v) {
A = 0, g && (h += this._zTime = -tt);
break;
}
}
a = g;
}
else {
a = this._last;
for (var Y = r < 0 ? r : _; a; ) {
if (g = a._prev, (a._act || Y <= a._end) && a._ts && A !== a) {
if (a.parent !== this)
return this.render(r, n, s);
if (a.render(a._ts > 0 ? (Y - a._start) * a._ts : (a._dirty ? a.totalDuration() : a._tDur) + (Y - a._start) * a._ts, n, s || xt && _n(a)), _ !== this._time || !this._ts && !v) {
A = 0, g && (h += this._zTime = Y ? -tt : tt);
break;
}
}
a = g;
}
}
if (A && !n && (this.pause(), A.render(_ >= o ? 0 : -tt)._zTime = _ >= o ? 1 : -1, this._ts))
return this._start = P, dr(this), this.render(r, n, s);
this._onUpdate && !n && Rt(this, "onUpdate", !0), (h === f && this._tTime >= this.totalDuration() || !h && o) && (P === this._start || Math.abs(D) !== Math.abs(this._ts)) && (this._lock || ((r || !u) && (h === f && this._ts > 0 || !h && this._ts < 0) && Pe(this, 1), !n && !(r < 0 && !o) && (h || o || !f) && (Rt(this, h === f && r >= 0 ? "onComplete" : "onReverseComplete", !0), this._prom && !(h < f && this.timeScale() > 0) && this._prom())));
}
return this;
}, e.add = function(r, n) {
var s = this;
if (ce(n) || (n = Ut(this, n, r)), !(r instanceof Ni)) {
if (At(r))
return r.forEach(function(o) {
return s.add(o, n);
}), this;
if (gt(r))
return this.addLabel(r, n);
if (st(r))
r = ht.delayedCall(0, r);
else
return this;
}
return this !== r ? ie(this, r, n) : this;
}, e.getChildren = function(r, n, s, o) {
r === void 0 && (r = !0), n === void 0 && (n = !0), s === void 0 && (s = !0), o === void 0 && (o = -Gt);
for (var f = [], u = this._first; u; )
u._start >= o && (u instanceof ht ? n && f.push(u) : (s && f.push(u), r && f.push.apply(f, u.getChildren(!0, n, s)))), u = u._next;
return f;
}, e.getById = function(r) {
for (var n = this.getChildren(1, 1, 1), s = n.length; s--; )
if (n[s].vars.id === r)
return n[s];
}, e.remove = function(r) {
return gt(r) ? this.removeLabel(r) : st(r) ? this.killTweensOf(r) : (r.parent === this && cr(this, r), r === this._recent && (this._recent = this._last), Ue(this));
}, e.totalTime = function(r, n) {
return arguments.length ? (this._forcing = 1, !this._dp && this._ts && (this._start = ct(Ot.time - (this._ts > 0 ? r / this._ts : (this.totalDuration() - r) / -this._ts))), l.prototype.totalTime.call(this, r, n), this._forcing = 0, this) : this._tTime;
}, e.addLabel = function(r, n) {
return this.labels[r] = Ut(this, n), this;
}, e.removeLabel = function(r) {
return delete this.labels[r], this;
}, e.addPause = function(r, n, s) {
var o = ht.delayedCall(0, n || zi, s);
return o.data = "isPause", this._hasPause = 1, ie(this, o, Ut(this, r));
}, e.removePause = function(r) {
var n = this._first;
for (r = Ut(this, r); n; )
n._start === r && n.data === "isPause" && Pe(n), n = n._next;
}, e.killTweensOf = function(r, n, s) {
for (var o = this.getTweensOf(r, s), f = o.length; f--; )
Ae !== o[f] && o[f].kill(r, n);
return this;
}, e.getTweensOf = function(r, n) {
for (var s = [], o = Wt(r), f = this._first, u = ce(n), h; f; )
f instanceof ht ? Oo(f._targets, o) && (u ? (!Ae || f._initted && f._ts) && f.globalTime(0) <= n && f.globalTime(f.totalDuration()) > n : !n || f.isActive()) && s.push(f) : (h = f.getTweensOf(o, n)).length && s.push.apply(s, h), f = f._next;
return s;
}, e.tweenTo = function(r, n) {
n = n || {};
var s = this, o = Ut(s, r), f = n, u = f.startAt, h = f.onStart, c = f.onStartParams, _ = f.immediateRender, a, g = ht.to(s, zt({
ease: n.ease || "none",
lazy: !1,
immediateRender: !1,
time: o,
overwrite: "auto",
duration: n.duration || Math.abs((o - (u && "time" in u ? u.time : s._time)) / s.timeScale()) || tt,
onStart: function() {
if (s.pause(), !a) {
var m = n.duration || Math.abs((o - (u && "time" in u ? u.time : s._time)) / s.timeScale());
g._dur !== m && hi(g, m, 0, 1).render(g._time, !0, !0), a = 1;
}
h && h.apply(g, c || []);
}
}, n));
return _ ? g.render(0) : g;
}, e.tweenFromTo = function(r, n, s) {
return this.tweenTo(n, zt({
startAt: {
time: Ut(this, r)
}
}, s));
}, e.recent = function() {
return this._recent;
}, e.nextLabel = function(r) {
return r === void 0 && (r = this._time), Bn(this, Ut(this, r));
}, e.previousLabel = function(r) {
return r === void 0 && (r = this._time), Bn(this, Ut(this, r), 1);
}, e.currentLabel = function(r) {
return arguments.length ? this.seek(r, !0) : this.previousLabel(this._time + tt);
}, e.shiftChildren = function(r, n, s) {
s === void 0 && (s = 0);
for (var o = this._first, f = this.labels, u; o; )
o._start >= s && (o._start += r, o._end += r), o = o._next;
if (n)
for (u in f)
f[u] >= s && (f[u] += r);
return Ue(this);
}, e.invalidate = function(r) {
var n = this._first;
for (this._lock = 0; n; )
n.invalidate(r), n = n._next;
return l.prototype.invalidate.call(this, r);
}, e.clear = function(r) {
r === void 0 && (r = !0);
for (var n = this._first, s; n; )
s = n._next, this.remove(n), n = s;
return this._dp && (this._time = this._tTime = this._pTime = 0), r && (this.labels = {}), Ue(this);
}, e.totalDuration = function(r) {
var n = 0, s = this, o = s._last, f = Gt, u, h, c;
if (arguments.length)
return s.timeScale((s._repeat < 0 ? s.duration() : s.totalDuration()) / (s.reversed() ? -r : r));
if (s._dirty) {
for (c = s.parent; o; )
u = o._prev, o._dirty && o.totalDuration(), h = o._start, h > f && s._sort && o._ts && !s._lock ? (s._lock = 1, ie(s, o, h - o._delay, 1)._lock = 0) : f = h, h < 0 && o._ts && (n -= h, (!c && !s._dp || c && c.smoothChildTiming) && (s._start += h / s._ts, s._time -= h, s._tTime -= h), s.shiftChildren(-h, !1, -1 / 0), f = 0), o._end > n && o._ts && (n = o._end), o = u;
hi(s, s === it && s._time > n ? s._time : n, 1, 1), s._dirty = 0;
}
return s._tDur;
}, t.updateRoot = function(r) {
if (it._ts && (vs(it, or(r, it)), ys = Ot.frame), Ot.frame >= In) {
In += It.autoSleep || 120;
var n = it._first;
if ((!n || !n._ts) && It.autoSleep && Ot._listeners.length < 2) {
for (; n && !n._ts; )
n = n._next;
n || Ot.sleep();
}
}
}, t;
}(Ni);
zt(Tt.prototype, {
_lock: 0,
_hasPause: 0,
_forcing: 0
});
var ta = function(t, e, i, r, n, s, o) {
var f = new Ct(this._pt, t, e, 0, 1, $s, null, n), u = 0, h = 0, c, _, a, g, d, m, v, A;
for (f.b = i, f.e = r, i += "", r += "", (v = ~r.indexOf("random(")) && (r = Yi(r)), s && (A = [i, r], s(A, t, e), i = A[0], r = A[1]), _ = i.match(Tr) || []; c = Tr.exec(r); )
g = c[0], d = r.substring(u, c.index), a ? a = (a + 1) % 5 : d.substr(-5) === "rgba(" && (a = 1), g !== _[h++] && (m = parseFloat(_[h - 1]) || 0, f._pt = {
_next: f._pt,
p: d || h === 1 ? d : ",",
//note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.
s: m,
c: g.charAt(1) === "=" ? ii(m, g) - m : parseFloat(g) - m,
m: a && a < 4 ? Math.round : 0
}, u = Tr.lastIndex);
return f.c = u < r.length ? r.substring(u, r.length) : "", f.fp = o, (ds.test(r) || v) && (f.e = 0), this._pt = f, f;
}, pn = function(t, e, i, r, n, s, o, f, u, h) {
st(r) && (r = r(n || 0, t, s));
var c = t[e], _ = i !== "get" ? i : st(c) ? u ? t[e.indexOf("set") || !st(t["get" + e.substr(3)]) ? e : "get" + e.substr(3)](u) : t[e]() : c, a = st(c) ? u ? sa : Qs : mn, g;
if (gt(r) && (~r.indexOf("random(") && (r = Yi(r)), r.charAt(1) === "=" && (g = ii(_, r) + (wt(_) || 0), (g || g === 0) && (r = g))), !h || _ !== r || qr)
return !isNaN(_ * r) && r !== "" ? (g = new Ct(this._pt, t, e, +_ || 0, r - (_ || 0), typeof c == "boolean" ? aa : qs, 0, a), u && (g.fp = u), o && g.modifier(o, this, t), this._pt = g) : (!c && !(e in t) && fn(e, r), ta.call(this, t, e, _, r, a, f || It.stringFilter, u));
}, ea = function(t, e, i, r, n) {
if (st(t) && (t = Oi(t, n, e, i, r)), !ne(t) || t.style && t.nodeType || At(t) || hs(t))
return gt(t) ? Oi(t, n, e, i, r) : t;
var s = {}, o;
for (o in t)
s[o] = Oi(t[o], n, e, i, r);
return s;
}, Us = function(t, e, i, r, n, s) {
var o, f, u, h;
if (Et[t] && (o = new Et[t]()).init(n, o.rawVars ? e[t] : ea(e[t], r, n, s, i), i, r, s) !== !1 && (i._pt = f = new Ct(i._pt, n, t, 0, 1, o.render, o, 0, o.priority), i !== ei))
for (u = i._ptLookup[i._targets.indexOf(n)], h = o._props.length; h--; )
u[o._props[h]] = f;
return o;
}, Ae, qr, gn = function l(t, e, i) {
var r = t.vars, n = r.ease, s = r.startAt, o = r.immediateRender, f = r.lazy, u = r.onUpdate, h = r.runBackwards, c = r.yoyoEase, _ = r.keyframes, a = r.autoRevert, g = t._dur, d = t._startAt, m = t._targets, v = t.parent, A = v && v.data === "nested" ? v.vars.targets : m, D = t._overwrite === "auto" && !on, P = t.timeline, x, M, b, w, S, Y, I, F, O, $, Q, B, N;
if (P && (!_ || !n) && (n = "none"), t._ease = Ge(n, li.ease), t._yEase = c ? Ns(Ge(c === !0 ? n : c, li.ease)) : 0, c && t._yoyo && !t._repeat && (c = t._yEase, t._yEase = t._ease, t._ease = c), t._from = !P && !!r.runBackwards, !P || _ && !r.stagger) {
if (F = m[0] ? Ve(m[0]).harness : 0, B = F && r[F.prop], x = sr(r, hn), d && (d._zTime < 0 && d.progress(1), e < 0 && h && o && !a ? d.render(-1, !0) : d.revert(h && g ? Ki : Mo), d._lazy = 0), s) {
if (Pe(t._startAt = ht.set(m, zt({
data: "isStart",
overwrite: !1,
parent: v,
immediateRender: !0,
lazy: !d && bt(f),
startAt: null,
delay: 0,
onUpdate: u && function() {
return Rt(t, "onUpdate");
},
stagger: 0
}, s))), t._startAt._dp = 0, t._startAt._sat = t, e < 0 && (xt || !o && !a) && t._startAt.revert(Ki), o && g && e <= 0 && i <= 0) {
e && (t._zTime = e);
return;
}
} else if (h && g && !d) {
if (e && (o = !1), b = zt({
overwrite: !1,
data: "isFromStart",
//we tag the tween with as "isFromStart" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a "from()" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in.
lazy: o && !d && bt(f),
immediateRender: o,
//zero-duration tweens render immediately by default, but if we're not specifically instructed to render this tween immediately, we should skip this and merely _init() to record the starting values (rendering them immediately would push them to completion which is wasteful in that case - we'd have to render(-1) immediately after)
stagger: 0,
parent: v
//ensures that nested tweens that had a stagger are handled properly, like gsap.from(".class", {y: gsap.utils.wrap([-100,100]), stagger: 0.5})
}, x), B && (b[F.prop] = B), Pe(t._startAt = ht.set(m, b)), t._startAt._dp = 0, t._startAt._sat = t, e < 0 && (xt ? t._startAt.revert(Ki) : t._startAt.render(-1, !0)), t._zTime = e, !o)
l(t._startAt, tt, tt);
else if (!e)
return;
}
for (t._pt = t._ptCache = 0, f = g && bt(f) || f && !g, M = 0; M < m.length; M++) {
if (S = m[M], I = S._gsap || dn(m)[M]._gsap, t._ptLookup[M] = $ = {}, Xr[I.id] && Ce.length && nr(), Q = A === m ? M : A.indexOf(S), F && (O = new F()).init(S, B || x, t, Q, A) !== !1 && (t._pt = w = new Ct(t._pt, S, O.name, 0, 1, O.render, O, 0, O.priority), O._props.forEach(function(dt) {
$[dt] = w;
}), O.priority && (Y = 1)), !F || B)
for (b in x)
Et[b] && (O = Us(b, x, t, Q, S, A)) ? O.priority && (Y = 1) : $[b] = w = pn.call(t, S, b, "get", x[b], Q, A, 0, r.stringFilter);
t._op && t._op[M] && t.kill(S, t._op[M]), D && t._pt && (Ae = t, it.killTweensOf(S, $, t.globalTime(e)), N = !t.parent, Ae = 0), t._pt && f && (Xr[I.id] = 1);
}
Y && Zs(t), t._onInit && t._onInit(t);
}
t._onUpdate = u, t._initted = (!t._op || t._pt) && !N, _ && e <= 0 && P.render(Gt, !0, !0);
}, ia = function(t, e, i, r, n, s, o, f) {
var u = (t._pt && t._ptCache || (t._ptCache = {}))[e], h, c, _, a;
if (!u)
for (u = t._ptCache[e] = [], _ = t._ptLookup, a = t._targets.length; a--; ) {
if (h = _[a][e], h && h.d && h.d._pt)
for (h = h.d._pt; h && h.p !== e && h.fp !== e; )
h = h._next;
if (!h)
return qr = 1, t.vars[e] = "+=0", gn(t, o), qr = 0, f ? Li(e + " not eligible for reset") : 1;
u.push(h);
}
for (a = u.length; a--; )
c = u[a], h = c._pt || c, h.s = (r || r === 0) && !n ? r : h.s + (r || 0) + s * h.c, h.c = i - h.s, c.e && (c.e = lt(i) + wt(c.e)), c.b && (c.b = h.s + wt(c.b));
}, ra = function(t, e) {
var i = t[0] ? Ve(t[0]).harness : 0, r = i && i.aliases, n, s, o, f;
if (!r)
return e;
n = ui({}, e);
for (s in r)
if (s in n)
for (f = r[s].split(","), o = f.length; o--; )
n[f[o]] = n[s];
return n;
}, na = function(t, e, i, r) {
var n = e.ease || r || "power1.inOut", s, o;
if (At(e))
o = i[t] || (i[t] = []), e.forEach(function(f, u) {
return o.push({
t: u / (e.length - 1) * 100,
v: f,
e: n
});
});
else
for (s in e)
o = i[s] || (i[s] = []), s === "ease" || o.push({
t: parseFloat(t),
v: e[s],
e: n
});
}, Oi = function(t, e, i, r, n) {
return st(t) ? t.call(e, i, r, n) : gt(t) && ~t.indexOf("random(") ? Yi(t) : t;
}, Gs = cn + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert", Ws = {};
St(Gs + ",id,stagger,delay,duration,paused,scrollTrigger", function(l) {
return Ws[l] = 1;
});
var ht = /* @__PURE__ */ function(l) {
us(t, l);
function t(i, r, n, s) {
var o;
typeof r == "number" && (n.duration = r, r = n, n = null), o = l.call(this, s ? r : Mi(r)) || this;
var f = o.vars, u = f.duration, h = f.delay, c = f.immediateRender, _ = f.stagger, a = f.overwrite, g = f.keyframes, d = f.defaults, m = f.scrollTrigger, v = f.yoyoEase, A = r.parent || it, D = (At(i) || hs(i) ? ce(i[0]) : "length" in r) ? [i] : Wt(i), P, x, M, b, w, S, Y, I;
if (o._targets = D.length ? dn(D) : Li("GSAP target " + i + " not found. https://gsap.com", !It.nullTargetWarn) || [], o._ptLookup = [], o._overwrite = a, g || _ || $i(u) || $i(h)) {
if (r = o.vars, P = o.timeline = new Tt({
data: "nested",
defaults: d || {},
targets: A && A.data === "nested" ? A.vars.targets : D
}), P.kill(), P.parent = P._dp = ae(o), P._start = 0, _ || $i(u) || $i(h)) {
if (b = D.length, Y = _ && Ms(_), ne(_))
for (w in _)
~Gs.indexOf(w) && (I || (I = {}), I[w] = _[w]);
for (x = 0; x < b; x++)
M = sr(r, Ws), M.stagger = 0, v && (M.yoyoEase = v), I && ui(M, I), S = D[x], M.duration = +Oi(u, ae(o), x, S, D), M.delay = (+Oi(h, ae(o), x, S, D) || 0) - o._delay, !_ && b === 1 && M.delay && (o._delay = h = M.delay, o._start += h, M.delay = 0), P.to(S, M, Y ? Y(x, S, D) : 0), P._ease = V.none;
P.duration() ? u = h = 0 : o.timeline = 0;
} else if (g) {
Mi(zt(P.vars.defaults, {
ease: "none"
})), P._ease = Ge(g.ease || r.ease || "none");
var F = 0, O, $, Q;
if (At(g))
g.forEach(function(B) {
return P.to(D, B, ">");
}), P.duration();
else {
M = {};
for (w in g)
w === "ease" || w === "easeEach" || na(w, g[w], M, g.easeEach);
for (w in M)
for (O = M[w].sort(function(B, N) {
return B.t - N.t;
}), F = 0, x = 0; x < O.length; x++)
$ = O[x], Q = {
ease: $.e,
duration: ($.t - (x ? O[x - 1].t : 0)) / 100 * u
}, Q[w] = $.v, P.to(D, Q, F), F += Q.duration;
P.duration() < u && P.to({}, {
duration: u - P.duration()
});
}
}
u || o.duration(u = P.duration());
} else
o.timeline = 0;
return a === !0 && !on && (Ae = ae(o), it.killTweensOf(D), Ae = 0), ie(A, ae(o), n), r.reversed && o.reverse(), r.paused && o.paused(!0), (c || !u && !g && o._start === ct(A._time) && bt(c) && Lo(ae(o)) && A.data !== "nested") && (o._tTime = -tt, o.render(Math.max(0, -h) || 0)), m && Ss(ae(o), m), o;
}
var e = t.prototype;
return e.render = function(r, n, s) {
var o = this._time, f = this._tDur, u = this._dur, h = r < 0, c = r > f - tt && !h ? f : r < tt ? 0 : r, _, a, g, d, m, v, A, D, P;
if (!u)
Yo(this, r, n, s);
else if (c !== this._tTime || !r || s || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== h || this._lazy) {
if (_ = c, D = this.timeline, this._repeat) {
if (d = u + this._rDelay, this._repeat < -1 && h)
return this.totalTime(d * 100 + r, n, s);
if (_ = ct(c % d), c === f ? (g = this._repeat, _ = u) : (m = ct(c / d), g = ~~m, g && g === m ? (_ = u, g--) : _ > u && (_ = u)), v = this._yoyo && g & 1, v && (P = this._yEase, _ = u - _), m = fi(this._tTime, d), _ === o && !s && this._initted && g === m)
return this._tTime = c, this;
g !== m && (D && this._yEase && Fs(D, v), this.vars.repeatRefresh && !v && !this._lock && _ !== d && this._initted && (this._lock = s = 1, this.render(ct(d * g), !0).invalidate()._lock = 0));
}
if (!this._initted) {
if (Cs(this, h ? r : _, s, n, c))
return this._tTime = 0, this;
if (o !== this._time && !(s && this.vars.repeatRefresh && g !== m))
return this;
if (u !== this._dur)
return this.render(r, n, s);
}
if (this._tTime = c, this._time = _, !this._act && this._ts && (this._act = 1, this._lazy = 0), this.ratio = A = (P || this._ease)(_ / u), this._from && (this.ratio = A = 1 - A), !o && c && !n && !m && (Rt(this, "onStart"), this._tTime !== c))
return this;
for (a = this._pt; a; )
a.r(A, a.d), a = a._next;
D && D.render(r < 0 ? r : D._dur * D._ease(_ / this._dur), n, s) || this._startAt && (this._zTime = r), this._onUpdate && !n && (h && Vr(this, r, n, s), Rt(this, "onUpdate")), this._repeat && g !== m && this.vars.onRepeat && !n && this.parent && Rt(this, "onRepeat"), (c === this._tDur || !c) && this._tTime === c && (h && !this._onUpdate && Vr(this, r, !0, !0), (r || !u) && (c === this._tDur && this._ts > 0 || !c && this._ts < 0) && Pe(this, 1), !n && !(h && !o) && (c || o || v) && (Rt(this, c === f ? "onComplete" : "onReverseComplete", !0), this._prom && !(c < f && this.timeScale() > 0) && this._prom()));
}
return this;
}, e.targets = function() {
return this._targets;
}, e.invalidate = function(r) {
return (!r || !this.vars.runBackwards) && (this._startAt = 0), this._pt = this._op = this._onUpdate = this._lazy = this.ratio = 0, this._ptLookup = [], this.timeline && this.timeline.invalidate(r), l.prototype.invalidate.call(this, r);
}, e.resetTo = function(r, n, s, o, f) {
Bi || Ot.wake(), this._ts || this.play();
var u = Math.min(this._dur, (this._dp._time - this._start) * this._ts), h;
return this._initted || gn(this, u), h = this._ease(u / this._dur), ia(this, r, n, s, o, h, u, f) ? this.resetTo(r, n, s, o, 1) : (_r(this, 0), this.parent || Ts(this._dp, this, "_first", "_last", this._dp._sort ? "_start" : 0), this.render(0));
}, e.kill = function(r, n) {
if (n === void 0 && (n = "all"), !r && (!n || n === "all"))
return this._lazy = this._pt = 0, this.parent ? Ti(this) : this.scrollTrigger && this.scrollTrigger.kill(!!xt), this;
if (this.timeline) {
var s = this.timeline.totalDuration();
return this.timeline.killTweensOf(r, n, Ae && Ae.vars.overwrite !== !0)._first || Ti(this), this.parent && s !== this.timeline.totalDuration() && hi(this, this._dur * this.timeline._tDur / s, 0, 1), this;
}
var o = this._targets, f = r ? Wt(r) : o, u = this._ptLookup, h = this._pt, c, _, a, g, d, m, v;
if ((!n || n === "all") && Ro(o, f))
return n === "all" && (this._pt = 0), Ti(this);
for (c = this._op = this._op || [], n !== "all" && (gt(n) && (d = {}, St(n, function(A) {
return d[A] = 1;
}), n = d), n = ra(o, n)), v = o.length; v--; )
if (~f.indexOf(o[v])) {
_ = u[v], n === "all" ? (c[v] = n, g = _, a = {}) : (a = c[v] = c[v] || {}, g = n);
for (d in g)
m = _ && _[d], m && ((!("kill" in m.d) || m.d.kill(d) === !0) && cr(this, m, "_pt"), delete _[d]), a !== "all" && (a[d] = 1);
}
return this._initted && !this._pt && h && Ti(this), this;
}, t.to = function(r, n) {
return new t(r, n, arguments[2]);
}, t.from = function(r, n) {
return Ei(1, arguments);
}, t.delayedCall = function(r, n, s, o) {
return new t(n, 0, {
immediateRender: !1,
lazy: !1,
overwrite: !1,
delay: r,
onComplete: n,
onReverseComplete: n,
onCompleteParams: s,
onReverseCompleteParams: s,
callbackScope: o
});
}, t.fromTo = function(r, n, s) {
return Ei(2, arguments);
}, t.set = function(r, n) {
return n.duration = 0, n.repeatDelay || (n.repeat = 0), new t(r, n);
}, t.killTweensOf = function(r, n, s) {
return it.killTweensOf(r, n, s);
}, t;
}(Ni);
zt(ht.prototype, {
_targets: [],
_lazy: 0,
_startAt: 0,
_op: 0,
_onInit: 0
});
St("staggerTo,staggerFrom,staggerFromTo", function(l) {
ht[l] = function() {
var t = new Tt(), e = Gr.call(arguments, 0);
return e.splice(l === "staggerFromTo" ? 5 : 4, 0, 0), t[l].apply(t, e);
};
});
var mn = function(t, e, i) {
return t[e] = i;
}, Qs = function(t, e, i) {
return t[e](i);
}, sa = function(t, e, i, r) {
return t[e](r.fp, i);
}, oa = function(t, e, i) {
return t.setAttribute(e, i);
}, yn = function(t, e) {
return st(t[e]) ? Qs : an(t[e]) && t.setAttribute ? oa : mn;
}, qs = function(t, e) {
return e.set(e.t, e.p, Math.round((e.s + e.c * t) * 1e6) / 1e6, e);
}, aa = function(t, e) {
return e.set(e.t, e.p, !!(e.s + e.c * t), e);
}, $s = function(t, e) {
var i = e._pt, r = "";
if (!t && e.b)
r = e.b;
else if (t === 1 && e.e)
r = e.e;
else {
for (; i; )
r = i.p + (i.m ? i.m(i.s + i.c * t) : Math.round((i.s + i.c * t) * 1e4) / 1e4) + r, i = i._next;
r += e.c;
}
e.set(e.t, e.p, r, e);
}, xn = function(t, e) {
for (var i = e._pt; i; )
i.r(t, i.d), i = i._next;
}, la = function(t, e, i, r) {
for (var n = this._pt, s; n; )
s = n._next, n.p === r && n.modifier(t, e, i), n = s;
}, ua = function(t) {
for (var e = this._pt, i, r; e; )
r = e._next, e.p === t && !e.op || e.op === t ? cr(this, e, "_pt") : e.dep || (i = 1), e = r;
return !i;
}, fa = function(t, e, i, r) {
r.mSet(t, e, r.m.call(r.tween, i, r.mt), r);
}, Zs = function(t) {
for (var e = t._pt, i, r, n, s; e; ) {
for (i = e._next, r = n; r && r.pr > e.pr; )
r = r._next;
(e._prev = r ? r._prev : s) ? e._prev._next = e : n = e, (e._next = r) ? r._prev = e : s = e, e = i;
}
t._pt = n;
}, Ct = /* @__PURE__ */ function() {
function l(e, i, r, n, s, o, f, u, h) {
this.t = i, this.s = n, this.c = s, this.p = r, this.r = o || qs, this.d = f || this, this.set = u || mn, this.pr = h || 0, this._next = e, e && (e._prev = this);
}
var t = l.prototype;
return t.modifier = function(i, r, n) {
this.mSet = this.mSet || this.set, this.set = fa, this.m = i, this.mt = n, this.tween = r;
}, l;
}();
St(cn + "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(l) {
return hn[l] = 1;
});
Lt.TweenMax = Lt.TweenLite = ht;
Lt.TimelineLite = Lt.TimelineMax = Tt;
it = new Tt({
sortChildren: !1,
defaults: li,
autoRemoveChildren: !0,
id: "root",
smoothChildTiming: !0
});
It.stringFilter = Bs;
var We = [], Ji = {}, ha = [], Fn = 0, ca = 0, Pr = function(t) {
return (Ji[t] || ha).map(function(e) {
return e();
});
}, $r = function() {
var t = Date.now(), e = [];
t - Fn > 2 && (Pr("matchMediaInit"), We.forEach(function(i) {
var r = i.queries, n = i.conditions, s, o, f, u;
for (o in r)
s = ee.matchMedia(r[o]).matches, s && (f = 1), s !== n[o] && (n[o] = s, u = 1);
u && (i.revert(), f && e.push(i));
}), Pr("matchMediaRevert"), e.forEach(function(i) {
return i.onMatch(i, function(r) {
return i.add(null, r);
});
}), Fn = t, Pr("matchMedia"));
}, Hs = /* @__PURE__ */ function() {
function l(e, i) {
this.selector = i && Wr(i), this.data = [], this._r = [], this.isReverted = !1, this.id = ca++, e && this.add(e);
}
var t = l.prototype;
return t.add = function(i, r, n) {
st(i) && (n = r, r = i, i = st);
var s = this, o = function() {
var u = et, h = s.selector, c;
return u && u !== s && u.data.push(s), n && (s.selector = Wr(n)), et = s, c = r.apply(s, arguments), st(c) && s._r.push(c), et = u, s.selector = h, s.isReverted = !1, c;
};
return s.last = o, i === st ? o(s, function(f) {
return s.add(null, f);
}) : i ? s[i] = o : o;
}, t.ignore = function(i) {
var r = et;
et = null, i(this), et = r;
}, t.getTweens = function() {
var i = [];
return this.data.forEach(function(r) {
return r instanceof l ? i.push.apply(i, r.getTweens()) : r instanceof ht && !(r.parent && r.parent.data === "nested") && i.push(r);
}), i;
}, t.clear = function() {
this._r.length = this.data.length = 0;
}, t.kill = function(i, r) {
var n = this;
if (i ? function() {
for (var o = n.getTweens(), f = n.data.length, u; f--; )
u = n.data[f], u.data === "isFlip" && (u.revert(), u.getChildren(!0, !0, !1).forEach(function(h) {
return o.splice(o.indexOf(h), 1);
}));
for (o.map(function(h) {
return {
g: h._dur || h._delay || h._sat && !h._sat.vars.immediateRender ? h.globalTime(0) : -1 / 0,
t: h
};
}).sort(function(h, c) {
return c.g - h.g || -1 / 0;
}).forEach(function(h) {
return h.t.revert(i);
}), f = n.data.length; f--; )
u = n.data[f], u instanceof Tt ? u.data !== "nested" && (u.scrollTrigger && u.scrollTrigger.revert(), u.kill()) : !(u instanceof ht) && u.revert && u.revert(i);
n._r.forEach(function(h) {
return h(i, n);
}), n.isReverted = !0;
}() : this.data.forEach(function(o) {
return o.kill && o.kill();
}), this.clear(), r)
for (var s = We.length; s--; )
We[s].id === this.id && We.splice(s, 1);
}, t.revert = function(i) {
this.kill(i || {});
}, l;
}(), da = /* @__PURE__ */ function() {
function l(e) {
this.contexts = [], this.scope = e, et && et.data.push(this);
}
var t = l.prototype;
return t.add = function(i, r, n) {
ne(i) || (i = {
matches: i
});
var s = new Hs(0, n || this.scope), o = s.conditions = {}, f, u, h;
et && !s.selector && (s.selector = et.selector), this.contexts.push(s), r = s.add("onMatch", r), s.queries = i;
for (u in i)
u === "all" ? h = 1 : (f = ee.matchMedia(i[u]), f && (We.indexOf(s) < 0 && We.push(s), (o[u] = f.matches) && (h = 1), f.addListener ? f.addListener($r) : f.addEventListener("change", $r)));
return h && r(s, function(c) {
return s.add(null, c);
}), this;
}, t.revert = function(i) {
this.kill(i || {});
}, t.kill = function(i) {
this.contexts.forEach(function(r) {
return r.kill(i, !0);
});
}, l;
}(), ar = {
registerPlugin: function() {
for (var t = arguments.length, e = new Array(t), i = 0; i < t; i++)
e[i] = arguments[i];
e.forEach(function(r) {
return Ls(r);
});
},
timeline: function(t) {
return new Tt(t);
},
getTweensOf: function(t, e) {
return it.getTweensOf(t, e);
},
getProperty: function(t, e, i, r) {
gt(t) && (t = Wt(t)[0]);
var n = Ve(t || {}).get, s = i ? As : ws;
return i === "native" && (i = ""), t && (e ? s((Et[e] && Et[e].get || n)(t, e, i, r)) : function(o, f, u) {
return s((Et[o] && Et[o].get || n)(t, o, f, u));
});
},
quickSetter: function(t, e, i) {
if (t = Wt(t), t.length > 1) {
var r = t.map(function(h) {
return Pt.quickSetter(h, e, i);
}), n = r.length;
return function(h) {
for (var c = n; c--; )
r[c](h);
};
}
t = t[0] || {};
var s = Et[e], o = Ve(t), f = o.harness && (o.harness.aliases || {})[e] || e, u = s ? function(h) {
var c = new s();
ei._pt = 0, c.init(t, i ? h + i : h, ei, 0, [t]), c.render(1, c), ei._pt && xn(1, ei);
} : o.set(t, f);
return s ? u : function(h) {
return u(t, f, i ? h + i : h, o, 1);
};
},
quickTo: function(t, e, i) {
var r, n = Pt.to(t, zt((r = {}, r[e] = "+=0.1", r.paused = !0, r.stagger = 0, r), i || {})), s = function(f, u, h) {
return n.resetTo(e, f, u, h);
};
return s.tween = n, s;
},
isTweening: function(t) {
return it.getTweensOf(t, !0).length > 0;
},
defaults: function(t) {
return t && t.ease && (t.ease = Ge(t.ease, li.ease)), Ln(li, t || {});
},
config: function(t) {
return Ln(It, t || {});
},
registerEffect: function(t) {
var e = t.name, i = t.effect, r = t.plugins, n = t.defaults, s = t.extendTimeline;
(r || "").split(",").forEach(function(o) {
return o && !Et[o] && !Lt[o] && Li(e + " effect requires " + o + " plugin.");
}), br[e] = function(o, f, u) {
return i(Wt(o), zt(f || {}, n), u);
}, s && (Tt.prototype[e] = function(o, f, u) {
return this.add(br[e](o, ne(f) ? f : (u = f) && {}, this), u);
});
},
registerEase: function(t, e) {
V[t] = Ge(e);
},
parseEase: function(t, e) {
return arguments.length ? Ge(t, e) : V;
},
getById: function(t) {
return it.getById(t);
},
exportRoot: function(t, e) {
t === void 0 && (t = {});
var i = new Tt(t), r, n;
for (i.smoothChildTiming = bt(t.smoothChildTiming), it.remove(i), i._dp = 0, i._time = i._tTime = it._time, r = it._first; r; )
n = r._next, (e || !(!r._dur && r instanceof ht && r.vars.onComplete === r._targets[0])) && ie(i, r, r._start - r._delay), r = n;
return ie(it, i, 0), i;
},
context: function(t, e) {
return t ? new Hs(t, e) : et;
},
matchMedia: function(t) {
return new da(t);
},
matchMediaRefresh: function() {
return We.forEach(function(t) {
var e = t.conditions, i, r;
for (r in e)
e[r] && (e[r] = !1, i = 1);
i && t.revert();
}) || $r();
},
addEventListener: function(t, e) {
var i = Ji[t] || (Ji[t] = []);
~i.indexOf(e) || i.push(e);
},
removeEventListener: function(t, e) {
var i = Ji[t], r = i && i.indexOf(e);
r >= 0 && i.splice(r, 1);
},
utils: {
wrap: Wo,
wrapYoyo: Qo,
distribute: Ms,
random: Os,
snap: Es,
normalize: Go,
getUnit: wt,
clamp: Fo,
splitColor: zs,
toArray: Wt,
selector: Wr,
mapRange: Rs,
pipe: Vo,
unitize: Uo,
interpolate: qo,
shuffle: Ps
},
install: gs,
effects: br,
ticker: Ot,
updateRoot: Tt.updateRoot,
plugins: Et,
globalTimeline: it,
core: {
PropTween: Ct,
globals: ms,
Tween: ht,
Timeline: Tt,
Animation: Ni,
getCache: Ve,
_removeLinkedListItem: cr,
reverting: function() {
return xt;
},
context: function(t) {
return t && et && (et.data.push(t), t._ctx = et), et;
},
suppressOverwrites: function(t) {
return on = t;
}
}
};
St("to,from,fromTo,delayedCall,set,killTweensOf", function(l) {
return ar[l] = ht[l];
});
Ot.add(Tt.updateRoot);
ei = ar.to({}, {
duration: 0
});
var _a = function(t, e) {
for (var i = t._pt; i && i.p !== e && i.op !== e && i.fp !== e; )
i = i._next;
return i;
}, pa = function(t, e) {
var i = t._targets, r, n, s;
for (r in e)
for (n = i.length; n--; )
s = t._ptLookup[n][r], s && (s = s.d) && (s._pt && (s = _a(s, r)), s && s.modifier && s.modifier(e[r], t, i[n], r));
}, Mr = function(t, e) {
return {
name: t,
headless: 1,
rawVars: 1,
//don't pre-process function-based values or "random()" strings.
init: function(r, n, s) {
s._onInit = function(o) {
var f, u;
if (gt(n) && (f = {}, St(n, function(h) {
return f[h] = 1;
}), n = f), e) {
f = {};
for (u in n)
f[u] = e(n[u]);
n = f;
}
pa(o, n);
};
}
};
}, Pt = ar.registerPlugin({
name: "attr",
init: function(t, e, i, r, n) {
var s, o, f;
this.tween = i;
for (s in e)
f = t.getAttribute(s) || "", o = this.add(t, "setAttribute", (f || 0) + "", e[s], r, n, 0, 0, s), o.op = s, o.b = f, this._props.push(s);
},
render: function(t, e) {
for (var i = e._pt; i; )
xt ? i.set(i.t, i.p, i.b, i) : i.r(t, i.d), i = i._next;
}
}, {
name: "endArray",
headless: 1,
init: function(t, e) {
for (var i = e.length; i--; )
this.add(t, i, t[i] || 0, e[i], 0, 0, 0, 0, 0, 1);
}
}, Mr("roundProps", Qr), Mr("modifiers"), Mr("snap", Es)) || ar;
ht.version = Tt.version = Pt.version = "3.13.0";
ps = 1;
ln() && ci();
V.Power0;
V.Power1;
V.Power2;
V.Power3;
V.Power4;
V.Linear;
V.Quad;
V.Cubic;
V.Quart;
V.Quint;
V.Strong;
V.Elastic;
V.Back;
V.SteppedEase;
V.Bounce;
V.Sine;
V.Expo;
V.Circ;
/*!
* CSSPlugin 3.13.0
* https://gsap.com
*
* Copyright 2008-2025, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license
* @author: Jack Doyle, jack@greensock.com
*/
var Xn, Te, ri, vn, Xe, Vn, wn, ga = function() {
return typeof window < "u";
}, de = {}, Ne = 180 / Math.PI, ni = Math.PI / 180, Ke = Math.atan2, Un = 1e8, An = /([A-Z])/g, ma = /(left|right|width|margin|padding|x)/i, ya = /[\s,\(]\S/, re = {
autoAlpha: "opacity,visibility",
scale: "scaleX,scaleY",
alpha: "opacity"
}, Zr = function(t, e) {
return e.set(e.t, e.p, Math.round((e.s + e.c * t) * 1e4) / 1e4 + e.u, e);
}, xa = function(t, e) {
return e.set(e.t, e.p, t === 1 ? e.e : Math.round((e.s + e.c * t) * 1e4) / 1e4 + e.u, e);
}, va = function(t, e) {
return e.set(e.t, e.p, t ? Math.round((e.s + e.c * t) * 1e4) / 1e4 + e.u : e.b, e);
}, wa = function(t, e) {
var i = e.s + e.c * t;
e.set(e.t, e.p, ~~(i + (i < 0 ? -0.5 : 0.5)) + e.u, e);
}, Ks = function(t, e) {
return e.set(e.t, e.p, t ? e.e : e.b, e);
}, js = function(t, e) {
return e.set(e.t, e.p, t !== 1 ? e.b : e.e, e);
}, Aa = function(t, e, i) {
return t.style[e] = i;
}, Ta = function(t, e, i) {
return t.style.setProperty(e, i);
}, ba = function(t, e, i) {
return t._gsap[e] = i;
}, Sa = function(t, e, i) {
return t._gsap.scaleX = t._gsap.scaleY = i;
}, Ca = function(t, e, i, r, n) {
var s = t._gsap;
s.scaleX = s.scaleY = i, s.renderTransform(n, s);
}, Da = function(t, e, i, r, n) {
var s = t._gsap;
s[e] = i, s.renderTransform(n, s);
}, rt = "transform", Dt = rt + "Origin", Pa = function l(t, e) {
var i = this, r = this.target, n = r.style, s = r._gsap;
if (t in de && n) {
if (this.tfm = this.tfm || {}, t !== "transform")
t = re[t] || t, ~t.indexOf(",") ? t.split(",").forEach(function(o) {
return i.tfm[o] = le(r, o);
}) : this.tfm[t] = s.x ? s[t] : le(r, t), t === Dt && (this.tfm.zOrigin = s.zOrigin);
else
return re.transform.split(",").forEach(function(o) {
return l.call(i, o, e);
});
if (this.props.indexOf(rt) >= 0)
return;
s.svg && (this.svgo = r.getAttribute("data-svg-origin"), this.props.push(Dt, e, "")), t = rt;
}
(n || e) && this.props.push(t, e, n[t]);
}, Js = function(t) {
t.translate && (t.removeProperty("translate"), t.removeProperty("scale"), t.removeProperty("rotate"));
}, Ma = function() {
var t = this.props, e = this.target, i = e.style, r = e._gsap, n, s;
for (n = 0; n < t.length; n += 3)
t[n + 1] ? t[n + 1] === 2 ? e[t[n]](t[n + 2]) : e[t[n]] = t[n + 2] : t[n + 2] ? i[t[n]] = t[n + 2] : i.removeProperty(t[n].substr(0, 2) === "--" ? t[n] : t[n].replace(An, "-$1").toLowerCase());
if (this.tfm) {
for (s in this.tfm)
r[s] = this.tfm[s];
r.svg && (r.renderTransform(), e.setAttribute("data-svg-origin", this.svgo || "")), n = wn(), (!n || !n.isStart) && !i[rt] && (Js(i), r.zOrigin && i[Dt] && (i[Dt] += " " + r.zOrigin + "px", r.zOrigin = 0, r.renderTransform()), r.uncache = 1);
}
}, to = function(t, e) {
var i = {
target: t,
props: [],
revert: Ma,
save: Pa
};
return t._gsap || Pt.core.getCache(t), e && t.style && t.nodeType && e.split(",").forEach(function(r) {
return i.save(r);
}), i;
}, eo, Hr = function(t, e) {
var i = Te.createElementNS ? Te.createElementNS((e || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), t) : Te.createElement(t);
return i && i.style ? i : Te.createElement(t);
}, Qt = function l(t, e, i) {
var r = getComputedStyle(t);
return r[e] || r.getPropertyValue(e.replace(An, "-$1").toLowerCase()) || r.getPropertyValue(e) || !i && l(t, di(e) || e, 1) || "";
}, Gn = "O,Moz,ms,Ms,Webkit".split(","), di = function(t, e, i) {
var r = e || Xe, n = r.style, s = 5;
if (t in n && !i)
return t;
for (t = t.charAt(0).toUpperCase() + t.substr(1); s-- && !(Gn[s] + t in n); )
;
return s < 0 ? null : (s === 3 ? "ms" : s >= 0 ? Gn[s] : "") + t;
}, Kr = function() {
ga() && window.document && (Xn = window, Te = Xn.document, ri = Te.documentElement, Xe = Hr("div") || {
style: {}
}, Hr("div"), rt = di(rt), Dt = rt + "Origin", Xe.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0", eo = !!di("perspective"), wn = Pt.core.reverting, vn = 1);
}, Wn = function(t) {
var e = t.ownerSVGElement, i = Hr("svg", e && e.getAttribute("xmlns") || "http://www.w3.org/2000/svg"), r = t.cloneNode(!0), n;
r.style.display = "block", i.appendChild(r), ri.appendChild(i);
try {
n = r.getBBox();
} catch {
}
return i.removeChild(r), ri.removeChild(i), n;
}, Qn = function(t, e) {
for (var i = e.length; i--; )
if (t.hasAttribute(e[i]))
return t.getAttribute(e[i]);
}, io = function(t) {
var e, i;
try {
e = t.getBBox();
} catch {
e = Wn(t), i = 1;
}
return e && (e.width || e.height) || i || (e = Wn(t)), e && !e.width && !e.x && !e.y ? {
x: +Qn(t, ["x", "cx", "x1"]) || 0,
y: +Qn(t, ["y", "cy", "y1"]) || 0,
width: 0,
height: 0
} : e;
}, ro = function(t) {
return !!(t.getCTM && (!t.parentNode || t.ownerSVGElement) && io(t));
}, $e = function(t, e) {
if (e) {
var i = t.style, r;
e in de && e !== Dt && (e = rt), i.removeProperty ? (r = e.substr(0, 2), (r === "ms" || e.substr(0, 6) === "webkit") && (e = "-" + e), i.removeProperty(r === "--" ? e : e.replace(An, "-$1").toLowerCase())) : i.removeAttribute(e);
}
}, be = function(t, e, i, r, n, s) {
var o = new Ct(t._pt, e, i, 0, 1, s ? js : Ks);
return t._pt = o, o.b = r, o.e = n, t._props.push(i), o;
}, qn = {
deg: 1,
rad: 1,
turn: 1
}, Ea = {
grid: 1,
flex: 1
}, Me = function l(t, e, i, r) {
var n = parseFloat(i) || 0, s = (i + "").trim().substr((n + "").length) || "px", o = Xe.style, f = ma.test(e), u = t.tagName.toLowerCase() === "svg", h = (u ? "client" : "offset") + (f ? "Width" : "Height"), c = 100, _ = r === "px", a = r === "%", g, d, m, v;
if (r === s || !n || qn[r] || qn[s])
return n;
if (s !== "px" && !_ && (n = l(t, e, i, "px")), v = t.getCTM && ro(t), (a || s === "%") && (de[e] || ~e.indexOf("adius")))
return g = v ? t.getBBox()[f ? "width" : "height"] : t[h], lt(a ? n / g * c : n / 100 * g);
if (o[f ? "width" : "height"] = c + (_ ? s : r), d = r !== "rem" && ~e.indexOf("adius") || r === "em" && t.appendChild && !u ? t : t.parentNode, v && (d = (t.ownerSVGElement || {}).parentNode), (!d || d === Te || !d.appendChild) && (d = Te.body), m = d._gsap, m && a && m.width && f && m.time === Ot.time && !m.uncache)
return lt(n / m.width * c);
if (a && (e === "height" || e === "width")) {
var A = t.style[e];
t.style[e] = c + r, g = t[h], A ? t.style[e] = A : $e(t, e);
} else
(a || s === "%") && !Ea[Qt(d, "display")] && (o.position = Qt(t, "position")), d === t && (o.position = "static"), d.appendChild(Xe), g = Xe[h], d.removeChild(Xe), o.position = "absolute";
return f && a && (m = Ve(d), m.time = Ot.time, m.width = d[h]), lt(_ ? g * n / c : g && n ? c / g * n : 0);
}, le = function(t, e, i, r) {
var n;
return vn || Kr(), e in re && e !== "transform" && (e = re[e], ~e.indexOf(",") && (e = e.split(",")[0])), de[e] && e !== "transform" ? (n = Xi(t, r), n = e !== "transformOrigin" ? n[e] : n.svg ? n.origin : ur(Qt(t, Dt)) + " " + n.zOrigin + "px") : (n = t.style[e], (!n || n === "auto" || r || ~(n + "").indexOf("calc(")) && (n = lr[e] && lr[e](t, e, i) || Qt(t, e) || xs(t, e) || (e === "opacity" ? 1 : 0))), i && !~(n + "").trim().indexOf(" ") ? Me(t, e, n, i) + i : n;
}, Oa = function(t, e, i, r) {
if (!i || i === "none") {
var n = di(e, t, 1), s = n && Qt(t, n, 1);
s && s !== i ? (e = n, i = s) : e === "borderColor" && (i = Qt(t, "borderTopColor"));
}
var o = new Ct(this._pt, t.style, e, 0, 1, $s), f = 0, u = 0, h, c, _, a, g, d, m, v, A, D, P, x;
if (o.b = i, o.e = r, i += "", r += "", r.substring(0, 6) === "var(--" && (r = Qt(t, r.substring(4, r.indexOf(")")))), r === "auto" && (d = t.style[e], t.style[e] = r, r = Qt(t, e) || r, d ? t.style[e] = d : $e(t, e)), h = [i, r], Bs(h), i = h[0], r = h[1], _ = i.match(ti) || [], x = r.match(ti) || [], x.length) {
for (; c = ti.exec(r); )
m = c[0], A = r.substring(f, c.index), g ? g = (g + 1) % 5 : (A.substr(-5) === "rgba(" || A.substr(-5) === "hsla(") && (g = 1), m !== (d = _[u++] || "") && (a = parseFloat(d) || 0, P = d.substr((a + "").length), m.charAt(1) === "=" && (m = ii(a, m) + P), v = parseFloat(m), D = m.substr((v + "").length), f = ti.lastIndex - D.length, D || (D = D || It.units[e] || P, f === r.length && (r += D, o.e += D)), P !== D && (a = Me(t, e, d, D) || 0), o._pt = {
_next: o._pt,
p: A || u === 1 ? A : ",",
//note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.
s: a,
c: v - a,
m: g && g < 4 || e === "zIndex" ? Math.round : 0
});
o.c = f < r.length ? r.substring(f, r.length) : "";
} else
o.r = e === "display" && r === "none" ? js : Ks;
return ds.test(r) && (o.e = 0), this._pt = o, o;
}, $n = {
top: "0%",
bottom: "100%",
left: "0%",
right: "100%",
center: "50%"
}, ka = function(t) {
var e = t.split(" "), i = e[0], r = e[1] || "50%";
return (i === "top" || i === "bottom" || r === "left" || r === "right") && (t = i, i = r, r = t), e[0] = $n[i] || i, e[1] = $n[r] || r, e.join(" ");
}, Ra = function(t, e) {
if (e.tween && e.tween._time === e.tween._dur) {
var i = e.t, r = i.style, n = e.u, s = i._gsap, o, f, u;
if (n === "all" || n === !0)
r.cssText = "", f = 1;
else
for (n = n.split(","), u = n.length; --u > -1; )
o = n[u], de[o] && (f = 1, o = o === "transformOrigin" ? Dt : rt), $e(i, o);
f && ($e(i, rt), s && (s.svg && i.removeAttribute("transform"), r.scale = r.rotate = r.translate = "none", Xi(i, 1), s.uncache = 1, Js(r)));
}
}, lr = {
clearProps: function(t, e, i, r, n) {
if (n.data !== "isFromStart") {
var s = t._pt = new Ct(t._pt, e, i, 0, 0, Ra);
return s.u = r, s.pr = -10, s.tween = n, t._props.push(i), 1;
}
}
/* className feature (about 0.4kb gzipped).
, className(plugin, target, property, endValue, tween) {
let _renderClassName = (ratio, data) => {
data.css.render(ratio, data.css);
if (!ratio || ratio === 1) {
let inline = data.rmv,
target = data.t,
p;
target.setAttribute("class", ratio ? data.e : data.b);
for (p in inline) {
_removeProperty(target, p);
}
}
},
_getAllStyles = (target) => {
let styles = {},
computed = getComputedStyle(target),
p;
for (p in computed) {
if (isNaN(p) && p !== "cssText" && p !== "length") {
styles[p] = computed[p];
}
}
_setDefaults(styles, _parseTransform(target, 1));
return styles;
},
startClassList = target.getAttribute("class"),
style = target.style,
cssText = style.cssText,
cache = target._gsap,
classPT = cache.classPT,
inlineToRemoveAtEnd = {},
data = {t:target, plugin:plugin, rmv:inlineToRemoveAtEnd, b:startClassList, e:(endValue.charAt(1) !== "=") ? endValue : startClassList.replace(new RegExp("(?:\\s|^)" + endValue.substr(2) + "(?![\\w-])"), "") + ((endValue.charAt(0) === "+") ? " " + endValue.substr(2) : "")},
changingVars = {},
startVars = _getAllStyles(target),
transformRelated = /(transform|perspective)/i,
endVars, p;
if (classPT) {
classPT.r(1, classPT.d);
_removeLinkedListItem(classPT.d.plugin, classPT, "_pt");
}
target.setAttribute("class", data.e);
endVars = _getAllStyles(target, true);
target.setAttribute("class", startClassList);
for (p in endVars) {
if (endVars[p] !== startVars[p] && !transformRelated.test(p)) {
changingVars[p] = endVars[p];
if (!style[p] && style[p] !== "0") {
inlineToRemoveAtEnd[p] = 1;
}
}
}
cache.classPT = plugin._pt = new PropTween(plugin._pt, target, "className", 0, 0, _renderClassName, data, 0, -11);
if (style.cssText !== cssText) { //only apply if things change. Otherwise, in cases like a background-image that's pulled dynamically, it could cause a refresh. See https://gsap.com/forums/topic/20368-possible-gsap-bug-switching-classnames-in-chrome/.
style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity).
}
_parseTransform(target, true); //to clear the caching of transforms
data.css = new gsap.plugins.css();
data.css.init(target, changingVars, tween);
plugin._props.push(...data.css._props);
return 1;
}
*/
}, Fi = [1, 0, 0, 1, 0, 0], no = {}, so = function(t) {
return t === "matrix(1, 0, 0, 1, 0, 0)" || t === "none" || !t;
}, Zn = function(t) {
var e = Qt(t, rt);
return so(e) ? Fi : e.substr(7).match(cs).map(lt);
}, Tn = function(t, e) {
var i = t._gsap || Ve(t), r = t.style, n = Zn(t), s, o, f, u;
return i.svg && t.getAttribute("transform") ? (f = t.transform.baseVal.consolidate().matrix, n = [f.a, f.b, f.c, f.d, f.e, f.f], n.join(",") === "1,0,0,1,0,0" ? Fi : n) : (n === Fi && !t.offsetParent && t !== ri && !i.svg && (f = r.display, r.display = "block", s = t.parentNode, (!s || !t.offsetParent && !t.getBoundingClientRect().width) && (u = 1, o = t.nextElementSibling, ri.appendChild(t)), n = Zn(t), f ? r.display = f : $e(t, "display"), u && (o ? s.insertBefore(t, o) : s ? s.appendChild(t) : ri.removeChild(t))), e && n.length > 6 ? [n[0], n[1], n[4], n[5], n[12], n[13]] : n);
}, jr = function(t, e, i, r, n, s) {
var o = t._gsap, f = n || Tn(t, !0), u = o.xOrigin || 0, h = o.yOrigin || 0, c = o.xOffset || 0, _ = o.yOffset || 0, a = f[0], g = f[1], d = f[2], m = f[3], v = f[4], A = f[5], D = e.split(" "), P = parseFloat(D[0]) || 0, x = parseFloat(D[1]) || 0, M, b, w, S;
i ? f !== Fi && (b = a * m - g * d) && (w = P * (m / b) + x * (-d / b) + (d * A - m * v) / b, S = P * (-g / b) + x * (a / b) - (a * A - g * v) / b, P = w, x = S) : (M = io(t), P = M.x + (~D[0].indexOf("%") ? P / 100 * M.width : P), x = M.y + (~(D[1] || D[0]).indexOf("%") ? x / 100 * M.height : x)), r || r !== !1 && o.smooth ? (v = P - u, A = x - h, o.xOffset = c + (v * a + A * d) - v, o.yOffset = _ + (v * g + A * m) - A) : o.xOffset = o.yOffset = 0, o.xOrigin = P, o.yOrigin = x, o.smooth = !!r, o.origin = e, o.originIsAbsolute = !!i, t.style[Dt] = "0px 0px", s && (be(s, o, "xOrigin", u, P), be(s, o, "yOrigin", h, x), be(s, o, "xOffset", c, o.xOffset), be(s, o, "yOffset", _, o.yOffset)), t.setAttribute("data-svg-origin", P + " " + x);
}, Xi = function(t, e) {
var i = t._gsap || new Vs(t);
if ("x" in i && !e && !i.uncache)
return i;
var r = t.style, n = i.scaleX < 0, s = "px", o = "deg", f = getComputedStyle(t), u = Qt(t, Dt) || "0", h, c, _, a, g, d, m, v, A, D, P, x, M, b, w, S, Y, I, F, O, $, Q, B, N, dt, Oe, _e, Z, G, nt, W, Yt;
return h = c = _ = d = m = v = A = D = P = 0, a = g = 1, i.svg = !!(t.getCTM && ro(t)), f.translate && ((f.translate !== "none" || f.scale !== "none" || f.rotate !== "none") && (r[rt] = (f.translate !== "none" ? "translate3d(" + (f.translate + " 0 0").split(" ").slice(0, 3).join(", ") + ") " : "") + (f.rotate !== "none" ? "rotate(" + f.rotate + ") " : "") + (f.scale !== "none" ? "scale(" + f.scale.split(" ").join(",") + ") " : "") + (f[rt] !== "none" ? f[rt] : "")), r.scale = r.rotate = r.translate = "none"), b = Tn(t, i.svg), i.svg && (i.uncache ? (dt = t.getBBox(), u = i.xOrigin - dt.x + "px " + (i.yOrigin - dt.y) + "px", N = "") : N = !e && t.getAttribute("data-svg-origin"), jr(t, N || u, !!N || i.originIsAbsolute, i.smooth !== !1, b)), x = i.xOrigin || 0, M = i.yOrigin || 0, b !== Fi && (I = b[0], F = b[1], O = b[2], $ = b[3], h = Q = b[4], c = B = b[5], b.length === 6 ? (a = Math.sqrt(I * I + F * F), g = Math.sqrt($ * $ + O * O), d = I || F ? Ke(F, I) * Ne : 0, A = O || $ ? Ke(O, $) * Ne + d : 0, A && (g *= Math.abs(Math.cos(A * ni))), i.svg && (h -= x - (x * I + M * O), c -= M - (x * F + M * $))) : (Yt = b[6], nt = b[7], _e = b[8], Z = b[9], G = b[10], W = b[11], h = b[12], c = b[13], _ = b[14], w = Ke(Yt, G), m = w * Ne, w && (S = Math.cos(-w), Y = Math.sin(-w), N = Q * S + _e * Y, dt = B * S + Z * Y, Oe = Yt * S + G * Y, _e = Q * -Y + _e * S, Z = B * -Y + Z * S, G = Yt * -Y + G * S, W = nt * -Y + W * S, Q = N, B = dt, Yt = Oe), w = Ke(-O, G), v = w * Ne, w && (S = Math.cos(-w), Y = Math.sin(-w), N = I * S - _e * Y, dt = F * S - Z * Y, Oe = O * S - G * Y, W = $ * Y + W * S, I = N, F = dt, O = Oe), w = Ke(F, I), d = w * Ne, w && (S = Math.cos(w), Y = Math.sin(w), N = I * S + F * Y, dt = Q * S + B * Y, F = F * S - I * Y, B = B * S - Q * Y, I = N, Q = dt), m && Math.abs(m) + Math.abs(d) > 359.9 && (m = d = 0, v = 180 - v), a = lt(Math.sqrt(I * I + F * F + O * O)), g = lt(Math.sqrt(B * B + Yt * Yt)), w = Ke(Q, B), A = Math.abs(w) > 2e-4 ? w * Ne : 0, P = W ? 1 / (W < 0 ? -W : W) : 0), i.svg && (N = t.getAttribute("transform"), i.forceCSS = t.setAttribute("transform", "") || !so(Qt(t, rt)), N && t.setAttribute("transform", N))), Math.abs(A) > 90 && Math.abs(A) < 270 && (n ? (a *= -1, A += d <= 0 ? 180 : -180, d += d <= 0 ? 180 : -180) : (g *= -1, A += A <= 0 ? 180 : -180)), e = e || i.uncache, i.x = h - ((i.xPercent = h && (!e && i.xPercent || (Math.round(t.offsetWidth / 2) === Math.round(-h) ? -50 : 0))) ? t.offsetWidth * i.xPercent / 100 : 0) + s, i.y = c - ((i.yPercent = c && (!e && i.yPercent || (Math.round(t.offsetHeight / 2) === Math.round(-c) ? -50 : 0))) ? t.offsetHeight * i.yPercent / 100 : 0) + s, i.z = _ + s, i.scaleX = lt(a), i.scaleY = lt(g), i.rotation = lt(d) + o, i.rotationX = lt(m) + o, i.rotationY = lt(v) + o, i.skewX = A + o, i.skewY = D + o, i.transformPerspective = P + s, (i.zOrigin = parseFloat(u.split(" ")[2]) || !e && i.zOrigin || 0) && (r[Dt] = ur(u)), i.xOffset = i.yOffset = 0, i.force3D = It.force3D, i.renderTransform = i.svg ? La : eo ? oo : Ia, i.uncache = 0, i;
}, ur = function(t) {
return (t = t.split(" "))[0] + " " + t[1];
}, Er = function(t, e, i) {
var r = wt(e);
return lt(parseFloat(e) + parseFloat(Me(t, "x", i + "px", r))) + r;
}, Ia = function(t, e) {
e.z = "0px", e.rotationY = e.rotationX = "0deg", e.force3D = 0, oo(t, e);
}, Le = "0deg", wi = "0px", ze = ") ", oo = function(t, e) {
var i = e || this, r = i.xPercent, n = i.yPercent, s = i.x, o = i.y, f = i.z, u = i.rotation, h = i.rotationY, c = i.rotationX, _ = i.skewX, a = i.skewY, g = i.scaleX, d = i.scaleY, m = i.transformPerspective, v = i.force3D, A = i.target, D = i.zOrigin, P = "", x = v === "auto" && t && t !== 1 || v === !0;
if (D && (c !== Le || h !== Le)) {
var M = parseFloat(h) * ni, b = Math.sin(M), w = Math.cos(M), S;
M = parseFloat(c) * ni, S = Math.cos(M), s = Er(A, s, b * S * -D), o = Er(A, o, -Math.sin(M) * -D), f = Er(A, f, w * S * -D + D);
}
m !== wi && (P += "perspective(" + m + ze), (r || n) && (P += "translate(" + r + "%, " + n + "%) "), (x || s !== wi || o !== wi || f !== wi) && (P += f !== wi || x ? "translate3d(" + s + ", " + o + ", " + f + ") " : "translate(" + s + ", " + o + ze), u !== Le && (P += "rotate(" + u + ze), h !== Le && (P += "rotateY(" + h + ze), c !== Le && (P += "rotateX(" + c + ze), (_ !== Le || a !== Le) && (P += "skew(" + _ + ", " + a + ze), (g !== 1 || d !== 1) && (P += "scale(" + g + ", " + d + ze), A.style[rt] = P || "translate(0, 0)";
}, La = function(t, e) {
var i = e || this, r = i.xPercent, n = i.yPercent, s = i.x, o = i.y, f = i.rotation, u = i.skewX, h = i.skewY, c = i.scaleX, _ = i.scaleY, a = i.target, g = i.xOrigin, d = i.yOrigin, m = i.xOffset, v = i.yOffset, A = i.forceCSS, D = parseFloat(s), P = parseFloat(o), x, M, b, w, S;
f = parseFloat(f), u = parseFloat(u), h = parseFloat(h), h && (h = parseFloat(h), u += h, f += h), f || u ? (f *= ni, u *= ni, x = Math.cos(f) * c, M = Math.sin(f) * c, b = Math.sin(f - u) * -_, w = Math.cos(f - u) * _, u && (h *= ni, S = Math.tan(u - h), S = Math.sqrt(1 + S * S), b *= S, w *= S, h && (S = Math.tan(h), S = Math.sqrt(1 + S * S), x *= S, M *= S)), x = lt(x), M = lt(M), b = lt(b), w = lt(w)) : (x = c, w = _, M = b = 0), (D && !~(s + "").indexOf("px") || P && !~(o + "").indexOf("px")) && (D = Me(a, "x", s, "px"), P = Me(a, "y", o, "px")), (g || d || m || v) && (D = lt(D + g - (g * x + d * b) + m), P = lt(P + d - (g * M + d * w) + v)), (r || n) && (S = a.getBBox(), D = lt(D + r / 100 * S.width), P = lt(P + n / 100 * S.height)), S = "matrix(" + x + "," + M + "," + b + "," + w + "," + D + "," + P + ")", a.setAttribute("transform", S), A && (a.style[rt] = S);
}, za = function(t, e, i, r, n) {
var s = 360, o = gt(n), f = parseFloat(n) * (o && ~n.indexOf("rad") ? Ne : 1), u = f - r, h = r + u + "deg", c, _;
return o && (c = n.split("_")[1], c === "short" && (u %= s, u !== u % (s / 2) && (u += u < 0 ? s : -s)), c === "cw" && u < 0 ? u = (u + s * Un) % s - ~~(u / s) * s : c === "ccw" && u > 0 && (u = (u - s * Un) % s - ~~(u / s) * s)), t._pt = _ = new Ct(t._pt, e, i, r, u, xa), _.e = h, _.u = "deg", t._props.push(i), _;
}, Hn = function(t, e) {
for (var i in e)
t[i] = e[i];
return t;
}, Ya = function(t, e, i) {
var r = Hn({}, i._gsap), n = "perspective,force3D,transformOrigin,svgOrigin", s = i.style, o, f, u, h, c, _, a, g;
r.svg ? (u = i.getAttribute("transform"), i.setAttribute("transform", ""), s[rt] = e, o = Xi(i, 1), $e(i, rt), i.setAttribute("transform", u)) : (u = getComputedStyle(i)[rt], s[rt] = e, o = Xi(i, 1), s[rt] = u);
for (f in de)
u = r[f], h = o[f], u !== h && n.indexOf(f) < 0 && (a = wt(u), g = wt(h), c = a !== g ? Me(i, f, u, g) : parseFloat(u), _ = parseFloat(h), t._pt = new Ct(t._pt, o, f, c, _ - c, Zr), t._pt.u = g || 0, t._props.push(f));
Hn(o, r);
};
St("padding,margin,Width,Radius", function(l, t) {
var e = "Top", i = "Right", r = "Bottom", n = "Left", s = (t < 3 ? [e, i, r, n] : [e + n, e + i, r + i, r + n]).map(function(o) {
return t < 2 ? l + o : "border" + o + l;
});
lr[t > 1 ? "border" + l : l] = function(o, f, u, h, c) {
var _, a;
if (arguments.length < 4)
return _ = s.map(function(g) {
return le(o, g, u);
}), a = _.join(" "), a.split(_[0]).length === 5 ? _[0] : a;
_ = (h + "").split(" "), a = {}, s.forEach(function(g, d) {
return a[g] = _[d] = _[d] || _[(d - 1) / 2 | 0];
}), o.init(f, a, c);
};
});
var ao = {
name: "css",
register: Kr,
targetTest: function(t) {
return t.style && t.nodeType;
},
init: function(t, e, i, r, n) {
var s = this._props, o = t.style, f = i.vars.startAt, u, h, c, _, a, g, d, m, v, A, D, P, x, M, b, w;
vn || Kr(), this.styles = this.styles || to(t), w = this.styles.props, this.tween = i;
for (d in e)
if (d !== "autoRound" && (h = e[d], !(Et[d] && Us(d, e, i, r, t, n)))) {
if (a = typeof h, g = lr[d], a === "function" && (h = h.call(i, r, t, n), a = typeof h), a === "string" && ~h.indexOf("random(") && (h = Yi(h)), g)
g(this, t, d, h, i) && (b = 1);
else if (d.substr(0, 2) === "--")
u = (getComputedStyle(t).getPropertyValue(d) + "").trim(), h += "", De.lastIndex = 0, De.test(u) || (m = wt(u), v = wt(h)), v ? m !== v && (u = Me(t, d, u, v) + v) : m && (h += m), this.add(o, "setProperty", u, h, r, n, 0, 0, d), s.push(d), w.push(d, 0, o[d]);
else if (a !== "undefined") {
if (f && d in f ? (u = typeof f[d] == "function" ? f[d].call(i, r, t, n) : f[d], gt(u) && ~u.indexOf("random(") && (u = Yi(u)), wt(u + "") || u === "auto" || (u += It.units[d] || wt(le(t, d)) || ""), (u + "").charAt(1) === "=" && (u = le(t, d))) : u = le(t, d), _ = parseFloat(u), A = a === "string" && h.charAt(1) === "=" && h.substr(0, 2), A && (h = h.substr(2)), c = parseFloat(h), d in re && (d === "autoAlpha" && (_ === 1 && le(t, "visibility") === "hidden" && c && (_ = 0), w.push("visibility", 0, o.visibility), be(this, o, "visibility", _ ? "inherit" : "hidden", c ? "inherit" : "hidden", !c)), d !== "scale" && d !== "transform" && (d = re[d], ~d.indexOf(",") && (d = d.split(",")[0]))), D = d in de, D) {
if (this.styles.save(d), a === "string" && h.substring(0, 6) === "var(--" && (h = Qt(t, h.substring(4, h.indexOf(")"))), c = parseFloat(h)), P || (x = t._gsap, x.renderTransform && !e.parseTransform || Xi(t, e.parseTransform), M = e.smoothOrigin !== !1 && x.smooth, P = this._pt = new Ct(this._pt, o, rt, 0, 1, x.renderTransform, x, 0, -1), P.dep = 1), d === "scale")
this._pt = new Ct(this._pt, x, "scaleY", x.scaleY, (A ? ii(x.scaleY, A + c) : c) - x.scaleY || 0, Zr), this._pt.u = 0, s.push("scaleY", d), d += "X";
else if (d === "transformOrigin") {
w.push(Dt, 0, o[Dt]), h = ka(h), x.svg ? jr(t, h, 0, M, 0, this) : (v = parseFloat(h.split(" ")[2]) || 0, v !== x.zOrigin && be(this, x, "zOrigin", x.zOrigin, v), be(this, o, d, ur(u), ur(h)));
continue;
} else if (d === "svgOrigin") {
jr(t, h, 1, M, 0, this);
continue;
} else if (d in no) {
za(this, x, d, _, A ? ii(_, A + h) : h);
continue;
} else if (d === "smoothOrigin") {
be(this, x, "smooth", x.smooth, h);
continue;
} else if (d === "force3D") {
x[d] = h;
continue;
} else if (d === "transform") {
Ya(this, h, t);
continue;
}
} else
d in o || (d = di(d) || d);
if (D || (c || c === 0) && (_ || _ === 0) && !ya.test(h) && d in o)
m = (u + "").substr((_ + "").length), c || (c = 0), v = wt(h) || (d in It.units ? It.units[d] : m), m !== v && (_ = Me(t, d, u, v)), this._pt = new Ct(this._pt, D ? x : o, d, _, (A ? ii(_, A + c) : c) - _, !D && (v === "px" || d === "zIndex") && e.autoRound !== !1 ? wa : Zr), this._pt.u = v || 0, m !== v && v !== "%" && (this._pt.b = u, this._pt.r = va);
else if (d in o)
Oa.call(this, t, d, u, A ? A + h : h);
else if (d in t)
this.add(t, d, u || t[d], A ? A + h : h, r, n);
else if (d !== "parseTransform") {
fn(d, h);
continue;
}
D || (d in o ? w.push(d, 0, o[d]) : typeof t[d] == "function" ? w.push(d, 2, t[d]()) : w.push(d, 1, u || t[d])), s.push(d);
}
}
b && Zs(this);
},
render: function(t, e) {
if (e.tween._time || !wn())
for (var i = e._pt; i; )
i.r(t, i.d), i = i._next;
else
e.styles.revert();
},
get: le,
aliases: re,
getSetter: function(t, e, i) {
var r = re[e];
return r && r.indexOf(",") < 0 && (e = r), e in de && e !== Dt && (t._gsap.x || le(t, "x")) ? i && Vn === i ? e === "scale" ? Sa : ba : (Vn = i || {}) && (e === "scale" ? Ca : Da) : t.style && !an(t.style[e]) ? Aa : ~e.indexOf("-") ? Ta : yn(t, e);
},
core: {
_removeProperty: $e,
_getMatrix: Tn
}
};
Pt.utils.checkPrefix = di;
Pt.core.getStyleSaver = to;
(function(l, t, e, i) {
var r = St(l + "," + t + "," + e, function(n) {
de[n] = 1;
});
St(t, function(n) {
It.units[n] = "deg", no[n] = 1;
}), re[r[13]] = l + "," + t, St(i, function(n) {
var s = n.split(":");
re[s[1]] = r[s[0]];
});
})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent", "rotation,rotationX,rotationY,skewX,skewY", "transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective", "0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");
St("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective", function(l) {
It.units[l] = "px";
});
Pt.registerPlugin(ao);
/*!
* matrix 3.13.0
* https://gsap.com
*
* Copyright 2008-2025, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license
* @author: Jack Doyle, jack@greensock.com
*/
var fe, Qe, bn, pr, Si, tr, fr, ki, jt = "transform", Jr = jt + "Origin", lo, uo = function(t) {
var e = t.ownerDocument || t;
for (!(jt in t.style) && ("msTransform" in t.style) && (jt = "msTransform", Jr = jt + "Origin"); e.parentNode && (e = e.parentNode); )
;
if (Qe = window, fr = new Ze(), e) {
fe = e, bn = e.documentElement, pr = e.body, ki = fe.createElementNS("http://www.w3.org/2000/svg", "g"), ki.style.transform = "none";
var i = e.createElement("div"), r = e.createElement("div"), n = e && (e.body || e.firstElementChild);
n && n.appendChild && (n.appendChild(i), i.appendChild(r), i.setAttribute("style", "position:static;transform:translate3d(0,0,1px)"), lo = r.offsetParent !== i, n.removeChild(i));
}
return e;
}, Ba = function(t) {
for (var e, i; t && t !== pr; )
i = t._gsap, i && i.uncache && i.get(t, "x"), i && !i.scaleX && !i.scaleY && i.renderTransform && (i.scaleX = i.scaleY = 1e-4, i.renderTransform(1, i), e ? e.push(i) : e = [i]), t = t.parentNode;
return e;
}, fo = [], ho = [], Na = function() {
return Qe.pageYOffset || fe.scrollTop || bn.scrollTop || pr.scrollTop || 0;
}, Fa = function() {
return Qe.pageXOffset || fe.scrollLeft || bn.scrollLeft || pr.scrollLeft || 0;
}, Sn = function(t) {
return t.ownerSVGElement || ((t.tagName + "").toLowerCase() === "svg" ? t : null);
}, Xa = function l(t) {
if (Qe.getComputedStyle(t).position === "fixed")
return !0;
if (t = t.parentNode, t && t.nodeType === 1)
return l(t);
}, Or = function l(t, e) {
if (t.parentNode && (fe || uo(t))) {
var i = Sn(t), r = i ? i.getAttribute("xmlns") || "http://www.w3.org/2000/svg" : "http://www.w3.org/1999/xhtml", n = i ? e ? "rect" : "g" : "div", s = e !== 2 ? 0 : 100, o = e === 3 ? 100 : 0, f = "position:absolute;display:block;pointer-events:none;margin:0;padding:0;", u = fe.createElementNS ? fe.createElementNS(r.replace(/^https/, "http"), n) : fe.createElement(n);
return e && (i ? (tr || (tr = l(t)), u.setAttribute("width", 0.01), u.setAttribute("height", 0.01), u.setAttribute("transform", "translate(" + s + "," + o + ")"), tr.appendChild(u)) : (Si || (Si = l(t), Si.style.cssText = f), u.style.cssText = f + "width:0.1px;height:0.1px;top:" + o + "px;left:" + s + "px", Si.appendChild(u))), u;
}
throw "Need document and parent.";
}, Va = function(t) {
for (var e = new Ze(), i = 0; i < t.numberOfItems; i++)
e.multiply(t.getItem(i).matrix);
return e;
}, Ua = function(t) {
var e = t.getCTM(), i;
return e || (i = t.style[jt], t.style[jt] = "none", t.appendChild(ki), e = ki.getCTM(), t.removeChild(ki), i ? t.style[jt] = i : t.style.removeProperty(jt.replace(/([A-Z])/g, "-$1").toLowerCase())), e || fr.clone();
}, Ga = function(t, e) {
var i = Sn(t), r = t === i, n = i ? fo : ho, s = t.parentNode, o = s && !i && s.shadowRoot && s.shadowRoot.appendChild ? s.shadowRoot : s, f, u, h, c, _, a;
if (t === Qe)
return t;
if (n.length || n.push(Or(t, 1), Or(t, 2), Or(t, 3)), f = i ? tr : Si, i)
r ? (h = Ua(t), c = -h.e / h.a, _ = -h.f / h.d, u = fr) : t.getBBox ? (h = t.getBBox(), u = t.transform ? t.transform.baseVal : {}, u = u.numberOfItems ? u.numberOfItems > 1 ? Va(u) : u.getItem(0).matrix : fr, c = u.a * h.x + u.c * h.y, _ = u.b * h.x + u.d * h.y) : (u = new Ze(), c = _ = 0), e && t.tagName.toLowerCase() === "g" && (c = _ = 0), (r ? i : s).appendChild(f), f.setAttribute("transform", "matrix(" + u.a + "," + u.b + "," + u.c + "," + u.d + "," + (u.e + c) + "," + (u.f + _) + ")");
else {
if (c = _ = 0, lo)
for (u = t.offsetParent, h = t; h && (h = h.parentNode) && h !== u && h.parentNode; )
(Qe.getComputedStyle(h)[jt] + "").length > 4 && (c = h.offsetLeft, _ = h.offsetTop, h = 0);
if (a = Qe.getComputedStyle(t), a.position !== "absolute" && a.position !== "fixed")
for (u = t.offsetParent; s && s !== u; )
c += s.scrollLeft || 0, _ += s.scrollTop || 0, s = s.parentNode;
h = f.style, h.top = t.offsetTop - _ + "px", h.left = t.offsetLeft - c + "px", h[jt] = a[jt], h[Jr] = a[Jr], h.position = a.position === "fixed" ? "fixed" : "absolute", o.appendChild(f);
}
return f;
}, kr = function(t, e, i, r, n, s, o) {
return t.a = e, t.b = i, t.c = r, t.d = n, t.e = s, t.f = o, t;
}, Ze = /* @__PURE__ */ function() {
function l(e, i, r, n, s, o) {
e === void 0 && (e = 1), i === void 0 && (i = 0), r === void 0 && (r = 0), n === void 0 && (n = 1), s === void 0 && (s = 0), o === void 0 && (o = 0), kr(this, e, i, r, n, s, o);
}
var t = l.prototype;
return t.inverse = function() {
var i = this.a, r = this.b, n = this.c, s = this.d, o = this.e, f = this.f, u = i * s - r * n || 1e-10;
return kr(this, s / u, -r / u, -n / u, i / u, (n * f - s * o) / u, -(i * f - r * o) / u);
}, t.multiply = function(i) {
var r = this.a, n = this.b, s = this.c, o = this.d, f = this.e, u = this.f, h = i.a, c = i.c, _ = i.b, a = i.d, g = i.e, d = i.f;
return kr(this, h * r + _ * s, h * n + _ * o, c * r + a * s, c * n + a * o, f + g * r + d * s, u + g * n + d * o);
}, t.clone = function() {
return new l(this.a, this.b, this.c, this.d, this.e, this.f);
}, t.equals = function(i) {
var r = this.a, n = this.b, s = this.c, o = this.d, f = this.e, u = this.f;
return r === i.a && n === i.b && s === i.c && o === i.d && f === i.e && u === i.f;
}, t.apply = function(i, r) {
r === void 0 && (r = {});
var n = i.x, s = i.y, o = this.a, f = this.b, u = this.c, h = this.d, c = this.e, _ = this.f;
return r.x = n * o + s * u + c || 0, r.y = n * f + s * h + _ || 0, r;
}, l;
}();
function Fe(l, t, e, i) {
if (!l || !l.parentNode || (fe || uo(l)).documentElement === l)
return new Ze();
var r = Ba(l), n = Sn(l), s = n ? fo : ho, o = Ga(l, e), f = s[0].getBoundingClientRect(), u = s[1].getBoundingClientRect(), h = s[2].getBoundingClientRect(), c = o.parentNode, _ = !i && Xa(l), a = new Ze((u.left - f.left) / 100, (u.top - f.top) / 100, (h.left - f.left) / 100, (h.top - f.top) / 100, f.left + (_ ? 0 : Fa()), f.top + (_ ? 0 : Na()));
if (c.removeChild(o), r)
for (f = r.length; f--; )
u = r[f], u.scaleX = u.scaleY = 0, u.renderTransform(1, u);
return t ? a.inverse() : a;
}
function Kn(l) {
if (l === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return l;
}
function Wa(l, t) {
l.prototype = Object.create(t.prototype), l.prototype.constructor = l, l.__proto__ = t;
}
var X, J, kt, Jt, he, Rr, ue, tn, Ci, Se, co, en, Vi, Cn, Di, Ht, Pi, er, _o, rn, hr = 0, po = function() {
return typeof window < "u";
}, go = function() {
return X || po() && (X = window.gsap) && X.registerPlugin && X;
}, we = function(t) {
return typeof t == "function";
}, Ri = function(t) {
return typeof t == "object";
}, Kt = function(t) {
return typeof t > "u";
}, ir = function() {
return !1;
}, Ii = "transform", nn = "transformOrigin", ye = function(t) {
return Math.round(t * 1e4) / 1e4;
}, Ai = Array.isArray, Zi = function(t, e) {
var i = kt.createElementNS ? kt.createElementNS((e || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), t) : kt.createElement(t);
return i.style ? i : kt.createElement(t);
}, jn = 180 / Math.PI, Ye = 1e20, Qa = new Ze(), xe = Date.now || function() {
return (/* @__PURE__ */ new Date()).getTime();
}, qe = [], si = {}, qa = 0, $a = /^(?:a|input|textarea|button|select)$/i, Jn = 0, je = {}, oe = {}, mo = function(t, e) {
var i = {}, r;
for (r in t)
i[r] = e ? t[r] * e : t[r];
return i;
}, Za = function(t, e) {
for (var i in e)
i in t || (t[i] = e[i]);
return t;
}, ts = function l(t, e) {
for (var i = t.length, r; i--; )
e ? t[i].style.touchAction = e : t[i].style.removeProperty("touch-action"), r = t[i].children, r && r.length && l(r, e);
}, yo = function() {
return qe.forEach(function(t) {
return t();
});
}, Ha = function(t) {
qe.push(t), qe.length === 1 && X.ticker.add(yo);
}, es = function() {
return !qe.length && X.ticker.remove(yo);
}, is = function(t) {
for (var e = qe.length; e--; )
qe[e] === t && qe.splice(e, 1);
X.to(es, {
overwrite: !0,
delay: 15,
duration: 0,
onComplete: es,
data: "_draggable"
});
}, Ka = function(t, e) {
for (var i in e)
i in t || (t[i] = e[i]);
return t;
}, _t = function(t, e, i, r) {
if (t.addEventListener) {
var n = Vi[e];
r = r || (co ? {
passive: !1
} : null), t.addEventListener(n || e, i, r), n && e !== n && t.addEventListener(e, i, r);
}
}, ft = function(t, e, i, r) {
if (t.removeEventListener) {
var n = Vi[e];
t.removeEventListener(n || e, i, r), n && e !== n && t.removeEventListener(e, i, r);
}
}, Xt = function(t) {
t.preventDefault && t.preventDefault(), t.preventManipulation && t.preventManipulation();
}, ja = function(t, e) {
for (var i = t.length; i--; )
if (t[i].identifier === e)
return !0;
}, Ja = function l(t) {
Cn = t.touches && hr < t.touches.length, ft(t.target, "touchend", l);
}, rs = function(t) {
Cn = t.touches && hr < t.touches.length, _t(t.target, "touchend", Ja);
}, oi = function(t) {
return J.pageYOffset || t.scrollTop || t.documentElement.scrollTop || t.body.scrollTop || 0;
}, ai = function(t) {
return J.pageXOffset || t.scrollLeft || t.documentElement.scrollLeft || t.body.scrollLeft || 0;
}, ns = function l(t, e) {
_t(t, "scroll", e), _i(t.parentNode) || l(t.parentNode, e);
}, ss = function l(t, e) {
ft(t, "scroll", e), _i(t.parentNode) || l(t.parentNode, e);
}, _i = function(t) {
return !t || t === Jt || t.nodeType === 9 || t === kt.body || t === J || !t.nodeType || !t.parentNode;
}, os = function(t, e) {
var i = e === "x" ? "Width" : "Height", r = "scroll" + i, n = "client" + i;
return Math.max(0, _i(t) ? Math.max(Jt[r], he[r]) - (J["inner" + i] || Jt[n] || he[n]) : t[r] - t[n]);
}, Ir = function l(t, e) {
var i = os(t, "x"), r = os(t, "y");
_i(t) ? t = oe : l(t.parentNode, e), t._gsMaxScrollX = i, t._gsMaxScrollY = r, e || (t._gsScrollX = t.scrollLeft || 0, t._gsScrollY = t.scrollTop || 0);
}, Lr = function(t, e, i) {
var r = t.style;
r && (Kt(r[e]) && (e = Ci(e, t) || e), i == null ? r.removeProperty && r.removeProperty(e.replace(/([A-Z])/g, "-$1").toLowerCase()) : r[e] = i);
}, Ui = function(t) {
return J.getComputedStyle(t instanceof Element ? t : t.host || (t.parentNode || {}).host || t);
}, Be = {}, Je = function(t) {
if (t === J)
return Be.left = Be.top = 0, Be.width = Be.right = Jt.clientWidth || t.innerWidth || he.clientWidth || 0, Be.height = Be.bottom = (t.innerHeight || 0) - 20 < Jt.clientHeight ? Jt.clientHeight : t.innerHeight || he.clientHeight || 0, Be;
var e = t.ownerDocument || kt, i = Kt(t.pageX) ? !t.nodeType && !Kt(t.left) && !Kt(t.top) ? t : Se(t)[0].getBoundingClientRect() : {
left: t.pageX - ai(e),
top: t.pageY - oi(e),
right: t.pageX - ai(e) + 1,
bottom: t.pageY - oi(e) + 1
};
return Kt(i.right) && !Kt(i.width) ? (i.right = i.left + i.width, i.bottom = i.top + i.height) : Kt(i.width) && (i = {
width: i.right - i.left,
height: i.bottom - i.top,
right: i.right,
left: i.left,
bottom: i.bottom,
top: i.top
}), i;
}, at = function(t, e, i) {
var r = t.vars, n = r[i], s = t._listeners[e], o;
return we(n) && (o = n.apply(r.callbackScope || t, r[i + "Params"] || [t.pointerEvent])), s && t.dispatchEvent(e) === !1 && (o = !1), o;
}, as = function(t, e) {
var i = Se(t)[0], r, n, s;
return !i.nodeType && i !== J ? Kt(t.left) ? (n = t.min || t.minX || t.minRotation || 0, r = t.min || t.minY || 0, {
left: n,
top: r,
width: (t.max || t.maxX || t.maxRotation || 0) - n,
height: (t.max || t.maxY || 0) - r
}) : (s = {
x: 0,
y: 0
}, {
left: t.left - s.x,
top: t.top - s.y,
width: t.width,
height: t.height
}) : tl(i, e);
}, Vt = {}, tl = function(t, e) {
e = Se(e)[0];
var i = t.getBBox && t.ownerSVGElement, r = t.ownerDocument || kt, n, s, o, f, u, h, c, _, a, g, d, m, v;
if (t === J)
o = oi(r), n = ai(r), s = n + (r.documentElement.clientWidth || t.innerWidth || r.body.clientWidth || 0), f = o + ((t.innerHeight || 0) - 20 < r.documentElement.clientHeight ? r.documentElement.clientHeight : t.innerHeight || r.body.clientHeight || 0);
else {
if (e === J || Kt(e))
return t.getBoundingClientRect();
n = o = 0, i ? (g = t.getBBox(), d = g.width, m = g.height) : (t.viewBox && (g = t.viewBox.baseVal) && (n = g.x || 0, o = g.y || 0, d = g.width, m = g.height), d || (v = Ui(t), g = v.boxSizing === "border-box", d = (parseFloat(v.width) || t.clientWidth || 0) + (g ? 0 : parseFloat(v.borderLeftWidth) + parseFloat(v.borderRightWidth)), m = (parseFloat(v.height) || t.clientHeight || 0) + (g ? 0 : parseFloat(v.borderTopWidth) + parseFloat(v.borderBottomWidth)))), s = d, f = m;
}
return t === e ? {
left: n,
top: o,
width: s - n,
height: f - o
} : (u = Fe(e, !0).multiply(Fe(t)), h = u.apply({
x: n,
y: o
}), c = u.apply({
x: s,
y: o
}), _ = u.apply({
x: s,
y: f
}), a = u.apply({
x: n,
y: f
}), n = Math.min(h.x, c.x, _.x, a.x), o = Math.min(h.y, c.y, _.y, a.y), {
left: n,
top: o,
width: Math.max(h.x, c.x, _.x, a.x) - n,
height: Math.max(h.y, c.y, _.y, a.y) - o
});
}, zr = function(t, e, i, r, n, s) {
var o = {}, f, u, h;
if (e)
if (n !== 1 && e instanceof Array) {
if (o.end = f = [], h = e.length, Ri(e[0]))
for (u = 0; u < h; u++)
f[u] = mo(e[u], n);
else
for (u = 0; u < h; u++)
f[u] = e[u] * n;
i += 1.1, r -= 1.1;
} else
we(e) ? o.end = function(c) {
var _ = e.call(t, c), a, g;
if (n !== 1)
if (Ri(_)) {
a = {};
for (g in _)
a[g] = _[g] * n;
_ = a;
} else
_ *= n;
return _;
} : o.end = e;
return (i || i === 0) && (o.max = i), (r || r === 0) && (o.min = r), s && (o.velocity = 0), o;
}, el = function l(t) {
var e;
return !t || !t.getAttribute || t === he ? !1 : (e = t.getAttribute("data-clickable")) === "true" || e !== "false" && ($a.test(t.nodeName + "") || t.getAttribute("contentEditable") === "true") ? !0 : l(t.parentNode);
}, Hi = function(t, e) {
for (var i = t.length, r; i--; )
r = t[i], r.ondragstart = r.onselectstart = e ? null : ir, X.set(r, {
lazy: !0,
userSelect: e ? "text" : "none"
});
}, il = function l(t) {
if (Ui(t).position === "fixed")
return !0;
if (t = t.parentNode, t && t.nodeType === 1)
return l(t);
}, xo, sn, rl = function(t, e) {
t = X.utils.toArray(t)[0], e = e || {};
var i = document.createElement("div"), r = i.style, n = t.firstChild, s = 0, o = 0, f = t.scrollTop, u = t.scrollLeft, h = t.scrollWidth, c = t.scrollHeight, _ = 0, a = 0, g = 0, d, m, v, A, D, P;
xo && e.force3D !== !1 ? (D = "translate3d(", P = "px,0px)") : Ii && (D = "translate(", P = "px)"), this.scrollTop = function(x, M) {
if (!arguments.length)
return -this.top();
this.top(-x, M);
}, this.scrollLeft = function(x, M) {
if (!arguments.length)
return -this.left();
this.left(-x, M);
}, this.left = function(x, M) {
if (!arguments.length)
return -(t.scrollLeft + o);
var b = t.scrollLeft - u, w = o;
if ((b > 2 || b < -2) && !M) {
u = t.scrollLeft, X.killTweensOf(this, {
left: 1,
scrollLeft: 1
}), this.left(-u), e.onKill && e.onKill();
return;
}
x = -x, x < 0 ? (o = x - 0.5 | 0, x = 0) : x > a ? (o = x - a | 0, x = a) : o = 0, (o || w) && (this._skip || (r[Ii] = D + -o + "px," + -s + P), o + _ >= 0 && (r.paddingRight = o + _ + "px")), t.scrollLeft = x | 0, u = t.scrollLeft;
}, this.top = function(x, M) {
if (!arguments.length)
return -(t.scrollTop + s);
var b = t.scrollTop - f, w = s;
if ((b > 2 || b < -2) && !M) {
f = t.scrollTop, X.killTweensOf(this, {
top: 1,
scrollTop: 1
}), this.top(-f), e.onKill && e.onKill();
return;
}
x = -x, x < 0 ? (s = x - 0.5 | 0, x = 0) : x > g ? (s = x - g | 0, x = g) : s = 0, (s || w) && (this._skip || (r[Ii] = D + -o + "px," + -s + P)), t.scrollTop = x | 0, f = t.scrollTop;
}, this.maxScrollTop = function() {
return g;
}, this.maxScrollLeft = function() {
return a;
}, this.disable = function() {
for (n = i.firstChild; n; )
A = n.nextSibling, t.appendChild(n), n = A;
t === i.parentNode && t.removeChild(i);
}, this.enable = function() {
if (n = t.firstChild, n !== i) {
for (; n; )
A = n.nextSibling, i.appendChild(n), n = A;
t.appendChild(i), this.calibrate();
}
}, this.calibrate = function(x) {
var M = t.clientWidth === d, b, w, S;
f = t.scrollTop, u = t.scrollLeft, !(M && t.clientHeight === m && i.offsetHeight === v && h === t.scrollWidth && c === t.scrollHeight && !x) && ((s || o) && (w = this.left(), S = this.top(), this.left(-t.scrollLeft), this.top(-t.scrollTop)), b = Ui(t), (!M || x) && (r.display = "block", r.width = "auto", r.paddingRight = "0px", _ = Math.max(0, t.scrollWidth - t.clientWidth), _ && (_ += parseFloat(b.paddingLeft) + (sn ? parseFloat(b.paddingRight) : 0))), r.display = "inline-block", r.position = "relative", r.overflow = "visible", r.verticalAlign = "top", r.boxSizing = "content-box", r.width = "100%", r.paddingRight = _ + "px", sn && (r.paddingBottom = b.paddingBottom), d = t.clientWidth, m = t.clientHeight, h = t.scrollWidth, c = t.scrollHeight, a = t.scrollWidth - d, g = t.scrollHeight - m, v = i.offsetHeight, r.display = "block", (w || S) && (this.left(w), this.top(S)));
}, this.content = i, this.element = t, this._skip = !1, this.enable();
}, Yr = function(t) {
if (po() && document.body) {
var e = window && window.navigator;
J = window, kt = document, Jt = kt.documentElement, he = kt.body, Rr = Zi("div"), er = !!window.PointerEvent, ue = Zi("div"), ue.style.cssText = "visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;cursor:grab", Pi = ue.style.cursor === "grab" ? "grab" : "move", Di = e && e.userAgent.toLowerCase().indexOf("android") !== -1, en = "ontouchstart" in Jt && "orientation" in J || e && (e.MaxTouchPoints > 0 || e.msMaxTouchPoints > 0), sn = function() {
var i = Zi("div"), r = Zi("div"), n = r.style, s = he, o;
return n.display = "inline-block", n.position = "relative", i.style.cssText = "width:90px;height:40px;padding:10px;overflow:auto;visibility:hidden", i.appendChild(r), s.appendChild(i), o = r.offsetHeight + 18 > i.scrollHeight, s.removeChild(i), o;
}(), Vi = function(i) {
for (var r = i.split(","), n = ("onpointerdown" in Rr ? "pointerdown,pointermove,pointerup,pointercancel" : "onmspointerdown" in Rr ? "MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel" : i).split(","), s = {}, o = 4; --o > -1; )
s[r[o]] = n[o], s[n[o]] = r[o];
try {
Jt.addEventListener("test", null, Object.defineProperty({}, "passive", {
get: function() {
co = 1;
}
}));
} catch {
}
return s;
}("touchstart,touchmove,touchend,touchcancel"), _t(kt, "touchcancel", ir), _t(J, "touchmove", ir), he && he.addEventListener("touchstart", ir), _t(kt, "contextmenu", function() {
for (var i in si)
si[i].isPressed && si[i].endDrag();
}), X = tn = go();
}
X ? (Ht = X.plugins.inertia, _o = X.core.context || function() {
}, Ci = X.utils.checkPrefix, Ii = Ci(Ii), nn = Ci(nn), Se = X.utils.toArray, rn = X.core.getStyleSaver, xo = !!Ci("perspective")) : t && console.warn("Please gsap.registerPlugin(Draggable)");
}, nl = /* @__PURE__ */ function() {
function l(e) {
this._listeners = {}, this.target = e || this;
}
var t = l.prototype;
return t.addEventListener = function(i, r) {
var n = this._listeners[i] || (this._listeners[i] = []);
~n.indexOf(r) || n.push(r);
}, t.removeEventListener = function(i, r) {
var n = this._listeners[i], s = n && n.indexOf(r);
s >= 0 && n.splice(s, 1);
}, t.dispatchEvent = function(i) {
var r = this, n;
return (this._listeners[i] || []).forEach(function(s) {
return s.call(r, {
type: i,
target: r.target
}) === !1 && (n = !1);
}), n;
}, l;
}(), pi = /* @__PURE__ */ function(l) {
Wa(t, l);
function t(e, i) {
var r;
r = l.call(this) || this, tn || Yr(1), e = Se(e)[0], r.styles = rn && rn(e, "transform,left,top"), Ht || (Ht = X.plugins.inertia), r.vars = i = mo(i || {}), r.target = e, r.x = r.y = r.rotation = 0, r.dragResistance = parseFloat(i.dragResistance) || 0, r.edgeResistance = isNaN(i.edgeResistance) ? 1 : parseFloat(i.edgeResistance) || 0, r.lockAxis = i.lockAxis, r.autoScroll = i.autoScroll || 0, r.lockedAxis = null, r.allowEventDefault = !!i.allowEventDefault, X.getProperty(e, "x");
var n = (i.type || "x,y").toLowerCase(), s = ~n.indexOf("x") || ~n.indexOf("y"), o = n.indexOf("rotation") !== -1, f = o ? "rotation" : s ? "x" : "left", u = s ? "y" : "top", h = !!(~n.indexOf("x") || ~n.indexOf("left") || n === "scroll"), c = !!(~n.indexOf("y") || ~n.indexOf("top") || n === "scroll"), _ = i.minimumMovement || 2, a = Kn(r), g = Se(i.trigger || i.handle || e), d = {}, m = 0, v = !1, A = i.autoScrollMarginTop || 40, D = i.autoScrollMarginRight || 40, P = i.autoScrollMarginBottom || 40, x = i.autoScrollMarginLeft || 40, M = i.clickableTest || el, b = 0, w = e._gsap || X.core.getCache(e), S = il(e), Y = function(p, T) {
return parseFloat(w.get(e, p, T));
}, I = e.ownerDocument || kt, F, O, $, Q, B, N, dt, Oe, _e, Z, G, nt, W, Yt, Bt, gi, pt, gr, pe, ge, ke, mi, mt, q, Dn, Nt, qt, mr, yr, Pn, Mt, Mn, Wi, En = function(p) {
return Xt(p), p.stopImmediatePropagation && p.stopImmediatePropagation(), !1;
}, te = function L(p) {
if (a.autoScroll && a.isDragging && (v || pt)) {
var T = e, y = a.autoScroll * 15, C, E, k, z, R, H, U, K;
for (v = !1, oe.scrollTop = J.pageYOffset != null ? J.pageYOffset : I.documentElement.scrollTop != null ? I.documentElement.scrollTop : I.body.scrollTop, oe.scrollLeft = J.pageXOffset != null ? J.pageXOffset : I.documentElement.scrollLeft != null ? I.documentElement.scrollLeft : I.body.scrollLeft, z = a.pointerX - oe.scrollLeft, R = a.pointerY - oe.scrollTop; T && !E; )
E = _i(T.parentNode), C = E ? oe : T.parentNode, k = E ? {
bottom: Math.max(Jt.clientHeight, J.innerHeight || 0),
right: Math.max(Jt.clientWidth, J.innerWidth || 0),
left: 0,
top: 0
} : C.getBoundingClientRect(), H = U = 0, c && (K = C._gsMaxScrollY - C.scrollTop, K < 0 ? U = K : R > k.bottom - P && K ? (v = !0, U = Math.min(K, y * (1 - Math.max(0, k.bottom - R) / P) | 0)) : R < k.top + A && C.scrollTop && (v = !0, U = -Math.min(C.scrollTop, y * (1 - Math.max(0, R - k.top) / A) | 0)), U && (C.scrollTop += U)), h && (K = C._gsMaxScrollX - C.scrollLeft, K < 0 ? H = K : z > k.right - D && K ? (v = !0, H = Math.min(K, y * (1 - Math.max(0, k.right - z) / D) | 0)) : z < k.left + x && C.scrollLeft && (v = !0, H = -Math.min(C.scrollLeft, y * (1 - Math.max(0, z - k.left) / x) | 0)), H && (C.scrollLeft += H)), E && (H || U) && (J.scrollTo(C.scrollLeft, C.scrollTop), vi(a.pointerX + H, a.pointerY + U)), T = C;
}
if (pt) {
var ot = a.x, vt = a.y;
o ? (a.deltaX = ot - parseFloat(w.rotation), a.rotation = ot, w.rotation = ot + "deg", w.renderTransform(1, w)) : O ? (c && (a.deltaY = vt - O.top(), O.top(vt)), h && (a.deltaX = ot - O.left(), O.left(ot))) : s ? (c && (a.deltaY = vt - parseFloat(w.y), w.y = vt + "px"), h && (a.deltaX = ot - parseFloat(w.x), w.x = ot + "px"), w.renderTransform(1, w)) : (c && (a.deltaY = vt - parseFloat(e.style.top || 0), e.style.top = vt + "px"), h && (a.deltaX = ot - parseFloat(e.style.left || 0), e.style.left = ot + "px")), Oe && !p && !mr && (mr = !0, at(a, "drag", "onDrag") === !1 && (h && (a.x -= a.deltaX), c && (a.y -= a.deltaY), L(!0)), mr = !1);
}
pt = !1;
}, Re = function(p, T) {
var y = a.x, C = a.y, E, k;
e._gsap || (w = X.core.getCache(e)), w.uncache && X.getProperty(e, "x"), s ? (a.x = parseFloat(w.x), a.y = parseFloat(w.y)) : o ? a.x = a.rotation = parseFloat(w.rotation) : O ? (a.y = O.top(), a.x = O.left()) : (a.y = parseFloat(e.style.top || (k = Ui(e)) && k.top) || 0, a.x = parseFloat(e.style.left || (k || {}).left) || 0), (pe || ge || ke) && !T && (a.isDragging || a.isThrowing) && (ke && (je.x = a.x, je.y = a.y, E = ke(je), E.x !== a.x && (a.x = E.x, pt = !0), E.y !== a.y && (a.y = E.y, pt = !0)), pe && (E = pe(a.x), E !== a.x && (a.x = E, o && (a.rotation = E), pt = !0)), ge && (E = ge(a.y), E !== a.y && (a.y = E), pt = !0)), pt && te(!0), p || (a.deltaX = a.x - y, a.deltaY = a.y - C, at(a, "throwupdate", "onThrowUpdate"));
}, xr = function(p, T, y, C) {
return T == null && (T = -Ye), y == null && (y = Ye), we(p) ? function(E) {
var k = a.isPressed ? 1 - a.edgeResistance : 1;
return p.call(a, (E > y ? y + (E - y) * k : E < T ? T + (E - T) * k : E) * C) * C;
} : Ai(p) ? function(E) {
for (var k = p.length, z = 0, R = Ye, H, U; --k > -1; )
H = p[k], U = H - E, U < 0 && (U = -U), U < R && H >= T && H <= y && (z = k, R = U);
return p[z];
} : isNaN(p) ? function(E) {
return E;
} : function() {
return p * C;
};
}, vo = function(p, T, y, C, E, k, z) {
return k = k && k < Ye ? k * k : Ye, we(p) ? function(R) {
var H = a.isPressed ? 1 - a.edgeResistance : 1, U = R.x, K = R.y, ot, vt, se;
return R.x = U = U > y ? y + (U - y) * H : U < T ? T + (U - T) * H : U, R.y = K = K > E ? E + (K - E) * H : K < C ? C + (K - C) * H : K, ot = p.call(a, R), ot !== R && (R.x = ot.x, R.y = ot.y), z !== 1 && (R.x *= z, R.y *= z), k < Ye && (vt = R.x - U, se = R.y - K, vt * vt + se * se > k && (R.x = U, R.y = K)), R;
} : Ai(p) ? function(R) {
for (var H = p.length, U = 0, K = Ye, ot, vt, se, Ft; --H > -1; )
se = p[H], ot = se.x - R.x, vt = se.y - R.y, Ft = ot * ot + vt * vt, Ft < K && (U = H, K = Ft);
return K <= k ? p[U] : R;
} : function(R) {
return R;
};
}, vr = function() {
var p, T, y, C;
dt = !1, O ? (O.calibrate(), a.minX = G = -O.maxScrollLeft(), a.minY = W = -O.maxScrollTop(), a.maxX = Z = a.maxY = nt = 0, dt = !0) : i.bounds && (p = as(i.bounds, e.parentNode), o ? (a.minX = G = p.left, a.maxX = Z = p.left + p.width, a.minY = W = a.maxY = nt = 0) : !Kt(i.bounds.maxX) || !Kt(i.bounds.maxY) ? (p = i.bounds, a.minX = G = p.minX, a.minY = W = p.minY, a.maxX = Z = p.maxX, a.maxY = nt = p.maxY) : (T = as(e, e.parentNode), a.minX = G = Math.round(Y(f, "px") + p.left - T.left), a.minY = W = Math.round(Y(u, "px") + p.top - T.top), a.maxX = Z = Math.round(G + (p.width - T.width)), a.maxY = nt = Math.round(W + (p.height - T.height))), G > Z && (a.minX = Z, a.maxX = Z = G, G = a.minX), W > nt && (a.minY = nt, a.maxY = nt = W, W = a.minY), o && (a.minRotation = G, a.maxRotation = Z), dt = !0), i.liveSnap && (y = i.liveSnap === !0 ? i.snap || {} : i.liveSnap, C = Ai(y) || we(y), o ? (pe = xr(C ? y : y.rotation, G, Z, 1), ge = null) : y.points ? ke = vo(C ? y : y.points, G, Z, W, nt, y.radius, O ? -1 : 1) : (h && (pe = xr(C ? y : y.x || y.left || y.scrollLeft, G, Z, O ? -1 : 1)), c && (ge = xr(C ? y : y.y || y.top || y.scrollTop, W, nt, O ? -1 : 1))));
}, wo = function() {
a.isThrowing = !1, at(a, "throwcomplete", "onThrowComplete");
}, Ao = function() {
a.isThrowing = !1;
}, wr = function(p, T) {
var y, C, E, k;
p && Ht ? (p === !0 && (y = i.snap || i.liveSnap || {}, C = Ai(y) || we(y), p = {
resistance: (i.throwResistance || i.resistance || 1e3) / (o ? 10 : 1)
}, o ? p.rotation = zr(a, C ? y : y.rotation, Z, G, 1, T) : (h && (p[f] = zr(a, C ? y : y.points || y.x || y.left, Z, G, O ? -1 : 1, T || a.lockedAxis === "x")), c && (p[u] = zr(a, C ? y : y.points || y.y || y.top, nt, W, O ? -1 : 1, T || a.lockedAxis === "y")), (y.points || Ai(y) && Ri(y[0])) && (p.linkedProps = f + "," + u, p.radius = y.radius))), a.isThrowing = !0, k = isNaN(i.overshootTolerance) ? i.edgeResistance === 1 ? 0 : 1 - a.edgeResistance + 0.2 : i.overshootTolerance, p.duration || (p.duration = {
max: Math.max(i.minDuration || 0, "maxDuration" in i ? i.maxDuration : 2),
min: isNaN(i.minDuration) ? k === 0 || Ri(p) && p.resistance > 1e3 ? 0 : 0.5 : i.minDuration,
overshoot: k
}), a.tween = E = X.to(O || e, {
inertia: p,
data: "_draggable",
inherit: !1,
onComplete: wo,
onInterrupt: Ao,
onUpdate: i.fastMode ? at : Re,
onUpdateParams: i.fastMode ? [a, "onthrowupdate", "onThrowUpdate"] : y && y.radius ? [!1, !0] : []
}), i.fastMode || (O && (O._skip = !0), E.render(1e9, !0, !0), Re(!0, !0), a.endX = a.x, a.endY = a.y, o && (a.endRotation = a.x), E.play(0), Re(!0, !0), O && (O._skip = !1))) : dt && a.applyBounds();
}, On = function(p) {
var T = q, y;
q = Fe(e.parentNode, !0), p && a.isPressed && !q.equals(T || new Ze()) && (y = T.inverse().apply({
x: $,
y: Q
}), q.apply(y, y), $ = y.x, Q = y.y), q.equals(Qa) && (q = null);
}, Qi = function() {
var p = 1 - a.edgeResistance, T = S ? ai(I) : 0, y = S ? oi(I) : 0, C, E, k;
s && (w.x = Y(f, "px") + "px", w.y = Y(u, "px") + "px", w.renderTransform()), On(!1), Vt.x = a.pointerX - T, Vt.y = a.pointerY - y, q && q.apply(Vt, Vt), $ = Vt.x, Q = Vt.y, pt && (vi(a.pointerX, a.pointerY), te(!0)), Mn = Fe(e), O ? (vr(), N = O.top(), B = O.left()) : (yi() ? (Re(!0, !0), vr()) : a.applyBounds(), o ? (C = e.ownerSVGElement ? [w.xOrigin - e.getBBox().x, w.yOrigin - e.getBBox().y] : (Ui(e)[nn] || "0 0").split(" "), gi = a.rotationOrigin = Fe(e).apply({
x: parseFloat(C[0]) || 0,
y: parseFloat(C[1]) || 0
}), Re(!0, !0), E = a.pointerX - gi.x - T, k = gi.y - a.pointerY + y, B = a.x, N = a.y = Math.atan2(k, E) * jn) : (N = Y(u, "px"), B = Y(f, "px"))), dt && p && (B > Z ? B = Z + (B - Z) / p : B < G && (B = G - (G - B) / p), o || (N > nt ? N = nt + (N - nt) / p : N < W && (N = W - (W - N) / p))), a.startX = B = ye(B), a.startY = N = ye(N);
}, yi = function() {
return a.tween && a.tween.isActive();
}, To = function() {
ue.parentNode && !yi() && !a.isDragging && ue.parentNode.removeChild(ue);
}, xi = function(p, T) {
var y;
if (!F || a.isPressed || !p || (p.type === "mousedown" || p.type === "pointerdown") && !T && xe() - b < 30 && Vi[a.pointerEvent.type]) {
Mt && p && F && Xt(p);
return;
}
if (Dn = yi(), Wi = !1, a.pointerEvent = p, Vi[p.type] ? (mt = ~p.type.indexOf("touch") ? p.currentTarget || p.target : I, _t(mt, "touchend", $t), _t(mt, "touchmove", Ie), _t(mt, "touchcancel", $t), _t(I, "touchstart", rs)) : (mt = null, _t(I, "mousemove", Ie)), qt = null, (!er || !mt) && (_t(I, "mouseup", $t), p && p.target && _t(p.target, "mouseup", $t)), mi = M.call(a, p.target) && i.dragClickables === !1 && !T, mi) {
_t(p.target, "change", $t), at(a, "pressInit", "onPressInit"), at(a, "press", "onPress"), Hi(g, !0), Mt = !1;
return;
}
if (Nt = !mt || h === c || a.vars.allowNativeTouchScrolling === !1 || a.vars.allowContextMenu && p && (p.ctrlKey || p.which > 2) ? !1 : h ? "y" : "x", Mt = !Nt && !a.allowEventDefault, Mt && (Xt(p), _t(J, "touchforcechange", Xt)), p.changedTouches ? (p = Yt = p.changedTouches[0], Bt = p.identifier) : p.pointerId ? Bt = p.pointerId : Yt = Bt = null, hr++, Ha(te), Q = a.pointerY = p.pageY, $ = a.pointerX = p.pageX, at(a, "pressInit", "onPressInit"), (Nt || a.autoScroll) && Ir(e.parentNode), e.parentNode && a.autoScroll && !O && !o && e.parentNode._gsMaxScrollX && !ue.parentNode && !e.getBBox && (ue.style.width = e.parentNode.scrollWidth + "px", e.parentNode.appendChild(ue)), Qi(), a.tween && a.tween.kill(), a.isThrowing = !1, X.killTweensOf(O || e, d, !0), O && X.killTweensOf(e, {
scrollTo: 1
}, !0), a.tween = a.lockedAxis = null, (i.zIndexBoost || !o && !O && i.zIndexBoost !== !1) && (e.style.zIndex = t.zIndex++), a.isPressed = !0, Oe = !!(i.onDrag || a._listeners.drag), _e = !!(i.onMove || a._listeners.move), i.cursor !== !1 || i.activeCursor)
for (y = g.length; --y > -1; )
X.set(g[y], {
cursor: i.activeCursor || i.cursor || (Pi === "grab" ? "grabbing" : Pi)
});
at(a, "press", "onPress");
}, Ie = function(p) {
var T = p, y, C, E, k, z, R;
if (!F || Cn || !a.isPressed || !p) {
Mt && p && F && Xt(p);
return;
}
if (a.pointerEvent = p, y = p.changedTouches, y) {
if (p = y[0], p !== Yt && p.identifier !== Bt) {
for (k = y.length; --k > -1 && (p = y[k]).identifier !== Bt && p.target !== e; )
;
if (k < 0)
return;
}
} else if (p.pointerId && Bt && p.pointerId !== Bt)
return;
if (mt && Nt && !qt && (Vt.x = p.pageX - (S ? ai(I) : 0), Vt.y = p.pageY - (S ? oi(I) : 0), q && q.apply(Vt, Vt), C = Vt.x, E = Vt.y, z = Math.abs(C - $), R = Math.abs(E - Q), (z !== R && (z > _ || R > _) || Di && Nt === qt) && (qt = z > R && h ? "x" : "y", Nt && qt !== Nt && _t(J, "touchforcechange", Xt), a.vars.lockAxisOnTouchScroll !== !1 && h && c && (a.lockedAxis = qt === "x" ? "y" : "x", we(a.vars.onLockAxis) && a.vars.onLockAxis.call(a, T)), Di && Nt === qt))) {
$t(T);
return;
}
!a.allowEventDefault && (!Nt || qt && Nt !== qt) && T.cancelable !== !1 ? (Xt(T), Mt = !0) : Mt && (Mt = !1), a.autoScroll && (v = !0), vi(p.pageX, p.pageY, _e);
}, vi = function(p, T, y) {
var C = 1 - a.dragResistance, E = 1 - a.edgeResistance, k = a.pointerX, z = a.pointerY, R = N, H = a.x, U = a.y, K = a.endX, ot = a.endY, vt = a.endRotation, se = pt, Ft, me, yt, ut, Ar, Zt;
a.pointerX = p, a.pointerY = T, S && (p -= ai(I), T -= oi(I)), o ? (ut = Math.atan2(gi.y - T, p - gi.x) * jn, Ar = a.y - ut, Ar > 180 ? (N -= 360, a.y = ut) : Ar < -180 && (N += 360, a.y = ut), a.x !== B || Math.max(Math.abs($ - p), Math.abs(Q - T)) > _ ? (a.y = ut, yt = B + (N - ut) * C) : yt = B) : (q && (Zt = p * q.a + T * q.c + q.e, T = p * q.b + T * q.d + q.f, p = Zt), me = T - Q, Ft = p - $, me < _ && me > -_ && (me = 0), Ft < _ && Ft > -_ && (Ft = 0), (a.lockAxis || a.lockedAxis) && (Ft || me) && (Zt = a.lockedAxis, Zt || (a.lockedAxis = Zt = h && Math.abs(Ft) > Math.abs(me) ? "y" : c ? "x" : null, Zt && we(a.vars.onLockAxis) && a.vars.onLockAxis.call(a, a.pointerEvent)), Zt === "y" ? me = 0 : Zt === "x" && (Ft = 0)), yt = ye(B + Ft * C), ut = ye(N + me * C)), (pe || ge || ke) && (a.x !== yt || a.y !== ut && !o) && (ke && (je.x = yt, je.y = ut, Zt = ke(je), yt = ye(Zt.x), ut = ye(Zt.y)), pe && (yt = ye(pe(yt))), ge && (ut = ye(ge(ut)))), dt && (yt > Z ? yt = Z + Math.round((yt - Z) * E) : yt < G && (yt = G + Math.round((yt - G) * E)), o || (ut > nt ? ut = Math.round(nt + (ut - nt) * E) : ut < W && (ut = Math.round(W + (ut - W) * E)))), (a.x !== yt || a.y !== ut && !o) && (o ? (a.endRotation = a.x = a.endX = yt, pt = !0) : (c && (a.y = a.endY = ut, pt = !0), h && (a.x = a.endX = yt, pt = !0)), !y || at(a, "move", "onMove") !== !1 ? !a.isDragging && a.isPressed && (a.isDragging = Wi = !0, at(a, "dragstart", "onDragStart")) : (a.pointerX = k, a.pointerY = z, N = R, a.x = H, a.y = U, a.endX = K, a.endY = ot, a.endRotation = vt, pt = se));
}, $t = function L(p, T) {
if (!F || !a.isPressed || p && Bt != null && !T && (p.pointerId && p.pointerId !== Bt && p.target !== e || p.changedTouches && !ja(p.changedTouches, Bt))) {
Mt && p && F && Xt(p);
return;
}
a.isPressed = !1;
var y = p, C = a.isDragging, E = a.vars.allowContextMenu && p && (p.ctrlKey || p.which > 2), k = X.delayedCall(1e-3, To), z, R, H, U, K;
if (mt ? (ft(mt, "touchend", L), ft(mt, "touchmove", Ie), ft(mt, "touchcancel", L), ft(I, "touchstart", rs)) : ft(I, "mousemove", Ie), ft(J, "touchforcechange", Xt), (!er || !mt) && (ft(I, "mouseup", L), p && p.target && ft(p.target, "mouseup", L)), pt = !1, C && (m = Jn = xe(), a.isDragging = !1), is(te), mi && !E) {
p && (ft(p.target, "change", L), a.pointerEvent = y), Hi(g, !1), at(a, "release", "onRelease"), at(a, "click", "onClick"), mi = !1;
return;
}
for (R = g.length; --R > -1; )
Lr(g[R], "cursor", i.cursor || (i.cursor !== !1 ? Pi : null));
if (hr--, p) {
if (z = p.changedTouches, z && (p = z[0], p !== Yt && p.identifier !== Bt)) {
for (R = z.length; --R > -1 && (p = z[R]).identifier !== Bt && p.target !== e; )
;
if (R < 0 && !T)
return;
}
a.pointerEvent = y, a.pointerX = p.pageX, a.pointerY = p.pageY;
}
return E && y ? (Xt(y), Mt = !0, at(a, "release", "onRelease")) : y && !C ? (Mt = !1, Dn && (i.snap || i.bounds) && wr(i.inertia || i.throwProps), at(a, "release", "onRelease"), (!Di || y.type !== "touchmove") && y.type.indexOf("cancel") === -1 && (at(a, "click", "onClick"), xe() - b < 300 && at(a, "doubleclick", "onDoubleClick"), U = y.target || e, b = xe(), K = function() {
b !== yr && a.enabled() && !a.isPressed && !y.defaultPrevented && (U.click ? U.click() : I.createEvent && (H = I.createEvent("MouseEvents"), H.initMouseEvent("click", !0, !0, J, 1, a.pointerEvent.screenX, a.pointerEvent.screenY, a.pointerX, a.pointerY, !1, !1, !1, !1, 0, null), U.dispatchEvent(H)));
}, !Di && !y.defaultPrevented && X.delayedCall(0.05, K))) : (wr(i.inertia || i.throwProps), !a.allowEventDefault && y && (i.dragClickables !== !1 || !M.call(a, y.target)) && C && (!Nt || qt && Nt === qt) && y.cancelable !== !1 ? (Mt = !0, Xt(y)) : Mt = !1, at(a, "release", "onRelease")), yi() && k.duration(a.tween.duration()), C && at(a, "dragend", "onDragEnd"), !0;
}, qi = function(p) {
if (p && a.isDragging && !O) {
var T = p.target || e.parentNode, y = T.scrollLeft - T._gsScrollX, C = T.scrollTop - T._gsScrollY;
(y || C) && (q ? ($ -= y * q.a + C * q.c, Q -= C * q.d + y * q.b) : ($ -= y, Q -= C), T._gsScrollX += y, T._gsScrollY += C, vi(a.pointerX, a.pointerY));
}
}, kn = function(p) {
var T = xe(), y = T - b < 100, C = T - m < 50, E = y && yr === b, k = a.pointerEvent && a.pointerEvent.defaultPrevented, z = y && Pn === b, R = p.isTrusted || p.isTrusted == null && y && E;
if ((E || C && a.vars.suppressClickOnDrag !== !1) && p.stopImmediatePropagation && p.stopImmediatePropagation(), y && !(a.pointerEvent && a.pointerEvent.defaultPrevented) && (!E || R && !z)) {
R && E && (Pn = b), yr = b;
return;
}
(a.isPressed || C || y) && (!R || !p.detail || !y || k) && Xt(p), !y && !C && !Wi && (p && p.target && (a.pointerEvent = p), at(a, "click", "onClick"));
}, Rn = function(p) {
return q ? {
x: p.x * q.a + p.y * q.c + q.e,
y: p.x * q.b + p.y * q.d + q.f
} : {
x: p.x,
y: p.y
};
};
return gr = t.get(e), gr && gr.kill(), r.startDrag = function(L, p) {
var T, y, C, E;
xi(L || a.pointerEvent, !0), p && !a.hitTest(L || a.pointerEvent) && (T = Je(L || a.pointerEvent), y = Je(e), C = Rn({
x: T.left + T.width / 2,
y: T.top + T.height / 2
}), E = Rn({
x: y.left + y.width / 2,
y: y.top + y.height / 2
}), $ -= C.x - E.x, Q -= C.y - E.y), a.isDragging || (a.isDragging = Wi = !0, at(a, "dragstart", "onDragStart"));
}, r.drag = Ie, r.endDrag = function(L) {
return $t(L || a.pointerEvent, !0);
}, r.timeSinceDrag = function() {
return a.isDragging ? 0 : (xe() - m) / 1e3;
}, r.timeSinceClick = function() {
return (xe() - b) / 1e3;
}, r.hitTest = function(L, p) {
return t.hitTest(a.target, L, p);
}, r.getDirection = function(L, p) {
var T = L === "velocity" && Ht ? L : Ri(L) && !o ? "element" : "start", y, C, E, k, z, R;
return T === "element" && (z = Je(a.target), R = Je(L)), y = T === "start" ? a.x - B : T === "velocity" ? Ht.getVelocity(e, f) : z.left + z.width / 2 - (R.left + R.width / 2), o ? y < 0 ? "counter-clockwise" : "clockwise" : (p = p || 2, C = T === "start" ? a.y - N : T === "velocity" ? Ht.getVelocity(e, u) : z.top + z.height / 2 - (R.top + R.height / 2), E = Math.abs(y / C), k = E < 1 / p ? "" : y < 0 ? "left" : "right", E < p && (k !== "" && (k += "-"), k += C < 0 ? "up" : "down"), k);
}, r.applyBounds = function(L, p) {
var T, y, C, E, k, z;
if (L && i.bounds !== L)
return i.bounds = L, a.update(!0, p);
if (Re(!0), vr(), dt && !yi()) {
if (T = a.x, y = a.y, T > Z ? T = Z : T < G && (T = G), y > nt ? y = nt : y < W && (y = W), (a.x !== T || a.y !== y) && (C = !0, a.x = a.endX = T, o ? a.endRotation = T : a.y = a.endY = y, pt = !0, te(!0), a.autoScroll && !a.isDragging))
for (Ir(e.parentNode), E = e, oe.scrollTop = J.pageYOffset != null ? J.pageYOffset : I.documentElement.scrollTop != null ? I.documentElement.scrollTop : I.body.scrollTop, oe.scrollLeft = J.pageXOffset != null ? J.pageXOffset : I.documentElement.scrollLeft != null ? I.documentElement.scrollLeft : I.body.scrollLeft; E && !z; )
z = _i(E.parentNode), k = z ? oe : E.parentNode, c && k.scrollTop > k._gsMaxScrollY && (k.scrollTop = k._gsMaxScrollY), h && k.scrollLeft > k._gsMaxScrollX && (k.scrollLeft = k._gsMaxScrollX), E = k;
a.isThrowing && (C || a.endX > Z || a.endX < G || a.endY > nt || a.endY < W) && wr(i.inertia || i.throwProps, C);
}
return a;
}, r.update = function(L, p, T) {
if (p && a.isPressed) {
var y = Fe(e), C = Mn.apply({
x: a.x - B,
y: a.y - N
}), E = Fe(e.parentNode, !0);
E.apply({
x: y.e - C.x,
y: y.f - C.y
}, C), a.x -= C.x - E.e, a.y -= C.y - E.f, te(!0), Qi();
}
var k = a.x, z = a.y;
return On(!p), L ? a.applyBounds() : (pt && T && te(!0), Re(!0)), p && (vi(a.pointerX, a.pointerY), pt && te(!0)), a.isPressed && !p && (h && Math.abs(k - a.x) > 0.01 || c && Math.abs(z - a.y) > 0.01 && !o) && Qi(), a.autoScroll && (Ir(e.parentNode, a.isDragging), v = a.isDragging, te(!0), ss(e, qi), ns(e, qi)), a;
}, r.enable = function(L) {
var p = {
lazy: !0
}, T, y, C;
if (i.cursor !== !1 && (p.cursor = i.cursor || Pi), X.utils.checkPrefix("touchCallout") && (p.touchCallout = "none"), L !== "soft") {
for (ts(g, h === c ? "none" : i.allowNativeTouchScrolling && e.scrollHeight === e.clientHeight == (e.scrollWidth === e.clientHeight) || i.allowEventDefault ? "manipulation" : h ? "pan-y" : "pan-x"), y = g.length; --y > -1; )
C = g[y], er || _t(C, "mousedown", xi), _t(C, "touchstart", xi), _t(C, "click", kn, !0), X.set(C, p), C.getBBox && C.ownerSVGElement && h !== c && X.set(C.ownerSVGElement, {
touchAction: i.allowNativeTouchScrolling || i.allowEventDefault ? "manipulation" : h ? "pan-y" : "pan-x"
}), i.allowContextMenu || _t(C, "contextmenu", En);
Hi(g, !1);
}
return ns(e, qi), F = !0, Ht && L !== "soft" && Ht.track(O || e, s ? "x,y" : o ? "rotation" : "top,left"), e._gsDragID = T = e._gsDragID || "d" + qa++, si[T] = a, O && (O.enable(), O.element._gsDragID = T), (i.bounds || o) && Qi(), i.bounds && a.applyBounds(), a;
}, r.disable = function(L) {
for (var p = a.isDragging, T = g.length, y; --T > -1; )
Lr(g[T], "cursor", null);
if (L !== "soft") {
for (ts(g, null), T = g.length; --T > -1; )
y = g[T], Lr(y, "touchCallout", null), ft(y, "mousedown", xi), ft(y, "touchstart", xi), ft(y, "click", kn, !0), ft(y, "contextmenu", En);
Hi(g, !0), mt && (ft(mt, "touchcancel", $t), ft(mt, "touchend", $t), ft(mt, "touchmove", Ie)), ft(I, "mouseup", $t), ft(I, "mousemove", Ie);
}
return ss(e, qi), F = !1, Ht && L !== "soft" && (Ht.untrack(O || e, s ? "x,y" : o ? "rotation" : "top,left"), a.tween && a.tween.kill()), O && O.disable(), is(te), a.isDragging = a.isPressed = mi = !1, p && at(a, "dragend", "onDragEnd"), a;
}, r.enabled = function(L, p) {
return arguments.length ? L ? a.enable(p) : a.disable(p) : F;
}, r.kill = function() {
return a.isThrowing = !1, a.tween && a.tween.kill(), a.disable(), X.set(g, {
clearProps: "userSelect"
}), delete si[e._gsDragID], a;
}, r.revert = function() {
this.kill(), this.styles && this.styles.revert();
}, ~n.indexOf("scroll") && (O = r.scrollProxy = new rl(e, Za({
onKill: function() {
a.isPressed && $t(null);
}
}, i)), e.style.overflowY = c && !en ? "auto" : "hidden", e.style.overflowX = h && !en ? "auto" : "hidden", e = O.content), o ? d.rotation = 1 : (h && (d[f] = 1), c && (d[u] = 1)), w.force3D = "force3D" in i ? i.force3D : !0, _o(Kn(r)), r.enable(), r;
}
return t.register = function(i) {
X = i, Yr();
}, t.create = function(i, r) {
return tn || Yr(!0), Se(i).map(function(n) {
return new t(n, r);
});
}, t.get = function(i) {
return si[(Se(i)[0] || {})._gsDragID];
}, t.timeSinceDrag = function() {
return (xe() - Jn) / 1e3;
}, t.hitTest = function(i, r, n) {
if (i === r)
return !1;
var s = Je(i), o = Je(r), f = s.top, u = s.left, h = s.right, c = s.bottom, _ = s.width, a = s.height, g = o.left > h || o.right < u || o.top > c || o.bottom < f, d, m, v;
return g || !n ? !g : (v = (n + "").indexOf("%") !== -1, n = parseFloat(n) || 0, d = {
left: Math.max(u, o.left),
top: Math.max(f, o.top)
}, d.width = Math.min(h, o.right) - d.left, d.height = Math.min(c, o.bottom) - d.top, d.width < 0 || d.height < 0 ? !1 : v ? (n *= 0.01, m = d.width * d.height, m >= _ * a * n || m >= o.width * o.height * n) : d.width > n && d.height > n);
}, t;
}(nl);
Ka(pi.prototype, {
pointerX: 0,
pointerY: 0,
startX: 0,
startY: 0,
deltaX: 0,
deltaY: 0,
isDragging: !1,
isPressed: !1
});
pi.zIndex = 1e3;
pi.version = "3.13.0";
go() && X.registerPlugin(pi);
var ve = Pt.registerPlugin(ao) || Pt;
ve.core.Tween;
const sl = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC5SURBVHgBnVIxDsMgDDRVp8zJmDwieUR+kqx5BX9iZoWZGVaYWSl2BWqlgtqeZMnYOttnw1IG/Ih7L+mcA611fS/LAtu29UnGGJBSQoyRDAlotx5p33e4rov8YRiI+NV4nHNY1xUYYxBCoHizE1YthOM4SM88z89k6iAv4WOcSNbapJRKxT/PM3nvm8VIkxCCxpmmqY40jmNTa9WUO7xp6KGSymaw2+tBmyTcDI6Dt8Bj4qp7YP/8vQeM86nr/HcMoQAAAABJRU5ErkJggg==", ol = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAl0lEQVR4nO2SawqDQAwGcworvWI9rth6mikLEeJaH9CNomZg0R9ZvzGJSBD8AYocBSGgxAgklvAoiCVU9mj1C6i3jiDVpjulwhvNeecSvwQ0PNUmmhICFdDqB3vgOScAPEztx9a6SGAE3MKXJAYB9/CZ+Q5P+z7Zk+Iw7oTF7883SOwXno2j0+Pb9pVOVHJZKMR5BYJb8AUh2BBbQ/uxeQAAAABJRU5ErkJggg==", al = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAABBUlEQVR4nO3ZTQqDMBAF4HeKPOkV2+MWbE9jKXUhRcQk8xeZt3Il8xFNZgiQyWQyV8odwORdBH41fGtpygPAAmB2xkxrDctaU3UKgOf6gjeAG+zDTQ2vnho8MZRCeGIojfDAUAthiaE2wgJjhtDEmCM0MG4ISYw7QgITBtGDCYdowYRF1GDCI85ghkEcYYZD7M0Q899zhEGteWWGW4lttp+T53DWlUt8Wtz5sSOMzVU52p2GwfDEFhsew4pzIiyGDYddOAw7TuwwGAq0He4YCvZObhgqNIDmGCp2sWYYi1a8aGMs54mihfEYioo0xnOyK1KYCONpkcBc5urtMpehmUwmg3D5AAklyc9YEtl/AAAAAElFTkSuQmCC", ll = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAABSElEQVR4nN2VXUrDUBCFQ6T6YBXchvXNDdQNiILoGloKjS6idB3+PLgOd6CitQoqgu/+IJZCPxk5wqXc5uYSA+KBC4GZzJdMZk6S5N8JeAJ2dL0A7AGnwD3wAbwDA+AE2AXmYwGmMdADHgjrDtiOBUwXyIB1YAVYBBpAFzh38vpAGguYWBtyclOgBXz+QIoAnqcgjwXuaTqQraQKAW0BboFaFYA54EKQ7ymsApIJcFwVoCHAwBc8s1MSsCTAqy/4pmC9BGBZNV58wRsFV0sA1vJaZN5i6pYAHKjGoS9oxoXWP7zy/jG9nDmm5oryHVMriRTQ0b3DmYtmrqgkW/tmRPENYCTv2gwl9x1I21490JaOipt6RZ4mdSBo/TMtUV3HpmXf6flE/4/i385cUcYV0jDYlhxIzSbCvAW41jLauQKOFPt95/xT+gIur2ty9+xDaAAAAABJRU5ErkJggg==", ul = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAACxMAAAsTAQCanBgAAAF8SURBVEhL3dQ9TlVhEMbxORCwAE1cgG4AOzaAhZYKicE1SEjETZC7CUsLO10DndEGKYyYqNFo7UeMhuiPwjnkZY5cuEjFP7l5k3nmPHPynrlPxLkGs1jFI7zCd/zAWzzGXVzI3jv4UD2OBCt443jeYRN7UH0GYAqjxmAb97GAOVzGIjb+9QLVb0Bj/hP3MFV7evL6/px4AJYb86WqV/C+Ncen2nMAZrCbjWtV/29yC+Alpqt+Wtr7Xc7zYdd1v5v62ZB7DgtVOxPwNQdcrNokYAtbtR74kgMuVe2kYD49vvW19ht8zvNqU5uU/tmDdW0HPMvzZlOblBt5Pi/1Q2u6c5o1zYjZTo/Vqvd/tNfZsF7148hYkfk0W/WIv023Mlt+4XrVjwJLGS+wUvVDZPTKIevjrgvTWGvMR7VnQN7lZpOSO3iAa7mG8xndGxkrPaNxyTsgr6v/JuPYRR8zA7paaMFMRNzO32JEXEnpY0S8iIgnEfG067q98ug5Yh9zCB8R6+LIzwAAAABJRU5ErkJggg==", fl = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAABfElEQVR4nO2WwUoCURSGh0w35TKhV7DeIVvXIqN8BTEsracIX8Os98hFEG2yICNt39Za1OqLY//AWYRyZ0SC/OGCjPc/3+XeM/+dKFrorwjIARXgEugDHxr2u6P/crOG7gNDpmsAlGcBXAJarvA9cAIUgRWNDaAB9Ny8c/OmAbdU6BOoTiqmRdY0dwxPs72o0FaAr+Tge0kaaShzNcGij+R9AbIhxoo70+CzAjLAg2ochBivZDoOhboaTdW4CDE9y1RMAbZuN/VDTCOZ8u5Zl+nquvl5PRvNA3z9C/h93lu9GXd2iKkjUyMF+Ew12klep16K1+lRNQ5DA2QgYy0BuC6vhdByqLkss8VfKcC3DXzJuxu66LF0y8Rwi8FMNHl76w76BhSiJOLnxonhKAabCodVDeveU3emMTSenwxusltGgT9Nr8COwVxWp4ZnLfAte4EnCwZ9+tiC2ta9vpFmCg8VsOa+TGyx69F/gRfctt/ODezgd8DNXMELRdI3K0JEmSkhkkUAAAAASUVORK5CYII=", hl = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAABkUlEQVR4nO2WMU4CQRiFNyI0SimJV0DvINZaqFGuQDAq6CkM10D0HlIYjY1oIgawt1ULrT7z69tkNCwwu0hM5CWTkJ335htmZ/+ZIJjqrwjIAEXgFGgDr2r2u6G+zLihW0CP4eoCm+MAzgA1Z+Ab4ADIA3NqS0AFaDm+Y8smAdc00BtQGjSYJlmW9xOeZHnRQCseuYID34izkXoKlyI8l8BFRN+ush0g7QMuOu+07/Kqn4i+FHAry7YP+Eyh/QGeSLD6q7Kc+IAfFMonANtuN7V9wM8KZZ1nTYar6fizevY8CfB5H/DLpJd6WZaOD7ihUCUB+EiWepzPqZXgc7qTZce3gHQVLEd4mu47/dG3p6wVodmRwSY7ZRS28lcIRhSwCrwruz5q7pt0yoRwK4OpAd6U/mkIfQJyQRzxdeKEcFQGqyoO82q2ew+ddxpCQ388uMlOGRX8YXoE1gzm1OrE8LQVfKu9wL0VBl19bEJ1273uRhor3FfAgnMzsckuBv8FnnOW/WpiYAd+HXVrmSr4bX0AViaDcsU1hz8AAAAASUVORK5CYII=";
var cl = function() {
var l = this, t = l.$createElement, e = l._self._c || t;
return e("div", {
staticClass: "image-preview-container",
style: {
width: l.width || "100%",
height: l.height || "auto",
borderRadius: l.radius
}
}, [e("div", {
staticClass: "thumbnail-wrapper",
on: {
click: l.expandImage
}
}, [e("img", {
staticClass: "preview-thumbnail",
style: {
aspectRatio: l.ratio
},
attrs: {
src: l.previewImage
}
})]), e("div", {
staticClass: "expand-icon",
on: {
click: l.expandImage
}
}, [e("img", {
attrs: {
src: l.expandIcon,
alt: "Expand"
}
})]), l.showViewer ? e("div", {
staticClass: "modal-viewer"
}, [e("button", {
staticClass: "back-button",
on: {
click: l.closeModal
}
}, [e("img", {
staticStyle: {
width: "18px",
height: "18px"
},
attrs: {
src: l.closeIcon,
alt: "Close"
}
})]), e("div", {
ref: "wrapper",
staticClass: "image-wrapper",
style: {
cursor: l.scaleSize > 1 ? "move" : "default",
pointerEvents: l.scaleSize > 1 ? "auto" : "none"
}
}, [e("div", {
class: `g-image-preview-wrapper-${this.imageId}`,
style: {
height: "100vh !important",
cursor: l.scaleSize > 1 ? "move" : "default",
maxHeight: "100vh !important",
maxWidth: "100vw !important",
cursor: l.scaleSize > 1 ? "move" : "default",
pointerEvents: l.scaleSize > 1 ? "auto" : "none",
transition: "0.3s ease-in-out",
overflow: "hidden",
display: "flex",
alignItems: "center",
justifyContent: "center"
}
}, [e("img", {
ref: `imageElement${l.imageId}`,
staticClass: "image-zoomable",
style: {
objectFit: l.isMobile ? "cover" : "none"
},
attrs: {
src: l.previewImage
}
})])]), e("div", {
staticClass: "controls"
}, [e("button", {
on: {
click: l.zoomIn
}
}, [e("img", {
staticStyle: {
width: "18px",
height: "18px"
},
attrs: {
src: l.zoominIcon,
alt: "Zoom In"
}
})]), e("button", {
on: {
click: l.zoomOut
}
}, [e("img", {
staticStyle: {
width: "18px",
height: "18px"
},
attrs: {
src: l.zoomoutIcon,
alt: "Zoom Out"
}
})]), e("button", {
on: {
click: l.rotateLeft
}
}, [e("img", {
staticStyle: {
width: "16px",
height: "16px"
},
attrs: {
src: l.rotateLeftIcon,
alt: "Rotate Left"
}
})]), e("button", {
on: {
click: l.rotateRight
}
}, [e("img", {
staticStyle: {
width: "16px",
height: "16px"
},
attrs: {
src: l.rotateRightIcon,
alt: "Rotate Left"
}
})]), l.downloadable ? e("button", {
on: {
click: l.downloadImage
}
}, [e("img", {
staticStyle: {
width: "20px",
height: "20px"
},
attrs: {
src: l.downloadIcon,
alt: "Download"
}
})]) : l._e()])]) : l._e()]);
}, dl = [];
function _l(l, t, e, i, r, n, s, o) {
var f = typeof l == "function" ? l.options : l;
t && (f.render = t, f.staticRenderFns = e, f._compiled = !0), i && (f.functional = !0), n && (f._scopeId = "data-v-" + n);
var u;
if (s ? (u = function(_) {
_ = _ || // cached call
this.$vnode && this.$vnode.ssrContext || // stateful
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !_ && typeof __VUE_SSR_CONTEXT__ < "u" && (_ = __VUE_SSR_CONTEXT__), r && r.call(this, _), _ && _._registeredComponents && _._registeredComponents.add(s);
}, f._ssrRegister = u) : r && (u = o ? function() {
r.call(
this,
(f.functional ? this.parent : this).$root.$options.shadowRoot
);
} : r), u)
if (f.functional) {
f._injectStyles = u;
var h = f.render;
f.render = function(a, g) {
return u.call(g), h(a, g);
};
} else {
var c = f.beforeCreate;
f.beforeCreate = c ? [].concat(c, u) : [u];
}
return {
exports: l,
options: f
};
}
const pl = {
name: "ZoomsterImagePreview",
props: {
radius: {
type: String,
default: "0"
},
ratio: {
type: String,
default: "16/9"
},
previewImage: {
type: String,
default: ""
},
imageId: {
type: String,
default: "1"
},
width: {
type: String,
default: "100%"
},
height: {
type: String,
default: "auto"
},
downloadable: {
type: Boolean,
default: !1
}
},
data() {
return {
rotatePosition: 0,
scaleSize: 1,
showViewer: !1,
isLandscape: !1,
imageElement: `imageElement${this.imageId}`,
expandIcon: sl,
downloadIcon: ol,
closeIcon: al,
zoomoutIcon: fl,
zoominIcon: hl,
rotateLeftIcon: ll,
rotateRightIcon: ul
};
},
computed: {
isMobile() {
return window && window.innerWidth <= 768;
}
},
watch: {
scaleSize(l, t) {
l < t && this.resetDraggable();
}
},
mounted() {
ve.registerPlugin(pi);
},
methods: {
expandImage() {
this.showViewer = !0, this.resetDraggable(), this.$nextTick(() => {
const l = this.$refs[this.imageElement];
pi.create(l, {
type: "x,y",
bounds: `.g-image-preview-wrapper-${this.imageId}`,
edgeResistance: 1,
dragClickables: !0,
allowContextMenu: !0,
zIndexBoost: !1,
minimumMovement: 2,
onDragEnd: () => {
this.isMobile || setTimeout(() => {
this.resetDraggable();
}, 6e4);
},
onPress() {
ve.set(l, { willChange: "transform" });
},
onRelease() {
ve.set(l, { clearProps: "willChange" });
}
});
});
},
zoomIn() {
this.scaleSize += 0.5, this.gsapScaleTo(this.scaleSize);
},
zoomOut() {
this.scaleSize <= 1 ? (this.scaleSize = 1, this.gsapScaleTo(this.scaleSize)) : (this.scaleSize -= 0.5, this.gsapScaleTo(this.scaleSize));
},
rotateLeft() {
this.rotatePosition -= 90, this.scaleSize = 1, this.gsapScaleTo(this.scaleSize), this.gsapRotateTo(this.rotatePosition), Math.abs(this.rotatePosition) % 180 === 90 ? this.isLandscape = !0 : this.isLandscape = !1, this.resetDraggable();
},
rotateRight() {
this.rotatePosition += 90, this.scaleSize = 1, this.gsapScaleTo(this.scaleSize), this.gsapRotateTo(this.rotatePosition), Math.abs(this.rotatePosition) % 180 === 90 ? this.isLandscape = !0 : this.isLandscape = !1, this.resetDraggable();
},
downloadImage() {
const l = document.createElement("a");
l.href = this.previewImage, l.download = "image.jpg", document.body.appendChild(l), l.click(), document.body.removeChild(l);
},
closeModal() {
this.resetDraggable(), this.showViewer = !1;
const l = this.$refs[this.imageElement];
setTimeout(() => {
this.scaleSize = 1, this.rotatePosition = 0, ve.to(l, {
duration: 0.5,
rotate: 0,
scale: 1,
ease: "power4.out"
});
}, 200);
},
resetDraggable() {
const l = this.$refs[this.imageElement];
ve.to(l, {
duration: 0.5,
x: 0,
y: 0,
ease: "power4.out"
});
},
gsapRotateTo(l) {
const t = this.$refs[this.imageElement];
ve.to(t, {
duration: 0.15,
rotate: l,
ease: "power4.out"
});
},
gsapScaleTo(l) {
const t = this.$refs[this.imageElement];
ve.to(t, {
duration: 0.15,
scale: l,
ease: "none"
});
}
}
}, ls = {};
var gl = /* @__PURE__ */ _l(
pl,
cl,
dl,
!1,
ml,
null,
null,
null
);
function ml(l) {
for (let t in ls)
this[t] = ls[t];
}
const yl = /* @__PURE__ */ function() {
return gl.exports;
}();
export {
yl as default
};