/*! For license information please see main.js.LICENSE.txt */
!(function (t) {
var e = {};
function i(n) {
if (e[n]) return e[n].exports;
var r = (e[n] = { i: n, l: !1, exports: {} });
return t[n].call(r.exports, r, r.exports, i), (r.l = !0), r.exports;
}
(i.m = t),
(i.c = e),
(i.d = function (t, e, n) {
i.o(t, e) || Object.defineProperty(t, e, { enumerable: !0, get: n });
}),
(i.r = function (t) {
"undefined" != typeof Symbol &&
Symbol.toStringTag &&
Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }),
Object.defineProperty(t, "__esModule", { value: !0 });
}),
(i.t = function (t, e) {
if ((1 & e && (t = i(t)), 8 & e)) return t;
if (4 & e && "object" == typeof t && t && t.__esModule) return t;
var n = Object.create(null);
if (
(i.r(n),
Object.defineProperty(n, "default", { enumerable: !0, value: t }),
2 & e && "string" != typeof t)
)
for (var r in t)
i.d(
n,
r,
function (e) {
return t[e];
}.bind(null, r)
);
return n;
}),
(i.n = function (t) {
var e =
t && t.__esModule
? function () {
return t.default;
}
: function () {
return t;
};
return i.d(e, "a", e), e;
}),
(i.o = function (t, e) {
return Object.prototype.hasOwnProperty.call(t, e);
}),
(i.p = "/"),
i((i.s = 71));
})({
0: function (t, e, i) {
"use strict";
function n(t, e) {
for (var i = 0; i < e.length; i++) {
var n = e[i];
(n.enumerable = n.enumerable || !1),
(n.configurable = !0),
"value" in n && (n.writable = !0),
Object.defineProperty(t, n.key, n);
}
}
i.d(e, "a", function () {
return r;
});
var r = (function () {
function t() {
!(function (t, e) {
if (!(t instanceof e))
throw new TypeError("Cannot call a class as a function");
})(this, t);
}
var e, i, r;
return (
(e = t),
(r = [
{
key: "ready",
value: function (t) {
"loading" != document.readyState
? t()
: document.addEventListener("DOMContentLoaded", t);
},
},
{
key: "addClass",
value: function (t, e) {
t.classList ? t.classList.add(e) : (t.className += " " + e);
},
},
{
key: "removeClass",
value: function (t, e) {
t.classList
? t.classList.remove(e)
: (t.className = t.className.replace(
new RegExp(
"(^|\\b)" + e.split(" ").join("|") + "(\\b|$)",
"gi"
),
" "
));
},
},
{
key: "hasClass",
value: function (t, e) {
return t.classList
? t.classList.contains(e)
: new RegExp("(\\s|^)" + e + "(\\s|$)").test(t.cl);
},
},
{
key: "toggleClass",
value: function (e, i) {
t.hasClass(e, i) ? t.removeClass(e, i) : t.addClass(e, i);
},
},
{
key: "getOne",
value: function (t) {
var e =
arguments.length > 1 && void 0 !== arguments[1]
? arguments[1]
: document;
return e.querySelector(t);
},
},
{
key: "getAll",
value: function (t) {
var e =
arguments.length > 1 && void 0 !== arguments[1]
? arguments[1]
: document;
return e.querySelectorAll(t);
},
},
{
key: "getData",
value: function (t, e) {
return t.dataset
? t.dataset[e]
: t.getAttribute("data-".concat(e));
},
},
{
key: "setData",
value: function (t, e, i) {
if (!t.dataset) return t.setAttribute("data-".concat(e), i);
t.dataset[e] = i;
},
},
]),
(i = null) && n(e.prototype, i),
r && n(e, r),
t
);
})();
},
114: function (t, e, i) {
"use strict";
i.r(e);
i(72);
var n = i(0);
function r(t, e) {
var i;
if ("undefined" == typeof Symbol || null == t[Symbol.iterator]) {
if (
Array.isArray(t) ||
(i = (function (t, e) {
if (!t) return;
if ("string" == typeof t) return s(t, e);
var i = Object.prototype.toString.call(t).slice(8, -1);
"Object" === i && t.constructor && (i = t.constructor.name);
if ("Map" === i || "Set" === i) return Array.from(t);
if (
"Arguments" === i ||
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)
)
return s(t, e);
})(t)) ||
(e && t && "number" == typeof t.length)
) {
i && (t = i);
var n = 0,
r = function () {};
return {
s: r,
n: function () {
return n >= t.length ? { done: !0 } : { done: !1, value: t[n++] };
},
e: function (t) {
throw t;
},
f: r,
};
}
throw new TypeError(
"Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
}
var a,
o = !0,
l = !1;
return {
s: function () {
i = t[Symbol.iterator]();
},
n: function () {
var t = i.next();
return (o = t.done), t;
},
e: function (t) {
(l = !0), (a = t);
},
f: function () {
try {
o || null == i.return || i.return();
} finally {
if (l) throw a;
}
},
};
}
function s(t, e) {
(null == e || e > t.length) && (e = t.length);
for (var i = 0, n = new Array(e); i < e; i++) n[i] = t[i];
return n;
}
function a(t, e) {
for (var i = 0; i < e.length; i++) {
var n = e[i];
(n.enumerable = n.enumerable || !1),
(n.configurable = !0),
"value" in n && (n.writable = !0),
Object.defineProperty(t, n.key, n);
}
}
var o = (function () {
function t() {
!(function (t, e) {
if (!(t instanceof e))
throw new TypeError("Cannot call a class as a function");
})(this, t),
(this.stateElem = document.documentElement),
(this.openClass = "nav-open"),
(this.triggerSelector = ".js_nav-trigger"),
(this.dropdownNavItems =
document.querySelectorAll(".nav__level-1-li")),
(this.bodyWrapperOverlay = document.querySelector(
".js_nav-open-overlay"
)),
this.init();
}
var e, i, s;
return (
(e = t),
(i = [
{
key: "init",
value: function () {
var t,
e = this,
i = r(n.a.getAll(this.triggerSelector));
try {
for (i.s(); !(t = i.n()).done; )
t.value.addEventListener("click", function (t) {
e.toggleState();
});
} catch (t) {
i.e(t);
} finally {
i.f();
}
var s,
a = r(this.dropdownNavItems);
try {
for (a.s(); !(s = a.n()).done; ) {
var o = s.value;
o.addEventListener("mouseenter", function (t) {
n.a.toggleClass(t.target, "dropdown-open"),
t.stopPropagation();
}),
o.addEventListener("mouseleave", function (t) {
n.a.toggleClass(t.target, "dropdown-open"),
t.stopPropagation();
});
}
} catch (t) {
a.e(t);
} finally {
a.f();
}
this.bodyWrapperOverlay.addEventListener("click", function (t) {
e.close();
});
},
},
{
key: "open",
value: function () {
n.a.addClass(this.stateElem, this.openClass);
},
},
{
key: "close",
value: function () {
n.a.removeClass(this.stateElem, this.openClass);
},
},
{
key: "toggleState",
value: function () {
n.a.toggleClass(this.stateElem, this.openClass);
},
},
]) && a(e.prototype, i),
s && a(e, s),
t
);
})();
function l(t, e) {
var i;
if ("undefined" == typeof Symbol || null == t[Symbol.iterator]) {
if (
Array.isArray(t) ||
(i = (function (t, e) {
if (!t) return;
if ("string" == typeof t) return u(t, e);
var i = Object.prototype.toString.call(t).slice(8, -1);
"Object" === i && t.constructor && (i = t.constructor.name);
if ("Map" === i || "Set" === i) return Array.from(t);
if (
"Arguments" === i ||
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)
)
return u(t, e);
})(t)) ||
(e && t && "number" == typeof t.length)
) {
i && (t = i);
var n = 0,
r = function () {};
return {
s: r,
n: function () {
return n >= t.length ? { done: !0 } : { done: !1, value: t[n++] };
},
e: function (t) {
throw t;
},
f: r,
};
}
throw new TypeError(
"Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
}
var s,
a = !0,
o = !1;
return {
s: function () {
i = t[Symbol.iterator]();
},
n: function () {
var t = i.next();
return (a = t.done), t;
},
e: function (t) {
(o = !0), (s = t);
},
f: function () {
try {
a || null == i.return || i.return();
} finally {
if (o) throw s;
}
},
};
}
function u(t, e) {
(null == e || e > t.length) && (e = t.length);
for (var i = 0, n = new Array(e); i < e; i++) n[i] = t[i];
return n;
}
function h(t, e) {
for (var i = 0; i < e.length; i++) {
var n = e[i];
(n.enumerable = n.enumerable || !1),
(n.configurable = !0),
"value" in n && (n.writable = !0),
Object.defineProperty(t, n.key, n);
}
}
var c = (function () {
function t() {
!(function (t, e) {
if (!(t instanceof e))
throw new TypeError("Cannot call a class as a function");
})(this, t),
(this.videoSelector = ".js_video-lazyload"),
(this.observerConfig = {
root: null,
rootMargin: "0px",
threshold: 0.5,
}),
this.init();
}
var e, i, r;
return (
(e = t),
(i = [
{
key: "init",
value: function () {
var t = this;
if (
((this.videos = n.a.getAll(this.videoSelector)),
"IntersectionObserver" in window)
) {
var e = new IntersectionObserver(function (e, i) {
e.forEach(function (e) {
e.intersectionRatio > 0 &&
(t.doLoad(e.target), i.unobserve(e.target));
});
}, this.observerConfig);
this.videos.forEach(function (t) {
return e.observe(t);
});
} else {
var i,
r = l(this.videos);
try {
for (r.s(); !(i = r.n()).done; ) {
var s = i.value;
this.doLoad(s);
}
} catch (t) {
r.e(t);
} finally {
r.f();
}
}
},
},
{
key: "doLoad",
value: function (t) {
var e = n.a.getData(t, "code");
t.outerHTML = e;
},
},
]) && h(e.prototype, i),
r && h(e, r),
t
);
})();
function d(t) {
if (void 0 === t)
throw new ReferenceError(
"this hasn't been initialised - super() hasn't been called"
);
return t;
}
function p(t, e) {
(t.prototype = Object.create(e.prototype)),
(t.prototype.constructor = t),
(t.__proto__ = e);
}
var f,
v,
m,
g,
y,
b,
_,
w,
T,
S,
C,
x,
k,
E,
M,
O,
A,
P,
L,
D,
z,
F,
q,
j,
B,
I,
N,
V = {
autoSleep: 120,
force3D: "auto",
nullTargetWarn: 1,
units: { lineHeight: "" },
},
R = { duration: 0.5, overwrite: !1, delay: 0 },
H = 1e8,
G = 2 * Math.PI,
W = G / 4,
Y = 0,
X = Math.sqrt,
U = Math.cos,
Q = Math.sin,
K = function (t) {
return "string" == typeof t;
},
Z = function (t) {
return "function" == typeof t;
},
J = function (t) {
return "number" == typeof t;
},
tt = function (t) {
return void 0 === t;
},
et = function (t) {
return "object" == typeof t;
},
it = function (t) {
return !1 !== t;
},
nt = function () {
return "undefined" != typeof window;
},
rt = function (t) {
return Z(t) || K(t);
},
st =
("function" == typeof ArrayBuffer && ArrayBuffer.isView) ||
function () {},
at = Array.isArray,
ot = /(?:-?\.?\d|\.)+/gi,
lt = /[-+=.]*\d+[.e\-+]*\d*[e\-\+]*\d*/g,
ut = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g,
ht = /[-+=.]*\d+(?:\.|e-|e)*\d*/gi,
ct = /[+-]=-?[\.\d]+/,
dt = /[#\-+.]*\b[a-z\d-=+%.]+/gi,
pt = {},
ft = {},
vt = function (t) {
return (ft = Vt(t, pt)) && Si;
},
mt = function (t, e) {
return console.warn(
"Invalid property",
t,
"set to",
e,
"Missing plugin? gsap.registerPlugin()"
);
},
gt = function (t, e) {
return !e && console.warn(t);
},
yt = function (t, e) {
return (t && (pt[t] = e) && ft && (ft[t] = e)) || pt;
},
bt = function () {
return 0;
},
_t = {},
wt = [],
Tt = {},
St = {},
Ct = {},
xt = 30,
kt = [],
Et = "",
Mt = function (t) {
var e,
i,
n = t[0];
if ((et(n) || Z(n) || (t = [t]), !(e = (n._gsap || {}).harness))) {
for (i = kt.length; i-- && !kt[i].targetTest(n); );
e = kt[i];
}
for (i = t.length; i--; )
(t[i] && (t[i]._gsap || (t[i]._gsap = new Xe(t[i], e)))) ||
t.splice(i, 1);
return t;
},
Ot = function (t) {
return t._gsap || Mt(fe(t))[0]._gsap;
},
At = function (t, e, i) {
return (i = t[e]) && Z(i)
? t[e]()
: (tt(i) && t.getAttribute && t.getAttribute(e)) || i;
},
Pt = function (t, e) {
return (t = t.split(",")).forEach(e) || t;
},
Lt = function (t) {
return Math.round(1e5 * t) / 1e5 || 0;
},
Dt = function (t, e) {
for (var i = e.length, n = 0; t.indexOf(e[n]) < 0 && ++n < i; );
return n < i;
},
zt = function (t, e, i) {
var n,
r = J(t[1]),
s = (r ? 2 : 1) + (e < 2 ? 0 : 1),
a = t[s];
if ((r && (a.duration = t[1]), (a.parent = i), e)) {
for (n = a; i && !("immediateRender" in n); )
(n = i.vars.defaults || {}), (i = it(i.vars.inherit) && i.parent);
(a.immediateRender = it(n.immediateRender)),
e < 2 ? (a.runBackwards = 1) : (a.startAt = t[s - 1]);
}
return a;
},
Ft = function () {
var t,
e,
i = wt.length,
n = wt.slice(0);
for (Tt = {}, wt.length = 0, t = 0; t < i; t++)
(e = n[t]) &&
e._lazy &&
(e.render(e._lazy[0], e._lazy[1], !0)._lazy = 0);
},
qt = function (t, e, i, n) {
wt.length && Ft(), t.render(e, i, n), wt.length && Ft();
},
jt = function (t) {
var e = parseFloat(t);
return (e || 0 === e) && (t + "").match(dt).length < 2
? e
: K(t)
? t.trim()
: t;
},
Bt = function (t) {
return t;
},
It = function (t, e) {
for (var i in e) i in t || (t[i] = e[i]);
return t;
},
Nt = function (t, e) {
for (var i in e)
i in t || "duration" === i || "ease" === i || (t[i] = e[i]);
},
Vt = function (t, e) {
for (var i in e) t[i] = e[i];
return t;
},
Rt = function t(e, i) {
for (var n in i) e[n] = et(i[n]) ? t(e[n] || (e[n] = {}), i[n]) : i[n];
return e;
},
Ht = function (t, e) {
var i,
n = {};
for (i in t) i in e || (n[i] = t[i]);
return n;
},
Gt = function (t) {
var e = t.parent || f,
i = t.keyframes ? Nt : It;
if (it(t.inherit))
for (; e; ) i(t, e.vars.defaults), (e = e.parent || e._dp);
return t;
},
$t = function (t, e, i, n) {
void 0 === i && (i = "_first"), void 0 === n && (n = "_last");
var r = e._prev,
s = e._next;
r ? (r._next = s) : t[i] === e && (t[i] = s),
s ? (s._prev = r) : t[n] === e && (t[n] = r),
(e._next = e._prev = e.parent = null);
},
Wt = function (t, e) {
t.parent && (!e || t.parent.autoRemoveChildren) && t.parent.remove(t),
(t._act = 0);
},
Yt = 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;
},
Xt = function (t) {
for (var e = t.parent; e && e.parent; )
(e._dirty = 1), e.totalDuration(), (e = e.parent);
return t;
},
Ut = function (t) {
return t._repeat ? Qt(t._tTime, (t = t.duration() + t._rDelay)) * t : 0;
},
Qt = function (t, e) {
return (t /= e) && ~~t === t ? ~~t - 1 : ~~t;
},
Kt = function (t, e) {
return (
(t - e._start) * e._ts +
(e._ts >= 0 ? 0 : e._dirty ? e.totalDuration() : e._tDur)
);
},
Zt = function (t) {
return (t._end = Lt(
t._start + (t._tDur / Math.abs(t._ts || t._rts || 1e-8) || 0)
));
},
Jt = function (t, e) {
var i = t._dp;
return (
i &&
i.smoothChildTiming &&
t._ts &&
((t._start = Lt(
t._dp._time -
(t._ts > 0
? e / t._ts
: ((t._dirty ? t.totalDuration() : t._tDur) - e) / -t._ts)
)),
Zt(t),
i._dirty || Yt(i, t)),
t
);
},
te = function (t, e) {
var i;
if (
((e._time || (e._initted && !e._dur)) &&
((i = Kt(t.rawTime(), e)),
(!e._dur || ue(0, e.totalDuration(), i) - e._tTime > 1e-8) &&
e.render(i, !0)),
Yt(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 = -1e-8;
}
},
ee = function (t, e, i, n) {
return (
e.parent && Wt(e),
(e._start = Lt(i + e._delay)),
(e._end = Lt(
e._start + (e.totalDuration() / Math.abs(e.timeScale()) || 0)
)),
(function (t, e, i, n, r) {
void 0 === i && (i = "_first"), void 0 === n && (n = "_last");
var s,
a = t[n];
if (r) for (s = e[r]; a && a[r] > s; ) a = a._prev;
a
? ((e._next = a._next), (a._next = e))
: ((e._next = t[i]), (t[i] = e)),
e._next ? (e._next._prev = e) : (t[n] = e),
(e._prev = a),
(e.parent = e._dp = t);
})(t, e, "_first", "_last", t._sort ? "_start" : 0),
(t._recent = e),
n || te(t, e),
t
);
},
ie = function (t, e) {
return (
(pt.ScrollTrigger || mt("scrollTrigger", e)) &&
pt.ScrollTrigger.create(e, t)
);
},
ne = function (t, e, i, n) {
return (
ei(t, e),
t._initted
? !i &&
t._pt &&
((t._dur && !1 !== t.vars.lazy) || (!t._dur && t.vars.lazy)) &&
b !== Fe.frame
? (wt.push(t), (t._lazy = [e, n]), 1)
: void 0
: 1
);
},
re = function (t, e, i, n) {
var r = t._repeat,
s = Lt(e) || 0,
a = t._tTime / t._tDur;
return (
a && !n && (t._time *= s / t._dur),
(t._dur = s),
(t._tDur = r ? (r < 0 ? 1e10 : Lt(s * (r + 1) + t._rDelay * r)) : s),
a && !n ? Jt(t, (t._tTime = t._tDur * a)) : t.parent && Zt(t),
i || Yt(t.parent, t),
t
);
},
se = function (t) {
return t instanceof Qe ? Yt(t) : re(t, t._dur);
},
ae = { _start: 0, endTime: bt },
oe = function t(e, i) {
var n,
r,
s = e.labels,
a = e._recent || ae,
o = e.duration() >= H ? a.endTime(!1) : e._dur;
return K(i) && (isNaN(i) || i in s)
? "<" === (n = i.charAt(0)) || ">" === n
? ("<" === n ? a._start : a.endTime(a._repeat >= 0)) +
(parseFloat(i.substr(1)) || 0)
: (n = i.indexOf("=")) < 0
? (i in s || (s[i] = o), s[i])
: ((r = +(i.charAt(n - 1) + i.substr(n + 1))),
n > 1 ? t(e, i.substr(0, n - 1)) + r : o + r)
: null == i
? o
: +i;
},
le = function (t, e) {
return t || 0 === t ? e(t) : e;
},
ue = function (t, e, i) {
return i < t ? t : i > e ? e : i;
},
he = function (t) {
return (t = (t + "").substr((parseFloat(t) + "").length)) && isNaN(t)
? t
: "";
},
ce = [].slice,
de = function (t, e) {
return (
t &&
et(t) &&
"length" in t &&
((!e && !t.length) || (t.length - 1 in t && et(t[0]))) &&
!t.nodeType &&
t !== v
);
},
pe = function (t, e, i) {
return (
void 0 === i && (i = []),
t.forEach(function (t) {
var n;
return (K(t) && !e) || de(t, 1)
? (n = i).push.apply(n, fe(t))
: i.push(t);
}) || i
);
},
fe = function (t, e) {
return !K(t) || e || (!m && qe())
? at(t)
? pe(t, e)
: de(t)
? ce.call(t, 0)
: t
? [t]
: []
: ce.call(g.querySelectorAll(t), 0);
},
ve = function (t) {
return t.sort(function () {
return 0.5 - Math.random();
});
},
me = function (t) {
if (Z(t)) return t;
var e = et(t) ? t : { each: t },
i = He(e.ease),
n = e.from || 0,
r = parseFloat(e.base) || 0,
s = {},
a = n > 0 && n < 1,
o = isNaN(n) || a,
l = e.axis,
u = n,
h = n;
return (
K(n)
? (u = h = { center: 0.5, edges: 0.5, end: 1 }[n] || 0)
: !a && o && ((u = n[0]), (h = n[1])),
function (t, a, c) {
var d,
p,
f,
v,
m,
g,
y,
b,
_,
w = (c || e).length,
T = s[w];
if (!T) {
if (!(_ = "auto" === e.grid ? 0 : (e.grid || [1, H])[1])) {
for (
y = -H;
y < (y = c[_++].getBoundingClientRect().left) && _ < w;
);
_--;
}
for (
T = s[w] = [],
d = o ? Math.min(_, w) * u - 0.5 : n % _,
p = o ? (w * h) / _ - 0.5 : (n / _) | 0,
y = 0,
b = H,
g = 0;
g < w;
g++
)
(f = (g % _) - d),
(v = p - ((g / _) | 0)),
(T[g] = m =
l ? Math.abs("y" === l ? v : f) : X(f * f + v * v)),
m > y && (y = m),
m < b && (b = m);
"random" === n && ve(T),
(T.max = y - b),
(T.min = b),
(T.v = w =
(parseFloat(e.amount) ||
parseFloat(e.each) *
(_ > w
? w - 1
: l
? "y" === l
? w / _
: _
: Math.max(_, w / _)) ||
0) * ("edges" === n ? -1 : 1)),
(T.b = w < 0 ? r - w : r),
(T.u = he(e.amount || e.each) || 0),
(i = i && w < 0 ? Ve(i) : i);
}
return (
(w = (T[t] - T.min) / T.max || 0),
Lt(T.b + (i ? i(w) : w) * T.v) + T.u
);
}
);
},
ge = function (t) {
var e = t < 1 ? Math.pow(10, (t + "").length - 2) : 1;
return function (i) {
return (
Math.floor(Math.round(parseFloat(i) / t) * t * e) / e +
(J(i) ? 0 : he(i))
);
};
},
ye = function (t, e) {
var i,
n,
r = at(t);
return (
!r &&
et(t) &&
((i = r = t.radius || H),
t.values
? ((t = fe(t.values)), (n = !J(t[0])) && (i *= i))
: (t = ge(t.increment))),
le(
e,
r
? Z(t)
? function (e) {
return (n = t(e)), Math.abs(n - e) <= i ? n : e;
}
: function (e) {
for (
var r,
s,
a = parseFloat(n ? e.x : e),
o = parseFloat(n ? e.y : 0),
l = H,
u = 0,
h = t.length;
h--;
)
(r = n
? (r = t[h].x - a) * r + (s = t[h].y - o) * s
: Math.abs(t[h] - a)) < l && ((l = r), (u = h));
return (
(u = !i || l <= i ? t[u] : e),
n || u === e || J(e) ? u : u + he(e)
);
}
: ge(t)
)
);
},
be = function (t, e, i, n) {
return le(at(t) ? !e : !0 === i ? !!(i = 0) : !n, function () {
return at(t)
? t[~~(Math.random() * t.length)]
: (i = i || 1e-5) &&
(n = i < 1 ? Math.pow(10, (i + "").length - 2) : 1) &&
Math.floor(
Math.round((t + Math.random() * (e - t)) / i) * i * n
) / n;
});
},
_e = function (t, e, i) {
return le(i, function (i) {
return t[~~e(i)];
});
},
we = function (t) {
for (var e, i, n, r, s = 0, a = ""; ~(e = t.indexOf("random(", s)); )
(n = t.indexOf(")", e)),
(r = "[" === t.charAt(e + 7)),
(i = t.substr(e + 7, n - e - 7).match(r ? dt : ot)),
(a +=
t.substr(s, e - s) +
be(r ? i : +i[0], r ? 0 : +i[1], +i[2] || 1e-5)),
(s = n + 1);
return a + t.substr(s, t.length - s);
},
Te = function (t, e, i, n, r) {
var s = e - t,
a = n - i;
return le(r, function (e) {
return i + (((e - t) / s) * a || 0);
});
},
Se = function (t, e, i) {
var n,
r,
s,
a = t.labels,
o = H;
for (n in a)
(r = a[n] - e) < 0 == !!i &&
r &&
o > (r = Math.abs(r)) &&
((s = n), (o = r));
return s;
},
Ce = function (t, e, i) {
var n,
r,
s = t.vars,
a = s[e];
if (a)
return (
(n = s[e + "Params"]),
(r = s.callbackScope || t),
i && wt.length && Ft(),
n ? a.apply(r, n) : a.call(r)
);
},
xe = function (t) {
return Wt(t), t.progress() < 1 && Ce(t, "onInterrupt"), t;
},
ke = function (t) {
var e = (t = (!t.name && t.default) || t).name,
i = Z(t),
n =
e && !i && t.init
? function () {
this._props = [];
}
: t,
r = {
init: bt,
render: fi,
add: Je,
kill: mi,
modifier: vi,
rawVars: 0,
},
s = {
targetTest: 0,
get: 0,
getSetter: hi,
aliases: {},
register: 0,
};
if ((qe(), t !== n)) {
if (St[e]) return;
It(n, It(Ht(t, r), s)),
Vt(n.prototype, Vt(r, Ht(t, s))),
(St[(n.prop = e)] = n),
t.targetTest && (kt.push(n), (_t[e] = 1)),
(e =
("css" === e ? "CSS" : e.charAt(0).toUpperCase() + e.substr(1)) +
"Plugin");
}
yt(e, n), t.register && t.register(Si, n, bi);
},
Ee = {
aqua: [0, 255, 255],
lime: [0, 255, 0],
silver: [192, 192, 192],
black: [0, 0, 0],
maroon: [128, 0, 0],
teal: [0, 128, 128],
blue: [0, 0, 255],
navy: [0, 0, 128],
white: [255, 255, 255],
olive: [128, 128, 0],
yellow: [255, 255, 0],
orange: [255, 165, 0],
gray: [128, 128, 128],
purple: [128, 0, 128],
green: [0, 128, 0],
red: [255, 0, 0],
pink: [255, 192, 203],
cyan: [0, 255, 255],
transparent: [255, 255, 255, 0],
},
Me = function (t, e, i) {
return (
(255 *
(6 * (t = t < 0 ? t + 1 : t > 1 ? t - 1 : t) < 1
? e + (i - e) * t * 6
: t < 0.5
? i
: 3 * t < 2
? e + (i - e) * (2 / 3 - t) * 6
: e) +
0.5) |
0
);
},
Oe = function (t, e, i) {
var n,
r,
s,
a,
o,
l,
u,
h,
c,
d,
p = t ? (J(t) ? [t >> 16, (t >> 8) & 255, 255 & t] : 0) : Ee.black;
if (!p) {
if (("," === t.substr(-1) && (t = t.substr(0, t.length - 1)), Ee[t]))
p = Ee[t];
else if ("#" === t.charAt(0))
4 === t.length &&
((n = t.charAt(1)),
(r = t.charAt(2)),
(s = t.charAt(3)),
(t = "#" + n + n + r + r + s + s)),
(p = [
(t = parseInt(t.substr(1), 16)) >> 16,
(t >> 8) & 255,
255 & t,
]);
else if ("hsl" === t.substr(0, 3))
if (((p = d = t.match(ot)), e)) {
if (~t.indexOf("="))
return (p = t.match(lt)), i && p.length < 4 && (p[3] = 1), p;
} else
(a = (+p[0] % 360) / 360),
(o = +p[1] / 100),
(n =
2 * (l = +p[2] / 100) -
(r = l <= 0.5 ? l * (o + 1) : l + o - l * o)),
p.length > 3 && (p[3] *= 1),
(p[0] = Me(a + 1 / 3, n, r)),
(p[1] = Me(a, n, r)),
(p[2] = Me(a - 1 / 3, n, r));
else p = t.match(ot) || Ee.transparent;
p = p.map(Number);
}
return (
e &&
!d &&
((n = p[0] / 255),
(r = p[1] / 255),
(s = p[2] / 255),
(l = ((u = Math.max(n, r, s)) + (h = Math.min(n, r, s))) / 2),
u === h
? (a = o = 0)
: ((c = u - h),
(o = l > 0.5 ? c / (2 - u - h) : c / (u + h)),
(a =
u === n
? (r - s) / c + (r < s ? 6 : 0)
: u === r
? (s - n) / c + 2
: (n - r) / c + 4),
(a *= 60)),
(p[0] = ~~(a + 0.5)),
(p[1] = ~~(100 * o + 0.5)),
(p[2] = ~~(100 * l + 0.5))),
i && p.length < 4 && (p[3] = 1),
p
);
},
Ae = function (t) {
var e = [],
i = [],
n = -1;
return (
t.split(Le).forEach(function (t) {
var r = t.match(ut) || [];
e.push.apply(e, r), i.push((n += r.length + 1));
}),
(e.c = i),
e
);
},
Pe = function (t, e, i) {
var n,
r,
s,
a,
o = "",
l = (t + o).match(Le),
u = e ? "hsla(" : "rgba(",
h = 0;
if (!l) return t;
if (
((l = l.map(function (t) {
return (
(t = Oe(t, e, 1)) &&
u +
(e
? t[0] + "," + t[1] + "%," + t[2] + "%," + t[3]
: t.join(",")) +
")"
);
})),
i && ((s = Ae(t)), (n = i.c).join(o) !== s.c.join(o)))
)
for (a = (r = t.replace(Le, "1").split(ut)).length - 1; h < a; h++)
o +=
r[h] +
(~n.indexOf(h)
? l.shift() || u + "0,0,0,0)"
: (s.length ? s : l.length ? l : i).shift());
if (!r)
for (a = (r = t.split(Le)).length - 1; h < a; h++) o += r[h] + l[h];
return o + r[a];
},
Le = (function () {
var t,
e =
"(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";
for (t in Ee) e += "|" + t + "\\b";
return new RegExp(e + ")", "gi");
})(),
De = /hsl[a]?\(/,
ze = function (t) {
var e,
i = t.join(" ");
if (((Le.lastIndex = 0), Le.test(i)))
return (
(e = De.test(i)),
(t[1] = Pe(t[1], e)),
(t[0] = Pe(t[0], e, Ae(t[1]))),
!0
);
},
Fe =
((M = Date.now),
(O = 500),
(A = 33),
(P = M()),
(L = P),
(z = D = 1e3 / 240),
(q = function t(e) {
var i,
n,
r,
s,
a = M() - L,
o = !0 === e;
if (
(a > O && (P += a - A),
((i = (r = (L += a) - P) - z) > 0 || o) &&
((s = ++x.frame),
(k = r - 1e3 * x.time),
(x.time = r /= 1e3),
(z += i + (i >= D ? 4 : D - i)),
(n = 1)),
o || (T = S(t)),
n)
)
for (E = 0; E < F.length; E++) F[E](r, k, s, e);
}),
(x = {
time: 0,
frame: 0,
tick: function () {
q(!0);
},
deltaRatio: function (t) {
return k / (1e3 / (t || 60));
},
wake: function () {
y &&
(!m &&
nt() &&
((v = m = window),
(g = v.document || {}),
(pt.gsap = Si),
(v.gsapVersions || (v.gsapVersions = [])).push(Si.version),
vt(ft || v.GreenSockGlobals || (!v.gsap && v) || {}),
(C = v.requestAnimationFrame)),
T && x.sleep(),
(S =
C ||
function (t) {
return setTimeout(t, (z - 1e3 * x.time + 1) | 0);
}),
(w = 1),
q(2));
},
sleep: function () {
(C ? v.cancelAnimationFrame : clearTimeout)(T), (w = 0), (S = bt);
},
lagSmoothing: function (t, e) {
(O = t || 1 / 1e-8), (A = Math.min(e, O, 0));
},
fps: function (t) {
(D = 1e3 / (t || 240)), (z = 1e3 * x.time + D);
},
add: function (t) {
F.indexOf(t) < 0 && F.push(t), qe();
},
remove: function (t) {
var e;
~(e = F.indexOf(t)) && F.splice(e, 1) && E >= e && E--;
},
_listeners: (F = []),
})),
qe = function () {
return !w && Fe.wake();
},
je = {},
Be = /^[\d.\-M][\d.\-,\s]/,
Ie = /["']/g,
Ne = function (t) {
for (
var e,
i,
n,
r = {},
s = t.substr(1, t.length - 3).split(":"),
a = s[0],
o = 1,
l = s.length;
o < l;
o++
)
(i = s[o]),
(e = o !== l - 1 ? i.lastIndexOf(",") : i.length),
(n = i.substr(0, e)),
(r[a] = isNaN(n) ? n.replace(Ie, "").trim() : +n),
(a = i.substr(e + 1).trim());
return r;
},
Ve = function (t) {
return function (e) {
return 1 - t(1 - e);
};
},
Re = function t(e, i) {
for (var n, r = e._first; r; )
r instanceof Qe
? t(r, i)
: !r.vars.yoyoEase ||
(r._yoyo && r._repeat) ||
r._yoyo === i ||
(r.timeline
? t(r.timeline, i)
: ((n = r._ease),
(r._ease = r._yEase),
(r._yEase = n),
(r._yoyo = i))),
(r = r._next);
},
He = function (t, e) {
return (
(t &&
(Z(t)
? t
: je[t] ||
(function (t) {
var e,
i,
n,
r,
s = (t + "").split("("),
a = je[s[0]];
return a && s.length > 1 && a.config
? a.config.apply(
null,
~t.indexOf("{")
? [Ne(s[1])]
: ((e = t),
(i = e.indexOf("(") + 1),
(n = e.indexOf(")")),
(r = e.indexOf("(", i)),
e.substring(
i,
~r && r < n ? e.indexOf(")", n + 1) : n
))
.split(",")
.map(jt)
)
: je._CE && Be.test(t)
? je._CE("", t)
: a;
})(t))) ||
e
);
},
Ge = function (t, e, i, n) {
void 0 === i &&
(i = function (t) {
return 1 - e(1 - t);
}),
void 0 === n &&
(n = function (t) {
return t < 0.5 ? e(2 * t) / 2 : 1 - e(2 * (1 - t)) / 2;
});
var r,
s = { easeIn: e, easeOut: i, easeInOut: n };
return (
Pt(t, function (t) {
for (var e in ((je[t] = pt[t] = s),
(je[(r = t.toLowerCase())] = i),
s))
je[
r +
("easeIn" === e ? ".in" : "easeOut" === e ? ".out" : ".inOut")
] = je[t + "." + e] = s[e];
}),
s
);
},
$e = function (t) {
return function (e) {
return e < 0.5 ? (1 - t(1 - 2 * e)) / 2 : 0.5 + t(2 * (e - 0.5)) / 2;
};
},
We = function t(e, i, n) {
var r = i >= 1 ? i : 1,
s = (n || (e ? 0.3 : 0.45)) / (i < 1 ? i : 1),
a = (s / G) * (Math.asin(1 / r) || 0),
o = function (t) {
return 1 === t ? 1 : r * Math.pow(2, -10 * t) * Q((t - a) * s) + 1;
},
l =
"out" === e
? o
: "in" === e
? function (t) {
return 1 - o(1 - t);
}
: $e(o);
return (
(s = G / s),
(l.config = function (i, n) {
return t(e, i, n);
}),
l
);
},
Ye = function t(e, i) {
void 0 === i && (i = 1.70158);
var n = function (t) {
return t ? --t * t * ((i + 1) * t + i) + 1 : 0;
},
r =
"out" === e
? n
: "in" === e
? function (t) {
return 1 - n(1 - t);
}
: $e(n);
return (
(r.config = function (i) {
return t(e, i);
}),
r
);
};
Pt("Linear,Quad,Cubic,Quart,Quint,Strong", function (t, e) {
var i = e < 5 ? e + 1 : e;
Ge(
t + ",Power" + (i - 1),
e
? function (t) {
return Math.pow(t, i);
}
: function (t) {
return t;
},
function (t) {
return 1 - Math.pow(1 - t, i);
},
function (t) {
return t < 0.5
? Math.pow(2 * t, i) / 2
: 1 - Math.pow(2 * (1 - t), i) / 2;
}
);
}),
(je.Linear.easeNone = je.none = je.Linear.easeIn),
Ge("Elastic", We("in"), We("out"), We()),
(j = 7.5625),
(I = 1 / (B = 2.75)),
Ge(
"Bounce",
function (t) {
return 1 - N(1 - t);
},
(N = function (t) {
return t < I
? j * t * t
: t < 0.7272727272727273
? j * Math.pow(t - 1.5 / B, 2) + 0.75
: t < 0.9090909090909092
? j * (t -= 2.25 / B) * t + 0.9375
: j * Math.pow(t - 2.625 / B, 2) + 0.984375;
})
),
Ge("Expo", function (t) {
return t ? Math.pow(2, 10 * (t - 1)) : 0;
}),
Ge("Circ", function (t) {
return -(X(1 - t * t) - 1);
}),
Ge("Sine", function (t) {
return 1 === t ? 1 : 1 - U(t * W);
}),
Ge("Back", Ye("in"), Ye("out"), Ye()),
(je.SteppedEase =
je.steps =
pt.SteppedEase =
{
config: function (t, e) {
void 0 === t && (t = 1);
var i = 1 / t,
n = t + (e ? 0 : 1),
r = e ? 1 : 0;
return function (t) {
return (((n * ue(0, 1 - 1e-8, t)) | 0) + r) * i;
};
},
}),
(R.ease = je["quad.out"]),
Pt(
"onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",
function (t) {
return (Et += t + "," + t + "Params,");
}
);
var Xe = function (t, e) {
(this.id = Y++),
(t._gsap = this),
(this.target = t),
(this.harness = e),
(this.get = e ? e.get : At),
(this.set = e ? e.getSetter : hi);
},
Ue = (function () {
function t(t, e) {
var i = t.parent || f;
(this.vars = t),
(this._delay = +t.delay || 0),
(this._repeat = t.repeat || 0) &&
((this._rDelay = t.repeatDelay || 0),
(this._yoyo = !!t.yoyo || !!t.yoyoEase)),
(this._ts = 1),
re(this, +t.duration, 1, 1),
(this.data = t.data),
w || Fe.wake(),
i && ee(i, this, e || 0 === e ? e : i._time, 1),
t.reversed && this.reverse(),
t.paused && this.paused(!0);
}
var e = t.prototype;
return (
(e.delay = function (t) {
return t || 0 === t
? (this.parent &&
this.parent.smoothChildTiming &&
this.startTime(this._start + t - this._delay),
(this._delay = t),
this)
: this._delay;
}),
(e.duration = function (t) {
return arguments.length
? this.totalDuration(
this._repeat > 0 ? t + (t + this._rDelay) * this._repeat : t
)
: this.totalDuration() && this._dur;
}),
(e.totalDuration = function (t) {
return arguments.length
? ((this._dirty = 0),
re(
this,
this._repeat < 0
? t
: (t - this._repeat * this._rDelay) / (this._repeat + 1)
))
: this._tDur;
}),
(e.totalTime = function (t, e) {
if ((qe(), !arguments.length)) return this._tTime;
var i = this._dp;
if (i && i.smoothChildTiming && this._ts) {
for (Jt(this, t); i.parent; )
i.parent._time !==
i._start +
(i._ts >= 0
? i._tTime / i._ts
: (i.totalDuration() - i._tTime) / -i._ts) &&
i.totalTime(i._tTime, !0),
(i = i.parent);
!this.parent &&
this._dp.autoRemoveChildren &&
((this._ts > 0 && t < this._tDur) ||
(this._ts < 0 && t > 0) ||
(!this._tDur && !t)) &&
ee(this._dp, this, this._start - this._delay);
}
return (
(this._tTime !== t ||
(!this._dur && !e) ||
(this._initted && 1e-8 === Math.abs(this._zTime)) ||
(!t && !this._initted && (this.add || this._ptLookup))) &&
(this._ts || (this._pTime = t), qt(this, t, e)),
this
);
}),
(e.time = function (t, e) {
return arguments.length
? this.totalTime(
Math.min(this.totalDuration(), t + Ut(this)) % this._dur ||
(t ? this._dur : 0),
e
)
: this._time;
}),
(e.totalProgress = function (t, e) {
return arguments.length
? this.totalTime(this.totalDuration() * t, e)
: this.totalDuration()
? Math.min(1, this._tTime / this._tDur)
: this.ratio;
}),
(e.progress = function (t, e) {
return arguments.length
? this.totalTime(
this.duration() *
(!this._yoyo || 1 & this.iteration() ? t : 1 - t) +
Ut(this),
e
)
: this.duration()
? Math.min(1, this._time / this._dur)
: this.ratio;
}),
(e.iteration = function (t, e) {
var i = this.duration() + this._rDelay;
return arguments.length
? this.totalTime(this._time + (t - 1) * i, e)
: this._repeat
? Qt(this._tTime, i) + 1
: 1;
}),
(e.timeScale = function (t) {
if (!arguments.length) return -1e-8 === this._rts ? 0 : this._rts;
if (this._rts === t) return this;
var e =
this.parent && this._ts
? Kt(this.parent._time, this)
: this._tTime;
return (
(this._rts = +t || 0),
(this._ts = this._ps || -1e-8 === t ? 0 : this._rts),
Xt(this.totalTime(ue(-this._delay, this._tDur, e), !0))
);
}),
(e.paused = function (t) {
return arguments.length
? (this._ps !== t &&
((this._ps = t),
t
? ((this._pTime =
this._tTime || Math.max(-this._delay, this.rawTime())),
(this._ts = this._act = 0))
: (qe(),
(this._ts = this._rts),
this.totalTime(
this.parent && !this.parent.smoothChildTiming
? this.rawTime()
: this._tTime || this._pTime,
1 === this.progress() &&
(this._tTime -= 1e-8) &&
1e-8 !== Math.abs(this._zTime)
))),
this)
: this._ps;
}),
(e.startTime = function (t) {
if (arguments.length) {
this._start = t;
var e = this.parent || this._dp;
return (
e && (e._sort || !this.parent) && ee(e, this, t - this._delay),
this
);
}
return this._start;
}),
(e.endTime = function (t) {
return (
this._start +
(it(t) ? this.totalDuration() : this.duration()) /
Math.abs(this._ts)
);
}),
(e.rawTime = function (t) {
var e = this.parent || this._dp;
return e
? t &&
(!this._ts ||
(this._repeat && this._time && this.totalProgress() < 1))
? this._tTime % (this._dur + this._rDelay)
: this._ts
? Kt(e.rawTime(t), this)
: this._tTime
: this._tTime;
}),
(e.globalTime = function (t) {
for (var e = this, i = arguments.length ? t : e.rawTime(); e; )
(i = e._start + i / (e._ts || 1)), (e = e._dp);
return i;
}),
(e.repeat = function (t) {
return arguments.length
? ((this._repeat = t), se(this))
: this._repeat;
}),
(e.repeatDelay = function (t) {
return arguments.length
? ((this._rDelay = t), se(this))
: this._rDelay;
}),
(e.yoyo = function (t) {
return arguments.length ? ((this._yoyo = t), this) : this._yoyo;
}),
(e.seek = function (t, e) {
return this.totalTime(oe(this, t), it(e));
}),
(e.restart = function (t, e) {
return this.play().totalTime(t ? -this._delay : 0, it(e));
}),
(e.play = function (t, e) {
return null != t && this.seek(t, e), this.reversed(!1).paused(!1);
}),
(e.reverse = function (t, e) {
return (
null != t && this.seek(t || this.totalDuration(), e),
this.reversed(!0).paused(!1)
);
}),
(e.pause = function (t, e) {
return null != t && this.seek(t, e), this.paused(!0);
}),
(e.resume = function () {
return this.paused(!1);
}),
(e.reversed = function (t) {
return arguments.length
? (!!t !== this.reversed() &&
this.timeScale(-this._rts || (t ? -1e-8 : 0)),
this)
: this._rts < 0;
}),
(e.invalidate = function () {
return (this._initted = 0), (this._zTime = -1e-8), this;
}),
(e.isActive = function () {
var t,
e = this.parent || this._dp,
i = this._start;
return !(
e &&
!(
this._ts &&
this._initted &&
e.isActive() &&
(t = e.rawTime(!0)) >= i &&
t < this.endTime(!0) - 1e-8
)
);
}),
(e.eventCallback = function (t, e, i) {
var n = this.vars;
return arguments.length > 1
? (e
? ((n[t] = e),
i && (n[t + "Params"] = i),
"onUpdate" === t && (this._onUpdate = e))
: delete n[t],
this)
: n[t];
}),
(e.then = function (t) {
var e = this;
return new Promise(function (i) {
var n = Z(t) ? t : Bt,
r = function () {
var t = e.then;
(e.then = null),
Z(n) && (n = n(e)) && (n.then || n === e) && (e.then = t),
i(n),
(e.then = t);
};
(e._initted && 1 === e.totalProgress() && e._ts >= 0) ||
(!e._tTime && e._ts < 0)
? r()
: (e._prom = r);
});
}),
(e.kill = function () {
xe(this);
}),
t
);
})();
It(Ue.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: -1e-8,
_prom: 0,
_ps: !1,
_rts: 1,
});
var Qe = (function (t) {
function e(e, i) {
var n;
return (
void 0 === e && (e = {}),
((n = t.call(this, e, i) || this).labels = {}),
(n.smoothChildTiming = !!e.smoothChildTiming),
(n.autoRemoveChildren = !!e.autoRemoveChildren),
(n._sort = it(e.sortChildren)),
n.parent && te(n.parent, d(n)),
e.scrollTrigger && ie(d(n), e.scrollTrigger),
n
);
}
p(e, t);
var i = e.prototype;
return (
(i.to = function (t, e, i) {
return (
new si(
t,
zt(arguments, 0, this),
oe(this, J(e) ? arguments[3] : i)
),
this
);
}),
(i.from = function (t, e, i) {
return (
new si(
t,
zt(arguments, 1, this),
oe(this, J(e) ? arguments[3] : i)
),
this
);
}),
(i.fromTo = function (t, e, i, n) {
return (
new si(
t,
zt(arguments, 2, this),
oe(this, J(e) ? arguments[4] : n)
),
this
);
}),
(i.set = function (t, e, i) {
return (
(e.duration = 0),
(e.parent = this),
Gt(e).repeatDelay || (e.repeat = 0),
(e.immediateRender = !!e.immediateRender),
new si(t, e, oe(this, i), 1),
this
);
}),
(i.call = function (t, e, i) {
return ee(this, si.delayedCall(0, t, e), oe(this, i));
}),
(i.staggerTo = function (t, e, i, n, r, s, a) {
return (
(i.duration = e),
(i.stagger = i.stagger || n),
(i.onComplete = s),
(i.onCompleteParams = a),
(i.parent = this),
new si(t, i, oe(this, r)),
this
);
}),
(i.staggerFrom = function (t, e, i, n, r, s, a) {
return (
(i.runBackwards = 1),
(Gt(i).immediateRender = it(i.immediateRender)),
this.staggerTo(t, e, i, n, r, s, a)
);
}),
(i.staggerFromTo = function (t, e, i, n, r, s, a, o) {
return (
(n.startAt = i),
(Gt(n).immediateRender = it(n.immediateRender)),
this.staggerTo(t, e, n, r, s, a, o)
);
}),
(i.render = function (t, e, i) {
var n,
r,
s,
a,
o,
l,
u,
h,
c,
d,
p,
v,
m = this._time,
g = this._dirty ? this.totalDuration() : this._tDur,
y = this._dur,
b = this !== f && t > g - 1e-8 && t >= 0 ? g : t < 1e-8 ? 0 : t,
_ = this._zTime < 0 != t < 0 && (this._initted || !y);
if (b !== this._tTime || i || _) {
if (
(m !== this._time &&
y &&
((b += this._time - m), (t += this._time - m)),
(n = b),
(c = this._start),
(l = !(h = this._ts)),
_ && (y || (m = this._zTime), (t || !e) && (this._zTime = t)),
this._repeat &&
((p = this._yoyo),
(o = y + this._rDelay),
(n = Lt(b % o)),
b === g
? ((a = this._repeat), (n = y))
: ((a = ~~(b / o)) && a === b / o && ((n = y), a--),
n > y && (n = y)),
(d = Qt(this._tTime, o)),
!m && this._tTime && d !== a && (d = a),
p && 1 & a && ((n = y - n), (v = 1)),
a !== d && !this._lock))
) {
var w = p && 1 & d,
T = w === (p && 1 & a);
if (
(a < d && (w = !w),
(m = w ? 0 : y),
(this._lock = 1),
(this.render(m || (v ? 0 : Lt(a * o)), e, !y)._lock = 0),
!e && this.parent && Ce(this, "onRepeat"),
this.vars.repeatRefresh && !v && (this.invalidate()._lock = 1),
m !== this._time || l !== !this._ts)
)
return this;
if (
((y = this._dur),
(g = this._tDur),
T &&
((this._lock = 2),
(m = w ? y : -1e-4),
this.render(m, !0),
this.vars.repeatRefresh && !v && this.invalidate()),
(this._lock = 0),
!this._ts && !l)
)
return this;
Re(this, v);
}
if (
(this._hasPause &&
!this._forcing &&
this._lock < 2 &&
(u = (function (t, e, i) {
var n;
if (i > e)
for (n = t._first; n && n._start <= i; ) {
if (!n._dur && "isPause" === n.data && n._start > e)
return n;
n = n._next;
}
else
for (n = t._last; n && n._start >= i; ) {
if (!n._dur && "isPause" === n.data && n._start < e)
return n;
n = n._prev;
}
})(this, Lt(m), Lt(n))) &&
(b -= n - (n = u._start)),
(this._tTime = b),
(this._time = n),
(this._act = !h),
this._initted ||
((this._onUpdate = this.vars.onUpdate),
(this._initted = 1),
(this._zTime = t)),
!m && n && !e && Ce(this, "onStart"),
n >= m && t >= 0)
)
for (r = this._first; r; ) {
if (
((s = r._next), (r._act || n >= r._start) && r._ts && u !== r)
) {
if (r.parent !== this) return this.render(t, e, i);
if (
(r.render(
r._ts > 0
? (n - r._start) * r._ts
: (r._dirty ? r.totalDuration() : r._tDur) +
(n - r._start) * r._ts,
e,
i
),
n !== this._time || (!this._ts && !l))
) {
(u = 0), s && (b += this._zTime = -1e-8);
break;
}
}
r = s;
}
else {
r = this._last;
for (var S = t < 0 ? t : n; r; ) {
if (
((s = r._prev), (r._act || S <= r._end) && r._ts && u !== r)
) {
if (r.parent !== this) return this.render(t, e, i);
if (
(r.render(
r._ts > 0
? (S - r._start) * r._ts
: (r._dirty ? r.totalDuration() : r._tDur) +
(S - r._start) * r._ts,
e,
i
),
n !== this._time || (!this._ts && !l))
) {
(u = 0), s && (b += this._zTime = S ? -1e-8 : 1e-8);
break;
}
}
r = s;
}
}
if (
u &&
!e &&
(this.pause(),
(u.render(n >= m ? 0 : -1e-8)._zTime = n >= m ? 1 : -1),
this._ts)
)
return (this._start = c), Zt(this), this.render(t, e, i);
this._onUpdate && !e && Ce(this, "onUpdate", !0),
((b === g && g >= this.totalDuration()) || (!b && m)) &&
((c !== this._start && Math.abs(h) === Math.abs(this._ts)) ||
this._lock ||
((t || !y) &&
((b === g && this._ts > 0) || (!b && this._ts < 0)) &&
Wt(this, 1),
e ||
(t < 0 && !m) ||
(!b && !m) ||
(Ce(this, b === g ? "onComplete" : "onReverseComplete", !0),
this._prom &&
!(b < g && this.timeScale() > 0) &&
this._prom())));
}
return this;
}),
(i.add = function (t, e) {
var i = this;
if ((J(e) || (e = oe(this, e)), !(t instanceof Ue))) {
if (at(t))
return (
t.forEach(function (t) {
return i.add(t, e);
}),
this
);
if (K(t)) return this.addLabel(t, e);
if (!Z(t)) return this;
t = si.delayedCall(0, t);
}
return this !== t ? ee(this, t, e) : this;
}),
(i.getChildren = function (t, e, i, n) {
void 0 === t && (t = !0),
void 0 === e && (e = !0),
void 0 === i && (i = !0),
void 0 === n && (n = -H);
for (var r = [], s = this._first; s; )
s._start >= n &&
(s instanceof si
? e && r.push(s)
: (i && r.push(s),
t && r.push.apply(r, s.getChildren(!0, e, i)))),
(s = s._next);
return r;
}),
(i.getById = function (t) {
for (var e = this.getChildren(1, 1, 1), i = e.length; i--; )
if (e[i].vars.id === t) return e[i];
}),
(i.remove = function (t) {
return K(t)
? this.removeLabel(t)
: Z(t)
? this.killTweensOf(t)
: ($t(this, t),
t === this._recent && (this._recent = this._last),
Yt(this));
}),
(i.totalTime = function (e, i) {
return arguments.length
? ((this._forcing = 1),
!this._dp &&
this._ts &&
(this._start = Lt(
Fe.time -
(this._ts > 0
? e / this._ts
: (this.totalDuration() - e) / -this._ts)
)),
t.prototype.totalTime.call(this, e, i),
(this._forcing = 0),
this)
: this._tTime;
}),
(i.addLabel = function (t, e) {
return (this.labels[t] = oe(this, e)), this;
}),
(i.removeLabel = function (t) {
return delete this.labels[t], this;
}),
(i.addPause = function (t, e, i) {
var n = si.delayedCall(0, e || bt, i);
return (
(n.data = "isPause"), (this._hasPause = 1), ee(this, n, oe(this, t))
);
}),
(i.removePause = function (t) {
var e = this._first;
for (t = oe(this, t); e; )
e._start === t && "isPause" === e.data && Wt(e), (e = e._next);
}),
(i.killTweensOf = function (t, e, i) {
for (var n = this.getTweensOf(t, i), r = n.length; r--; )
Ke !== n[r] && n[r].kill(t, e);
return this;
}),
(i.getTweensOf = function (t, e) {
for (var i, n = [], r = fe(t), s = this._first, a = J(e); s; )
s instanceof si
? Dt(s._targets, r) &&
(a
? (!Ke || (s._initted && s._ts)) &&
s.globalTime(0) <= e &&
s.globalTime(s.totalDuration()) > e
: !e || s.isActive()) &&
n.push(s)
: (i = s.getTweensOf(r, e)).length && n.push.apply(n, i),
(s = s._next);
return n;
}),
(i.tweenTo = function (t, e) {
e = e || {};
var i = this,
n = oe(i, t),
r = e,
s = r.startAt,
a = r.onStart,
o = r.onStartParams,
l = si.to(
i,
It(e, {
ease: "none",
lazy: !1,
time: n,
overwrite: "auto",
duration:
e.duration ||
Math.abs(
(n - (s && "time" in s ? s.time : i._time)) / i.timeScale()
) ||
1e-8,
onStart: function () {
i.pause();
var t = e.duration || Math.abs((n - i._time) / i.timeScale());
l._dur !== t && re(l, t, 0, 1).render(l._time, !0, !0),
a && a.apply(l, o || []);
},
})
);
return l;
}),
(i.tweenFromTo = function (t, e, i) {
return this.tweenTo(e, It({ startAt: { time: oe(this, t) } }, i));
}),
(i.recent = function () {
return this._recent;
}),
(i.nextLabel = function (t) {
return void 0 === t && (t = this._time), Se(this, oe(this, t));
}),
(i.previousLabel = function (t) {
return void 0 === t && (t = this._time), Se(this, oe(this, t), 1);
}),
(i.currentLabel = function (t) {
return arguments.length
? this.seek(t, !0)
: this.previousLabel(this._time + 1e-8);
}),
(i.shiftChildren = function (t, e, i) {
void 0 === i && (i = 0);
for (var n, r = this._first, s = this.labels; r; )
r._start >= i && ((r._start += t), (r._end += t)), (r = r._next);
if (e) for (n in s) s[n] >= i && (s[n] += t);
return Yt(this);
}),
(i.invalidate = function () {
var e = this._first;
for (this._lock = 0; e; ) e.invalidate(), (e = e._next);
return t.prototype.invalidate.call(this);
}),
(i.clear = function (t) {
void 0 === t && (t = !0);
for (var e, i = this._first; i; )
(e = i._next), this.remove(i), (i = e);
return (
(this._time = this._tTime = this._pTime = 0),
t && (this.labels = {}),
Yt(this)
);
}),
(i.totalDuration = function (t) {
var e,
i,
n,
r = 0,
s = this,
a = s._last,
o = H;
if (arguments.length)
return s.timeScale(
(s._repeat < 0 ? s.duration() : s.totalDuration()) /
(s.reversed() ? -t : t)
);
if (s._dirty) {
for (n = s.parent; a; )
(e = a._prev),
a._dirty && a.totalDuration(),
(i = a._start) > o && s._sort && a._ts && !s._lock
? ((s._lock = 1), (ee(s, a, i - a._delay, 1)._lock = 0))
: (o = i),
i < 0 &&
a._ts &&
((r -= i),
((!n && !s._dp) || (n && n.smoothChildTiming)) &&
((s._start += i / s._ts), (s._time -= i), (s._tTime -= i)),
s.shiftChildren(-i, !1, -Infinity),
(o = 0)),
a._end > r && a._ts && (r = a._end),
(a = e);
re(s, s === f && s._time > r ? s._time : r, 1, 1), (s._dirty = 0);
}
return s._tDur;
}),
(e.updateRoot = function (t) {
if ((f._ts && (qt(f, Kt(t, f)), (b = Fe.frame)), Fe.frame >= xt)) {
xt += V.autoSleep || 120;
var e = f._first;
if ((!e || !e._ts) && V.autoSleep && Fe._listeners.length < 2) {
for (; e && !e._ts; ) e = e._next;
e || Fe.sleep();
}
}
}),
e
);
})(Ue);
It(Qe.prototype, { _lock: 0, _hasPause: 0, _forcing: 0 });
var Ke,
Ze = function (t, e, i, n, r, s, a) {
var o,
l,
u,
h,
c,
d,
p,
f,
v = new bi(this._pt, t, e, 0, 1, pi, null, r),
m = 0,
g = 0;
for (
v.b = i,
v.e = n,
i += "",
(p = ~(n += "").indexOf("random(")) && (n = we(n)),
s && (s((f = [i, n]), t, e), (i = f[0]), (n = f[1])),
l = i.match(ht) || [];
(o = ht.exec(n));
)
(h = o[0]),
(c = n.substring(m, o.index)),
u ? (u = (u + 1) % 5) : "rgba(" === c.substr(-5) && (u = 1),
h !== l[g++] &&
((d = parseFloat(l[g - 1]) || 0),
(v._pt = {
_next: v._pt,
p: c || 1 === g ? c : ",",
s: d,
c:
"=" === h.charAt(1)
? parseFloat(h.substr(2)) * ("-" === h.charAt(0) ? -1 : 1)
: parseFloat(h) - d,
m: u && u < 4 ? Math.round : 0,
}),
(m = ht.lastIndex));
return (
(v.c = m < n.length ? n.substring(m, n.length) : ""),
(v.fp = a),
(ct.test(n) || p) && (v.e = 0),
(this._pt = v),
v
);
},
Je = function (t, e, i, n, r, s, a, o, l) {
Z(n) && (n = n(r || 0, t, s));
var u,
h = t[e],
c =
"get" !== i
? i
: Z(h)
? l
? t[
e.indexOf("set") || !Z(t["get" + e.substr(3)])
? e
: "get" + e.substr(3)
](l)
: t[e]()
: h,
d = Z(h) ? (l ? li : oi) : ai;
if (
(K(n) &&
(~n.indexOf("random(") && (n = we(n)),
"=" === n.charAt(1) &&
(n =
parseFloat(c) +
parseFloat(n.substr(2)) * ("-" === n.charAt(0) ? -1 : 1) +
(he(c) || 0))),
c !== n)
)
return isNaN(c * n)
? (!h && !(e in t) && mt(e, n),
Ze.call(this, t, e, c, n, d, o || V.stringFilter, l))
: ((u = new bi(
this._pt,
t,
e,
+c || 0,
n - (c || 0),
"boolean" == typeof h ? di : ci,
0,
d
)),
l && (u.fp = l),
a && u.modifier(a, this, t),
(this._pt = u));
},
ti = function (t, e, i, n, r, s) {
var a, o, l, u;
if (
St[t] &&
!1 !==
(a = new St[t]()).init(
r,
a.rawVars
? e[t]
: (function (t, e, i, n, r) {
if (
(Z(t) && (t = ii(t, r, e, i, n)),
!et(t) || (t.style && t.nodeType) || at(t) || st(t))
)
return K(t) ? ii(t, r, e, i, n) : t;
var s,
a = {};
for (s in t) a[s] = ii(t[s], r, e, i, n);
return a;
})(e[t], n, r, s, i),
i,
n,
s
) &&
((i._pt = o = new bi(i._pt, r, t, 0, 1, a.render, a, 0, a.priority)),
i !== _)
)
for (
l = i._ptLookup[i._targets.indexOf(r)], u = a._props.length;
u--;
)
l[a._props[u]] = o;
return a;
},
ei = function t(e, i) {
var n,
r,
s,
a,
o,
l,
u,
h,
c,
d,
p,
v,
m,
g = e.vars,
y = g.ease,
b = g.startAt,
_ = g.immediateRender,
w = g.lazy,
T = g.onUpdate,
S = g.onUpdateParams,
C = g.callbackScope,
x = g.runBackwards,
k = g.yoyoEase,
E = g.keyframes,
M = g.autoRevert,
O = e._dur,
A = e._startAt,
P = e._targets,
L = e.parent,
D = L && "nested" === L.data ? L.parent._targets : P,
z = "auto" === e._overwrite,
F = e.timeline;
if (
(F && (!E || !y) && (y = "none"),
(e._ease = He(y, R.ease)),
(e._yEase = k ? Ve(He(!0 === k ? y : k, R.ease)) : 0),
k &&
e._yoyo &&
!e._repeat &&
((k = e._yEase), (e._yEase = e._ease), (e._ease = k)),
!F)
) {
if (
((v = (h = P[0] ? Ot(P[0]).harness : 0) && g[h.prop]),
(n = Ht(g, _t)),
A && A.render(-1, !0).kill(),
b)
) {
if (
(Wt(
(e._startAt = si.set(
P,
It(
{
data: "isStart",
overwrite: !1,
parent: L,
immediateRender: !0,
lazy: it(w),
startAt: null,
delay: 0,
onUpdate: T,
onUpdateParams: S,
callbackScope: C,
stagger: 0,
},
b
)
))
),
_)
)
if (i > 0) M || (e._startAt = 0);
else if (O && !(i < 0 && A)) return void (i && (e._zTime = i));
} else if (x && O)
if (A) !M && (e._startAt = 0);
else if (
(i && (_ = !1),
(s = It(
{
overwrite: !1,
data: "isFromStart",
lazy: _ && it(w),
immediateRender: _,
stagger: 0,
parent: L,
},
n
)),
v && (s[h.prop] = v),
Wt((e._startAt = si.set(P, s))),
_)
) {
if (!i) return;
} else t(e._startAt, 1e-8);
for (
e._pt = 0, w = (O && it(w)) || (w && !O), r = 0;
r < P.length;
r++
) {
if (
((u = (o = P[r])._gsap || Mt(P)[r]._gsap),
(e._ptLookup[r] = d = {}),
Tt[u.id] && wt.length && Ft(),
(p = D === P ? r : D.indexOf(o)),
h &&
!1 !== (c = new h()).init(o, v || n, e, p, D) &&
((e._pt = a =
new bi(e._pt, o, c.name, 0, 1, c.render, c, 0, c.priority)),
c._props.forEach(function (t) {
d[t] = a;
}),
c.priority && (l = 1)),
!h || v)
)
for (s in n)
St[s] && (c = ti(s, n, e, p, o, D))
? c.priority && (l = 1)
: (d[s] = a =
Je.call(e, o, s, "get", n[s], p, D, 0, g.stringFilter));
e._op && e._op[r] && e.kill(o, e._op[r]),
z &&
e._pt &&
((Ke = e),
f.killTweensOf(o, d, e.globalTime(0)),
(m = !e.parent),
(Ke = 0)),
e._pt && w && (Tt[u.id] = 1);
}
l && yi(e), e._onInit && e._onInit(e);
}
(e._from = !F && !!g.runBackwards),
(e._onUpdate = T),
(e._initted = (!e._op || e._pt) && !m);
},
ii = function (t, e, i, n, r) {
return Z(t)
? t.call(e, i, n, r)
: K(t) && ~t.indexOf("random(")
? we(t)
: t;
},
ni = Et + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase",
ri = (ni + ",id,stagger,delay,duration,paused,scrollTrigger").split(","),
si = (function (t) {
function e(e, i, n, r) {
var s;
"number" == typeof i && ((n.duration = i), (i = n), (n = null));
var a,
o,
l,
u,
h,
c,
p,
v,
m = (s = t.call(this, r ? i : Gt(i), n) || this).vars,
g = m.duration,
y = m.delay,
b = m.immediateRender,
_ = m.stagger,
w = m.overwrite,
T = m.keyframes,
S = m.defaults,
C = m.scrollTrigger,
x = m.yoyoEase,
k = s.parent,
E = (at(e) || st(e) ? J(e[0]) : "length" in i) ? [e] : fe(e);
if (
((s._targets = E.length
? Mt(E)
: gt(
"GSAP target " + e + " not found. https://greensock.com",
!V.nullTargetWarn
) || []),
(s._ptLookup = []),
(s._overwrite = w),
T || _ || rt(g) || rt(y))
) {
if (
((i = s.vars),
(a = s.timeline =
new Qe({ data: "nested", defaults: S || {} })).kill(),
(a.parent = d(s)),
T)
)
It(a.vars.defaults, { ease: "none" }),
T.forEach(function (t) {
return a.to(E, t, ">");
});
else {
if (((u = E.length), (p = _ ? me(_) : bt), et(_)))
for (h in _) ~ni.indexOf(h) && (v || (v = {}), (v[h] = _[h]));
for (o = 0; o < u; o++) {
for (h in ((l = {}), i)) ri.indexOf(h) < 0 && (l[h] = i[h]);
(l.stagger = 0),
x && (l.yoyoEase = x),
v && Vt(l, v),
(c = E[o]),
(l.duration = +ii(g, d(s), o, c, E)),
(l.delay = (+ii(y, d(s), o, c, E) || 0) - s._delay),
!_ &&
1 === u &&
l.delay &&
((s._delay = y = l.delay), (s._start += y), (l.delay = 0)),
a.to(c, l, p(o, c, E));
}
a.duration() ? (g = y = 0) : (s.timeline = 0);
}
g || s.duration((g = a.duration()));
} else s.timeline = 0;
return (
!0 === w && ((Ke = d(s)), f.killTweensOf(E), (Ke = 0)),
k && te(k, d(s)),
(b ||
(!g &&
!T &&
s._start === Lt(k._time) &&
it(b) &&
(function t(e) {
return !e || (e._ts && t(e.parent));
})(d(s)) &&
"nested" !== k.data)) &&
((s._tTime = -1e-8), s.render(Math.max(0, -y))),
C && ie(d(s), C),
s
);
}
p(e, t);
var i = e.prototype;
return (
(i.render = function (t, e, i) {
var n,
r,
s,
a,
o,
l,
u,
h,
c,
d = this._time,
p = this._tDur,
f = this._dur,
v = t > p - 1e-8 && t >= 0 ? p : t < 1e-8 ? 0 : t;
if (f) {
if (
v !== this._tTime ||
!t ||
i ||
(this._startAt && this._zTime < 0 != t < 0)
) {
if (((n = v), (h = this.timeline), this._repeat)) {
if (
((a = f + this._rDelay),
(n = Lt(v % a)),
v === p
? ((s = this._repeat), (n = f))
: ((s = ~~(v / a)) && s === v / a && ((n = f), s--),
n > f && (n = f)),
(l = this._yoyo && 1 & s) &&
((c = this._yEase), (n = f - n)),
(o = Qt(this._tTime, a)),
n === d && !i && this._initted)
)
return this;
s !== o &&
(h && this._yEase && Re(h, l),
!this.vars.repeatRefresh ||
l ||
this._lock ||
((this._lock = i = 1),
(this.render(Lt(a * s), !0).invalidate()._lock = 0)));
}
if (!this._initted) {
if (ne(this, t < 0 ? t : n, i, e))
return (this._tTime = 0), this;
if (f !== this._dur) return this.render(t, e, i);
}
for (
this._tTime = v,
this._time = n,
!this._act &&
this._ts &&
((this._act = 1), (this._lazy = 0)),
this.ratio = u = (c || this._ease)(n / f),
this._from && (this.ratio = u = 1 - u),
n && !d && !e && Ce(this, "onStart"),
r = this._pt;
r;
)
r.r(u, r.d), (r = r._next);
(h &&
h.render(t < 0 ? t : !n && l ? -1e-8 : h._dur * u, e, i)) ||
(this._startAt && (this._zTime = t)),
this._onUpdate &&
!e &&
(t < 0 && this._startAt && this._startAt.render(t, !0, i),
Ce(this, "onUpdate")),
this._repeat &&
s !== o &&
this.vars.onRepeat &&
!e &&
this.parent &&
Ce(this, "onRepeat"),
(v !== this._tDur && v) ||
this._tTime !== v ||
(t < 0 &&
this._startAt &&
!this._onUpdate &&
this._startAt.render(t, !0, !0),
(t || !f) &&
((v === this._tDur && this._ts > 0) ||
(!v && this._ts < 0)) &&
Wt(this, 1),
e ||
(t < 0 && !d) ||
(!v && !d) ||
(Ce(
this,
v === p ? "onComplete" : "onReverseComplete",
!0
),
this._prom &&
!(v < p && this.timeScale() > 0) &&
this._prom()));
}
} else
!(function (t, e, i, n) {
var r,
s,
a = t.ratio,
o =
e < 0 ||
(!e && a && !t._start && t._zTime > 1e-8 && !t._dp._lock) ||
((t._ts < 0 || t._dp._ts < 0) &&
"isFromStart" !== t.data &&
"isStart" !== t.data)
? 0
: 1,
l = t._rDelay,
u = 0;
if (
(l &&
t._repeat &&
((u = ue(0, t._tDur, e)),
Qt(u, l) !== (s = Qt(t._tTime, l)) &&
((a = 1 - o),
t.vars.repeatRefresh && t._initted && t.invalidate())),
o !== a || n || 1e-8 === t._zTime || (!e && t._zTime))
) {
if (!t._initted && ne(t, e, n, i)) return;
for (
s = t._zTime,
t._zTime = e || (i ? 1e-8 : 0),
i || (i = e && !s),
t.ratio = o,
t._from && (o = 1 - o),
t._time = 0,
t._tTime = u,
i || Ce(t, "onStart"),
r = t._pt;
r;
)
r.r(o, r.d), (r = r._next);
t._startAt && e < 0 && t._startAt.render(e, !0, !0),
t._onUpdate && !i && Ce(t, "onUpdate"),
u && t._repeat && !i && t.parent && Ce(t, "onRepeat"),
(e >= t._tDur || e < 0) &&
t.ratio === o &&
(o && Wt(t, 1),
i ||
(Ce(t, o ? "onComplete" : "onReverseComplete", !0),
t._prom && t._prom()));
} else t._zTime || (t._zTime = e);
})(this, t, e, i);
return this;
}),
(i.targets = function () {
return this._targets;
}),
(i.invalidate = function () {
return (
(this._pt =
this._op =
this._startAt =
this._onUpdate =
this._act =
this._lazy =
0),
(this._ptLookup = []),
this.timeline && this.timeline.invalidate(),
t.prototype.invalidate.call(this)
);
}),
(i.kill = function (t, e) {
if (
(void 0 === e && (e = "all"),
!(t || (e && "all" !== e)) && ((this._lazy = 0), this.parent))
)
return xe(this);
if (this.timeline) {
var i = this.timeline.totalDuration();
return (
this.timeline.killTweensOf(t, e, Ke && !0 !== Ke.vars.overwrite)
._first || xe(this),
this.parent &&
i !== this.timeline.totalDuration() &&
re(this, (this._dur * this.timeline._tDur) / i, 0, 1),
this
);
}
var n,
r,
s,
a,
o,
l,
u,
h = this._targets,
c = t ? fe(t) : h,
d = this._ptLookup,
p = this._pt;
if (
(!e || "all" === e) &&
(function (t, e) {
for (
var i = t.length, n = i === e.length;
n && i-- && t[i] === e[i];
);
return i < 0;
})(h, c)
)
return "all" === e && (this._pt = 0), xe(this);
for (
n = this._op = this._op || [],
"all" !== e &&
(K(e) &&
((o = {}),
Pt(e, function (t) {
return (o[t] = 1);
}),
(e = o)),
(e = (function (t, e) {
var i,
n,
r,
s,
a = t[0] ? Ot(t[0]).harness : 0,
o = a && a.aliases;
if (!o) return e;
for (n in ((i = Vt({}, e)), o))
if ((n in i))
for (r = (s = o[n].split(",")).length; r--; )
i[s[r]] = i[n];
return i;
})(h, e))),
u = h.length;
u--;
)
if (~c.indexOf(h[u]))
for (o in ((r = d[u]),
"all" === e
? ((n[u] = e), (a = r), (s = {}))
: ((s = n[u] = n[u] || {}), (a = e)),
a))
(l = r && r[o]) &&
(("kill" in l.d && !0 !== l.d.kill(o)) ||
$t(this, l, "_pt"),
delete r[o]),
"all" !== s && (s[o] = 1);
return this._initted && !this._pt && p && xe(this), this;
}),
(e.to = function (t, i) {
return new e(t, i, arguments[2]);
}),
(e.from = function (t, i) {
return new e(t, zt(arguments, 1));
}),
(e.delayedCall = function (t, i, n, r) {
return new e(i, 0, {
immediateRender: !1,
lazy: !1,
overwrite: !1,
delay: t,
onComplete: i,
onReverseComplete: i,
onCompleteParams: n,
onReverseCompleteParams: n,
callbackScope: r,
});
}),
(e.fromTo = function (t, i, n) {
return new e(t, zt(arguments, 2));
}),
(e.set = function (t, i) {
return (
(i.duration = 0), i.repeatDelay || (i.repeat = 0), new e(t, i)
);
}),
(e.killTweensOf = function (t, e, i) {
return f.killTweensOf(t, e, i);
}),
e
);
})(Ue);
It(si.prototype, {
_targets: [],
_lazy: 0,
_startAt: 0,
_op: 0,
_onInit: 0,
}),
Pt("staggerTo,staggerFrom,staggerFromTo", function (t) {
si[t] = function () {
var e = new Qe(),
i = ce.call(arguments, 0);
return (
i.splice("staggerFromTo" === t ? 5 : 4, 0, 0), e[t].apply(e, i)
);
};
});
var ai = function (t, e, i) {
return (t[e] = i);
},
oi = function (t, e, i) {
return t[e](i);
},
li = function (t, e, i, n) {
return t[e](n.fp, i);
},
ui = function (t, e, i) {
return t.setAttribute(e, i);
},
hi = function (t, e) {
return Z(t[e]) ? oi : tt(t[e]) && t.setAttribute ? ui : ai;
},
ci = function (t, e) {
return e.set(e.t, e.p, Math.round(1e4 * (e.s + e.c * t)) / 1e4, e);
},
di = function (t, e) {
return e.set(e.t, e.p, !!(e.s + e.c * t), e);
},
pi = function (t, e) {
var i = e._pt,
n = "";
if (!t && e.b) n = e.b;
else if (1 === t && e.e) n = e.e;
else {
for (; i; )
(n =
i.p +
(i.m
? i.m(i.s + i.c * t)
: Math.round(1e4 * (i.s + i.c * t)) / 1e4) +
n),
(i = i._next);
n += e.c;
}
e.set(e.t, e.p, n, e);
},
fi = function (t, e) {
for (var i = e._pt; i; ) i.r(t, i.d), (i = i._next);
},
vi = function (t, e, i, n) {
for (var r, s = this._pt; s; )
(r = s._next), s.p === n && s.modifier(t, e, i), (s = r);
},
mi = function (t) {
for (var e, i, n = this._pt; n; )
(i = n._next),
(n.p === t && !n.op) || n.op === t
? $t(this, n, "_pt")
: n.dep || (e = 1),
(n = i);
return !e;
},
gi = function (t, e, i, n) {
n.mSet(t, e, n.m.call(n.tween, i, n.mt), n);
},
yi = function (t) {
for (var e, i, n, r, s = t._pt; s; ) {
for (e = s._next, i = n; i && i.pr > s.pr; ) i = i._next;
(s._prev = i ? i._prev : r) ? (s._prev._next = s) : (n = s),
(s._next = i) ? (i._prev = s) : (r = s),
(s = e);
}
t._pt = n;
},
bi = (function () {
function t(t, e, i, n, r, s, a, o, l) {
(this.t = e),
(this.s = n),
(this.c = r),
(this.p = i),
(this.r = s || ci),
(this.d = a || this),
(this.set = o || ai),
(this.pr = l || 0),
(this._next = t),
t && (t._prev = this);
}
return (
(t.prototype.modifier = function (t, e, i) {
(this.mSet = this.mSet || this.set),
(this.set = gi),
(this.m = t),
(this.mt = i),
(this.tween = e);
}),
t
);
})();
Pt(
Et +
"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",
function (t) {
return (_t[t] = 1);
}
),
(pt.TweenMax = pt.TweenLite = si),
(pt.TimelineLite = pt.TimelineMax = Qe),
(f = new Qe({
sortChildren: !1,
defaults: R,
autoRemoveChildren: !0,
id: "root",
smoothChildTiming: !0,
})),
(V.stringFilter = ze);
var _i = {
registerPlugin: function () {
for (var t = arguments.length, e = new Array(t), i = 0; i < t; i++)
e[i] = arguments[i];
e.forEach(function (t) {
return ke(t);
});
},
timeline: function (t) {
return new Qe(t);
},
getTweensOf: function (t, e) {
return f.getTweensOf(t, e);
},
getProperty: function (t, e, i, n) {
K(t) && (t = fe(t)[0]);
var r = Ot(t || {}).get,
s = i ? Bt : jt;
return (
"native" === i && (i = ""),
t
? e
? s(((St[e] && St[e].get) || r)(t, e, i, n))
: function (e, i, n) {
return s(((St[e] && St[e].get) || r)(t, e, i, n));
}
: t
);
},
quickSetter: function (t, e, i) {
if ((t = fe(t)).length > 1) {
var n = t.map(function (t) {
return Si.quickSetter(t, e, i);
}),
r = n.length;
return function (t) {
for (var e = r; e--; ) n[e](t);
};
}
t = t[0] || {};
var s = St[e],
a = Ot(t),
o = (a.harness && (a.harness.aliases || {})[e]) || e,
l = s
? function (e) {
var n = new s();
(_._pt = 0),
n.init(t, i ? e + i : e, _, 0, [t]),
n.render(1, n),
_._pt && fi(1, _);
}
: a.set(t, o);
return s
? l
: function (e) {
return l(t, o, i ? e + i : e, a, 1);
};
},
isTweening: function (t) {
return f.getTweensOf(t, !0).length > 0;
},
defaults: function (t) {
return t && t.ease && (t.ease = He(t.ease, R.ease)), Rt(R, t || {});
},
config: function (t) {
return Rt(V, t || {});
},
registerEffect: function (t) {
var e = t.name,
i = t.effect,
n = t.plugins,
r = t.defaults,
s = t.extendTimeline;
(n || "").split(",").forEach(function (t) {
return (
t &&
!St[t] &&
!pt[t] &&
gt(e + " effect requires " + t + " plugin.")
);
}),
(Ct[e] = function (t, e, n) {
return i(fe(t), It(e || {}, r), n);
}),
s &&
(Qe.prototype[e] = function (t, i, n) {
return this.add(Ct[e](t, et(i) ? i : (n = i) && {}, this), n);
});
},
registerEase: function (t, e) {
je[t] = He(e);
},
parseEase: function (t, e) {
return arguments.length ? He(t, e) : je;
},
getById: function (t) {
return f.getById(t);
},
exportRoot: function (t, e) {
void 0 === t && (t = {});
var i,
n,
r = new Qe(t);
for (
r.smoothChildTiming = it(t.smoothChildTiming),
f.remove(r),
r._dp = 0,
r._time = r._tTime = f._time,
i = f._first;
i;
)
(n = i._next),
(!e &&
!i._dur &&
i instanceof si &&
i.vars.onComplete === i._targets[0]) ||
ee(r, i, i._start - i._delay),
(i = n);
return ee(f, r, 0), r;
},
utils: {
wrap: function t(e, i, n) {
var r = i - e;
return at(e)
? _e(e, t(0, e.length), i)
: le(n, function (t) {
return ((r + ((t - e) % r)) % r) + e;
});
},
wrapYoyo: function t(e, i, n) {
var r = i - e,
s = 2 * r;
return at(e)
? _e(e, t(0, e.length - 1), i)
: le(n, function (t) {
return e + ((t = (s + ((t - e) % s)) % s || 0) > r ? s - t : t);
});
},
distribute: me,
random: be,
snap: ye,
normalize: function (t, e, i) {
return Te(t, e, 0, 1, i);
},
getUnit: he,
clamp: function (t, e, i) {
return le(i, function (i) {
return ue(t, e, i);
});
},
splitColor: Oe,
toArray: fe,
mapRange: Te,
pipe: function () {
for (var t = arguments.length, e = new Array(t), i = 0; i < t; i++)
e[i] = arguments[i];
return function (t) {
return e.reduce(function (t, e) {
return e(t);
}, t);
};
},
unitize: function (t, e) {
return function (i) {
return t(parseFloat(i)) + (e || he(i));
};
},
interpolate: function t(e, i, n, r) {
var s = isNaN(e + i)
? 0
: function (t) {
return (1 - t) * e + t * i;
};
if (!s) {
var a,
o,
l,
u,
h,
c = K(e),
d = {};
if ((!0 === n && (r = 1) && (n = null), c))
(e = { p: e }), (i = { p: i });
else if (at(e) && !at(i)) {
for (l = [], u = e.length, h = u - 2, o = 1; o < u; o++)
l.push(t(e[o - 1], e[o]));
u--,
(s = function (t) {
t *= u;
var e = Math.min(h, ~~t);
return l[e](t - e);
}),
(n = i);
} else r || (e = Vt(at(e) ? [] : {}, e));
if (!l) {
for (a in i) Je.call(d, e, a, "get", i[a]);
s = function (t) {
return fi(t, d) || (c ? e.p : e);
};
}
}
return le(n, s);
},
shuffle: ve,
},
install: vt,
effects: Ct,
ticker: Fe,
updateRoot: Qe.updateRoot,
plugins: St,
globalTimeline: f,
core: {
PropTween: bi,
globals: yt,
Tween: si,
Timeline: Qe,
Animation: Ue,
getCache: Ot,
_removeLinkedListItem: $t,
},
};
Pt("to,from,fromTo,delayedCall,set,killTweensOf", function (t) {
return (_i[t] = si[t]);
}),
Fe.add(Qe.updateRoot),
(_ = _i.to({}, { duration: 0 }));
var wi = function (t, e) {
for (var i = t._pt; i && i.p !== e && i.op !== e && i.fp !== e; )
i = i._next;
return i;
},
Ti = function (t, e) {
return {
name: t,
rawVars: 1,
init: function (t, i, n) {
n._onInit = function (t) {
var n, r;
if (
(K(i) &&
((n = {}),
Pt(i, function (t) {
return (n[t] = 1);
}),
(i = n)),
e)
) {
for (r in ((n = {}), i)) n[r] = e(i[r]);
i = n;
}
!(function (t, e) {
var i,
n,
r,
s = t._targets;
for (i in e)
for (n = s.length; n--; )
(r = t._ptLookup[n][i]) &&
(r = r.d) &&
(r._pt && (r = wi(r, i)),
r && r.modifier && r.modifier(e[i], t, s[n], i));
})(t, i);
};
},
};
},
Si =
_i.registerPlugin(
{
name: "attr",
init: function (t, e, i, n, r) {
var s, a;
for (s in e)
(a = this.add(
t,
"setAttribute",
(t.getAttribute(s) || 0) + "",
e[s],
n,
r,
0,
0,
s
)) && (a.op = s),
this._props.push(s);
},
},
{
name: "endArray",
init: function (t, e) {
for (var i = e.length; i--; ) this.add(t, i, t[i] || 0, e[i]);
},
},
Ti("roundProps", ge),
Ti("modifiers"),
Ti("snap", ye)
) || _i;
(si.version = Qe.version = Si.version = "3.5.1"), (y = 1), nt() && qe();
je.Power0,
je.Power1,
je.Power2,
je.Power3,
je.Power4,
je.Linear,
je.Quad,
je.Cubic,
je.Quart,
je.Quint,
je.Strong,
je.Elastic,
je.Back,
je.SteppedEase,
je.Bounce,
je.Sine,
je.Expo,
je.Circ;
var Ci,
xi,
ki,
Ei,
Mi,
Oi,
Ai,
Pi,
Li = {},
Di = 180 / Math.PI,
zi = Math.PI / 180,
Fi = Math.atan2,
qi = /([A-Z])/g,
ji = /(?:left|right|width|margin|padding|x)/i,
Bi = /[\s,\(]\S/,
Ii = {
autoAlpha: "opacity,visibility",
scale: "scaleX,scaleY",
alpha: "opacity",
},
Ni = function (t, e) {
return e.set(
e.t,
e.p,
Math.round(1e4 * (e.s + e.c * t)) / 1e4 + e.u,
e
);
},
Vi = function (t, e) {
return e.set(
e.t,
e.p,
1 === t ? e.e : Math.round(1e4 * (e.s + e.c * t)) / 1e4 + e.u,
e
);
},
Ri = function (t, e) {
return e.set(
e.t,
e.p,
t ? Math.round(1e4 * (e.s + e.c * t)) / 1e4 + e.u : e.b,
e
);
},
Hi = 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);
},
Gi = function (t, e) {
return e.set(e.t, e.p, t ? e.e : e.b, e);
},
$i = function (t, e) {
return e.set(e.t, e.p, 1 !== t ? e.b : e.e, e);
},
Wi = function (t, e, i) {
return (t.style[e] = i);
},
Yi = function (t, e, i) {
return t.style.setProperty(e, i);
},
Xi = function (t, e, i) {
return (t._gsap[e] = i);
},
Ui = function (t, e, i) {
return (t._gsap.scaleX = t._gsap.scaleY = i);
},
Qi = function (t, e, i, n, r) {
var s = t._gsap;
(s.scaleX = s.scaleY = i), s.renderTransform(r, s);
},
Ki = function (t, e, i, n, r) {
var s = t._gsap;
(s[e] = i), s.renderTransform(r, s);
},
Zi = "transform",
Ji = Zi + "Origin",
tn = function (t, e) {
var i = xi.createElementNS
? xi.createElementNS(
(e || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"),
t
)
: xi.createElement(t);
return i.style ? i : xi.createElement(t);
},
en = function t(e, i, n) {
var r = getComputedStyle(e);
return (
r[i] ||
r.getPropertyValue(i.replace(qi, "-$1").toLowerCase()) ||
r.getPropertyValue(i) ||
(!n && t(e, rn(i) || i, 1)) ||
""
);
},
nn = "O,Moz,ms,Ms,Webkit".split(","),
rn = function (t, e, i) {
var n = (e || Mi).style,
r = 5;
if (t in n && !i) return t;
for (
t = t.charAt(0).toUpperCase() + t.substr(1);
r-- && !(nn[r] + t in n);
);
return r < 0 ? null : (3 === r ? "ms" : r >= 0 ? nn[r] : "") + t;
},
sn = function () {
"undefined" != typeof window &&
window.document &&
((Ci = window),
(xi = Ci.document),
(ki = xi.documentElement),
(Mi = tn("div") || { style: {} }),
(Oi = tn("div")),
(Zi = rn(Zi)),
(Ji = Zi + "Origin"),
(Mi.style.cssText =
"border-width:0;line-height:0;position:absolute;padding:0"),
(Pi = !!rn("perspective")),
(Ei = 1));
},
an = function t(e) {
var i,
n = tn(
"svg",
(this.ownerSVGElement &&
this.ownerSVGElement.getAttribute("xmlns")) ||
"http://www.w3.org/2000/svg"
),
r = this.parentNode,
s = this.nextSibling,
a = this.style.cssText;
if (
(ki.appendChild(n),
n.appendChild(this),
(this.style.display = "block"),
e)
)
try {
(i = this.getBBox()),
(this._gsapBBox = this.getBBox),
(this.getBBox = t);
} catch (t) {}
else this._gsapBBox && (i = this._gsapBBox());
return (
r && (s ? r.insertBefore(this, s) : r.appendChild(this)),
ki.removeChild(n),
(this.style.cssText = a),
i
);
},
on = function (t, e) {
for (var i = e.length; i--; )
if (t.hasAttribute(e[i])) return t.getAttribute(e[i]);
},
ln = function (t) {
var e;
try {
e = t.getBBox();
} catch (i) {
e = an.call(t, !0);
}
return (
(e && (e.width || e.height)) ||
t.getBBox === an ||
(e = an.call(t, !0)),
!e || e.width || e.x || e.y
? e
: {
x: +on(t, ["x", "cx", "x1"]) || 0,
y: +on(t, ["y", "cy", "y1"]) || 0,
width: 0,
height: 0,
}
);
},
un = function (t) {
return !(!t.getCTM || (t.parentNode && !t.ownerSVGElement) || !ln(t));
},
hn = function (t, e) {
if (e) {
var i = t.style;
e in Li && e !== Ji && (e = Zi),
i.removeProperty
? (("ms" !== e.substr(0, 2) && "webkit" !== e.substr(0, 6)) ||
(e = "-" + e),
i.removeProperty(e.replace(qi, "-$1").toLowerCase()))
: i.removeAttribute(e);
}
},
cn = function (t, e, i, n, r, s) {
var a = new bi(t._pt, e, i, 0, 1, s ? $i : Gi);
return (t._pt = a), (a.b = n), (a.e = r), t._props.push(i), a;
},
dn = { deg: 1, rad: 1, turn: 1 },
pn = function t(e, i, n, r) {
var s,
a,
o,
l,
u = parseFloat(n) || 0,
h = (n + "").trim().substr((u + "").length) || "px",
c = Mi.style,
d = ji.test(i),
p = "svg" === e.tagName.toLowerCase(),
f = (p ? "client" : "offset") + (d ? "Width" : "Height"),
v = "px" === r,
m = "%" === r;
return r === h || !u || dn[r] || dn[h]
? u
: ("px" !== h && !v && (u = t(e, i, n, "px")),
(l = e.getCTM && un(e)),
m && (Li[i] || ~i.indexOf("adius"))
? Lt((u / (l ? e.getBBox()[d ? "width" : "height"] : e[f])) * 100)
: ((c[d ? "width" : "height"] = 100 + (v ? h : r)),
(a =
~i.indexOf("adius") || ("em" === r && e.appendChild && !p)
? e
: e.parentNode),
l && (a = (e.ownerSVGElement || {}).parentNode),
(a && a !== xi && a.appendChild) || (a = xi.body),
(o = a._gsap) && m && o.width && d && o.time === Fe.time
? Lt((u / o.width) * 100)
: ((m || "%" === h) && (c.position = en(e, "position")),
a === e && (c.position = "static"),
a.appendChild(Mi),
(s = Mi[f]),
a.removeChild(Mi),
(c.position = "absolute"),
d && m && (((o = Ot(a)).time = Fe.time), (o.width = a[f])),
Lt(v ? (s * u) / 100 : s && u ? (100 / s) * u : 0))));
},
fn = function (t, e, i, n) {
var r;
return (
Ei || sn(),
e in Ii &&
"transform" !== e &&
~(e = Ii[e]).indexOf(",") &&
(e = e.split(",")[0]),
Li[e] && "transform" !== e
? ((r = xn(t, n)),
(r =
"transformOrigin" !== e
? r[e]
: kn(en(t, Ji)) + " " + r.zOrigin + "px"))
: (!(r = t.style[e]) ||
"auto" === r ||
n ||
~(r + "").indexOf("calc(")) &&
(r =
(yn[e] && yn[e](t, e, i)) ||
en(t, e) ||
At(t, e) ||
("opacity" === e ? 1 : 0)),
i && !~(r + "").indexOf(" ") ? pn(t, e, r, i) + i : r
);
},
vn = function (t, e, i, n) {
if (!i || "none" === i) {
var r = rn(e, t, 1),
s = r && en(t, r, 1);
s && s !== i
? ((e = r), (i = s))
: "borderColor" === e && (i = en(t, "borderTopColor"));
}
var a,
o,
l,
u,
h,
c,
d,
p,
f,
v,
m,
g,
y = new bi(this._pt, t.style, e, 0, 1, pi),
b = 0,
_ = 0;
if (
((y.b = i),
(y.e = n),
(i += ""),
"auto" === (n += "") &&
((t.style[e] = n), (n = en(t, e) || n), (t.style[e] = i)),
ze((a = [i, n])),
(n = a[1]),
(l = (i = a[0]).match(ut) || []),
(n.match(ut) || []).length)
) {
for (; (o = ut.exec(n)); )
(d = o[0]),
(f = n.substring(b, o.index)),
h
? (h = (h + 1) % 5)
: ("rgba(" !== f.substr(-5) && "hsla(" !== f.substr(-5)) ||
(h = 1),
d !== (c = l[_++] || "") &&
((u = parseFloat(c) || 0),
(m = c.substr((u + "").length)),
(g = "=" === d.charAt(1) ? +(d.charAt(0) + "1") : 0) &&
(d = d.substr(2)),
(p = parseFloat(d)),
(v = d.substr((p + "").length)),
(b = ut.lastIndex - v.length),
v ||
((v = v || V.units[e] || m),
b === n.length && ((n += v), (y.e += v))),
m !== v && (u = pn(t, e, c, v) || 0),
(y._pt = {
_next: y._pt,
p: f || 1 === _ ? f : ",",
s: u,
c: g ? g * p : p - u,
m: h && h < 4 ? Math.round : 0,
}));
y.c = b < n.length ? n.substring(b, n.length) : "";
} else y.r = "display" === e && "none" === n ? $i : Gi;
return ct.test(n) && (y.e = 0), (this._pt = y), y;
},
mn = {
top: "0%",
bottom: "100%",
left: "0%",
right: "100%",
center: "50%",
},
gn = function (t, e) {
if (e.tween && e.tween._time === e.tween._dur) {
var i,
n,
r,
s = e.t,
a = s.style,
o = e.u,
l = s._gsap;
if ("all" === o || !0 === o) (a.cssText = ""), (n = 1);
else
for (r = (o = o.split(",")).length; --r > -1; )
(i = o[r]),
Li[i] && ((n = 1), (i = "transformOrigin" === i ? Ji : Zi)),
hn(s, i);
n &&
(hn(s, Zi),
l &&
(l.svg && s.removeAttribute("transform"),
xn(s, 1),
(l.uncache = 1)));
}
},
yn = {
clearProps: function (t, e, i, n, r) {
if ("isFromStart" !== r.data) {
var s = (t._pt = new bi(t._pt, e, i, 0, 0, gn));
return (s.u = n), (s.pr = -10), (s.tween = r), t._props.push(i), 1;
}
},
},
bn = [1, 0, 0, 1, 0, 0],
_n = {},
wn = function (t) {
return "matrix(1, 0, 0, 1, 0, 0)" === t || "none" === t || !t;
},
Tn = function (t) {
var e = en(t, Zi);
return wn(e) ? bn : e.substr(7).match(lt).map(Lt);
},
Sn = function (t, e) {
var i,
n,
r,
s,
a = t._gsap || Ot(t),
o = t.style,
l = Tn(t);
return a.svg && t.getAttribute("transform")
? "1,0,0,1,0,0" ===
(l = [
(r = t.transform.baseVal.consolidate().matrix).a,
r.b,
r.c,
r.d,
r.e,
r.f,
]).join(",")
? bn
: l
: (l !== bn ||
t.offsetParent ||
t === ki ||
a.svg ||
((r = o.display),
(o.display = "block"),
((i = t.parentNode) && t.offsetParent) ||
((s = 1), (n = t.nextSibling), ki.appendChild(t)),
(l = Tn(t)),
r ? (o.display = r) : hn(t, "display"),
s &&
(n
? i.insertBefore(t, n)
: i
? i.appendChild(t)
: ki.removeChild(t))),
e && l.length > 6 ? [l[0], l[1], l[4], l[5], l[12], l[13]] : l);
},
Cn = function (t, e, i, n, r, s) {
var a,
o,
l,
u = t._gsap,
h = r || Sn(t, !0),
c = u.xOrigin || 0,
d = u.yOrigin || 0,
p = u.xOffset || 0,
f = u.yOffset || 0,
v = h[0],
m = h[1],
g = h[2],
y = h[3],
b = h[4],
_ = h[5],
w = e.split(" "),
T = parseFloat(w[0]) || 0,
S = parseFloat(w[1]) || 0;
i
? h !== bn &&
(o = v * y - m * g) &&
((l = T * (-m / o) + S * (v / o) - (v * _ - m * b) / o),
(T = T * (y / o) + S * (-g / o) + (g * _ - y * b) / o),
(S = l))
: ((T =
(a = ln(t)).x + (~w[0].indexOf("%") ? (T / 100) * a.width : T)),
(S =
a.y + (~(w[1] || w[0]).indexOf("%") ? (S / 100) * a.height : S))),
n || (!1 !== n && u.smooth)
? ((b = T - c),
(_ = S - d),
(u.xOffset = p + (b * v + _ * g) - b),
(u.yOffset = f + (b * m + _ * y) - _))
: (u.xOffset = u.yOffset = 0),
(u.xOrigin = T),
(u.yOrigin = S),
(u.smooth = !!n),
(u.origin = e),
(u.originIsAbsolute = !!i),
(t.style[Ji] = "0px 0px"),
s &&
(cn(s, u, "xOrigin", c, T),
cn(s, u, "yOrigin", d, S),
cn(s, u, "xOffset", p, u.xOffset),
cn(s, u, "yOffset", f, u.yOffset)),
t.setAttribute("data-svg-origin", T + " " + S);
},
xn = function (t, e) {
var i = t._gsap || new Xe(t);
if ("x" in i && !e && !i.uncache) return i;
var n,
r,
s,
a,
o,
l,
u,
h,
c,
d,
p,
f,
v,
m,
g,
y,
b,
_,
w,
T,
S,
C,
x,
k,
E,
M,
O,
A,
P,
L,
D,
z,
F = t.style,
q = i.scaleX < 0,
j = en(t, Ji) || "0";
return (
(n = r = s = l = u = h = c = d = p = 0),
(a = o = 1),
(i.svg = !(!t.getCTM || !un(t))),
(m = Sn(t, i.svg)),
i.svg &&
((k = !i.uncache && t.getAttribute("data-svg-origin")),
Cn(t, k || j, !!k || i.originIsAbsolute, !1 !== i.smooth, m)),
(f = i.xOrigin || 0),
(v = i.yOrigin || 0),
m !== bn &&
((_ = m[0]),
(w = m[1]),
(T = m[2]),
(S = m[3]),
(n = C = m[4]),
(r = x = m[5]),
6 === m.length
? ((a = Math.sqrt(_ * _ + w * w)),
(o = Math.sqrt(S * S + T * T)),
(l = _ || w ? Fi(w, _) * Di : 0),
(c = T || S ? Fi(T, S) * Di + l : 0) && (o *= Math.cos(c * zi)),
i.svg &&
((n -= f - (f * _ + v * T)), (r -= v - (f * w + v * S))))
: ((z = m[6]),
(L = m[7]),
(O = m[8]),
(A = m[9]),
(P = m[10]),
(D = m[11]),
(n = m[12]),
(r = m[13]),
(s = m[14]),
(u = (g = Fi(z, P)) * Di),
g &&
((k = C * (y = Math.cos(-g)) + O * (b = Math.sin(-g))),
(E = x * y + A * b),
(M = z * y + P * b),
(O = C * -b + O * y),
(A = x * -b + A * y),
(P = z * -b + P * y),
(D = L * -b + D * y),
(C = k),
(x = E),
(z = M)),
(h = (g = Fi(-T, P)) * Di),
g &&
((y = Math.cos(-g)),
(D = S * (b = Math.sin(-g)) + D * y),
(_ = k = _ * y - O * b),
(w = E = w * y - A * b),
(T = M = T * y - P * b)),
(l = (g = Fi(w, _)) * Di),
g &&
((k = _ * (y = Math.cos(g)) + w * (b = Math.sin(g))),
(E = C * y + x * b),
(w = w * y - _ * b),
(x = x * y - C * b),
(_ = k),
(C = E)),
u &&
Math.abs(u) + Math.abs(l) > 359.9 &&
((u = l = 0), (h = 180 - h)),
(a = Lt(Math.sqrt(_ * _ + w * w + T * T))),
(o = Lt(Math.sqrt(x * x + z * z))),
(g = Fi(C, x)),
(c = Math.abs(g) > 2e-4 ? g * Di : 0),
(p = D ? 1 / (D < 0 ? -D : D) : 0)),
i.svg &&
((k = t.getAttribute("transform")),
(i.forceCSS = t.setAttribute("transform", "") || !wn(en(t, Zi))),
k && t.setAttribute("transform", k))),
Math.abs(c) > 90 &&
Math.abs(c) < 270 &&
(q
? ((a *= -1),
(c += l <= 0 ? 180 : -180),
(l += l <= 0 ? 180 : -180))
: ((o *= -1), (c += c <= 0 ? 180 : -180))),
(i.x =
((i.xPercent =
n && Math.round(t.offsetWidth / 2) === Math.round(-n) ? -50 : 0)
? 0
: n) + "px"),
(i.y =
((i.yPercent =
r && Math.round(t.offsetHeight / 2) === Math.round(-r) ? -50 : 0)
? 0
: r) + "px"),
(i.z = s + "px"),
(i.scaleX = Lt(a)),
(i.scaleY = Lt(o)),
(i.rotation = Lt(l) + "deg"),
(i.rotationX = Lt(u) + "deg"),
(i.rotationY = Lt(h) + "deg"),
(i.skewX = c + "deg"),
(i.skewY = d + "deg"),
(i.transformPerspective = p + "px"),
(i.zOrigin = parseFloat(j.split(" ")[2]) || 0) && (F[Ji] = kn(j)),
(i.xOffset = i.yOffset = 0),
(i.force3D = V.force3D),
(i.renderTransform = i.svg ? An : Pi ? On : Mn),
(i.uncache = 0),
i
);
},
kn = function (t) {
return (t = t.split(" "))[0] + " " + t[1];
},
En = function (t, e, i) {
var n = he(e);
return Lt(parseFloat(e) + parseFloat(pn(t, "x", i + "px", n))) + n;
},
Mn = function (t, e) {
(e.z = "0px"),
(e.rotationY = e.rotationX = "0deg"),
(e.force3D = 0),
On(t, e);
},
On = function (t, e) {
var i = e || this,
n = i.xPercent,
r = i.yPercent,
s = i.x,
a = i.y,
o = i.z,
l = i.rotation,
u = i.rotationY,
h = i.rotationX,
c = i.skewX,
d = i.skewY,
p = i.scaleX,
f = i.scaleY,
v = i.transformPerspective,
m = i.force3D,
g = i.target,
y = i.zOrigin,
b = "",
_ = ("auto" === m && t && 1 !== t) || !0 === m;
if (y && ("0deg" !== h || "0deg" !== u)) {
var w,
T = parseFloat(u) * zi,
S = Math.sin(T),
C = Math.cos(T);
(T = parseFloat(h) * zi),
(w = Math.cos(T)),
(s = En(g, s, S * w * -y)),
(a = En(g, a, -Math.sin(T) * -y)),
(o = En(g, o, C * w * -y + y));
}
"0px" !== v && (b += "perspective(" + v + ") "),
(n || r) && (b += "translate(" + n + "%, " + r + "%) "),
(_ || "0px" !== s || "0px" !== a || "0px" !== o) &&
(b +=
"0px" !== o || _
? "translate3d(" + s + ", " + a + ", " + o + ") "
: "translate(" + s + ", " + a + ") "),
"0deg" !== l && (b += "rotate(" + l + ") "),
"0deg" !== u && (b += "rotateY(" + u + ") "),
"0deg" !== h && (b += "rotateX(" + h + ") "),
("0deg" === c && "0deg" === d) ||
(b += "skew(" + c + ", " + d + ") "),
(1 === p && 1 === f) || (b += "scale(" + p + ", " + f + ") "),
(g.style[Zi] = b || "translate(0, 0)");
},
An = function (t, e) {
var i,
n,
r,
s,
a,
o = e || this,
l = o.xPercent,
u = o.yPercent,
h = o.x,
c = o.y,
d = o.rotation,
p = o.skewX,
f = o.skewY,
v = o.scaleX,
m = o.scaleY,
g = o.target,
y = o.xOrigin,
b = o.yOrigin,
_ = o.xOffset,
w = o.yOffset,
T = o.forceCSS,
S = parseFloat(h),
C = parseFloat(c);
(d = parseFloat(d)),
(p = parseFloat(p)),
(f = parseFloat(f)) && ((p += f = parseFloat(f)), (d += f)),
d || p
? ((d *= zi),
(p *= zi),
(i = Math.cos(d) * v),
(n = Math.sin(d) * v),
(r = Math.sin(d - p) * -m),
(s = Math.cos(d - p) * m),
p &&
((f *= zi),
(a = Math.tan(p - f)),
(r *= a = Math.sqrt(1 + a * a)),
(s *= a),
f &&
((a = Math.tan(f)),
(i *= a = Math.sqrt(1 + a * a)),
(n *= a))),
(i = Lt(i)),
(n = Lt(n)),
(r = Lt(r)),
(s = Lt(s)))
: ((i = v), (s = m), (n = r = 0)),
((S && !~(h + "").indexOf("px")) ||
(C && !~(c + "").indexOf("px"))) &&
((S = pn(g, "x", h, "px")), (C = pn(g, "y", c, "px"))),
(y || b || _ || w) &&
((S = Lt(S + y - (y * i + b * r) + _)),
(C = Lt(C + b - (y * n + b * s) + w))),
(l || u) &&
((a = g.getBBox()),
(S = Lt(S + (l / 100) * a.width)),
(C = Lt(C + (u / 100) * a.height))),
(a =
"matrix(" +
i +
"," +
n +
"," +
r +
"," +
s +
"," +
S +
"," +
C +
")"),
g.setAttribute("transform", a),
T && (g.style[Zi] = a);
},
Pn = function (t, e, i, n, r, s) {
var a,
o,
l = K(r),
u = parseFloat(r) * (l && ~r.indexOf("rad") ? Di : 1),
h = s ? u * s : u - n,
c = n + h + "deg";
return (
l &&
("short" === (a = r.split("_")[1]) &&
(h %= 360) !== h % 180 &&
(h += h < 0 ? 360 : -360),
"cw" === a && h < 0
? (h = ((h + 36e9) % 360) - 360 * ~~(h / 360))
: "ccw" === a &&
h > 0 &&
(h = ((h - 36e9) % 360) - 360 * ~~(h / 360))),
(t._pt = o = new bi(t._pt, e, i, n, h, Vi)),
(o.e = c),
(o.u = "deg"),
t._props.push(i),
o
);
},
Ln = function (t, e, i) {
var n,
r,
s,
a,
o,
l,
u,
h = Oi.style,
c = i._gsap;
for (r in ((h.cssText =
getComputedStyle(i).cssText + ";position:absolute;display:block;"),
(h[Zi] = e),
xi.body.appendChild(Oi),
(n = xn(Oi, 1)),
Li))
(s = c[r]) !== (a = n[r]) &&
"perspective,force3D,transformOrigin,svgOrigin".indexOf(r) < 0 &&
((o = he(s) !== (u = he(a)) ? pn(i, r, s, u) : parseFloat(s)),
(l = parseFloat(a)),
(t._pt = new bi(t._pt, c, r, o, l - o, Ni)),
(t._pt.u = u || 0),
t._props.push(r));
xi.body.removeChild(Oi);
};
Pt("padding,margin,Width,Radius", function (t, e) {
var i = "Top",
n = "Right",
r = "Bottom",
s = "Left",
a = (e < 3 ? [i, n, r, s] : [i + s, i + n, r + n, r + s]).map(function (
i
) {
return e < 2 ? t + i : "border" + i + t;
});
yn[e > 1 ? "border" + t : t] = function (t, e, i, n, r) {
var s, o;
if (arguments.length < 4)
return (
(s = a.map(function (e) {
return fn(t, e, i);
})),
5 === (o = s.join(" ")).split(s[0]).length ? s[0] : o
);
(s = (n + "").split(" ")),
(o = {}),
a.forEach(function (t, e) {
return (o[t] = s[e] = s[e] || s[((e - 1) / 2) | 0]);
}),
t.init(e, o, r);
};
});
var Dn,
zn,
Fn = {
name: "css",
register: sn,
targetTest: function (t) {
return t.style && t.nodeType;
},
init: function (t, e, i, n, r) {
var s,
a,
o,
l,
u,
h,
c,
d,
p,
f,
v,
m,
g,
y,
b,
_,
w,
T,
S,
C = this._props,
x = t.style;
for (c in (Ei || sn(), e))
if (
"autoRound" !== c &&
((a = e[c]), !St[c] || !ti(c, e, i, n, t, r))
)
if (
((u = typeof a),
(h = yn[c]),
"function" === u && (u = typeof (a = a.call(i, n, t, r))),
"string" === u && ~a.indexOf("random(") && (a = we(a)),
h)
)
h(this, t, c, a, i) && (b = 1);
else if ("--" === c.substr(0, 2))
this.add(
x,
"setProperty",
getComputedStyle(t).getPropertyValue(c) + "",
a + "",
n,
r,
0,
0,
c
);
else if ("undefined" !== u) {
if (
((s = fn(t, c)),
(l = parseFloat(s)),
(f =
"string" === u && "=" === a.charAt(1)
? +(a.charAt(0) + "1")
: 0) && (a = a.substr(2)),
(o = parseFloat(a)),
c in Ii &&
("autoAlpha" === c &&
(1 === l &&
"hidden" === fn(t, "visibility") &&
o &&
(l = 0),
cn(
this,
x,
"visibility",
l ? "inherit" : "hidden",
o ? "inherit" : "hidden",
!o
)),
"scale" !== c &&
"transform" !== c &&
~(c = Ii[c]).indexOf(",") &&
(c = c.split(",")[0])),
(v = c in Li))
)
if (
(m ||
((g = t._gsap).renderTransform || xn(t),
(y = !1 !== e.smoothOrigin && g.smooth),
((m = this._pt =
new bi(
this._pt,
x,
Zi,
0,
1,
g.renderTransform,
g,
0,
-1
)).dep = 1)),
"scale" === c)
)
(this._pt = new bi(
this._pt,
g,
"scaleY",
g.scaleY,
f ? f * o : o - g.scaleY
)),
C.push("scaleY", c),
(c += "X");
else {
if ("transformOrigin" === c) {
(w = void 0),
(T = void 0),
(S = void 0),
(w = (_ = a).split(" ")),
(T = w[0]),
(S = w[1] || "50%"),
("top" !== T &&
"bottom" !== T &&
"left" !== S &&
"right" !== S) ||
((_ = T), (T = S), (S = _)),
(w[0] = mn[T] || T),
(w[1] = mn[S] || S),
(a = w.join(" ")),
g.svg
? Cn(t, a, 0, y, 0, this)
: ((p = parseFloat(a.split(" ")[2]) || 0) !==
g.zOrigin && cn(this, g, "zOrigin", g.zOrigin, p),
cn(this, x, c, kn(s), kn(a)));
continue;
}
if ("svgOrigin" === c) {
Cn(t, a, 1, y, 0, this);
continue;
}
if (c in _n) {
Pn(this, g, c, l, a, f);
continue;
}
if ("smoothOrigin" === c) {
cn(this, g, "smooth", g.smooth, a);
continue;
}
if ("force3D" === c) {
g[c] = a;
continue;
}
if ("transform" === c) {
Ln(this, a, t);
continue;
}
}
else c in x || (c = rn(c) || c);
if (
v ||
((o || 0 === o) && (l || 0 === l) && !Bi.test(a) && c in x)
)
o || (o = 0),
(d = (s + "").substr((l + "").length)) !==
(p = he(a) || (c in V.units ? V.units[c] : d)) &&
(l = pn(t, c, s, p)),
(this._pt = new bi(
this._pt,
v ? g : x,
c,
l,
f ? f * o : o - l,
"px" !== p || !1 === e.autoRound || v ? Ni : Hi
)),
(this._pt.u = p || 0),
d !== p && ((this._pt.b = s), (this._pt.r = Ri));
else if (c in x) vn.call(this, t, c, s, a);
else {
if (!(c in t)) {
mt(c, a);
continue;
}
this.add(t, c, t[c], a, n, r);
}
C.push(c);
}
b && yi(this);
},
get: fn,
aliases: Ii,
getSetter: function (t, e, i) {
var n = Ii[e];
return (
n && n.indexOf(",") < 0 && (e = n),
e in Li && e !== Ji && (t._gsap.x || fn(t, "x"))
? i && Ai === i
? "scale" === e
? Ui
: Xi
: (Ai = i || {}) && ("scale" === e ? Qi : Ki)
: t.style && !tt(t.style[e])
? Wi
: ~e.indexOf("-")
? Yi
: hi(t, e)
);
},
core: { _removeProperty: hn, _getMatrix: Sn },
};
(Si.utils.checkPrefix = rn),
(zn = Pt(
"x,y,z,scale,scaleX,scaleY,xPercent,yPercent," +
(Dn = "rotation,rotationX,rotationY,skewX,skewY") +
",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",
function (t) {
Li[t] = 1;
}
)),
Pt(Dn, function (t) {
(V.units[t] = "deg"), (_n[t] = 1);
}),
(Ii[zn[13]] = "x,y,z,scale,scaleX,scaleY,xPercent,yPercent," + Dn),
Pt(
"0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",
function (t) {
var e = t.split(":");
Ii[e[1]] = zn[e[0]];
}
),
Pt(
"x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",
function (t) {
V.units[t] = "px";
}
),
Si.registerPlugin(Fn);
var qn = Si.registerPlugin(Fn) || Si;
qn.core.Tween;
function jn(t, e) {
return (
(function (t) {
if (Array.isArray(t)) return t;
})(t) ||
(function (t, e) {
if ("undefined" == typeof Symbol || !(Symbol.iterator in Object(t)))
return;
var i = [],
n = !0,
r = !1,
s = void 0;
try {
for (
var a, o = t[Symbol.iterator]();
!(n = (a = o.next()).done) &&
(i.push(a.value), !e || i.length !== e);
n = !0
);
} catch (t) {
(r = !0), (s = t);
} finally {
try {
n || null == o.return || o.return();
} finally {
if (r) throw s;
}
}
return i;
})(t, e) ||
In(t, e) ||
(function () {
throw new TypeError(
"Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
})()
);
}
function Bn(t, e) {
var i;
if ("undefined" == typeof Symbol || null == t[Symbol.iterator]) {
if (
Array.isArray(t) ||
(i = In(t)) ||
(e && t && "number" == typeof t.length)
) {
i && (t = i);
var n = 0,
r = function () {};
return {
s: r,
n: function () {
return n >= t.length ? { done: !0 } : { done: !1, value: t[n++] };
},
e: function (t) {
throw t;
},
f: r,
};
}
throw new TypeError(
"Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
}
var s,
a = !0,
o = !1;
return {
s: function () {
i = t[Symbol.iterator]();
},
n: function () {
var t = i.next();
return (a = t.done), t;
},
e: function (t) {
(o = !0), (s = t);
},
f: function () {
try {
a || null == i.return || i.return();
} finally {
if (o) throw s;
}
},
};
}
function In(t, e) {
if (t) {
if ("string" == typeof t) return Nn(t, e);
var i = Object.prototype.toString.call(t).slice(8, -1);
return (
"Object" === i && t.constructor && (i = t.constructor.name),
"Map" === i || "Set" === i
? Array.from(t)
: "Arguments" === i ||
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)
? Nn(t, e)
: void 0
);
}
}
function Nn(t, e) {
(null == e || e > t.length) && (e = t.length);
for (var i = 0, n = new Array(e); i < e; i++) n[i] = t[i];
return n;
}
function Vn(t, e) {
for (var i = 0; i < e.length; i++) {
var n = e[i];
(n.enumerable = n.enumerable || !1),
(n.configurable = !0),
"value" in n && (n.writable = !0),
Object.defineProperty(t, n.key, n);
}
}
var Rn = (function () {
function t(e) {
!(function (t, e) {
if (!(t instanceof e))
throw new TypeError("Cannot call a class as a function");
})(this, t),
(this.debugToConsole = !1),
(this.step = e),
(this.complete = !1),
(this.fields = []),
(this.continueButton = document.querySelector(".js_continueBtn")),
(this.requiredFields = this.step.querySelectorAll(".js_required")),
(this.questions = this.step.querySelectorAll(".question")),
(this.questionHeaders =
this.step.querySelectorAll(".question-header")),
(this.finalStep = this.step.querySelector(".final-step")),
(this.stepCloseTl = qn.timeline({ paused: !0 })),
(this.stepOpenTl = qn.timeline({ paused: !0 })),
this.init();
}
var e, i, r;
return (
(e = t),
(i = [
{
key: "init",
value: function () {
this.setupAnimations();
},
},
{
key: "removeField",
value: function (t) {
var e,
i = Bn(this.fields.entries());
try {
for (i.s(); !(e = i.n()).done; ) {
var n = jn(e.value, 2),
r = n[0];
n[1].name == t && this.fields.splice(r, 1);
}
} catch (t) {
i.e(t);
} finally {
i.f();
}
},
},
{
key: "setupAnimations",
value: function () {
this.stepOpenTl.set(this.step, { display: "block" }, 0.6),
this.stepOpenTl.to(
this.step,
{ height: "auto", duration: 0.3, ease: "Power0.in" },
0.6
),
this.stepOpenTl.to(
this.step,
{ opacity: 1, duration: 0.3, ease: "Power0.in" },
0.9
),
this.questions[0] &&
this.stepOpenTl.to(
this.questions[0],
{
height: "auto",
opacity: 1,
duration: 0.3,
ease: "Power0.in",
},
0.6
),
this.questionHeaders[0] &&
this.stepOpenTl.to(
this.questionHeaders[0],
{
height: "auto",
opacity: 1,
duration: 0.3,
ease: "Power0.in",
},
0.6
),
this.finalStep &&
this.stepOpenTl.to(
this.finalStep,
{
height: "auto",
opacity: 1,
duration: 0.3,
ease: "Power0.in",
},
0.6
),
this.stepCloseTl.to(
this.step,
{ opacity: 0, duration: 0.2, ease: "Power0.out" },
0
),
this.stepCloseTl.to(
this.step,
{ height: "110px", duration: 0.4, ease: "Power0.out" },
0.2
),
this.finalStep &&
this.stepCloseTl.to(
this.finalStep,
{ height: "0", duration: 0.4, ease: "Power0.out" },
0.2
),
this.stepCloseTl.set(this.step, { display: "none" }, 0.6);
},
},
{
key: "resetStep",
value: function () {
(this.fields = []),
(this.complete = !1),
(this.step.querySelector("select").value = "empty");
var t,
e = Bn(this.step.querySelectorAll(".js_sub-step"));
try {
for (e.s(); !(t = e.n()).done; ) {
var i = t.value;
if (i.classList.contains("q-active")) {
qn.set(i, { opacity: 0 }),
qn.set(i, { height: 0 }),
n.a.removeClass(i, "q-active");
var r,
s = Bn(i.querySelectorAll("select"));
try {
for (s.s(); !(r = s.n()).done; ) r.value.value = "empty";
} catch (t) {
s.e(t);
} finally {
s.f();
}
var a,
o = Bn(i.querySelectorAll("input"));
try {
for (o.s(); !(a = o.n()).done; ) a.value.value = "";
} catch (t) {
o.e(t);
} finally {
o.f();
}
}
}
} catch (t) {
e.e(t);
} finally {
e.f();
}
},
},
{
key: "resetChildren",
value: function (t) {
t.options[t.selectedIndex];
var e = [],
i = !1;
if (t.classList.contains("js_top-question")) {
this.fields = [];
var r,
s = Bn(this.step.querySelectorAll(".js_sub-step"));
try {
for (s.s(); !(r = s.n()).done; ) {
var a = r.value;
if (a.classList.contains("q-active")) {
(i = !0),
qn.to(a, { opacity: 0, duration: 0.3 }),
qn.to(a, { height: 0, duration: 0.7, delay: 0.3 }),
n.a.removeClass(a, "q-active");
var o,
l = Bn(a.querySelectorAll("select"));
try {
for (l.s(); !(o = l.n()).done; )
o.value.value = "empty";
} catch (t) {
l.e(t);
} finally {
l.f();
}
var u,
h = Bn(a.querySelectorAll("input"));
try {
for (h.s(); !(u = h.n()).done; ) u.value.value = "";
} catch (t) {
h.e(t);
} finally {
h.f();
}
}
}
} catch (t) {
s.e(t);
} finally {
s.f();
}
} else {
var c,
d = Bn(t.options);
try {
for (d.s(); !(c = d.n()).done; ) {
var p = c.value,
f = n.a.getData(p, "nextquestion");
if ("" != f && null != f) {
var v = this.step.querySelector("." + f);
e.push(v);
}
}
} catch (t) {
d.e(t);
} finally {
d.f();
}
if (e.length) {
var m,
g = Bn(e);
try {
for (g.s(); !(m = g.n()).done; ) {
var y = m.value;
if (y && y.classList.contains("q-active")) {
(i = !0),
qn.to(y, { height: 0, duration: 0.7, delay: 0.3 }),
qn.to(y, { opacity: 0, duration: 0.3 });
var b = y.querySelector("select");
b &&
((b.value = "empty"),
this.removeField(b.name),
n.a.removeClass(y, "q-active"));
var _,
w = y.querySelectorAll("input"),
T = Bn(w);
try {
for (T.s(); !(_ = T.n()).done; )
(_.value.value = ""),
this.removeField(w.name),
n.a.removeClass(y, "q-active");
} catch (t) {
T.e(t);
} finally {
T.f();
}
}
}
} catch (t) {
g.e(t);
} finally {
g.f();
}
}
var S = n.a.getData(t, "children");
if (S) {
var C,
x = Bn(JSON.parse(S));
try {
for (x.s(); !(C = x.n()).done; ) {
var k = C.value,
E = this.step.querySelector("." + k.question);
if (E && E.classList.contains("q-active")) {
(i = !0),
qn.to(E, { height: 0, duration: 0.7, delay: 0.3 }),
qn.to(E, { opacity: 0, duration: 0.3 });
var M = E.querySelector("select");
M && (M.value = "empty");
var O,
A = Bn(E.querySelectorAll("input"));
try {
for (A.s(); !(O = A.n()).done; ) O.value.value = "";
} catch (t) {
A.e(t);
} finally {
A.f();
}
this.removeField(M.name),
n.a.removeClass(E, "q-active");
}
}
} catch (t) {
x.e(t);
} finally {
x.f();
}
}
}
return i;
},
},
{ key: "updateAddressFields", value: function () {} },
{
key: "ifNextQuestion",
value: function (t, e) {
if ("end" == t) this.enableContinueButton();
else if ("js_last-question" == t) this.enableContinueButton();
else if ("" != t && null != t) {
var i = this.step.querySelector("." + t);
n.a.addClass(i, "q-active");
var r = 0;
e && (r = 1),
qn.to(i, {
height: "auto",
duration: 0.4,
delay: 0 + r,
ease: "Power0.out",
}),
qn.to(i, {
opacity: 1,
duration: 0.4,
delay: 0.4 + r,
ease: "Power0.out",
});
}
},
},
{
key: "setField",
value: function (t) {
var e,
i = !0,
n = Bn(this.fields);
try {
for (n.s(); !(e = n.n()).done; ) {
var r = e.value;
r.name == t.id && ((r.value = t.value), (i = !1));
}
} catch (t) {
n.e(t);
} finally {
n.f();
}
i && this.fields.push({ name: t.id, value: t.value }),
this.debugToConsole && console.log(this.fields, this.complete);
},
},
{
key: "enableContinueButton",
value: function () {
n.a.removeClass(this.continueButton, "disabled");
},
},
{
key: "validate",
value: function () {
var t = [],
e = [],
i = this.step.querySelectorAll(".question");
if (i.length) {
var r,
s = Bn(i);
try {
for (s.s(); !(r = s.n()).done; ) {
var a = r.value;
a.classList.contains("q-active") &&
e.push(a.querySelector(".js_input"));
}
} catch (t) {
s.e(t);
} finally {
s.f();
}
if (e) {
var o,
l = Bn(e);
try {
for (l.s(); !(o = l.n()).done; ) {
var u = o.value;
"empty" == u.value || "" == u.value
? (n.a.addClass(u, "validation-error"), t.push(!1))
: t.push(!0);
}
} catch (t) {
l.e(t);
} finally {
l.f();
}
}
} else t.push(!0);
var h = !t.includes(!1);
return 0 == t.length && (h = !1), h;
},
},
{
key: "validateEmail",
value: function (t) {
return /\S+@\S+\.\S+/.test(t);
},
},
]) && Vn(e.prototype, i),
r && Vn(e, r),
t
);
})();
function Hn(t, e) {
return (
(function (t) {
if (Array.isArray(t)) return t;
})(t) ||
(function (t, e) {
if ("undefined" == typeof Symbol || !(Symbol.iterator in Object(t)))
return;
var i = [],
n = !0,
r = !1,
s = void 0;
try {
for (
var a, o = t[Symbol.iterator]();
!(n = (a = o.next()).done) &&
(i.push(a.value), !e || i.length !== e);
n = !0
);
} catch (t) {
(r = !0), (s = t);
} finally {
try {
n || null == o.return || o.return();
} finally {
if (r) throw s;
}
}
return i;
})(t, e) ||
Gn(t, e) ||
(function () {
throw new TypeError(
"Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
})()
);
}
function Gn(t, e) {
if (t) {
if ("string" == typeof t) return $n(t, e);
var i = Object.prototype.toString.call(t).slice(8, -1);
return (
"Object" === i && t.constructor && (i = t.constructor.name),
"Map" === i || "Set" === i
? Array.from(t)
: "Arguments" === i ||
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)
? $n(t, e)
: void 0
);
}
}
function $n(t, e) {
(null == e || e > t.length) && (e = t.length);
for (var i = 0, n = new Array(e); i < e; i++) n[i] = t[i];
return n;
}
function Wn(t, e) {
for (var i = 0; i < e.length; i++) {
var n = e[i];
(n.enumerable = n.enumerable || !1),
(n.configurable = !0),
"value" in n && (n.writable = !0),
Object.defineProperty(t, n.key, n);
}
}
var Yn = (function () {
function t() {
!(function (t, e) {
if (!(t instanceof e))
throw new TypeError("Cannot call a class as a function");
})(this, t),
(this.debugToConsole = !1),
(this.form = document.querySelector(".instant-quote__form")),
(this.continueButton = this.form.querySelector(".js_continueBtn")),
(this.testoutput = this.form.querySelector(".testoutput")),
(this.businessAssurance = !1),
this.result,
this.email,
(this.name = ""),
this.init();
}
var e, i, r;
return (
(e = t),
(i = [
{ key: "init", value: function () {} },
{
key: "getName",
value: function () {
return this.name;
},
},
{
key: "getObjectValueByName",
value: function (t, e) {
for (
var i = "", n = 0, r = Object.entries(t);
n < r.length;
n++
) {
var s = Hn(r[n], 2),
a = (s[0], s[1]);
a.name == e && (i = a.value);
}
return i;
},
},
{
key: "getAccountsValue",
value: function (t, e) {
var i,
n = null,
r = (function (t, e) {
var i;
if (
"undefined" == typeof Symbol ||
null == t[Symbol.iterator]
) {
if (
Array.isArray(t) ||
(i = Gn(t)) ||
(e && t && "number" == typeof t.length)
) {
i && (t = i);
var n = 0,
r = function () {};
return {
s: r,
n: function () {
return n >= t.length
? { done: !0 }
: { done: !1, value: t[n++] };
},
e: function (t) {
throw t;
},
f: r,
};
}
throw new TypeError(
"Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
}
var s,
a = !0,
o = !1;
return {
s: function () {
i = t[Symbol.iterator]();
},
n: function () {
var t = i.next();
return (a = t.done), t;
},
e: function (t) {
(o = !0), (s = t);
},
f: function () {
try {
a || null == i.return || i.return();
} finally {
if (o) throw s;
}
},
};
})(
[
"0-20k",
"20-85k",
"85-150k",
"150-250k",
"250-350k",
"350-500k",
"500-1.25m",
"1.25-2.5m",
"2.5-4m",
"4m+",
].entries()
);
try {
for (r.s(); !(i = r.n()).done; ) {
var s = Hn(i.value, 2),
a = s[0];
t == s[1] && (n = a);
}
} catch (t) {
r.e(t);
} finally {
r.f();
}
return e[n];
},
},
{
key: "getDataFromSteps",
value: function (t) {
(this.name =
this.getObjectValueByName(t[0].fields, "name") || null),
(this.email =
this.getObjectValueByName(t[0].fields, "email") || null),
(this.tel =
this.getObjectValueByName(t[0].fields, "tel") || null),
(this.addressline1 =
this.getObjectValueByName(t[0].fields, "addressline1") ||
null),
(this.addressline2 =
this.getObjectValueByName(t[0].fields, "addressline2") ||
null),
(this.city =
this.getObjectValueByName(t[0].fields, "city") || null),
(this.postcode =
this.getObjectValueByName(t[0].fields, "postcode") || null),
this.debugToConsole &&
console.log(
this.name,
this.email,
this.tel,
this.addressline1,
this.addressline2,
this.city,
this.postcode
),
(this.businessType =
this.getObjectValueByName(t[1].fields, "businessType") ||
null),
(this.dormant =
this.getObjectValueByName(t[1].fields, "dormant") || null),
(this.formLtdCompany =
this.getObjectValueByName(t[1].fields, "form-ltd-company") ||
null),
(this.partners =
this.getObjectValueByName(t[1].fields, "partners") || null),
this.debugToConsole &&
console.log(
this.businessType,
this.dormant,
this.formLtdCompany,
this.partners
),
(this.turnover =
this.getObjectValueByName(t[2].fields, "turnover") || null),
(this.vatRegistered =
this.getObjectValueByName(t[2].fields, "vat-registered") ||
null),
(this.completeVat =
this.getObjectValueByName(t[2].fields, "complete-vat") ||
null),
(this.vatFrequency =
this.getObjectValueByName(t[2].fields, "vat-frequency") ||
null),
this.debugToConsole &&
console.log(
this.turnover,
this.vatRegistered,
this.completeVat,
this.vatFrequency
),
(this.recordBookkeeping =
this.getObjectValueByName(
t[3].fields,
"record-bookkeeping"
) || null),
(this.transactions =
this.getObjectValueByName(t[3].fields, "transactions") ||
null),
this.debugToConsole &&
console.log(this.recordBookkeeping, this.transactions),
(this.completePayroll =
this.getObjectValueByName(t[4].fields, "complete-payroll") ||
null),
(this.howFrequently =
this.getObjectValueByName(t[4].fields, "how-frequently") ||
null),
(this.employees =
this.getObjectValueByName(t[4].fields, "employees") || null),
(this.payrollDirectors =
this.getObjectValueByName(t[4].fields, "payroll-directors") ||
null),
(this.howManyDirectors =
this.getObjectValueByName(
t[4].fields,
"how-many-directors"
) || null),
(this.completePension =
this.getObjectValueByName(t[4].fields, "complete-pension") ||
null),
(this.pensionEmployees =
this.getObjectValueByName(t[4].fields, "pension-employees") ||
null),
this.debugToConsole &&
console.log(
this.completePayroll,
this.howFrequently,
this.employees,
this.payrollDirectors,
this.howManyDirectors,
this.directorsHowFrequently,
this.completePension,
this.pensionEmployees
);
},
},
{
key: "calculateResults",
value: function (t, e) {
(this.businessAssurance = document.querySelector(
".js_business-assurance"
).checked),
this.getDataFromSteps(t);
var i = 0,
r = 0,
s = 0,
a = !1,
o = 0,
l = 0,
u = 0,
h = 0,
c = 0,
d = 0,
p = partnershipAccounts2Partners,
f = partnershipAccounts3Partners,
v = partnershipAccounts3PlusPartners,
m = llpAccounts2Partners,
g = llpAccounts3Partners,
y = llpAccounts3PlusPartners,
b = soleTraderAccountValues,
_ = ltdAccounts,
w = null;
if ("Partnership" == this.businessType)
switch (this.partners) {
case "2-partners":
w = p;
break;
case "3-partners":
w = f;
break;
case "3+partners":
w = v;
break;
default:
w = null;
}
else if ("LLP" == this.businessType)
switch (this.partners) {
case "2-partners":
w = m;
break;
case "3-partners":
w = g;
break;
case "3+partners":
w = y;
break;
default:
w = null;
}
else
"Sole Trader" == this.businessType
? (w = b)
: "Limited Company" == this.businessType && (w = _);
if (
("Limited Company" == this.businessType &&
"No" == this.dormant &&
((a = !0),
(i += limitedCompanyDormantMonthlyFee),
(r += limitedCompanyDormantYearlyFee)),
!a)
) {
if (
("Yes" == this.formLtdCompany &&
((s += limitedCompanyFormOneOffCharge),
(i += limitedCompanyMonthlyFee)),
this.turnover)
) {
var T = this.getAccountsValue(this.turnover, w);
this.debugToConsole && console.log("acounts value ", T),
(i += T),
(o = T);
}
var S = 0;
"Yes" == this.completeVat &&
("0-20k" == this.turnover || "20-85k" == this.turnover
? "Monthly" == this.vatFrequency
? (S = vatLessThanMonthly)
: "Quarterly" == this.vatFrequency &&
(S = vatLessThan85kQuartely)
: "Monthly" == this.vatFrequency
? (S = vatMoreThan85kMonthly)
: "Quarterly" == this.vatFrequency &&
(S = vatMoreThan85kQuartely)),
(i += S),
(d = S),
this.debugToConsole && console.log("vat returns", S);
var C = 0;
if ("Yes" == this.recordBookkeeping) {
switch (this.transactions) {
case "<20":
C = bookkeeping[0];
break;
case "21-50":
C = bookkeeping[1];
break;
case "51-250":
C = bookkeeping[2];
break;
case "251+":
C = bookkeeping[3];
}
(i += C),
(l = C),
this.debugToConsole && console.log("bookkeeping ", C);
}
var x = 0;
if ("Yes" == this.completePayroll) {
switch (
(this.howManyDirectors &&
((this.employees =
this.employees - this.howManyDirectors),
this.employees < 0 && (this.employees = 0)),
this.howFrequently)
) {
case "Weekly":
this.employees <= 5 &&
(x = payrollWeekly[0] * this.employees),
this.employees >= 6 &&
this.employees <= 10 &&
(x = payrollWeekly[1] * this.employees),
this.employees >= 11 &&
this.employees <= 20 &&
(x = payrollWeekly[2] * this.employees),
this.employees >= 21 &&
this.employees <= 50 &&
(x = payrollWeekly[3] * this.employees),
this.employees >= 51 &&
(x = payrollWeekly[4] * this.employees);
break;
case "Fortnightly":
this.employees <= 5 &&
(x = payrollFortnightly[0] * this.employees),
this.employees >= 6 &&
this.employees <= 10 &&
(x = payrollFortnightly[1] * this.employees),
this.employees >= 11 &&
this.employees <= 20 &&
(x = payrollFortnightly[2] * this.employees),
this.employees >= 21 &&
this.employees <= 50 &&
(x = payrollFortnightly[3] * this.employees),
this.employees >= 51 &&
(x = payrollFortnightly[4] * this.employees);
break;
case "Monthly":
this.employees <= 5 &&
(x = payrollMonthly[0] * this.employees),
this.employees >= 6 &&
this.employees <= 10 &&
(x = payrollMonthly[1] * this.employees),
this.employees >= 11 &&
this.employees <= 20 &&
(x = payrollMonthly[2] * this.employees),
this.employees >= 21 &&
this.employees <= 50 &&
(x = payrollMonthly[3] * this.employees),
this.employees >= 51 &&
(x = payrollMonthly[4] * this.employees);
}
(i += x),
(h = x),
this.debugToConsole && console.log("payroll", x);
}
var k = 0;
"Limited Company" == this.businessType &&
("Yes" == this.payrollDirectors &&
(1 == this.howManyDirectors
? (k = directorPayroll[0])
: 2 == this.howManyDirectors
? (k = directorPayroll[1])
: 3 == this.howManyDirectors
? (k = directorPayroll[2])
: this.howManyDirectors >= 4 && (k = directorPayroll[3])),
(i += k),
(u = k),
this.debugToConsole &&
console.log("directorPayrollValue ", u));
var E = 0;
"Yes" == this.completePension &&
((E += pensionFlatFee),
this.pensionEmployees &&
(E += this.pensionEmployees * pensionPerEmployee),
(i += E),
(c = E),
this.debugToConsole && console.log("pensionValue ", E));
}
this.businessAssurance && (i += businessAssurance),
this.debugToConsole &&
(console.log("monthly ", i),
console.log("yearly ", r),
console.log("one off ", s)),
n.a.addClass(this.continueButton, "hidden");
var M = "";
if (e) {
var O = this.form.querySelector(".monthly-price"),
A = this.form.querySelector(".price-breakdown"),
P = this.form.querySelector(".year-price");
(this.form.querySelector(".year-price-text").innerHTML =
"Or go for a one-off annual payment of"),
(A.style.display = "none"),
(O.innerHTML = "£12"),
(P.innerHTML = "£140"),
(M +=
'
\n\t\t\t
\n\t\t\t

\n\t\t\t
Thank you for allowing us to provide you with a quote through our website.
\n\t\t\t
Your Quote
\n\t\t\t
Only
\n\t\t\t
£12
\n\t\t\t
per month
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
Or go for a one-off annual payment and get 5% off!
\n\t\t\t\t
£140
\n\t\t\t\t
\n\t\t\t
');
} else {
document.querySelector(".quote-title");
var L = this.form.querySelector(".monthly-price"),
D = this.form.querySelector(".year-price"),
z = this.form.querySelector(".price-breakdown"),
F = 12 * i,
q = F - (F / 100) * 5;
(z.style.display = "block"),
(L.innerHTML = "£".concat(Number(i).toFixed(2))),
(D.innerHTML = "£".concat(Number(q).toFixed(2))),
o > 0
? (z.innerHTML = "
£".concat(
Number(o).toFixed(2),
" for accounts"
))
: 0 == o &&
(z.innerHTML =
"
Get in touch for an accounts quote"),
l > 0 &&
(z.innerHTML += "
£".concat(
Number(l).toFixed(2),
" for bookkeeping"
)),
d > 0 &&
(z.innerHTML += "
£".concat(
Number(d).toFixed(2),
" for VAT returns"
)),
h > 0 &&
(z.innerHTML += "
£".concat(
Number(h).toFixed(2),
" for payroll"
)),
u > 0 &&
(z.innerHTML += "
£".concat(
Number(u).toFixed(2),
" for director payroll"
)),
c > 0 &&
(z.innerHTML += "
£".concat(
Number(c).toFixed(2),
" for pensions"
)),
s > 0 &&
(z.innerHTML += "
£12 for forming LTD Company"),
(M += `
Your Custom Quote - Virtue Accountants
virtue
Your Trusted Online Accounting Partner
Your Custom Quote
Thank you for requesting a quote through our website. Here's a
breakdown based on the details provided.
£`
.concat(
Number(i).toFixed(2),
`/month
Or save 5% with an annual payment
£`
)
.concat(
Number(q).toFixed(2),
`/year
`
));
}
(M += `
Business Details
Name
`
.concat(
this.name,
`
Email
`
)
.concat(
this.email,
`
Phone
`
)
.concat(
this.tel,
`
Address line 1
`
)
.concat(
this.addressline1,
`
Address line 2
`
)
.concat(
this.addressline2 || "",
`
City
`
)
.concat(
this.city,
`
Postcode
`
)
.concat(
this.postcode,
`
Business Type
`
)
.concat(
this.businessType,
`
`
)),
"Limited Company" == this.businessType &&
((M += `
Are you actively trading?
`.concat(
this.dormant,
`
`
)),
this.formLtdCompany &&
(M += `
Form LTD Company?
`.concat(
this.formLtdCompany,
`
`
))),
"Partnership" == this.businessType || "LLP" == this.businessType
? (M += `
Number of partners
`.concat(
this.partners,
`
`
))
: (M += ""),
this.turnover &&
(M += `
Turnover
`.concat(
this.turnover,
`
`
)),
this.completeVat &&
((M += `
Complete VAT
`.concat(
this.completeVat,
`
`
)),
"Yes" == this.completeVat &&
(M +=
`
VAT Frequency
`.concat(
this.vatFrequency,
`
`
))),
this.recordBookkeeping &&
((M += `
Record Bookkeeping?
`.concat(
this.recordBookkeeping,
`
`
)),
"Yes" == this.recordBookkeeping
? (M += `
Number of Transactions
`.concat(
this.transactions,
`
`
))
: this.recordBookkeeping && (M += "")),
this.completePayroll &&
((M += `
Complete Payroll
`.concat(
this.completePayroll,
`
`
)),
"Yes" == this.completePayroll
? ((M += `
Complete Payroll Frequency
`
.concat(
this.howFrequently,
`
Number of employees
`
)
.concat(
this.employees,
`
`
)),
this.payrollDirectors &&
(M += `
Payroll for Directors?
`.concat(
this.payrollDirectors,
`
`
)),
"Yes" == this.payrollDirectors &&
(M += `
Number of Directors on Payroll
`.concat(
this.howManyDirectors,
`
`
)),
(M += `
Complete Pension
`.concat(
this.completePension,
`
`
)),
"Yes" == this.completePension &&
(M += `
Number of Employees for Pension
`.concat(
this.pensionEmployees,
`
`
)),
this.completePayroll && (M += ""))
: this.completePayroll && (M += ""));
var j = "No";
return (
this.businessAssurance && (j = "Yes"),
(M += `
Business Assurance
`.concat(
j,
`
Our Location
Stuart House, St. Johns Street, Peterborough, PE1 5DD.
`
)),
(M += `
★★★★★
★ Trustpilot
Google
FreeAgent
"Excellent proactive and personal
support – would highly recommend."
–Harrison springfields
`),
(this.result = M),
(this.email = email),
this.debugToConsole &&
((this.testoutput.innerHTML +=
'
Email Output:
'),
(this.testoutput.innerHTML += M)),
M
);
},
},
]) && Wn(e.prototype, i),
r && Wn(e, r),
t
);
})();
function Xn(t, e) {
return (
(function (t) {
if (Array.isArray(t)) return t;
})(t) ||
(function (t, e) {
if ("undefined" == typeof Symbol || !(Symbol.iterator in Object(t)))
return;
var i = [],
n = !0,
r = !1,
s = void 0;
try {
for (
var a, o = t[Symbol.iterator]();
!(n = (a = o.next()).done) &&
(i.push(a.value), !e || i.length !== e);
n = !0
);
} catch (t) {
(r = !0), (s = t);
} finally {
try {
n || null == o.return || o.return();
} finally {
if (r) throw s;
}
}
return i;
})(t, e) ||
(function (t, e) {
if (!t) return;
if ("string" == typeof t) return Un(t, e);
var i = Object.prototype.toString.call(t).slice(8, -1);
"Object" === i && t.constructor && (i = t.constructor.name);
if ("Map" === i || "Set" === i) return Array.from(t);
if (
"Arguments" === i ||
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)
)
return Un(t, e);
})(t, e) ||
(function () {
throw new TypeError(
"Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
})()
);
}
function Un(t, e) {
(null == e || e > t.length) && (e = t.length);
for (var i = 0, n = new Array(e); i < e; i++) n[i] = t[i];
return n;
}
function Qn(t, e) {
for (var i = 0; i < e.length; i++) {
var n = e[i];
(n.enumerable = n.enumerable || !1),
(n.configurable = !0),
"value" in n && (n.writable = !0),
Object.defineProperty(t, n.key, n);
}
}
var Kn = (function () {
function t() {
!(function (t, e) {
if (!(t instanceof e))
throw new TypeError("Cannot call a class as a function");
})(this, t),
(this.debugToConsole = !1),
(this.email = ""),
this.init();
}
var e, i, n;
return (
(e = t),
(i = [
{ key: "init", value: function () {} },
{
key: "sendEmails",
value: function (t, e) {
this.email = t;
for (var i = 0, n = this.email; i < n.length; i++) {
var r = { toEmail: n[i], subject: "Instant Quote", body: e };
this.sendQuoteEmail(r);
}
},
},
{
key: "sendQuoteEmail",
value: function (t) {
var e = this;
(this.instantQuoteForm = document.querySelector(
".js_instant-quote-form"
)),
(this.csrfToken = window.Webflow
? ""
: this.instantQuoteForm.querySelector(
'input[name="CRAFT_CSRF_TOKEN"]'
).value);
for (
var i = new FormData(), n = 0, r = Object.entries(t);
n < r.length;
n++
) {
var s = Xn(r[n], 2),
a = s[0],
o = s[1];
i.append(a, o);
}
i.append(window.csrfTokenName, this.csrfToken);
var l = { method: "POST", body: i };
(l = Object.assign(
{
headers: {
"X-Requested-With": "XMLHttpRequest",
Accept: "application/json",
},
},
l
)),
fetch(
window.Webflow
? "https://azizsegaoui.me/quote.php"
: "/actions/misc/email/send",
l
)
.then(function (t) {
200 == t.status
? t
.json()
.then(function (t) {
(e.emailSuccess = !0),
e.debugToConsole && console.log(t);
})
.catch(function (t) {
(e.emailSuccess = !1),
e.debugToConsole && console.log("1", t);
})
: ((e.emailSuccess = !1),
e.debugToConsole && console.log("2", err));
})
.catch(function (t) {
(e.emailSuccess = !1),
e.debugToConsole && console.log("3", t);
});
},
},
]) && Qn(e.prototype, i),
n && Qn(e, n),
t
);
})();
function Zn(t, e) {
return (
(function (t) {
if (Array.isArray(t)) return t;
})(t) ||
(function (t, e) {
if ("undefined" == typeof Symbol || !(Symbol.iterator in Object(t)))
return;
var i = [],
n = !0,
r = !1,
s = void 0;
try {
for (
var a, o = t[Symbol.iterator]();
!(n = (a = o.next()).done) &&
(i.push(a.value), !e || i.length !== e);
n = !0
);
} catch (t) {
(r = !0), (s = t);
} finally {
try {
n || null == o.return || o.return();
} finally {
if (r) throw s;
}
}
return i;
})(t, e) ||
tr(t, e) ||
(function () {
throw new TypeError(
"Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
})()
);
}
function Jn(t, e) {
var i;
if ("undefined" == typeof Symbol || null == t[Symbol.iterator]) {
if (
Array.isArray(t) ||
(i = tr(t)) ||
(e && t && "number" == typeof t.length)
) {
i && (t = i);
var n = 0,
r = function () {};
return {
s: r,
n: function () {
return n >= t.length ? { done: !0 } : { done: !1, value: t[n++] };
},
e: function (t) {
throw t;
},
f: r,
};
}
throw new TypeError(
"Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
}
var s,
a = !0,
o = !1;
return {
s: function () {
i = t[Symbol.iterator]();
},
n: function () {
var t = i.next();
return (a = t.done), t;
},
e: function (t) {
(o = !0), (s = t);
},
f: function () {
try {
a || null == i.return || i.return();
} finally {
if (o) throw s;
}
},
};
}
function tr(t, e) {
if (t) {
if ("string" == typeof t) return er(t, e);
var i = Object.prototype.toString.call(t).slice(8, -1);
return (
"Object" === i && t.constructor && (i = t.constructor.name),
"Map" === i || "Set" === i
? Array.from(t)
: "Arguments" === i ||
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)
? er(t, e)
: void 0
);
}
}
function er(t, e) {
(null == e || e > t.length) && (e = t.length);
for (var i = 0, n = new Array(e); i < e; i++) n[i] = t[i];
return n;
}
function ir(t, e) {
for (var i = 0; i < e.length; i++) {
var n = e[i];
(n.enumerable = n.enumerable || !1),
(n.configurable = !0),
"value" in n && (n.writable = !0),
Object.defineProperty(t, n.key, n);
}
}
var nr = (function () {
function t() {
!(function (t, e) {
if (!(t instanceof e))
throw new TypeError("Cannot call a class as a function");
})(this, t),
(this.debugToConsole = !1),
(this.stepCount = 0),
(this.submit = !1),
(this.clientEmail = "hello@virtue.accountants"),
(this.form = document.querySelector(".instant-quote__form")),
(this.formSelectElements =
this.form.querySelectorAll(".field__select")),
(this.formInputElements =
this.form.querySelectorAll(".field__input")),
(this.inputQuestions = this.form.querySelectorAll(".inputQuestion")),
(this.stepDivs = this.form.querySelectorAll(".step")),
(this.continueButton = this.form.querySelector(".js_continueBtn")),
(this.finishButton = this.form.querySelector(".js_finishBtn")),
(this.backButton = this.form.querySelector(".backBtn")),
(this.quoteHeading = this.form.querySelector(".quoteHeading")),
(this.resultsDiv = this.form.querySelector(".resultsDiv")),
(this.result = ""),
(this.email = " ;"),
(this.emailSuccess = !1),
(this.stepObjects = []),
(this.numberOfSteps = 0),
(this.quoteButtons = document.querySelectorAll(".js_instant-quote")),
(this.quoteModal = document.querySelector(".instant-quote-modal")),
(this.quoteModalCont = document.querySelector(
".instant-quote__container"
)),
(this.modalCloses = document.querySelectorAll(".close")),
(this.stepsIndicator = document.querySelector(".steps-indicator")),
(this.finalStepClose = document.querySelector(
".js_final-step-close"
)),
(this.gdprAccept = document.querySelector(".js_gdpr-accept")),
(this.modalTL = qn.timeline({ paused: !0 })),
(this.endFlag = !1),
(this.endFlagBackwards = !1),
this.resultsOutput,
this.sendEmails,
this.init();
}
var e, i, r;
return (
(e = t),
(i = [
{
key: "init",
value: function () {
var t = this,
e = this,
i = document.querySelector(".postcode-field__select-container");
$(".postcode-field").setupPostcodeLookup({
api_key: "ak_kfs15rgrvvH8pAROfFMmphJZGt01X",
output_fields: {
line_1: "#addressline1",
line_2: "#addressline2",
line_3: "#addressline3",
post_town: "#city",
postcode: "#postcode",
},
input: ".js_postcode-input",
dropdown_container: ".postcode-field__select-container",
error_message_container: ".postcode-field__select-container",
onSearchCompleted: function () {
qn.to(i, {
height: "100px",
duration: 0.4,
ease: "Power0.out",
}),
qn.to(i, {
opacity: 1,
duration: 0.4,
delay: 0.4,
ease: "Power0.out",
});
},
onAddressSelected: function (t) {
e.updateAddressFields();
},
}),
this.resetForm(),
this.setModalAnim(),
(this.resultsOutput = new Yn()),
(this.sendEmails = new Kn()),
this.gdprAccept.addEventListener("click", function () {
n.a.removeClass(t.continueButton, "disabled");
});
var r,
s = Jn(this.quoteButtons);
try {
for (s.s(); !(r = s.n()).done; )
r.value.addEventListener("click", function () {
n.a.addClass(t.quoteModal, "open-quote-modal"),
t.modalTL.play(0),
n.a.addClass(document.querySelector("html"), "noscroll");
});
} catch (t) {
s.e(t);
} finally {
s.f();
}
var a,
o = Jn(this.modalCloses);
try {
for (o.s(); !(a = o.n()).done; )
a.value.addEventListener("click", function (e) {
e.stopPropagation(),
t.modalTL.reverse(0),
n.a.removeClass(
document.querySelector("html"),
"noscroll"
);
});
} catch (t) {
o.e(t);
} finally {
o.f();
}
this.finalStepClose.addEventListener("click", function (e) {
e.stopPropagation(),
t.modalTL.reverse(0),
n.a.removeClass(document.querySelector("html"), "noscroll");
});
var l,
u = Jn(this.stepDivs.entries());
try {
for (u.s(); !(l = u.n()).done; ) {
var h = Zn(l.value, 2),
c = h[0],
d = h[1];
this.stepObjects.push(new Rn(d)),
this.numberOfSteps++,
c + 1 == this.stepDivs.length ||
(c + 2 == this.stepDivs.length
? (this.stepsIndicator.innerHTML +=
"
Price")
: 0 == c
? ((this.stepDivs[0].style.opacity = "1"),
(this.stepsIndicator.innerHTML +=
"
" +
(c + 1) +
"
"))
: (this.stepsIndicator.innerHTML +=
"
" +
(c + 1) +
"
"));
}
} catch (t) {
u.e(t);
} finally {
u.f();
}
this.debugToConsole && console.log(this.stepObjects);
var p,
f = Jn(e.formInputElements);
try {
for (f.s(); !(p = f.n()).done; )
p.value.addEventListener("change", function (t) {
t.preventDefault(), e.onInputChange(t.target);
});
} catch (t) {
f.e(t);
} finally {
f.f();
}
var v,
m = Jn(e.inputQuestions);
try {
for (m.s(); !(v = m.n()).done; )
v.value.addEventListener("input", function (t) {
t.preventDefault(),
setTimeout(function () {
e.onInputChange(t.target);
}, 1e3);
});
} catch (t) {
m.e(t);
} finally {
m.f();
}
e.form.addEventListener("keyup", function (t) {
(13 !== t.keyCode && 13 !== t.key) ||
(t.preventDefault(), e.clickContinue());
});
var g,
y = Jn(e.formSelectElements);
try {
for (y.s(); !(g = y.n()).done; )
g.value.addEventListener("change", function (t) {
t.preventDefault(), e.onSelectChange(t.target);
});
} catch (t) {
y.e(t);
} finally {
y.f();
}
this.continueButton.addEventListener("click", function (t) {
t.preventDefault(), e.changeStep("forwards");
}),
this.finishButton.addEventListener("click", function (t) {
t.preventDefault(), e.changeStep("forwards");
}),
this.backButton.addEventListener("click", function (t) {
t.preventDefault(), e.changeStep("backwards");
});
},
},
{
key: "updateAddressFields",
value: function () {
var t = this.stepObjects[this.stepCount],
e = t.questions[3].querySelector("input");
this.onInputChange(e);
var i = t.questions[4].querySelector("input");
this.onInputChange(i);
var n = t.questions[5].querySelector("input");
this.onInputChange(n);
},
},
{
key: "setModalAnim",
value: function () {
var t = this;
this.modalTL.to(
this.quoteModal,
{
opacity: 1,
duration: 0.4,
ease: "Power0.out",
onReverseComplete: function () {
n.a.removeClass(t.quoteModal, "open-quote-modal");
},
},
0
),
this.modalTL.to(
this.quoteModalCont,
{ opacity: 1, duration: 0.3, ease: "Power0.out" },
0.4
);
},
},
{
key: "resetForm",
value: function () {
document.querySelector(".instant-quote__form").reset();
},
},
{
key: "clickContinue",
value: function () {
this.continueButton.click();
},
},
{
key: "enableContinueButton",
value: function () {
n.a.removeClass(this.continueButton, "disabled");
},
},
{
key: "checkForConditionalLogic",
value: function (t, e) {
var i = "";
if (t) {
var r,
s = JSON.parse(t),
a = s[0].step,
o = s[1].name,
l = s[2].value,
u = Jn(this.stepObjects[a].fields);
try {
for (u.s(); !(r = u.n()).done; ) {
var h = r.value;
h.name == o && h.value == l
? (i = n.a.getData(e, "nextquestion"))
: h.name == o &&
h.value != l &&
(i = n.a.getData(e, "nextquestionalt"));
}
} catch (t) {
u.e(t);
} finally {
u.f();
}
} else i = n.a.getData(e, "nextquestion");
return i;
},
},
{
key: "checkFieldType",
value: function (t, e) {
if (t.classList.contains("field__input")) {
var i = n.a.getData(t, "nextquestionlogic"),
r = this.checkForConditionalLogic(i, t);
this.stepObjects[this.stepCount].ifNextQuestion(r, e);
} else {
var s = t,
a = s.options[s.selectedIndex],
o = n.a.getData(s, "nextquestionlogic"),
l = n.a.getData(a, "nextquestionlogic"),
u = this.checkForConditionalLogic(o, s),
h = this.checkForConditionalLogic(l, a);
this.stepObjects[this.stepCount].ifNextQuestion(u, e),
this.stepObjects[this.stepCount].ifNextQuestion(h, e),
"end" == u || "end" == h
? ((this.endFlag = !0), (this.endFlagBackwards = !0))
: (this.endFlag = !1);
}
},
},
{
key: "onInputChange",
value: function (t) {
this.stepObjects[this.stepCount].setField(t),
"" != t.value && n.a.removeClass(t, "validation-error"),
this.checkFieldType(t, !1);
},
},
{
key: "onSelectChange",
value: function (t) {
var e,
i = this.stepObjects[this.stepCount];
(e = i.resetChildren(t)),
i.setField(t),
"" != t.value && n.a.removeClass(t, "validation-error"),
this.checkFieldType(t, e);
},
},
{
key: "advanceStepsIndicator",
value: function (t) {
var e = this.stepsIndicator.querySelectorAll(".step-indicator"),
i = this.stepCount + 1;
t && (i = this.stepDivs.length - 2);
for (var r = 0; r < e.length; r++)
e[r] && n.a.removeClass(e[r], "step-complete");
for (var s = 0; s < i; s++)
e[s] && n.a.addClass(e[s], "step-complete");
},
},
{
key: "clearAllNextSteps",
value: function () {
for (var t = 0, e = [2, 3, 4]; t < e.length; t++) {
var i = e[t];
this.stepObjects[i].resetStep();
}
},
},
{
key: "changeStep",
value: function (t) {
if ("forwards" == t) {
var e = this.stepObjects[this.stepCount];
if (e.validate()) {
(this.stepCount += 1),
(e.complete = !0),
2 == this.stepCount &&
("limitedCompany" == e.fields[0].value
? this.changePayrollQuestionLabel("add")
: this.changePayrollQuestionLabel("remove"),
"limitedCompany" == e.fields[0].value &&
"no" == e.fields[1].value &&
((this.endFlag = !0),
(this.endFlagBackwards = !0),
this.clearAllNextSteps())),
this.advanceStepsIndicator(this.endFlag),
e.stepCloseTl.play(0),
this.endFlag &&
((this.stepCount = this.stepDivs.length - 2),
this.debugToConsole &&
console.log("jump to step ", this.stepCount));
var i = this.stepObjects[this.stepCount];
i.stepOpenTl.play(0),
i.complete || n.a.addClass(this.continueButton, "disabled"),
this.debugToConsole &&
this.resultsOutput.getDataFromSteps(this.stepObjects),
this.stepCount + 2 == this.stepDivs.length &&
((this.results = this.resultsOutput.calculateResults(
this.stepObjects,
this.endFlag
)),
n.a.addClass(this.continueButton, "hidden"),
(this.endFlag = !1),
(this.email = this.resultsOutput.getObjectValueByName(
this.stepObjects[0].fields,
"email"
)),
this.sendEmails.sendEmails(
[this.clientEmail, this.email],
this.results
)),
this.stepCount + 1 == this.stepDivs.length &&
(this.finalStepOutput(),
(this.email = this.resultsOutput.getObjectValueByName(
this.stepObjects[0].fields,
"email"
)),
(this.results = this.resultsOutput.calculateResults(
this.stepObjects,
!1
)),
this.sendEmails.sendEmails([this.email], this.results));
}
} else
"backwards" == t &&
(this.stepObjects[this.stepCount].stepCloseTl.play(0),
this.endFlagBackwards &&
this.stepCount + 2 == this.stepDivs.length
? ((this.stepCount = 1), (this.endFlagBackwards = !1))
: (this.stepCount -= 1),
this.stepObjects[this.stepCount].stepOpenTl.play(0),
n.a.removeClass(this.continueButton, "disabled"),
this.advanceStepsIndicator(!1),
this.stepCount + 2 < this.stepDivs.length &&
n.a.removeClass(this.continueButton, "hidden"));
0 == this.stepCount || this.stepCount == this.stepDivs.length - 1
? n.a.addClass(this.backButton, "hidden")
: n.a.removeClass(this.backButton, "hidden");
},
},
{
key: "finalStepOutput",
value: function () {
var t = this.resultsOutput.getName(),
e = document.querySelector(".js_thanks-message"),
i =
(document.querySelector(".quote-title"),
"Thank you ".concat(t));
e.innerHTML = i;
},
},
{
key: "changePayrollQuestionLabel",
value: function (t) {
var e = document
.querySelector(".js_employees")
.querySelector(".field__label");
"add" == t
? (e.innerHTML =
"How many employees for payroll?* (Including any Directors)")
: "remove" == t &&
(e.innerHTML = "How many employees for payroll?*");
},
},
]) && ir(e.prototype, i),
r && ir(e, r),
t
);
})();
function rr(t) {
return (
null !== t &&
"object" == typeof t &&
"constructor" in t &&
t.constructor === Object
);
}
function sr(t, e) {
void 0 === t && (t = {}),
void 0 === e && (e = {}),
Object.keys(e).forEach(function (i) {
void 0 === t[i]
? (t[i] = e[i])
: rr(e[i]) &&
rr(t[i]) &&
Object.keys(e[i]).length > 0 &&
sr(t[i], e[i]);
});
}
var ar = {
body: {},
addEventListener: function () {},
removeEventListener: function () {},
activeElement: { blur: function () {}, nodeName: "" },
querySelector: function () {
return null;
},
querySelectorAll: function () {
return [];
},
getElementById: function () {
return null;
},
createEvent: function () {
return { initEvent: function () {} };
},
createElement: function () {
return {
children: [],
childNodes: [],
style: {},
setAttribute: function () {},
getElementsByTagName: function () {
return [];
},
};
},
createElementNS: function () {
return {};
},
importNode: function () {
return null;
},
location: {
hash: "",
host: "",
hostname: "",
href: "",
origin: "",
pathname: "",
protocol: "",
search: "",
},
};
function or() {
var t = "undefined" != typeof document ? document : {};
return sr(t, ar), t;
}
var lr = {
document: ar,
navigator: { userAgent: "" },
location: {
hash: "",
host: "",
hostname: "",
href: "",
origin: "",
pathname: "",
protocol: "",
search: "",
},
history: {
replaceState: function () {},
pushState: function () {},
go: function () {},
back: function () {},
},
CustomEvent: function () {
return this;
},
addEventListener: function () {},
removeEventListener: function () {},
getComputedStyle: function () {
return {
getPropertyValue: function () {
return "";
},
};
},
Image: function () {},
Date: function () {},
screen: {},
setTimeout: function () {},
clearTimeout: function () {},
matchMedia: function () {
return {};
},
requestAnimationFrame: function (t) {
return "undefined" == typeof setTimeout
? (t(), null)
: setTimeout(t, 0);
},
cancelAnimationFrame: function (t) {
"undefined" != typeof setTimeout && clearTimeout(t);
},
};
function ur() {
var t = "undefined" != typeof window ? window : {};
return sr(t, lr), t;
}
function hr(t) {
return (hr = Object.setPrototypeOf
? Object.getPrototypeOf
: function (t) {
return t.__proto__ || Object.getPrototypeOf(t);
})(t);
}
function cr(t, e) {
return (cr =
Object.setPrototypeOf ||
function (t, e) {
return (t.__proto__ = e), t;
})(t, e);
}
function dr() {
if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
if (Reflect.construct.sham) return !1;
if ("function" == typeof Proxy) return !0;
try {
return (
Date.prototype.toString.call(
Reflect.construct(Date, [], function () {})
),
!0
);
} catch (t) {
return !1;
}
}
function pr(t, e, i) {
return (pr = dr()
? Reflect.construct
: function (t, e, i) {
var n = [null];
n.push.apply(n, e);
var r = new (Function.bind.apply(t, n))();
return i && cr(r, i.prototype), r;
}).apply(null, arguments);
}
function fr(t) {
var e = "function" == typeof Map ? new Map() : void 0;
return (fr = function (t) {
if (
null === t ||
((i = t), -1 === Function.toString.call(i).indexOf("[native code]"))
)
return t;
var i;
if ("function" != typeof t)
throw new TypeError(
"Super expression must either be null or a function"
);
if (void 0 !== e) {
if (e.has(t)) return e.get(t);
e.set(t, n);
}
function n() {
return pr(t, arguments, hr(this).constructor);
}
return (
(n.prototype = Object.create(t.prototype, {
constructor: {
value: n,
enumerable: !1,
writable: !0,
configurable: !0,
},
})),
cr(n, t)
);
})(t);
}
var vr = (function (t) {
var e, i;
function n(e) {
var i, n, r;
return (
(i = t.call.apply(t, [this].concat(e)) || this),
(n = (function (t) {
if (void 0 === t)
throw new ReferenceError(
"this hasn't been initialised - super() hasn't been called"
);
return t;
})(i)),
(r = n.__proto__),
Object.defineProperty(n, "__proto__", {
get: function () {
return r;
},
set: function (t) {
r.__proto__ = t;
},
}),
i
);
}
return (
(i = t),
((e = n).prototype = Object.create(i.prototype)),
(e.prototype.constructor = e),
(e.__proto__ = i),
n
);
})(fr(Array));
function mr(t) {
void 0 === t && (t = []);
var e = [];
return (
t.forEach(function (t) {
Array.isArray(t) ? e.push.apply(e, mr(t)) : e.push(t);
}),
e
);
}
function gr(t, e) {
return Array.prototype.filter.call(t, e);
}
function yr(t, e) {
var i = ur(),
n = or(),
r = [];
if (!e && t instanceof vr) return t;
if (!t) return new vr(r);
if ("string" == typeof t) {
var s = t.trim();
if (s.indexOf("<") >= 0 && s.indexOf(">") >= 0) {
var a = "div";
0 === s.indexOf("
0
);
}).length > 0
);
},
toggleClass: function () {
for (var t = arguments.length, e = new Array(t), i = 0; i < t; i++)
e[i] = arguments[i];
var n = mr(
e.map(function (t) {
return t.split(" ");
})
);
this.forEach(function (t) {
n.forEach(function (e) {
t.classList.toggle(e);
});
});
},
attr: function (t, e) {
if (1 === arguments.length && "string" == typeof t)
return this[0] ? this[0].getAttribute(t) : void 0;
for (var i = 0; i < this.length; i += 1)
if (2 === arguments.length) this[i].setAttribute(t, e);
else
for (var n in t) (this[i][n] = t[n]), this[i].setAttribute(n, t[n]);
return this;
},
removeAttr: function (t) {
for (var e = 0; e < this.length; e += 1) this[e].removeAttribute(t);
return this;
},
transform: function (t) {
for (var e = 0; e < this.length; e += 1) this[e].style.transform = t;
return this;
},
transition: function (t) {
for (var e = 0; e < this.length; e += 1)
this[e].style.transition = "string" != typeof t ? t + "ms" : t;
return this;
},
on: function () {
for (var t = arguments.length, e = new Array(t), i = 0; i < t; i++)
e[i] = arguments[i];
var n = e[0],
r = e[1],
s = e[2],
a = e[3];
function o(t) {
var e = t.target;
if (e) {
var i = t.target.dom7EventData || [];
if ((i.indexOf(t) < 0 && i.unshift(t), yr(e).is(r))) s.apply(e, i);
else
for (var n = yr(e).parents(), a = 0; a < n.length; a += 1)
yr(n[a]).is(r) && s.apply(n[a], i);
}
}
function l(t) {
var e = (t && t.target && t.target.dom7EventData) || [];
e.indexOf(t) < 0 && e.unshift(t), s.apply(this, e);
}
"function" == typeof e[1] &&
((n = e[0]), (s = e[1]), (a = e[2]), (r = void 0)),
a || (a = !1);
for (var u, h = n.split(" "), c = 0; c < this.length; c += 1) {
var d = this[c];
if (r)
for (u = 0; u < h.length; u += 1) {
var p = h[u];
d.dom7LiveListeners || (d.dom7LiveListeners = {}),
d.dom7LiveListeners[p] || (d.dom7LiveListeners[p] = []),
d.dom7LiveListeners[p].push({ listener: s, proxyListener: o }),
d.addEventListener(p, o, a);
}
else
for (u = 0; u < h.length; u += 1) {
var f = h[u];
d.dom7Listeners || (d.dom7Listeners = {}),
d.dom7Listeners[f] || (d.dom7Listeners[f] = []),
d.dom7Listeners[f].push({ listener: s, proxyListener: l }),
d.addEventListener(f, l, a);
}
}
return this;
},
off: function () {
for (var t = arguments.length, e = new Array(t), i = 0; i < t; i++)
e[i] = arguments[i];
var n = e[0],
r = e[1],
s = e[2],
a = e[3];
"function" == typeof e[1] &&
((n = e[0]), (s = e[1]), (a = e[2]), (r = void 0)),
a || (a = !1);
for (var o = n.split(" "), l = 0; l < o.length; l += 1)
for (var u = o[l], h = 0; h < this.length; h += 1) {
var c = this[h],
d = void 0;
if (
(!r && c.dom7Listeners
? (d = c.dom7Listeners[u])
: r && c.dom7LiveListeners && (d = c.dom7LiveListeners[u]),
d && d.length)
)
for (var p = d.length - 1; p >= 0; p -= 1) {
var f = d[p];
(s && f.listener === s) ||
(s &&
f.listener &&
f.listener.dom7proxy &&
f.listener.dom7proxy === s)
? (c.removeEventListener(u, f.proxyListener, a),
d.splice(p, 1))
: s ||
(c.removeEventListener(u, f.proxyListener, a),
d.splice(p, 1));
}
}
return this;
},
trigger: function () {
for (
var t = ur(), e = arguments.length, i = new Array(e), n = 0;
n < e;
n++
)
i[n] = arguments[n];
for (var r = i[0].split(" "), s = i[1], a = 0; a < r.length; a += 1)
for (var o = r[a], l = 0; l < this.length; l += 1) {
var u = this[l];
if (t.CustomEvent) {
var h = new t.CustomEvent(o, {
detail: s,
bubbles: !0,
cancelable: !0,
});
(u.dom7EventData = i.filter(function (t, e) {
return e > 0;
})),
u.dispatchEvent(h),
(u.dom7EventData = []),
delete u.dom7EventData;
}
}
return this;
},
transitionEnd: function (t) {
var e = this;
return (
t &&
e.on("transitionend", function i(n) {
n.target === this && (t.call(this, n), e.off("transitionend", i));
}),
this
);
},
outerWidth: function (t) {
if (this.length > 0) {
if (t) {
var e = this.styles();
return (
this[0].offsetWidth +
parseFloat(e.getPropertyValue("margin-right")) +
parseFloat(e.getPropertyValue("margin-left"))
);
}
return this[0].offsetWidth;
}
return null;
},
outerHeight: function (t) {
if (this.length > 0) {
if (t) {
var e = this.styles();
return (
this[0].offsetHeight +
parseFloat(e.getPropertyValue("margin-top")) +
parseFloat(e.getPropertyValue("margin-bottom"))
);
}
return this[0].offsetHeight;
}
return null;
},
styles: function () {
var t = ur();
return this[0] ? t.getComputedStyle(this[0], null) : {};
},
offset: function () {
if (this.length > 0) {
var t = ur(),
e = or(),
i = this[0],
n = i.getBoundingClientRect(),
r = e.body,
s = i.clientTop || r.clientTop || 0,
a = i.clientLeft || r.clientLeft || 0,
o = i === t ? t.scrollY : i.scrollTop,
l = i === t ? t.scrollX : i.scrollLeft;
return { top: n.top + o - s, left: n.left + l - a };
}
return null;
},
css: function (t, e) {
var i,
n = ur();
if (1 === arguments.length) {
if ("string" != typeof t) {
for (i = 0; i < this.length; i += 1)
for (var r in t) this[i].style[r] = t[r];
return this;
}
if (this[0])
return n.getComputedStyle(this[0], null).getPropertyValue(t);
}
if (2 === arguments.length && "string" == typeof t) {
for (i = 0; i < this.length; i += 1) this[i].style[t] = e;
return this;
}
return this;
},
each: function (t) {
return t
? (this.forEach(function (e, i) {
t.apply(e, [e, i]);
}),
this)
: this;
},
html: function (t) {
if (void 0 === t) return this[0] ? this[0].innerHTML : null;
for (var e = 0; e < this.length; e += 1) this[e].innerHTML = t;
return this;
},
text: function (t) {
if (void 0 === t) return this[0] ? this[0].textContent.trim() : null;
for (var e = 0; e < this.length; e += 1) this[e].textContent = t;
return this;
},
is: function (t) {
var e,
i,
n = ur(),
r = or(),
s = this[0];
if (!s || void 0 === t) return !1;
if ("string" == typeof t) {
if (s.matches) return s.matches(t);
if (s.webkitMatchesSelector) return s.webkitMatchesSelector(t);
if (s.msMatchesSelector) return s.msMatchesSelector(t);
for (e = yr(t), i = 0; i < e.length; i += 1)
if (e[i] === s) return !0;
return !1;
}
if (t === r) return s === r;
if (t === n) return s === n;
if (t.nodeType || t instanceof vr) {
for (e = t.nodeType ? [t] : t, i = 0; i < e.length; i += 1)
if (e[i] === s) return !0;
return !1;
}
return !1;
},
index: function () {
var t,
e = this[0];
if (e) {
for (t = 0; null !== (e = e.previousSibling); )
1 === e.nodeType && (t += 1);
return t;
}
},
eq: function (t) {
if (void 0 === t) return this;
var e = this.length;
if (t > e - 1) return yr([]);
if (t < 0) {
var i = e + t;
return yr(i < 0 ? [] : [this[i]]);
}
return yr([this[t]]);
},
append: function () {
for (var t, e = or(), i = 0; i < arguments.length; i += 1) {
t = i < 0 || arguments.length <= i ? void 0 : arguments[i];
for (var n = 0; n < this.length; n += 1)
if ("string" == typeof t) {
var r = e.createElement("div");
for (r.innerHTML = t; r.firstChild; )
this[n].appendChild(r.firstChild);
} else if (t instanceof vr)
for (var s = 0; s < t.length; s += 1) this[n].appendChild(t[s]);
else this[n].appendChild(t);
}
return this;
},
prepend: function (t) {
var e,
i,
n = or();
for (e = 0; e < this.length; e += 1)
if ("string" == typeof t) {
var r = n.createElement("div");
for (r.innerHTML = t, i = r.childNodes.length - 1; i >= 0; i -= 1)
this[e].insertBefore(r.childNodes[i], this[e].childNodes[0]);
} else if (t instanceof vr)
for (i = 0; i < t.length; i += 1)
this[e].insertBefore(t[i], this[e].childNodes[0]);
else this[e].insertBefore(t, this[e].childNodes[0]);
return this;
},
next: function (t) {
return this.length > 0
? t
? this[0].nextElementSibling && yr(this[0].nextElementSibling).is(t)
? yr([this[0].nextElementSibling])
: yr([])
: this[0].nextElementSibling
? yr([this[0].nextElementSibling])
: yr([])
: yr([]);
},
nextAll: function (t) {
var e = [],
i = this[0];
if (!i) return yr([]);
for (; i.nextElementSibling; ) {
var n = i.nextElementSibling;
t ? yr(n).is(t) && e.push(n) : e.push(n), (i = n);
}
return yr(e);
},
prev: function (t) {
if (this.length > 0) {
var e = this[0];
return t
? e.previousElementSibling && yr(e.previousElementSibling).is(t)
? yr([e.previousElementSibling])
: yr([])
: e.previousElementSibling
? yr([e.previousElementSibling])
: yr([]);
}
return yr([]);
},
prevAll: function (t) {
var e = [],
i = this[0];
if (!i) return yr([]);
for (; i.previousElementSibling; ) {
var n = i.previousElementSibling;
t ? yr(n).is(t) && e.push(n) : e.push(n), (i = n);
}
return yr(e);
},
parent: function (t) {
for (var e = [], i = 0; i < this.length; i += 1)
null !== this[i].parentNode &&
(t
? yr(this[i].parentNode).is(t) && e.push(this[i].parentNode)
: e.push(this[i].parentNode));
return yr(e);
},
parents: function (t) {
for (var e = [], i = 0; i < this.length; i += 1)
for (var n = this[i].parentNode; n; )
t ? yr(n).is(t) && e.push(n) : e.push(n), (n = n.parentNode);
return yr(e);
},
closest: function (t) {
var e = this;
return void 0 === t ? yr([]) : (e.is(t) || (e = e.parents(t).eq(0)), e);
},
find: function (t) {
for (var e = [], i = 0; i < this.length; i += 1)
for (var n = this[i].querySelectorAll(t), r = 0; r < n.length; r += 1)
e.push(n[r]);
return yr(e);
},
children: function (t) {
for (var e = [], i = 0; i < this.length; i += 1)
for (var n = this[i].children, r = 0; r < n.length; r += 1)
(t && !yr(n[r]).is(t)) || e.push(n[r]);
return yr(e);
},
filter: function (t) {
return yr(gr(this, t));
},
remove: function () {
for (var t = 0; t < this.length; t += 1)
this[t].parentNode && this[t].parentNode.removeChild(this[t]);
return this;
},
};
Object.keys(wr).forEach(function (t) {
yr.fn[t] = wr[t];
});
var Tr,
Sr,
Cr,
xr = yr;
function kr(t, e) {
return void 0 === e && (e = 0), setTimeout(t, e);
}
function Er() {
return Date.now();
}
function Mr(t) {
return (
"object" == typeof t &&
null !== t &&
t.constructor &&
t.constructor === Object
);
}
function Or() {
for (
var t = Object(arguments.length <= 0 ? void 0 : arguments[0]), e = 1;
e < arguments.length;
e += 1
) {
var i = e < 0 || arguments.length <= e ? void 0 : arguments[e];
if (null != i)
for (
var n = Object.keys(Object(i)), r = 0, s = n.length;
r < s;
r += 1
) {
var a = n[r],
o = Object.getOwnPropertyDescriptor(i, a);
void 0 !== o &&
o.enumerable &&
(Mr(t[a]) && Mr(i[a])
? Or(t[a], i[a])
: !Mr(t[a]) && Mr(i[a])
? ((t[a] = {}), Or(t[a], i[a]))
: (t[a] = i[a]));
}
}
return t;
}
function Ar(t, e) {
Object.keys(e).forEach(function (i) {
Mr(e[i]) &&
Object.keys(e[i]).forEach(function (n) {
"function" == typeof e[i][n] && (e[i][n] = e[i][n].bind(t));
}),
(t[i] = e[i]);
});
}
function Pr() {
return (
Tr ||
(Tr = (function () {
var t = ur(),
e = or();
return {
touch: !!(
"ontouchstart" in t ||
(t.DocumentTouch && e instanceof t.DocumentTouch)
),
pointerEvents:
!!t.PointerEvent &&
"maxTouchPoints" in t.navigator &&
t.navigator.maxTouchPoints >= 0,
observer:
"MutationObserver" in t || "WebkitMutationObserver" in t,
passiveListener: (function () {
var e = !1;
try {
var i = Object.defineProperty({}, "passive", {
get: function () {
e = !0;
},
});
t.addEventListener("testPassiveListener", null, i);
} catch (t) {}
return e;
})(),
gestures: "ongesturestart" in t,
};
})()),
Tr
);
}
function Lr(t) {
return (
void 0 === t && (t = {}),
Sr ||
(Sr = (function (t) {
var e = (void 0 === t ? {} : t).userAgent,
i = Pr(),
n = ur(),
r = n.navigator.platform,
s = e || n.navigator.userAgent,
a = { ios: !1, android: !1 },
o = n.screen.width,
l = n.screen.height,
u = s.match(/(Android);?[\s\/]+([\d.]+)?/),
h = s.match(/(iPad).*OS\s([\d_]+)/),
c = s.match(/(iPod)(.*OS\s([\d_]+))?/),
d = !h && s.match(/(iPhone\sOS|iOS)\s([\d_]+)/),
p = "Win32" === r,
f = "MacIntel" === r;
return (
!h &&
f &&
i.touch &&
[
"1024x1366",
"1366x1024",
"834x1194",
"1194x834",
"834x1112",
"1112x834",
"768x1024",
"1024x768",
].indexOf(o + "x" + l) >= 0 &&
((h = s.match(/(Version)\/([\d.]+)/)) || (h = [0, 1, "13_0_0"]),
(f = !1)),
u && !p && ((a.os = "android"), (a.android = !0)),
(h || d || c) && ((a.os = "ios"), (a.ios = !0)),
a
);
})(t)),
Sr
);
}
function Dr() {
return (
Cr ||
(Cr = (function () {
var t,
e = ur();
return {
isEdge: !!e.navigator.userAgent.match(/Edge/g),
isSafari:
((t = e.navigator.userAgent.toLowerCase()),
t.indexOf("safari") >= 0 &&
t.indexOf("chrome") < 0 &&
t.indexOf("android") < 0),
isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(
e.navigator.userAgent
),
};
})()),
Cr
);
}
var zr = {
name: "resize",
create: function () {
var t = this;
Or(t, {
resize: {
resizeHandler: function () {
t &&
!t.destroyed &&
t.initialized &&
(t.emit("beforeResize"), t.emit("resize"));
},
orientationChangeHandler: function () {
t && !t.destroyed && t.initialized && t.emit("orientationchange");
},
},
});
},
on: {
init: function (t) {
var e = ur();
e.addEventListener("resize", t.resize.resizeHandler),
e.addEventListener(
"orientationchange",
t.resize.orientationChangeHandler
);
},
destroy: function (t) {
var e = ur();
e.removeEventListener("resize", t.resize.resizeHandler),
e.removeEventListener(
"orientationchange",
t.resize.orientationChangeHandler
);
},
},
};
function Fr() {
return (Fr =
Object.assign ||
function (t) {
for (var e = 1; e < arguments.length; e++) {
var i = arguments[e];
for (var n in i)
Object.prototype.hasOwnProperty.call(i, n) && (t[n] = i[n]);
}
return t;
}).apply(this, arguments);
}
var qr = {
attach: function (t, e) {
void 0 === e && (e = {});
var i = ur(),
n = this,
r = new (i.MutationObserver || i.WebkitMutationObserver)(function (
t
) {
if (1 !== t.length) {
var e = function () {
n.emit("observerUpdate", t[0]);
};
i.requestAnimationFrame
? i.requestAnimationFrame(e)
: i.setTimeout(e, 0);
} else n.emit("observerUpdate", t[0]);
});
r.observe(t, {
attributes: void 0 === e.attributes || e.attributes,
childList: void 0 === e.childList || e.childList,
characterData: void 0 === e.characterData || e.characterData,
}),
n.observer.observers.push(r);
},
init: function () {
if (this.support.observer && this.params.observer) {
if (this.params.observeParents)
for (var t = this.$el.parents(), e = 0; e < t.length; e += 1)
this.observer.attach(t[e]);
this.observer.attach(this.$el[0], {
childList: this.params.observeSlideChildren,
}),
this.observer.attach(this.$wrapperEl[0], { attributes: !1 });
}
},
destroy: function () {
this.observer.observers.forEach(function (t) {
t.disconnect();
}),
(this.observer.observers = []);
},
},
jr = {
name: "observer",
params: { observer: !1, observeParents: !1, observeSlideChildren: !1 },
create: function () {
Ar(this, { observer: Fr(Fr({}, qr), {}, { observers: [] }) });
},
on: {
init: function (t) {
t.observer.init();
},
destroy: function (t) {
t.observer.destroy();
},
},
};
function Br(t) {
var e = or(),
i = ur(),
n = this.touchEventsData,
r = this.params,
s = this.touches;
if (!this.animating || !r.preventInteractionOnTransition) {
var a = t;
a.originalEvent && (a = a.originalEvent);
var o = xr(a.target);
if (
("wrapper" !== r.touchEventsTarget ||
o.closest(this.wrapperEl).length) &&
((n.isTouchEvent = "touchstart" === a.type),
(n.isTouchEvent || !("which" in a) || 3 !== a.which) &&
!(
(!n.isTouchEvent && "button" in a && a.button > 0) ||
(n.isTouched && n.isMoved)
))
)
if (
r.noSwiping &&
o.closest(
r.noSwipingSelector ? r.noSwipingSelector : "." + r.noSwipingClass
)[0]
)
this.allowClick = !0;
else if (!r.swipeHandler || o.closest(r.swipeHandler)[0]) {
(s.currentX =
"touchstart" === a.type ? a.targetTouches[0].pageX : a.pageX),
(s.currentY =
"touchstart" === a.type ? a.targetTouches[0].pageY : a.pageY);
var l = s.currentX,
u = s.currentY,
h = r.edgeSwipeDetection || r.iOSEdgeSwipeDetection,
c = r.edgeSwipeThreshold || r.iOSEdgeSwipeThreshold;
if (!h || !(l <= c || l >= i.screen.width - c)) {
if (
(Or(n, {
isTouched: !0,
isMoved: !1,
allowTouchCallbacks: !0,
isScrolling: void 0,
startMoving: void 0,
}),
(s.startX = l),
(s.startY = u),
(n.touchStartTime = Er()),
(this.allowClick = !0),
this.updateSize(),
(this.swipeDirection = void 0),
r.threshold > 0 && (n.allowThresholdMove = !1),
"touchstart" !== a.type)
) {
var d = !0;
o.is(n.formElements) && (d = !1),
e.activeElement &&
xr(e.activeElement).is(n.formElements) &&
e.activeElement !== o[0] &&
e.activeElement.blur();
var p = d && this.allowTouchMove && r.touchStartPreventDefault;
(r.touchStartForcePreventDefault || p) && a.preventDefault();
}
this.emit("touchStart", a);
}
}
}
}
function Ir(t) {
var e = or(),
i = this.touchEventsData,
n = this.params,
r = this.touches,
s = this.rtlTranslate,
a = t;
if ((a.originalEvent && (a = a.originalEvent), i.isTouched)) {
if (!i.isTouchEvent || "touchmove" === a.type) {
var o =
"touchmove" === a.type &&
a.targetTouches &&
(a.targetTouches[0] || a.changedTouches[0]),
l = "touchmove" === a.type ? o.pageX : a.pageX,
u = "touchmove" === a.type ? o.pageY : a.pageY;
if (a.preventedByNestedSwiper)
return (r.startX = l), void (r.startY = u);
if (!this.allowTouchMove)
return (
(this.allowClick = !1),
void (
i.isTouched &&
(Or(r, { startX: l, startY: u, currentX: l, currentY: u }),
(i.touchStartTime = Er()))
)
);
if (i.isTouchEvent && n.touchReleaseOnEdges && !n.loop)
if (this.isVertical()) {
if (
(u < r.startY && this.translate <= this.maxTranslate()) ||
(u > r.startY && this.translate >= this.minTranslate())
)
return (i.isTouched = !1), void (i.isMoved = !1);
} else if (
(l < r.startX && this.translate <= this.maxTranslate()) ||
(l > r.startX && this.translate >= this.minTranslate())
)
return;
if (
i.isTouchEvent &&
e.activeElement &&
a.target === e.activeElement &&
xr(a.target).is(i.formElements)
)
return (i.isMoved = !0), void (this.allowClick = !1);
if (
(i.allowTouchCallbacks && this.emit("touchMove", a),
!(a.targetTouches && a.targetTouches.length > 1))
) {
(r.currentX = l), (r.currentY = u);
var h = r.currentX - r.startX,
c = r.currentY - r.startY;
if (
!(
this.params.threshold &&
Math.sqrt(Math.pow(h, 2) + Math.pow(c, 2)) <
this.params.threshold
)
) {
var d;
if (void 0 === i.isScrolling)
(this.isHorizontal() && r.currentY === r.startY) ||
(this.isVertical() && r.currentX === r.startX)
? (i.isScrolling = !1)
: h * h + c * c >= 25 &&
((d =
(180 * Math.atan2(Math.abs(c), Math.abs(h))) / Math.PI),
(i.isScrolling = this.isHorizontal()
? d > n.touchAngle
: 90 - d > n.touchAngle));
if (
(i.isScrolling && this.emit("touchMoveOpposite", a),
void 0 === i.startMoving &&
((r.currentX === r.startX && r.currentY === r.startY) ||
(i.startMoving = !0)),
i.isScrolling)
)
i.isTouched = !1;
else if (i.startMoving) {
(this.allowClick = !1),
!n.cssMode && a.cancelable && a.preventDefault(),
n.touchMoveStopPropagation &&
!n.nested &&
a.stopPropagation(),
i.isMoved ||
(n.loop && this.loopFix(),
(i.startTranslate = this.getTranslate()),
this.setTransition(0),
this.animating &&
this.$wrapperEl.trigger(
"webkitTransitionEnd transitionend"
),
(i.allowMomentumBounce = !1),
!n.grabCursor ||
(!0 !== this.allowSlideNext &&
!0 !== this.allowSlidePrev) ||
this.setGrabCursor(!0),
this.emit("sliderFirstMove", a)),
this.emit("sliderMove", a),
(i.isMoved = !0);
var p = this.isHorizontal() ? h : c;
(r.diff = p),
(p *= n.touchRatio),
s && (p = -p),
(this.swipeDirection = p > 0 ? "prev" : "next"),
(i.currentTranslate = p + i.startTranslate);
var f = !0,
v = n.resistanceRatio;
if (
(n.touchReleaseOnEdges && (v = 0),
p > 0 && i.currentTranslate > this.minTranslate()
? ((f = !1),
n.resistance &&
(i.currentTranslate =
this.minTranslate() -
1 +
Math.pow(
-this.minTranslate() + i.startTranslate + p,
v
)))
: p < 0 &&
i.currentTranslate < this.maxTranslate() &&
((f = !1),
n.resistance &&
(i.currentTranslate =
this.maxTranslate() +
1 -
Math.pow(
this.maxTranslate() - i.startTranslate - p,
v
))),
f && (a.preventedByNestedSwiper = !0),
!this.allowSlideNext &&
"next" === this.swipeDirection &&
i.currentTranslate < i.startTranslate &&
(i.currentTranslate = i.startTranslate),
!this.allowSlidePrev &&
"prev" === this.swipeDirection &&
i.currentTranslate > i.startTranslate &&
(i.currentTranslate = i.startTranslate),
n.threshold > 0)
) {
if (!(Math.abs(p) > n.threshold || i.allowThresholdMove))
return void (i.currentTranslate = i.startTranslate);
if (!i.allowThresholdMove)
return (
(i.allowThresholdMove = !0),
(r.startX = r.currentX),
(r.startY = r.currentY),
(i.currentTranslate = i.startTranslate),
void (r.diff = this.isHorizontal()
? r.currentX - r.startX
: r.currentY - r.startY)
);
}
n.followFinger &&
!n.cssMode &&
((n.freeMode ||
n.watchSlidesProgress ||
n.watchSlidesVisibility) &&
(this.updateActiveIndex(), this.updateSlidesClasses()),
n.freeMode &&
(0 === i.velocities.length &&
i.velocities.push({
position: r[this.isHorizontal() ? "startX" : "startY"],
time: i.touchStartTime,
}),
i.velocities.push({
position:
r[this.isHorizontal() ? "currentX" : "currentY"],
time: Er(),
})),
this.updateProgress(i.currentTranslate),
this.setTranslate(i.currentTranslate));
}
}
}
}
} else
i.startMoving && i.isScrolling && this.emit("touchMoveOpposite", a);
}
function Nr(t) {
var e = this,
i = e.touchEventsData,
n = e.params,
r = e.touches,
s = e.rtlTranslate,
a = e.$wrapperEl,
o = e.slidesGrid,
l = e.snapGrid,
u = t;
if (
(u.originalEvent && (u = u.originalEvent),
i.allowTouchCallbacks && e.emit("touchEnd", u),
(i.allowTouchCallbacks = !1),
!i.isTouched)
)
return (
i.isMoved && n.grabCursor && e.setGrabCursor(!1),
(i.isMoved = !1),
void (i.startMoving = !1)
);
n.grabCursor &&
i.isMoved &&
i.isTouched &&
(!0 === e.allowSlideNext || !0 === e.allowSlidePrev) &&
e.setGrabCursor(!1);
var h,
c = Er(),
d = c - i.touchStartTime;
if (
(e.allowClick &&
(e.updateClickedSlide(u),
e.emit("tap click", u),
d < 300 &&
c - i.lastClickTime < 300 &&
e.emit("doubleTap doubleClick", u)),
(i.lastClickTime = Er()),
kr(function () {
e.destroyed || (e.allowClick = !0);
}),
!i.isTouched ||
!i.isMoved ||
!e.swipeDirection ||
0 === r.diff ||
i.currentTranslate === i.startTranslate)
)
return (i.isTouched = !1), (i.isMoved = !1), void (i.startMoving = !1);
if (
((i.isTouched = !1),
(i.isMoved = !1),
(i.startMoving = !1),
(h = n.followFinger
? s
? e.translate
: -e.translate
: -i.currentTranslate),
!n.cssMode)
)
if (n.freeMode) {
if (h < -e.minTranslate()) return void e.slideTo(e.activeIndex);
if (h > -e.maxTranslate())
return void (e.slides.length < l.length
? e.slideTo(l.length - 1)
: e.slideTo(e.slides.length - 1));
if (n.freeModeMomentum) {
if (i.velocities.length > 1) {
var p = i.velocities.pop(),
f = i.velocities.pop(),
v = p.position - f.position,
m = p.time - f.time;
(e.velocity = v / m),
(e.velocity /= 2),
Math.abs(e.velocity) < n.freeModeMinimumVelocity &&
(e.velocity = 0),
(m > 150 || Er() - p.time > 300) && (e.velocity = 0);
} else e.velocity = 0;
(e.velocity *= n.freeModeMomentumVelocityRatio),
(i.velocities.length = 0);
var g = 1e3 * n.freeModeMomentumRatio,
y = e.velocity * g,
b = e.translate + y;
s && (b = -b);
var _,
w,
T = !1,
S = 20 * Math.abs(e.velocity) * n.freeModeMomentumBounceRatio;
if (b < e.maxTranslate())
n.freeModeMomentumBounce
? (b + e.maxTranslate() < -S && (b = e.maxTranslate() - S),
(_ = e.maxTranslate()),
(T = !0),
(i.allowMomentumBounce = !0))
: (b = e.maxTranslate()),
n.loop && n.centeredSlides && (w = !0);
else if (b > e.minTranslate())
n.freeModeMomentumBounce
? (b - e.minTranslate() > S && (b = e.minTranslate() + S),
(_ = e.minTranslate()),
(T = !0),
(i.allowMomentumBounce = !0))
: (b = e.minTranslate()),
n.loop && n.centeredSlides && (w = !0);
else if (n.freeModeSticky) {
for (var C, x = 0; x < l.length; x += 1)
if (l[x] > -b) {
C = x;
break;
}
b = -(b =
Math.abs(l[C] - b) < Math.abs(l[C - 1] - b) ||
"next" === e.swipeDirection
? l[C]
: l[C - 1]);
}
if (
(w &&
e.once("transitionEnd", function () {
e.loopFix();
}),
0 !== e.velocity)
) {
if (
((g = s
? Math.abs((-b - e.translate) / e.velocity)
: Math.abs((b - e.translate) / e.velocity)),
n.freeModeSticky)
) {
var k = Math.abs((s ? -b : b) - e.translate),
E = e.slidesSizesGrid[e.activeIndex];
g = k < E ? n.speed : k < 2 * E ? 1.5 * n.speed : 2.5 * n.speed;
}
} else if (n.freeModeSticky) return void e.slideToClosest();
n.freeModeMomentumBounce && T
? (e.updateProgress(_),
e.setTransition(g),
e.setTranslate(b),
e.transitionStart(!0, e.swipeDirection),
(e.animating = !0),
a.transitionEnd(function () {
e &&
!e.destroyed &&
i.allowMomentumBounce &&
(e.emit("momentumBounce"),
e.setTransition(n.speed),
setTimeout(function () {
e.setTranslate(_),
a.transitionEnd(function () {
e && !e.destroyed && e.transitionEnd();
});
}, 0));
}))
: e.velocity
? (e.updateProgress(b),
e.setTransition(g),
e.setTranslate(b),
e.transitionStart(!0, e.swipeDirection),
e.animating ||
((e.animating = !0),
a.transitionEnd(function () {
e && !e.destroyed && e.transitionEnd();
})))
: e.updateProgress(b),
e.updateActiveIndex(),
e.updateSlidesClasses();
} else if (n.freeModeSticky) return void e.slideToClosest();
(!n.freeModeMomentum || d >= n.longSwipesMs) &&
(e.updateProgress(),
e.updateActiveIndex(),
e.updateSlidesClasses());
} else {
for (
var M = 0, O = e.slidesSizesGrid[0], A = 0;
A < o.length;
A += A < n.slidesPerGroupSkip ? 1 : n.slidesPerGroup
) {
var P = A < n.slidesPerGroupSkip - 1 ? 1 : n.slidesPerGroup;
void 0 !== o[A + P]
? h >= o[A] && h < o[A + P] && ((M = A), (O = o[A + P] - o[A]))
: h >= o[A] && ((M = A), (O = o[o.length - 1] - o[o.length - 2]));
}
var L = (h - o[M]) / O,
D = M < n.slidesPerGroupSkip - 1 ? 1 : n.slidesPerGroup;
if (d > n.longSwipesMs) {
if (!n.longSwipes) return void e.slideTo(e.activeIndex);
"next" === e.swipeDirection &&
(L >= n.longSwipesRatio ? e.slideTo(M + D) : e.slideTo(M)),
"prev" === e.swipeDirection &&
(L > 1 - n.longSwipesRatio ? e.slideTo(M + D) : e.slideTo(M));
} else {
if (!n.shortSwipes) return void e.slideTo(e.activeIndex);
e.navigation &&
(u.target === e.navigation.nextEl ||
u.target === e.navigation.prevEl)
? u.target === e.navigation.nextEl
? e.slideTo(M + D)
: e.slideTo(M)
: ("next" === e.swipeDirection && e.slideTo(M + D),
"prev" === e.swipeDirection && e.slideTo(M));
}
}
}
function Vr() {
var t = this.params,
e = this.el;
if (!e || 0 !== e.offsetWidth) {
t.breakpoints && this.setBreakpoint();
var i = this.allowSlideNext,
n = this.allowSlidePrev,
r = this.snapGrid;
(this.allowSlideNext = !0),
(this.allowSlidePrev = !0),
this.updateSize(),
this.updateSlides(),
this.updateSlidesClasses(),
("auto" === t.slidesPerView || t.slidesPerView > 1) &&
this.isEnd &&
!this.isBeginning &&
!this.params.centeredSlides
? this.slideTo(this.slides.length - 1, 0, !1, !0)
: this.slideTo(this.activeIndex, 0, !1, !0),
this.autoplay &&
this.autoplay.running &&
this.autoplay.paused &&
this.autoplay.run(),
(this.allowSlidePrev = n),
(this.allowSlideNext = i),
this.params.watchOverflow &&
r !== this.snapGrid &&
this.checkOverflow();
}
}
function Rr(t) {
this.allowClick ||
(this.params.preventClicks && t.preventDefault(),
this.params.preventClicksPropagation &&
this.animating &&
(t.stopPropagation(), t.stopImmediatePropagation()));
}
function Hr() {
var t = this.wrapperEl,
e = this.rtlTranslate;
(this.previousTranslate = this.translate),
this.isHorizontal()
? (this.translate = e
? t.scrollWidth - t.offsetWidth - t.scrollLeft
: -t.scrollLeft)
: (this.translate = -t.scrollTop),
-0 === this.translate && (this.translate = 0),
this.updateActiveIndex(),
this.updateSlidesClasses();
var i = this.maxTranslate() - this.minTranslate();
(0 === i ? 0 : (this.translate - this.minTranslate()) / i) !==
this.progress &&
this.updateProgress(e ? -this.translate : this.translate),
this.emit("setTranslate", this.translate, !1);
}
var Gr = !1;
function $r() {}
var Wr = {
init: !0,
direction: "horizontal",
touchEventsTarget: "container",
initialSlide: 0,
speed: 300,
cssMode: !1,
updateOnWindowResize: !0,
width: null,
height: null,
preventInteractionOnTransition: !1,
userAgent: null,
url: null,
edgeSwipeDetection: !1,
edgeSwipeThreshold: 20,
freeMode: !1,
freeModeMomentum: !0,
freeModeMomentumRatio: 1,
freeModeMomentumBounce: !0,
freeModeMomentumBounceRatio: 1,
freeModeMomentumVelocityRatio: 1,
freeModeSticky: !1,
freeModeMinimumVelocity: 0.02,
autoHeight: !1,
setWrapperSize: !1,
virtualTranslate: !1,
effect: "slide",
breakpoints: void 0,
spaceBetween: 0,
slidesPerView: 1,
slidesPerColumn: 1,
slidesPerColumnFill: "column",
slidesPerGroup: 1,
slidesPerGroupSkip: 0,
centeredSlides: !1,
centeredSlidesBounds: !1,
slidesOffsetBefore: 0,
slidesOffsetAfter: 0,
normalizeSlideIndex: !0,
centerInsufficientSlides: !1,
watchOverflow: !1,
roundLengths: !1,
touchRatio: 1,
touchAngle: 45,
simulateTouch: !0,
shortSwipes: !0,
longSwipes: !0,
longSwipesRatio: 0.5,
longSwipesMs: 300,
followFinger: !0,
allowTouchMove: !0,
threshold: 0,
touchMoveStopPropagation: !1,
touchStartPreventDefault: !0,
touchStartForcePreventDefault: !1,
touchReleaseOnEdges: !1,
uniqueNavElements: !0,
resistance: !0,
resistanceRatio: 0.85,
watchSlidesProgress: !1,
watchSlidesVisibility: !1,
grabCursor: !1,
preventClicks: !0,
preventClicksPropagation: !0,
slideToClickedSlide: !1,
preloadImages: !0,
updateOnImagesReady: !0,
loop: !1,
loopAdditionalSlides: 0,
loopedSlides: null,
loopFillGroupWithBlank: !1,
loopPreventsSlide: !0,
allowSlidePrev: !0,
allowSlideNext: !0,
swipeHandler: null,
noSwiping: !0,
noSwipingClass: "swiper-no-swiping",
noSwipingSelector: null,
passiveListeners: !0,
containerModifierClass: "swiper-container-",
slideClass: "swiper-slide",
slideBlankClass: "swiper-slide-invisible-blank",
slideActiveClass: "swiper-slide-active",
slideDuplicateActiveClass: "swiper-slide-duplicate-active",
slideVisibleClass: "swiper-slide-visible",
slideDuplicateClass: "swiper-slide-duplicate",
slideNextClass: "swiper-slide-next",
slideDuplicateNextClass: "swiper-slide-duplicate-next",
slidePrevClass: "swiper-slide-prev",
slideDuplicatePrevClass: "swiper-slide-duplicate-prev",
wrapperClass: "swiper-wrapper",
runCallbacksOnInit: !0,
_emitClasses: !1,
};
function Yr(t, e) {
for (var i = 0; i < e.length; i++) {
var n = e[i];
(n.enumerable = n.enumerable || !1),
(n.configurable = !0),
"value" in n && (n.writable = !0),
Object.defineProperty(t, n.key, n);
}
}
var Xr = {
modular: {
useParams: function (t) {
var e = this;
e.modules &&
Object.keys(e.modules).forEach(function (i) {
var n = e.modules[i];
n.params && Or(t, n.params);
});
},
useModules: function (t) {
void 0 === t && (t = {});
var e = this;
e.modules &&
Object.keys(e.modules).forEach(function (i) {
var n = e.modules[i],
r = t[i] || {};
n.on &&
e.on &&
Object.keys(n.on).forEach(function (t) {
e.on(t, n.on[t]);
}),
n.create && n.create.bind(e)(r);
});
},
},
eventsEmitter: {
on: function (t, e, i) {
var n = this;
if ("function" != typeof e) return n;
var r = i ? "unshift" : "push";
return (
t.split(" ").forEach(function (t) {
n.eventsListeners[t] || (n.eventsListeners[t] = []),
n.eventsListeners[t][r](e);
}),
n
);
},
once: function (t, e, i) {
var n = this;
if ("function" != typeof e) return n;
function r() {
n.off(t, r), r.__emitterProxy && delete r.__emitterProxy;
for (
var i = arguments.length, s = new Array(i), a = 0;
a < i;
a++
)
s[a] = arguments[a];
e.apply(n, s);
}
return (r.__emitterProxy = e), n.on(t, r, i);
},
onAny: function (t, e) {
if ("function" != typeof t) return this;
var i = e ? "unshift" : "push";
return (
this.eventsAnyListeners.indexOf(t) < 0 &&
this.eventsAnyListeners[i](t),
this
);
},
offAny: function (t) {
if (!this.eventsAnyListeners) return this;
var e = this.eventsAnyListeners.indexOf(t);
return e >= 0 && this.eventsAnyListeners.splice(e, 1), this;
},
off: function (t, e) {
var i = this;
return i.eventsListeners
? (t.split(" ").forEach(function (t) {
void 0 === e
? (i.eventsListeners[t] = [])
: i.eventsListeners[t] &&
i.eventsListeners[t].forEach(function (n, r) {
(n === e ||
(n.__emitterProxy && n.__emitterProxy === e)) &&
i.eventsListeners[t].splice(r, 1);
});
}),
i)
: i;
},
emit: function () {
var t,
e,
i,
n = this;
if (!n.eventsListeners) return n;
for (var r = arguments.length, s = new Array(r), a = 0; a < r; a++)
s[a] = arguments[a];
"string" == typeof s[0] || Array.isArray(s[0])
? ((t = s[0]), (e = s.slice(1, s.length)), (i = n))
: ((t = s[0].events), (e = s[0].data), (i = s[0].context || n)),
e.unshift(i);
var o = Array.isArray(t) ? t : t.split(" ");
return (
o.forEach(function (t) {
if (
(n.eventsAnyListeners &&
n.eventsAnyListeners.length &&
n.eventsAnyListeners.forEach(function (n) {
n.apply(i, [t].concat(e));
}),
n.eventsListeners && n.eventsListeners[t])
) {
var r = [];
n.eventsListeners[t].forEach(function (t) {
r.push(t);
}),
r.forEach(function (t) {
t.apply(i, e);
});
}
}),
n
);
},
},
update: {
updateSize: function () {
var t,
e,
i = this.$el;
(t =
void 0 !== this.params.width && null !== this.params.width
? this.params.width
: i[0].clientWidth),
(e =
void 0 !== this.params.height && null !== this.params.width
? this.params.height
: i[0].clientHeight),
(0 === t && this.isHorizontal()) ||
(0 === e && this.isVertical()) ||
((t =
t -
parseInt(i.css("padding-left") || 0, 10) -
parseInt(i.css("padding-right") || 0, 10)),
(e =
e -
parseInt(i.css("padding-top") || 0, 10) -
parseInt(i.css("padding-bottom") || 0, 10)),
Number.isNaN(t) && (t = 0),
Number.isNaN(e) && (e = 0),
Or(this, {
width: t,
height: e,
size: this.isHorizontal() ? t : e,
}));
},
updateSlides: function () {
var t = ur(),
e = this.params,
i = this.$wrapperEl,
n = this.size,
r = this.rtlTranslate,
s = this.wrongRTL,
a = this.virtual && e.virtual.enabled,
o = a ? this.virtual.slides.length : this.slides.length,
l = i.children("." + this.params.slideClass),
u = a ? this.virtual.slides.length : l.length,
h = [],
c = [],
d = [];
function p(t, i) {
return !e.cssMode || i !== l.length - 1;
}
var f = e.slidesOffsetBefore;
"function" == typeof f && (f = e.slidesOffsetBefore.call(this));
var v = e.slidesOffsetAfter;
"function" == typeof v && (v = e.slidesOffsetAfter.call(this));
var m = this.snapGrid.length,
g = this.snapGrid.length,
y = e.spaceBetween,
b = -f,
_ = 0,
w = 0;
if (void 0 !== n) {
var T, S;
"string" == typeof y &&
y.indexOf("%") >= 0 &&
(y = (parseFloat(y.replace("%", "")) / 100) * n),
(this.virtualSize = -y),
r
? l.css({ marginLeft: "", marginTop: "" })
: l.css({ marginRight: "", marginBottom: "" }),
e.slidesPerColumn > 1 &&
((T =
Math.floor(u / e.slidesPerColumn) ===
u / this.params.slidesPerColumn
? u
: Math.ceil(u / e.slidesPerColumn) * e.slidesPerColumn),
"auto" !== e.slidesPerView &&
"row" === e.slidesPerColumnFill &&
(T = Math.max(T, e.slidesPerView * e.slidesPerColumn)));
for (
var C,
x = e.slidesPerColumn,
k = T / x,
E = Math.floor(u / e.slidesPerColumn),
M = 0;
M < u;
M += 1
) {
S = 0;
var O = l.eq(M);
if (e.slidesPerColumn > 1) {
var A = void 0,
P = void 0,
L = void 0;
if ("row" === e.slidesPerColumnFill && e.slidesPerGroup > 1) {
var D = Math.floor(
M / (e.slidesPerGroup * e.slidesPerColumn)
),
z = M - e.slidesPerColumn * e.slidesPerGroup * D,
F =
0 === D
? e.slidesPerGroup
: Math.min(
Math.ceil((u - D * x * e.slidesPerGroup) / x),
e.slidesPerGroup
);
(A =
(P =
z -
(L = Math.floor(z / F)) * F +
D * e.slidesPerGroup) +
(L * T) / x),
O.css({
"-webkit-box-ordinal-group": A,
"-moz-box-ordinal-group": A,
"-ms-flex-order": A,
"-webkit-order": A,
order: A,
});
} else
"column" === e.slidesPerColumnFill
? ((L = M - (P = Math.floor(M / x)) * x),
(P > E || (P === E && L === x - 1)) &&
(L += 1) >= x &&
((L = 0), (P += 1)))
: (P = M - (L = Math.floor(M / k)) * k);
O.css(
"margin-" + (this.isHorizontal() ? "top" : "left"),
0 !== L && e.spaceBetween && e.spaceBetween + "px"
);
}
if ("none" !== O.css("display")) {
if ("auto" === e.slidesPerView) {
var q = t.getComputedStyle(O[0], null),
j = O[0].style.transform,
B = O[0].style.webkitTransform;
if (
(j && (O[0].style.transform = "none"),
B && (O[0].style.webkitTransform = "none"),
e.roundLengths)
)
S = this.isHorizontal()
? O.outerWidth(!0)
: O.outerHeight(!0);
else if (this.isHorizontal()) {
var I = parseFloat(q.getPropertyValue("width") || 0),
N = parseFloat(q.getPropertyValue("padding-left") || 0),
V = parseFloat(
q.getPropertyValue("padding-right") || 0
),
R = parseFloat(q.getPropertyValue("margin-left") || 0),
H = parseFloat(q.getPropertyValue("margin-right") || 0),
G = q.getPropertyValue("box-sizing");
S =
G && "border-box" === G ? I + R + H : I + N + V + R + H;
} else {
var $ = parseFloat(q.getPropertyValue("height") || 0),
W = parseFloat(q.getPropertyValue("padding-top") || 0),
Y = parseFloat(
q.getPropertyValue("padding-bottom") || 0
),
X = parseFloat(q.getPropertyValue("margin-top") || 0),
U = parseFloat(
q.getPropertyValue("margin-bottom") || 0
),
Q = q.getPropertyValue("box-sizing");
S =
Q && "border-box" === Q ? $ + X + U : $ + W + Y + X + U;
}
j && (O[0].style.transform = j),
B && (O[0].style.webkitTransform = B),
e.roundLengths && (S = Math.floor(S));
} else
(S = (n - (e.slidesPerView - 1) * y) / e.slidesPerView),
e.roundLengths && (S = Math.floor(S)),
l[M] &&
(this.isHorizontal()
? (l[M].style.width = S + "px")
: (l[M].style.height = S + "px"));
l[M] && (l[M].swiperSlideSize = S),
d.push(S),
e.centeredSlides
? ((b = b + S / 2 + _ / 2 + y),
0 === _ && 0 !== M && (b = b - n / 2 - y),
0 === M && (b = b - n / 2 - y),
Math.abs(b) < 0.001 && (b = 0),
e.roundLengths && (b = Math.floor(b)),
w % e.slidesPerGroup == 0 && h.push(b),
c.push(b))
: (e.roundLengths && (b = Math.floor(b)),
(w - Math.min(this.params.slidesPerGroupSkip, w)) %
this.params.slidesPerGroup ==
0 && h.push(b),
c.push(b),
(b = b + S + y)),
(this.virtualSize += S + y),
(_ = S),
(w += 1);
}
}
if (
((this.virtualSize = Math.max(this.virtualSize, n) + v),
r &&
s &&
("slide" === e.effect || "coverflow" === e.effect) &&
i.css({ width: this.virtualSize + e.spaceBetween + "px" }),
e.setWrapperSize &&
(this.isHorizontal()
? i.css({ width: this.virtualSize + e.spaceBetween + "px" })
: i.css({
height: this.virtualSize + e.spaceBetween + "px",
})),
e.slidesPerColumn > 1 &&
((this.virtualSize = (S + e.spaceBetween) * T),
(this.virtualSize =
Math.ceil(this.virtualSize / e.slidesPerColumn) -
e.spaceBetween),
this.isHorizontal()
? i.css({ width: this.virtualSize + e.spaceBetween + "px" })
: i.css({
height: this.virtualSize + e.spaceBetween + "px",
}),
e.centeredSlides))
) {
C = [];
for (var K = 0; K < h.length; K += 1) {
var Z = h[K];
e.roundLengths && (Z = Math.floor(Z)),
h[K] < this.virtualSize + h[0] && C.push(Z);
}
h = C;
}
if (!e.centeredSlides) {
C = [];
for (var J = 0; J < h.length; J += 1) {
var tt = h[J];
e.roundLengths && (tt = Math.floor(tt)),
h[J] <= this.virtualSize - n && C.push(tt);
}
(h = C),
Math.floor(this.virtualSize - n) -
Math.floor(h[h.length - 1]) >
1 && h.push(this.virtualSize - n);
}
if (
(0 === h.length && (h = [0]),
0 !== e.spaceBetween &&
(this.isHorizontal()
? r
? l.filter(p).css({ marginLeft: y + "px" })
: l.filter(p).css({ marginRight: y + "px" })
: l.filter(p).css({ marginBottom: y + "px" })),
e.centeredSlides && e.centeredSlidesBounds)
) {
var et = 0;
d.forEach(function (t) {
et += t + (e.spaceBetween ? e.spaceBetween : 0);
});
var it = (et -= e.spaceBetween) - n;
h = h.map(function (t) {
return t < 0 ? -f : t > it ? it + v : t;
});
}
if (e.centerInsufficientSlides) {
var nt = 0;
if (
(d.forEach(function (t) {
nt += t + (e.spaceBetween ? e.spaceBetween : 0);
}),
(nt -= e.spaceBetween) < n)
) {
var rt = (n - nt) / 2;
h.forEach(function (t, e) {
h[e] = t - rt;
}),
c.forEach(function (t, e) {
c[e] = t + rt;
});
}
}
Or(this, {
slides: l,
snapGrid: h,
slidesGrid: c,
slidesSizesGrid: d,
}),
u !== o && this.emit("slidesLengthChange"),
h.length !== m &&
(this.params.watchOverflow && this.checkOverflow(),
this.emit("snapGridLengthChange")),
c.length !== g && this.emit("slidesGridLengthChange"),
(e.watchSlidesProgress || e.watchSlidesVisibility) &&
this.updateSlidesOffset();
}
},
updateAutoHeight: function (t) {
var e,
i = [],
n = 0;
if (
("number" == typeof t
? this.setTransition(t)
: !0 === t && this.setTransition(this.params.speed),
"auto" !== this.params.slidesPerView &&
this.params.slidesPerView > 1)
)
if (this.params.centeredSlides)
this.visibleSlides.each(function (t) {
i.push(t);
});
else
for (e = 0; e < Math.ceil(this.params.slidesPerView); e += 1) {
var r = this.activeIndex + e;
if (r > this.slides.length) break;
i.push(this.slides.eq(r)[0]);
}
else i.push(this.slides.eq(this.activeIndex)[0]);
for (e = 0; e < i.length; e += 1)
if (void 0 !== i[e]) {
var s = i[e].offsetHeight;
n = s > n ? s : n;
}
n && this.$wrapperEl.css("height", n + "px");
},
updateSlidesOffset: function () {
for (var t = this.slides, e = 0; e < t.length; e += 1)
t[e].swiperSlideOffset = this.isHorizontal()
? t[e].offsetLeft
: t[e].offsetTop;
},
updateSlidesProgress: function (t) {
void 0 === t && (t = (this && this.translate) || 0);
var e = this.params,
i = this.slides,
n = this.rtlTranslate;
if (0 !== i.length) {
void 0 === i[0].swiperSlideOffset && this.updateSlidesOffset();
var r = -t;
n && (r = t),
i.removeClass(e.slideVisibleClass),
(this.visibleSlidesIndexes = []),
(this.visibleSlides = []);
for (var s = 0; s < i.length; s += 1) {
var a = i[s],
o =
(r +
(e.centeredSlides ? this.minTranslate() : 0) -
a.swiperSlideOffset) /
(a.swiperSlideSize + e.spaceBetween);
if (
e.watchSlidesVisibility ||
(e.centeredSlides && e.autoHeight)
) {
var l = -(r - a.swiperSlideOffset),
u = l + this.slidesSizesGrid[s];
((l >= 0 && l < this.size - 1) ||
(u > 1 && u <= this.size) ||
(l <= 0 && u >= this.size)) &&
(this.visibleSlides.push(a),
this.visibleSlidesIndexes.push(s),
i.eq(s).addClass(e.slideVisibleClass));
}
a.progress = n ? -o : o;
}
this.visibleSlides = xr(this.visibleSlides);
}
},
updateProgress: function (t) {
if (void 0 === t) {
var e = this.rtlTranslate ? -1 : 1;
t = (this && this.translate && this.translate * e) || 0;
}
var i = this.params,
n = this.maxTranslate() - this.minTranslate(),
r = this.progress,
s = this.isBeginning,
a = this.isEnd,
o = s,
l = a;
0 === n
? ((r = 0), (s = !0), (a = !0))
: ((s = (r = (t - this.minTranslate()) / n) <= 0), (a = r >= 1)),
Or(this, { progress: r, isBeginning: s, isEnd: a }),
(i.watchSlidesProgress ||
i.watchSlidesVisibility ||
(i.centeredSlides && i.autoHeight)) &&
this.updateSlidesProgress(t),
s && !o && this.emit("reachBeginning toEdge"),
a && !l && this.emit("reachEnd toEdge"),
((o && !s) || (l && !a)) && this.emit("fromEdge"),
this.emit("progress", r);
},
updateSlidesClasses: function () {
var t,
e = this.slides,
i = this.params,
n = this.$wrapperEl,
r = this.activeIndex,
s = this.realIndex,
a = this.virtual && i.virtual.enabled;
e.removeClass(
i.slideActiveClass +
" " +
i.slideNextClass +
" " +
i.slidePrevClass +
" " +
i.slideDuplicateActiveClass +
" " +
i.slideDuplicateNextClass +
" " +
i.slideDuplicatePrevClass
),
(t = a
? this.$wrapperEl.find(
"." + i.slideClass + '[data-swiper-slide-index="' + r + '"]'
)
: e.eq(r)).addClass(i.slideActiveClass),
i.loop &&
(t.hasClass(i.slideDuplicateClass)
? n
.children(
"." +
i.slideClass +
":not(." +
i.slideDuplicateClass +
')[data-swiper-slide-index="' +
s +
'"]'
)
.addClass(i.slideDuplicateActiveClass)
: n
.children(
"." +
i.slideClass +
"." +
i.slideDuplicateClass +
'[data-swiper-slide-index="' +
s +
'"]'
)
.addClass(i.slideDuplicateActiveClass));
var o = t
.nextAll("." + i.slideClass)
.eq(0)
.addClass(i.slideNextClass);
i.loop &&
0 === o.length &&
(o = e.eq(0)).addClass(i.slideNextClass);
var l = t
.prevAll("." + i.slideClass)
.eq(0)
.addClass(i.slidePrevClass);
i.loop &&
0 === l.length &&
(l = e.eq(-1)).addClass(i.slidePrevClass),
i.loop &&
(o.hasClass(i.slideDuplicateClass)
? n
.children(
"." +
i.slideClass +
":not(." +
i.slideDuplicateClass +
')[data-swiper-slide-index="' +
o.attr("data-swiper-slide-index") +
'"]'
)
.addClass(i.slideDuplicateNextClass)
: n
.children(
"." +
i.slideClass +
"." +
i.slideDuplicateClass +
'[data-swiper-slide-index="' +
o.attr("data-swiper-slide-index") +
'"]'
)
.addClass(i.slideDuplicateNextClass),
l.hasClass(i.slideDuplicateClass)
? n
.children(
"." +
i.slideClass +
":not(." +
i.slideDuplicateClass +
')[data-swiper-slide-index="' +
l.attr("data-swiper-slide-index") +
'"]'
)
.addClass(i.slideDuplicatePrevClass)
: n
.children(
"." +
i.slideClass +
"." +
i.slideDuplicateClass +
'[data-swiper-slide-index="' +
l.attr("data-swiper-slide-index") +
'"]'
)
.addClass(i.slideDuplicatePrevClass)),
this.emitSlidesClasses();
},
updateActiveIndex: function (t) {
var e,
i = this.rtlTranslate ? this.translate : -this.translate,
n = this.slidesGrid,
r = this.snapGrid,
s = this.params,
a = this.activeIndex,
o = this.realIndex,
l = this.snapIndex,
u = t;
if (void 0 === u) {
for (var h = 0; h < n.length; h += 1)
void 0 !== n[h + 1]
? i >= n[h] && i < n[h + 1] - (n[h + 1] - n[h]) / 2
? (u = h)
: i >= n[h] && i < n[h + 1] && (u = h + 1)
: i >= n[h] && (u = h);
s.normalizeSlideIndex && (u < 0 || void 0 === u) && (u = 0);
}
if (r.indexOf(i) >= 0) e = r.indexOf(i);
else {
var c = Math.min(s.slidesPerGroupSkip, u);
e = c + Math.floor((u - c) / s.slidesPerGroup);
}
if ((e >= r.length && (e = r.length - 1), u !== a)) {
var d = parseInt(
this.slides.eq(u).attr("data-swiper-slide-index") || u,
10
);
Or(this, {
snapIndex: e,
realIndex: d,
previousIndex: a,
activeIndex: u,
}),
this.emit("activeIndexChange"),
this.emit("snapIndexChange"),
o !== d && this.emit("realIndexChange"),
(this.initialized || this.params.runCallbacksOnInit) &&
this.emit("slideChange");
} else
e !== l && ((this.snapIndex = e), this.emit("snapIndexChange"));
},
updateClickedSlide: function (t) {
var e = this.params,
i = xr(t.target).closest("." + e.slideClass)[0],
n = !1;
if (i)
for (var r = 0; r < this.slides.length; r += 1)
this.slides[r] === i && (n = !0);
if (!i || !n)
return (
(this.clickedSlide = void 0), void (this.clickedIndex = void 0)
);
(this.clickedSlide = i),
this.virtual && this.params.virtual.enabled
? (this.clickedIndex = parseInt(
xr(i).attr("data-swiper-slide-index"),
10
))
: (this.clickedIndex = xr(i).index()),
e.slideToClickedSlide &&
void 0 !== this.clickedIndex &&
this.clickedIndex !== this.activeIndex &&
this.slideToClickedSlide();
},
},
translate: {
getTranslate: function (t) {
void 0 === t && (t = this.isHorizontal() ? "x" : "y");
var e = this.params,
i = this.rtlTranslate,
n = this.translate,
r = this.$wrapperEl;
if (e.virtualTranslate) return i ? -n : n;
if (e.cssMode) return n;
var s = (function (t, e) {
void 0 === e && (e = "x");
var i,
n,
r,
s = ur(),
a = s.getComputedStyle(t, null);
return (
s.WebKitCSSMatrix
? ((n = a.transform || a.webkitTransform).split(",").length >
6 &&
(n = n
.split(", ")
.map(function (t) {
return t.replace(",", ".");
})
.join(", ")),
(r = new s.WebKitCSSMatrix("none" === n ? "" : n)))
: (i = (r =
a.MozTransform ||
a.OTransform ||
a.MsTransform ||
a.msTransform ||
a.transform ||
a
.getPropertyValue("transform")
.replace("translate(", "matrix(1, 0, 0, 1,"))
.toString()
.split(",")),
"x" === e &&
(n = s.WebKitCSSMatrix
? r.m41
: 16 === i.length
? parseFloat(i[12])
: parseFloat(i[4])),
"y" === e &&
(n = s.WebKitCSSMatrix
? r.m42
: 16 === i.length
? parseFloat(i[13])
: parseFloat(i[5])),
n || 0
);
})(r[0], t);
return i && (s = -s), s || 0;
},
setTranslate: function (t, e) {
var i = this.rtlTranslate,
n = this.params,
r = this.$wrapperEl,
s = this.wrapperEl,
a = this.progress,
o = 0,
l = 0;
this.isHorizontal() ? (o = i ? -t : t) : (l = t),
n.roundLengths && ((o = Math.floor(o)), (l = Math.floor(l))),
n.cssMode
? (s[this.isHorizontal() ? "scrollLeft" : "scrollTop"] =
this.isHorizontal() ? -o : -l)
: n.virtualTranslate ||
r.transform("translate3d(" + o + "px, " + l + "px, 0px)"),
(this.previousTranslate = this.translate),
(this.translate = this.isHorizontal() ? o : l);
var u = this.maxTranslate() - this.minTranslate();
(0 === u ? 0 : (t - this.minTranslate()) / u) !== a &&
this.updateProgress(t),
this.emit("setTranslate", this.translate, e);
},
minTranslate: function () {
return -this.snapGrid[0];
},
maxTranslate: function () {
return -this.snapGrid[this.snapGrid.length - 1];
},
translateTo: function (t, e, i, n, r) {
void 0 === t && (t = 0),
void 0 === e && (e = this.params.speed),
void 0 === i && (i = !0),
void 0 === n && (n = !0);
var s = this,
a = s.params,
o = s.wrapperEl;
if (s.animating && a.preventInteractionOnTransition) return !1;
var l,
u = s.minTranslate(),
h = s.maxTranslate();
if (
((l = n && t > u ? u : n && t < h ? h : t),
s.updateProgress(l),
a.cssMode)
) {
var c,
d = s.isHorizontal();
if (0 === e) o[d ? "scrollLeft" : "scrollTop"] = -l;
else if (o.scrollTo)
o.scrollTo(
(((c = {})[d ? "left" : "top"] = -l),
(c.behavior = "smooth"),
c)
);
else o[d ? "scrollLeft" : "scrollTop"] = -l;
return !0;
}
return (
0 === e
? (s.setTransition(0),
s.setTranslate(l),
i &&
(s.emit("beforeTransitionStart", e, r),
s.emit("transitionEnd")))
: (s.setTransition(e),
s.setTranslate(l),
i &&
(s.emit("beforeTransitionStart", e, r),
s.emit("transitionStart")),
s.animating ||
((s.animating = !0),
s.onTranslateToWrapperTransitionEnd ||
(s.onTranslateToWrapperTransitionEnd = function (t) {
s &&
!s.destroyed &&
t.target === this &&
(s.$wrapperEl[0].removeEventListener(
"transitionend",
s.onTranslateToWrapperTransitionEnd
),
s.$wrapperEl[0].removeEventListener(
"webkitTransitionEnd",
s.onTranslateToWrapperTransitionEnd
),
(s.onTranslateToWrapperTransitionEnd = null),
delete s.onTranslateToWrapperTransitionEnd,
i && s.emit("transitionEnd"));
}),
s.$wrapperEl[0].addEventListener(
"transitionend",
s.onTranslateToWrapperTransitionEnd
),
s.$wrapperEl[0].addEventListener(
"webkitTransitionEnd",
s.onTranslateToWrapperTransitionEnd
))),
!0
);
},
},
transition: {
setTransition: function (t, e) {
this.params.cssMode || this.$wrapperEl.transition(t),
this.emit("setTransition", t, e);
},
transitionStart: function (t, e) {
void 0 === t && (t = !0);
var i = this.activeIndex,
n = this.params,
r = this.previousIndex;
if (!n.cssMode) {
n.autoHeight && this.updateAutoHeight();
var s = e;
if (
(s || (s = i > r ? "next" : i < r ? "prev" : "reset"),
this.emit("transitionStart"),
t && i !== r)
) {
if ("reset" === s)
return void this.emit("slideResetTransitionStart");
this.emit("slideChangeTransitionStart"),
"next" === s
? this.emit("slideNextTransitionStart")
: this.emit("slidePrevTransitionStart");
}
}
},
transitionEnd: function (t, e) {
void 0 === t && (t = !0);
var i = this.activeIndex,
n = this.previousIndex,
r = this.params;
if (((this.animating = !1), !r.cssMode)) {
this.setTransition(0);
var s = e;
if (
(s || (s = i > n ? "next" : i < n ? "prev" : "reset"),
this.emit("transitionEnd"),
t && i !== n)
) {
if ("reset" === s)
return void this.emit("slideResetTransitionEnd");
this.emit("slideChangeTransitionEnd"),
"next" === s
? this.emit("slideNextTransitionEnd")
: this.emit("slidePrevTransitionEnd");
}
}
},
},
slide: {
slideTo: function (t, e, i, n) {
void 0 === t && (t = 0),
void 0 === e && (e = this.params.speed),
void 0 === i && (i = !0);
var r = this,
s = t;
s < 0 && (s = 0);
var a = r.params,
o = r.snapGrid,
l = r.slidesGrid,
u = r.previousIndex,
h = r.activeIndex,
c = r.rtlTranslate,
d = r.wrapperEl;
if (r.animating && a.preventInteractionOnTransition) return !1;
var p = Math.min(r.params.slidesPerGroupSkip, s),
f = p + Math.floor((s - p) / r.params.slidesPerGroup);
f >= o.length && (f = o.length - 1),
(h || a.initialSlide || 0) === (u || 0) &&
i &&
r.emit("beforeSlideChangeStart");
var v,
m = -o[f];
if ((r.updateProgress(m), a.normalizeSlideIndex))
for (var g = 0; g < l.length; g += 1)
-Math.floor(100 * m) >= Math.floor(100 * l[g]) && (s = g);
if (r.initialized && s !== h) {
if (!r.allowSlideNext && m < r.translate && m < r.minTranslate())
return !1;
if (
!r.allowSlidePrev &&
m > r.translate &&
m > r.maxTranslate() &&
(h || 0) !== s
)
return !1;
}
if (
((v = s > h ? "next" : s < h ? "prev" : "reset"),
(c && -m === r.translate) || (!c && m === r.translate))
)
return (
r.updateActiveIndex(s),
a.autoHeight && r.updateAutoHeight(),
r.updateSlidesClasses(),
"slide" !== a.effect && r.setTranslate(m),
"reset" !== v &&
(r.transitionStart(i, v), r.transitionEnd(i, v)),
!1
);
if (a.cssMode) {
var y,
b = r.isHorizontal(),
_ = -m;
if ((c && (_ = d.scrollWidth - d.offsetWidth - _), 0 === e))
d[b ? "scrollLeft" : "scrollTop"] = _;
else if (d.scrollTo)
d.scrollTo(
(((y = {})[b ? "left" : "top"] = _),
(y.behavior = "smooth"),
y)
);
else d[b ? "scrollLeft" : "scrollTop"] = _;
return !0;
}
return (
0 === e
? (r.setTransition(0),
r.setTranslate(m),
r.updateActiveIndex(s),
r.updateSlidesClasses(),
r.emit("beforeTransitionStart", e, n),
r.transitionStart(i, v),
r.transitionEnd(i, v))
: (r.setTransition(e),
r.setTranslate(m),
r.updateActiveIndex(s),
r.updateSlidesClasses(),
r.emit("beforeTransitionStart", e, n),
r.transitionStart(i, v),
r.animating ||
((r.animating = !0),
r.onSlideToWrapperTransitionEnd ||
(r.onSlideToWrapperTransitionEnd = function (t) {
r &&
!r.destroyed &&
t.target === this &&
(r.$wrapperEl[0].removeEventListener(
"transitionend",
r.onSlideToWrapperTransitionEnd
),
r.$wrapperEl[0].removeEventListener(
"webkitTransitionEnd",
r.onSlideToWrapperTransitionEnd
),
(r.onSlideToWrapperTransitionEnd = null),
delete r.onSlideToWrapperTransitionEnd,
r.transitionEnd(i, v));
}),
r.$wrapperEl[0].addEventListener(
"transitionend",
r.onSlideToWrapperTransitionEnd
),
r.$wrapperEl[0].addEventListener(
"webkitTransitionEnd",
r.onSlideToWrapperTransitionEnd
))),
!0
);
},
slideToLoop: function (t, e, i, n) {
void 0 === t && (t = 0),
void 0 === e && (e = this.params.speed),
void 0 === i && (i = !0);
var r = t;
return (
this.params.loop && (r += this.loopedSlides),
this.slideTo(r, e, i, n)
);
},
slideNext: function (t, e, i) {
void 0 === t && (t = this.params.speed), void 0 === e && (e = !0);
var n = this.params,
r = this.animating,
s =
this.activeIndex < n.slidesPerGroupSkip ? 1 : n.slidesPerGroup;
if (n.loop) {
if (r && n.loopPreventsSlide) return !1;
this.loopFix(),
(this._clientLeft = this.$wrapperEl[0].clientLeft);
}
return this.slideTo(this.activeIndex + s, t, e, i);
},
slidePrev: function (t, e, i) {
void 0 === t && (t = this.params.speed), void 0 === e && (e = !0);
var n = this.params,
r = this.animating,
s = this.snapGrid,
a = this.slidesGrid,
o = this.rtlTranslate;
if (n.loop) {
if (r && n.loopPreventsSlide) return !1;
this.loopFix(),
(this._clientLeft = this.$wrapperEl[0].clientLeft);
}
function l(t) {
return t < 0 ? -Math.floor(Math.abs(t)) : Math.floor(t);
}
var u,
h = l(o ? this.translate : -this.translate),
c = s.map(function (t) {
return l(t);
}),
d = (s[c.indexOf(h)], s[c.indexOf(h) - 1]);
return (
void 0 === d &&
n.cssMode &&
s.forEach(function (t) {
!d && h >= t && (d = t);
}),
void 0 !== d &&
(u = a.indexOf(d)) < 0 &&
(u = this.activeIndex - 1),
this.slideTo(u, t, e, i)
);
},
slideReset: function (t, e, i) {
return (
void 0 === t && (t = this.params.speed),
void 0 === e && (e = !0),
this.slideTo(this.activeIndex, t, e, i)
);
},
slideToClosest: function (t, e, i, n) {
void 0 === t && (t = this.params.speed),
void 0 === e && (e = !0),
void 0 === n && (n = 0.5);
var r = this.activeIndex,
s = Math.min(this.params.slidesPerGroupSkip, r),
a = s + Math.floor((r - s) / this.params.slidesPerGroup),
o = this.rtlTranslate ? this.translate : -this.translate;
if (o >= this.snapGrid[a]) {
var l = this.snapGrid[a];
o - l > (this.snapGrid[a + 1] - l) * n &&
(r += this.params.slidesPerGroup);
} else {
var u = this.snapGrid[a - 1];
o - u <= (this.snapGrid[a] - u) * n &&
(r -= this.params.slidesPerGroup);
}
return (
(r = Math.max(r, 0)),
(r = Math.min(r, this.slidesGrid.length - 1)),
this.slideTo(r, t, e, i)
);
},
slideToClickedSlide: function () {
var t,
e = this,
i = e.params,
n = e.$wrapperEl,
r =
"auto" === i.slidesPerView
? e.slidesPerViewDynamic()
: i.slidesPerView,
s = e.clickedIndex;
if (i.loop) {
if (e.animating) return;
(t = parseInt(
xr(e.clickedSlide).attr("data-swiper-slide-index"),
10
)),
i.centeredSlides
? s < e.loopedSlides - r / 2 ||
s > e.slides.length - e.loopedSlides + r / 2
? (e.loopFix(),
(s = n
.children(
"." +
i.slideClass +
'[data-swiper-slide-index="' +
t +
'"]:not(.' +
i.slideDuplicateClass +
")"
)
.eq(0)
.index()),
kr(function () {
e.slideTo(s);
}))
: e.slideTo(s)
: s > e.slides.length - r
? (e.loopFix(),
(s = n
.children(
"." +
i.slideClass +
'[data-swiper-slide-index="' +
t +
'"]:not(.' +
i.slideDuplicateClass +
")"
)
.eq(0)
.index()),
kr(function () {
e.slideTo(s);
}))
: e.slideTo(s);
} else e.slideTo(s);
},
},
loop: {
loopCreate: function () {
var t = this,
e = or(),
i = t.params,
n = t.$wrapperEl;
n.children(
"." + i.slideClass + "." + i.slideDuplicateClass
).remove();
var r = n.children("." + i.slideClass);
if (i.loopFillGroupWithBlank) {
var s = i.slidesPerGroup - (r.length % i.slidesPerGroup);
if (s !== i.slidesPerGroup) {
for (var a = 0; a < s; a += 1) {
var o = xr(e.createElement("div")).addClass(
i.slideClass + " " + i.slideBlankClass
);
n.append(o);
}
r = n.children("." + i.slideClass);
}
}
"auto" !== i.slidesPerView ||
i.loopedSlides ||
(i.loopedSlides = r.length),
(t.loopedSlides = Math.ceil(
parseFloat(i.loopedSlides || i.slidesPerView, 10)
)),
(t.loopedSlides += i.loopAdditionalSlides),
t.loopedSlides > r.length && (t.loopedSlides = r.length);
var l = [],
u = [];
r.each(function (e, i) {
var n = xr(e);
i < t.loopedSlides && u.push(e),
i < r.length && i >= r.length - t.loopedSlides && l.push(e),
n.attr("data-swiper-slide-index", i);
});
for (var h = 0; h < u.length; h += 1)
n.append(xr(u[h].cloneNode(!0)).addClass(i.slideDuplicateClass));
for (var c = l.length - 1; c >= 0; c -= 1)
n.prepend(xr(l[c].cloneNode(!0)).addClass(i.slideDuplicateClass));
},
loopFix: function () {
this.emit("beforeLoopFix");
var t,
e = this.activeIndex,
i = this.slides,
n = this.loopedSlides,
r = this.allowSlidePrev,
s = this.allowSlideNext,
a = this.snapGrid,
o = this.rtlTranslate;
(this.allowSlidePrev = !0), (this.allowSlideNext = !0);
var l = -a[e] - this.getTranslate();
if (e < n)
(t = i.length - 3 * n + e),
(t += n),
this.slideTo(t, 0, !1, !0) &&
0 !== l &&
this.setTranslate((o ? -this.translate : this.translate) - l);
else if (e >= i.length - n) {
(t = -i.length + e + n),
(t += n),
this.slideTo(t, 0, !1, !0) &&
0 !== l &&
this.setTranslate((o ? -this.translate : this.translate) - l);
}
(this.allowSlidePrev = r),
(this.allowSlideNext = s),
this.emit("loopFix");
},
loopDestroy: function () {
var t = this.$wrapperEl,
e = this.params,
i = this.slides;
t
.children(
"." +
e.slideClass +
"." +
e.slideDuplicateClass +
",." +
e.slideClass +
"." +
e.slideBlankClass
)
.remove(),
i.removeAttr("data-swiper-slide-index");
},
},
grabCursor: {
setGrabCursor: function (t) {
if (
!(
this.support.touch ||
!this.params.simulateTouch ||
(this.params.watchOverflow && this.isLocked) ||
this.params.cssMode
)
) {
var e = this.el;
(e.style.cursor = "move"),
(e.style.cursor = t ? "-webkit-grabbing" : "-webkit-grab"),
(e.style.cursor = t ? "-moz-grabbin" : "-moz-grab"),
(e.style.cursor = t ? "grabbing" : "grab");
}
},
unsetGrabCursor: function () {
this.support.touch ||
(this.params.watchOverflow && this.isLocked) ||
this.params.cssMode ||
(this.el.style.cursor = "");
},
},
manipulation: {
appendSlide: function (t) {
var e = this.$wrapperEl,
i = this.params;
if (
(i.loop && this.loopDestroy(),
"object" == typeof t && "length" in t)
)
for (var n = 0; n < t.length; n += 1) t[n] && e.append(t[n]);
else e.append(t);
i.loop && this.loopCreate(),
(i.observer && this.support.observer) || this.update();
},
prependSlide: function (t) {
var e = this.params,
i = this.$wrapperEl,
n = this.activeIndex;
e.loop && this.loopDestroy();
var r = n + 1;
if ("object" == typeof t && "length" in t) {
for (var s = 0; s < t.length; s += 1) t[s] && i.prepend(t[s]);
r = n + t.length;
} else i.prepend(t);
e.loop && this.loopCreate(),
(e.observer && this.support.observer) || this.update(),
this.slideTo(r, 0, !1);
},
addSlide: function (t, e) {
var i = this.$wrapperEl,
n = this.params,
r = this.activeIndex;
n.loop &&
((r -= this.loopedSlides),
this.loopDestroy(),
(this.slides = i.children("." + n.slideClass)));
var s = this.slides.length;
if (t <= 0) this.prependSlide(e);
else if (t >= s) this.appendSlide(e);
else {
for (
var a = r > t ? r + 1 : r, o = [], l = s - 1;
l >= t;
l -= 1
) {
var u = this.slides.eq(l);
u.remove(), o.unshift(u);
}
if ("object" == typeof e && "length" in e) {
for (var h = 0; h < e.length; h += 1) e[h] && i.append(e[h]);
a = r > t ? r + e.length : r;
} else i.append(e);
for (var c = 0; c < o.length; c += 1) i.append(o[c]);
n.loop && this.loopCreate(),
(n.observer && this.support.observer) || this.update(),
n.loop
? this.slideTo(a + this.loopedSlides, 0, !1)
: this.slideTo(a, 0, !1);
}
},
removeSlide: function (t) {
var e = this.params,
i = this.$wrapperEl,
n = this.activeIndex;
e.loop &&
((n -= this.loopedSlides),
this.loopDestroy(),
(this.slides = i.children("." + e.slideClass)));
var r,
s = n;
if ("object" == typeof t && "length" in t) {
for (var a = 0; a < t.length; a += 1)
(r = t[a]),
this.slides[r] && this.slides.eq(r).remove(),
r < s && (s -= 1);
s = Math.max(s, 0);
} else
(r = t),
this.slides[r] && this.slides.eq(r).remove(),
r < s && (s -= 1),
(s = Math.max(s, 0));
e.loop && this.loopCreate(),
(e.observer && this.support.observer) || this.update(),
e.loop
? this.slideTo(s + this.loopedSlides, 0, !1)
: this.slideTo(s, 0, !1);
},
removeAllSlides: function () {
for (var t = [], e = 0; e < this.slides.length; e += 1) t.push(e);
this.removeSlide(t);
},
},
events: {
attachEvents: function () {
var t = or(),
e = this.params,
i = this.touchEvents,
n = this.el,
r = this.wrapperEl,
s = this.device,
a = this.support;
(this.onTouchStart = Br.bind(this)),
(this.onTouchMove = Ir.bind(this)),
(this.onTouchEnd = Nr.bind(this)),
e.cssMode && (this.onScroll = Hr.bind(this)),
(this.onClick = Rr.bind(this));
var o = !!e.nested;
if (!a.touch && a.pointerEvents)
n.addEventListener(i.start, this.onTouchStart, !1),
t.addEventListener(i.move, this.onTouchMove, o),
t.addEventListener(i.end, this.onTouchEnd, !1);
else {
if (a.touch) {
var l = !(
"touchstart" !== i.start ||
!a.passiveListener ||
!e.passiveListeners
) && { passive: !0, capture: !1 };
n.addEventListener(i.start, this.onTouchStart, l),
n.addEventListener(
i.move,
this.onTouchMove,
a.passiveListener ? { passive: !1, capture: o } : o
),
n.addEventListener(i.end, this.onTouchEnd, l),
i.cancel && n.addEventListener(i.cancel, this.onTouchEnd, l),
Gr || (t.addEventListener("touchstart", $r), (Gr = !0));
}
((e.simulateTouch && !s.ios && !s.android) ||
(e.simulateTouch && !a.touch && s.ios)) &&
(n.addEventListener("mousedown", this.onTouchStart, !1),
t.addEventListener("mousemove", this.onTouchMove, o),
t.addEventListener("mouseup", this.onTouchEnd, !1));
}
(e.preventClicks || e.preventClicksPropagation) &&
n.addEventListener("click", this.onClick, !0),
e.cssMode && r.addEventListener("scroll", this.onScroll),
e.updateOnWindowResize
? this.on(
s.ios || s.android
? "resize orientationchange observerUpdate"
: "resize observerUpdate",
Vr,
!0
)
: this.on("observerUpdate", Vr, !0);
},
detachEvents: function () {
var t = or(),
e = this.params,
i = this.touchEvents,
n = this.el,
r = this.wrapperEl,
s = this.device,
a = this.support,
o = !!e.nested;
if (!a.touch && a.pointerEvents)
n.removeEventListener(i.start, this.onTouchStart, !1),
t.removeEventListener(i.move, this.onTouchMove, o),
t.removeEventListener(i.end, this.onTouchEnd, !1);
else {
if (a.touch) {
var l = !(
"onTouchStart" !== i.start ||
!a.passiveListener ||
!e.passiveListeners
) && { passive: !0, capture: !1 };
n.removeEventListener(i.start, this.onTouchStart, l),
n.removeEventListener(i.move, this.onTouchMove, o),
n.removeEventListener(i.end, this.onTouchEnd, l),
i.cancel &&
n.removeEventListener(i.cancel, this.onTouchEnd, l);
}
((e.simulateTouch && !s.ios && !s.android) ||
(e.simulateTouch && !a.touch && s.ios)) &&
(n.removeEventListener("mousedown", this.onTouchStart, !1),
t.removeEventListener("mousemove", this.onTouchMove, o),
t.removeEventListener("mouseup", this.onTouchEnd, !1));
}
(e.preventClicks || e.preventClicksPropagation) &&
n.removeEventListener("click", this.onClick, !0),
e.cssMode && r.removeEventListener("scroll", this.onScroll),
this.off(
s.ios || s.android
? "resize orientationchange observerUpdate"
: "resize observerUpdate",
Vr
);
},
},
breakpoints: {
setBreakpoint: function () {
var t = this.activeIndex,
e = this.initialized,
i = this.loopedSlides,
n = void 0 === i ? 0 : i,
r = this.params,
s = this.$el,
a = r.breakpoints;
if (a && (!a || 0 !== Object.keys(a).length)) {
var o = this.getBreakpoint(a);
if (o && this.currentBreakpoint !== o) {
var l = o in a ? a[o] : void 0;
l &&
[
"slidesPerView",
"spaceBetween",
"slidesPerGroup",
"slidesPerGroupSkip",
"slidesPerColumn",
].forEach(function (t) {
var e = l[t];
void 0 !== e &&
(l[t] =
"slidesPerView" !== t || ("AUTO" !== e && "auto" !== e)
? "slidesPerView" === t
? parseFloat(e)
: parseInt(e, 10)
: "auto");
});
var u = l || this.originalParams,
h = r.slidesPerColumn > 1,
c = u.slidesPerColumn > 1;
h && !c
? (s.removeClass(
r.containerModifierClass +
"multirow " +
r.containerModifierClass +
"multirow-column"
),
this.emitContainerClasses())
: !h &&
c &&
(s.addClass(r.containerModifierClass + "multirow"),
"column" === u.slidesPerColumnFill &&
s.addClass(r.containerModifierClass + "multirow-column"),
this.emitContainerClasses());
var d = u.direction && u.direction !== r.direction,
p = r.loop && (u.slidesPerView !== r.slidesPerView || d);
d && e && this.changeDirection(),
Or(this.params, u),
Or(this, {
allowTouchMove: this.params.allowTouchMove,
allowSlideNext: this.params.allowSlideNext,
allowSlidePrev: this.params.allowSlidePrev,
}),
(this.currentBreakpoint = o),
this.emit("_beforeBreakpoint", u),
p &&
e &&
(this.loopDestroy(),
this.loopCreate(),
this.updateSlides(),
this.slideTo(t - n + this.loopedSlides, 0, !1)),
this.emit("breakpoint", u);
}
}
},
getBreakpoint: function (t) {
var e = ur();
if (t) {
var i = !1,
n = Object.keys(t).map(function (t) {
if ("string" == typeof t && 0 === t.indexOf("@")) {
var i = parseFloat(t.substr(1));
return { value: e.innerHeight * i, point: t };
}
return { value: t, point: t };
});
n.sort(function (t, e) {
return parseInt(t.value, 10) - parseInt(e.value, 10);
});
for (var r = 0; r < n.length; r += 1) {
var s = n[r],
a = s.point;
s.value <= e.innerWidth && (i = a);
}
return i || "max";
}
},
},
checkOverflow: {
checkOverflow: function () {
var t = this.params,
e = this.isLocked,
i =
this.slides.length > 0 &&
t.slidesOffsetBefore +
t.spaceBetween * (this.slides.length - 1) +
this.slides[0].offsetWidth * this.slides.length;
t.slidesOffsetBefore && t.slidesOffsetAfter && i
? (this.isLocked = i <= this.size)
: (this.isLocked = 1 === this.snapGrid.length),
(this.allowSlideNext = !this.isLocked),
(this.allowSlidePrev = !this.isLocked),
e !== this.isLocked &&
this.emit(this.isLocked ? "lock" : "unlock"),
e &&
e !== this.isLocked &&
((this.isEnd = !1),
this.navigation && this.navigation.update());
},
},
classes: {
addClasses: function () {
var t = this.classNames,
e = this.params,
i = this.rtl,
n = this.$el,
r = this.device,
s = [];
s.push("initialized"),
s.push(e.direction),
e.freeMode && s.push("free-mode"),
e.autoHeight && s.push("autoheight"),
i && s.push("rtl"),
e.slidesPerColumn > 1 &&
(s.push("multirow"),
"column" === e.slidesPerColumnFill &&
s.push("multirow-column")),
r.android && s.push("android"),
r.ios && s.push("ios"),
e.cssMode && s.push("css-mode"),
s.forEach(function (i) {
t.push(e.containerModifierClass + i);
}),
n.addClass(t.join(" ")),
this.emitContainerClasses();
},
removeClasses: function () {
var t = this.$el,
e = this.classNames;
t.removeClass(e.join(" ")), this.emitContainerClasses();
},
},
images: {
loadImage: function (t, e, i, n, r, s) {
var a,
o = ur();
function l() {
s && s();
}
xr(t).parent("picture")[0] || (t.complete && r)
? l()
: e
? (((a = new o.Image()).onload = l),
(a.onerror = l),
n && (a.sizes = n),
i && (a.srcset = i),
e && (a.src = e))
: l();
},
preloadImages: function () {
var t = this;
function e() {
null != t &&
t &&
!t.destroyed &&
(void 0 !== t.imagesLoaded && (t.imagesLoaded += 1),
t.imagesLoaded === t.imagesToLoad.length &&
(t.params.updateOnImagesReady && t.update(),
t.emit("imagesReady")));
}
t.imagesToLoad = t.$el.find("img");
for (var i = 0; i < t.imagesToLoad.length; i += 1) {
var n = t.imagesToLoad[i];
t.loadImage(
n,
n.currentSrc || n.getAttribute("src"),
n.srcset || n.getAttribute("srcset"),
n.sizes || n.getAttribute("sizes"),
!0,
e
);
}
},
},
},
Ur = {},
Qr = (function () {
function t() {
for (
var e, i, n = arguments.length, r = new Array(n), s = 0;
s < n;
s++
)
r[s] = arguments[s];
1 === r.length && r[0].constructor && r[0].constructor === Object
? (i = r[0])
: ((e = r[0]), (i = r[1])),
i || (i = {}),
(i = Or({}, i)),
e && !i.el && (i.el = e);
var a = this;
(a.support = Pr()),
(a.device = Lr({ userAgent: i.userAgent })),
(a.browser = Dr()),
(a.eventsListeners = {}),
(a.eventsAnyListeners = []),
void 0 === a.modules && (a.modules = {}),
Object.keys(a.modules).forEach(function (t) {
var e = a.modules[t];
if (e.params) {
var n = Object.keys(e.params)[0],
r = e.params[n];
if ("object" != typeof r || null === r) return;
if (!(n in i) || !("enabled" in r)) return;
!0 === i[n] && (i[n] = { enabled: !0 }),
"object" != typeof i[n] ||
"enabled" in i[n] ||
(i[n].enabled = !0),
i[n] || (i[n] = { enabled: !1 });
}
});
var o = Or({}, Wr);
a.useParams(o),
(a.params = Or({}, o, Ur, i)),
(a.originalParams = Or({}, a.params)),
(a.passedParams = Or({}, i)),
a.params &&
a.params.on &&
Object.keys(a.params.on).forEach(function (t) {
a.on(t, a.params.on[t]);
}),
a.params && a.params.onAny && a.onAny(a.params.onAny),
(a.$ = xr);
var l = xr(a.params.el);
if ((e = l[0])) {
if (l.length > 1) {
var u = [];
return (
l.each(function (e) {
var n = Or({}, i, { el: e });
u.push(new t(n));
}),
u
);
}
var h, c, d;
return (
(e.swiper = a),
e && e.shadowRoot && e.shadowRoot.querySelector
? ((h = xr(
e.shadowRoot.querySelector("." + a.params.wrapperClass)
)).children = function (t) {
return l.children(t);
})
: (h = l.children("." + a.params.wrapperClass)),
Or(a, {
$el: l,
el: e,
$wrapperEl: h,
wrapperEl: h[0],
classNames: [],
slides: xr(),
slidesGrid: [],
snapGrid: [],
slidesSizesGrid: [],
isHorizontal: function () {
return "horizontal" === a.params.direction;
},
isVertical: function () {
return "vertical" === a.params.direction;
},
rtl:
"rtl" === e.dir.toLowerCase() || "rtl" === l.css("direction"),
rtlTranslate:
"horizontal" === a.params.direction &&
("rtl" === e.dir.toLowerCase() ||
"rtl" === l.css("direction")),
wrongRTL: "-webkit-box" === h.css("display"),
activeIndex: 0,
realIndex: 0,
isBeginning: !0,
isEnd: !1,
translate: 0,
previousTranslate: 0,
progress: 0,
velocity: 0,
animating: !1,
allowSlideNext: a.params.allowSlideNext,
allowSlidePrev: a.params.allowSlidePrev,
touchEvents:
((c = ["touchstart", "touchmove", "touchend", "touchcancel"]),
(d = ["mousedown", "mousemove", "mouseup"]),
a.support.pointerEvents &&
(d = ["pointerdown", "pointermove", "pointerup"]),
(a.touchEventsTouch = {
start: c[0],
move: c[1],
end: c[2],
cancel: c[3],
}),
(a.touchEventsDesktop = {
start: d[0],
move: d[1],
end: d[2],
}),
a.support.touch || !a.params.simulateTouch
? a.touchEventsTouch
: a.touchEventsDesktop),
touchEventsData: {
isTouched: void 0,
isMoved: void 0,
allowTouchCallbacks: void 0,
touchStartTime: void 0,
isScrolling: void 0,
currentTranslate: void 0,
startTranslate: void 0,
allowThresholdMove: void 0,
formElements:
"input, select, option, textarea, button, video, label",
lastClickTime: Er(),
clickTimeout: void 0,
velocities: [],
allowMomentumBounce: void 0,
isTouchEvent: void 0,
startMoving: void 0,
},
allowClick: !0,
allowTouchMove: a.params.allowTouchMove,
touches: {
startX: 0,
startY: 0,
currentX: 0,
currentY: 0,
diff: 0,
},
imagesToLoad: [],
imagesLoaded: 0,
}),
a.useModules(),
a.emit("_swiper"),
a.params.init && a.init(),
a
);
}
}
var e,
i,
n,
r = t.prototype;
return (
(r.emitContainerClasses = function () {
var t = this;
if (t.params._emitClasses && t.el) {
var e = t.el.className.split(" ").filter(function (e) {
return (
0 === e.indexOf("swiper-container") ||
0 === e.indexOf(t.params.containerModifierClass)
);
});
t.emit("_containerClasses", e.join(" "));
}
}),
(r.emitSlidesClasses = function () {
var t = this;
t.params._emitClasses &&
t.el &&
t.slides.each(function (e) {
var i = e.className.split(" ").filter(function (e) {
return (
0 === e.indexOf("swiper-slide") ||
0 === e.indexOf(t.params.slideClass)
);
});
t.emit("_slideClass", e, i.join(" "));
});
}),
(r.slidesPerViewDynamic = function () {
var t = this.params,
e = this.slides,
i = this.slidesGrid,
n = this.size,
r = this.activeIndex,
s = 1;
if (t.centeredSlides) {
for (
var a, o = e[r].swiperSlideSize, l = r + 1;
l < e.length;
l += 1
)
e[l] &&
!a &&
((s += 1), (o += e[l].swiperSlideSize) > n && (a = !0));
for (var u = r - 1; u >= 0; u -= 1)
e[u] &&
!a &&
((s += 1), (o += e[u].swiperSlideSize) > n && (a = !0));
} else
for (var h = r + 1; h < e.length; h += 1)
i[h] - i[r] < n && (s += 1);
return s;
}),
(r.update = function () {
var t = this;
if (t && !t.destroyed) {
var e = t.snapGrid,
i = t.params;
i.breakpoints && t.setBreakpoint(),
t.updateSize(),
t.updateSlides(),
t.updateProgress(),
t.updateSlidesClasses(),
t.params.freeMode
? (n(), t.params.autoHeight && t.updateAutoHeight())
: (("auto" === t.params.slidesPerView ||
t.params.slidesPerView > 1) &&
t.isEnd &&
!t.params.centeredSlides
? t.slideTo(t.slides.length - 1, 0, !1, !0)
: t.slideTo(t.activeIndex, 0, !1, !0)) || n(),
i.watchOverflow && e !== t.snapGrid && t.checkOverflow(),
t.emit("update");
}
function n() {
var e = t.rtlTranslate ? -1 * t.translate : t.translate,
i = Math.min(Math.max(e, t.maxTranslate()), t.minTranslate());
t.setTranslate(i), t.updateActiveIndex(), t.updateSlidesClasses();
}
}),
(r.changeDirection = function (t, e) {
void 0 === e && (e = !0);
var i = this.params.direction;
return (
t || (t = "horizontal" === i ? "vertical" : "horizontal"),
t === i ||
("horizontal" !== t && "vertical" !== t) ||
(this.$el
.removeClass("" + this.params.containerModifierClass + i)
.addClass("" + this.params.containerModifierClass + t),
this.emitContainerClasses(),
(this.params.direction = t),
this.slides.each(function (e) {
"vertical" === t
? (e.style.width = "")
: (e.style.height = "");
}),
this.emit("changeDirection"),
e && this.update()),
this
);
}),
(r.init = function () {
this.initialized ||
(this.emit("beforeInit"),
this.params.breakpoints && this.setBreakpoint(),
this.addClasses(),
this.params.loop && this.loopCreate(),
this.updateSize(),
this.updateSlides(),
this.params.watchOverflow && this.checkOverflow(),
this.params.grabCursor && this.setGrabCursor(),
this.params.preloadImages && this.preloadImages(),
this.params.loop
? this.slideTo(
this.params.initialSlide + this.loopedSlides,
0,
this.params.runCallbacksOnInit
)
: this.slideTo(
this.params.initialSlide,
0,
this.params.runCallbacksOnInit
),
this.attachEvents(),
(this.initialized = !0),
this.emit("init"));
}),
(r.destroy = function (t, e) {
void 0 === t && (t = !0), void 0 === e && (e = !0);
var i,
n = this,
r = n.params,
s = n.$el,
a = n.$wrapperEl,
o = n.slides;
return (
void 0 === n.params ||
n.destroyed ||
(n.emit("beforeDestroy"),
(n.initialized = !1),
n.detachEvents(),
r.loop && n.loopDestroy(),
e &&
(n.removeClasses(),
s.removeAttr("style"),
a.removeAttr("style"),
o &&
o.length &&
o
.removeClass(
[
r.slideVisibleClass,
r.slideActiveClass,
r.slideNextClass,
r.slidePrevClass,
].join(" ")
)
.removeAttr("style")
.removeAttr("data-swiper-slide-index")),
n.emit("destroy"),
Object.keys(n.eventsListeners).forEach(function (t) {
n.off(t);
}),
!1 !== t &&
((n.$el[0].swiper = null),
(i = n),
Object.keys(i).forEach(function (t) {
try {
i[t] = null;
} catch (t) {}
try {
delete i[t];
} catch (t) {}
})),
(n.destroyed = !0)),
null
);
}),
(t.extendDefaults = function (t) {
Or(Ur, t);
}),
(t.installModule = function (e) {
t.prototype.modules || (t.prototype.modules = {});
var i =
e.name || Object.keys(t.prototype.modules).length + "_" + Er();
t.prototype.modules[i] = e;
}),
(t.use = function (e) {
return Array.isArray(e)
? (e.forEach(function (e) {
return t.installModule(e);
}),
t)
: (t.installModule(e), t);
}),
(e = t),
(n = [
{
key: "extendedDefaults",
get: function () {
return Ur;
},
},
{
key: "defaults",
get: function () {
return Wr;
},
},
]),
(i = null) && Yr(e.prototype, i),
n && Yr(e, n),
t
);
})();
Object.keys(Xr).forEach(function (t) {
Object.keys(Xr[t]).forEach(function (e) {
Qr.prototype[e] = Xr[t][e];
});
}),
Qr.use([zr, jr]);
var Kr = Qr;
function Zr() {
return (Zr =
Object.assign ||
function (t) {
for (var e = 1; e < arguments.length; e++) {
var i = arguments[e];
for (var n in i)
Object.prototype.hasOwnProperty.call(i, n) && (t[n] = i[n]);
}
return t;
}).apply(this, arguments);
}
var Jr = {
update: function () {
var t = this.params.navigation;
if (!this.params.loop) {
var e = this.navigation,
i = e.$nextEl,
n = e.$prevEl;
n &&
n.length > 0 &&
(this.isBeginning
? n.addClass(t.disabledClass)
: n.removeClass(t.disabledClass),
n[
this.params.watchOverflow && this.isLocked
? "addClass"
: "removeClass"
](t.lockClass)),
i &&
i.length > 0 &&
(this.isEnd
? i.addClass(t.disabledClass)
: i.removeClass(t.disabledClass),
i[
this.params.watchOverflow && this.isLocked
? "addClass"
: "removeClass"
](t.lockClass));
}
},
onPrevClick: function (t) {
t.preventDefault(),
(this.isBeginning && !this.params.loop) || this.slidePrev();
},
onNextClick: function (t) {
t.preventDefault(),
(this.isEnd && !this.params.loop) || this.slideNext();
},
init: function () {
var t,
e,
i = this.params.navigation;
(i.nextEl || i.prevEl) &&
(i.nextEl &&
((t = xr(i.nextEl)),
this.params.uniqueNavElements &&
"string" == typeof i.nextEl &&
t.length > 1 &&
1 === this.$el.find(i.nextEl).length &&
(t = this.$el.find(i.nextEl))),
i.prevEl &&
((e = xr(i.prevEl)),
this.params.uniqueNavElements &&
"string" == typeof i.prevEl &&
e.length > 1 &&
1 === this.$el.find(i.prevEl).length &&
(e = this.$el.find(i.prevEl))),
t && t.length > 0 && t.on("click", this.navigation.onNextClick),
e && e.length > 0 && e.on("click", this.navigation.onPrevClick),
Or(this.navigation, {
$nextEl: t,
nextEl: t && t[0],
$prevEl: e,
prevEl: e && e[0],
}));
},
destroy: function () {
var t = this.navigation,
e = t.$nextEl,
i = t.$prevEl;
e &&
e.length &&
(e.off("click", this.navigation.onNextClick),
e.removeClass(this.params.navigation.disabledClass)),
i &&
i.length &&
(i.off("click", this.navigation.onPrevClick),
i.removeClass(this.params.navigation.disabledClass));
},
},
ts = {
name: "navigation",
params: {
navigation: {
nextEl: null,
prevEl: null,
hideOnClick: !1,
disabledClass: "swiper-button-disabled",
hiddenClass: "swiper-button-hidden",
lockClass: "swiper-button-lock",
},
},
create: function () {
Ar(this, { navigation: Zr({}, Jr) });
},
on: {
init: function (t) {
t.navigation.init(), t.navigation.update();
},
toEdge: function (t) {
t.navigation.update();
},
fromEdge: function (t) {
t.navigation.update();
},
destroy: function (t) {
t.navigation.destroy();
},
click: function (t, e) {
var i,
n = t.navigation,
r = n.$nextEl,
s = n.$prevEl;
!t.params.navigation.hideOnClick ||
xr(e.target).is(s) ||
xr(e.target).is(r) ||
(r
? (i = r.hasClass(t.params.navigation.hiddenClass))
: s && (i = s.hasClass(t.params.navigation.hiddenClass)),
!0 === i ? t.emit("navigationShow") : t.emit("navigationHide"),
r && r.toggleClass(t.params.navigation.hiddenClass),
s && s.toggleClass(t.params.navigation.hiddenClass));
},
},
};
function es(t, e) {
var i;
if ("undefined" == typeof Symbol || null == t[Symbol.iterator]) {
if (
Array.isArray(t) ||
(i = (function (t, e) {
if (!t) return;
if ("string" == typeof t) return is(t, e);
var i = Object.prototype.toString.call(t).slice(8, -1);
"Object" === i && t.constructor && (i = t.constructor.name);
if ("Map" === i || "Set" === i) return Array.from(t);
if (
"Arguments" === i ||
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)
)
return is(t, e);
})(t)) ||
(e && t && "number" == typeof t.length)
) {
i && (t = i);
var n = 0,
r = function () {};
return {
s: r,
n: function () {
return n >= t.length ? { done: !0 } : { done: !1, value: t[n++] };
},
e: function (t) {
throw t;
},
f: r,
};
}
throw new TypeError(
"Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
}
var s,
a = !0,
o = !1;
return {
s: function () {
i = t[Symbol.iterator]();
},
n: function () {
var t = i.next();
return (a = t.done), t;
},
e: function (t) {
(o = !0), (s = t);
},
f: function () {
try {
a || null == i.return || i.return();
} finally {
if (o) throw s;
}
},
};
}
function is(t, e) {
(null == e || e > t.length) && (e = t.length);
for (var i = 0, n = new Array(e); i < e; i++) n[i] = t[i];
return n;
}
function ns(t, e) {
for (var i = 0; i < e.length; i++) {
var n = e[i];
(n.enumerable = n.enumerable || !1),
(n.configurable = !0),
"value" in n && (n.writable = !0),
Object.defineProperty(t, n.key, n);
}
}
Kr.use([ts]);
var rs = (function () {
function t() {
!(function (t, e) {
if (!(t instanceof e))
throw new TypeError("Cannot call a class as a function");
})(this, t),
(this.swiperfull = document.querySelectorAll(".js_nav-swiper--full")),
this.init();
}
var e, i, n;
return (
(e = t),
(i = [
{
key: "init",
value: function () {
var t,
e = es(this.swiperfull);
try {
for (e.s(); !(t = e.n()).done; ) {
var i = t.value,
n = i.getAttribute("data-buttonId"),
r =
i.querySelector(".js_prev") ||
document.querySelector(".js_prev" + n),
s =
i.querySelector(".js_next") ||
document.querySelector(".js_next" + n);
new Kr(i, { loop: !0, navigation: { nextEl: s, prevEl: r } });
}
} catch (t) {
e.e(t);
} finally {
e.f();
}
},
},
]) && ns(e.prototype, i),
n && ns(e, n),
t
);
})();
function ss(t, e) {
var i;
if ("undefined" == typeof Symbol || null == t[Symbol.iterator]) {
if (
Array.isArray(t) ||
(i = (function (t, e) {
if (!t) return;
if ("string" == typeof t) return as(t, e);
var i = Object.prototype.toString.call(t).slice(8, -1);
"Object" === i && t.constructor && (i = t.constructor.name);
if ("Map" === i || "Set" === i) return Array.from(t);
if (
"Arguments" === i ||
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)
)
return as(t, e);
})(t)) ||
(e && t && "number" == typeof t.length)
) {
i && (t = i);
var n = 0,
r = function () {};
return {
s: r,
n: function () {
return n >= t.length ? { done: !0 } : { done: !1, value: t[n++] };
},
e: function (t) {
throw t;
},
f: r,
};
}
throw new TypeError(
"Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
}
var s,
a = !0,
o = !1;
return {
s: function () {
i = t[Symbol.iterator]();
},
n: function () {
var t = i.next();
return (a = t.done), t;
},
e: function (t) {
(o = !0), (s = t);
},
f: function () {
try {
a || null == i.return || i.return();
} finally {
if (o) throw s;
}
},
};
}
function as(t, e) {
(null == e || e > t.length) && (e = t.length);
for (var i = 0, n = new Array(e); i < e; i++) n[i] = t[i];
return n;
}
function os(t, e) {
for (var i = 0; i < e.length; i++) {
var n = e[i];
(n.enumerable = n.enumerable || !1),
(n.configurable = !0),
"value" in n && (n.writable = !0),
Object.defineProperty(t, n.key, n);
}
}
var ls = (function () {
function t() {
!(function (t, e) {
if (!(t instanceof e))
throw new TypeError("Cannot call a class as a function");
})(this, t),
(this.packageModalTriggers = document.querySelectorAll(
".js_package-trigger"
)),
(this.closeModalTriggers =
document.querySelectorAll(".js_close-modal")),
(this.packageModal = document.querySelector(".js_package-modal")),
(this.packageModalInner = document.querySelector(
".js_package-modal-inner"
)),
(this.packageModals = document.querySelectorAll(".js_modals")),
(this.modalTL = qn.timeline({ paused: !0 })),
this.init();
}
var e, i, r;
return (
(e = t),
(i = [
{
key: "init",
value: function () {
var t = this;
this.setModalAnim();
var e,
i = ss(this.closeModalTriggers);
try {
for (i.s(); !(e = i.n()).done; )
e.value.addEventListener("click", function () {
t.modalTL.reverse();
var e,
i = ss(t.packageModals);
try {
for (i.s(); !(e = i.n()).done; )
e.value.style.opacity = "0";
} catch (t) {
i.e(t);
} finally {
i.f();
}
});
} catch (t) {
i.e(t);
} finally {
i.f();
}
var r,
s = ss(this.packageModalTriggers);
try {
var a = function () {
var e = r.value;
e.addEventListener("click", function () {
var i = n.a.getData(e, "package");
t.showPackageModal(i);
});
};
for (s.s(); !(r = s.n()).done; ) a();
} catch (t) {
s.e(t);
} finally {
s.f();
}
},
},
{
key: "showPackageModal",
value: function (t) {
n.a.addClass(this.packageModal, "open-quote-modal"),
(document.querySelector(".js_modal-" + t).style.opacity = "1"),
this.modalTL.play(0);
},
},
{
key: "setModalAnim",
value: function () {
var t = this;
this.modalTL.to(
this.packageModal,
{
opacity: 1,
duration: 0.4,
ease: "Power0.out",
onReverseComplete: function () {
n.a.removeClass(t.packageModal, "open-quote-modal");
},
},
0
),
this.modalTL.to(
this.packageModalInner,
{ opacity: 1, duration: 0.3, ease: "Power0.out" },
0.4
);
},
},
]) && os(e.prototype, i),
r && os(e, r),
t
);
})();
n.a.ready(function () {
new o(),
new c(),
document.querySelector(".instant-quote") && new nr(),
new rs(),
new ls(),
i(73),
window.cookieconsent.initialise({
palette: {
popup: { background: "#252525", text: "#ffffff" },
button: { background: "#ef7e23", text: "#ffffff" },
},
content: { href: "/privacy-policy" },
});
});
},
134: function (t, e) {},
71: function (t, e, i) {
i(114), (t.exports = i(134));
},
72: function (t, e, i) {
!(function (e, i) {
var n = (function (t, e) {
"use strict";
if (!e.getElementsByClassName) return;
var i,
n,
r = e.documentElement,
s = t.Date,
a = t.HTMLPictureElement,
o = t.addEventListener,
l = t.setTimeout,
u = t.requestAnimationFrame || l,
h = t.requestIdleCallback,
c = /^picture$/i,
d = ["load", "error", "lazyincluded", "_lazyloaded"],
p = {},
f = Array.prototype.forEach,
v = function (t, e) {
return (
p[e] || (p[e] = new RegExp("(\\s|^)" + e + "(\\s|$)")),
p[e].test(t.getAttribute("class") || "") && p[e]
);
},
m = function (t, e) {
v(t, e) ||
t.setAttribute(
"class",
(t.getAttribute("class") || "").trim() + " " + e
);
},
g = function (t, e) {
var i;
(i = v(t, e)) &&
t.setAttribute(
"class",
(t.getAttribute("class") || "").replace(i, " ")
);
},
y = function (t, e, i) {
var n = i ? "addEventListener" : "removeEventListener";
i && y(t, e),
d.forEach(function (i) {
t[n](i, e);
});
},
b = function (t, n, r, s, a) {
var o = e.createEvent("Event");
return (
r || (r = {}),
(r.instance = i),
o.initEvent(n, !s, !a),
(o.detail = r),
t.dispatchEvent(o),
o
);
},
_ = function (e, i) {
var r;
!a && (r = t.picturefill || n.pf)
? (i &&
i.src &&
!e.getAttribute("srcset") &&
e.setAttribute("srcset", i.src),
r({ reevaluate: !0, elements: [e] }))
: i && i.src && (e.src = i.src);
},
w = function (t, e) {
return (getComputedStyle(t, null) || {})[e];
},
T = function (t, e, i) {
for (
i = i || t.offsetWidth;
i < n.minSize && e && !t._lazysizesWidth;
)
(i = e.offsetWidth), (e = e.parentNode);
return i;
},
S =
((M = []),
(O = []),
(A = M),
(P = function () {
var t = A;
for (A = M.length ? O : M, k = !0, E = !1; t.length; )
t.shift()();
k = !1;
}),
(L = function (t, i) {
k && !i
? t.apply(this, arguments)
: (A.push(t), E || ((E = !0), (e.hidden ? l : u)(P)));
}),
(L._lsFlush = P),
L),
C = function (t, e) {
return e
? function () {
S(t);
}
: function () {
var e = this,
i = arguments;
S(function () {
t.apply(e, i);
});
};
},
x = function (t) {
var e,
i,
n = function () {
(e = null), t();
},
r = function () {
var t = s.now() - i;
t < 99 ? l(r, 99 - t) : (h || n)(n);
};
return function () {
(i = s.now()), e || (e = l(r, 99));
};
};
var k, E, M, O, A, P, L;
!(function () {
var e,
i = {
lazyClass: "lazyload",
loadedClass: "lazyloaded",
loadingClass: "lazyloading",
preloadClass: "lazypreload",
errorClass: "lazyerror",
autosizesClass: "lazyautosizes",
srcAttr: "data-src",
srcsetAttr: "data-srcset",
sizesAttr: "data-sizes",
minSize: 40,
customMedia: {},
init: !0,
expFactor: 1.5,
hFac: 0.8,
loadMode: 2,
loadHidden: !0,
ricTimeout: 0,
throttleDelay: 125,
};
for (e in ((n = t.lazySizesConfig || t.lazysizesConfig || {}), i))
e in n || (n[e] = i[e]);
(t.lazySizesConfig = n),
l(function () {
n.init && F();
});
})();
var D =
((Z = /^img$/i),
(J = /^iframe$/i),
(tt = "onscroll" in t && !/(gle|ing)bot/.test(navigator.userAgent)),
(et = 0),
(it = 0),
(nt = -1),
(rt = function (t) {
it--, (!t || it < 0 || !t.target) && (it = 0);
}),
(st = function (t) {
return (
null == K && (K = "hidden" == w(e.body, "visibility")),
K ||
("hidden" != w(t.parentNode, "visibility") &&
"hidden" != w(t, "visibility"))
);
}),
(at = function (t, i) {
var n,
s = t,
a = st(t);
for (
Y -= i, Q += i, X -= i, U += i;
a && (s = s.offsetParent) && s != e.body && s != r;
)
(a = (w(s, "opacity") || 1) > 0) &&
"visible" != w(s, "overflow") &&
((n = s.getBoundingClientRect()),
(a =
U > n.left &&
X < n.right &&
Q > n.top - 1 &&
Y < n.bottom + 1));
return a;
}),
(ot = function () {
var t,
s,
a,
o,
l,
u,
h,
c,
d,
p,
f,
v,
m = i.elements;
if ((H = n.loadMode) && it < 8 && (t = m.length)) {
for (
s = 0,
nt++,
p =
!n.expand || n.expand < 1
? r.clientHeight > 500 && r.clientWidth > 500
? 500
: 370
: n.expand,
i._defEx = p,
f = p * n.expFactor,
v = n.hFac,
K = null,
et < f && it < 1 && nt > 2 && H > 2 && !e.hidden
? ((et = f), (nt = 0))
: (et = H > 1 && nt > 1 && it < 6 ? p : 0);
s < t;
s++
)
if (m[s] && !m[s]._lazyRace)
if (tt)
if (
(((c = m[s].getAttribute("data-expand")) &&
(u = 1 * c)) ||
(u = et),
d !== u &&
(($ = innerWidth + u * v),
(W = innerHeight + u),
(h = -1 * u),
(d = u)),
(a = m[s].getBoundingClientRect()),
(Q = a.bottom) >= h &&
(Y = a.top) <= W &&
(U = a.right) >= h * v &&
(X = a.left) <= $ &&
(Q || U || X || Y) &&
(n.loadHidden || st(m[s])) &&
((V && it < 3 && !c && (H < 3 || nt < 4)) ||
at(m[s], u)))
) {
if ((ft(m[s]), (l = !0), it > 9)) break;
} else
!l &&
V &&
!o &&
it < 4 &&
nt < 4 &&
H > 2 &&
(N[0] || n.preloadAfterLoad) &&
(N[0] ||
(!c &&
(Q ||
U ||
X ||
Y ||
"auto" != m[s].getAttribute(n.sizesAttr)))) &&
(o = N[0] || m[s]);
else ft(m[s]);
o && !l && ft(o);
}
}),
(lt = (function (t) {
var e,
i = 0,
r = n.throttleDelay,
a = n.ricTimeout,
o = function () {
(e = !1), (i = s.now()), t();
},
u =
h && a > 49
? function () {
h(o, { timeout: a }),
a !== n.ricTimeout && (a = n.ricTimeout);
}
: C(function () {
l(o);
}, !0);
return function (t) {
var n;
(t = !0 === t) && (a = 33),
e ||
((e = !0),
(n = r - (s.now() - i)) < 0 && (n = 0),
t || n < 9 ? u() : l(u, n));
};
})(ot)),
(ut = function (t) {
var e = t.target;
e._lazyCache
? delete e._lazyCache
: (rt(t),
m(e, n.loadedClass),
g(e, n.loadingClass),
y(e, ct),
b(e, "lazyloaded"));
}),
(ht = C(ut)),
(ct = function (t) {
ht({ target: t.target });
}),
(dt = function (t) {
var e,
i = t.getAttribute(n.srcsetAttr);
(e =
n.customMedia[
t.getAttribute("data-media") || t.getAttribute("media")
]) && t.setAttribute("media", e),
i && t.setAttribute("srcset", i);
}),
(pt = C(function (t, e, i, r, s) {
var a, o, u, h, d, p;
(d = b(t, "lazybeforeunveil", e)).defaultPrevented ||
(r && (i ? m(t, n.autosizesClass) : t.setAttribute("sizes", r)),
(o = t.getAttribute(n.srcsetAttr)),
(a = t.getAttribute(n.srcAttr)),
s && (h = (u = t.parentNode) && c.test(u.nodeName || "")),
(p = e.firesLoad || ("src" in t && (o || a || h))),
(d = { target: t }),
m(t, n.loadingClass),
p && (clearTimeout(R), (R = l(rt, 2500)), y(t, ct, !0)),
h && f.call(u.getElementsByTagName("source"), dt),
o
? t.setAttribute("srcset", o)
: a &&
!h &&
(J.test(t.nodeName)
? (function (t, e) {
try {
t.contentWindow.location.replace(e);
} catch (i) {
t.src = e;
}
})(t, a)
: (t.src = a)),
s && (o || h) && _(t, { src: a })),
t._lazyRace && delete t._lazyRace,
g(t, n.lazyClass),
S(function () {
var e = t.complete && t.naturalWidth > 1;
(p && !e) ||
(e && m(t, "ls-is-cached"),
ut(d),
(t._lazyCache = !0),
l(function () {
"_lazyCache" in t && delete t._lazyCache;
}, 9));
}, !0);
})),
(ft = function (t) {
var e,
i = Z.test(t.nodeName),
r =
i && (t.getAttribute(n.sizesAttr) || t.getAttribute("sizes")),
s = "auto" == r;
((!s && V) ||
!i ||
(!t.getAttribute("src") && !t.srcset) ||
t.complete ||
v(t, n.errorClass) ||
!v(t, n.lazyClass)) &&
((e = b(t, "lazyunveilread").detail),
s && z.updateElem(t, !0, t.offsetWidth),
(t._lazyRace = !0),
it++,
pt(t, e, s, r, i));
}),
(vt = function () {
if (!V)
if (s.now() - G < 999) l(vt, 999);
else {
var t = x(function () {
(n.loadMode = 3), lt();
});
(V = !0),
(n.loadMode = 3),
lt(),
o(
"scroll",
function () {
3 == n.loadMode && (n.loadMode = 2), t();
},
!0
);
}
}),
{
_: function () {
(G = s.now()),
(i.elements = e.getElementsByClassName(n.lazyClass)),
(N = e.getElementsByClassName(
n.lazyClass + " " + n.preloadClass
)),
o("scroll", lt, !0),
o("resize", lt, !0),
t.MutationObserver
? new MutationObserver(lt).observe(r, {
childList: !0,
subtree: !0,
attributes: !0,
})
: (r.addEventListener("DOMNodeInserted", lt, !0),
r.addEventListener("DOMAttrModified", lt, !0),
setInterval(lt, 999)),
o("hashchange", lt, !0),
[
"focus",
"mouseover",
"click",
"load",
"transitionend",
"animationend",
"webkitAnimationEnd",
].forEach(function (t) {
e.addEventListener(t, lt, !0);
}),
/d$|^c/.test(e.readyState)
? vt()
: (o("load", vt),
e.addEventListener("DOMContentLoaded", lt),
l(vt, 2e4)),
i.elements.length ? (ot(), S._lsFlush()) : lt();
},
checkElems: lt,
unveil: ft,
}),
z =
((j = C(function (t, e, i, n) {
var r, s, a;
if (
((t._lazysizesWidth = n),
(n += "px"),
t.setAttribute("sizes", n),
c.test(e.nodeName || ""))
)
for (
s = 0, a = (r = e.getElementsByTagName("source")).length;
s < a;
s++
)
r[s].setAttribute("sizes", n);
i.detail.dataAttr || _(t, i.detail);
})),
(B = function (t, e, i) {
var n,
r = t.parentNode;
r &&
((i = T(t, r, i)),
(n = b(t, "lazybeforesizes", { width: i, dataAttr: !!e }))
.defaultPrevented ||
((i = n.detail.width) &&
i !== t._lazysizesWidth &&
j(t, r, n, i)));
}),
(I = x(function () {
var t,
e = q.length;
if (e) for (t = 0; t < e; t++) B(q[t]);
})),
{
_: function () {
(q = e.getElementsByClassName(n.autosizesClass)),
o("resize", I);
},
checkElems: I,
updateElem: B,
}),
F = function () {
F.i || ((F.i = !0), z._(), D._());
};
var q, j, B, I;
var N,
V,
R,
H,
G,
$,
W,
Y,
X,
U,
Q,
K,
Z,
J,
tt,
et,
it,
nt,
rt,
st,
at,
ot,
lt,
ut,
ht,
ct,
dt,
pt,
ft,
vt;
return (i = {
cfg: n,
autoSizer: z,
loader: D,
init: F,
uP: _,
aC: m,
rC: g,
hC: v,
fire: b,
gW: T,
rAF: S,
});
})(e, e.document);
(e.lazySizes = n), t.exports && (t.exports = n);
})(window);
},
73: function (t, e, i) {
"use strict";
i.r(e);
var n = i(0);
function r(t, e) {
var i;
if ("undefined" == typeof Symbol || null == t[Symbol.iterator]) {
if (
Array.isArray(t) ||
(i = (function (t, e) {
if (!t) return;
if ("string" == typeof t) return s(t, e);
var i = Object.prototype.toString.call(t).slice(8, -1);
"Object" === i && t.constructor && (i = t.constructor.name);
if ("Map" === i || "Set" === i) return Array.from(t);
if (
"Arguments" === i ||
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)
)
return s(t, e);
})(t)) ||
(e && t && "number" == typeof t.length)
) {
i && (t = i);
var n = 0,
r = function () {};
return {
s: r,
n: function () {
return n >= t.length ? { done: !0 } : { done: !1, value: t[n++] };
},
e: function (t) {
throw t;
},
f: r,
};
}
throw new TypeError(
"Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
}
var a,
o = !0,
l = !1;
return {
s: function () {
i = t[Symbol.iterator]();
},
n: function () {
var t = i.next();
return (o = t.done), t;
},
e: function (t) {
(l = !0), (a = t);
},
f: function () {
try {
o || null == i.return || i.return();
} finally {
if (l) throw a;
}
},
};
}
function s(t, e) {
(null == e || e > t.length) && (e = t.length);
for (var i = 0, n = new Array(e); i < e; i++) n[i] = t[i];
return n;
}
var a,
o = r(n.a.getAll(".js_accordion-toggle"));
try {
var l = function () {
var t = a.value;
t.addEventListener("click", function (e) {
var i = n.a.getData(t, "id"),
s = n.a.getOne(i);
if (s) {
var a,
o = r(n.a.getAll(".accordion-content.active"));
try {
for (o.s(); !(a = o.n()).done; ) {
var l = a.value;
l != s && n.a.removeClass(l, "active");
}
} catch (t) {
o.e(t);
} finally {
o.f();
}
n.a.toggleClass(s, "active");
} else console.warn("Tried to toggle accordian ".concat(i, ", but couldn't find a matching element."));
});
};
for (o.s(); !(a = o.n()).done; ) l();
} catch (t) {
o.e(t);
} finally {
o.f();
}
},
});