trepur_components 2.3.47 → 2.3.49

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.
Files changed (96) hide show
  1. package/lib/assets/trepurComponentsLogo.svg +32 -0
  2. package/lib/components/Accordion/Accordion.stories.d.ts +1 -1
  3. package/lib/components/AlertBar/AlertBar.stories.d.ts +1 -1
  4. package/lib/components/AlertBar/index.js +6 -6
  5. package/lib/components/Breadcrumbs/Breadcrumbs.stories.d.ts +2 -2
  6. package/lib/components/Breadcrumbs/index.d.ts +1 -1
  7. package/lib/components/Breadcrumbs/index.js +4 -4
  8. package/lib/components/Button/Button.stories.d.ts +1 -1
  9. package/lib/components/Button/index.js +16 -15
  10. package/lib/components/Calendar/Calendar.stories.d.ts +1 -1
  11. package/lib/components/Calendar/index.js +1 -1
  12. package/lib/components/Card/Card.stories.d.ts +1 -1
  13. package/lib/components/Card/index.js +18 -23
  14. package/lib/components/Carousel/Carousel.stories.d.ts +1 -1
  15. package/lib/components/Carousel/index.d.ts +1 -1
  16. package/lib/components/Carousel/index.js +44 -44
  17. package/lib/components/CarouselThumbnail/CarouselThumbnail.stories.d.ts +1 -1
  18. package/lib/components/CarouselThumbnail/index.d.ts +1 -1
  19. package/lib/components/CarouselThumbnail/index.js +33 -32
  20. package/lib/components/Checkbox/Checkbox.stories.d.ts +1 -1
  21. package/lib/components/Collapsible/Collapsible.stories.d.ts +1 -1
  22. package/lib/components/Collapsible/index.d.ts +2 -2
  23. package/lib/components/Collapsible/index.js +40 -42
  24. package/lib/components/Counter/Counter.stories.d.ts +1 -1
  25. package/lib/components/Counter/index.js +6 -6
  26. package/lib/components/DetailUpdater/DetailUpdater.stories.d.ts +1 -1
  27. package/lib/components/DetailUpdater/index.d.ts +0 -1
  28. package/lib/components/Dropdown/Dropdown.stories.d.ts +1 -1
  29. package/lib/components/Dropdown/index.d.ts +1 -1
  30. package/lib/components/Dropdown/index.js +34 -32
  31. package/lib/components/FileUploader/FileUploader.stories.d.ts +1 -1
  32. package/lib/components/Footer/Footer.stories.d.ts +1 -1
  33. package/lib/components/FooterNav/FooterNav.stories.d.ts +3 -3
  34. package/lib/components/FooterNav/index.d.ts +3 -3
  35. package/lib/components/FooterNav/index.js +6 -5
  36. package/lib/components/Form/Form.stories.d.ts +1 -1
  37. package/lib/components/Form/index.d.ts +1 -1
  38. package/lib/components/Gallery/Gallery.stories.d.ts +1 -1
  39. package/lib/components/Gallery/index.d.ts +1 -1
  40. package/lib/components/Greeting/Greeting.stories.d.ts +1 -1
  41. package/lib/components/HamburgerIcon/HamburgerIcon.stories.d.ts +1 -1
  42. package/lib/components/Icon/Icon.stories.d.ts +1 -1
  43. package/lib/components/Icon/index.d.ts +1 -1
  44. package/lib/components/Image/Image.stories.d.ts +1 -1
  45. package/lib/components/ImageCard/ImageCard.stories.d.ts +1 -1
  46. package/lib/components/ImageCard/index.d.ts +1 -1
  47. package/lib/components/ImageCard/index.js +10 -9
  48. package/lib/components/Input/Input.stories.d.ts +3 -3
  49. package/lib/components/Input/index.d.ts +2 -2
  50. package/lib/components/Input/index.js +22 -21
  51. package/lib/components/Link/Link.stories.d.ts +1 -2
  52. package/lib/components/Link/index.js +18 -17
  53. package/lib/components/Map/Map.stories.d.ts +1 -1
  54. package/lib/components/Map/index.js +2 -2
  55. package/lib/components/Map/utils.d.ts +1 -1
  56. package/lib/components/Map/utils.js +3 -6
  57. package/lib/components/MenuButton/MenuButton.stories.d.ts +1 -1
  58. package/lib/components/Nav/Nav.stories.d.ts +2 -2
  59. package/lib/components/Nav/index.d.ts +2 -2
  60. package/lib/components/Nav/index.js +49 -49
  61. package/lib/components/NavItem/NavItem.stories.d.ts +5 -5
  62. package/lib/components/NavItem/index.d.ts +4 -4
  63. package/lib/components/Pill/Pill.stories.d.ts +1 -1
  64. package/lib/components/Pill/index.js +6 -6
  65. package/lib/components/Search/Search.stories.d.ts +1 -1
  66. package/lib/components/Select/Select.stories.d.ts +1 -1
  67. package/lib/components/Showcase/Showcase.stories.d.ts +1 -1
  68. package/lib/components/Showcase/index.d.ts +1 -1
  69. package/lib/components/SideNav/SideNav.stories.d.ts +1 -1
  70. package/lib/components/SocialButton/SocialButton.stories.d.ts +1 -1
  71. package/lib/components/SplitCard/SplitCard.stories.d.ts +1 -1
  72. package/lib/components/SplitCard/index.js +3 -3
  73. package/lib/components/Stars/Stars.stories.d.ts +1 -1
  74. package/lib/components/Testimonial/Testimonial.stories.d.ts +1 -1
  75. package/lib/components/Testimonial/index.d.ts +1 -1
  76. package/lib/components/TextArea/TextArea.stories.d.ts +2 -2
  77. package/lib/components/TextArea/index.d.ts +1 -1
  78. package/lib/components/TextArea/index.js +3 -3
  79. package/lib/components/Timeline/Timeline.stories.d.ts +1 -1
  80. package/lib/components/Timeline/index.js +14 -14
  81. package/lib/components/Tubestops/Tubestops.stories.d.ts +1 -1
  82. package/lib/components/Tubestops/index.js +58 -61
  83. package/lib/components/Video/Video.stories.d.ts +1 -1
  84. package/lib/components/Video/index.d.ts +1 -1
  85. package/lib/components/index.d.ts +37 -37
  86. package/lib/documentation/assets/index.d.ts +1 -1
  87. package/lib/documentation/typography/Fonts/Fonts.stories.d.ts +1 -1
  88. package/lib/node_modules/keen-slider/react.js +261 -294
  89. package/lib/style.css +1 -1
  90. package/lib/utils/matchMedia.js +1 -2
  91. package/lib/utils/screens.js +3 -7
  92. package/package.json +2 -2
  93. package/lib/components/Calendar/style.css.js +0 -1
  94. package/lib/components/Map/map.css.js +0 -1
  95. package/lib/node_modules/@maptiler/sdk/dist/maptiler-sdk.css.js +0 -1
  96. package/lib/node_modules/keen-slider/keen-slider.min.css.js +0 -1
@@ -1,24 +1,23 @@
1
- import { __exports as ct } from "../../_virtual/react.js";
1
+ import { __exports as st } from "../../_virtual/react.js";
2
2
  import vt from "react";
3
- Object.defineProperty(ct, "__esModule", { value: !0 });
3
+ Object.defineProperty(st, "__esModule", { value: !0 });
4
4
  var $ = vt;
5
- function et(t) {
5
+ function nt(t) {
6
6
  return Array.prototype.slice.call(t);
7
7
  }
8
- function at(t, r) {
9
- var i = Math.floor(t);
10
- return i === r || i + 1 === r ? t : r;
8
+ function at(t, e) {
9
+ var r = Math.floor(t);
10
+ return r === e || r + 1 === e ? t : e;
11
11
  }
12
12
  function ot() {
13
13
  return Date.now();
14
14
  }
15
- function Z(t, r, i) {
16
- if (r = "data-keen-slider-" + r, i === null)
17
- return t.removeAttribute(r);
18
- t.setAttribute(r, i || "");
15
+ function Z(t, e, r) {
16
+ if (e = "data-keen-slider-" + e, r === null) return t.removeAttribute(e);
17
+ t.setAttribute(e, r || "");
19
18
  }
20
- function U(t, r) {
21
- return r = r || document, typeof t == "function" && (t = t(r)), Array.isArray(t) ? t : typeof t == "string" ? et(r.querySelectorAll(t)) : t instanceof HTMLElement ? [t] : t instanceof NodeList ? et(t) : [];
19
+ function U(t, e) {
20
+ return e = e || document, typeof t == "function" && (t = t(e)), Array.isArray(t) ? t : typeof t == "string" ? nt(e.querySelectorAll(t)) : t instanceof HTMLElement ? [t] : t instanceof NodeList ? nt(t) : [];
22
21
  }
23
22
  function B(t) {
24
23
  t.raw && (t = t.raw), t.cancelable && !t.defaultPrevented && t.preventDefault();
@@ -26,88 +25,77 @@ function B(t) {
26
25
  function G(t) {
27
26
  t.raw && (t = t.raw), t.stopPropagation && t.stopPropagation();
28
27
  }
29
- function st() {
28
+ function ct() {
30
29
  var t = [];
31
- return { add: function(r, i, o, u) {
32
- r.addListener ? r.addListener(o) : r.addEventListener(i, o, u), t.push([r, i, o, u]);
33
- }, input: function(r, i, o, u) {
34
- this.add(r, i, /* @__PURE__ */ function(a) {
35
- return function(e) {
36
- e.nativeEvent && (e = e.nativeEvent);
37
- var k = e.changedTouches || [], x = e.targetTouches || [], l = e.detail && e.detail.x ? e.detail : null;
38
- return a({ id: l ? l.identifier ? l.identifier : "i" : x[0] ? x[0] ? x[0].identifier : "e" : "d", idChanged: l ? l.identifier ? l.identifier : "i" : k[0] ? k[0] ? k[0].identifier : "e" : "d", raw: e, x: l && l.x ? l.x : x[0] ? x[0].screenX : l ? l.x : e.pageX, y: l && l.y ? l.y : x[0] ? x[0].screenY : l ? l.y : e.pageY });
30
+ return { add: function(e, r, o, u) {
31
+ e.addListener ? e.addListener(o) : e.addEventListener(r, o, u), t.push([e, r, o, u]);
32
+ }, input: function(e, r, o, u) {
33
+ this.add(e, r, /* @__PURE__ */ function(a) {
34
+ return function(n) {
35
+ n.nativeEvent && (n = n.nativeEvent);
36
+ var k = n.changedTouches || [], x = n.targetTouches || [], d = n.detail && n.detail.x ? n.detail : null;
37
+ return a({ id: d ? d.identifier ? d.identifier : "i" : x[0] ? x[0] ? x[0].identifier : "e" : "d", idChanged: d ? d.identifier ? d.identifier : "i" : k[0] ? k[0] ? k[0].identifier : "e" : "d", raw: n, x: d && d.x ? d.x : x[0] ? x[0].screenX : d ? d.x : n.pageX, y: d && d.y ? d.y : x[0] ? x[0].screenY : d ? d.y : n.pageY });
39
38
  };
40
39
  }(o), u);
41
40
  }, purge: function() {
42
- t.forEach(function(r) {
43
- r[0].removeListener ? r[0].removeListener(r[2]) : r[0].removeEventListener(r[1], r[2], r[3]);
41
+ t.forEach(function(e) {
42
+ e[0].removeListener ? e[0].removeListener(e[2]) : e[0].removeEventListener(e[1], e[2], e[3]);
44
43
  }), t = [];
45
44
  } };
46
45
  }
47
- function tt(t, r, i) {
48
- return Math.min(Math.max(t, r), i);
46
+ function tt(t, e, r) {
47
+ return Math.min(Math.max(t, e), r);
49
48
  }
50
49
  function F(t) {
51
50
  return (t > 0 ? 1 : 0) - (t < 0 ? 1 : 0) || +t;
52
51
  }
53
52
  function ut(t) {
54
- var r = t.getBoundingClientRect();
55
- return { height: at(r.height, t.offsetHeight), width: at(r.width, t.offsetWidth) };
53
+ var e = t.getBoundingClientRect();
54
+ return { height: at(e.height, t.offsetHeight), width: at(e.width, t.offsetWidth) };
56
55
  }
57
- function N(t, r, i, o) {
58
- var u = t && t[r];
59
- return u == null ? i : o && typeof u == "function" ? u() : u;
56
+ function N(t, e, r, o) {
57
+ var u = t && t[e];
58
+ return u == null ? r : o && typeof u == "function" ? u() : u;
60
59
  }
61
60
  function W(t) {
62
61
  return Math.round(1e6 * t) / 1e6;
63
62
  }
64
- function dt(t, r) {
65
- if (t === r)
66
- return !0;
67
- var i = typeof t;
68
- if (i !== typeof r)
69
- return !1;
70
- if (i !== "object" || t === null || r === null)
71
- return i === "function" && t.toString() === r.toString();
72
- if (t.length !== r.length || Object.getOwnPropertyNames(t).length !== Object.getOwnPropertyNames(r).length)
73
- return !1;
74
- for (var o in t)
75
- if (!dt(t[o], r[o]))
76
- return !1;
63
+ function lt(t, e) {
64
+ if (t === e) return !0;
65
+ var r = typeof t;
66
+ if (r !== typeof e) return !1;
67
+ if (r !== "object" || t === null || e === null) return r === "function" && t.toString() === e.toString();
68
+ if (t.length !== e.length || Object.getOwnPropertyNames(t).length !== Object.getOwnPropertyNames(e).length) return !1;
69
+ for (var o in t) if (!lt(t[o], e[o])) return !1;
77
70
  return !0;
78
71
  }
79
72
  var Y = function() {
80
73
  return Y = Object.assign || function(t) {
81
- for (var r, i = 1, o = arguments.length; i < o; i++)
82
- for (var u in r = arguments[i])
83
- Object.prototype.hasOwnProperty.call(r, u) && (t[u] = r[u]);
74
+ for (var e, r = 1, o = arguments.length; r < o; r++) for (var u in e = arguments[r]) Object.prototype.hasOwnProperty.call(e, u) && (t[u] = e[u]);
84
75
  return t;
85
76
  }, Y.apply(this, arguments);
86
77
  };
87
- function lt(t, r, i) {
88
- for (var o, u = 0, a = r.length; u < a; u++)
89
- !o && u in r || (o || (o = Array.prototype.slice.call(r, 0, u)), o[u] = r[u]);
90
- return t.concat(o || Array.prototype.slice.call(r));
78
+ function dt(t, e, r) {
79
+ for (var o, u = 0, a = e.length; u < a; u++) !o && u in e || (o || (o = Array.prototype.slice.call(e, 0, u)), o[u] = e[u]);
80
+ return t.concat(o || Array.prototype.slice.call(e));
91
81
  }
92
82
  function mt(t) {
93
- var r, i, o, u, a, e;
83
+ var e, r, o, u, a, n;
94
84
  function k(M) {
95
- e || (e = M), x(!0);
96
- var E = M - e;
85
+ n || (n = M), x(!0);
86
+ var E = M - n;
97
87
  E > o && (E = o);
98
- var v = u[i];
99
- if (v[3] < E)
100
- return i++, k(M);
88
+ var v = u[r];
89
+ if (v[3] < E) return r++, k(M);
101
90
  var T = v[2], z = v[4], m = v[0], h = v[1] * (0, v[5])(z === 0 ? 1 : (E - T) / z);
102
- if (h && t.track.to(m + h), E < o)
103
- return C();
104
- e = null, x(!1), l(null), t.emit("animationEnded");
91
+ if (h && t.track.to(m + h), E < o) return C();
92
+ n = null, x(!1), d(null), t.emit("animationEnded");
105
93
  }
106
94
  function x(M) {
107
- r.active = M;
95
+ e.active = M;
108
96
  }
109
- function l(M) {
110
- r.targetIdx = M;
97
+ function d(M) {
98
+ e.targetIdx = M;
111
99
  }
112
100
  function C() {
113
101
  var M;
@@ -115,128 +103,123 @@ function mt(t) {
115
103
  }
116
104
  function D() {
117
105
  var M;
118
- M = a, window.cancelAnimationFrame(M), x(!1), l(null), e && t.emit("animationStopped"), e = null;
106
+ M = a, window.cancelAnimationFrame(M), x(!1), d(null), n && t.emit("animationStopped"), n = null;
119
107
  }
120
- return r = { active: !1, start: function(M) {
108
+ return e = { active: !1, start: function(M) {
121
109
  if (D(), t.track.details) {
122
110
  var E = 0, v = t.track.details.position;
123
- i = 0, o = 0, u = M.map(function(T) {
111
+ r = 0, o = 0, u = M.map(function(T) {
124
112
  var z, m = Number(v), h = (z = T.earlyExit) !== null && z !== void 0 ? z : T.duration, p = T.easing, _ = T.distance * p(h / T.duration) || 0;
125
113
  v += _;
126
114
  var A = o;
127
115
  return o += h, E += _, [m, T.distance, A, o, T.duration, p];
128
- }), l(t.track.distToIdx(E)), C(), t.emit("animationStarted");
116
+ }), d(t.track.distToIdx(E)), C(), t.emit("animationStarted");
129
117
  }
130
118
  }, stop: D, targetIdx: null };
131
119
  }
132
120
  function ht(t) {
133
- var r, i, o, u, a, e, k, x, l, C, D, M, E, v, T = 1 / 0, z = [], m = null, h = 0;
121
+ var e, r, o, u, a, n, k, x, d, C, D, M, E, v, T = 1 / 0, z = [], m = null, h = 0;
134
122
  function p(f) {
135
123
  H(h + f);
136
124
  }
137
125
  function _(f) {
138
- var s = A(h + f).abs;
139
- return w(s) ? s : null;
126
+ var c = A(h + f).abs;
127
+ return w(c) ? c : null;
140
128
  }
141
129
  function A(f) {
142
- var s = Math.floor(Math.abs(W(f / i))), n = W((f % i + i) % i);
143
- n === i && (n = 0);
144
- var b = F(f), d = k.indexOf(lt([], k).reduce(function(I, O) {
145
- return Math.abs(O - n) < Math.abs(I - n) ? O : I;
146
- })), y = d;
147
- return b < 0 && s++, d === e && (y = 0, s += b > 0 ? 1 : -1), { abs: y + s * e * b, origin: d, rel: y };
148
- }
149
- function S(f, s, n) {
130
+ var c = Math.floor(Math.abs(W(f / r))), i = W((f % r + r) % r);
131
+ i === r && (i = 0);
132
+ var b = F(f), l = k.indexOf(dt([], k).reduce(function(I, O) {
133
+ return Math.abs(O - i) < Math.abs(I - i) ? O : I;
134
+ })), y = l;
135
+ return b < 0 && c++, l === n && (y = 0, c += b > 0 ? 1 : -1), { abs: y + c * n * b, origin: l, rel: y };
136
+ }
137
+ function S(f, c, i) {
150
138
  var b;
151
- if (s || !q())
152
- return c(f, n);
153
- if (!w(f))
154
- return null;
155
- var d = A(n ?? h), y = d.abs, I = f - d.rel, O = y + I;
156
- b = c(O);
157
- var P = c(O - e * F(I));
139
+ if (c || !q()) return s(f, i);
140
+ if (!w(f)) return null;
141
+ var l = A(i ?? h), y = l.abs, I = f - l.rel, O = y + I;
142
+ b = s(O);
143
+ var P = s(O - n * F(I));
158
144
  return (P !== null && Math.abs(P) < Math.abs(b) || b === null) && (b = P), W(b);
159
145
  }
160
- function c(f, s) {
161
- if (s == null && (s = W(h)), !w(f) || f === null)
162
- return null;
146
+ function s(f, c) {
147
+ if (c == null && (c = W(h)), !w(f) || f === null) return null;
163
148
  f = Math.round(f);
164
- var n = A(s), b = n.abs, d = n.rel, y = n.origin, I = R(f), O = (s % i + i) % i, P = k[y], V = Math.floor((f - (b - d)) / e) * i;
165
- return W(P - O - P + k[I] + V + (y === e ? i : 0));
149
+ var i = A(c), b = i.abs, l = i.rel, y = i.origin, I = R(f), O = (c % r + r) % r, P = k[y], V = Math.floor((f - (b - l)) / n) * r;
150
+ return W(P - O - P + k[I] + V + (y === n ? r : 0));
166
151
  }
167
152
  function w(f) {
168
153
  return L(f) === f;
169
154
  }
170
155
  function L(f) {
171
- return tt(f, l, C);
156
+ return tt(f, d, C);
172
157
  }
173
158
  function q() {
174
159
  return u.loop;
175
160
  }
176
161
  function R(f) {
177
- return (f % e + e) % e;
162
+ return (f % n + n) % n;
178
163
  }
179
164
  function H(f) {
180
- var s;
181
- s = f - h, z.push({ distance: s, timestamp: ot() }), z.length > 6 && (z = z.slice(-6)), h = W(f);
182
- var n = g().abs;
183
- if (n !== m) {
165
+ var c;
166
+ c = f - h, z.push({ distance: c, timestamp: ot() }), z.length > 6 && (z = z.slice(-6)), h = W(f);
167
+ var i = g().abs;
168
+ if (i !== m) {
184
169
  var b = m !== null;
185
- m = n, b && t.emit("slideChanged");
170
+ m = i, b && t.emit("slideChanged");
186
171
  }
187
172
  }
188
173
  function g(f) {
189
- var s = f ? null : function() {
190
- if (e) {
191
- var n = q(), b = n ? (h % i + i) % i : h, d = (n ? h % i : h) - a[0][2], y = 0 - (d < 0 && n ? i - Math.abs(d) : d), I = 0, O = A(h), P = O.abs, V = O.rel, J = a[V][2], Q = a.map(function(X, ft) {
174
+ var c = f ? null : function() {
175
+ if (n) {
176
+ var i = q(), b = i ? (h % r + r) % r : h, l = (i ? h % r : h) - a[0][2], y = 0 - (l < 0 && i ? r - Math.abs(l) : l), I = 0, O = A(h), P = O.abs, V = O.rel, J = a[V][2], Q = a.map(function(X, ft) {
192
177
  var j = y + I;
193
- (j < 0 - X[0] || j > 1) && (j += (Math.abs(j) > i - 1 && n ? i : 0) * F(-j));
194
- var it = ft - V, rt = F(it), K = it + P;
195
- n && (rt === -1 && j > J && (K += e), rt === 1 && j < J && (K -= e), D !== null && K < D && (j += i), M !== null && K > M && (j -= i));
196
- var nt = j + X[0] + X[1], pt = Math.max(j >= 0 && nt <= 1 ? 1 : nt < 0 || j > 1 ? 0 : j < 0 ? Math.min(1, (X[0] + j) / X[0]) : (1 - j) / X[0], 0);
178
+ (j < 0 - X[0] || j > 1) && (j += (Math.abs(j) > r - 1 && i ? r : 0) * F(-j));
179
+ var rt = ft - V, et = F(rt), K = rt + P;
180
+ i && (et === -1 && j > J && (K += n), et === 1 && j < J && (K -= n), D !== null && K < D && (j += r), M !== null && K > M && (j -= r));
181
+ var it = j + X[0] + X[1], pt = Math.max(j >= 0 && it <= 1 ? 1 : it < 0 || j > 1 ? 0 : j < 0 ? Math.min(1, (X[0] + j) / X[0]) : (1 - j) / X[0], 0);
197
182
  return I += X[0] + X[1], { abs: K, distance: u.rtl ? -1 * j + 1 - X[0] : j, portion: pt, size: X[0] };
198
183
  });
199
- return P = L(P), V = R(P), { abs: L(P), length: o, max: v, maxIdx: C, min: E, minIdx: l, position: h, progress: n ? b / i : h / o, rel: V, slides: Q, slidesLength: i };
184
+ return P = L(P), V = R(P), { abs: L(P), length: o, max: v, maxIdx: C, min: E, minIdx: d, position: h, progress: i ? b / r : h / o, rel: V, slides: Q, slidesLength: r };
200
185
  }
201
186
  }();
202
- return r.details = s, t.emit("detailsChanged"), s;
187
+ return e.details = c, t.emit("detailsChanged"), c;
203
188
  }
204
- return r = { absToRel: R, add: p, details: null, distToIdx: _, idxToDist: S, init: function(f) {
189
+ return e = { absToRel: R, add: p, details: null, distToIdx: _, idxToDist: S, init: function(f) {
205
190
  if (function() {
206
- if (u = t.options, a = (u.trackConfig || []).map(function(d) {
207
- return [N(d, "size", 1), N(d, "spacing", 0), N(d, "origin", 0)];
208
- }), e = a.length) {
209
- i = W(a.reduce(function(d, y) {
210
- return d + y[0] + y[1];
191
+ if (u = t.options, a = (u.trackConfig || []).map(function(l) {
192
+ return [N(l, "size", 1), N(l, "spacing", 0), N(l, "origin", 0)];
193
+ }), n = a.length) {
194
+ r = W(a.reduce(function(l, y) {
195
+ return l + y[0] + y[1];
211
196
  }, 0));
212
- var n, b = e - 1;
213
- o = W(i + a[0][2] - a[b][0] - a[b][2] - a[b][1]), k = a.reduce(function(d, y) {
214
- if (!d)
215
- return [0];
216
- var I = a[d.length - 1], O = d[d.length - 1] + (I[0] + I[2]) + I[1];
217
- return O -= y[2], d[d.length - 1] > O && (O = d[d.length - 1]), O = W(O), d.push(O), (!n || n < O) && (x = d.length - 1), n = O, d;
218
- }, null), o === 0 && (x = 0), k.push(W(i));
197
+ var i, b = n - 1;
198
+ o = W(r + a[0][2] - a[b][0] - a[b][2] - a[b][1]), k = a.reduce(function(l, y) {
199
+ if (!l) return [0];
200
+ var I = a[l.length - 1], O = l[l.length - 1] + (I[0] + I[2]) + I[1];
201
+ return O -= y[2], l[l.length - 1] > O && (O = l[l.length - 1]), O = W(O), l.push(O), (!i || i < O) && (x = l.length - 1), i = O, l;
202
+ }, null), o === 0 && (x = 0), k.push(W(r));
219
203
  }
220
- }(), !e)
221
- return g(!0);
222
- var s;
204
+ }(), !n) return g(!0);
205
+ var c;
223
206
  (function() {
224
- var n = t.options.range, b = t.options.loop;
225
- D = l = b ? N(b, "min", -1 / 0) : 0, M = C = b ? N(b, "max", T) : x;
226
- var d = N(n, "min", null), y = N(n, "max", null);
227
- d !== null && (l = d), y !== null && (C = y), E = l === -1 / 0 ? l : t.track.idxToDist(l || 0, !0, 0), v = C === T ? C : S(C, !0, 0), y === null && (M = C), N(n, "align", !1) && C !== T && a[R(C)][2] === 0 && (v -= 1 - a[R(C)][0], C = _(v - h)), E = W(E), v = W(v);
228
- })(), s = f, Number(s) === s ? p(c(L(f))) : g();
207
+ var i = t.options.range, b = t.options.loop;
208
+ D = d = b ? N(b, "min", -1 / 0) : 0, M = C = b ? N(b, "max", T) : x;
209
+ var l = N(i, "min", null), y = N(i, "max", null);
210
+ l !== null && (d = l), y !== null && (C = y), E = d === -1 / 0 ? d : t.track.idxToDist(d || 0, !0, 0), v = C === T ? C : S(C, !0, 0), y === null && (M = C), N(i, "align", !1) && C !== T && a[R(C)][2] === 0 && (v -= 1 - a[R(C)][0], C = _(v - h)), E = W(E), v = W(v);
211
+ })(), c = f, Number(c) === c ? p(s(L(f))) : g();
229
212
  }, to: H, velocity: function() {
230
- var f = ot(), s = z.reduce(function(n, b) {
231
- var d = b.distance, y = b.timestamp;
232
- return f - y > 200 || (F(d) !== F(n.distance) && n.distance && (n = { distance: 0, lastTimestamp: 0, time: 0 }), n.time && (n.distance += d), n.lastTimestamp && (n.time += y - n.lastTimestamp), n.lastTimestamp = y), n;
213
+ var f = ot(), c = z.reduce(function(i, b) {
214
+ var l = b.distance, y = b.timestamp;
215
+ return f - y > 200 || (F(l) !== F(i.distance) && i.distance && (i = { distance: 0, lastTimestamp: 0, time: 0 }), i.time && (i.distance += l), i.lastTimestamp && (i.time += y - i.lastTimestamp), i.lastTimestamp = y), i;
233
216
  }, { distance: 0, lastTimestamp: 0, time: 0 });
234
- return s.distance / s.time || 0;
217
+ return c.distance / c.time || 0;
235
218
  } };
236
219
  }
237
220
  function gt(t) {
238
- var r, i, o, u, a, e, k, x;
239
- function l(m) {
221
+ var e, r, o, u, a, n, k, x;
222
+ function d(m) {
240
223
  return 2 * m;
241
224
  }
242
225
  function C(m) {
@@ -254,30 +237,28 @@ function gt(t) {
254
237
  u = F(p);
255
238
  var _ = t.track.details, A = [];
256
239
  if (p || !m) {
257
- var S = v(p), c = S.dist, w = S.dur;
258
- if (w = l(w), c *= u, m) {
259
- var L = h.idxToDist(h.distToIdx(c), !0);
260
- L && (c = L);
240
+ var S = v(p), s = S.dist, w = S.dur;
241
+ if (w = d(w), s *= u, m) {
242
+ var L = h.idxToDist(h.distToIdx(s), !0);
243
+ L && (s = L);
261
244
  }
262
- A.push({ distance: c, duration: w, easing: D });
263
- var q = _.position, R = q + c;
264
- if (R < a || R > e) {
265
- var H = R < a ? a - q : e - q, g = 0, f = p;
245
+ A.push({ distance: s, duration: w, easing: D });
246
+ var q = _.position, R = q + s;
247
+ if (R < a || R > n) {
248
+ var H = R < a ? a - q : n - q, g = 0, f = p;
266
249
  if (F(H) === u) {
267
- var s = Math.min(Math.abs(H) / Math.abs(c), 1), n = function(y) {
250
+ var c = Math.min(Math.abs(H) / Math.abs(s), 1), i = function(y) {
268
251
  return 1 - Math.pow(1 - y, 1 / 3);
269
- }(s) * w;
270
- A[0].earlyExit = n, f = p * (1 - s);
271
- } else
272
- A[0].earlyExit = 0, g += H;
273
- var b = v(f, 100), d = b.dist * u;
274
- t.options.rubberband && (A.push({ distance: d, duration: l(b.dur), easing: D }), A.push({ distance: -d + g, duration: 500, easing: D }));
252
+ }(c) * w;
253
+ A[0].earlyExit = i, f = p * (1 - c);
254
+ } else A[0].earlyExit = 0, g += H;
255
+ var b = v(f, 100), l = b.dist * u;
256
+ t.options.rubberband && (A.push({ distance: l, duration: d(b.dur), easing: D }), A.push({ distance: -l + g, duration: 500, easing: D }));
275
257
  }
276
258
  t.animator.start(A);
277
- } else
278
- t.moveToIdx(C(_.abs), !0, { duration: 500, easing: function(y) {
279
- return 1 + --y * y * y * y * y;
280
- } });
259
+ } else t.moveToIdx(C(_.abs), !0, { duration: 500, easing: function(y) {
260
+ return 1 + --y * y * y * y * y;
261
+ } });
281
262
  }
282
263
  function v(m, h) {
283
264
  h === void 0 && (h = 1e3);
@@ -286,71 +267,65 @@ function gt(t) {
286
267
  }
287
268
  function T() {
288
269
  var m = t.track.details;
289
- m && (a = m.min, e = m.max, k = m.minIdx, x = m.maxIdx);
270
+ m && (a = m.min, n = m.max, k = m.minIdx, x = m.maxIdx);
290
271
  }
291
272
  function z() {
292
273
  t.animator.stop();
293
274
  }
294
275
  t.on("updated", T), t.on("optionsChanged", T), t.on("created", T), t.on("dragStarted", function() {
295
- o = !1, z(), r = i = t.track.details.abs;
276
+ o = !1, z(), e = r = t.track.details.abs;
296
277
  }), t.on("dragChecked", function() {
297
278
  o = !0;
298
279
  }), t.on("dragEnded", function() {
299
280
  var m = t.options.mode;
300
281
  m === "snap" && function() {
301
282
  var h = t.track, p = t.track.details, _ = p.position, A = F(M());
302
- (_ > e || _ < a) && (A = 0);
303
- var S = r + A;
304
- p.slides[h.absToRel(S)].portion === 0 && (S -= A), r !== i && (S = i), F(h.idxToDist(S, !0)) !== A && (S += A), S = C(S);
305
- var c = h.idxToDist(S, !0);
306
- t.animator.start([{ distance: c, duration: 500, easing: function(w) {
283
+ (_ > n || _ < a) && (A = 0);
284
+ var S = e + A;
285
+ p.slides[h.absToRel(S)].portion === 0 && (S -= A), e !== r && (S = r), F(h.idxToDist(S, !0)) !== A && (S += A), S = C(S);
286
+ var s = h.idxToDist(S, !0);
287
+ t.animator.start([{ distance: s, duration: 500, easing: function(w) {
307
288
  return 1 + --w * w * w * w * w;
308
289
  } }]);
309
290
  }(), m !== "free" && m !== "free-snap" || E();
310
291
  }), t.on("dragged", function() {
311
- i = t.track.details.abs;
292
+ r = t.track.details.abs;
312
293
  });
313
294
  }
314
295
  function bt(t) {
315
- var r, i, o, u, a, e, k, x, l, C, D, M, E, v, T, z, m, h, p = st();
296
+ var e, r, o, u, a, n, k, x, d, C, D, M, E, v, T, z, m, h, p = ct();
316
297
  function _(g) {
317
- if (e && x === g.id) {
298
+ if (n && x === g.id) {
318
299
  var f = w(g);
319
- if (l) {
320
- if (!c(g))
321
- return S(g);
322
- C = f, l = !1, t.emit("dragChecked");
300
+ if (d) {
301
+ if (!s(g)) return S(g);
302
+ C = f, d = !1, t.emit("dragChecked");
323
303
  }
324
- if (z)
325
- return C = f;
304
+ if (z) return C = f;
326
305
  B(g);
327
- var s = function(b) {
328
- if (m === -1 / 0 && h === 1 / 0)
329
- return b;
330
- var d = t.track.details, y = d.length, I = d.position, O = tt(b, m - I, h - I);
331
- if (y === 0)
332
- return 0;
333
- if (!t.options.rubberband)
334
- return O;
335
- if (I <= h && I >= m || I < m && i > 0 || I > h && i < 0)
336
- return b;
306
+ var c = function(b) {
307
+ if (m === -1 / 0 && h === 1 / 0) return b;
308
+ var l = t.track.details, y = l.length, I = l.position, O = tt(b, m - I, h - I);
309
+ if (y === 0) return 0;
310
+ if (!t.options.rubberband) return O;
311
+ if (I <= h && I >= m || I < m && r > 0 || I > h && r < 0) return b;
337
312
  var P = (I < m ? I - m : I - h) / y, V = u * y, J = Math.abs(P * V), Q = Math.max(0, 1 - J / a * 2);
338
313
  return Q * Q * b;
339
314
  }(k(C - f) / u * o);
340
- i = F(s);
341
- var n = t.track.details.position;
342
- (n > m && n < h || n === m && i > 0 || n === h && i < 0) && G(g), D += s, !M && Math.abs(D * u) > 5 && (M = !0), t.track.add(s), C = f, t.emit("dragged");
315
+ r = F(c);
316
+ var i = t.track.details.position;
317
+ (i > m && i < h || i === m && r > 0 || i === h && r < 0) && G(g), D += c, !M && Math.abs(D * u) > 5 && (M = !0), t.track.add(c), C = f, t.emit("dragged");
343
318
  }
344
319
  }
345
320
  function A(g) {
346
- !e && t.track.details && t.track.details.length && (D = 0, e = !0, M = !1, l = !0, x = g.id, c(g), C = w(g), t.emit("dragStarted"));
321
+ !n && t.track.details && t.track.details.length && (D = 0, n = !0, M = !1, d = !0, x = g.id, s(g), C = w(g), t.emit("dragStarted"));
347
322
  }
348
323
  function S(g) {
349
- e && x === g.idChanged && (e = !1, t.emit("dragEnded"));
324
+ n && x === g.idChanged && (n = !1, t.emit("dragEnded"));
350
325
  }
351
- function c(g) {
352
- var f = L(), s = f ? g.y : g.x, n = f ? g.x : g.y, b = E !== void 0 && v !== void 0 && Math.abs(v - n) <= Math.abs(E - s);
353
- return E = s, v = n, b;
326
+ function s(g) {
327
+ var f = L(), c = f ? g.y : g.x, i = f ? g.x : g.y, b = E !== void 0 && v !== void 0 && Math.abs(v - i) <= Math.abs(E - c);
328
+ return E = c, v = i, b;
354
329
  }
355
330
  function w(g) {
356
331
  return L() ? g.y : g.x;
@@ -369,60 +344,57 @@ function bt(t) {
369
344
  function H() {
370
345
  if (p.purge(), t.options.drag && !t.options.disabled) {
371
346
  var g;
372
- g = t.options.dragSpeed || 1, k = typeof g == "function" ? g : function(s) {
373
- return s * g;
374
- }, o = t.options.rtl ? -1 : 1, q(), r = t.container, function() {
375
- var s = "data-keen-slider-clickable";
376
- U("[".concat(s, "]:not([").concat(s, "=false])"), r).map(function(n) {
377
- p.add(n, "dragstart", G), p.add(n, "mousedown", G), p.add(n, "touchstart", G);
347
+ g = t.options.dragSpeed || 1, k = typeof g == "function" ? g : function(c) {
348
+ return c * g;
349
+ }, o = t.options.rtl ? -1 : 1, q(), e = t.container, function() {
350
+ var c = "data-keen-slider-clickable";
351
+ U("[".concat(c, "]:not([").concat(c, "=false])"), e).map(function(i) {
352
+ p.add(i, "dragstart", G), p.add(i, "mousedown", G), p.add(i, "touchstart", G);
378
353
  });
379
- }(), p.add(r, "dragstart", function(s) {
380
- B(s);
381
- }), p.add(r, "click", R, { capture: !0 }), p.input(r, "ksDragStart", A), p.input(r, "ksDrag", _), p.input(r, "ksDragEnd", S), p.input(r, "mousedown", A), p.input(r, "mousemove", _), p.input(r, "mouseleave", S), p.input(r, "mouseup", S), p.input(r, "touchstart", A, { passive: !0 }), p.input(r, "touchmove", _, { passive: !1 }), p.input(r, "touchend", S), p.input(r, "touchcancel", S), p.add(window, "wheel", function(s) {
382
- e && B(s);
354
+ }(), p.add(e, "dragstart", function(c) {
355
+ B(c);
356
+ }), p.add(e, "click", R, { capture: !0 }), p.input(e, "ksDragStart", A), p.input(e, "ksDrag", _), p.input(e, "ksDragEnd", S), p.input(e, "mousedown", A), p.input(e, "mousemove", _), p.input(e, "mouseleave", S), p.input(e, "mouseup", S), p.input(e, "touchstart", A, { passive: !0 }), p.input(e, "touchmove", _, { passive: !1 }), p.input(e, "touchend", S), p.input(e, "touchcancel", S), p.add(window, "wheel", function(c) {
357
+ n && B(c);
383
358
  });
384
359
  var f = "data-keen-slider-scrollable";
385
- U("[".concat(f, "]:not([").concat(f, "=false])"), t.container).map(function(s) {
386
- return function(n) {
360
+ U("[".concat(f, "]:not([").concat(f, "=false])"), t.container).map(function(c) {
361
+ return function(i) {
387
362
  var b;
388
- p.input(n, "touchstart", function(d) {
389
- b = w(d), z = !0, T = !0;
390
- }, { passive: !0 }), p.input(n, "touchmove", function(d) {
391
- var y = L(), I = y ? n.scrollHeight - n.clientHeight : n.scrollWidth - n.clientWidth, O = b - w(d), P = y ? n.scrollTop : n.scrollLeft, V = y && n.style.overflowY === "scroll" || !y && n.style.overflowX === "scroll";
392
- if (b = w(d), (O < 0 && P > 0 || O > 0 && P < I) && T && V)
393
- return z = !0;
394
- T = !1, B(d), z = !1;
395
- }), p.input(n, "touchend", function() {
363
+ p.input(i, "touchstart", function(l) {
364
+ b = w(l), z = !0, T = !0;
365
+ }, { passive: !0 }), p.input(i, "touchmove", function(l) {
366
+ var y = L(), I = y ? i.scrollHeight - i.clientHeight : i.scrollWidth - i.clientWidth, O = b - w(l), P = y ? i.scrollTop : i.scrollLeft, V = y && i.style.overflowY === "scroll" || !y && i.style.overflowX === "scroll";
367
+ if (b = w(l), (O < 0 && P > 0 || O > 0 && P < I) && T && V) return z = !0;
368
+ T = !1, B(l), z = !1;
369
+ }), p.input(i, "touchend", function() {
396
370
  z = !1;
397
371
  });
398
- }(s);
372
+ }(c);
399
373
  });
400
374
  }
401
375
  }
402
376
  t.on("updated", q), t.on("optionsChanged", H), t.on("created", H), t.on("destroyed", p.purge);
403
377
  }
404
378
  function xt(t) {
405
- var r, i, o = null;
379
+ var e, r, o = null;
406
380
  function u(E, v, T) {
407
- t.animator.active ? e(E, v, T) : requestAnimationFrame(function() {
408
- return e(E, v, T);
381
+ t.animator.active ? n(E, v, T) : requestAnimationFrame(function() {
382
+ return n(E, v, T);
409
383
  });
410
384
  }
411
385
  function a() {
412
- u(!1, !1, i);
386
+ u(!1, !1, r);
413
387
  }
414
- function e(E, v, T) {
388
+ function n(E, v, T) {
415
389
  var z = 0, m = t.size, h = t.track.details;
416
- if (h && r) {
390
+ if (h && e) {
417
391
  var p = h.slides;
418
- r.forEach(function(_, A) {
419
- if (E)
420
- !o && v && x(_, null, T), l(_, null, T);
392
+ e.forEach(function(_, A) {
393
+ if (E) !o && v && x(_, null, T), d(_, null, T);
421
394
  else {
422
- if (!p[A])
423
- return;
395
+ if (!p[A]) return;
424
396
  var S = p[A].size * m;
425
- !o && v && x(_, S, T), l(_, p[A].distance * m - z, T), z += S;
397
+ !o && v && x(_, S, T), d(_, p[A].distance * m - z, T), z += S;
426
398
  }
427
399
  });
428
400
  }
@@ -434,7 +406,7 @@ function xt(t) {
434
406
  var z = T ? "height" : "width";
435
407
  v !== null && (v = k(v) + "px"), E.style["min-" + z] = v, E.style["max-" + z] = v;
436
408
  }
437
- function l(E, v, T) {
409
+ function d(E, v, T) {
438
410
  if (v !== null) {
439
411
  v = k(v);
440
412
  var z = T ? v : 0;
@@ -443,149 +415,144 @@ function xt(t) {
443
415
  E.style.transform = v, E.style["-webkit-transform"] = v;
444
416
  }
445
417
  function C() {
446
- r && (e(!0, !0, i), r = null), t.on("detailsChanged", a, !0);
418
+ e && (n(!0, !0, r), e = null), t.on("detailsChanged", a, !0);
447
419
  }
448
420
  function D() {
449
- u(!1, !0, i);
421
+ u(!1, !0, r);
450
422
  }
451
423
  function M() {
452
- C(), i = t.options.vertical, t.options.disabled || t.options.renderMode === "custom" || (o = N(t.options.slides, "perView", null) === "auto", t.on("detailsChanged", a), (r = t.slides).length && D());
424
+ C(), r = t.options.vertical, t.options.disabled || t.options.renderMode === "custom" || (o = N(t.options.slides, "perView", null) === "auto", t.on("detailsChanged", a), (e = t.slides).length && D());
453
425
  }
454
426
  t.on("created", M), t.on("optionsChanged", M), t.on("beforeOptionsChanged", function() {
455
427
  C();
456
428
  }), t.on("updated", D), t.on("destroyed", C);
457
429
  }
458
- function yt(t, r) {
459
- return function(i) {
460
- var o, u, a, e, k, x = st();
461
- function l(c) {
430
+ function yt(t, e) {
431
+ return function(r) {
432
+ var o, u, a, n, k, x = ct();
433
+ function d(s) {
462
434
  var w;
463
- Z(i.container, "reverse", (w = i.container, window.getComputedStyle(w, null).getPropertyValue("direction") !== "rtl" || c ? null : "")), Z(i.container, "v", i.options.vertical && !c ? "" : null), Z(i.container, "disabled", i.options.disabled && !c ? "" : null);
435
+ Z(r.container, "reverse", (w = r.container, window.getComputedStyle(w, null).getPropertyValue("direction") !== "rtl" || s ? null : "")), Z(r.container, "v", r.options.vertical && !s ? "" : null), Z(r.container, "disabled", r.options.disabled && !s ? "" : null);
464
436
  }
465
437
  function C() {
466
438
  D() && z();
467
439
  }
468
440
  function D() {
469
- var c = null;
470
- if (e.forEach(function(L) {
471
- L.matches && (c = L.__media);
472
- }), c === o)
473
- return !1;
474
- o || i.emit("beforeOptionsChanged"), o = c;
475
- var w = c ? a.breakpoints[c] : a;
476
- return i.options = Y(Y({}, a), w), l(), A(), S(), h(), !0;
441
+ var s = null;
442
+ if (n.forEach(function(L) {
443
+ L.matches && (s = L.__media);
444
+ }), s === o) return !1;
445
+ o || r.emit("beforeOptionsChanged"), o = s;
446
+ var w = s ? a.breakpoints[s] : a;
447
+ return r.options = Y(Y({}, a), w), d(), A(), S(), h(), !0;
477
448
  }
478
- function M(c) {
479
- var w = ut(c);
480
- return (i.options.vertical ? w.height : w.width) / i.size || 1;
449
+ function M(s) {
450
+ var w = ut(s);
451
+ return (r.options.vertical ? w.height : w.width) / r.size || 1;
481
452
  }
482
453
  function E() {
483
- return i.options.trackConfig.length;
454
+ return r.options.trackConfig.length;
484
455
  }
485
- function v(c) {
486
- for (var w in o = !1, a = Y(Y({}, r), c), x.purge(), u = i.size, e = [], a.breakpoints || []) {
456
+ function v(s) {
457
+ for (var w in o = !1, a = Y(Y({}, e), s), x.purge(), u = r.size, n = [], a.breakpoints || []) {
487
458
  var L = window.matchMedia(w);
488
- L.__media = w, e.push(L), x.add(L, "change", C);
459
+ L.__media = w, n.push(L), x.add(L, "change", C);
489
460
  }
490
461
  x.add(window, "orientationchange", _), x.add(window, "resize", p), D();
491
462
  }
492
- function T(c) {
493
- i.animator.stop();
494
- var w = i.track.details;
495
- i.track.init(c ?? (w ? w.abs : 0));
463
+ function T(s) {
464
+ r.animator.stop();
465
+ var w = r.track.details;
466
+ r.track.init(s ?? (w ? w.abs : 0));
496
467
  }
497
- function z(c) {
498
- T(c), i.emit("optionsChanged");
468
+ function z(s) {
469
+ T(s), r.emit("optionsChanged");
499
470
  }
500
- function m(c, w) {
501
- if (c)
502
- return v(c), void z(w);
471
+ function m(s, w) {
472
+ if (s) return v(s), void z(w);
503
473
  A(), S();
504
474
  var L = E();
505
- h(), E() !== L ? z(w) : T(w), i.emit("updated");
475
+ h(), E() !== L ? z(w) : T(w), r.emit("updated");
506
476
  }
507
477
  function h() {
508
- var c = i.options.slides;
509
- if (typeof c == "function")
510
- return i.options.trackConfig = c(i.size, i.slides);
511
- for (var w = i.slides, L = w.length, q = typeof c == "number" ? c : N(c, "number", L, !0), R = [], H = N(c, "perView", 1, !0), g = N(c, "spacing", 0, !0) / i.size || 0, f = H === "auto" ? g : g / H, s = N(c, "origin", "auto"), n = 0, b = 0; b < q; b++) {
512
- var d = H === "auto" ? M(w[b]) : 1 / H - g + f, y = s === "center" ? 0.5 - d / 2 : s === "auto" ? 0 : s;
513
- R.push({ origin: y, size: d, spacing: g }), n += d;
478
+ var s = r.options.slides;
479
+ if (typeof s == "function") return r.options.trackConfig = s(r.size, r.slides);
480
+ for (var w = r.slides, L = w.length, q = typeof s == "number" ? s : N(s, "number", L, !0), R = [], H = N(s, "perView", 1, !0), g = N(s, "spacing", 0, !0) / r.size || 0, f = H === "auto" ? g : g / H, c = N(s, "origin", "auto"), i = 0, b = 0; b < q; b++) {
481
+ var l = H === "auto" ? M(w[b]) : 1 / H - g + f, y = c === "center" ? 0.5 - l / 2 : c === "auto" ? 0 : c;
482
+ R.push({ origin: y, size: l, spacing: g }), i += l;
514
483
  }
515
- if (n += g * (q - 1), s === "auto" && !i.options.loop && H !== 1) {
484
+ if (i += g * (q - 1), c === "auto" && !r.options.loop && H !== 1) {
516
485
  var I = 0;
517
486
  R.map(function(O) {
518
- var P = n - I;
519
- return I += O.size + g, P >= 1 || (O.origin = 1 - P - (n > 1 ? 0 : 1 - n)), O;
487
+ var P = i - I;
488
+ return I += O.size + g, P >= 1 || (O.origin = 1 - P - (i > 1 ? 0 : 1 - i)), O;
520
489
  });
521
490
  }
522
- i.options.trackConfig = R;
491
+ r.options.trackConfig = R;
523
492
  }
524
493
  function p() {
525
494
  A();
526
- var c = i.size;
527
- i.options.disabled || c === u || (u = c, m());
495
+ var s = r.size;
496
+ r.options.disabled || s === u || (u = s, m());
528
497
  }
529
498
  function _() {
530
499
  p(), setTimeout(p, 500), setTimeout(p, 2e3);
531
500
  }
532
501
  function A() {
533
- var c = ut(i.container);
534
- i.size = (i.options.vertical ? c.height : c.width) || 1;
502
+ var s = ut(r.container);
503
+ r.size = (r.options.vertical ? s.height : s.width) || 1;
535
504
  }
536
505
  function S() {
537
- i.slides = U(i.options.selector, i.container);
506
+ r.slides = U(r.options.selector, r.container);
538
507
  }
539
- i.container = (k = U(t, document)).length ? k[0] : null, i.destroy = function() {
540
- x.purge(), i.emit("destroyed"), l(!0);
541
- }, i.prev = function() {
542
- i.moveToIdx(i.track.details.abs - 1, !0);
543
- }, i.next = function() {
544
- i.moveToIdx(i.track.details.abs + 1, !0);
545
- }, i.update = m, v(i.options);
508
+ r.container = (k = U(t, document)).length ? k[0] : null, r.destroy = function() {
509
+ x.purge(), r.emit("destroyed"), d(!0);
510
+ }, r.prev = function() {
511
+ r.moveToIdx(r.track.details.abs - 1, !0);
512
+ }, r.next = function() {
513
+ r.moveToIdx(r.track.details.abs + 1, !0);
514
+ }, r.update = m, v(r.options);
546
515
  };
547
516
  }
548
- var kt = function(t, r, i) {
517
+ var kt = function(t, e, r) {
549
518
  try {
550
519
  return function(o, u) {
551
- var a, e = {};
520
+ var a, n = {};
552
521
  return a = { emit: function(k) {
553
- e[k] && e[k].forEach(function(l) {
554
- l(a);
522
+ n[k] && n[k].forEach(function(d) {
523
+ d(a);
555
524
  });
556
525
  var x = a.options && a.options[k];
557
526
  x && x(a);
558
- }, moveToIdx: function(k, x, l) {
527
+ }, moveToIdx: function(k, x, d) {
559
528
  var C = a.track.idxToDist(k, x);
560
529
  if (C) {
561
530
  var D = a.options.defaultAnimation;
562
- a.animator.start([{ distance: C, duration: N(l || D, "duration", 500), easing: N(l || D, "easing", function(M) {
531
+ a.animator.start([{ distance: C, duration: N(d || D, "duration", 500), easing: N(d || D, "easing", function(M) {
563
532
  return 1 + --M * M * M * M * M;
564
533
  }) }]);
565
534
  }
566
- }, on: function(k, x, l) {
567
- l === void 0 && (l = !1), e[k] || (e[k] = []);
568
- var C = e[k].indexOf(x);
569
- C > -1 ? l && delete e[k][C] : l || e[k].push(x);
535
+ }, on: function(k, x, d) {
536
+ d === void 0 && (d = !1), n[k] || (n[k] = []);
537
+ var C = n[k].indexOf(x);
538
+ C > -1 ? d && delete n[k][C] : d || n[k].push(x);
570
539
  }, options: o }, function() {
571
- if (a.track = ht(a), a.animator = mt(a), u)
572
- for (var k = 0, x = u; k < x.length; k++)
573
- (0, x[k])(a);
540
+ if (a.track = ht(a), a.animator = mt(a), u) for (var k = 0, x = u; k < x.length; k++) (0, x[k])(a);
574
541
  a.track.init(a.options.initial || 0), a.emit("created");
575
542
  }(), a;
576
- }(r, lt([yt(t, { drag: !0, mode: "snap", renderMode: "precision", rubberband: !0, selector: ".keen-slider__slide" }), xt, bt, gt], i || [], !0));
543
+ }(e, dt([yt(t, { drag: !0, mode: "snap", renderMode: "precision", rubberband: !0, selector: ".keen-slider__slide" }), xt, bt, gt], r || [], !0));
577
544
  } catch (o) {
578
545
  console.error(o);
579
546
  }
580
- }, Tt = ct.useKeenSlider = function(t, r) {
581
- var i = $.useRef(null), o = $.useRef(!1), u = $.useRef(t), a = $.useCallback(function(e) {
582
- e ? (u.current = t, i.current = new kt(e, t, r), o.current = !1) : (i.current && i.current.destroy && i.current.destroy(), i.current = null);
547
+ }, Tt = st.useKeenSlider = function(t, e) {
548
+ var r = $.useRef(null), o = $.useRef(!1), u = $.useRef(t), a = $.useCallback(function(n) {
549
+ n ? (u.current = t, r.current = new kt(n, t, e), o.current = !1) : (r.current && r.current.destroy && r.current.destroy(), r.current = null);
583
550
  }, []);
584
551
  return $.useEffect(function() {
585
- dt(u.current, t) || (u.current = t, i.current && i.current.update(u.current));
586
- }, [t]), [a, i];
552
+ lt(u.current, t) || (u.current = t, r.current && r.current.update(u.current));
553
+ }, [t]), [a, r];
587
554
  };
588
555
  export {
589
- ct as default,
556
+ st as default,
590
557
  Tt as useKeenSlider
591
558
  };