|
@@ -29,57 +29,57 @@
|
|
DESTROYED
|
|
DESTROYED
|
|
};
|
|
};
|
|
|
|
|
|
- function x(n) {
|
|
|
|
|
|
+ function N(n) {
|
|
n.length = 0;
|
|
n.length = 0;
|
|
}
|
|
}
|
|
- const D = Array.prototype;
|
|
|
|
- function m(n, t, e) {
|
|
|
|
- return D.slice.call(n, t, e);
|
|
|
|
- }
|
|
|
|
- function a(n) {
|
|
|
|
- return n.bind(null, ...m(arguments, 1));
|
|
|
|
|
|
+ function a(n, ...t) {
|
|
|
|
+ return n.bind(null, ...t);
|
|
}
|
|
}
|
|
- const an = setTimeout, ln = () => {
|
|
|
|
|
|
+ const dn = setTimeout, an = () => {
|
|
};
|
|
};
|
|
function P(n) {
|
|
function P(n) {
|
|
return requestAnimationFrame(n);
|
|
return requestAnimationFrame(n);
|
|
}
|
|
}
|
|
- function p(n, t) {
|
|
|
|
|
|
+ function m(n, t) {
|
|
return typeof t === n;
|
|
return typeof t === n;
|
|
}
|
|
}
|
|
- function g(n) {
|
|
|
|
- return !q(n) && p("object", n);
|
|
|
|
|
|
+ function y(n) {
|
|
|
|
+ return !S(n) && m("object", n);
|
|
}
|
|
}
|
|
- const $ = Array.isArray, mn = a(p, "function"), h = a(p, "string"); a(p, "boolean"); const Z = a(p, "undefined");
|
|
|
|
- function q(n) {
|
|
|
|
|
|
+ const g = Array.isArray, ln = a(m, "function"), p = a(m, "string"); a(m, "boolean"); const Z = a(m, "undefined");
|
|
|
|
+ function S(n) {
|
|
return n === null;
|
|
return n === null;
|
|
}
|
|
}
|
|
- function F(n) {
|
|
|
|
|
|
+ function x(n) {
|
|
try {
|
|
try {
|
|
return n instanceof (n.ownerDocument.defaultView || window).HTMLElement;
|
|
return n instanceof (n.ownerDocument.defaultView || window).HTMLElement;
|
|
} catch {
|
|
} catch {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- function L(n) {
|
|
|
|
- return $(n) ? n : [n];
|
|
|
|
|
|
+ function q(n) {
|
|
|
|
+ return g(n) ? n : [n];
|
|
}
|
|
}
|
|
function d(n, t) {
|
|
function d(n, t) {
|
|
- L(n).forEach(t);
|
|
|
|
|
|
+ q(n).forEach(t);
|
|
}
|
|
}
|
|
function G(n, t) {
|
|
function G(n, t) {
|
|
return n.includes(t);
|
|
return n.includes(t);
|
|
}
|
|
}
|
|
- function hn(n, t) {
|
|
|
|
- return n.push(...L(t)), n;
|
|
|
|
|
|
+ function pn(n, t) {
|
|
|
|
+ return n.push(...q(t)), n;
|
|
|
|
+ }
|
|
|
|
+ const D = Array.prototype;
|
|
|
|
+ function F(n, t, e) {
|
|
|
|
+ return D.slice.call(n, t, e);
|
|
}
|
|
}
|
|
function I(n, t, e) {
|
|
function I(n, t, e) {
|
|
- n && d(t, (i) => {
|
|
|
|
- i && n.classList[e ? "add" : "remove"](i);
|
|
|
|
|
|
+ n && d(p(t) ? t.split(" ") : t, (i) => {
|
|
|
|
+ i && n.classList.toggle(i, e);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
function J(n, t) {
|
|
function J(n, t) {
|
|
- I(n, h(t) ? t.split(" ") : t, true);
|
|
|
|
|
|
+ I(n, t, true);
|
|
}
|
|
}
|
|
function Q(n, t) {
|
|
function Q(n, t) {
|
|
d(t, n.appendChild.bind(n));
|
|
d(t, n.appendChild.bind(n));
|
|
@@ -91,37 +91,37 @@
|
|
});
|
|
});
|
|
}
|
|
}
|
|
function W(n, t) {
|
|
function W(n, t) {
|
|
- return F(n) && n.matches(t);
|
|
|
|
|
|
+ return x(n) && n.matches(t);
|
|
}
|
|
}
|
|
function X(n, t) {
|
|
function X(n, t) {
|
|
- const e = n ? m(n.children) : [];
|
|
|
|
|
|
+ const e = n ? F(n.children) : [];
|
|
return t ? e.filter((i) => W(i, t)) : e;
|
|
return t ? e.filter((i) => W(i, t)) : e;
|
|
}
|
|
}
|
|
function Y(n, t) {
|
|
function Y(n, t) {
|
|
return t ? X(n, t)[0] : n.firstElementChild;
|
|
return t ? X(n, t)[0] : n.firstElementChild;
|
|
}
|
|
}
|
|
- function gn(n, t) {
|
|
|
|
|
|
+ function En(n, t) {
|
|
return n.closest(t);
|
|
return n.closest(t);
|
|
}
|
|
}
|
|
- const b = Object.assign, A = Object.keys;
|
|
|
|
- function O(n, t, e) {
|
|
|
|
|
|
+ const v = Object.assign, A = Object.keys;
|
|
|
|
+ function L(n, t, e) {
|
|
return n && (e ? A(n).reverse() : A(n)).forEach((i) => {
|
|
return n && (e ? A(n).reverse() : A(n)).forEach((i) => {
|
|
i !== "__proto__" && t(n[i], i);
|
|
i !== "__proto__" && t(n[i], i);
|
|
}), n;
|
|
}), n;
|
|
}
|
|
}
|
|
- function U(n) {
|
|
|
|
- return m(arguments, 1).forEach((t) => {
|
|
|
|
- O(t, (e, i) => {
|
|
|
|
- $(e) ? n[i] = e.slice() : g(e) ? n[i] = U({}, g(n[i]) ? n[i] : {}, e) : n[i] = e;
|
|
|
|
|
|
+ function k(n, ...t) {
|
|
|
|
+ return t.forEach((e) => {
|
|
|
|
+ L(e, (i, r) => {
|
|
|
|
+ g(i) ? i = i.slice() : y(i) && (i = k({}, y(n[r]) ? n[r] : {}, i)), n[r] = i;
|
|
});
|
|
});
|
|
}), n;
|
|
}), n;
|
|
}
|
|
}
|
|
- function En(n, t) {
|
|
|
|
|
|
+ function gn(n, t) {
|
|
return d(t || A(n), (e) => {
|
|
return d(t || A(n), (e) => {
|
|
delete n[e];
|
|
delete n[e];
|
|
}), n;
|
|
}), n;
|
|
}
|
|
}
|
|
- function k(n, t) {
|
|
|
|
|
|
+ function U(n, t) {
|
|
d(n, (e) => {
|
|
d(n, (e) => {
|
|
d(t, (i) => {
|
|
d(t, (i) => {
|
|
e && e.removeAttribute(i);
|
|
e && e.removeAttribute(i);
|
|
@@ -129,26 +129,26 @@
|
|
});
|
|
});
|
|
}
|
|
}
|
|
function M(n, t, e) {
|
|
function M(n, t, e) {
|
|
- g(t) ? O(t, (i, r) => {
|
|
|
|
|
|
+ y(t) ? L(t, (i, r) => {
|
|
M(n, r, i);
|
|
M(n, r, i);
|
|
}) : d(n, (i) => {
|
|
}) : d(n, (i) => {
|
|
- q(e) || e === "" ? k(i, t) : i.setAttribute(t, String(e));
|
|
|
|
|
|
+ S(e) || e === "" ? U(i, t) : i.setAttribute(t, String(e));
|
|
});
|
|
});
|
|
}
|
|
}
|
|
function j(n, t, e) {
|
|
function j(n, t, e) {
|
|
const i = document.createElement(n);
|
|
const i = document.createElement(n);
|
|
- return t && (h(t) ? J(i, t) : M(i, t)), e && Q(e, i), i;
|
|
|
|
|
|
+ return t && (p(t) ? J(i, t) : M(i, t)), e && Q(e, i), i;
|
|
}
|
|
}
|
|
function nn(n, t, e) {
|
|
function nn(n, t, e) {
|
|
if (Z(e))
|
|
if (Z(e))
|
|
return getComputedStyle(n)[t];
|
|
return getComputedStyle(n)[t];
|
|
- q(e) || (n.style[t] = `${e}`);
|
|
|
|
|
|
+ S(e) || (n.style[t] = `${e}`);
|
|
}
|
|
}
|
|
- function $n(n, t) {
|
|
|
|
|
|
+ function An(n, t) {
|
|
nn(n, "display", t);
|
|
nn(n, "display", t);
|
|
}
|
|
}
|
|
- function An(n) {
|
|
|
|
- F(n) && n.focus({ preventScroll: true });
|
|
|
|
|
|
+ function $n(n) {
|
|
|
|
+ x(n) && n.focus({ preventScroll: true });
|
|
}
|
|
}
|
|
function wn(n, t) {
|
|
function wn(n, t) {
|
|
return n.getAttribute(t);
|
|
return n.getAttribute(t);
|
|
@@ -174,94 +174,94 @@
|
|
return n && n.querySelector(t);
|
|
return n && n.querySelector(t);
|
|
}
|
|
}
|
|
function Tn(n, t) {
|
|
function Tn(n, t) {
|
|
- return t && n ? m(n.querySelectorAll(t)) : [];
|
|
|
|
|
|
+ return t && n ? F(n.querySelectorAll(t)) : [];
|
|
}
|
|
}
|
|
- function Nn(n, t) {
|
|
|
|
|
|
+ function Pn(n, t) {
|
|
I(n, t, false);
|
|
I(n, t, false);
|
|
}
|
|
}
|
|
- function Pn(n) {
|
|
|
|
|
|
+ function Bn(n) {
|
|
return n.timeStamp;
|
|
return n.timeStamp;
|
|
}
|
|
}
|
|
- function Bn(n) {
|
|
|
|
- return h(n) ? n : n ? `${n}px` : "";
|
|
|
|
|
|
+ function Nn(n) {
|
|
|
|
+ return p(n) ? n : n ? `${n}px` : "";
|
|
}
|
|
}
|
|
function rn(n) {
|
|
function rn(n) {
|
|
let t = "";
|
|
let t = "";
|
|
- return O(n, (e, i) => {
|
|
|
|
|
|
+ return L(n, (e, i) => {
|
|
t += e || e === 0 ? ` ${i}${e !== true ? `="${e}"` : ""}` : "";
|
|
t += e || e === 0 ? ` ${i}${e !== true ? `="${e}"` : ""}` : "";
|
|
}), t.trim();
|
|
}), t.trim();
|
|
}
|
|
}
|
|
- function _() {
|
|
|
|
- return m(arguments).reduce((n, t) => `${n} ${$(t) ? _(...t) : t || ""}`.trim(), "");
|
|
|
|
|
|
+ function _(...n) {
|
|
|
|
+ return n.reduce((t, e) => `${t} ${g(e) ? _(...e) : e || ""}`.trim(), "");
|
|
}
|
|
}
|
|
function on(n, t) {
|
|
function on(n, t) {
|
|
- return t = $(t) || !g(t) ? { class: _(t) } : t, `<${`${n} ${t ? rn(t) : ""}`.trim()}>`;
|
|
|
|
|
|
+ return t = g(t) || !y(t) ? { class: _(t) } : t, `<${`${n} ${t ? rn(t) : ""}`.trim()}>`;
|
|
}
|
|
}
|
|
- a(on, "div"); const { min: E, max: w, floor: Dn, ceil: Fn, abs: un, sign: In } = Math;
|
|
|
|
|
|
+ a(on, "div"); const { min: E, max: $, floor: Dn, ceil: Fn, abs: un, sign: In } = Math;
|
|
function Mn(n, t, e) {
|
|
function Mn(n, t, e) {
|
|
return un(n - t) < e;
|
|
return un(n - t) < e;
|
|
}
|
|
}
|
|
function _n(n, t, e, i) {
|
|
function _n(n, t, e, i) {
|
|
- const r = E(t, e), o = w(t, e);
|
|
|
|
|
|
+ const r = E(t, e), o = $(t, e);
|
|
return i ? r < n && n < o : r <= n && n <= o;
|
|
return i ? r < n && n < o : r <= n && n <= o;
|
|
}
|
|
}
|
|
- function Hn(n, t, e) {
|
|
|
|
- const i = E(t, e), r = w(t, e);
|
|
|
|
- return E(w(i, n), r);
|
|
|
|
|
|
+ function bn(n, t, e) {
|
|
|
|
+ const i = E(t, e), r = $(t, e);
|
|
|
|
+ return E($(i, n), r);
|
|
}
|
|
}
|
|
function Kn(n, t) {
|
|
function Kn(n, t) {
|
|
return d(t, (e) => {
|
|
return d(t, (e) => {
|
|
n = n.replace("%s", `${e}`);
|
|
n = n.replace("%s", `${e}`);
|
|
}), n;
|
|
}), n;
|
|
}
|
|
}
|
|
- function cn(n) {
|
|
|
|
- return n < 10 ? `0${n}` : `${n}`;
|
|
|
|
|
|
+ function cn(n, t = 2) {
|
|
|
|
+ return `${n}`.padStart(t, "0");
|
|
}
|
|
}
|
|
const B = {};
|
|
const B = {};
|
|
function zn(n) {
|
|
function zn(n) {
|
|
return `${n}${cn(B[n] = (B[n] || 0) + 1)}`;
|
|
return `${n}${cn(B[n] = (B[n] || 0) + 1)}`;
|
|
}
|
|
}
|
|
- function C(n, t) {
|
|
|
|
|
|
+ function w(n, t) {
|
|
d(n, (e) => {
|
|
d(n, (e) => {
|
|
- h(e) && e.split(" ").forEach(t);
|
|
|
|
|
|
+ p(e) && e.split(" ").forEach(t);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- function S(n, t) {
|
|
|
|
|
|
+ function C(n, t) {
|
|
const e = [];
|
|
const e = [];
|
|
for (let i = n.length - 1; i >= 0; i--)
|
|
for (let i = n.length - 1; i >= 0; i--)
|
|
t(n[i]) && e.push(...n.splice(i, 1));
|
|
t(n[i]) && e.push(...n.splice(i, 1));
|
|
return e;
|
|
return e;
|
|
}
|
|
}
|
|
- function H(n) {
|
|
|
|
|
|
+ function b(n) {
|
|
const t = n || [], e = n ? {} : void 0;
|
|
const t = n || [], e = n ? {} : void 0;
|
|
function i(o, f, u, c) {
|
|
function i(o, f, u, c) {
|
|
- C(f, (s) => {
|
|
|
|
|
|
+ w(f, (s) => {
|
|
o.addEventListener(s, u, c), t.push([o.removeEventListener.bind(o, s, u, c), e]);
|
|
o.addEventListener(s, u, c), t.push([o.removeEventListener.bind(o, s, u, c), e]);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
function r() {
|
|
function r() {
|
|
- e ? S(t, (o) => o[1] === e).forEach((o) => {
|
|
|
|
|
|
+ e ? C(t, (o) => o[1] === e).forEach((o) => {
|
|
o[0]();
|
|
o[0]();
|
|
}) : (t.forEach((o) => {
|
|
}) : (t.forEach((o) => {
|
|
o[0]();
|
|
o[0]();
|
|
- }), x(t));
|
|
|
|
|
|
+ }), N(t));
|
|
}
|
|
}
|
|
return {
|
|
return {
|
|
bind: i,
|
|
bind: i,
|
|
- create: a(H, t),
|
|
|
|
|
|
+ create: a(b, t),
|
|
destroy: r
|
|
destroy: r
|
|
};
|
|
};
|
|
}
|
|
}
|
|
- function v(n) {
|
|
|
|
|
|
+ function H(n) {
|
|
const t = n || [], e = n ? {} : void 0;
|
|
const t = n || [], e = n ? {} : void 0;
|
|
function i(u, c) {
|
|
function i(u, c) {
|
|
- C(u, (s) => {
|
|
|
|
|
|
+ w(u, (s) => {
|
|
t.push([s, c, e]);
|
|
t.push([s, c, e]);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
function r(u, c) {
|
|
function r(u, c) {
|
|
- C(u, (s) => {
|
|
|
|
- S(t, (l) => l[0] === s && (!c || l[1] === c) && l[2] === e);
|
|
|
|
|
|
+ w(u, (s) => {
|
|
|
|
+ C(t, (l) => l[0] === s && (!c || l[1] === c) && l[2] === e);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
function o(u, ...c) {
|
|
function o(u, ...c) {
|
|
@@ -270,24 +270,24 @@
|
|
});
|
|
});
|
|
}
|
|
}
|
|
function f() {
|
|
function f() {
|
|
- e ? S(t, (u) => u[2] === e) : x(t);
|
|
|
|
|
|
+ e ? C(t, (u) => u[2] === e) : N(t);
|
|
}
|
|
}
|
|
return {
|
|
return {
|
|
on: i,
|
|
on: i,
|
|
off: r,
|
|
off: r,
|
|
emit: o,
|
|
emit: o,
|
|
- create: a(v, t),
|
|
|
|
|
|
+ create: a(H, t),
|
|
destroy: f
|
|
destroy: f
|
|
};
|
|
};
|
|
}
|
|
}
|
|
- function fn(n = H(), t = v()) {
|
|
|
|
|
|
+ function fn(n = b(), t = H()) {
|
|
function e() {
|
|
function e() {
|
|
return fn(n.create(), t.create());
|
|
return fn(n.create(), t.create());
|
|
}
|
|
}
|
|
function i() {
|
|
function i() {
|
|
n.destroy(), t.destroy();
|
|
n.destroy(), t.destroy();
|
|
}
|
|
}
|
|
- return b({}, n, t, { create: e, destroy: i });
|
|
|
|
|
|
+ return v({}, n, t, { create: e, destroy: i });
|
|
}
|
|
}
|
|
function sn(n, t, e, i) {
|
|
function sn(n, t, e, i) {
|
|
const { now: r } = Date;
|
|
const { now: r } = Date;
|
|
@@ -295,24 +295,24 @@
|
|
function l() {
|
|
function l() {
|
|
if (!c) {
|
|
if (!c) {
|
|
if (f = n ? E((r() - o) / n, 1) : 1, e && e(f), f >= 1 && (t(), o = r(), i && ++s >= i))
|
|
if (f = n ? E((r() - o) / n, 1) : 1, e && e(f), f >= 1 && (t(), o = r(), i && ++s >= i))
|
|
- return T();
|
|
|
|
|
|
+ return O();
|
|
u = P(l);
|
|
u = P(l);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- function K(y) {
|
|
|
|
- y || N(), o = r() - (y ? f * n : 0), c = false, u = P(l);
|
|
|
|
|
|
+ function K(h) {
|
|
|
|
+ h || T(), o = r() - (h ? f * n : 0), c = false, u = P(l);
|
|
}
|
|
}
|
|
- function T() {
|
|
|
|
|
|
+ function O() {
|
|
c = true;
|
|
c = true;
|
|
}
|
|
}
|
|
function z() {
|
|
function z() {
|
|
o = r(), f = 0, e && e(f);
|
|
o = r(), f = 0, e && e(f);
|
|
}
|
|
}
|
|
- function N() {
|
|
|
|
|
|
+ function T() {
|
|
u && cancelAnimationFrame(u), f = 0, u = 0, c = true;
|
|
u && cancelAnimationFrame(u), f = 0, u = 0, c = true;
|
|
}
|
|
}
|
|
- function R(y) {
|
|
|
|
- n = y;
|
|
|
|
|
|
+ function R(h) {
|
|
|
|
+ n = h;
|
|
}
|
|
}
|
|
function V() {
|
|
function V() {
|
|
return c;
|
|
return c;
|
|
@@ -320,8 +320,8 @@
|
|
return {
|
|
return {
|
|
start: K,
|
|
start: K,
|
|
rewind: z,
|
|
rewind: z,
|
|
- pause: T,
|
|
|
|
- cancel: N,
|
|
|
|
|
|
+ pause: O,
|
|
|
|
+ cancel: T,
|
|
set: R,
|
|
set: R,
|
|
isPaused: V
|
|
isPaused: V
|
|
};
|
|
};
|
|
@@ -332,7 +332,7 @@
|
|
t = r;
|
|
t = r;
|
|
}
|
|
}
|
|
function i(r) {
|
|
function i(r) {
|
|
- return G(L(r), t);
|
|
|
|
|
|
+ return G(q(r), t);
|
|
}
|
|
}
|
|
return { set: e, is: i };
|
|
return { set: e, is: i };
|
|
}
|
|
}
|
|
@@ -380,7 +380,7 @@
|
|
const { state } = Splide2;
|
|
const { state } = Splide2;
|
|
const breakpoints = options.breakpoints || {};
|
|
const breakpoints = options.breakpoints || {};
|
|
const reducedMotion = options.reducedMotion || {};
|
|
const reducedMotion = options.reducedMotion || {};
|
|
- const binder = H();
|
|
|
|
|
|
+ const binder = b();
|
|
const queries = [];
|
|
const queries = [];
|
|
function setup() {
|
|
function setup() {
|
|
const isMin = options.mediaQuery === "min";
|
|
const isMin = options.mediaQuery === "min";
|
|
@@ -404,9 +404,9 @@
|
|
const destroyed = state.is(DESTROYED);
|
|
const destroyed = state.is(DESTROYED);
|
|
const direction = options.direction;
|
|
const direction = options.direction;
|
|
const merged = queries.reduce((merged2, entry) => {
|
|
const merged = queries.reduce((merged2, entry) => {
|
|
- return U(merged2, entry[1].matches ? entry[0] : {});
|
|
|
|
|
|
+ return k(merged2, entry[1].matches ? entry[0] : {});
|
|
}, {});
|
|
}, {});
|
|
- En(options);
|
|
|
|
|
|
+ gn(options);
|
|
set(merged);
|
|
set(merged);
|
|
if (options.destroy) {
|
|
if (options.destroy) {
|
|
Splide2.destroy(options.destroy === "completely");
|
|
Splide2.destroy(options.destroy === "completely");
|
|
@@ -419,12 +419,12 @@
|
|
}
|
|
}
|
|
function reduce(enable) {
|
|
function reduce(enable) {
|
|
if (matchMedia(MEDIA_PREFERS_REDUCED_MOTION).matches) {
|
|
if (matchMedia(MEDIA_PREFERS_REDUCED_MOTION).matches) {
|
|
- enable ? U(options, reducedMotion) : En(options, A(reducedMotion));
|
|
|
|
|
|
+ enable ? k(options, reducedMotion) : gn(options, A(reducedMotion));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function set(opts, base, notify) {
|
|
function set(opts, base, notify) {
|
|
- U(options, opts);
|
|
|
|
- base && U(Object.getPrototypeOf(options), opts);
|
|
|
|
|
|
+ k(options, opts);
|
|
|
|
+ base && k(Object.getPrototypeOf(options), opts);
|
|
if (notify || !state.is(CREATED)) {
|
|
if (notify || !state.is(CREATED)) {
|
|
Splide2.emit(EVENT_UPDATED, options);
|
|
Splide2.emit(EVENT_UPDATED, options);
|
|
}
|
|
}
|
|
@@ -594,15 +594,15 @@
|
|
}
|
|
}
|
|
function destroy(completely) {
|
|
function destroy(completely) {
|
|
const attrs = ALL_ATTRIBUTES.concat("style");
|
|
const attrs = ALL_ATTRIBUTES.concat("style");
|
|
- x(slides);
|
|
|
|
- Nn(root, rootClasses);
|
|
|
|
- Nn(track, trackClasses);
|
|
|
|
- k([track, list], attrs);
|
|
|
|
- k(root, completely ? attrs : ["style", ARIA_ROLEDESCRIPTION]);
|
|
|
|
|
|
+ N(slides);
|
|
|
|
+ Pn(root, rootClasses);
|
|
|
|
+ Pn(track, trackClasses);
|
|
|
|
+ U([track, list], attrs);
|
|
|
|
+ U(root, completely ? attrs : ["style", ARIA_ROLEDESCRIPTION]);
|
|
}
|
|
}
|
|
function update() {
|
|
function update() {
|
|
- Nn(root, rootClasses);
|
|
|
|
- Nn(track, trackClasses);
|
|
|
|
|
|
+ Pn(root, rootClasses);
|
|
|
|
+ Pn(track, trackClasses);
|
|
rootClasses = getClasses(CLASS_ROOT);
|
|
rootClasses = getClasses(CLASS_ROOT);
|
|
trackClasses = getClasses(CLASS_TRACK);
|
|
trackClasses = getClasses(CLASS_TRACK);
|
|
J(root, rootClasses);
|
|
J(root, rootClasses);
|
|
@@ -614,8 +614,8 @@
|
|
track = find(CLASS_TRACK);
|
|
track = find(CLASS_TRACK);
|
|
list = Y(track, `.${CLASS_LIST}`);
|
|
list = Y(track, `.${CLASS_LIST}`);
|
|
assert(track && list, "A track/list element is missing.");
|
|
assert(track && list, "A track/list element is missing.");
|
|
- hn(slides, X(list, `.${CLASS_SLIDE}:not(.${CLASS_CLONE})`));
|
|
|
|
- b(elements, {
|
|
|
|
|
|
+ pn(slides, X(list, `.${CLASS_SLIDE}:not(.${CLASS_CLONE})`));
|
|
|
|
+ v(elements, {
|
|
root,
|
|
root,
|
|
track,
|
|
track,
|
|
list,
|
|
list,
|
|
@@ -642,7 +642,7 @@
|
|
}
|
|
}
|
|
function find(className) {
|
|
function find(className) {
|
|
const elm = On(root, `.${className}`);
|
|
const elm = On(root, `.${className}`);
|
|
- return elm && gn(elm, `.${CLASS_ROOT}`) === root ? elm : void 0;
|
|
|
|
|
|
+ return elm && En(elm, `.${CLASS_ROOT}`) === root ? elm : void 0;
|
|
}
|
|
}
|
|
function getClasses(base) {
|
|
function getClasses(base) {
|
|
return [
|
|
return [
|
|
@@ -653,7 +653,7 @@
|
|
base === CLASS_ROOT && CLASS_ACTIVE
|
|
base === CLASS_ROOT && CLASS_ACTIVE
|
|
];
|
|
];
|
|
}
|
|
}
|
|
- return b(elements, {
|
|
|
|
|
|
+ return v(elements, {
|
|
setup,
|
|
setup,
|
|
mount,
|
|
mount,
|
|
destroy
|
|
destroy
|
|
@@ -696,8 +696,8 @@
|
|
function destroy() {
|
|
function destroy() {
|
|
destroyed = true;
|
|
destroyed = true;
|
|
event.destroy();
|
|
event.destroy();
|
|
- Nn(slide, STATUS_CLASSES);
|
|
|
|
- k(slide, ALL_ATTRIBUTES);
|
|
|
|
|
|
+ Pn(slide, STATUS_CLASSES);
|
|
|
|
+ U(slide, ALL_ATTRIBUTES);
|
|
M(slide, "style", styles);
|
|
M(slide, "style", styles);
|
|
M(slide, ARIA_LABEL, label || "");
|
|
M(slide, ARIA_LABEL, label || "");
|
|
}
|
|
}
|
|
@@ -709,7 +709,7 @@
|
|
M(slide, ARIA_LABEL, Kn(i18n.slideX, (isClone ? slideIndex : index) + 1));
|
|
M(slide, ARIA_LABEL, Kn(i18n.slideX, (isClone ? slideIndex : index) + 1));
|
|
M(slide, ARIA_CONTROLS, controls);
|
|
M(slide, ARIA_CONTROLS, controls);
|
|
M(slide, ROLE, slideFocus ? "button" : "");
|
|
M(slide, ROLE, slideFocus ? "button" : "");
|
|
- slideFocus && k(slide, ARIA_ROLEDESCRIPTION);
|
|
|
|
|
|
+ slideFocus && U(slide, ARIA_ROLEDESCRIPTION);
|
|
}
|
|
}
|
|
function onMove() {
|
|
function onMove() {
|
|
if (!destroyed) {
|
|
if (!destroyed) {
|
|
@@ -749,7 +749,7 @@
|
|
}
|
|
}
|
|
if (!visible && document.activeElement === slide) {
|
|
if (!visible && document.activeElement === slide) {
|
|
const Slide2 = Components.Slides.getAt(Splide2.index);
|
|
const Slide2 = Components.Slides.getAt(Splide2.index);
|
|
- Slide2 && An(Slide2.slide);
|
|
|
|
|
|
+ Slide2 && $n(Slide2.slide);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function style(prop, value, useContainer) {
|
|
function style(prop, value, useContainer) {
|
|
@@ -809,7 +809,7 @@
|
|
forEach((Slide2) => {
|
|
forEach((Slide2) => {
|
|
Slide2.destroy();
|
|
Slide2.destroy();
|
|
});
|
|
});
|
|
- x(Slides2);
|
|
|
|
|
|
+ N(Slides2);
|
|
}
|
|
}
|
|
function update() {
|
|
function update() {
|
|
forEach((Slide2) => {
|
|
forEach((Slide2) => {
|
|
@@ -836,10 +836,10 @@
|
|
}
|
|
}
|
|
function add(items, index) {
|
|
function add(items, index) {
|
|
d(items, (slide) => {
|
|
d(items, (slide) => {
|
|
- if (h(slide)) {
|
|
|
|
|
|
+ if (p(slide)) {
|
|
slide = qn(slide);
|
|
slide = qn(slide);
|
|
}
|
|
}
|
|
- if (F(slide)) {
|
|
|
|
|
|
+ if (x(slide)) {
|
|
const ref = slides[index];
|
|
const ref = slides[index];
|
|
ref ? yn(slide, ref) : Q(list, slide);
|
|
ref ? yn(slide, ref) : Q(list, slide);
|
|
J(slide, options.classes.slide);
|
|
J(slide, options.classes.slide);
|
|
@@ -857,7 +857,7 @@
|
|
}
|
|
}
|
|
function filter(matcher) {
|
|
function filter(matcher) {
|
|
return Slides2.filter(
|
|
return Slides2.filter(
|
|
- mn(matcher) ? matcher : (Slide2) => h(matcher) ? W(Slide2.slide, matcher) : G(L(matcher), Slide2.index)
|
|
|
|
|
|
+ ln(matcher) ? matcher : (Slide2) => p(matcher) ? W(Slide2.slide, matcher) : G(q(matcher), Slide2.index)
|
|
);
|
|
);
|
|
}
|
|
}
|
|
function style(prop, value, useContainer) {
|
|
function style(prop, value, useContainer) {
|
|
@@ -921,7 +921,7 @@
|
|
}
|
|
}
|
|
function init() {
|
|
function init() {
|
|
vertical = options.direction === TTB;
|
|
vertical = options.direction === TTB;
|
|
- nn(root, "maxWidth", Bn(options.width));
|
|
|
|
|
|
+ nn(root, "maxWidth", Nn(options.width));
|
|
nn(track, resolve("paddingLeft"), cssPadding(false));
|
|
nn(track, resolve("paddingLeft"), cssPadding(false));
|
|
nn(track, resolve("paddingRight"), cssPadding(true));
|
|
nn(track, resolve("paddingRight"), cssPadding(true));
|
|
resize(true);
|
|
resize(true);
|
|
@@ -930,7 +930,7 @@
|
|
const newRect = tn(root);
|
|
const newRect = tn(root);
|
|
if (force || rootRect.width !== newRect.width || rootRect.height !== newRect.height) {
|
|
if (force || rootRect.width !== newRect.width || rootRect.height !== newRect.height) {
|
|
nn(track, "height", cssTrackHeight());
|
|
nn(track, "height", cssTrackHeight());
|
|
- styleSlides(resolve("marginRight"), Bn(options.gap));
|
|
|
|
|
|
+ styleSlides(resolve("marginRight"), Nn(options.gap));
|
|
styleSlides("width", cssSlideWidth());
|
|
styleSlides("width", cssSlideWidth());
|
|
styleSlides("height", cssSlideHeight(), true);
|
|
styleSlides("height", cssSlideHeight(), true);
|
|
rootRect = newRect;
|
|
rootRect = newRect;
|
|
@@ -944,7 +944,7 @@
|
|
function cssPadding(right) {
|
|
function cssPadding(right) {
|
|
const { padding } = options;
|
|
const { padding } = options;
|
|
const prop = resolve(right ? "right" : "left");
|
|
const prop = resolve(right ? "right" : "left");
|
|
- return padding && Bn(padding[prop] || (g(padding) ? 0 : padding)) || "0px";
|
|
|
|
|
|
+ return padding && Nn(padding[prop] || (y(padding) ? 0 : padding)) || "0px";
|
|
}
|
|
}
|
|
function cssTrackHeight() {
|
|
function cssTrackHeight() {
|
|
let height = "";
|
|
let height = "";
|
|
@@ -956,16 +956,16 @@
|
|
return height;
|
|
return height;
|
|
}
|
|
}
|
|
function cssHeight() {
|
|
function cssHeight() {
|
|
- return Bn(options.height || tn(list).width * options.heightRatio);
|
|
|
|
|
|
+ return Nn(options.height || tn(list).width * options.heightRatio);
|
|
}
|
|
}
|
|
function cssSlideWidth() {
|
|
function cssSlideWidth() {
|
|
- return options.autoWidth ? null : Bn(options.fixedWidth) || (vertical ? "" : cssSlideSize());
|
|
|
|
|
|
+ return options.autoWidth ? null : Nn(options.fixedWidth) || (vertical ? "" : cssSlideSize());
|
|
}
|
|
}
|
|
function cssSlideHeight() {
|
|
function cssSlideHeight() {
|
|
- return Bn(options.fixedHeight) || (vertical ? options.autoHeight ? null : cssSlideSize() : cssHeight());
|
|
|
|
|
|
+ return Nn(options.fixedHeight) || (vertical ? options.autoHeight ? null : cssSlideSize() : cssHeight());
|
|
}
|
|
}
|
|
function cssSlideSize() {
|
|
function cssSlideSize() {
|
|
- const gap = Bn(options.gap);
|
|
|
|
|
|
+ const gap = Nn(options.gap);
|
|
return `calc((100%${gap && ` + ${gap}`})/${options.perPage || 1}${gap && ` - ${gap}`})`;
|
|
return `calc((100%${gap && ` + ${gap}`})/${options.perPage || 1}${gap && ` - ${gap}`})`;
|
|
}
|
|
}
|
|
function listSize() {
|
|
function listSize() {
|
|
@@ -1033,7 +1033,7 @@
|
|
}
|
|
}
|
|
function destroy() {
|
|
function destroy() {
|
|
en(clones);
|
|
en(clones);
|
|
- x(clones);
|
|
|
|
|
|
+ N(clones);
|
|
event.destroy();
|
|
event.destroy();
|
|
}
|
|
}
|
|
function observe() {
|
|
function observe() {
|
|
@@ -1049,13 +1049,13 @@
|
|
const { length } = slides;
|
|
const { length } = slides;
|
|
if (length) {
|
|
if (length) {
|
|
while (slides.length < count) {
|
|
while (slides.length < count) {
|
|
- hn(slides, slides);
|
|
|
|
|
|
+ pn(slides, slides);
|
|
}
|
|
}
|
|
- hn(slides.slice(-count), slides.slice(0, count)).forEach((Slide, index) => {
|
|
|
|
|
|
+ pn(slides.slice(-count), slides.slice(0, count)).forEach((Slide, index) => {
|
|
const isHead = index < count;
|
|
const isHead = index < count;
|
|
const clone = cloneDeep(Slide.slide, index);
|
|
const clone = cloneDeep(Slide.slide, index);
|
|
isHead ? yn(clone, slides[0].slide) : Q(Elements.list, clone);
|
|
isHead ? yn(clone, slides[0].slide) : Q(Elements.list, clone);
|
|
- hn(clones, clone);
|
|
|
|
|
|
+ pn(clones, clone);
|
|
Slides.register(clone, index - count + (isHead ? 0 : length), Slide.index);
|
|
Slides.register(clone, index - count + (isHead ? 0 : length), Slide.index);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -1171,7 +1171,7 @@
|
|
}
|
|
}
|
|
function trim(position) {
|
|
function trim(position) {
|
|
if (options.trimSpace && Splide2.is(SLIDE)) {
|
|
if (options.trimSpace && Splide2.is(SLIDE)) {
|
|
- position = Hn(position, 0, orient(sliderSize(true) - listSize()));
|
|
|
|
|
|
+ position = bn(position, 0, orient(sliderSize(true) - listSize()));
|
|
}
|
|
}
|
|
return position;
|
|
return position;
|
|
}
|
|
}
|
|
@@ -1234,7 +1234,7 @@
|
|
perMove = options.perMove;
|
|
perMove = options.perMove;
|
|
perPage = options.perPage;
|
|
perPage = options.perPage;
|
|
endIndex = getEnd();
|
|
endIndex = getEnd();
|
|
- const index = Hn(currIndex, 0, omitEnd ? endIndex : slideCount - 1);
|
|
|
|
|
|
+ const index = bn(currIndex, 0, omitEnd ? endIndex : slideCount - 1);
|
|
if (index !== currIndex) {
|
|
if (index !== currIndex) {
|
|
currIndex = index;
|
|
currIndex = index;
|
|
Move.reposition();
|
|
Move.reposition();
|
|
@@ -1264,7 +1264,7 @@
|
|
}
|
|
}
|
|
function parse(control) {
|
|
function parse(control) {
|
|
let index = currIndex;
|
|
let index = currIndex;
|
|
- if (h(control)) {
|
|
|
|
|
|
+ if (p(control)) {
|
|
const [, indicator, number] = control.match(/([+\-<>])(\d+)?/) || [];
|
|
const [, indicator, number] = control.match(/([+\-<>])(\d+)?/) || [];
|
|
if (indicator === "+" || indicator === "-") {
|
|
if (indicator === "+" || indicator === "-") {
|
|
index = computeDestIndex(currIndex + +`${indicator}${+number || 1}`, currIndex);
|
|
index = computeDestIndex(currIndex + +`${indicator}${+number || 1}`, currIndex);
|
|
@@ -1274,7 +1274,7 @@
|
|
index = getPrev(true);
|
|
index = getPrev(true);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- index = isLoop ? control : Hn(control, 0, endIndex);
|
|
|
|
|
|
+ index = isLoop ? control : bn(control, 0, endIndex);
|
|
}
|
|
}
|
|
return index;
|
|
return index;
|
|
}
|
|
}
|
|
@@ -1338,17 +1338,17 @@
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- return Hn(end, 0, slideCount - 1);
|
|
|
|
|
|
+ return bn(end, 0, slideCount - 1);
|
|
}
|
|
}
|
|
function toIndex(page) {
|
|
function toIndex(page) {
|
|
- return Hn(hasFocus() ? page : perPage * page, 0, endIndex);
|
|
|
|
|
|
+ return bn(hasFocus() ? page : perPage * page, 0, endIndex);
|
|
}
|
|
}
|
|
function toPage(index) {
|
|
function toPage(index) {
|
|
return hasFocus() ? E(index, endIndex) : Dn((index >= endIndex ? slideCount - 1 : index) / perPage);
|
|
return hasFocus() ? E(index, endIndex) : Dn((index >= endIndex ? slideCount - 1 : index) / perPage);
|
|
}
|
|
}
|
|
function toDest(destination) {
|
|
function toDest(destination) {
|
|
const closest = Move.toIndex(destination);
|
|
const closest = Move.toIndex(destination);
|
|
- return isSlide ? Hn(closest, 0, endIndex) : closest;
|
|
|
|
|
|
+ return isSlide ? bn(closest, 0, endIndex) : closest;
|
|
}
|
|
}
|
|
function setIndex(index) {
|
|
function setIndex(index) {
|
|
if (index !== currIndex) {
|
|
if (index !== currIndex) {
|
|
@@ -1412,8 +1412,8 @@
|
|
createArrows();
|
|
createArrows();
|
|
}
|
|
}
|
|
if (prev && next) {
|
|
if (prev && next) {
|
|
- b(arrows, { prev, next });
|
|
|
|
- $n(wrapper, enabled ? "" : "none");
|
|
|
|
|
|
+ v(arrows, { prev, next });
|
|
|
|
+ An(wrapper, enabled ? "" : "none");
|
|
J(wrapper, wrapperClasses = `${CLASS_ARROWS}--${options.direction}`);
|
|
J(wrapper, wrapperClasses = `${CLASS_ARROWS}--${options.direction}`);
|
|
if (enabled) {
|
|
if (enabled) {
|
|
listen();
|
|
listen();
|
|
@@ -1425,12 +1425,12 @@
|
|
}
|
|
}
|
|
function destroy() {
|
|
function destroy() {
|
|
event.destroy();
|
|
event.destroy();
|
|
- Nn(wrapper, wrapperClasses);
|
|
|
|
|
|
+ Pn(wrapper, wrapperClasses);
|
|
if (created) {
|
|
if (created) {
|
|
en(placeholder ? [prev, next] : wrapper);
|
|
en(placeholder ? [prev, next] : wrapper);
|
|
prev = next = null;
|
|
prev = next = null;
|
|
} else {
|
|
} else {
|
|
- k([prev, next], ALL_ATTRIBUTES);
|
|
|
|
|
|
+ U([prev, next], ALL_ATTRIBUTES);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function listen() {
|
|
function listen() {
|
|
@@ -1578,7 +1578,7 @@
|
|
}
|
|
}
|
|
function toggle(cover2, img, Slide) {
|
|
function toggle(cover2, img, Slide) {
|
|
Slide.style("background", cover2 ? `center/cover no-repeat url("${img.src}")` : "", true);
|
|
Slide.style("background", cover2 ? `center/cover no-repeat url("${img.src}")` : "", true);
|
|
- $n(img, cover2 ? "none" : "");
|
|
|
|
|
|
+ An(img, cover2 ? "none" : "");
|
|
}
|
|
}
|
|
return {
|
|
return {
|
|
mount,
|
|
mount,
|
|
@@ -1615,7 +1615,7 @@
|
|
}
|
|
}
|
|
const noDistance = Mn(from, destination, 1);
|
|
const noDistance = Mn(from, destination, 1);
|
|
friction = 1;
|
|
friction = 1;
|
|
- duration = noDistance ? 0 : duration || w(un(destination - from) / BASE_VELOCITY, MIN_DURATION);
|
|
|
|
|
|
+ duration = noDistance ? 0 : duration || $(un(destination - from) / BASE_VELOCITY, MIN_DURATION);
|
|
callback = onScrolled;
|
|
callback = onScrolled;
|
|
interval = sn(duration, onEnd, a(update, from, destination, noConstrain), 1);
|
|
interval = sn(duration, onEnd, a(update, from, destination, noConstrain), 1);
|
|
set(SCROLLING);
|
|
set(SCROLLING);
|
|
@@ -1681,8 +1681,8 @@
|
|
let disabled;
|
|
let disabled;
|
|
let target;
|
|
let target;
|
|
function mount() {
|
|
function mount() {
|
|
- bind(track, POINTER_MOVE_EVENTS, ln, SCROLL_LISTENER_OPTIONS);
|
|
|
|
- bind(track, POINTER_UP_EVENTS, ln, SCROLL_LISTENER_OPTIONS);
|
|
|
|
|
|
+ bind(track, POINTER_MOVE_EVENTS, an, SCROLL_LISTENER_OPTIONS);
|
|
|
|
+ bind(track, POINTER_UP_EVENTS, an, SCROLL_LISTENER_OPTIONS);
|
|
bind(track, POINTER_DOWN_EVENTS, onPointerDown, SCROLL_LISTENER_OPTIONS);
|
|
bind(track, POINTER_DOWN_EVENTS, onPointerDown, SCROLL_LISTENER_OPTIONS);
|
|
bind(track, "click", onClick, { capture: true });
|
|
bind(track, "click", onClick, { capture: true });
|
|
bind(track, "dragstart", Ln);
|
|
bind(track, "dragstart", Ln);
|
|
@@ -1775,7 +1775,7 @@
|
|
}
|
|
}
|
|
function shouldStart(e) {
|
|
function shouldStart(e) {
|
|
const { dragMinThreshold: thresholds } = options;
|
|
const { dragMinThreshold: thresholds } = options;
|
|
- const isObj = g(thresholds);
|
|
|
|
|
|
+ const isObj = y(thresholds);
|
|
const mouse = isObj && thresholds.mouse || 0;
|
|
const mouse = isObj && thresholds.mouse || 0;
|
|
const touch = (isObj ? thresholds.touch : +thresholds) || 10;
|
|
const touch = (isObj ? thresholds.touch : +thresholds) || 10;
|
|
return un(diffCoord(e)) > (isTouchEvent(e) ? touch : mouse);
|
|
return un(diffCoord(e)) > (isTouchEvent(e) ? touch : mouse);
|
|
@@ -1802,7 +1802,7 @@
|
|
return coordOf(e, orthogonal) - coordOf(getBaseEvent(e), orthogonal);
|
|
return coordOf(e, orthogonal) - coordOf(getBaseEvent(e), orthogonal);
|
|
}
|
|
}
|
|
function diffTime(e) {
|
|
function diffTime(e) {
|
|
- return Pn(e) - Pn(getBaseEvent(e));
|
|
|
|
|
|
+ return Bn(e) - Bn(getBaseEvent(e));
|
|
}
|
|
}
|
|
function getBaseEvent(e) {
|
|
function getBaseEvent(e) {
|
|
return baseEvent === e && prevBaseEvent || baseEvent;
|
|
return baseEvent === e && prevBaseEvent || baseEvent;
|
|
@@ -1859,7 +1859,7 @@
|
|
function onMove() {
|
|
function onMove() {
|
|
const _disabled = disabled;
|
|
const _disabled = disabled;
|
|
disabled = true;
|
|
disabled = true;
|
|
- an(() => {
|
|
|
|
|
|
+ dn(() => {
|
|
disabled = _disabled;
|
|
disabled = _disabled;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -1895,7 +1895,7 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function init() {
|
|
function init() {
|
|
- x(entries);
|
|
|
|
|
|
+ N(entries);
|
|
register();
|
|
register();
|
|
if (isSequential) {
|
|
if (isSequential) {
|
|
loadNext();
|
|
loadNext();
|
|
@@ -1915,7 +1915,7 @@
|
|
const parent = img.parentElement;
|
|
const parent = img.parentElement;
|
|
const spinner = Y(parent, `.${className}`) || j("span", className, parent);
|
|
const spinner = Y(parent, `.${className}`) || j("span", className, parent);
|
|
entries.push([img, Slide, spinner]);
|
|
entries.push([img, Slide, spinner]);
|
|
- img.src || $n(img, "none");
|
|
|
|
|
|
+ img.src || An(img, "none");
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
});
|
|
@@ -1933,15 +1933,15 @@
|
|
bind(img, "load error", a(onLoad, data));
|
|
bind(img, "load error", a(onLoad, data));
|
|
M(img, "src", wn(img, SRC_DATA_ATTRIBUTE));
|
|
M(img, "src", wn(img, SRC_DATA_ATTRIBUTE));
|
|
M(img, "srcset", wn(img, SRCSET_DATA_ATTRIBUTE));
|
|
M(img, "srcset", wn(img, SRCSET_DATA_ATTRIBUTE));
|
|
- k(img, SRC_DATA_ATTRIBUTE);
|
|
|
|
- k(img, SRCSET_DATA_ATTRIBUTE);
|
|
|
|
|
|
+ U(img, SRC_DATA_ATTRIBUTE);
|
|
|
|
+ U(img, SRCSET_DATA_ATTRIBUTE);
|
|
}
|
|
}
|
|
function onLoad(data, e) {
|
|
function onLoad(data, e) {
|
|
const [img, Slide] = data;
|
|
const [img, Slide] = data;
|
|
- Nn(Slide.slide, CLASS_LOADING);
|
|
|
|
|
|
+ Pn(Slide.slide, CLASS_LOADING);
|
|
if (e.type !== "error") {
|
|
if (e.type !== "error") {
|
|
en(data[2]);
|
|
en(data[2]);
|
|
- $n(img, "");
|
|
|
|
|
|
+ An(img, "");
|
|
emit(EVENT_LAZYLOAD_LOADED, img, Slide);
|
|
emit(EVENT_LAZYLOAD_LOADED, img, Slide);
|
|
emit(EVENT_RESIZE);
|
|
emit(EVENT_RESIZE);
|
|
}
|
|
}
|
|
@@ -1952,7 +1952,7 @@
|
|
}
|
|
}
|
|
return {
|
|
return {
|
|
mount,
|
|
mount,
|
|
- destroy: a(x, entries),
|
|
|
|
|
|
+ destroy: a(N, entries),
|
|
check
|
|
check
|
|
};
|
|
};
|
|
}
|
|
}
|
|
@@ -1970,7 +1970,7 @@
|
|
destroy();
|
|
destroy();
|
|
on([EVENT_UPDATED, EVENT_REFRESH, EVENT_END_INDEX_CHANGED], mount);
|
|
on([EVENT_UPDATED, EVENT_REFRESH, EVENT_END_INDEX_CHANGED], mount);
|
|
const enabled = options.pagination;
|
|
const enabled = options.pagination;
|
|
- placeholder && $n(placeholder, enabled ? "" : "none");
|
|
|
|
|
|
+ placeholder && An(placeholder, enabled ? "" : "none");
|
|
if (enabled) {
|
|
if (enabled) {
|
|
on([EVENT_MOVE, EVENT_SCROLL, EVENT_SCROLLED], update);
|
|
on([EVENT_MOVE, EVENT_SCROLL, EVENT_SCROLLED], update);
|
|
createPagination();
|
|
createPagination();
|
|
@@ -1980,9 +1980,9 @@
|
|
}
|
|
}
|
|
function destroy() {
|
|
function destroy() {
|
|
if (list) {
|
|
if (list) {
|
|
- en(placeholder ? m(list.children) : list);
|
|
|
|
- Nn(list, paginationClasses);
|
|
|
|
- x(items);
|
|
|
|
|
|
+ en(placeholder ? F(list.children) : list);
|
|
|
|
+ Pn(list, paginationClasses);
|
|
|
|
+ N(items);
|
|
list = null;
|
|
list = null;
|
|
}
|
|
}
|
|
event.destroy();
|
|
event.destroy();
|
|
@@ -2032,7 +2032,7 @@
|
|
}
|
|
}
|
|
const item = items[nextPage];
|
|
const item = items[nextPage];
|
|
if (item) {
|
|
if (item) {
|
|
- An(item.button);
|
|
|
|
|
|
+ $n(item.button);
|
|
go(`>${nextPage}`);
|
|
go(`>${nextPage}`);
|
|
Ln(e, true);
|
|
Ln(e, true);
|
|
}
|
|
}
|
|
@@ -2048,8 +2048,8 @@
|
|
const curr = getAt(getIndex());
|
|
const curr = getAt(getIndex());
|
|
if (prev) {
|
|
if (prev) {
|
|
const { button } = prev;
|
|
const { button } = prev;
|
|
- Nn(button, CLASS_ACTIVE);
|
|
|
|
- k(button, ARIA_SELECTED);
|
|
|
|
|
|
+ Pn(button, CLASS_ACTIVE);
|
|
|
|
+ U(button, ARIA_SELECTED);
|
|
M(button, TAB_INDEX, -1);
|
|
M(button, TAB_INDEX, -1);
|
|
}
|
|
}
|
|
if (curr) {
|
|
if (curr) {
|
|
@@ -2088,7 +2088,7 @@
|
|
events.forEach((event2) => {
|
|
events.forEach((event2) => {
|
|
event2.destroy();
|
|
event2.destroy();
|
|
});
|
|
});
|
|
- x(events);
|
|
|
|
|
|
+ N(events);
|
|
}
|
|
}
|
|
function remount() {
|
|
function remount() {
|
|
destroy();
|
|
destroy();
|
|
@@ -2149,7 +2149,7 @@
|
|
if (e.cancelable) {
|
|
if (e.cancelable) {
|
|
const { deltaY } = e;
|
|
const { deltaY } = e;
|
|
const backwards = deltaY < 0;
|
|
const backwards = deltaY < 0;
|
|
- const timeStamp = Pn(e);
|
|
|
|
|
|
+ const timeStamp = Bn(e);
|
|
const min = options.wheelMinThreshold || 0;
|
|
const min = options.wheelMinThreshold || 0;
|
|
const sleep = options.wheelSleep || 0;
|
|
const sleep = options.wheelSleep || 0;
|
|
if (un(deltaY) > min && timeStamp - lastTime > sleep) {
|
|
if (un(deltaY) > min && timeStamp - lastTime > sleep) {
|
|
@@ -2195,7 +2195,7 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function destroy() {
|
|
function destroy() {
|
|
- k(track, [ARIA_LIVE, ARIA_ATOMIC, ARIA_BUSY]);
|
|
|
|
|
|
+ U(track, [ARIA_LIVE, ARIA_ATOMIC, ARIA_BUSY]);
|
|
en(sr);
|
|
en(sr);
|
|
}
|
|
}
|
|
function disable(disabled) {
|
|
function disable(disabled) {
|
|
@@ -2288,12 +2288,12 @@
|
|
}
|
|
}
|
|
function start(index, done) {
|
|
function start(index, done) {
|
|
Slides.style("transition", `opacity ${options.speed}ms ${options.easing}`);
|
|
Slides.style("transition", `opacity ${options.speed}ms ${options.easing}`);
|
|
- an(done);
|
|
|
|
|
|
+ dn(done);
|
|
}
|
|
}
|
|
return {
|
|
return {
|
|
mount,
|
|
mount,
|
|
start,
|
|
start,
|
|
- cancel: ln
|
|
|
|
|
|
+ cancel: an
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2362,19 +2362,19 @@
|
|
_E = {};
|
|
_E = {};
|
|
_T;
|
|
_T;
|
|
constructor(target, options) {
|
|
constructor(target, options) {
|
|
- const root = h(target) ? On(document, target) : target;
|
|
|
|
|
|
+ const root = p(target) ? On(document, target) : target;
|
|
assert(root, `${root} is invalid.`);
|
|
assert(root, `${root} is invalid.`);
|
|
this.root = root;
|
|
this.root = root;
|
|
- options = U({
|
|
|
|
|
|
+ options = k({
|
|
label: wn(root, ARIA_LABEL) || "",
|
|
label: wn(root, ARIA_LABEL) || "",
|
|
labelledby: wn(root, ARIA_LABELLEDBY) || ""
|
|
labelledby: wn(root, ARIA_LABELLEDBY) || ""
|
|
}, DEFAULTS, Splide.defaults, options || {});
|
|
}, DEFAULTS, Splide.defaults, options || {});
|
|
try {
|
|
try {
|
|
- U(options, JSON.parse(wn(root, DATA_ATTRIBUTE)));
|
|
|
|
|
|
+ k(options, JSON.parse(wn(root, DATA_ATTRIBUTE)));
|
|
} catch (e) {
|
|
} catch (e) {
|
|
assert(false, "Invalid JSON");
|
|
assert(false, "Invalid JSON");
|
|
}
|
|
}
|
|
- this._o = Object.create(U({}, options));
|
|
|
|
|
|
+ this._o = Object.create(k({}, options));
|
|
}
|
|
}
|
|
mount(Extensions, Transition) {
|
|
mount(Extensions, Transition) {
|
|
const { state, Components: Components2 } = this;
|
|
const { state, Components: Components2 } = this;
|
|
@@ -2383,13 +2383,13 @@
|
|
this._C = Components2;
|
|
this._C = Components2;
|
|
this._T = Transition || this._T || (this.is(FADE) ? Fade : Slide);
|
|
this._T = Transition || this._T || (this.is(FADE) ? Fade : Slide);
|
|
this._E = Extensions || this._E;
|
|
this._E = Extensions || this._E;
|
|
- const Constructors = b({}, ComponentConstructors, this._E, { Transition: this._T });
|
|
|
|
- O(Constructors, (Component, key) => {
|
|
|
|
|
|
+ const Constructors = v({}, ComponentConstructors, this._E, { Transition: this._T });
|
|
|
|
+ L(Constructors, (Component, key) => {
|
|
const component = Component(this, Components2, this._o, this.event.create());
|
|
const component = Component(this, Components2, this._o, this.event.create());
|
|
Components2[key] = component;
|
|
Components2[key] = component;
|
|
component.setup && component.setup();
|
|
component.setup && component.setup();
|
|
});
|
|
});
|
|
- O(Components2, (component) => {
|
|
|
|
|
|
+ L(Components2, (component) => {
|
|
component.mount && component.mount();
|
|
component.mount && component.mount();
|
|
});
|
|
});
|
|
this.emit(EVENT_MOUNTED);
|
|
this.emit(EVENT_MOUNTED);
|
|
@@ -2420,7 +2420,7 @@
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
emit(event) {
|
|
emit(event) {
|
|
- this.event.emit(event, ...m(arguments, 1));
|
|
|
|
|
|
+ this.event.emit(event, ...F(arguments, 1));
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
add(slides, index) {
|
|
add(slides, index) {
|
|
@@ -2443,12 +2443,12 @@
|
|
if (state.is(CREATED)) {
|
|
if (state.is(CREATED)) {
|
|
this.on(EVENT_READY, this.destroy.bind(this, completely));
|
|
this.on(EVENT_READY, this.destroy.bind(this, completely));
|
|
} else {
|
|
} else {
|
|
- O(this._C, (component) => {
|
|
|
|
|
|
+ L(this._C, (component) => {
|
|
component.destroy && component.destroy(completely);
|
|
component.destroy && component.destroy(completely);
|
|
}, true);
|
|
}, true);
|
|
event.emit(EVENT_DESTROY);
|
|
event.emit(EVENT_DESTROY);
|
|
event.destroy();
|
|
event.destroy();
|
|
- completely && x(this.splides);
|
|
|
|
|
|
+ completely && N(this.splides);
|
|
state.set(DESTROYED);
|
|
state.set(DESTROYED);
|
|
}
|
|
}
|
|
return this;
|
|
return this;
|