@innovastudio/contentbox-runtime-base 1.0.15 → 1.0.17
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/contentbox-runtime-base.esm.js +191 -181
- package/dist/contentbox-runtime-base.min.js +4 -4
- package/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -8,45 +8,45 @@ function Qe() {
|
|
|
8
8
|
(function(i, s) {
|
|
9
9
|
o.exports = s();
|
|
10
10
|
})(Ge, function() {
|
|
11
|
-
var i = typeof window < "u" ? window : typeof Ie < "u" ? Ie : typeof self < "u" ? self : {}, s = "Expected a function", e = NaN, a = "[object Symbol]", r = /^\s+|\s+$/g, n = /^[-+]0x[0-9a-f]+$/i, h = /^0b[01]+$/i, d = /^0o[0-7]+$/i, c = parseInt, f = typeof i == "object" && i && i.Object === Object && i, b = typeof self == "object" && self && self.Object === Object && self,
|
|
12
|
-
return
|
|
11
|
+
var i = typeof window < "u" ? window : typeof Ie < "u" ? Ie : typeof self < "u" ? self : {}, s = "Expected a function", e = NaN, a = "[object Symbol]", r = /^\s+|\s+$/g, n = /^[-+]0x[0-9a-f]+$/i, h = /^0b[01]+$/i, d = /^0o[0-7]+$/i, c = parseInt, f = typeof i == "object" && i && i.Object === Object && i, b = typeof self == "object" && self && self.Object === Object && self, C = f || b || Function("return this")(), A = Object.prototype.toString, E = Math.max, K = Math.min, ft = function() {
|
|
12
|
+
return C.Date.now();
|
|
13
13
|
};
|
|
14
14
|
function Bt(p, m, y) {
|
|
15
|
-
var w, k, W, H,
|
|
15
|
+
var w, k, W, H, _, $, M = 0, ht = !1, F = !1, J = !0;
|
|
16
16
|
if (typeof p != "function") throw new TypeError(s);
|
|
17
|
-
function ct(
|
|
17
|
+
function ct(j) {
|
|
18
18
|
var U = w, ut = k;
|
|
19
|
-
return w = k = void 0, M =
|
|
19
|
+
return w = k = void 0, M = j, H = p.apply(ut, U);
|
|
20
20
|
}
|
|
21
|
-
function zt(
|
|
22
|
-
var U =
|
|
23
|
-
return $ === void 0 || U >= m || U < 0 || F &&
|
|
21
|
+
function zt(j) {
|
|
22
|
+
var U = j - $;
|
|
23
|
+
return $ === void 0 || U >= m || U < 0 || F && j - M >= W;
|
|
24
24
|
}
|
|
25
25
|
function St() {
|
|
26
|
-
var
|
|
27
|
-
if (zt(
|
|
28
|
-
|
|
26
|
+
var j = ft();
|
|
27
|
+
if (zt(j)) return Xt(j);
|
|
28
|
+
_ = setTimeout(St, (function(U) {
|
|
29
29
|
var ut = m - (U - $);
|
|
30
30
|
return F ? K(ut, W - (U - M)) : ut;
|
|
31
|
-
})(
|
|
31
|
+
})(j));
|
|
32
32
|
}
|
|
33
|
-
function Xt(
|
|
34
|
-
return
|
|
33
|
+
function Xt(j) {
|
|
34
|
+
return _ = void 0, J && w ? ct(j) : (w = k = void 0, H);
|
|
35
35
|
}
|
|
36
36
|
function nt() {
|
|
37
|
-
var
|
|
38
|
-
if (w = arguments, k = this, $ =
|
|
39
|
-
if (
|
|
40
|
-
return M = ut,
|
|
37
|
+
var j = ft(), U = zt(j);
|
|
38
|
+
if (w = arguments, k = this, $ = j, U) {
|
|
39
|
+
if (_ === void 0) return (function(ut) {
|
|
40
|
+
return M = ut, _ = setTimeout(St, m), ht ? ct(ut) : H;
|
|
41
41
|
})($);
|
|
42
|
-
if (F) return
|
|
42
|
+
if (F) return _ = setTimeout(St, m), ct($);
|
|
43
43
|
}
|
|
44
|
-
return
|
|
44
|
+
return _ === void 0 && (_ = setTimeout(St, m)), H;
|
|
45
45
|
}
|
|
46
|
-
return m = Lt(m) || 0, Ct(y) && (ht = !!y.leading, W = (F = "maxWait" in y) ?
|
|
47
|
-
|
|
46
|
+
return m = Lt(m) || 0, Ct(y) && (ht = !!y.leading, W = (F = "maxWait" in y) ? E(Lt(y.maxWait) || 0, m) : W, J = "trailing" in y ? !!y.trailing : J), nt.cancel = function() {
|
|
47
|
+
_ !== void 0 && clearTimeout(_), M = 0, w = $ = k = _ = void 0;
|
|
48
48
|
}, nt.flush = function() {
|
|
49
|
-
return
|
|
49
|
+
return _ === void 0 ? H : Xt(ft());
|
|
50
50
|
}, nt;
|
|
51
51
|
}
|
|
52
52
|
function Ct(p) {
|
|
@@ -58,7 +58,7 @@ function Qe() {
|
|
|
58
58
|
if ((function(w) {
|
|
59
59
|
return typeof w == "symbol" || /* @__PURE__ */ (function(k) {
|
|
60
60
|
return !!k && typeof k == "object";
|
|
61
|
-
})(w) &&
|
|
61
|
+
})(w) && A.call(w) == a;
|
|
62
62
|
})(p)) return e;
|
|
63
63
|
if (Ct(p)) {
|
|
64
64
|
var m = typeof p.valueOf == "function" ? p.valueOf() : p;
|
|
@@ -73,7 +73,7 @@ function Qe() {
|
|
|
73
73
|
var w = !0, k = !0;
|
|
74
74
|
if (typeof p != "function") throw new TypeError(s);
|
|
75
75
|
return Ct(y) && (w = "leading" in y ? !!y.leading : w, k = "trailing" in y ? !!y.trailing : k), Bt(p, m, { leading: w, maxWait: m, trailing: k });
|
|
76
|
-
}, l = "Expected a function", u = NaN, v = "[object Symbol]",
|
|
76
|
+
}, l = "Expected a function", u = NaN, v = "[object Symbol]", T = /^\s+|\s+$/g, O = /^[-+]0x[0-9a-f]+$/i, I = /^0b[01]+$/i, tt = /^0o[0-7]+$/i, At = parseInt, B = typeof i == "object" && i && i.Object === Object && i, gt = typeof self == "object" && self && self.Object === Object && self, x = B || gt || Function("return this")(), S = Object.prototype.toString, X = Math.max, L = Math.min, Z = function() {
|
|
77
77
|
return x.Date.now();
|
|
78
78
|
};
|
|
79
79
|
function G(p) {
|
|
@@ -85,53 +85,53 @@ function Qe() {
|
|
|
85
85
|
if ((function(w) {
|
|
86
86
|
return typeof w == "symbol" || /* @__PURE__ */ (function(k) {
|
|
87
87
|
return !!k && typeof k == "object";
|
|
88
|
-
})(w) &&
|
|
88
|
+
})(w) && S.call(w) == v;
|
|
89
89
|
})(p)) return u;
|
|
90
90
|
if (G(p)) {
|
|
91
91
|
var m = typeof p.valueOf == "function" ? p.valueOf() : p;
|
|
92
92
|
p = G(m) ? m + "" : m;
|
|
93
93
|
}
|
|
94
94
|
if (typeof p != "string") return p === 0 ? p : +p;
|
|
95
|
-
p = p.replace(
|
|
95
|
+
p = p.replace(T, "");
|
|
96
96
|
var y = I.test(p);
|
|
97
97
|
return y || tt.test(p) ? At(p.slice(2), y ? 2 : 8) : O.test(p) ? u : +p;
|
|
98
98
|
}
|
|
99
99
|
var It = function(p, m, y) {
|
|
100
|
-
var w, k, W, H,
|
|
100
|
+
var w, k, W, H, _, $, M = 0, ht = !1, F = !1, J = !0;
|
|
101
101
|
if (typeof p != "function") throw new TypeError(l);
|
|
102
|
-
function ct(
|
|
102
|
+
function ct(j) {
|
|
103
103
|
var U = w, ut = k;
|
|
104
|
-
return w = k = void 0, M =
|
|
104
|
+
return w = k = void 0, M = j, H = p.apply(ut, U);
|
|
105
105
|
}
|
|
106
|
-
function zt(
|
|
107
|
-
var U =
|
|
108
|
-
return $ === void 0 || U >= m || U < 0 || F &&
|
|
106
|
+
function zt(j) {
|
|
107
|
+
var U = j - $;
|
|
108
|
+
return $ === void 0 || U >= m || U < 0 || F && j - M >= W;
|
|
109
109
|
}
|
|
110
110
|
function St() {
|
|
111
|
-
var
|
|
112
|
-
if (zt(
|
|
113
|
-
|
|
111
|
+
var j = Z();
|
|
112
|
+
if (zt(j)) return Xt(j);
|
|
113
|
+
_ = setTimeout(St, (function(U) {
|
|
114
114
|
var ut = m - (U - $);
|
|
115
115
|
return F ? L(ut, W - (U - M)) : ut;
|
|
116
|
-
})(
|
|
116
|
+
})(j));
|
|
117
117
|
}
|
|
118
|
-
function Xt(
|
|
119
|
-
return
|
|
118
|
+
function Xt(j) {
|
|
119
|
+
return _ = void 0, J && w ? ct(j) : (w = k = void 0, H);
|
|
120
120
|
}
|
|
121
121
|
function nt() {
|
|
122
|
-
var
|
|
123
|
-
if (w = arguments, k = this, $ =
|
|
124
|
-
if (
|
|
125
|
-
return M = ut,
|
|
122
|
+
var j = Z(), U = zt(j);
|
|
123
|
+
if (w = arguments, k = this, $ = j, U) {
|
|
124
|
+
if (_ === void 0) return (function(ut) {
|
|
125
|
+
return M = ut, _ = setTimeout(St, m), ht ? ct(ut) : H;
|
|
126
126
|
})($);
|
|
127
|
-
if (F) return
|
|
127
|
+
if (F) return _ = setTimeout(St, m), ct($);
|
|
128
128
|
}
|
|
129
|
-
return
|
|
129
|
+
return _ === void 0 && (_ = setTimeout(St, m)), H;
|
|
130
130
|
}
|
|
131
131
|
return m = R(m) || 0, G(y) && (ht = !!y.leading, W = (F = "maxWait" in y) ? X(R(y.maxWait) || 0, m) : W, J = "trailing" in y ? !!y.trailing : J), nt.cancel = function() {
|
|
132
|
-
|
|
132
|
+
_ !== void 0 && clearTimeout(_), M = 0, w = $ = k = _ = void 0;
|
|
133
133
|
}, nt.flush = function() {
|
|
134
|
-
return
|
|
134
|
+
return _ === void 0 ? H : Xt(Z());
|
|
135
135
|
}, nt;
|
|
136
136
|
}, Q = function() {
|
|
137
137
|
};
|
|
@@ -139,9 +139,9 @@ function Qe() {
|
|
|
139
139
|
p && p.forEach(function(m) {
|
|
140
140
|
var y = Array.prototype.slice.call(m.addedNodes), w = Array.prototype.slice.call(m.removedNodes);
|
|
141
141
|
if ((function k(W) {
|
|
142
|
-
var H = void 0,
|
|
142
|
+
var H = void 0, _ = void 0;
|
|
143
143
|
for (H = 0; H < W.length; H += 1)
|
|
144
|
-
if ((
|
|
144
|
+
if ((_ = W[H]).dataset && _.dataset.aos || _.children && k(_.children)) return !0;
|
|
145
145
|
return !1;
|
|
146
146
|
})(y.concat(w))) return Q();
|
|
147
147
|
});
|
|
@@ -197,18 +197,18 @@ function Qe() {
|
|
|
197
197
|
}, st = function(p) {
|
|
198
198
|
return p.forEach(function(m, y) {
|
|
199
199
|
return (function(w, k) {
|
|
200
|
-
var W = w.options, H = w.position,
|
|
200
|
+
var W = w.options, H = w.position, _ = w.node, $ = (w.data, function() {
|
|
201
201
|
w.animated && ((function(M, ht) {
|
|
202
202
|
ht && ht.forEach(function(F) {
|
|
203
203
|
return M.classList.remove(F);
|
|
204
204
|
});
|
|
205
|
-
})(
|
|
205
|
+
})(_, W.animatedClassNames), bt("aos:out", _), w.options.id && bt("aos:in:" + w.options.id, _), w.animated = !1);
|
|
206
206
|
});
|
|
207
207
|
W.mirror && k >= H.out && !W.once ? $() : k >= H.in ? w.animated || ((function(M, ht) {
|
|
208
208
|
ht && ht.forEach(function(F) {
|
|
209
209
|
return M.classList.add(F);
|
|
210
210
|
});
|
|
211
|
-
})(
|
|
211
|
+
})(_, W.animatedClassNames), bt("aos:in", _), w.options.id && bt("aos:in:" + w.options.id, _), w.animated = !0) : w.animated && !W.once && $();
|
|
212
212
|
})(m, window.pageYOffset);
|
|
213
213
|
});
|
|
214
214
|
}, yt = function(p) {
|
|
@@ -223,41 +223,41 @@ function Qe() {
|
|
|
223
223
|
return w || y;
|
|
224
224
|
}, Et = function(p, m) {
|
|
225
225
|
return p.forEach(function(y, w) {
|
|
226
|
-
var k = q(y.node, "mirror", m.mirror), W = q(y.node, "once", m.once), H = q(y.node, "id"),
|
|
226
|
+
var k = q(y.node, "mirror", m.mirror), W = q(y.node, "once", m.once), H = q(y.node, "id"), _ = m.useClassNames && y.node.getAttribute("data-aos"), $ = [m.animatedClassName].concat(_ ? _.split(" ") : []).filter(function(M) {
|
|
227
227
|
return typeof M == "string";
|
|
228
228
|
});
|
|
229
229
|
m.initClassName && y.node.classList.add(m.initClassName), y.position = { in: (function(M, ht, F) {
|
|
230
230
|
var J = window.innerHeight, ct = q(M, "anchor"), zt = q(M, "anchor-placement"), St = Number(q(M, "offset", zt ? 0 : ht)), Xt = zt || F, nt = M;
|
|
231
231
|
ct && document.querySelectorAll(ct) && (nt = document.querySelectorAll(ct)[0]);
|
|
232
|
-
var
|
|
232
|
+
var j = yt(nt).top - J;
|
|
233
233
|
switch (Xt) {
|
|
234
234
|
case "top-bottom":
|
|
235
235
|
break;
|
|
236
236
|
case "center-bottom":
|
|
237
|
-
|
|
237
|
+
j += nt.offsetHeight / 2;
|
|
238
238
|
break;
|
|
239
239
|
case "bottom-bottom":
|
|
240
|
-
|
|
240
|
+
j += nt.offsetHeight;
|
|
241
241
|
break;
|
|
242
242
|
case "top-center":
|
|
243
|
-
|
|
243
|
+
j += J / 2;
|
|
244
244
|
break;
|
|
245
245
|
case "center-center":
|
|
246
|
-
|
|
246
|
+
j += J / 2 + nt.offsetHeight / 2;
|
|
247
247
|
break;
|
|
248
248
|
case "bottom-center":
|
|
249
|
-
|
|
249
|
+
j += J / 2 + nt.offsetHeight;
|
|
250
250
|
break;
|
|
251
251
|
case "top-top":
|
|
252
|
-
|
|
252
|
+
j += J;
|
|
253
253
|
break;
|
|
254
254
|
case "bottom-top":
|
|
255
|
-
|
|
255
|
+
j += J + nt.offsetHeight;
|
|
256
256
|
break;
|
|
257
257
|
case "center-top":
|
|
258
|
-
|
|
258
|
+
j += J + nt.offsetHeight / 2;
|
|
259
259
|
}
|
|
260
|
-
return
|
|
260
|
+
return j + St;
|
|
261
261
|
})(y.node, m.offset, m.anchorPlacement), out: k && (function(M, ht) {
|
|
262
262
|
var F = q(M, "anchor"), J = q(M, "offset", ht), ct = M;
|
|
263
263
|
return F && document.querySelectorAll(F) && (ct = document.querySelectorAll(F)[0]), yt(ct).top + ct.offsetHeight - J;
|
|
@@ -330,16 +330,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
330
330
|
}
|
|
331
331
|
function n(d, c) {
|
|
332
332
|
if (typeof Symbol < "u" && Symbol.iterator in Object(d)) {
|
|
333
|
-
var f = [], b = !0,
|
|
333
|
+
var f = [], b = !0, C = !1, A = void 0;
|
|
334
334
|
try {
|
|
335
|
-
for (var
|
|
335
|
+
for (var E, K = d[Symbol.iterator](); !(b = (E = K.next()).done) && (f.push(E.value), !c || f.length !== c); b = !0) ;
|
|
336
336
|
} catch (ft) {
|
|
337
|
-
|
|
337
|
+
C = !0, A = ft;
|
|
338
338
|
} finally {
|
|
339
339
|
try {
|
|
340
340
|
b || K.return == null || K.return();
|
|
341
341
|
} finally {
|
|
342
|
-
if (
|
|
342
|
+
if (C) throw A;
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
return f;
|
|
@@ -352,7 +352,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
352
352
|
function d(l) {
|
|
353
353
|
return ["elInY+elHeight", "elCenterY-".concat(l = 0 < arguments.length && l !== void 0 ? l : 30), "elCenterY", "elCenterY+".concat(l), "elOutY-elHeight"];
|
|
354
354
|
}
|
|
355
|
-
var c, f, b,
|
|
355
|
+
var c, f, b, C, A, E, K = { fadeInOut: function(l, u) {
|
|
356
356
|
return u = 1 < arguments.length && u !== void 0 ? u : 0, { opacity: [d(0 < arguments.length && l !== void 0 ? l : 30), [u, 1, 1, 1, u]] };
|
|
357
357
|
}, fadeIn: function(l, u) {
|
|
358
358
|
return { opacity: [["elInY+elHeight", 0 < arguments.length && l !== void 0 ? l : "elCenterY"], [1 < arguments.length && u !== void 0 ? u : 0, 1]] };
|
|
@@ -388,7 +388,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
388
388
|
return l = 0 < arguments.length && l !== void 0 ? l : 100, u = 1 < arguments.length && u !== void 0 ? u : 100, { translateX: [[0, +l, 2 * l, 3 * l, 4 * l], [0, u, 0, -u, 0], { modValue: 4 * l }] };
|
|
389
389
|
}, hueRotate: function(l, u) {
|
|
390
390
|
return l = 0 < arguments.length && l !== void 0 ? l : 600, { "hue-rotate": [[0, l], [0, 1 < arguments.length && u !== void 0 ? u : 360], { modValue: l }] };
|
|
391
|
-
} }, ft = (c = ["perspective", "scaleX", "scaleY", "scale", "skewX", "skewY", "skew", "rotateX", "rotateY", "rotate"], f = ["blur", "hue-rotate", "brightness"], b = ["translateX", "translateY", "translateZ"],
|
|
391
|
+
} }, ft = (c = ["perspective", "scaleX", "scaleY", "scale", "skewX", "skewY", "skew", "rotateX", "rotateY", "rotate"], f = ["blur", "hue-rotate", "brightness"], b = ["translateX", "translateY", "translateZ"], C = ["perspective", "border-radius", "blur", "translateX", "translateY", "translateZ"], A = ["hue-rotate", "rotate", "rotateX", "rotateY", "skew", "skewX", "skewY"], E = { easeInQuad: function(l) {
|
|
392
392
|
return l * l;
|
|
393
393
|
}, easeOutQuad: function(l) {
|
|
394
394
|
return l * (2 - l);
|
|
@@ -416,7 +416,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
416
416
|
var u = 7.5625, v = 2.75;
|
|
417
417
|
return l < 1 / v ? u * l * l : l < 2 / v ? u * (l -= 1.5 / v) * l + 0.75 : l < 2.5 / v ? u * (l -= 2.25 / v) * l + 0.9375 : u * (l -= 2.625 / v) * l + 0.984375;
|
|
418
418
|
}, easeInBounce: function(l) {
|
|
419
|
-
return 1 -
|
|
419
|
+
return 1 - E.easeOutBounce(1 - l);
|
|
420
420
|
}, easeOutBack: function(l) {
|
|
421
421
|
return 1 + 2.70158 * Math.pow(l - 1, 3) + 1.70158 * Math.pow(l - 1, 2);
|
|
422
422
|
}, easeInBack: function(l) {
|
|
@@ -431,43 +431,43 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
431
431
|
}));
|
|
432
432
|
}), i(this, "onAnimationFrame", function(v) {
|
|
433
433
|
u.debug && (u.debugData.frameStart = Date.now());
|
|
434
|
-
var
|
|
434
|
+
var T, O = {};
|
|
435
435
|
u.drivers.forEach(function(I) {
|
|
436
436
|
O[I.name] = I.getValue(u.frame);
|
|
437
437
|
}), u.elements.forEach(function(I) {
|
|
438
438
|
I.update(O, u.frame);
|
|
439
|
-
}), u.debug && u.debugData.frameLengths.push(Date.now() - u.debugData.frameStart), u.frame % 60 == 0 && u.debug && (
|
|
439
|
+
}), u.debug && u.debugData.frameLengths.push(Date.now() - u.debugData.frameStart), u.frame % 60 == 0 && u.debug && (T = Math.ceil(u.debugData.frameLengths.reduce(function(I, tt) {
|
|
440
440
|
return I + tt;
|
|
441
|
-
}, 0) / 60), console.log("Average frame calculation time: ".concat(
|
|
442
|
-
}), i(this, "addDriver", function(v,
|
|
441
|
+
}, 0) / 60), console.log("Average frame calculation time: ".concat(T, "ms")), u.debugData.frameLengths = []), u.frame++, window.requestAnimationFrame(u.onAnimationFrame);
|
|
442
|
+
}), i(this, "addDriver", function(v, T) {
|
|
443
443
|
var O = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : {};
|
|
444
|
-
u.drivers.push(new Lt(v,
|
|
444
|
+
u.drivers.push(new Lt(v, T, O));
|
|
445
445
|
}), i(this, "removeDriver", function(v) {
|
|
446
|
-
u.drivers = u.drivers.filter(function(
|
|
447
|
-
return
|
|
446
|
+
u.drivers = u.drivers.filter(function(T) {
|
|
447
|
+
return T.name !== v;
|
|
448
448
|
});
|
|
449
449
|
}), i(this, "findAndAddElements", function() {
|
|
450
450
|
u.elements = [], document.querySelectorAll(".lax").forEach(function(v) {
|
|
451
|
-
var
|
|
451
|
+
var T = [];
|
|
452
452
|
v.classList.forEach(function(I) {
|
|
453
|
-
I.includes("lax_preset") && (I = I.replace("lax_preset_", ""),
|
|
453
|
+
I.includes("lax_preset") && (I = I.replace("lax_preset_", ""), T.push(I));
|
|
454
454
|
});
|
|
455
|
-
var O = i({}, "scrollY", { presets:
|
|
455
|
+
var O = i({}, "scrollY", { presets: T });
|
|
456
456
|
u.elements.push(new kt(".lax", u, v, O, 0, {}));
|
|
457
457
|
});
|
|
458
|
-
}), i(this, "addElements", function(v,
|
|
458
|
+
}), i(this, "addElements", function(v, T, O) {
|
|
459
459
|
document.querySelectorAll(v).forEach(function(I, tt) {
|
|
460
|
-
u.elements.push(new kt(v, u, I,
|
|
460
|
+
u.elements.push(new kt(v, u, I, T, tt, O));
|
|
461
461
|
});
|
|
462
462
|
}), i(this, "removeElements", function(v) {
|
|
463
|
-
u.elements = u.elements.filter(function(
|
|
464
|
-
return
|
|
463
|
+
u.elements = u.elements.filter(function(T) {
|
|
464
|
+
return T.selector !== v;
|
|
465
465
|
});
|
|
466
|
-
}), i(this, "addElement", function(v,
|
|
467
|
-
u.elements.push(new kt("", u, v,
|
|
466
|
+
}), i(this, "addElement", function(v, T, O) {
|
|
467
|
+
u.elements.push(new kt("", u, v, T, 0, O));
|
|
468
468
|
}), i(this, "removeElement", function(v) {
|
|
469
|
-
u.elements = u.elements.filter(function(
|
|
470
|
-
return
|
|
469
|
+
u.elements = u.elements.filter(function(T) {
|
|
470
|
+
return T.domElement !== v;
|
|
471
471
|
});
|
|
472
472
|
});
|
|
473
473
|
}());
|
|
@@ -477,40 +477,40 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
477
477
|
return parseInt(tt);
|
|
478
478
|
}).sort(function(tt, At) {
|
|
479
479
|
return At < tt ? 1 : -1;
|
|
480
|
-
}),
|
|
480
|
+
}), T = v[v.length - 1], O = 0; O < v.length; O++) {
|
|
481
481
|
var I = v[O];
|
|
482
482
|
if (u < I) {
|
|
483
|
-
|
|
483
|
+
T = I;
|
|
484
484
|
break;
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
return l[
|
|
487
|
+
return l[T];
|
|
488
488
|
}
|
|
489
489
|
function Ct(l, L, v) {
|
|
490
|
-
var
|
|
490
|
+
var T = L.width, O = L.height, x = L.x, X = L.y;
|
|
491
491
|
if (typeof l == "number") return l;
|
|
492
|
-
var I, tt = document.body.scrollHeight, At = document.body.scrollWidth, B = window.innerWidth, gt = window.innerHeight,
|
|
493
|
-
return Function("return ".concat(l.replace(/screenWidth/g, B).replace(/screenHeight/g, gt).replace(/pageHeight/g, tt).replace(/pageWidth/g, At).replace(/elWidth/g,
|
|
492
|
+
var I, tt = document.body.scrollHeight, At = document.body.scrollWidth, B = window.innerWidth, gt = window.innerHeight, S = s((I = window.pageXOffset !== void 0, S = (document.compatMode || "") === "CSS1Compat", L = I ? window.pageXOffset : (S ? document.documentElement : document.body).scrollLeft, [I ? window.pageYOffset : (S ? document.documentElement : document.body).scrollTop, L]), 2), L = S[0], x = x + S[1], S = x + T, X = X + L, L = X + O;
|
|
493
|
+
return Function("return ".concat(l.replace(/screenWidth/g, B).replace(/screenHeight/g, gt).replace(/pageHeight/g, tt).replace(/pageWidth/g, At).replace(/elWidth/g, T).replace(/elHeight/g, O).replace(/elInY/g, X - gt).replace(/elOutY/g, L).replace(/elCenterY/g, X + O / 2 - gt / 2).replace(/elInX/g, x - B).replace(/elOutX/g, S).replace(/elCenterX/g, x + T / 2 - B / 2).replace(/index/g, v)))();
|
|
494
494
|
}
|
|
495
495
|
function Lt(l, u) {
|
|
496
|
-
var v = this,
|
|
496
|
+
var v = this, T = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : {};
|
|
497
497
|
t(this, Lt), i(this, "getValueFn", void 0), i(this, "name", ""), i(this, "lastValue", 0), i(this, "frameStep", 1), i(this, "m1", 0), i(this, "m2", 0), i(this, "inertia", 0), i(this, "inertiaEnabled", !1), i(this, "getValue", function(O) {
|
|
498
498
|
var I = v.lastValue;
|
|
499
499
|
return O % v.frameStep == 0 && (I = v.getValueFn(O)), v.inertiaEnabled && (O = I - v.lastValue, v.m1 = 0.8 * v.m1 + O * (1 - 0.8), v.m2 = 0.8 * v.m2 + v.m1 * (1 - 0.8), v.inertia = Math.round(5e3 * v.m2) / 15e3), v.lastValue = I, [v.lastValue, v.inertia];
|
|
500
|
-
}), this.name = l, this.getValueFn = u, Object.keys(
|
|
501
|
-
v[O] =
|
|
500
|
+
}), this.name = l, this.getValueFn = u, Object.keys(T).forEach(function(O) {
|
|
501
|
+
v[O] = T[O];
|
|
502
502
|
}), this.lastValue = this.getValueFn(0);
|
|
503
503
|
}
|
|
504
|
-
function kt(l, u, v,
|
|
504
|
+
function kt(l, u, v, T) {
|
|
505
505
|
var O = this, I = 4 < arguments.length && arguments[4] !== void 0 ? arguments[4] : 0, At = 5 < arguments.length && arguments[5] !== void 0 ? arguments[5] : {};
|
|
506
506
|
t(this, kt), i(this, "domElement", void 0), i(this, "transformsData", void 0), i(this, "styles", {}), i(this, "selector", ""), i(this, "groupIndex", 0), i(this, "laxInstance", void 0), i(this, "onUpdate", void 0), i(this, "update", function(B, gt) {
|
|
507
|
-
var x,
|
|
508
|
-
for (x in
|
|
509
|
-
var L =
|
|
507
|
+
var x, S = O.transforms, X = {};
|
|
508
|
+
for (x in S) {
|
|
509
|
+
var L = S[x];
|
|
510
510
|
B[x] || console.error("No lax driver with name: ", x);
|
|
511
511
|
var Z, G = s(B[x], 2), R = G[0], It = G[1];
|
|
512
512
|
for (Z in L) {
|
|
513
|
-
var Q, ot = s(L[Z], 3), P = ot[0], D = ot[1], Ot = ot[2], z = Ot === void 0 ? {} : Ot, rt = z.modValue, pt = z.frameStep, _t = pt === void 0 ? 1 : pt, lt = z.easing, ot = z.inertia, Ot = z.inertiaMode, pt = z.cssFn, z = z.cssUnit, z = z === void 0 ? "" : z, lt =
|
|
513
|
+
var Q, ot = s(L[Z], 3), P = ot[0], D = ot[1], Ot = ot[2], z = Ot === void 0 ? {} : Ot, rt = z.modValue, pt = z.frameStep, _t = pt === void 0 ? 1 : pt, lt = z.easing, ot = z.inertia, Ot = z.inertiaMode, pt = z.cssFn, z = z.cssUnit, z = z === void 0 ? "" : z, lt = E[lt];
|
|
514
514
|
gt % _t == 0 && (lt = (function(et, it, mt, bt) {
|
|
515
515
|
var st = 0;
|
|
516
516
|
if (et.forEach(function(Et) {
|
|
@@ -519,7 +519,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
519
519
|
if (st >= et.length) return it[et.length - 1];
|
|
520
520
|
var yt, q = (q = et[yt = st - 1], et = et[st], (mt - q) / (et - q));
|
|
521
521
|
return bt && (q = bt(q)), yt = it[yt], it = it[st], yt * (1 - (q = q)) + it * q;
|
|
522
|
-
})(P, D, rt ? R % rt : R, lt), ot && (Q = It * ot, Ot === "absolute" && (Q = Math.abs(Q)), lt += Q), Q = (z ||
|
|
522
|
+
})(P, D, rt ? R % rt : R, lt), ot && (Q = It * ot, Ot === "absolute" && (Q = Math.abs(Q)), lt += Q), Q = (z || C.includes(Z) ? "px" : A.includes(Z) ? "deg" : "") == "px" ? 0 : 3, Q = lt.toFixed(Q), X[Z] = pt ? pt(Q, O.domElement) : Q + z);
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
O.applyStyles(X), O.onUpdate && O.onUpdate(B, O.domElement);
|
|
@@ -527,15 +527,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
527
527
|
O.transforms = {};
|
|
528
528
|
var B, gt = O.laxInstance.windowWidth;
|
|
529
529
|
for (B in O.transformsData) (function(x) {
|
|
530
|
-
var
|
|
530
|
+
var S = O.transformsData[x], X = {}, L = S.presets;
|
|
531
531
|
(L === void 0 ? [] : L).forEach(function(P) {
|
|
532
532
|
var R, D = s(P.split(":"), 3), It = D[0], Q = D[1], P = D[2], D = window.lax.presets[It];
|
|
533
533
|
D ? (R = D(Q, P), Object.keys(R).forEach(function(rt) {
|
|
534
|
-
|
|
534
|
+
S[rt] = R[rt];
|
|
535
535
|
})) : console.error("Lax preset cannot be found with name: ", It);
|
|
536
|
-
}), delete
|
|
537
|
-
for (var Z in
|
|
538
|
-
var R = s(
|
|
536
|
+
}), delete S.presets;
|
|
537
|
+
for (var Z in S) (function(G) {
|
|
538
|
+
var R = s(S[G], 3), P = R[0], Q = P === void 0 ? [-1e9, 1e9] : P, P = R[1], P = P === void 0 ? [-1e9, 1e9] : P, R = R[2], R = R === void 0 ? {} : R, It = O.domElement.getBoundingClientRect(), Q = Bt(Q, gt).map(function(D) {
|
|
539
539
|
return Ct(D, It, O.groupIndex);
|
|
540
540
|
}), P = Bt(P, gt).map(function(D) {
|
|
541
541
|
return Ct(D, It, O.groupIndex);
|
|
@@ -545,14 +545,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
545
545
|
O.transforms[x] = X;
|
|
546
546
|
})(B);
|
|
547
547
|
}), i(this, "applyStyles", function(B) {
|
|
548
|
-
var gt, x,
|
|
549
|
-
var Z = gt[L], G =
|
|
550
|
-
b.includes(L) ?
|
|
551
|
-
}), x.transform = "translate3d(".concat(
|
|
548
|
+
var gt, x, S, X = (gt = B, x = { transform: "", filter: "" }, S = { translateX: 1e-5, translateY: 1e-5, translateZ: 1e-5 }, Object.keys(gt).forEach(function(L) {
|
|
549
|
+
var Z = gt[L], G = C.includes(L) ? "px" : A.includes(L) ? "deg" : "";
|
|
550
|
+
b.includes(L) ? S[L] = Z : c.includes(L) ? x.transform += "".concat(L, "(").concat(Z).concat(G, ") ") : f.includes(L) ? x.filter += "".concat(L, "(").concat(Z).concat(G, ") ") : x[L] = "".concat(Z).concat(G, " ");
|
|
551
|
+
}), x.transform = "translate3d(".concat(S.translateX, "px, ").concat(S.translateY, "px, ").concat(S.translateZ, "px) ").concat(x.transform), x);
|
|
552
552
|
Object.keys(X).forEach(function(L) {
|
|
553
553
|
O.domElement.style.setProperty(L, X[L]);
|
|
554
554
|
});
|
|
555
|
-
}), this.selector = l, this.laxInstance = u, this.domElement = v, this.transformsData =
|
|
555
|
+
}), this.selector = l, this.laxInstance = u, this.domElement = v, this.transformsData = T, this.groupIndex = I;
|
|
556
556
|
var tt = (I = At.style) === void 0 ? {} : I, At = At.onUpdate;
|
|
557
557
|
Object.keys(tt).forEach(function(B) {
|
|
558
558
|
v.style.setProperty(B, tt[B]);
|
|
@@ -589,7 +589,7 @@ class ii {
|
|
|
589
589
|
return;
|
|
590
590
|
}
|
|
591
591
|
e.style.transform = "";
|
|
592
|
-
let r = this.getObjVal(e, "data-top-bottom"), n = this.getObjVal(e, "data-top"), h = this.getObjVal(e, "data-50-top"), d = this.getObjVal(e, "data-100-top"), c = this.getObjVal(e, "data-center-bottom"), f = this.getObjVal(e, "data-center"), b = this.getObjVal(e, "data-center-top"),
|
|
592
|
+
let r = this.getObjVal(e, "data-top-bottom"), n = this.getObjVal(e, "data-top"), h = this.getObjVal(e, "data-50-top"), d = this.getObjVal(e, "data-100-top"), c = this.getObjVal(e, "data-center-bottom"), f = this.getObjVal(e, "data-center"), b = this.getObjVal(e, "data-center-top"), C = this.getObjVal(e, "data--400-bottom"), A = this.getObjVal(e, "data--300-bottom"), E = this.getObjVal(e, "data--200-bottom"), K = this.getObjVal(e, "data--150-bottom"), ft = this.getObjVal(e, "data--100-bottom"), Bt = this.getObjVal(e, "data--50-bottom"), Ct = this.getObjVal(e, "data-bottom"), Lt = this.getObjVal(e, "data-50-bottom"), kt = this.getObjVal(e, "data-100-bottom"), l = this.getObjVal(e, "data-150-bottom"), u = this.getObjVal(e, "data-200-bottom"), v = this.getObjVal(e, "data-300-bottom"), T = this.getObjVal(e, "data-400-bottom"), O = this.getObjVal(e, "data-bottom-top"), I = this.getObjVal(e, "data-in"), tt = this.getObjVal(e, "data-in-150"), At = this.getObjVal(e, "data-in-300"), B = this.getObjVal(e, "data-cen--150"), gt = this.getObjVal(e, "data-cen"), x = this.getObjVal(e, "data-cen-150"), S = this.getObjVal(e, "data-out--300"), X = this.getObjVal(e, "data-out--150"), L = this.getObjVal(e, "data-out"), Z = !1;
|
|
593
593
|
e.hasAttribute("data-xs") && (Z = !0);
|
|
594
594
|
let G = !1;
|
|
595
595
|
e.hasAttribute("data-sm") && (G = !0);
|
|
@@ -597,10 +597,10 @@ class ii {
|
|
|
597
597
|
e.hasAttribute("data-md") && (R = !0), e.hasAttribute("data-lg"), e.hasAttribute("data-xl");
|
|
598
598
|
let It = {}, Q = {}, P = {}, D = {}, rt = {}, _t = {}, ot = {}, Ot = {}, pt = {}, z = {}, lt = {}, et = {}, it = {}, mt = {}, bt = {}, st = {}, yt = {}, q = {}, Et = {}, Vt = {}, dt = {}, Yt = {}, V = {}, Mt = {}, vt = {}, Pt = {}, qt = {}, Dt = {}, p = {}, m = {}, y = {}, w = {}, k = {};
|
|
599
599
|
(i > 1280 || i > 970 && i <= 1280 && !R || i > 760 && i <= 970 && !G || i <= 760 && !Z) && (P = this.getObjVal(e, "data-t"), D = this.getObjVal(e, "data-t-100"), rt = this.getObjVal(e, "data-t-200"), _t = this.getObjVal(e, "data-t-300"), ot = this.getObjVal(e, "data-t-400"), Ot = this.getObjVal(e, "data-t-500"), pt = this.getObjVal(e, "data-t-600"), z = this.getObjVal(e, "data-t-700"), lt = this.getObjVal(e, "data-t-800"), et = this.getObjVal(e, "data-t-900"), it = this.getObjVal(e, "data-t-1000"), mt = this.getObjVal(e, "data-t-1100"), bt = this.getObjVal(e, "data-t-1200"), st = this.getObjVal(e, "data-t-1300"), yt = this.getObjVal(e, "data-t-1400"), q = this.getObjVal(e, "data-t-1500"), Et = this.getObjVal(e, "data-t-1600"), Vt = this.getObjVal(e, "data-t-1700"), dt = this.getObjVal(e, "data-t-1800"), Yt = this.getObjVal(e, "data-t-1900"), V = this.getObjVal(e, "data-t-2000"), Mt = this.getObjVal(e, "data-t-2100"), vt = this.getObjVal(e, "data-t-2200"), Pt = this.getObjVal(e, "data-t-2300"), qt = this.getObjVal(e, "data-t-2400"), Dt = this.getObjVal(e, "data-t-2500"), p = this.getObjVal(e, "data-t-2600"), m = this.getObjVal(e, "data-t-2700"), y = this.getObjVal(e, "data-t-2800")), i > 970 && i <= 1280 && R && (e.hasAttribute("data-md-t") && (P = this.getObjVal(e, "data-md-t")), e.hasAttribute("data-md-t-100") && (D = this.getObjVal(e, "data-md-t-100")), e.hasAttribute("data-md-t-200") && (rt = this.getObjVal(e, "data-md-t-200")), e.hasAttribute("data-md-t-300") && (_t = this.getObjVal(e, "data-md-t-300")), e.hasAttribute("data-md-t-400") && (ot = this.getObjVal(e, "data-md-t-400")), e.hasAttribute("data-md-t-500") && (Ot = this.getObjVal(e, "data-md-t-500")), e.hasAttribute("data-md-t-600") && (pt = this.getObjVal(e, "data-md-t-600")), e.hasAttribute("data-md-t-700") && (z = this.getObjVal(e, "data-md-t-700")), e.hasAttribute("data-md-t-800") && (lt = this.getObjVal(e, "data-md-t-800")), e.hasAttribute("data-md-t-900") && (et = this.getObjVal(e, "data-md-t-900")), e.hasAttribute("data-md-t-1000") && (it = this.getObjVal(e, "data-md-t-1000")), e.hasAttribute("data-md-t-1100") && (mt = this.getObjVal(e, "data-md-t-1100")), e.hasAttribute("data-md-t-1200") && (bt = this.getObjVal(e, "data-md-t-1200")), e.hasAttribute("data-md-t-1300") && (st = this.getObjVal(e, "data-md-t-1300")), e.hasAttribute("data-md-t-1400") && (yt = this.getObjVal(e, "data-md-t-1400")), e.hasAttribute("data-md-t-1500") && (q = this.getObjVal(e, "data-md-t-1500")), e.hasAttribute("data-md-t-1600") && (Et = this.getObjVal(e, "data-md-t-1600")), e.hasAttribute("data-md-t-1700") && (Vt = this.getObjVal(e, "data-md-t-1700")), e.hasAttribute("data-md-t-1800") && (dt = this.getObjVal(e, "data-md-t-1800")), e.hasAttribute("data-md-t-1900") && (Yt = this.getObjVal(e, "data-md-t-1900")), e.hasAttribute("data-md-t-2000") && (V = this.getObjVal(e, "data-md-t-2000")), e.hasAttribute("data-md-t-2100") && (Mt = this.getObjVal(e, "data-md-t-2100")), e.hasAttribute("data-md-t-2200") && (vt = this.getObjVal(e, "data-md-t-2200")), e.hasAttribute("data-md-t-2300") && (Pt = this.getObjVal(e, "data-md-t-2300")), e.hasAttribute("data-md-t-2400") && (qt = this.getObjVal(e, "data-md-t-2400")), e.hasAttribute("data-md-t-2500") && (Dt = this.getObjVal(e, "data-md-t-2500")), e.hasAttribute("data-md-t-2600") && (p = this.getObjVal(e, "data-md-t-2600")), e.hasAttribute("data-md-t-2700") && (m = this.getObjVal(e, "data-md-t-2700")), e.hasAttribute("data-md-t-2800") && (y = this.getObjVal(e, "data-md-t-2800"))), i <= 970 && e.hasAttribute("m-data-out") && (L = this.getObjVal(e, "m-data-out")), (i > 760 && i <= 970 && G || i <= 760 && !Z && G) && (e.hasAttribute("data-sm-t") && (P = this.getObjVal(e, "data-sm-t")), e.hasAttribute("data-sm-t-100") && (D = this.getObjVal(e, "data-sm-t-100")), e.hasAttribute("data-sm-t-200") && (rt = this.getObjVal(e, "data-sm-t-200")), e.hasAttribute("data-sm-t-300") && (_t = this.getObjVal(e, "data-sm-t-300")), e.hasAttribute("data-sm-t-400") && (ot = this.getObjVal(e, "data-sm-t-400")), e.hasAttribute("data-sm-t-500") && (Ot = this.getObjVal(e, "data-sm-t-500")), e.hasAttribute("data-sm-t-600") && (pt = this.getObjVal(e, "data-sm-t-600")), e.hasAttribute("data-sm-t-700") && (z = this.getObjVal(e, "data-sm-t-700")), e.hasAttribute("data-sm-t-800") && (lt = this.getObjVal(e, "data-sm-t-800")), e.hasAttribute("data-sm-t-900") && (et = this.getObjVal(e, "data-sm-t-900")), e.hasAttribute("data-sm-t-1000") && (it = this.getObjVal(e, "data-sm-t-1000")), e.hasAttribute("data-sm-t-1100") && (mt = this.getObjVal(e, "data-sm-t-1100")), e.hasAttribute("data-sm-t-1200") && (bt = this.getObjVal(e, "data-sm-t-1200")), e.hasAttribute("data-sm-t-1300") && (st = this.getObjVal(e, "data-sm-t-1300")), e.hasAttribute("data-sm-t-1400") && (yt = this.getObjVal(e, "data-sm-t-1400")), e.hasAttribute("data-sm-t-1500") && (q = this.getObjVal(e, "data-sm-t-1500")), e.hasAttribute("data-sm-t-1600") && (Et = this.getObjVal(e, "data-sm-t-1600")), e.hasAttribute("data-sm-t-1700") && (Vt = this.getObjVal(e, "data-sm-t-1700")), e.hasAttribute("data-sm-t-1800") && (dt = this.getObjVal(e, "data-sm-t-1800")), e.hasAttribute("data-sm-t-1900") && (Yt = this.getObjVal(e, "data-sm-t-1900")), e.hasAttribute("data-sm-t-2000") && (V = this.getObjVal(e, "data-sm-t-2000")), e.hasAttribute("data-sm-t-2100") && (Mt = this.getObjVal(e, "data-sm-t-2100")), e.hasAttribute("data-sm-t-2200") && (vt = this.getObjVal(e, "data-sm-t-2200")), e.hasAttribute("data-sm-t-2300") && (Pt = this.getObjVal(e, "data-sm-t-2300")), e.hasAttribute("data-sm-t-2400") && (qt = this.getObjVal(e, "data-sm-t-2400")), e.hasAttribute("data-sm-t-2500") && (Dt = this.getObjVal(e, "data-sm-t-2500")), e.hasAttribute("data-sm-t-2600") && (p = this.getObjVal(e, "data-sm-t-2600")), e.hasAttribute("data-sm-t-2700") && (m = this.getObjVal(e, "data-sm-t-2700")), e.hasAttribute("data-sm-t-2800") && (y = this.getObjVal(e, "data-sm-t-2800"))), i <= 414 && Z && (e.hasAttribute("data-xs-t") && (P = this.getObjVal(e, "data-xs-t")), e.hasAttribute("data-xs-t-100") && (D = this.getObjVal(e, "data-xs-t-100")), e.hasAttribute("data-xs-t-200") && (rt = this.getObjVal(e, "data-xs-t-200")), e.hasAttribute("data-xs-t-300") && (_t = this.getObjVal(e, "data-xs-t-300")), e.hasAttribute("data-xs-t-400") && (ot = this.getObjVal(e, "data-xs-t-400")), e.hasAttribute("data-xs-t-500") && (Ot = this.getObjVal(e, "data-xs-t-500")), e.hasAttribute("data-xs-t-600") && (pt = this.getObjVal(e, "data-xs-t-600")), e.hasAttribute("data-xs-t-700") && (z = this.getObjVal(e, "data-xs-t-700")), e.hasAttribute("data-xs-t-800") && (lt = this.getObjVal(e, "data-xs-t-800")), e.hasAttribute("data-xs-t-900") && (et = this.getObjVal(e, "data-xs-t-900")), e.hasAttribute("data-xs-t-1000") && (it = this.getObjVal(e, "data-xs-t-1000")), e.hasAttribute("data-xs-t-1100") && (mt = this.getObjVal(e, "data-xs-t-1100")), e.hasAttribute("data-xs-t-1200") && (bt = this.getObjVal(e, "data-xs-t-1200")), e.hasAttribute("data-xs-t-1300") && (st = this.getObjVal(e, "data-xs-t-1300")), e.hasAttribute("data-xs-t-1400") && (yt = this.getObjVal(e, "data-xs-t-1400")), e.hasAttribute("data-xs-t-1500") && (q = this.getObjVal(e, "data-xs-t-1500")), e.hasAttribute("data-xs-t-1600") && (Et = this.getObjVal(e, "data-xs-t-1600")), e.hasAttribute("data-xs-t-1700") && (Vt = this.getObjVal(e, "data-xs-t-1700")), e.hasAttribute("data-xs-t-1800") && (dt = this.getObjVal(e, "data-xs-t-1800")), e.hasAttribute("data-xs-t-1900") && (Yt = this.getObjVal(e, "data-xs-t-1900")), e.hasAttribute("data-xs-t-2000") && (V = this.getObjVal(e, "data-xs-t-2000")), e.hasAttribute("data-xs-t-2100") && (Mt = this.getObjVal(e, "data-xs-t-2100")), e.hasAttribute("data-xs-t-2200") && (vt = this.getObjVal(e, "data-xs-t-2200")), e.hasAttribute("data-xs-t-2300") && (Pt = this.getObjVal(e, "data-xs-t-2300")), e.hasAttribute("data-xs-t-2400") && (qt = this.getObjVal(e, "data-xs-t-2400")), e.hasAttribute("data-xs-t-2500") && (Dt = this.getObjVal(e, "data-xs-t-2500")), e.hasAttribute("data-xs-t-2600") && (p = this.getObjVal(e, "data-xs-t-2600")), e.hasAttribute("data-xs-t-2700") && (m = this.getObjVal(e, "data-xs-t-2700")), e.hasAttribute("data-xs-t-2800") && (y = this.getObjVal(e, "data-xs-t-2800")));
|
|
600
|
-
let W = P, H = D,
|
|
601
|
-
Ft < 730 ? (It = W, Q = H, P =
|
|
600
|
+
let W = P, H = D, _ = rt, $ = _t, M = ot, ht = Ot, F = pt, J = z, ct = lt, zt = et, St = it, Xt = mt, nt = bt, j = st, U = yt, ut = q, te = Et, ee = Vt, ie = dt, se = Yt, ne = V, ae = Mt, re = vt, oe = Pt, le = qt, de = Dt, he = p, ce = m, ue = y, Ft = window.innerHeight;
|
|
601
|
+
Ft < 730 ? (It = W, Q = H, P = _, D = $, rt = M, _t = ht, ot = F, Ot = J, pt = ct, z = zt, lt = St, et = Xt, it = nt, mt = j, bt = U, st = ut, yt = te, q = ee, Et = ie, Vt = se, dt = ne, Yt = ae, V = re, Mt = oe, vt = le, Pt = de, qt = he, Dt = ce, p = ue, m = {}, y = {}) : Ft >= 730 && Ft < 790 ? (Q = W, P = H, D = _, rt = $, _t = M, ot = ht, Ot = F, pt = J, z = ct, lt = zt, et = St, it = Xt, mt = nt, bt = j, st = U, yt = ut, q = te, Et = ee, Vt = ie, dt = se, Yt = ne, V = ae, Mt = re, vt = oe, Pt = le, qt = de, Dt = he, p = ce, m = ue, y = {}) : Ft >= 790 && Ft < 840 || (Ft >= 840 && Ft < 1125 ? (P = {}, D = W, rt = H, _t = _, ot = $, Ot = M, pt = ht, z = F, lt = J, et = ct, it = zt, mt = St, bt = Xt, st = nt, yt = j, q = U, Et = ut, Vt = te, dt = ee, Yt = ie, V = se, Mt = ne, vt = ae, Pt = re, qt = oe, Dt = le, p = de, m = he, y = ce, w = ue) : (P = {}, D = {}, rt = W, _t = H, ot = _, Ot = $, pt = M, z = ht, lt = F, et = J, it = ct, mt = zt, bt = St, st = Xt, yt = nt, q = j, Et = U, Vt = ut, dt = te, Yt = ee, V = ie, Mt = se, vt = ne, Pt = ae, qt = re, Dt = oe, p = le, m = de, y = he, w = ce, k = ue));
|
|
602
602
|
let g = {};
|
|
603
|
-
Object.keys(O).length !== 0 && (g = this.parseObj(O, "elInY", g)), Object.keys(
|
|
603
|
+
Object.keys(O).length !== 0 && (g = this.parseObj(O, "elInY", g)), Object.keys(T).length !== 0 && (g = this.parseObj(T, "elInY+50", g)), Object.keys(v).length !== 0 && (g = this.parseObj(v, "elInY+100", g)), Object.keys(u).length !== 0 && (g = this.parseObj(u, "elInY+150", g)), Object.keys(l).length !== 0 && (g = this.parseObj(l, "elInY+200", g)), Object.keys(kt).length !== 0 && (g = this.parseObj(kt, "elInY+250", g)), Object.keys(Lt).length !== 0 && (g = this.parseObj(Lt, "elInY+300", g)), Object.keys(Ct).length !== 0 && (g = this.parseObj(Ct, "elInY+350", g)), Object.keys(Bt).length !== 0 && (g = this.parseObj(Bt, "elInY+400", g)), Object.keys(ft).length !== 0 && (g = this.parseObj(ft, "elInY+450", g)), Object.keys(K).length !== 0 && (g = this.parseObj(K, "elInY+500", g)), Object.keys(E).length !== 0 && (g = this.parseObj(E, "elInY+550", g)), Object.keys(A).length !== 0 && (g = this.parseObj(A, "elInY+600", g)), Object.keys(C).length !== 0 && (g = this.parseObj(C, "elInY+650", g)), Object.keys(b).length !== 0 && (g = this.parseObj(b, "elCenterY-300", g)), Object.keys(f).length !== 0 && (g = this.parseObj(f, "elCenterY", g)), Object.keys(c).length !== 0 && (g = this.parseObj(c, "elCenterY+100", g)), Object.keys(d).length !== 0 && (g = this.parseObj(d, "elCenterY+200", g)), Object.keys(h).length !== 0 && (g = this.parseObj(h, "elCenterY+300", g)), Object.keys(n).length !== 0 && (g = this.parseObj(n, "elOutY-300", g)), Object.keys(r).length !== 0 && (g = this.parseObj(r, "elOutY", g)), Object.keys(I).length !== 0 && (g = this.parseObj(I, "elInY", g)), Object.keys(tt).length !== 0 && (g = this.parseObj(tt, "elInY+150", g)), Object.keys(At).length !== 0 && (g = this.parseObj(At, "elInY+300 ", g)), Object.keys(B).length !== 0 && (g = this.parseObj(B, "elCenterY-150", g)), Object.keys(gt).length !== 0 && (g = this.parseObj(gt, "elCenterY", g)), Object.keys(x).length !== 0 && (g = this.parseObj(x, "elCenterY+150", g)), Object.keys(S).length !== 0 && (g = this.parseObj(S, "elOutY-300 ", g)), Object.keys(X).length !== 0 && (g = this.parseObj(X, "elOutY-150 ", g)), Object.keys(L).length !== 0 && (g = this.parseObj(L, "elOutY", g)), Object.keys(It).length !== 0 && (g = this.parseObj(It, "elInY-200", g)), Object.keys(Q).length !== 0 && (g = this.parseObj(Q, "elInY-100", g)), Object.keys(P).length !== 0 && (g = this.parseObj(P, "elInY", g)), Object.keys(D).length !== 0 && (g = this.parseObj(D, "elInY+100", g)), Object.keys(rt).length !== 0 && (g = this.parseObj(rt, "elInY+200", g)), Object.keys(_t).length !== 0 && (g = this.parseObj(_t, "elInY+300 ", g)), Object.keys(ot).length !== 0 && (g = this.parseObj(ot, "elInY+400 ", g)), Object.keys(Ot).length !== 0 && (g = this.parseObj(Ot, "elInY+500 ", g)), Object.keys(pt).length !== 0 && (g = this.parseObj(pt, "elInY+600 ", g)), Object.keys(z).length !== 0 && (g = this.parseObj(z, "elInY+700 ", g)), Object.keys(lt).length !== 0 && (g = this.parseObj(lt, "elInY+800 ", g)), Object.keys(et).length !== 0 && (g = this.parseObj(et, "elInY+900 ", g)), Object.keys(it).length !== 0 && (g = this.parseObj(it, "elInY+1000 ", g)), Object.keys(mt).length !== 0 && (g = this.parseObj(mt, "elInY+1100 ", g)), Object.keys(bt).length !== 0 && (g = this.parseObj(bt, "elInY+1200 ", g)), Object.keys(st).length !== 0 && (g = this.parseObj(st, "elInY+1300 ", g)), Object.keys(yt).length !== 0 && (g = this.parseObj(yt, "elInY+1400 ", g)), Object.keys(q).length !== 0 && (g = this.parseObj(q, "elInY+1500 ", g)), Object.keys(Et).length !== 0 && (g = this.parseObj(Et, "elInY+1600 ", g)), Object.keys(Vt).length !== 0 && (g = this.parseObj(Vt, "elInY+1700 ", g)), Object.keys(dt).length !== 0 && (g = this.parseObj(dt, "elInY+1800 ", g)), Object.keys(Yt).length !== 0 && (g = this.parseObj(Yt, "elInY+1900 ", g)), Object.keys(V).length !== 0 && (g = this.parseObj(V, "elInY+2000 ", g)), Object.keys(Mt).length !== 0 && (g = this.parseObj(Mt, "elInY+2100 ", g)), Object.keys(vt).length !== 0 && (g = this.parseObj(vt, "elInY+2200 ", g)), Object.keys(Pt).length !== 0 && (g = this.parseObj(Pt, "elInY+2300 ", g)), Object.keys(qt).length !== 0 && (g = this.parseObj(qt, "elInY+2400 ", g)), Object.keys(Dt).length !== 0 && (g = this.parseObj(Dt, "elInY+2500 ", g)), Object.keys(p).length !== 0 && (g = this.parseObj(p, "elInY+2600 ", g)), Object.keys(m).length !== 0 && (g = this.parseObj(m, "elInY+2700 ", g)), Object.keys(y).length !== 0 && (g = this.parseObj(y, "elInY+2800 ", g)), Object.keys(w).length !== 0 && (g = this.parseObj(w, "elInY+2900 ", g)), Object.keys(k).length !== 0 && (g = this.parseObj(k, "elInY+3000 ", g)), e.style.transition = "", e.setAttribute("data-dummy-selector", "1"), Zt.addElements("[data-dummy-selector]", {
|
|
604
604
|
scrollY: g
|
|
605
605
|
}), this.elements.push(document.querySelector("[data-dummy-selector]")), e.removeAttribute("data-dummy-selector"), setTimeout(() => {
|
|
606
606
|
e.style.opacity = 1, e.getAttribute("data-smooth-scrolling") === "off" || this.settings.transition && (e.style.transition = this.settings.transition);
|
|
@@ -1562,26 +1562,26 @@ function _e(o) {
|
|
|
1562
1562
|
function xi(o) {
|
|
1563
1563
|
if (o.events.hasOwnProperty("touch"))
|
|
1564
1564
|
return !1;
|
|
1565
|
-
let t = Fe(), i = t.width, s = t.height, e = !1, a = null, r = null, n = null, h = !1, d = 1, c = 4.5, f = 1, b = !1,
|
|
1565
|
+
let t = Fe(), i = t.width, s = t.height, e = !1, a = null, r = null, n = null, h = !1, d = 1, c = 4.5, f = 1, b = !1, C = !1, A = null, E = null, K = null, ft = null, Bt, Ct, Lt = 0, kt = 0, l = !1, u = !1, v = {}, T = {}, O = 0, I = 0, tt;
|
|
1566
1566
|
const At = document.getElementById("glightbox-slider"), B = document.querySelector(".goverlay"), gt = new wi(At, {
|
|
1567
1567
|
touchStart: (x) => {
|
|
1568
1568
|
if (e = !0, (jt(x.targetTouches[0].target, "ginner-container") || Wt(x.targetTouches[0].target, ".gslide-desc") || x.targetTouches[0].target.nodeName.toLowerCase() == "a") && (e = !1), Wt(x.targetTouches[0].target, ".gslide-inline") && !jt(x.targetTouches[0].target.parentNode, "gslide-inline") && (e = !1), e) {
|
|
1569
|
-
if (
|
|
1569
|
+
if (T = x.targetTouches[0], v.pageX = x.targetTouches[0].pageX, v.pageY = x.targetTouches[0].pageY, O = x.targetTouches[0].clientX, I = x.targetTouches[0].clientY, a = o.activeSlide, r = a.querySelector(".gslide-media"), tt = a.querySelector(".gslide-inline"), n = null, jt(r, "gslide-image") && (n = r.querySelector("img")), (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) > 769 && (r = a.querySelector(".ginner-container")), wt(B, "greset"), x.pageX > 20 && x.pageX < window.innerWidth - 20)
|
|
1570
1570
|
return;
|
|
1571
1571
|
x.preventDefault();
|
|
1572
1572
|
}
|
|
1573
1573
|
},
|
|
1574
1574
|
touchMove: (x) => {
|
|
1575
|
-
if (!e || (
|
|
1575
|
+
if (!e || (T = x.targetTouches[0], b || C))
|
|
1576
1576
|
return;
|
|
1577
1577
|
if (tt && tt.offsetHeight > s) {
|
|
1578
|
-
const R = v.pageX -
|
|
1578
|
+
const R = v.pageX - T.pageX;
|
|
1579
1579
|
if (Math.abs(R) <= 13)
|
|
1580
1580
|
return !1;
|
|
1581
1581
|
}
|
|
1582
1582
|
h = !0;
|
|
1583
|
-
let
|
|
1584
|
-
Math.abs(L) > Math.abs(Z) ? (l = !1, u = !0) : (u = !1, l = !0), Bt =
|
|
1583
|
+
let S = x.targetTouches[0].clientX, X = x.targetTouches[0].clientY, L = O - S, Z = I - X;
|
|
1584
|
+
Math.abs(L) > Math.abs(Z) ? (l = !1, u = !0) : (u = !1, l = !0), Bt = T.pageX - v.pageX, Lt = Bt * 100 / i, Ct = T.pageY - v.pageY, kt = Ct * 100 / s;
|
|
1585
1585
|
let G;
|
|
1586
1586
|
if (l && n && (G = 1 - Math.abs(Ct) / s, B.style.opacity = G, o.settings.touchFollowAxis && (Lt = 0)), u && (G = 1 - Math.abs(Bt) / i, r.style.opacity = G, o.settings.touchFollowAxis && (kt = 0)), !n)
|
|
1587
1587
|
return ye(r, `translate3d(${Lt}%, 0, 0)`);
|
|
@@ -1590,16 +1590,16 @@ function xi(o) {
|
|
|
1590
1590
|
touchEnd: () => {
|
|
1591
1591
|
if (!e)
|
|
1592
1592
|
return;
|
|
1593
|
-
if (h = !1,
|
|
1594
|
-
K =
|
|
1593
|
+
if (h = !1, C || b) {
|
|
1594
|
+
K = A, ft = E;
|
|
1595
1595
|
return;
|
|
1596
1596
|
}
|
|
1597
|
-
const x = Math.abs(parseInt(kt)),
|
|
1597
|
+
const x = Math.abs(parseInt(kt)), S = Math.abs(parseInt(Lt));
|
|
1598
1598
|
if (x > 29 && n) {
|
|
1599
1599
|
o.close();
|
|
1600
1600
|
return;
|
|
1601
1601
|
}
|
|
1602
|
-
if (x < 29 &&
|
|
1602
|
+
if (x < 29 && S < 25)
|
|
1603
1603
|
return Y(B, "greset"), B.style.opacity = 1, _e(r);
|
|
1604
1604
|
},
|
|
1605
1605
|
multipointEnd: () => {
|
|
@@ -1614,23 +1614,23 @@ function xi(o) {
|
|
|
1614
1614
|
if (!n || h)
|
|
1615
1615
|
return !1;
|
|
1616
1616
|
b = !0, n.scaleX = n.scaleY = d * x.zoom;
|
|
1617
|
-
let
|
|
1618
|
-
if (
|
|
1619
|
-
|
|
1617
|
+
let S = d * x.zoom;
|
|
1618
|
+
if (C = !0, S <= 1) {
|
|
1619
|
+
C = !1, S = 1, ft = null, K = null, A = null, E = null, n.setAttribute("style", "");
|
|
1620
1620
|
return;
|
|
1621
1621
|
}
|
|
1622
|
-
|
|
1622
|
+
S > c && (S = c), n.style.transform = `scale3d(${S}, ${S}, 1)`, f = S;
|
|
1623
1623
|
},
|
|
1624
1624
|
pressMove: (x) => {
|
|
1625
|
-
if (
|
|
1626
|
-
var
|
|
1627
|
-
K && (
|
|
1628
|
-
let L = `translate3d(${
|
|
1625
|
+
if (C && !b) {
|
|
1626
|
+
var S = T.pageX - v.pageX, X = T.pageY - v.pageY;
|
|
1627
|
+
K && (S = S + K), ft && (X = X + ft), A = S, E = X;
|
|
1628
|
+
let L = `translate3d(${S}px, ${X}px, 0)`;
|
|
1629
1629
|
f && (L += ` scale3d(${f}, ${f}, 1)`), ye(n, L);
|
|
1630
1630
|
}
|
|
1631
1631
|
},
|
|
1632
1632
|
swipe: (x) => {
|
|
1633
|
-
if (!
|
|
1633
|
+
if (!C) {
|
|
1634
1634
|
if (b) {
|
|
1635
1635
|
b = !1;
|
|
1636
1636
|
return;
|
|
@@ -1783,20 +1783,20 @@ function Si(o, t, i, s) {
|
|
|
1783
1783
|
r.style.maxWidth = t.width, ze(this.settings.plyr.js, "Plyr", () => {
|
|
1784
1784
|
if (!c && d.match(/vimeo\.com\/([0-9]*)/) && (c = "vimeo"), !c && (d.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/) || d.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/) || d.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/)) && (c = "youtube"), c === "local" || !c) {
|
|
1785
1785
|
c = "local";
|
|
1786
|
-
let
|
|
1787
|
-
|
|
1786
|
+
let E = '<video id="' + a + '" ';
|
|
1787
|
+
E += `style="background:#000; max-width: ${t.width};" `, E += 'preload="metadata" ', E += 'x-webkit-airplay="allow" ', E += "playsinline ", E += "controls ", E += 'class="gvideo-local">', E += `<source src="${d}">`, E += "</video>", f = Ut(E);
|
|
1788
1788
|
}
|
|
1789
1789
|
const b = f || Ut(`<div id="${a}" data-plyr-provider="${c}" data-plyr-embed-id="${d}"></div>`);
|
|
1790
1790
|
Y(h, `${c}-video gvideo`), h.appendChild(b), h.setAttribute("data-id", a), h.setAttribute("data-index", i);
|
|
1791
|
-
const
|
|
1792
|
-
|
|
1793
|
-
n[a] =
|
|
1791
|
+
const C = xt(this.settings.plyr, "config") ? this.settings.plyr.config : {}, A = new Plyr("#" + a, C);
|
|
1792
|
+
A.on("ready", (E) => {
|
|
1793
|
+
n[a] = E.detail.plyr, N(s) && s();
|
|
1794
1794
|
}), Ee(
|
|
1795
1795
|
() => o.querySelector("iframe") && o.querySelector("iframe").dataset.ready == "true",
|
|
1796
1796
|
() => {
|
|
1797
1797
|
this.resize(o);
|
|
1798
1798
|
}
|
|
1799
|
-
),
|
|
1799
|
+
), A.on("enterfullscreen", Be), A.on("exitfullscreen", Be);
|
|
1800
1800
|
});
|
|
1801
1801
|
}
|
|
1802
1802
|
function Be(o) {
|
|
@@ -1890,10 +1890,10 @@ class Ti {
|
|
|
1890
1890
|
at(s, (h, d) => {
|
|
1891
1891
|
n.push(";\\s?" + d);
|
|
1892
1892
|
}), n = n.join("\\s?:|"), a.trim() !== "" && at(s, (h, d) => {
|
|
1893
|
-
const c = a, f = "s?" + d + "s?:s?(.*?)(" + n + "s?:|$)", b = new RegExp(f),
|
|
1894
|
-
if (
|
|
1895
|
-
const
|
|
1896
|
-
s[d] = this.sanitizeValue(
|
|
1893
|
+
const c = a, f = "s?" + d + "s?:s?(.*?)(" + n + "s?:|$)", b = new RegExp(f), C = c.match(b);
|
|
1894
|
+
if (C && C.length && C[1]) {
|
|
1895
|
+
const A = C[1].trim().replace(/;\s*$/, "");
|
|
1896
|
+
s[d] = this.sanitizeValue(A);
|
|
1897
1897
|
}
|
|
1898
1898
|
});
|
|
1899
1899
|
}
|
|
@@ -1966,14 +1966,14 @@ class pe {
|
|
|
1966
1966
|
slide: t,
|
|
1967
1967
|
player: !1
|
|
1968
1968
|
});
|
|
1969
|
-
let r = e.type, n = e.descPosition, h = t.querySelector(".gslide-media"), d = t.querySelector(".gslide-title"), c = t.querySelector(".gslide-desc"), f = t.querySelector(".gdesc-inner"), b = i,
|
|
1969
|
+
let r = e.type, n = e.descPosition, h = t.querySelector(".gslide-media"), d = t.querySelector(".gslide-title"), c = t.querySelector(".gslide-desc"), f = t.querySelector(".gdesc-inner"), b = i, C = "gSlideTitle_" + this.index, A = "gSlideDesc_" + this.index;
|
|
1970
1970
|
if (N(s.afterSlideLoad) && (b = () => {
|
|
1971
1971
|
N(i) && i(), s.afterSlideLoad({
|
|
1972
1972
|
index: this.index,
|
|
1973
1973
|
slide: t,
|
|
1974
1974
|
player: this.instance.getSlidePlayerInstance(this.index)
|
|
1975
1975
|
});
|
|
1976
|
-
}), e.title == "" && e.description == "" ? f && f.parentNode.parentNode.removeChild(f.parentNode) : (d && e.title !== "" ? (d.id =
|
|
1976
|
+
}), e.title == "" && e.description == "" ? f && f.parentNode.parentNode.removeChild(f.parentNode) : (d && e.title !== "" ? (d.id = C, d.innerHTML = e.title) : d.parentNode.removeChild(d), c && e.description !== "" ? (c.id = A, a && s.moreLength > 0 ? (e.smallDescription = this.slideShortDesc(e.description, s.moreLength, s.moreText), c.innerHTML = e.smallDescription, this.descriptionEvents(c, e)) : c.innerHTML = e.description) : c.parentNode.removeChild(c), Y(h.parentNode, `desc-${n}`), Y(f.parentNode, `description-${n}`)), Y(h, `gslide-${r}`), Y(t, "loaded"), r === "video") {
|
|
1977
1977
|
Si.apply(this.instance, [t, e, this.index, b]);
|
|
1978
1978
|
return;
|
|
1979
1979
|
}
|
|
@@ -1993,14 +1993,14 @@ class pe {
|
|
|
1993
1993
|
}
|
|
1994
1994
|
if (r === "image") {
|
|
1995
1995
|
Ai(t, e, this.index, () => {
|
|
1996
|
-
const
|
|
1996
|
+
const E = t.querySelector("img");
|
|
1997
1997
|
e.draggable && new He({
|
|
1998
|
-
dragEl:
|
|
1998
|
+
dragEl: E,
|
|
1999
1999
|
toleranceX: s.dragToleranceX,
|
|
2000
2000
|
toleranceY: s.dragToleranceY,
|
|
2001
2001
|
slide: t,
|
|
2002
2002
|
instance: this.instance
|
|
2003
|
-
}), e.zoomable &&
|
|
2003
|
+
}), e.zoomable && E.naturalWidth > E.offsetWidth && (Y(E, "zoomable"), new Oi(E, t, () => {
|
|
2004
2004
|
this.instance.resize();
|
|
2005
2005
|
})), N(b) && b();
|
|
2006
2006
|
});
|
|
@@ -2675,14 +2675,14 @@ class Re {
|
|
|
2675
2675
|
if (s) {
|
|
2676
2676
|
let d = xt(this.settings.plyr.config, "ratio") ? this.settings.plyr.config.ratio : "";
|
|
2677
2677
|
if (!d) {
|
|
2678
|
-
const
|
|
2679
|
-
d = `${
|
|
2678
|
+
const A = s.clientWidth, E = s.clientHeight, K = A / E;
|
|
2679
|
+
d = `${A / K}:${E / K}`;
|
|
2680
2680
|
}
|
|
2681
2681
|
let c = d.split(":"), f = this.settings.videosWidth, b = this.settings.videosWidth;
|
|
2682
2682
|
ve(f) || f.indexOf("px") !== -1 ? b = parseInt(f) : f.indexOf("vw") !== -1 ? b = r * parseInt(f) / 100 : f.indexOf("vh") !== -1 ? b = n * parseInt(f) / 100 : f.indexOf("%") !== -1 ? b = r * parseInt(f) / 100 : b = parseInt(s.clientWidth);
|
|
2683
|
-
let
|
|
2684
|
-
if (
|
|
2685
|
-
let
|
|
2683
|
+
let C = b / (parseInt(c[0]) / parseInt(c[1]));
|
|
2684
|
+
if (C = Math.floor(C), h && (n = n - a.offsetHeight), b > r || C > n || n < C && r > b) {
|
|
2685
|
+
let A = s.offsetWidth, E = s.offsetHeight, K = n / E, ft = { width: A * K };
|
|
2686
2686
|
s.parentNode.setAttribute("style", `max-width: ${ft.width}px`), h && a.setAttribute("style", `max-width: ${ft.width}px;`);
|
|
2687
2687
|
} else
|
|
2688
2688
|
s.parentNode.style.maxWidth = `${f}`, h && a.setAttribute("style", `max-width: ${f};`);
|
|
@@ -2908,8 +2908,8 @@ class Ci {
|
|
|
2908
2908
|
const s = Date.now();
|
|
2909
2909
|
let e = 0, a = 0;
|
|
2910
2910
|
for (let n = this.queue.length - 1; n >= 0; n--) {
|
|
2911
|
-
const h = this.queue[n], d = s - h.start, c = d >= this.animationTime, f = c ? 1 : d / this.animationTime, b = this._pulse(f),
|
|
2912
|
-
e +=
|
|
2911
|
+
const h = this.queue[n], d = s - h.start, c = d >= this.animationTime, f = c ? 1 : d / this.animationTime, b = this._pulse(f), C = h.x * b - h.lastX >> 0, A = h.y * b - h.lastY >> 0;
|
|
2912
|
+
e += C, a += A, h.lastX += C, h.lastY += A, c && this.queue.splice(n, 1);
|
|
2913
2913
|
}
|
|
2914
2914
|
if (t === document.scrollingElement || t === document.documentElement || t === document.body ? window.scrollBy(e, a) : (e && (t.scrollLeft += e), a && (t.scrollTop += a)), this.queue.length > 0)
|
|
2915
2915
|
requestAnimationFrame(i);
|
|
@@ -2945,6 +2945,8 @@ class Li {
|
|
|
2945
2945
|
// Simple on/off for external plugins
|
|
2946
2946
|
trustedDomains: [],
|
|
2947
2947
|
// Optional: whitelist specific domains
|
|
2948
|
+
onReInit: () => {
|
|
2949
|
+
},
|
|
2948
2950
|
...t
|
|
2949
2951
|
}, this.plugins = /* @__PURE__ */ new Map(), this.loadedStyles = /* @__PURE__ */ new Set(), this.components = /* @__PURE__ */ new Map(), this.externalPlugins = /* @__PURE__ */ new Map();
|
|
2950
2952
|
}
|
|
@@ -3037,7 +3039,7 @@ class Li {
|
|
|
3037
3039
|
c.setAttribute("data-edit-id", b);
|
|
3038
3040
|
}), i.hasAttribute("data-cb-original-content") || i.setAttribute("data-cb-original-content", i.innerHTML);
|
|
3039
3041
|
const d = a.mount(i, r);
|
|
3040
|
-
this.components.set(i, d), this.setupInlineEditing(i, r), i.setAttribute("data-cb-loaded", "true");
|
|
3042
|
+
this.components.set(i, d), this.setupInlineEditing(i, r), i.setAttribute("data-cb-loaded", "true"), typeof i.mount == "function" && i.mount();
|
|
3041
3043
|
} catch (r) {
|
|
3042
3044
|
console.error(`[PluginManager] Failed to mount component "${e}":`, r);
|
|
3043
3045
|
}
|
|
@@ -3085,13 +3087,13 @@ class Li {
|
|
|
3085
3087
|
const a = (r, n) => {
|
|
3086
3088
|
const h = t.getAttribute("data-cb-original-content");
|
|
3087
3089
|
if (!h) return;
|
|
3088
|
-
const
|
|
3089
|
-
|
|
3090
|
-
const
|
|
3091
|
-
if (
|
|
3092
|
-
|
|
3093
|
-
const
|
|
3094
|
-
t.setAttribute("data-cb-original-content",
|
|
3090
|
+
const d = document.createElement("template");
|
|
3091
|
+
d.innerHTML = h.trim();
|
|
3092
|
+
const f = d.content.querySelector(`[data-edit-id="${r}"]`);
|
|
3093
|
+
if (f) {
|
|
3094
|
+
f.innerHTML = n;
|
|
3095
|
+
const b = d.innerHTML;
|
|
3096
|
+
t.setAttribute("data-cb-original-content", b);
|
|
3095
3097
|
}
|
|
3096
3098
|
};
|
|
3097
3099
|
s.forEach((r) => {
|
|
@@ -3181,19 +3183,24 @@ class Li {
|
|
|
3181
3183
|
try {
|
|
3182
3184
|
const c = this.parseOptions(n);
|
|
3183
3185
|
let f = n.querySelector(".grid-sortable");
|
|
3184
|
-
f || n.classList.contains("grid-sortable") && (f = n), f && Array.from(f.children).forEach((
|
|
3185
|
-
|
|
3186
|
-
}), n.querySelectorAll(".edit").forEach((
|
|
3187
|
-
const K = `content-${Date.now()}-${r}-${
|
|
3188
|
-
|
|
3189
|
-
}), n.hasAttribute("data-cb-original-content")
|
|
3190
|
-
|
|
3191
|
-
|
|
3186
|
+
if (f || n.classList.contains("grid-sortable") && (f = n), f && Array.from(f.children).forEach((A, E) => {
|
|
3187
|
+
A.nodeType === 1 && A.tagName !== "STYLE" && A.tagName !== "SCRIPT" && A.setAttribute("data-index", E);
|
|
3188
|
+
}), n.querySelectorAll(".edit").forEach((A, E) => {
|
|
3189
|
+
const K = `content-${Date.now()}-${r}-${E}`;
|
|
3190
|
+
A.setAttribute("data-edit-id", K);
|
|
3191
|
+
}), !n.hasAttribute("data-cb-original-content"))
|
|
3192
|
+
n.setAttribute("data-cb-original-content", n.innerHTML);
|
|
3193
|
+
else {
|
|
3194
|
+
let A = document.createRange();
|
|
3195
|
+
n.innerHTML = "", n.appendChild(A.createContextualFragment(n.getAttribute("data-cb-original-content")));
|
|
3196
|
+
}
|
|
3197
|
+
const C = await d.mount(n, c);
|
|
3198
|
+
this.components.set(n, C), this.setupInlineEditing(n, c), n.setAttribute("data-cb-loaded", "true"), typeof n.mount == "function" && n.mount(), r++;
|
|
3192
3199
|
} catch (c) {
|
|
3193
3200
|
console.error(`[PluginManager] Failed to mount component "${h}":`, c);
|
|
3194
3201
|
}
|
|
3195
3202
|
}
|
|
3196
|
-
return this.emit("reinitialized", { container: t, count: r }), r;
|
|
3203
|
+
return typeof this.config.onReInit == "function" && this.config.onReInit(), this.emit("reinitialized", { container: t, count: r }), r;
|
|
3197
3204
|
} finally {
|
|
3198
3205
|
this.reinitializeInProgress = !1;
|
|
3199
3206
|
}
|
|
@@ -3380,7 +3387,10 @@ class Yi {
|
|
|
3380
3387
|
autoLoad: this.settings.autoLoadPlugins,
|
|
3381
3388
|
pluginBaseUrl: this.settings.pluginBaseUrl,
|
|
3382
3389
|
allowExternalPlugins: this.settings.allowExternalPlugins,
|
|
3383
|
-
trustedDomains: this.settings.trustedDomains
|
|
3390
|
+
trustedDomains: this.settings.trustedDomains,
|
|
3391
|
+
onReInit: () => {
|
|
3392
|
+
this.functionLightboxInit();
|
|
3393
|
+
}
|
|
3384
3394
|
}), this.pluginManager.setRuntime(this), window.pageReRender = () => {
|
|
3385
3395
|
this.pageReRender();
|
|
3386
3396
|
};
|
|
@@ -3504,9 +3514,9 @@ class Yi {
|
|
|
3504
3514
|
if (d.indexOf("#section") === 0) {
|
|
3505
3515
|
let c = d.replace("#section", "");
|
|
3506
3516
|
if (!isNaN(parseInt(c))) {
|
|
3507
|
-
let f = document.querySelectorAll(".is-section"), b,
|
|
3508
|
-
f.forEach(function(
|
|
3509
|
-
|
|
3517
|
+
let f = document.querySelectorAll(".is-section"), b, C = 0;
|
|
3518
|
+
f.forEach(function(A) {
|
|
3519
|
+
A.classList.contains("is-section-navbar") || (C === c - 1 && (b = A), C++);
|
|
3510
3520
|
}), b && this.scrollIt(b, 1e3, "easeInQuad"), h.preventDefault();
|
|
3511
3521
|
}
|
|
3512
3522
|
} else
|
|
@@ -3594,8 +3604,8 @@ class Yi {
|
|
|
3594
3604
|
document.querySelectorAll(".is-section").forEach((d) => {
|
|
3595
3605
|
const c = d.getBoundingClientRect().top;
|
|
3596
3606
|
let f, b;
|
|
3597
|
-
d.parentNode.classList.contains("pin-wrap") ? (f = d.parentNode.nextElementSibling, b = d.parentNode.previousElementSibling) : (f = d.nextElementSibling, b = d.previousElementSibling), f && f.classList.contains("pin-wrap") && (f = f.querySelector(".is-section")), b && b.classList.contains("pin-wrap") && (b = b.querySelector(".is-section")), c <= 0 && ((d.classList.contains("no-spacing") || d.classList.contains("pin-overlap")) && d.classList.add("section-inview"), document.querySelectorAll(".is-section").forEach((
|
|
3598
|
-
|
|
3607
|
+
d.parentNode.classList.contains("pin-wrap") ? (f = d.parentNode.nextElementSibling, b = d.parentNode.previousElementSibling) : (f = d.nextElementSibling, b = d.previousElementSibling), f && f.classList.contains("pin-wrap") && (f = f.querySelector(".is-section")), b && b.classList.contains("pin-wrap") && (b = b.querySelector(".is-section")), c <= 0 && ((d.classList.contains("no-spacing") || d.classList.contains("pin-overlap")) && d.classList.add("section-inview"), document.querySelectorAll(".is-section").forEach((A) => {
|
|
3608
|
+
A !== d && A.classList.remove("section-inview");
|
|
3599
3609
|
}));
|
|
3600
3610
|
});
|
|
3601
3611
|
};
|