@luna-park/plugin-nuxt-ui 1.3.2 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/embla-carousel-auto-height.esm-C2dOleB6.js +30 -0
- package/dist/embla-carousel-auto-scroll.esm-BWDrqXRk.js +116 -0
- package/dist/embla-carousel-autoplay.esm-C4C3HUni.js +109 -0
- package/dist/embla-carousel-class-names.esm-DbsQavlo.js +64 -0
- package/dist/embla-carousel-fade.esm-B9dWgAv9.js +106 -0
- package/dist/embla-carousel-wheel-gestures.esm-DUtYDu5y.js +385 -0
- package/dist/index.css +2 -1
- package/dist/index.js +76857 -75115
- package/package.json +14 -14
- package/dist/embla-carousel-auto-height.esm-ChnXvXj8.js +0 -38
- package/dist/embla-carousel-auto-scroll.esm-kh3r9SbL.js +0 -142
- package/dist/embla-carousel-autoplay.esm-Dsq4myy1.js +0 -126
- package/dist/embla-carousel-class-names.esm-BLcxNRTO.js +0 -74
- package/dist/embla-carousel-fade.esm-Dhou20uz.js +0 -143
- package/dist/embla-carousel-wheel-gestures.esm-BTIT2srW.js +0 -373
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/embla-carousel-auto-height@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-auto-height/esm/embla-carousel-auto-height.esm.js
|
|
2
|
+
function e(e = {}) {
|
|
3
|
+
let t, n = [], r = ["select", "slideFocus"];
|
|
4
|
+
function i(e) {
|
|
5
|
+
t = e;
|
|
6
|
+
let { options: { axis: i }, slideRects: a } = t.internalEngine();
|
|
7
|
+
i !== "y" && (n = a.map((e) => e.height), r.forEach((e) => t.on(e, s)), s());
|
|
8
|
+
}
|
|
9
|
+
function a() {
|
|
10
|
+
r.forEach((e) => t.off(e, s));
|
|
11
|
+
let e = t.containerNode();
|
|
12
|
+
e.style.height = "", e.getAttribute("style") || e.removeAttribute("style");
|
|
13
|
+
}
|
|
14
|
+
function o() {
|
|
15
|
+
let { slideRegistry: e } = t.internalEngine(), r = e[t.selectedScrollSnap()];
|
|
16
|
+
return r ? r.map((e) => n[e]).reduce((e, t) => Math.max(e, t), 0) : null;
|
|
17
|
+
}
|
|
18
|
+
function s() {
|
|
19
|
+
o() !== null && (t.containerNode().style.height = `${o()}px`);
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
name: "autoHeight",
|
|
23
|
+
options: e,
|
|
24
|
+
init: i,
|
|
25
|
+
destroy: a
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
e.globalOptions = void 0;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { e as default };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/embla-carousel-auto-scroll@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-auto-scroll/esm/embla-carousel-auto-scroll.esm.js
|
|
2
|
+
var e = {
|
|
3
|
+
direction: "forward",
|
|
4
|
+
speed: 2,
|
|
5
|
+
startDelay: 1e3,
|
|
6
|
+
active: !0,
|
|
7
|
+
breakpoints: {},
|
|
8
|
+
playOnInit: !0,
|
|
9
|
+
stopOnFocusIn: !0,
|
|
10
|
+
stopOnInteraction: !0,
|
|
11
|
+
stopOnMouseEnter: !1,
|
|
12
|
+
rootNode: null
|
|
13
|
+
};
|
|
14
|
+
function t(e, t) {
|
|
15
|
+
let n = e.rootNode();
|
|
16
|
+
return t && t(n) || n;
|
|
17
|
+
}
|
|
18
|
+
function n(r = {}) {
|
|
19
|
+
let i, a, o, s, c = 0, l = !1, u = !1, d;
|
|
20
|
+
function f(c, l) {
|
|
21
|
+
a = c;
|
|
22
|
+
let { mergeOptions: u, optionsAtMedia: f } = l;
|
|
23
|
+
if (i = f(u(u(e, n.globalOptions), r)), a.scrollSnapList().length <= 1) return;
|
|
24
|
+
s = i.startDelay, o = !1, d = a.internalEngine().scrollBody;
|
|
25
|
+
let { eventStore: p } = a.internalEngine(), g = !!a.internalEngine().options.watchDrag, x = t(a, i.rootNode);
|
|
26
|
+
g && a.on("pointerDown", _), g && !i.stopOnInteraction && a.on("pointerUp", v), i.stopOnMouseEnter && p.add(x, "mouseenter", y), i.stopOnMouseEnter && !i.stopOnInteraction && p.add(x, "mouseleave", b), i.stopOnFocusIn && a.on("slideFocusStart", h), i.stopOnFocusIn && !i.stopOnInteraction && p.add(a.containerNode(), "focusout", m), i.playOnInit && m();
|
|
27
|
+
}
|
|
28
|
+
function p() {
|
|
29
|
+
a.off("pointerDown", _).off("pointerUp", v).off("slideFocusStart", h).off("settle", x), h(), o = !0, l = !1;
|
|
30
|
+
}
|
|
31
|
+
function m() {
|
|
32
|
+
if (o || l) return;
|
|
33
|
+
a.emit("autoScroll:play");
|
|
34
|
+
let e = a.internalEngine(), { ownerWindow: t } = e;
|
|
35
|
+
c = t.setTimeout(() => {
|
|
36
|
+
e.scrollBody = g(e), e.animation.start();
|
|
37
|
+
}, s), l = !0;
|
|
38
|
+
}
|
|
39
|
+
function h() {
|
|
40
|
+
if (o || !l) return;
|
|
41
|
+
a.emit("autoScroll:stop");
|
|
42
|
+
let e = a.internalEngine(), { ownerWindow: t } = e;
|
|
43
|
+
e.scrollBody = d, t.clearTimeout(c), c = 0, l = !1;
|
|
44
|
+
}
|
|
45
|
+
function g(e) {
|
|
46
|
+
let { location: t, previousLocation: n, offsetLocation: r, target: o, scrollTarget: s, index: c, indexPrevious: l, limit: { reachedMin: u, reachedMax: d, constrain: f }, options: { loop: p } } = e, m = i.direction === "forward" ? -1 : 1, g = () => C, _ = 0, v = 0, y = t.get(), b = 0, x = !1;
|
|
47
|
+
function S() {
|
|
48
|
+
let e = 0;
|
|
49
|
+
n.set(t), _ = m * i.speed, y += _, t.add(_), o.set(t), e = y - b, v = Math.sign(e), b = y;
|
|
50
|
+
let g = s.byDistance(0, !1).index;
|
|
51
|
+
c.get() !== g && (l.set(c.get()), c.set(g), a.emit("select"));
|
|
52
|
+
let S = i.direction === "forward" ? u(r.get()) : d(r.get());
|
|
53
|
+
if (!p && S) {
|
|
54
|
+
x = !0;
|
|
55
|
+
let e = f(t.get());
|
|
56
|
+
t.set(e), o.set(t), h();
|
|
57
|
+
}
|
|
58
|
+
return C;
|
|
59
|
+
}
|
|
60
|
+
let C = {
|
|
61
|
+
direction: () => v,
|
|
62
|
+
duration: () => -1,
|
|
63
|
+
velocity: () => _,
|
|
64
|
+
settled: () => x,
|
|
65
|
+
seek: S,
|
|
66
|
+
useBaseFriction: g,
|
|
67
|
+
useBaseDuration: g,
|
|
68
|
+
useFriction: g,
|
|
69
|
+
useDuration: g
|
|
70
|
+
};
|
|
71
|
+
return C;
|
|
72
|
+
}
|
|
73
|
+
function _() {
|
|
74
|
+
u || h();
|
|
75
|
+
}
|
|
76
|
+
function v() {
|
|
77
|
+
u || S();
|
|
78
|
+
}
|
|
79
|
+
function y() {
|
|
80
|
+
u = !0, h();
|
|
81
|
+
}
|
|
82
|
+
function b() {
|
|
83
|
+
u = !1, m();
|
|
84
|
+
}
|
|
85
|
+
function x() {
|
|
86
|
+
a.off("settle", x), m();
|
|
87
|
+
}
|
|
88
|
+
function S() {
|
|
89
|
+
a.on("settle", x);
|
|
90
|
+
}
|
|
91
|
+
function C(e) {
|
|
92
|
+
e !== void 0 && (s = e), m();
|
|
93
|
+
}
|
|
94
|
+
function w() {
|
|
95
|
+
l && h();
|
|
96
|
+
}
|
|
97
|
+
function T() {
|
|
98
|
+
l && (h(), S());
|
|
99
|
+
}
|
|
100
|
+
function E() {
|
|
101
|
+
return l;
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
name: "autoScroll",
|
|
105
|
+
options: r,
|
|
106
|
+
init: f,
|
|
107
|
+
destroy: p,
|
|
108
|
+
play: C,
|
|
109
|
+
stop: w,
|
|
110
|
+
reset: T,
|
|
111
|
+
isPlaying: E
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
n.globalOptions = void 0;
|
|
115
|
+
//#endregion
|
|
116
|
+
export { n as default };
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/embla-carousel-autoplay@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js
|
|
2
|
+
var e = {
|
|
3
|
+
active: !0,
|
|
4
|
+
breakpoints: {},
|
|
5
|
+
delay: 4e3,
|
|
6
|
+
jump: !1,
|
|
7
|
+
playOnInit: !0,
|
|
8
|
+
stopOnFocusIn: !0,
|
|
9
|
+
stopOnInteraction: !0,
|
|
10
|
+
stopOnMouseEnter: !1,
|
|
11
|
+
stopOnLastSnap: !1,
|
|
12
|
+
rootNode: null
|
|
13
|
+
};
|
|
14
|
+
function t(e, t) {
|
|
15
|
+
let n = e.scrollSnapList();
|
|
16
|
+
return typeof t == "number" ? n.map(() => t) : t(n, e);
|
|
17
|
+
}
|
|
18
|
+
function n(e, t) {
|
|
19
|
+
let n = e.rootNode();
|
|
20
|
+
return t && t(n) || n;
|
|
21
|
+
}
|
|
22
|
+
function r(i = {}) {
|
|
23
|
+
let a, o, s, c, l = null, u = 0, d = !1, f = !1, p = !1, m = !1;
|
|
24
|
+
function h(l, u) {
|
|
25
|
+
o = l;
|
|
26
|
+
let { mergeOptions: d, optionsAtMedia: f } = u;
|
|
27
|
+
if (a = f(d(d(e, r.globalOptions), i)), o.scrollSnapList().length <= 1) return;
|
|
28
|
+
m = a.jump, s = !1, c = t(o, a.delay);
|
|
29
|
+
let { eventStore: p, ownerDocument: h } = o.internalEngine(), g = !!o.internalEngine().options.watchDrag, _ = n(o, a.rootNode);
|
|
30
|
+
p.add(h, "visibilitychange", x), g && o.on("pointerDown", C), g && !a.stopOnInteraction && o.on("pointerUp", w), a.stopOnMouseEnter && p.add(_, "mouseenter", T), a.stopOnMouseEnter && !a.stopOnInteraction && p.add(_, "mouseleave", E), a.stopOnFocusIn && o.on("slideFocusStart", b), a.stopOnFocusIn && !a.stopOnInteraction && p.add(o.containerNode(), "focusout", y), a.playOnInit && y();
|
|
31
|
+
}
|
|
32
|
+
function g() {
|
|
33
|
+
o.off("pointerDown", C).off("pointerUp", w).off("slideFocusStart", b), b(), s = !0, d = !1;
|
|
34
|
+
}
|
|
35
|
+
function _() {
|
|
36
|
+
let { ownerWindow: e } = o.internalEngine();
|
|
37
|
+
e.clearTimeout(u), u = e.setTimeout(j, c[o.selectedScrollSnap()]), l = (/* @__PURE__ */ new Date()).getTime(), o.emit("autoplay:timerset");
|
|
38
|
+
}
|
|
39
|
+
function v() {
|
|
40
|
+
let { ownerWindow: e } = o.internalEngine();
|
|
41
|
+
e.clearTimeout(u), u = 0, l = null, o.emit("autoplay:timerstopped");
|
|
42
|
+
}
|
|
43
|
+
function y() {
|
|
44
|
+
if (!s) {
|
|
45
|
+
if (S()) {
|
|
46
|
+
p = !0;
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
d || o.emit("autoplay:play"), _(), d = !0;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function b() {
|
|
53
|
+
s || (d && o.emit("autoplay:stop"), v(), d = !1);
|
|
54
|
+
}
|
|
55
|
+
function x() {
|
|
56
|
+
if (S()) return p = d, b();
|
|
57
|
+
p && y();
|
|
58
|
+
}
|
|
59
|
+
function S() {
|
|
60
|
+
let { ownerDocument: e } = o.internalEngine();
|
|
61
|
+
return e.visibilityState === "hidden";
|
|
62
|
+
}
|
|
63
|
+
function C() {
|
|
64
|
+
f || b();
|
|
65
|
+
}
|
|
66
|
+
function w() {
|
|
67
|
+
f || y();
|
|
68
|
+
}
|
|
69
|
+
function T() {
|
|
70
|
+
f = !0, b();
|
|
71
|
+
}
|
|
72
|
+
function E() {
|
|
73
|
+
f = !1, y();
|
|
74
|
+
}
|
|
75
|
+
function D(e) {
|
|
76
|
+
e !== void 0 && (m = e), y();
|
|
77
|
+
}
|
|
78
|
+
function O() {
|
|
79
|
+
d && b();
|
|
80
|
+
}
|
|
81
|
+
function k() {
|
|
82
|
+
d && y();
|
|
83
|
+
}
|
|
84
|
+
function A() {
|
|
85
|
+
return d;
|
|
86
|
+
}
|
|
87
|
+
function j() {
|
|
88
|
+
let { index: e } = o.internalEngine(), t = e.clone().add(1).get(), n = o.scrollSnapList().length - 1, r = a.stopOnLastSnap && t === n;
|
|
89
|
+
if (o.canScrollNext() ? o.scrollNext(m) : o.scrollTo(0, m), o.emit("autoplay:select"), r) return b();
|
|
90
|
+
y();
|
|
91
|
+
}
|
|
92
|
+
function M() {
|
|
93
|
+
return l ? c[o.selectedScrollSnap()] - ((/* @__PURE__ */ new Date()).getTime() - l) : null;
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
name: "autoplay",
|
|
97
|
+
options: i,
|
|
98
|
+
init: h,
|
|
99
|
+
destroy: g,
|
|
100
|
+
play: D,
|
|
101
|
+
stop: O,
|
|
102
|
+
reset: k,
|
|
103
|
+
isPlaying: A,
|
|
104
|
+
timeUntilNext: M
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
r.globalOptions = void 0;
|
|
108
|
+
//#endregion
|
|
109
|
+
export { r as default };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/embla-carousel-class-names@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-class-names/esm/embla-carousel-class-names.esm.js
|
|
2
|
+
var e = {
|
|
3
|
+
active: !0,
|
|
4
|
+
breakpoints: {},
|
|
5
|
+
snapped: "is-snapped",
|
|
6
|
+
inView: "is-in-view",
|
|
7
|
+
draggable: "is-draggable",
|
|
8
|
+
dragging: "is-dragging",
|
|
9
|
+
loop: "is-loop"
|
|
10
|
+
};
|
|
11
|
+
function t(e) {
|
|
12
|
+
return (Array.isArray(e) ? e : [e]).filter(Boolean);
|
|
13
|
+
}
|
|
14
|
+
function n(e, t) {
|
|
15
|
+
!e || !t.length || e.classList.remove(...t);
|
|
16
|
+
}
|
|
17
|
+
function r(e, t) {
|
|
18
|
+
!e || !t.length || e.classList.add(...t);
|
|
19
|
+
}
|
|
20
|
+
function i(a = {}) {
|
|
21
|
+
let o, s, c, l, u = [], d = [], f = ["select"], p = ["pointerDown", "pointerUp"], m = ["slidesInView"], h = {
|
|
22
|
+
snapped: [],
|
|
23
|
+
inView: [],
|
|
24
|
+
draggable: [],
|
|
25
|
+
dragging: [],
|
|
26
|
+
loop: []
|
|
27
|
+
};
|
|
28
|
+
function g(n, u) {
|
|
29
|
+
s = n;
|
|
30
|
+
let { mergeOptions: d, optionsAtMedia: g } = u;
|
|
31
|
+
o = g(d(d(e, i.globalOptions), a)), c = s.rootNode(), l = s.slideNodes();
|
|
32
|
+
let { watchDrag: _, loop: y } = s.internalEngine().options, S = !!_;
|
|
33
|
+
o.loop && y && (h.loop = t(o.loop), r(c, h.loop)), o.draggable && S && (h.draggable = t(o.draggable), r(c, h.draggable)), o.dragging && (h.dragging = t(o.dragging), p.forEach((e) => s.on(e, v))), o.snapped && (h.snapped = t(o.snapped), f.forEach((e) => s.on(e, b)), b()), o.inView && (h.inView = t(o.inView), m.forEach((e) => s.on(e, x)), x());
|
|
34
|
+
}
|
|
35
|
+
function _() {
|
|
36
|
+
p.forEach((e) => s.off(e, v)), f.forEach((e) => s.off(e, b)), m.forEach((e) => s.off(e, x)), n(c, h.loop), n(c, h.draggable), n(c, h.dragging), y([], u, h.snapped), y([], d, h.inView), Object.keys(h).forEach((e) => {
|
|
37
|
+
let t = e;
|
|
38
|
+
h[t] = [];
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function v(e, t) {
|
|
42
|
+
(t === "pointerDown" ? r : n)(c, h.dragging);
|
|
43
|
+
}
|
|
44
|
+
function y(e = [], t = [], i) {
|
|
45
|
+
let a = t.map((e) => l[e]), o = e.map((e) => l[e]);
|
|
46
|
+
return a.forEach((e) => n(e, i)), o.forEach((e) => r(e, i)), e;
|
|
47
|
+
}
|
|
48
|
+
function b() {
|
|
49
|
+
let { slideRegistry: e } = s.internalEngine(), t = e[s.selectedScrollSnap()];
|
|
50
|
+
u = y(t, u, h.snapped);
|
|
51
|
+
}
|
|
52
|
+
function x() {
|
|
53
|
+
d = y(s.slidesInView(), d, h.inView);
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
name: "classNames",
|
|
57
|
+
options: a,
|
|
58
|
+
init: g,
|
|
59
|
+
destroy: _
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
i.globalOptions = void 0;
|
|
63
|
+
//#endregion
|
|
64
|
+
export { i as default };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/embla-carousel-fade@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-fade/esm/embla-carousel-fade.esm.js
|
|
2
|
+
function e(e, t, n) {
|
|
3
|
+
return Math.min(Math.max(e, t), n);
|
|
4
|
+
}
|
|
5
|
+
function t(e) {
|
|
6
|
+
return typeof e == "number" && !isNaN(e);
|
|
7
|
+
}
|
|
8
|
+
function n(n = {}) {
|
|
9
|
+
let r, i = [], a, o = 0, s = 0, c = 0, l = !1, u, d;
|
|
10
|
+
function f(t) {
|
|
11
|
+
r = t;
|
|
12
|
+
let n = r.selectedScrollSnap(), { scrollBody: o, containerRect: s, axis: c } = r.internalEngine();
|
|
13
|
+
a = e(c.measureSize(s) * .75, 200, 500), l = !1, i = r.scrollSnapList().map((e, t) => +(t === n)), u = o.settled, d = r.scrollProgress, o.settled = E, r.scrollProgress = D, r.on("select", _).on("slideFocus", m).on("pointerDown", g).on("pointerUp", h), y(), m();
|
|
14
|
+
}
|
|
15
|
+
function p() {
|
|
16
|
+
let { scrollBody: e } = r.internalEngine();
|
|
17
|
+
e.settled = u, r.scrollProgress = d, r.off("select", _).off("slideFocus", m).off("pointerDown", g).off("pointerUp", h), r.slideNodes().forEach((e) => {
|
|
18
|
+
let t = e.style;
|
|
19
|
+
t.opacity = "", t.transform = "", t.pointerEvents = "", e.getAttribute("style") || e.removeAttribute("style");
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function m() {
|
|
23
|
+
x(r.selectedScrollSnap(), 1);
|
|
24
|
+
}
|
|
25
|
+
function h() {
|
|
26
|
+
l = !1;
|
|
27
|
+
}
|
|
28
|
+
function g() {
|
|
29
|
+
l = !1, o = 0, s = 0;
|
|
30
|
+
}
|
|
31
|
+
function _() {
|
|
32
|
+
let e = r.internalEngine().scrollBody.duration();
|
|
33
|
+
s = +!e, l = !0, e || m();
|
|
34
|
+
}
|
|
35
|
+
function v(e) {
|
|
36
|
+
let { axis: t } = r.internalEngine();
|
|
37
|
+
return `translate${t.scroll.toUpperCase()}(${t.direction(e)}px)`;
|
|
38
|
+
}
|
|
39
|
+
function y() {
|
|
40
|
+
let { translate: e, slideLooper: t } = r.internalEngine();
|
|
41
|
+
e.clear(), e.toggleActive(!1), t.loopPoints.forEach(({ translate: e }) => {
|
|
42
|
+
e.clear(), e.toggleActive(!1);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function b(e) {
|
|
46
|
+
let { scrollSnaps: n, location: a, target: o } = r.internalEngine();
|
|
47
|
+
!t(e) || i[e] < .5 || (a.set(n[e]), o.set(a));
|
|
48
|
+
}
|
|
49
|
+
function x(t, n) {
|
|
50
|
+
r.scrollSnapList().forEach((a, o) => {
|
|
51
|
+
let s = Math.abs(n), c = i[o], u = o === t, d = e(u ? c + s : c - s, 0, 1);
|
|
52
|
+
i[o] = d;
|
|
53
|
+
let f = u && l, p = r.previousScrollSnap();
|
|
54
|
+
f && (i[p] = 1 - d), u && C(t, d), S(o);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function S(e) {
|
|
58
|
+
let t = r.internalEngine().slideRegistry[e], { scrollSnaps: n, containerRect: a } = r.internalEngine(), o = i[e];
|
|
59
|
+
t.forEach((t) => {
|
|
60
|
+
let i = r.slideNodes()[t].style, s = parseFloat(o.toFixed(2)), c = s > 0, l = v(c ? n[e] : a.width + 2);
|
|
61
|
+
c && (i.transform = l), i.opacity = s.toString(), i.pointerEvents = o > .5 ? "auto" : "none", c || (i.transform = l);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function C(e, t) {
|
|
65
|
+
let { index: n, dragHandler: i, scrollSnaps: a } = r.internalEngine(), s = i.pointerDown(), l = 1 / (a.length - 1), u = e, d = s ? r.selectedScrollSnap() : r.previousScrollSnap();
|
|
66
|
+
if (s && u === d) {
|
|
67
|
+
let e = Math.sign(o) * -1;
|
|
68
|
+
u = d, d = n.clone().set(d).add(e).get();
|
|
69
|
+
}
|
|
70
|
+
c = d * l + (u - d) * l * t;
|
|
71
|
+
}
|
|
72
|
+
function w() {
|
|
73
|
+
let { dragHandler: e, index: t, scrollBody: n } = r.internalEngine(), i = r.selectedScrollSnap();
|
|
74
|
+
if (!e.pointerDown()) return i;
|
|
75
|
+
let a = Math.sign(n.velocity()), s = Math.sign(o), c = t.clone().set(i).add(a * -1).get();
|
|
76
|
+
return !a || !s ? null : s === a ? c : i;
|
|
77
|
+
}
|
|
78
|
+
function T(e) {
|
|
79
|
+
let { dragHandler: n, scrollBody: r } = e.internalEngine(), c = n.pointerDown(), l = r.velocity(), u = r.duration(), d = w(), f = !t(d);
|
|
80
|
+
if (c) {
|
|
81
|
+
if (!l) return;
|
|
82
|
+
o += l, s = Math.abs(l / a), b(d);
|
|
83
|
+
}
|
|
84
|
+
if (!c) {
|
|
85
|
+
if (!u || f) return;
|
|
86
|
+
s += (1 - i[d]) / u, s *= .68;
|
|
87
|
+
}
|
|
88
|
+
f || x(d, s);
|
|
89
|
+
}
|
|
90
|
+
function E() {
|
|
91
|
+
let { target: e, location: n } = r.internalEngine(), a = e.get() - n.get(), o = Math.abs(a) >= 1, s = w(), c = !t(s);
|
|
92
|
+
return T(r), c || o ? !1 : i[s] > .999;
|
|
93
|
+
}
|
|
94
|
+
function D() {
|
|
95
|
+
return c;
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
name: "fade",
|
|
99
|
+
options: n,
|
|
100
|
+
init: f,
|
|
101
|
+
destroy: p
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
n.globalOptions = void 0;
|
|
105
|
+
//#endregion
|
|
106
|
+
export { n as default };
|