gralobe 1.0.55 → 1.0.56
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/gralobe.js +388 -377
- package/dist/gralobe.js.map +1 -1
- package/dist/gralobe.umd.cjs +6 -6
- package/dist/gralobe.umd.cjs.map +1 -1
- package/dist/index.d.ts +15 -2
- package/package.json +1 -1
package/dist/gralobe.js
CHANGED
|
@@ -189,12 +189,12 @@ var oe = {
|
|
|
189
189
|
var t = e.data;
|
|
190
190
|
return t === "isFromStart" || t === "isStart";
|
|
191
191
|
}, On = function(e, t, i, r) {
|
|
192
|
-
var n = e.ratio, s = t < 0 || !t && (!e._start && kn(e) && !(!e._initted && ai(e)) || (e._ts < 0 || e._dp._ts < 0) && !ai(e)) ? 0 : 1, a = e._rDelay, l = 0,
|
|
193
|
-
if (a && e._repeat && (l = wt(0, e._tDur, t),
|
|
192
|
+
var n = e.ratio, s = t < 0 || !t && (!e._start && kn(e) && !(!e._initted && ai(e)) || (e._ts < 0 || e._dp._ts < 0) && !ai(e)) ? 0 : 1, a = e._rDelay, l = 0, u, c, h;
|
|
193
|
+
if (a && e._repeat && (l = wt(0, e._tDur, t), c = tt(l, a), e._yoyo && c & 1 && (s = 1 - s), c !== tt(e._tTime, a) && (n = 1 - s, e.vars.repeatRefresh && e._initted && e.invalidate())), s !== n || W || r || e._zTime === k || !t && e._zTime) {
|
|
194
194
|
if (!e._initted && Lr(e, t, r, i, l))
|
|
195
195
|
return;
|
|
196
|
-
for (h = e._zTime, e._zTime = t || (i ? k : 0), i || (i = t && !h), e.ratio = s, e._from && (s = 1 - s), e._time = 0, e._tTime = l,
|
|
197
|
-
|
|
196
|
+
for (h = e._zTime, e._zTime = t || (i ? k : 0), i || (i = t && !h), e.ratio = s, e._from && (s = 1 - s), e._time = 0, e._tTime = l, u = e._pt; u; )
|
|
197
|
+
u.r(s, u.d), u = u._next;
|
|
198
198
|
t < 0 && si(e, t, i, !0), e._onUpdate && !i && ae(e, "onUpdate"), l && e._repeat && !i && e.parent && ae(e, "onRepeat"), (t >= e._tDur || t < 0) && e.ratio === s && (s && De(e, 1), !i && !W && (ae(e, s ? "onComplete" : "onReverseComplete", !0), e._prom && e._prom()));
|
|
199
199
|
} else e._zTime || (e._zTime = t);
|
|
200
200
|
}, Fn = function(e, t, i) {
|
|
@@ -221,8 +221,8 @@ var oe = {
|
|
|
221
221
|
endTime: gt,
|
|
222
222
|
totalDuration: gt
|
|
223
223
|
}, ue = function o(e, t, i) {
|
|
224
|
-
var r = e.labels, n = e._recent || Un, s = e.duration() >= he ? n.endTime(!1) : e._dur, a, l,
|
|
225
|
-
return Y(t) && (isNaN(t) || t in r) ? (l = t.charAt(0),
|
|
224
|
+
var r = e.labels, n = e._recent || Un, s = e.duration() >= he ? n.endTime(!1) : e._dur, a, l, u;
|
|
225
|
+
return Y(t) && (isNaN(t) || t in r) ? (l = t.charAt(0), u = t.substr(-1) === "%", a = t.indexOf("="), l === "<" || l === ">" ? (a >= 0 && (t = t.replace(/=/, "")), (l === "<" ? n._start : n.endTime(n._repeat >= 0)) + (parseFloat(t.substr(1)) || 0) * (u ? (a < 0 ? n : i).totalDuration() / 100 : 1)) : a < 0 ? (t in r || (r[t] = s), r[t]) : (l = parseFloat(t.charAt(a - 1) + t.substr(a + 1)), u && i && (l = l / 100 * (Z(i) ? i[0] : i).totalDuration()), a > 1 ? o(e, t.substr(0, a - 1), i) + l : s + l)) : t == null ? s : +t;
|
|
226
226
|
}, pt = function(e, t, i) {
|
|
227
227
|
var r = Ee(t[1]), n = (r ? 2 : 1) + (e < 2 ? 0 : 1), s = t[n], a, l;
|
|
228
228
|
if (r && (s.duration = t[1]), s.parent = i, e) {
|
|
@@ -264,12 +264,12 @@ var oe = {
|
|
|
264
264
|
return e;
|
|
265
265
|
var t = be(e) ? e : {
|
|
266
266
|
each: e
|
|
267
|
-
}, i = Ge(t.ease), r = t.from || 0, n = parseFloat(t.base) || 0, s = {}, a = r > 0 && r < 1, l = isNaN(r) || a,
|
|
268
|
-
return Y(r) ?
|
|
267
|
+
}, i = Ge(t.ease), r = t.from || 0, n = parseFloat(t.base) || 0, s = {}, a = r > 0 && r < 1, l = isNaN(r) || a, u = t.axis, c = r, h = r;
|
|
268
|
+
return Y(r) ? c = h = {
|
|
269
269
|
center: 0.5,
|
|
270
270
|
edges: 0.5,
|
|
271
271
|
end: 1
|
|
272
|
-
}[r] || 0 : !a && l && (
|
|
272
|
+
}[r] || 0 : !a && l && (c = r[0], h = r[1]), function(p, f, m) {
|
|
273
273
|
var d = (m || t).length, g = s[d], y, b, x, v, _, C, E, P, w;
|
|
274
274
|
if (!g) {
|
|
275
275
|
if (w = t.grid === "auto" ? 0 : (t.grid || [1, he])[1], !w) {
|
|
@@ -277,9 +277,9 @@ var oe = {
|
|
|
277
277
|
;
|
|
278
278
|
w < d && w--;
|
|
279
279
|
}
|
|
280
|
-
for (g = s[d] = [], y = l ? Math.min(w, d) *
|
|
281
|
-
x = C % w - y, v = b - (C / w | 0), g[C] = _ =
|
|
282
|
-
r === "random" && Rr(g), g.max = E - P, g.min = P, g.v = d = (parseFloat(t.amount) || parseFloat(t.each) * (w > d ? d - 1 :
|
|
280
|
+
for (g = s[d] = [], y = l ? Math.min(w, d) * c - 0.5 : r % w, b = w === he ? 0 : l ? d * h / w - 0.5 : r / w | 0, E = 0, P = he, C = 0; C < d; C++)
|
|
281
|
+
x = C % w - y, v = b - (C / w | 0), g[C] = _ = u ? Math.abs(u === "y" ? v : x) : mr(x * x + v * v), _ > E && (E = _), _ < P && (P = _);
|
|
282
|
+
r === "random" && Rr(g), g.max = E - P, g.min = P, g.v = d = (parseFloat(t.amount) || parseFloat(t.each) * (w > d ? d - 1 : u ? u === "y" ? d / w : w : Math.max(w, d / w)) || 0) * (r === "edges" ? -1 : 1), g.b = d < 0 ? n - d : n, g.u = X(t.amount || t.each) || 0, i = i && d < 0 ? Hr(i) : i;
|
|
283
283
|
}
|
|
284
284
|
return d = (g[p] - g.min) / g.max || 0, H(g.b + (i ? i(d) : d) * g.v) + g.u;
|
|
285
285
|
};
|
|
@@ -294,9 +294,9 @@ var oe = {
|
|
|
294
294
|
return !i && be(e) && (r = i = e.radius || he, e.values ? (e = de(e.values), (n = !Ee(e[0])) && (r *= r)) : e = ci(e.increment)), Ie(t, i ? B(e) ? function(s) {
|
|
295
295
|
return n = e(s), Math.abs(n - s) <= r ? n : s;
|
|
296
296
|
} : function(s) {
|
|
297
|
-
for (var a = parseFloat(n ? s.x : s), l = parseFloat(n ? s.y : 0),
|
|
298
|
-
n ? (p = e[h].x - a, f = e[h].y - l, p = p * p + f * f) : p = Math.abs(e[h] - a), p <
|
|
299
|
-
return
|
|
297
|
+
for (var a = parseFloat(n ? s.x : s), l = parseFloat(n ? s.y : 0), u = he, c = 0, h = e.length, p, f; h--; )
|
|
298
|
+
n ? (p = e[h].x - a, f = e[h].y - l, p = p * p + f * f) : p = Math.abs(e[h] - a), p < u && (u = p, c = h);
|
|
299
|
+
return c = !r || u <= r ? e[c] : s, n || c === s || Ee(s) ? c : c + X(s);
|
|
300
300
|
} : ci(e));
|
|
301
301
|
}, Fr = function(e, t, i, r) {
|
|
302
302
|
return Ie(Z(e) ? !t : i === !0 ? !!(i = 0) : !r, function() {
|
|
@@ -344,7 +344,7 @@ var oe = {
|
|
|
344
344
|
return (1 - f) * e + f * t;
|
|
345
345
|
};
|
|
346
346
|
if (!n) {
|
|
347
|
-
var s = Y(e), a = {}, l,
|
|
347
|
+
var s = Y(e), a = {}, l, u, c, h, p;
|
|
348
348
|
if (i === !0 && (r = 1) && (i = null), s)
|
|
349
349
|
e = {
|
|
350
350
|
p: e
|
|
@@ -352,15 +352,15 @@ var oe = {
|
|
|
352
352
|
p: t
|
|
353
353
|
};
|
|
354
354
|
else if (Z(e) && !Z(t)) {
|
|
355
|
-
for (
|
|
356
|
-
|
|
355
|
+
for (c = [], h = e.length, p = h - 2, u = 1; u < h; u++)
|
|
356
|
+
c.push(o(e[u - 1], e[u]));
|
|
357
357
|
h--, n = function(m) {
|
|
358
358
|
m *= h;
|
|
359
359
|
var d = Math.min(p, ~~m);
|
|
360
|
-
return
|
|
360
|
+
return c[d](m - d);
|
|
361
361
|
}, i = t;
|
|
362
362
|
} else r || (e = et(Z(e) ? [] : {}, e));
|
|
363
|
-
if (!
|
|
363
|
+
if (!c) {
|
|
364
364
|
for (l in t)
|
|
365
365
|
Ai.call(a, e, l, "get", t[l]);
|
|
366
366
|
n = function(m) {
|
|
@@ -375,9 +375,9 @@ var oe = {
|
|
|
375
375
|
a = r[s] - t, a < 0 == !!i && a && n > (a = Math.abs(a)) && (l = s, n = a);
|
|
376
376
|
return l;
|
|
377
377
|
}, ae = function(e, t, i) {
|
|
378
|
-
var r = e.vars, n = r[t], s = U, a = e._ctx, l,
|
|
378
|
+
var r = e.vars, n = r[t], s = U, a = e._ctx, l, u, c;
|
|
379
379
|
if (n)
|
|
380
|
-
return l = r[t + "Params"],
|
|
380
|
+
return l = r[t + "Params"], u = r.callbackScope || e, i && Te.length && kt(), a && (U = a), c = l ? n.apply(u, l) : n.call(u), U = s, c;
|
|
381
381
|
}, ct = function(e) {
|
|
382
382
|
return De(e), e.scrollTrigger && e.scrollTrigger.kill(!!W), e.progress() < 1 && ae(e, "onInterrupt"), e;
|
|
383
383
|
}, Xe, Nr = [], $r = function(e) {
|
|
@@ -430,7 +430,7 @@ var oe = {
|
|
|
430
430
|
}, Yt = function(e, t, i) {
|
|
431
431
|
return e += e < 0 ? 1 : e > 1 ? -1 : 0, (e * 6 < 1 ? t + (i - t) * e * 6 : e < 0.5 ? i : e * 3 < 2 ? t + (i - t) * (2 / 3 - e) * 6 : t) * R + 0.5 | 0;
|
|
432
432
|
}, Br = function(e, t, i) {
|
|
433
|
-
var r = e ? Ee(e) ? [e >> 16, e >> 8 & R, e & R] : 0 : ut.black, n, s, a, l,
|
|
433
|
+
var r = e ? Ee(e) ? [e >> 16, e >> 8 & R, e & R] : 0 : ut.black, n, s, a, l, u, c, h, p, f, m;
|
|
434
434
|
if (!r) {
|
|
435
435
|
if (e.substr(-1) === "," && (e = e.substr(0, e.length - 1)), ut[e])
|
|
436
436
|
r = ut[e];
|
|
@@ -440,14 +440,14 @@ var oe = {
|
|
|
440
440
|
e = parseInt(e.substr(1), 16), r = [e >> 16, e >> 8 & R, e & R];
|
|
441
441
|
} else if (e.substr(0, 3) === "hsl") {
|
|
442
442
|
if (r = m = e.match(ii), !t)
|
|
443
|
-
l = +r[0] % 360 / 360,
|
|
443
|
+
l = +r[0] % 360 / 360, u = +r[1] / 100, c = +r[2] / 100, s = c <= 0.5 ? c * (u + 1) : c + u - c * u, n = c * 2 - s, r.length > 3 && (r[3] *= 1), r[0] = Yt(l + 1 / 3, n, s), r[1] = Yt(l, n, s), r[2] = Yt(l - 1 / 3, n, s);
|
|
444
444
|
else if (~e.indexOf("="))
|
|
445
445
|
return r = e.match(yr), i && r.length < 4 && (r[3] = 1), r;
|
|
446
446
|
} else
|
|
447
447
|
r = e.match(ii) || ut.transparent;
|
|
448
448
|
r = r.map(Number);
|
|
449
449
|
}
|
|
450
|
-
return t && !m && (n = r[0] / R, s = r[1] / R, a = r[2] / R, h = Math.max(n, s, a), p = Math.min(n, s, a),
|
|
450
|
+
return t && !m && (n = r[0] / R, s = r[1] / R, a = r[2] / R, h = Math.max(n, s, a), p = Math.min(n, s, a), c = (h + p) / 2, h === p ? l = u = 0 : (f = h - p, u = c > 0.5 ? f / (2 - h - p) : f / (h + p), l = h === n ? (s - a) / f + (s < a ? 6 : 0) : h === s ? (a - n) / f + 2 : (n - s) / f + 4, l *= 60), r[0] = ~~(l + 0.5), r[1] = ~~(u * 100 + 0.5), r[2] = ~~(c * 100 + 0.5)), i && r.length < 4 && (r[3] = 1), r;
|
|
451
451
|
}, Gr = function(e) {
|
|
452
452
|
var t = [], i = [], r = -1;
|
|
453
453
|
return e.split(Me).forEach(function(n) {
|
|
@@ -455,18 +455,18 @@ var oe = {
|
|
|
455
455
|
t.push.apply(t, s), i.push(r += s.length + 1);
|
|
456
456
|
}), t.c = i, t;
|
|
457
457
|
}, Hi = function(e, t, i) {
|
|
458
|
-
var r = "", n = (e + r).match(Me), s = t ? "hsla(" : "rgba(", a = 0, l,
|
|
458
|
+
var r = "", n = (e + r).match(Me), s = t ? "hsla(" : "rgba(", a = 0, l, u, c, h;
|
|
459
459
|
if (!n)
|
|
460
460
|
return e;
|
|
461
461
|
if (n = n.map(function(p) {
|
|
462
462
|
return (p = Br(p, t, 1)) && s + (t ? p[0] + "," + p[1] + "%," + p[2] + "%," + p[3] : p.join(",")) + ")";
|
|
463
|
-
}), i && (
|
|
464
|
-
for (
|
|
465
|
-
r +=
|
|
466
|
-
if (!
|
|
467
|
-
for (
|
|
468
|
-
r +=
|
|
469
|
-
return r +
|
|
463
|
+
}), i && (c = Gr(e), l = i.c, l.join(r) !== c.c.join(r)))
|
|
464
|
+
for (u = e.replace(Me, "1").split(We), h = u.length - 1; a < h; a++)
|
|
465
|
+
r += u[a] + (~l.indexOf(a) ? n.shift() || s + "0,0,0,0)" : (c.length ? c : n.length ? n : i).shift());
|
|
466
|
+
if (!u)
|
|
467
|
+
for (u = e.split(Me), h = u.length - 1; a < h; a++)
|
|
468
|
+
r += u[a] + n[a];
|
|
469
|
+
return r + u[h];
|
|
470
470
|
}, Me = (function() {
|
|
471
471
|
var o = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b", e;
|
|
472
472
|
for (e in ut)
|
|
@@ -477,9 +477,9 @@ var oe = {
|
|
|
477
477
|
if (Me.lastIndex = 0, Me.test(t))
|
|
478
478
|
return i = Yn.test(t), e[1] = Hi(e[1], i), e[0] = Hi(e[0], i, Gr(e[1])), !0;
|
|
479
479
|
}, bt, se = (function() {
|
|
480
|
-
var o = Date.now, e = 500, t = 33, i = o(), r = i, n = 1e3 / 240, s = n, a = [], l,
|
|
480
|
+
var o = Date.now, e = 500, t = 33, i = o(), r = i, n = 1e3 / 240, s = n, a = [], l, u, c, h, p, f, m = function d(g) {
|
|
481
481
|
var y = o() - r, b = g === !0, x, v, _, C;
|
|
482
|
-
if ((y > e || y < 0) && (i += y - t), r += y, _ = r - i, x = _ - s, (x > 0 || b) && (C = ++h.frame, p = _ - h.time * 1e3, h.time = _ = _ / 1e3, s += x + (x >= n ? 4 : n - x), v = 1), b || (l =
|
|
482
|
+
if ((y > e || y < 0) && (i += y - t), r += y, _ = r - i, x = _ - s, (x > 0 || b) && (C = ++h.frame, p = _ - h.time * 1e3, h.time = _ = _ / 1e3, s += x + (x >= n ? 4 : n - x), v = 1), b || (l = u(d)), v)
|
|
483
483
|
for (f = 0; f < a.length; f++)
|
|
484
484
|
a[f](_, p, C, g);
|
|
485
485
|
};
|
|
@@ -493,12 +493,12 @@ var oe = {
|
|
|
493
493
|
return p / (1e3 / (g || 60));
|
|
494
494
|
},
|
|
495
495
|
wake: function() {
|
|
496
|
-
_r && (!ri && xi() && (fe = ri = window, _i = fe.document || {}, le.gsap = re, (fe.gsapVersions || (fe.gsapVersions = [])).push(re.version), vr(Rt || fe.GreenSockGlobals || !fe.gsap && fe || {}), Nr.forEach($r)),
|
|
496
|
+
_r && (!ri && xi() && (fe = ri = window, _i = fe.document || {}, le.gsap = re, (fe.gsapVersions || (fe.gsapVersions = [])).push(re.version), vr(Rt || fe.GreenSockGlobals || !fe.gsap && fe || {}), Nr.forEach($r)), c = typeof requestAnimationFrame < "u" && requestAnimationFrame, l && h.sleep(), u = c || function(g) {
|
|
497
497
|
return setTimeout(g, s - h.time * 1e3 + 1 | 0);
|
|
498
498
|
}, bt = 1, m(2));
|
|
499
499
|
},
|
|
500
500
|
sleep: function() {
|
|
501
|
-
(
|
|
501
|
+
(c ? cancelAnimationFrame : clearTimeout)(l), bt = 0, u = gt;
|
|
502
502
|
},
|
|
503
503
|
lagSmoothing: function(g, y) {
|
|
504
504
|
e = g || 1 / 0, t = Math.min(y || 33, e);
|
|
@@ -520,8 +520,8 @@ var oe = {
|
|
|
520
520
|
})(), rt = function() {
|
|
521
521
|
return !bt && se.wake();
|
|
522
522
|
}, M = {}, Wn = /^[\d.\-M][\d.\-,\s]/, Xn = /["']/g, Zn = function(e) {
|
|
523
|
-
for (var t = {}, i = e.substr(1, e.length - 3).split(":"), r = i[0], n = 1, s = i.length, a, l,
|
|
524
|
-
l = i[n], a = n !== s - 1 ? l.lastIndexOf(",") : l.length,
|
|
523
|
+
for (var t = {}, i = e.substr(1, e.length - 3).split(":"), r = i[0], n = 1, s = i.length, a, l, u; n < s; n++)
|
|
524
|
+
l = i[n], a = n !== s - 1 ? l.lastIndexOf(",") : l.length, u = l.substr(0, a), t[r] = isNaN(u) ? u.replace(Xn, "").trim() : +u, r = l.substr(a + 1).trim();
|
|
525
525
|
return t;
|
|
526
526
|
}, qn = function(e) {
|
|
527
527
|
var t = e.indexOf("(") + 1, i = e.indexOf(")"), r = e.indexOf("(", t);
|
|
@@ -559,13 +559,13 @@ var oe = {
|
|
|
559
559
|
return t < 0.5 ? (1 - e(1 - t * 2)) / 2 : 0.5 + e((t - 0.5) * 2) / 2;
|
|
560
560
|
};
|
|
561
561
|
}, Wt = function o(e, t, i) {
|
|
562
|
-
var r = t >= 1 ? t : 1, n = (i || (e ? 0.3 : 0.45)) / (t < 1 ? t : 1), s = n / ti * (Math.asin(1 / r) || 0), a = function(
|
|
563
|
-
return
|
|
564
|
-
}, l = e === "out" ? a : e === "in" ? function(
|
|
565
|
-
return 1 - a(1 -
|
|
562
|
+
var r = t >= 1 ? t : 1, n = (i || (e ? 0.3 : 0.45)) / (t < 1 ? t : 1), s = n / ti * (Math.asin(1 / r) || 0), a = function(c) {
|
|
563
|
+
return c === 1 ? 1 : r * Math.pow(2, -10 * c) * Pn((c - s) * n) + 1;
|
|
564
|
+
}, l = e === "out" ? a : e === "in" ? function(u) {
|
|
565
|
+
return 1 - a(1 - u);
|
|
566
566
|
} : Yr(a);
|
|
567
|
-
return n = ti / n, l.config = function(
|
|
568
|
-
return o(e,
|
|
567
|
+
return n = ti / n, l.config = function(u, c) {
|
|
568
|
+
return o(e, u, c);
|
|
569
569
|
}, l;
|
|
570
570
|
}, Xt = function o(e, t) {
|
|
571
571
|
t === void 0 && (t = 1.70158);
|
|
@@ -720,8 +720,8 @@ var Wr = function(e, t) {
|
|
|
720
720
|
var r = this;
|
|
721
721
|
return new Promise(function(n) {
|
|
722
722
|
var s = B(i) ? i : Sr, a = function() {
|
|
723
|
-
var
|
|
724
|
-
r.then = null, B(s) && (s = s(r)) && (s.then || s === r) && (r.then =
|
|
723
|
+
var u = r.then;
|
|
724
|
+
r.then = null, B(s) && (s = s(r)) && (s.then || s === r) && (r.then = u), n(s), r.then = u;
|
|
725
725
|
};
|
|
726
726
|
r._initted && r.totalProgress() === 1 && r._ts >= 0 || !r._tTime && r._ts < 0 ? a() : r._prom = a;
|
|
727
727
|
});
|
|
@@ -766,28 +766,28 @@ var K = /* @__PURE__ */ (function(o) {
|
|
|
766
766
|
return n.duration = 0, n.parent = this, dt(n).repeatDelay || (n.repeat = 0), n.immediateRender = !!n.immediateRender, new V(r, n, ue(this, s), 1), this;
|
|
767
767
|
}, t.call = function(r, n, s) {
|
|
768
768
|
return me(this, V.delayedCall(0, r, n), s);
|
|
769
|
-
}, t.staggerTo = function(r, n, s, a, l,
|
|
770
|
-
return s.duration = n, s.stagger = s.stagger || a, s.onComplete =
|
|
771
|
-
}, t.staggerFrom = function(r, n, s, a, l,
|
|
772
|
-
return s.runBackwards = 1, dt(s).immediateRender = Q(s.immediateRender), this.staggerTo(r, n, s, a, l,
|
|
773
|
-
}, t.staggerFromTo = function(r, n, s, a, l,
|
|
774
|
-
return a.startAt = s, dt(a).immediateRender = Q(a.immediateRender), this.staggerTo(r, n, a, l,
|
|
769
|
+
}, t.staggerTo = function(r, n, s, a, l, u, c) {
|
|
770
|
+
return s.duration = n, s.stagger = s.stagger || a, s.onComplete = u, s.onCompleteParams = c, s.parent = this, new V(r, s, ue(this, l)), this;
|
|
771
|
+
}, t.staggerFrom = function(r, n, s, a, l, u, c) {
|
|
772
|
+
return s.runBackwards = 1, dt(s).immediateRender = Q(s.immediateRender), this.staggerTo(r, n, s, a, l, u, c);
|
|
773
|
+
}, t.staggerFromTo = function(r, n, s, a, l, u, c, h) {
|
|
774
|
+
return a.startAt = s, dt(a).immediateRender = Q(a.immediateRender), this.staggerTo(r, n, a, l, u, c, h);
|
|
775
775
|
}, t.render = function(r, n, s) {
|
|
776
|
-
var a = this._time, l = this._dirty ? this.totalDuration() : this._tDur,
|
|
777
|
-
if (this !== z &&
|
|
778
|
-
if (a !== this._time &&
|
|
779
|
-
if (C = this._yoyo, g =
|
|
776
|
+
var a = this._time, l = this._dirty ? this.totalDuration() : this._tDur, u = this._dur, c = r <= 0 ? 0 : H(r), h = this._zTime < 0 != r < 0 && (this._initted || !u), p, f, m, d, g, y, b, x, v, _, C, E;
|
|
777
|
+
if (this !== z && c > l && r >= 0 && (c = l), c !== this._tTime || s || h) {
|
|
778
|
+
if (a !== this._time && u && (c += this._time - a, r += this._time - a), p = c, v = this._start, x = this._ts, y = !x, h && (u || (a = this._zTime), (r || !n) && (this._zTime = r)), this._repeat) {
|
|
779
|
+
if (C = this._yoyo, g = u + this._rDelay, this._repeat < -1 && r < 0)
|
|
780
780
|
return this.totalTime(g * 100 + r, n, s);
|
|
781
|
-
if (p = H(
|
|
781
|
+
if (p = H(c % g), c === l ? (d = this._repeat, p = u) : (_ = H(c / g), d = ~~_, d && d === _ && (p = u, d--), p > u && (p = u)), _ = tt(this._tTime, g), !a && this._tTime && _ !== d && this._tTime - _ * g - this._dur <= 0 && (_ = d), C && d & 1 && (p = u - p, E = 1), d !== _ && !this._lock) {
|
|
782
782
|
var P = C && _ & 1, w = P === (C && d & 1);
|
|
783
|
-
if (d < _ && (P = !P), a = P ? 0 :
|
|
783
|
+
if (d < _ && (P = !P), a = P ? 0 : c % u ? u : c, this._lock = 1, this.render(a || (E ? 0 : H(d * g)), n, !u)._lock = 0, this._tTime = c, !n && this.parent && ae(this, "onRepeat"), this.vars.repeatRefresh && !E && (this.invalidate()._lock = 1), a && a !== this._time || y !== !this._ts || this.vars.onRepeat && !this.parent && !this._act)
|
|
784
784
|
return this;
|
|
785
|
-
if (
|
|
785
|
+
if (u = this._dur, l = this._tDur, w && (this._lock = 2, a = P ? u : -1e-4, this.render(a, !0), this.vars.repeatRefresh && !E && this.invalidate()), this._lock = 0, !this._ts && !y)
|
|
786
786
|
return this;
|
|
787
787
|
jr(this, E);
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
|
-
if (this._hasPause && !this._forcing && this._lock < 2 && (b = Fn(this, H(a), H(p)), b && (
|
|
790
|
+
if (this._hasPause && !this._forcing && this._lock < 2 && (b = Fn(this, H(a), H(p)), b && (c -= p - (p = b._start))), this._tTime = c, this._time = p, this._act = !x, this._initted || (this._onUpdate = this.vars.onUpdate, this._initted = 1, this._zTime = r, a = 0), !a && c && !n && !_ && (ae(this, "onStart"), this._tTime !== c))
|
|
791
791
|
return this;
|
|
792
792
|
if (p >= a && r >= 0)
|
|
793
793
|
for (f = this._first; f; ) {
|
|
@@ -795,7 +795,7 @@ var K = /* @__PURE__ */ (function(o) {
|
|
|
795
795
|
if (f.parent !== this)
|
|
796
796
|
return this.render(r, n, s);
|
|
797
797
|
if (f.render(f._ts > 0 ? (p - f._start) * f._ts : (f._dirty ? f.totalDuration() : f._tDur) + (p - f._start) * f._ts, n, s), p !== this._time || !this._ts && !y) {
|
|
798
|
-
b = 0, m && (
|
|
798
|
+
b = 0, m && (c += this._zTime = -k);
|
|
799
799
|
break;
|
|
800
800
|
}
|
|
801
801
|
}
|
|
@@ -808,7 +808,7 @@ var K = /* @__PURE__ */ (function(o) {
|
|
|
808
808
|
if (f.parent !== this)
|
|
809
809
|
return this.render(r, n, s);
|
|
810
810
|
if (f.render(f._ts > 0 ? (T - f._start) * f._ts : (f._dirty ? f.totalDuration() : f._tDur) + (T - f._start) * f._ts, n, s || W && Pi(f)), p !== this._time || !this._ts && !y) {
|
|
811
|
-
b = 0, m && (
|
|
811
|
+
b = 0, m && (c += this._zTime = T ? -k : k);
|
|
812
812
|
break;
|
|
813
813
|
}
|
|
814
814
|
}
|
|
@@ -817,7 +817,7 @@ var K = /* @__PURE__ */ (function(o) {
|
|
|
817
817
|
}
|
|
818
818
|
if (b && !n && (this.pause(), b.render(p >= a ? 0 : -k)._zTime = p >= a ? 1 : -1, this._ts))
|
|
819
819
|
return this._start = v, Gt(this), this.render(r, n, s);
|
|
820
|
-
this._onUpdate && !n && ae(this, "onUpdate", !0), (
|
|
820
|
+
this._onUpdate && !n && ae(this, "onUpdate", !0), (c === l && this._tTime >= this.totalDuration() || !c && a) && (v === this._start || Math.abs(x) !== Math.abs(this._ts)) && (this._lock || ((r || !u) && (c === l && this._ts > 0 || !c && this._ts < 0) && De(this, 1), !n && !(r < 0 && !a) && (c || a || !l) && (ae(this, c === l && r >= 0 ? "onComplete" : "onReverseComplete", !0), this._prom && !(c < l && this.timeScale() > 0) && this._prom())));
|
|
821
821
|
}
|
|
822
822
|
return this;
|
|
823
823
|
}, t.add = function(r, n) {
|
|
@@ -837,8 +837,8 @@ var K = /* @__PURE__ */ (function(o) {
|
|
|
837
837
|
return this !== r ? me(this, r, n) : this;
|
|
838
838
|
}, t.getChildren = function(r, n, s, a) {
|
|
839
839
|
r === void 0 && (r = !0), n === void 0 && (n = !0), s === void 0 && (s = !0), a === void 0 && (a = -he);
|
|
840
|
-
for (var l = [],
|
|
841
|
-
|
|
840
|
+
for (var l = [], u = this._first; u; )
|
|
841
|
+
u._start >= a && (u instanceof V ? n && l.push(u) : (s && l.push(u), r && l.push.apply(l, u.getChildren(!0, n, s)))), u = u._next;
|
|
842
842
|
return l;
|
|
843
843
|
}, t.getById = function(r) {
|
|
844
844
|
for (var n = this.getChildren(1, 1, 1), s = n.length; s--; )
|
|
@@ -864,24 +864,24 @@ var K = /* @__PURE__ */ (function(o) {
|
|
|
864
864
|
Ce !== a[l] && a[l].kill(r, n);
|
|
865
865
|
return this;
|
|
866
866
|
}, t.getTweensOf = function(r, n) {
|
|
867
|
-
for (var s = [], a = de(r), l = this._first,
|
|
868
|
-
l instanceof V ? Mn(l._targets, a) && (
|
|
867
|
+
for (var s = [], a = de(r), l = this._first, u = Ee(n), c; l; )
|
|
868
|
+
l instanceof V ? Mn(l._targets, a) && (u ? (!Ce || l._initted && l._ts) && l.globalTime(0) <= n && l.globalTime(l.totalDuration()) > n : !n || l.isActive()) && s.push(l) : (c = l.getTweensOf(a, n)).length && s.push.apply(s, c), l = l._next;
|
|
869
869
|
return s;
|
|
870
870
|
}, t.tweenTo = function(r, n) {
|
|
871
871
|
n = n || {};
|
|
872
|
-
var s = this, a = ue(s, r), l = n,
|
|
872
|
+
var s = this, a = ue(s, r), l = n, u = l.startAt, c = l.onStart, h = l.onStartParams, p = l.immediateRender, f, m = V.to(s, ce({
|
|
873
873
|
ease: n.ease || "none",
|
|
874
874
|
lazy: !1,
|
|
875
875
|
immediateRender: !1,
|
|
876
876
|
time: a,
|
|
877
877
|
overwrite: "auto",
|
|
878
|
-
duration: n.duration || Math.abs((a - (
|
|
878
|
+
duration: n.duration || Math.abs((a - (u && "time" in u ? u.time : s._time)) / s.timeScale()) || k,
|
|
879
879
|
onStart: function() {
|
|
880
880
|
if (s.pause(), !f) {
|
|
881
|
-
var g = n.duration || Math.abs((a - (
|
|
881
|
+
var g = n.duration || Math.abs((a - (u && "time" in u ? u.time : s._time)) / s.timeScale());
|
|
882
882
|
m._dur !== g && it(m, g, 0, 1).render(m._time, !0, !0), f = 1;
|
|
883
883
|
}
|
|
884
|
-
|
|
884
|
+
c && c.apply(m, h || []);
|
|
885
885
|
}
|
|
886
886
|
}, n));
|
|
887
887
|
return p ? m.render(0) : m;
|
|
@@ -901,11 +901,11 @@ var K = /* @__PURE__ */ (function(o) {
|
|
|
901
901
|
return arguments.length ? this.seek(r, !0) : this.previousLabel(this._time + k);
|
|
902
902
|
}, t.shiftChildren = function(r, n, s) {
|
|
903
903
|
s === void 0 && (s = 0);
|
|
904
|
-
for (var a = this._first, l = this.labels,
|
|
904
|
+
for (var a = this._first, l = this.labels, u; a; )
|
|
905
905
|
a._start >= s && (a._start += r, a._end += r), a = a._next;
|
|
906
906
|
if (n)
|
|
907
|
-
for (
|
|
908
|
-
l[
|
|
907
|
+
for (u in l)
|
|
908
|
+
l[u] >= s && (l[u] += r);
|
|
909
909
|
return Be(this);
|
|
910
910
|
}, t.invalidate = function(r) {
|
|
911
911
|
var n = this._first;
|
|
@@ -918,12 +918,12 @@ var K = /* @__PURE__ */ (function(o) {
|
|
|
918
918
|
s = n._next, this.remove(n), n = s;
|
|
919
919
|
return this._dp && (this._time = this._tTime = this._pTime = 0), r && (this.labels = {}), Be(this);
|
|
920
920
|
}, t.totalDuration = function(r) {
|
|
921
|
-
var n = 0, s = this, a = s._last, l = he,
|
|
921
|
+
var n = 0, s = this, a = s._last, l = he, u, c, h;
|
|
922
922
|
if (arguments.length)
|
|
923
923
|
return s.timeScale((s._repeat < 0 ? s.duration() : s.totalDuration()) / (s.reversed() ? -r : r));
|
|
924
924
|
if (s._dirty) {
|
|
925
925
|
for (h = s.parent; a; )
|
|
926
|
-
|
|
926
|
+
u = a._prev, a._dirty && a.totalDuration(), c = a._start, c > l && s._sort && a._ts && !s._lock ? (s._lock = 1, me(s, a, c - a._delay, 1)._lock = 0) : l = c, c < 0 && a._ts && (n -= c, (!h && !s._dp || h && h.smoothChildTiming) && (s._start += c / s._ts, s._time -= c, s._tTime -= c), s.shiftChildren(-c, !1, -1 / 0), l = 0), a._end > n && a._ts && (n = a._end), a = u;
|
|
927
927
|
it(s, s === z && s._time > n ? s._time : n, 1, 1), s._dirty = 0;
|
|
928
928
|
}
|
|
929
929
|
return s._tDur;
|
|
@@ -945,22 +945,22 @@ ce(K.prototype, {
|
|
|
945
945
|
_forcing: 0
|
|
946
946
|
});
|
|
947
947
|
var Jn = function(e, t, i, r, n, s, a) {
|
|
948
|
-
var l = new te(this._pt, e, t, 0, 1, Qr, null, n),
|
|
948
|
+
var l = new te(this._pt, e, t, 0, 1, Qr, null, n), u = 0, c = 0, h, p, f, m, d, g, y, b;
|
|
949
949
|
for (l.b = i, l.e = r, i += "", r += "", (y = ~r.indexOf("random(")) && (r = yt(r)), s && (b = [i, r], s(b, e, t), i = b[0], r = b[1]), p = i.match(Ht) || []; h = Ht.exec(r); )
|
|
950
|
-
m = h[0], d = r.substring(
|
|
950
|
+
m = h[0], d = r.substring(u, h.index), f ? f = (f + 1) % 5 : d.substr(-5) === "rgba(" && (f = 1), m !== p[c++] && (g = parseFloat(p[c - 1]) || 0, l._pt = {
|
|
951
951
|
_next: l._pt,
|
|
952
|
-
p: d ||
|
|
952
|
+
p: d || c === 1 ? d : ",",
|
|
953
953
|
//note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.
|
|
954
954
|
s: g,
|
|
955
955
|
c: m.charAt(1) === "=" ? qe(g, m) - g : parseFloat(m) - g,
|
|
956
956
|
m: f && f < 4 ? Math.round : 0
|
|
957
|
-
},
|
|
958
|
-
return l.c =
|
|
959
|
-
}, Ai = function(e, t, i, r, n, s, a, l,
|
|
957
|
+
}, u = Ht.lastIndex);
|
|
958
|
+
return l.c = u < r.length ? r.substring(u, r.length) : "", l.fp = a, (br.test(r) || y) && (l.e = 0), this._pt = l, l;
|
|
959
|
+
}, Ai = function(e, t, i, r, n, s, a, l, u, c) {
|
|
960
960
|
B(r) && (r = r(n || 0, e, s));
|
|
961
|
-
var h = e[t], p = i !== "get" ? i : B(h) ?
|
|
962
|
-
if (Y(r) && (~r.indexOf("random(") && (r = yt(r)), r.charAt(1) === "=" && (m = qe(p, r) + (X(p) || 0), (m || m === 0) && (r = m))), !
|
|
963
|
-
return !isNaN(p * r) && r !== "" ? (m = new te(this._pt, e, t, +p || 0, r - (p || 0), typeof h == "boolean" ? ss : Jr, 0, f),
|
|
961
|
+
var h = e[t], p = i !== "get" ? i : B(h) ? u ? e[t.indexOf("set") || !B(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](u) : e[t]() : h, f = B(h) ? u ? rs : Kr : Ti, m;
|
|
962
|
+
if (Y(r) && (~r.indexOf("random(") && (r = yt(r)), r.charAt(1) === "=" && (m = qe(p, r) + (X(p) || 0), (m || m === 0) && (r = m))), !c || p !== r || ui)
|
|
963
|
+
return !isNaN(p * r) && r !== "" ? (m = new te(this._pt, e, t, +p || 0, r - (p || 0), typeof h == "boolean" ? ss : Jr, 0, f), u && (m.fp = u), a && m.modifier(a, this, e), this._pt = m) : (!h && !(t in e) && vi(t, r), Jn.call(this, e, t, p, r, f, l || oe.stringFilter, u));
|
|
964
964
|
}, Qn = function(e, t, i, r, n) {
|
|
965
965
|
if (B(e) && (e = ft(e, n, t, i, r)), !be(e) || e.style && e.nodeType || Z(e) || gr(e))
|
|
966
966
|
return Y(e) ? ft(e, n, t, i, r) : e;
|
|
@@ -969,15 +969,15 @@ var Jn = function(e, t, i, r, n, s, a) {
|
|
|
969
969
|
s[a] = ft(e[a], n, t, i, r);
|
|
970
970
|
return s;
|
|
971
971
|
}, Xr = function(e, t, i, r, n, s) {
|
|
972
|
-
var a, l,
|
|
972
|
+
var a, l, u, c;
|
|
973
973
|
if (ne[e] && (a = new ne[e]()).init(n, a.rawVars ? t[e] : Qn(t[e], r, n, s, i), i, r, s) !== !1 && (i._pt = l = new te(i._pt, n, e, 0, 1, a.render, a, 0, a.priority), i !== Xe))
|
|
974
|
-
for (
|
|
975
|
-
|
|
974
|
+
for (u = i._ptLookup[i._targets.indexOf(n)], c = a._props.length; c--; )
|
|
975
|
+
u[a._props[c]] = l;
|
|
976
976
|
return a;
|
|
977
977
|
}, Ce, ui, Si = function o(e, t, i) {
|
|
978
|
-
var r = e.vars, n = r.ease, s = r.startAt, a = r.immediateRender, l = r.lazy,
|
|
978
|
+
var r = e.vars, n = r.ease, s = r.startAt, a = r.immediateRender, l = r.lazy, u = r.onUpdate, c = r.runBackwards, h = r.yoyoEase, p = r.keyframes, f = r.autoRevert, m = e._dur, d = e._startAt, g = e._targets, y = e.parent, b = y && y.data === "nested" ? y.vars.targets : g, x = e._overwrite === "auto" && !yi, v = e.timeline, _, C, E, P, w, T, D, S, L, I, $, F, O;
|
|
979
979
|
if (v && (!p || !n) && (n = "none"), e._ease = Ge(n, Qe.ease), e._yEase = h ? Hr(Ge(h === !0 ? n : h, Qe.ease)) : 0, h && e._yoyo && !e._repeat && (h = e._yEase, e._yEase = e._ease, e._ease = h), e._from = !v && !!r.runBackwards, !v || p && !r.stagger) {
|
|
980
|
-
if (S = g[0] ? $e(g[0]).harness : 0, F = S && r[S.prop], _ = Ot(r, Ei), d && (d._zTime < 0 && d.progress(1), t < 0 &&
|
|
980
|
+
if (S = g[0] ? $e(g[0]).harness : 0, F = S && r[S.prop], _ = Ot(r, Ei), d && (d._zTime < 0 && d.progress(1), t < 0 && c && a && !f ? d.render(-1, !0) : d.revert(c && m ? Mt : Sn), d._lazy = 0), s) {
|
|
981
981
|
if (De(e._startAt = V.set(g, ce({
|
|
982
982
|
data: "isStart",
|
|
983
983
|
overwrite: !1,
|
|
@@ -986,7 +986,7 @@ var Jn = function(e, t, i, r, n, s, a) {
|
|
|
986
986
|
lazy: !d && Q(l),
|
|
987
987
|
startAt: null,
|
|
988
988
|
delay: 0,
|
|
989
|
-
onUpdate:
|
|
989
|
+
onUpdate: u && function() {
|
|
990
990
|
return ae(e, "onUpdate");
|
|
991
991
|
},
|
|
992
992
|
stagger: 0
|
|
@@ -994,7 +994,7 @@ var Jn = function(e, t, i, r, n, s, a) {
|
|
|
994
994
|
t && (e._zTime = t);
|
|
995
995
|
return;
|
|
996
996
|
}
|
|
997
|
-
} else if (
|
|
997
|
+
} else if (c && m && !d) {
|
|
998
998
|
if (t && (a = !1), E = ce({
|
|
999
999
|
overwrite: !1,
|
|
1000
1000
|
data: "isFromStart",
|
|
@@ -1020,20 +1020,20 @@ var Jn = function(e, t, i, r, n, s, a) {
|
|
|
1020
1020
|
}
|
|
1021
1021
|
T && en(e), e._onInit && e._onInit(e);
|
|
1022
1022
|
}
|
|
1023
|
-
e._onUpdate =
|
|
1023
|
+
e._onUpdate = u, e._initted = (!e._op || e._pt) && !O, p && t <= 0 && v.render(he, !0, !0);
|
|
1024
1024
|
}, es = function(e, t, i, r, n, s, a, l) {
|
|
1025
|
-
var
|
|
1026
|
-
if (!
|
|
1027
|
-
for (
|
|
1028
|
-
if (
|
|
1029
|
-
for (
|
|
1030
|
-
|
|
1031
|
-
if (!
|
|
1025
|
+
var u = (e._pt && e._ptCache || (e._ptCache = {}))[t], c, h, p, f;
|
|
1026
|
+
if (!u)
|
|
1027
|
+
for (u = e._ptCache[t] = [], p = e._ptLookup, f = e._targets.length; f--; ) {
|
|
1028
|
+
if (c = p[f][t], c && c.d && c.d._pt)
|
|
1029
|
+
for (c = c.d._pt; c && c.p !== t && c.fp !== t; )
|
|
1030
|
+
c = c._next;
|
|
1031
|
+
if (!c)
|
|
1032
1032
|
return ui = 1, e.vars[t] = "+=0", Si(e, a), ui = 0, l ? mt(t + " not eligible for reset") : 1;
|
|
1033
|
-
|
|
1033
|
+
u.push(c);
|
|
1034
1034
|
}
|
|
1035
|
-
for (f =
|
|
1036
|
-
h =
|
|
1035
|
+
for (f = u.length; f--; )
|
|
1036
|
+
h = u[f], c = h._pt || h, c.s = (r || r === 0) && !n ? r : c.s + (r || 0) + s * c.c, c.c = i - c.s, h.e && (h.e = G(i) + X(h.e)), h.b && (h.b = c.s + X(h.b));
|
|
1037
1037
|
}, ts = function(e, t) {
|
|
1038
1038
|
var i = e[0] ? $e(e[0]).harness : 0, r = i && i.aliases, n, s, a, l;
|
|
1039
1039
|
if (!r)
|
|
@@ -1047,9 +1047,9 @@ var Jn = function(e, t, i, r, n, s, a) {
|
|
|
1047
1047
|
}, is = function(e, t, i, r) {
|
|
1048
1048
|
var n = t.ease || r || "power1.inOut", s, a;
|
|
1049
1049
|
if (Z(t))
|
|
1050
|
-
a = i[e] || (i[e] = []), t.forEach(function(l,
|
|
1050
|
+
a = i[e] || (i[e] = []), t.forEach(function(l, u) {
|
|
1051
1051
|
return a.push({
|
|
1052
|
-
t:
|
|
1052
|
+
t: u / (t.length - 1) * 100,
|
|
1053
1053
|
v: l,
|
|
1054
1054
|
e: n
|
|
1055
1055
|
});
|
|
@@ -1072,19 +1072,19 @@ var V = /* @__PURE__ */ (function(o) {
|
|
|
1072
1072
|
function e(i, r, n, s) {
|
|
1073
1073
|
var a;
|
|
1074
1074
|
typeof r == "number" && (n.duration = r, r = n, n = null), a = o.call(this, s ? r : dt(r)) || this;
|
|
1075
|
-
var l = a.vars,
|
|
1076
|
-
if (a._targets = x.length ? Ci(x) : mt("GSAP target " + i + " not found. https://gsap.com", !oe.nullTargetWarn) || [], a._ptLookup = [], a._overwrite = f, m || p || Ct(
|
|
1075
|
+
var l = a.vars, u = l.duration, c = l.delay, h = l.immediateRender, p = l.stagger, f = l.overwrite, m = l.keyframes, d = l.defaults, g = l.scrollTrigger, y = l.yoyoEase, b = r.parent || z, x = (Z(i) || gr(i) ? Ee(i[0]) : "length" in r) ? [i] : de(i), v, _, C, E, P, w, T, D;
|
|
1076
|
+
if (a._targets = x.length ? Ci(x) : mt("GSAP target " + i + " not found. https://gsap.com", !oe.nullTargetWarn) || [], a._ptLookup = [], a._overwrite = f, m || p || Ct(u) || Ct(c)) {
|
|
1077
1077
|
if (r = a.vars, v = a.timeline = new K({
|
|
1078
1078
|
data: "nested",
|
|
1079
1079
|
defaults: d || {},
|
|
1080
1080
|
targets: b && b.data === "nested" ? b.vars.targets : x
|
|
1081
|
-
}), v.kill(), v.parent = v._dp = _e(a), v._start = 0, p || Ct(
|
|
1081
|
+
}), v.kill(), v.parent = v._dp = _e(a), v._start = 0, p || Ct(u) || Ct(c)) {
|
|
1082
1082
|
if (E = x.length, T = p && kr(p), be(p))
|
|
1083
1083
|
for (P in p)
|
|
1084
1084
|
~Zr.indexOf(P) && (D || (D = {}), D[P] = p[P]);
|
|
1085
1085
|
for (_ = 0; _ < E; _++)
|
|
1086
|
-
C = Ot(r, qr), C.stagger = 0, y && (C.yoyoEase = y), D && et(C, D), w = x[_], C.duration = +ft(
|
|
1087
|
-
v.duration() ?
|
|
1086
|
+
C = Ot(r, qr), C.stagger = 0, y && (C.yoyoEase = y), D && et(C, D), w = x[_], C.duration = +ft(u, _e(a), _, w, x), C.delay = (+ft(c, _e(a), _, w, x) || 0) - a._delay, !p && E === 1 && C.delay && (a._delay = c = C.delay, a._start += c, C.delay = 0), v.to(w, C, T ? T(_, w, x) : 0), v._ease = M.none;
|
|
1087
|
+
v.duration() ? u = c = 0 : a.timeline = 0;
|
|
1088
1088
|
} else if (m) {
|
|
1089
1089
|
dt(ce(v.vars.defaults, {
|
|
1090
1090
|
ease: "none"
|
|
@@ -1104,44 +1104,44 @@ var V = /* @__PURE__ */ (function(o) {
|
|
|
1104
1104
|
}), S = 0, _ = 0; _ < L.length; _++)
|
|
1105
1105
|
I = L[_], $ = {
|
|
1106
1106
|
ease: I.e,
|
|
1107
|
-
duration: (I.t - (_ ? L[_ - 1].t : 0)) / 100 *
|
|
1107
|
+
duration: (I.t - (_ ? L[_ - 1].t : 0)) / 100 * u
|
|
1108
1108
|
}, $[P] = I.v, v.to(x, $, S), S += $.duration;
|
|
1109
|
-
v.duration() <
|
|
1110
|
-
duration:
|
|
1109
|
+
v.duration() < u && v.to({}, {
|
|
1110
|
+
duration: u - v.duration()
|
|
1111
1111
|
});
|
|
1112
1112
|
}
|
|
1113
1113
|
}
|
|
1114
|
-
|
|
1114
|
+
u || a.duration(u = v.duration());
|
|
1115
1115
|
} else
|
|
1116
1116
|
a.timeline = 0;
|
|
1117
|
-
return f === !0 && !yi && (Ce = _e(a), z.killTweensOf(x), Ce = 0), me(b, _e(a), n), r.reversed && a.reverse(), r.paused && a.paused(!0), (h || !
|
|
1117
|
+
return f === !0 && !yi && (Ce = _e(a), z.killTweensOf(x), Ce = 0), me(b, _e(a), n), r.reversed && a.reverse(), r.paused && a.paused(!0), (h || !u && !m && a._start === H(b._time) && Q(h) && Rn(_e(a)) && b.data !== "nested") && (a._tTime = -k, a.render(Math.max(0, -c) || 0)), g && Dr(_e(a), g), a;
|
|
1118
1118
|
}
|
|
1119
1119
|
var t = e.prototype;
|
|
1120
1120
|
return t.render = function(r, n, s) {
|
|
1121
|
-
var a = this._time, l = this._tDur,
|
|
1122
|
-
if (!
|
|
1121
|
+
var a = this._time, l = this._tDur, u = this._dur, c = r < 0, h = r > l - k && !c ? l : r < k ? 0 : r, p, f, m, d, g, y, b, x, v;
|
|
1122
|
+
if (!u)
|
|
1123
1123
|
On(this, r, n, s);
|
|
1124
|
-
else if (h !== this._tTime || !r || s || !this._initted && this._tTime || this._startAt && this._zTime < 0 !==
|
|
1124
|
+
else if (h !== this._tTime || !r || s || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== c || this._lazy) {
|
|
1125
1125
|
if (p = h, x = this.timeline, this._repeat) {
|
|
1126
|
-
if (d =
|
|
1126
|
+
if (d = u + this._rDelay, this._repeat < -1 && c)
|
|
1127
1127
|
return this.totalTime(d * 100 + r, n, s);
|
|
1128
|
-
if (p = H(h % d), h === l ? (m = this._repeat, p =
|
|
1128
|
+
if (p = H(h % d), h === l ? (m = this._repeat, p = u) : (g = H(h / d), m = ~~g, m && m === g ? (p = u, m--) : p > u && (p = u)), y = this._yoyo && m & 1, y && (v = this._yEase, p = u - p), g = tt(this._tTime, d), p === a && !s && this._initted && m === g)
|
|
1129
1129
|
return this._tTime = h, this;
|
|
1130
1130
|
m !== g && (x && this._yEase && jr(x, y), this.vars.repeatRefresh && !y && !this._lock && p !== d && this._initted && (this._lock = s = 1, this.render(H(d * m), !0).invalidate()._lock = 0));
|
|
1131
1131
|
}
|
|
1132
1132
|
if (!this._initted) {
|
|
1133
|
-
if (Lr(this,
|
|
1133
|
+
if (Lr(this, c ? r : p, s, n, h))
|
|
1134
1134
|
return this._tTime = 0, this;
|
|
1135
1135
|
if (a !== this._time && !(s && this.vars.repeatRefresh && m !== g))
|
|
1136
1136
|
return this;
|
|
1137
|
-
if (
|
|
1137
|
+
if (u !== this._dur)
|
|
1138
1138
|
return this.render(r, n, s);
|
|
1139
1139
|
}
|
|
1140
|
-
if (this._tTime = h, this._time = p, !this._act && this._ts && (this._act = 1, this._lazy = 0), this.ratio = b = (v || this._ease)(p /
|
|
1140
|
+
if (this._tTime = h, this._time = p, !this._act && this._ts && (this._act = 1, this._lazy = 0), this.ratio = b = (v || this._ease)(p / u), this._from && (this.ratio = b = 1 - b), !a && h && !n && !g && (ae(this, "onStart"), this._tTime !== h))
|
|
1141
1141
|
return this;
|
|
1142
1142
|
for (f = this._pt; f; )
|
|
1143
1143
|
f.r(b, f.d), f = f._next;
|
|
1144
|
-
x && x.render(r < 0 ? r : x._dur * x._ease(p / this._dur), n, s) || this._startAt && (this._zTime = r), this._onUpdate && !n && (
|
|
1144
|
+
x && x.render(r < 0 ? r : x._dur * x._ease(p / this._dur), n, s) || this._startAt && (this._zTime = r), this._onUpdate && !n && (c && si(this, r, n, s), ae(this, "onUpdate")), this._repeat && m !== g && this.vars.onRepeat && !n && this.parent && ae(this, "onRepeat"), (h === this._tDur || !h) && this._tTime === h && (c && !this._onUpdate && si(this, r, !0, !0), (r || !u) && (h === this._tDur && this._ts > 0 || !h && this._ts < 0) && De(this, 1), !n && !(c && !a) && (h || a || y) && (ae(this, h === l ? "onComplete" : "onReverseComplete", !0), this._prom && !(h < l && this.timeScale() > 0) && this._prom()));
|
|
1145
1145
|
}
|
|
1146
1146
|
return this;
|
|
1147
1147
|
}, t.targets = function() {
|
|
@@ -1150,8 +1150,8 @@ var V = /* @__PURE__ */ (function(o) {
|
|
|
1150
1150
|
return (!r || !this.vars.runBackwards) && (this._startAt = 0), this._pt = this._op = this._onUpdate = this._lazy = this.ratio = 0, this._ptLookup = [], this.timeline && this.timeline.invalidate(r), o.prototype.invalidate.call(this, r);
|
|
1151
1151
|
}, t.resetTo = function(r, n, s, a, l) {
|
|
1152
1152
|
bt || se.wake(), this._ts || this.play();
|
|
1153
|
-
var
|
|
1154
|
-
return this._initted || Si(this,
|
|
1153
|
+
var u = Math.min(this._dur, (this._dp._time - this._start) * this._ts), c;
|
|
1154
|
+
return this._initted || Si(this, u), c = this._ease(u / this._dur), es(this, r, n, s, a, c, u, l) ? this.resetTo(r, n, s, a, 1) : (Vt(this, 0), this.parent || Tr(this._dp, this, "_first", "_last", this._dp._sort ? "_start" : 0), this.render(0));
|
|
1155
1155
|
}, t.kill = function(r, n) {
|
|
1156
1156
|
if (n === void 0 && (n = "all"), !r && (!n || n === "all"))
|
|
1157
1157
|
return this._lazy = this._pt = 0, this.parent ? ct(this) : this.scrollTrigger && this.scrollTrigger.kill(!!W), this;
|
|
@@ -1159,18 +1159,18 @@ var V = /* @__PURE__ */ (function(o) {
|
|
|
1159
1159
|
var s = this.timeline.totalDuration();
|
|
1160
1160
|
return this.timeline.killTweensOf(r, n, Ce && Ce.vars.overwrite !== !0)._first || ct(this), this.parent && s !== this.timeline.totalDuration() && it(this, this._dur * this.timeline._tDur / s, 0, 1), this;
|
|
1161
1161
|
}
|
|
1162
|
-
var a = this._targets, l = r ? de(r) : a,
|
|
1162
|
+
var a = this._targets, l = r ? de(r) : a, u = this._ptLookup, c = this._pt, h, p, f, m, d, g, y;
|
|
1163
1163
|
if ((!n || n === "all") && Ln(a, l))
|
|
1164
1164
|
return n === "all" && (this._pt = 0), ct(this);
|
|
1165
1165
|
for (h = this._op = this._op || [], n !== "all" && (Y(n) && (d = {}, ee(n, function(b) {
|
|
1166
1166
|
return d[b] = 1;
|
|
1167
1167
|
}), n = d), n = ts(a, n)), y = a.length; y--; )
|
|
1168
1168
|
if (~l.indexOf(a[y])) {
|
|
1169
|
-
p =
|
|
1169
|
+
p = u[y], n === "all" ? (h[y] = n, m = p, f = {}) : (f = h[y] = h[y] || {}, m = n);
|
|
1170
1170
|
for (d in m)
|
|
1171
1171
|
g = p && p[d], g && ((!("kill" in g.d) || g.d.kill(d) === !0) && Bt(this, g, "_pt"), delete p[d]), f !== "all" && (f[d] = 1);
|
|
1172
1172
|
}
|
|
1173
|
-
return this._initted && !this._pt &&
|
|
1173
|
+
return this._initted && !this._pt && c && ct(this), this;
|
|
1174
1174
|
}, e.to = function(r, n) {
|
|
1175
1175
|
return new e(r, n, arguments[2]);
|
|
1176
1176
|
}, e.from = function(r, n) {
|
|
@@ -1254,8 +1254,8 @@ var Ti = function(e, t, i) {
|
|
|
1254
1254
|
}
|
|
1255
1255
|
e._pt = n;
|
|
1256
1256
|
}, te = /* @__PURE__ */ (function() {
|
|
1257
|
-
function o(t, i, r, n, s, a, l,
|
|
1258
|
-
this.t = i, this.s = n, this.c = s, this.p = r, this.r = a || Jr, this.d = l || this, this.set =
|
|
1257
|
+
function o(t, i, r, n, s, a, l, u, c) {
|
|
1258
|
+
this.t = i, this.s = n, this.c = s, this.p = r, this.r = a || Jr, this.d = l || this, this.set = u || Ti, this.pr = c || 0, this._next = t, t && (t._prev = this);
|
|
1259
1259
|
}
|
|
1260
1260
|
var e = o.prototype;
|
|
1261
1261
|
return e.modifier = function(i, r, n) {
|
|
@@ -1282,10 +1282,10 @@ var Ve = [], Lt = {}, cs = [], ji = 0, us = 0, Zt = function(e) {
|
|
|
1282
1282
|
}, hi = function() {
|
|
1283
1283
|
var e = Date.now(), t = [];
|
|
1284
1284
|
e - ji > 2 && (Zt("matchMediaInit"), Ve.forEach(function(i) {
|
|
1285
|
-
var r = i.queries, n = i.conditions, s, a, l,
|
|
1285
|
+
var r = i.queries, n = i.conditions, s, a, l, u;
|
|
1286
1286
|
for (a in r)
|
|
1287
|
-
s = fe.matchMedia(r[a]).matches, s && (l = 1), s !== n[a] && (n[a] = s,
|
|
1288
|
-
|
|
1287
|
+
s = fe.matchMedia(r[a]).matches, s && (l = 1), s !== n[a] && (n[a] = s, u = 1);
|
|
1288
|
+
u && (i.revert(), l && t.push(i));
|
|
1289
1289
|
}), Zt("matchMediaRevert"), t.forEach(function(i) {
|
|
1290
1290
|
return i.onMatch(i, function(r) {
|
|
1291
1291
|
return i.add(null, r);
|
|
@@ -1299,8 +1299,8 @@ var Ve = [], Lt = {}, cs = [], ji = 0, us = 0, Zt = function(e) {
|
|
|
1299
1299
|
return e.add = function(i, r, n) {
|
|
1300
1300
|
B(i) && (n = r, r = i, i = B);
|
|
1301
1301
|
var s = this, a = function() {
|
|
1302
|
-
var
|
|
1303
|
-
return
|
|
1302
|
+
var u = U, c = s.selector, h;
|
|
1303
|
+
return u && u !== s && u.data.push(s), n && (s.selector = li(n)), U = s, h = r.apply(s, arguments), B(h) && s._r.push(h), U = u, s.selector = c, s.isReverted = !1, h;
|
|
1304
1304
|
};
|
|
1305
1305
|
return s.last = a, i === B ? a(s, function(l) {
|
|
1306
1306
|
return s.add(null, l);
|
|
@@ -1318,23 +1318,23 @@ var Ve = [], Lt = {}, cs = [], ji = 0, us = 0, Zt = function(e) {
|
|
|
1318
1318
|
}, e.kill = function(i, r) {
|
|
1319
1319
|
var n = this;
|
|
1320
1320
|
if (i ? (function() {
|
|
1321
|
-
for (var a = n.getTweens(), l = n.data.length,
|
|
1322
|
-
|
|
1323
|
-
return a.splice(a.indexOf(
|
|
1321
|
+
for (var a = n.getTweens(), l = n.data.length, u; l--; )
|
|
1322
|
+
u = n.data[l], u.data === "isFlip" && (u.revert(), u.getChildren(!0, !0, !1).forEach(function(c) {
|
|
1323
|
+
return a.splice(a.indexOf(c), 1);
|
|
1324
1324
|
}));
|
|
1325
|
-
for (a.map(function(
|
|
1325
|
+
for (a.map(function(c) {
|
|
1326
1326
|
return {
|
|
1327
|
-
g:
|
|
1328
|
-
t:
|
|
1327
|
+
g: c._dur || c._delay || c._sat && !c._sat.vars.immediateRender ? c.globalTime(0) : -1 / 0,
|
|
1328
|
+
t: c
|
|
1329
1329
|
};
|
|
1330
|
-
}).sort(function(
|
|
1331
|
-
return h.g -
|
|
1332
|
-
}).forEach(function(
|
|
1333
|
-
return
|
|
1330
|
+
}).sort(function(c, h) {
|
|
1331
|
+
return h.g - c.g || -1 / 0;
|
|
1332
|
+
}).forEach(function(c) {
|
|
1333
|
+
return c.t.revert(i);
|
|
1334
1334
|
}), l = n.data.length; l--; )
|
|
1335
|
-
|
|
1336
|
-
n._r.forEach(function(
|
|
1337
|
-
return
|
|
1335
|
+
u = n.data[l], u instanceof K ? u.data !== "nested" && (u.scrollTrigger && u.scrollTrigger.revert(), u.kill()) : !(u instanceof V) && u.revert && u.revert(i);
|
|
1336
|
+
n._r.forEach(function(c) {
|
|
1337
|
+
return c(i, n);
|
|
1338
1338
|
}), n.isReverted = !0;
|
|
1339
1339
|
})() : this.data.forEach(function(a) {
|
|
1340
1340
|
return a.kill && a.kill();
|
|
@@ -1353,11 +1353,11 @@ var Ve = [], Lt = {}, cs = [], ji = 0, us = 0, Zt = function(e) {
|
|
|
1353
1353
|
be(i) || (i = {
|
|
1354
1354
|
matches: i
|
|
1355
1355
|
});
|
|
1356
|
-
var s = new tn(0, n || this.scope), a = s.conditions = {}, l,
|
|
1356
|
+
var s = new tn(0, n || this.scope), a = s.conditions = {}, l, u, c;
|
|
1357
1357
|
U && !s.selector && (s.selector = U.selector), this.contexts.push(s), r = s.add("onMatch", r), s.queries = i;
|
|
1358
|
-
for (
|
|
1359
|
-
|
|
1360
|
-
return
|
|
1358
|
+
for (u in i)
|
|
1359
|
+
u === "all" ? c = 1 : (l = fe.matchMedia(i[u]), l && (Ve.indexOf(s) < 0 && Ve.push(s), (a[u] = l.matches) && (c = 1), l.addListener ? l.addListener(hi) : l.addEventListener("change", hi)));
|
|
1360
|
+
return c && r(s, function(h) {
|
|
1361
1361
|
return s.add(null, h);
|
|
1362
1362
|
}), this;
|
|
1363
1363
|
}, e.revert = function(i) {
|
|
@@ -1384,32 +1384,32 @@ var Ve = [], Lt = {}, cs = [], ji = 0, us = 0, Zt = function(e) {
|
|
|
1384
1384
|
getProperty: function(e, t, i, r) {
|
|
1385
1385
|
Y(e) && (e = de(e)[0]);
|
|
1386
1386
|
var n = $e(e || {}).get, s = i ? Sr : Ar;
|
|
1387
|
-
return i === "native" && (i = ""), e && (t ? s((ne[t] && ne[t].get || n)(e, t, i, r)) : function(a, l,
|
|
1388
|
-
return s((ne[a] && ne[a].get || n)(e, a, l,
|
|
1387
|
+
return i === "native" && (i = ""), e && (t ? s((ne[t] && ne[t].get || n)(e, t, i, r)) : function(a, l, u) {
|
|
1388
|
+
return s((ne[a] && ne[a].get || n)(e, a, l, u));
|
|
1389
1389
|
});
|
|
1390
1390
|
},
|
|
1391
1391
|
quickSetter: function(e, t, i) {
|
|
1392
1392
|
if (e = de(e), e.length > 1) {
|
|
1393
|
-
var r = e.map(function(
|
|
1394
|
-
return re.quickSetter(
|
|
1393
|
+
var r = e.map(function(c) {
|
|
1394
|
+
return re.quickSetter(c, t, i);
|
|
1395
1395
|
}), n = r.length;
|
|
1396
|
-
return function(
|
|
1396
|
+
return function(c) {
|
|
1397
1397
|
for (var h = n; h--; )
|
|
1398
|
-
r[h](
|
|
1398
|
+
r[h](c);
|
|
1399
1399
|
};
|
|
1400
1400
|
}
|
|
1401
1401
|
e = e[0] || {};
|
|
1402
|
-
var s = ne[t], a = $e(e), l = a.harness && (a.harness.aliases || {})[t] || t,
|
|
1402
|
+
var s = ne[t], a = $e(e), l = a.harness && (a.harness.aliases || {})[t] || t, u = s ? function(c) {
|
|
1403
1403
|
var h = new s();
|
|
1404
|
-
Xe._pt = 0, h.init(e, i ?
|
|
1404
|
+
Xe._pt = 0, h.init(e, i ? c + i : c, Xe, 0, [e]), h.render(1, h), Xe._pt && Di(1, Xe);
|
|
1405
1405
|
} : a.set(e, l);
|
|
1406
|
-
return s ?
|
|
1407
|
-
return
|
|
1406
|
+
return s ? u : function(c) {
|
|
1407
|
+
return u(e, l, i ? c + i : c, a, 1);
|
|
1408
1408
|
};
|
|
1409
1409
|
},
|
|
1410
1410
|
quickTo: function(e, t, i) {
|
|
1411
|
-
var r, n = re.to(e, ce((r = {}, r[t] = "+=0.1", r.paused = !0, r.stagger = 0, r), i || {})), s = function(l,
|
|
1412
|
-
return n.resetTo(t, l,
|
|
1411
|
+
var r, n = re.to(e, ce((r = {}, r[t] = "+=0.1", r.paused = !0, r.stagger = 0, r), i || {})), s = function(l, u, c) {
|
|
1412
|
+
return n.resetTo(t, l, u, c);
|
|
1413
1413
|
};
|
|
1414
1414
|
return s.tween = n, s;
|
|
1415
1415
|
},
|
|
@@ -1426,10 +1426,10 @@ var Ve = [], Lt = {}, cs = [], ji = 0, us = 0, Zt = function(e) {
|
|
|
1426
1426
|
var t = e.name, i = e.effect, r = e.plugins, n = e.defaults, s = e.extendTimeline;
|
|
1427
1427
|
(r || "").split(",").forEach(function(a) {
|
|
1428
1428
|
return a && !ne[a] && !le[a] && mt(t + " effect requires " + a + " plugin.");
|
|
1429
|
-
}), jt[t] = function(a, l,
|
|
1430
|
-
return i(de(a), ce(l || {}, n),
|
|
1431
|
-
}, s && (K.prototype[t] = function(a, l,
|
|
1432
|
-
return this.add(jt[t](a, be(l) ? l : (
|
|
1429
|
+
}), jt[t] = function(a, l, u) {
|
|
1430
|
+
return i(de(a), ce(l || {}, n), u);
|
|
1431
|
+
}, s && (K.prototype[t] = function(a, l, u) {
|
|
1432
|
+
return this.add(jt[t](a, be(l) ? l : (u = l) && {}, this), u);
|
|
1433
1433
|
});
|
|
1434
1434
|
},
|
|
1435
1435
|
registerEase: function(e, t) {
|
|
@@ -1537,13 +1537,13 @@ var ds = function(e, t) {
|
|
|
1537
1537
|
//don't pre-process function-based values or "random()" strings.
|
|
1538
1538
|
init: function(r, n, s) {
|
|
1539
1539
|
s._onInit = function(a) {
|
|
1540
|
-
var l,
|
|
1541
|
-
if (Y(n) && (l = {}, ee(n, function(
|
|
1542
|
-
return l[
|
|
1540
|
+
var l, u;
|
|
1541
|
+
if (Y(n) && (l = {}, ee(n, function(c) {
|
|
1542
|
+
return l[c] = 1;
|
|
1543
1543
|
}), n = l), t) {
|
|
1544
1544
|
l = {};
|
|
1545
|
-
for (
|
|
1546
|
-
l[
|
|
1545
|
+
for (u in n)
|
|
1546
|
+
l[u] = t(n[u]);
|
|
1547
1547
|
n = l;
|
|
1548
1548
|
}
|
|
1549
1549
|
ps(a, n);
|
|
@@ -1721,19 +1721,19 @@ var Yi, Pe, Ke, Li, ze, Wi, Ii, fs = function() {
|
|
|
1721
1721
|
grid: 1,
|
|
1722
1722
|
flex: 1
|
|
1723
1723
|
}, Le = function o(e, t, i, r) {
|
|
1724
|
-
var n = parseFloat(i) || 0, s = (i + "").trim().substr((n + "").length) || "px", a = ze.style, l = ms.test(t),
|
|
1724
|
+
var n = parseFloat(i) || 0, s = (i + "").trim().substr((n + "").length) || "px", a = ze.style, l = ms.test(t), u = e.tagName.toLowerCase() === "svg", c = (u ? "client" : "offset") + (l ? "Width" : "Height"), h = 100, p = r === "px", f = r === "%", m, d, g, y;
|
|
1725
1725
|
if (r === s || !n || Ji[r] || Ji[s])
|
|
1726
1726
|
return n;
|
|
1727
1727
|
if (s !== "px" && !p && (n = o(e, t, i, "px")), y = e.getCTM && cn(e), (f || s === "%") && (we[t] || ~t.indexOf("adius")))
|
|
1728
|
-
return m = y ? e.getBBox()[l ? "width" : "height"] : e[
|
|
1729
|
-
if (a[l ? "width" : "height"] = h + (p ? s : r), d = r !== "rem" && ~t.indexOf("adius") || r === "em" && e.appendChild && !
|
|
1728
|
+
return m = y ? e.getBBox()[l ? "width" : "height"] : e[c], G(f ? n / m * h : n / 100 * m);
|
|
1729
|
+
if (a[l ? "width" : "height"] = h + (p ? s : r), d = r !== "rem" && ~t.indexOf("adius") || r === "em" && e.appendChild && !u ? e : e.parentNode, y && (d = (e.ownerSVGElement || {}).parentNode), (!d || d === Pe || !d.appendChild) && (d = Pe.body), g = d._gsap, g && f && g.width && l && g.time === se.time && !g.uncache)
|
|
1730
1730
|
return G(n / g.width * h);
|
|
1731
1731
|
if (f && (t === "height" || t === "width")) {
|
|
1732
1732
|
var b = e.style[t];
|
|
1733
|
-
e.style[t] = h + r, m = e[
|
|
1733
|
+
e.style[t] = h + r, m = e[c], b ? e.style[t] = b : He(e, t);
|
|
1734
1734
|
} else
|
|
1735
|
-
(f || s === "%") && !Ts[pe(d, "display")] && (a.position = pe(e, "position")), d === e && (a.position = "static"), d.appendChild(ze), m = ze[
|
|
1736
|
-
return l && f && (g = $e(d), g.time = se.time, g.width = d[
|
|
1735
|
+
(f || s === "%") && !Ts[pe(d, "display")] && (a.position = pe(e, "position")), d === e && (a.position = "static"), d.appendChild(ze), m = ze[c], d.removeChild(ze), a.position = "absolute";
|
|
1736
|
+
return l && f && (g = $e(d), g.time = se.time, g.width = d[c]), G(p ? m * n / h : m && n ? h / m * n : 0);
|
|
1737
1737
|
}, ve = function(e, t, i, r) {
|
|
1738
1738
|
var n;
|
|
1739
1739
|
return Li || fi(), t in ge && t !== "transform" && (t = ge[t], ~t.indexOf(",") && (t = t.split(",")[0])), we[t] && t !== "transform" ? (n = vt(e, r), n = t !== "transformOrigin" ? n[t] : n.svg ? n.origin : Nt(pe(e, ie)) + " " + n.zOrigin + "px") : (n = e.style[t], (!n || n === "auto" || r || ~(n + "").indexOf("calc(")) && (n = zt[t] && zt[t](e, t, i) || pe(e, t) || Cr(e, t) || (t === "opacity" ? 1 : 0))), i && !~(n + "").trim().indexOf(" ") ? Le(e, t, n, i) + i : n;
|
|
@@ -1742,12 +1742,12 @@ var Yi, Pe, Ke, Li, ze, Wi, Ii, fs = function() {
|
|
|
1742
1742
|
var n = nt(t, e, 1), s = n && pe(e, n, 1);
|
|
1743
1743
|
s && s !== i ? (t = n, i = s) : t === "borderColor" && (i = pe(e, "borderTopColor"));
|
|
1744
1744
|
}
|
|
1745
|
-
var a = new te(this._pt, e.style, t, 0, 1, Qr), l = 0,
|
|
1746
|
-
if (a.b = i, a.e = r, i += "", r += "", r.substring(0, 6) === "var(--" && (r = pe(e, r.substring(4, r.indexOf(")")))), r === "auto" && (d = e.style[t], e.style[t] = r, r = pe(e, t) || r, d ? e.style[t] = d : He(e, t)),
|
|
1745
|
+
var a = new te(this._pt, e.style, t, 0, 1, Qr), l = 0, u = 0, c, h, p, f, m, d, g, y, b, x, v, _;
|
|
1746
|
+
if (a.b = i, a.e = r, i += "", r += "", r.substring(0, 6) === "var(--" && (r = pe(e, r.substring(4, r.indexOf(")")))), r === "auto" && (d = e.style[t], e.style[t] = r, r = pe(e, t) || r, d ? e.style[t] = d : He(e, t)), c = [i, r], Vr(c), i = c[0], r = c[1], p = i.match(We) || [], _ = r.match(We) || [], _.length) {
|
|
1747
1747
|
for (; h = We.exec(r); )
|
|
1748
|
-
g = h[0], b = r.substring(l, h.index), m ? m = (m + 1) % 5 : (b.substr(-5) === "rgba(" || b.substr(-5) === "hsla(") && (m = 1), g !== (d = p[
|
|
1748
|
+
g = h[0], b = r.substring(l, h.index), m ? m = (m + 1) % 5 : (b.substr(-5) === "rgba(" || b.substr(-5) === "hsla(") && (m = 1), g !== (d = p[u++] || "") && (f = parseFloat(d) || 0, v = d.substr((f + "").length), g.charAt(1) === "=" && (g = qe(f, g) + v), y = parseFloat(g), x = g.substr((y + "").length), l = We.lastIndex - x.length, x || (x = x || oe.units[t] || v, l === r.length && (r += x, a.e += x)), v !== x && (f = Le(e, t, d, x) || 0), a._pt = {
|
|
1749
1749
|
_next: a._pt,
|
|
1750
|
-
p: b ||
|
|
1750
|
+
p: b || u === 1 ? b : ",",
|
|
1751
1751
|
//note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.
|
|
1752
1752
|
s: f,
|
|
1753
1753
|
c: y - f,
|
|
@@ -1768,12 +1768,12 @@ var Yi, Pe, Ke, Li, ze, Wi, Ii, fs = function() {
|
|
|
1768
1768
|
return (i === "top" || i === "bottom" || r === "left" || r === "right") && (e = i, i = r, r = e), t[0] = Qi[i] || i, t[1] = Qi[r] || r, t.join(" ");
|
|
1769
1769
|
}, Ls = function(e, t) {
|
|
1770
1770
|
if (t.tween && t.tween._time === t.tween._dur) {
|
|
1771
|
-
var i = t.t, r = i.style, n = t.u, s = i._gsap, a, l,
|
|
1771
|
+
var i = t.t, r = i.style, n = t.u, s = i._gsap, a, l, u;
|
|
1772
1772
|
if (n === "all" || n === !0)
|
|
1773
1773
|
r.cssText = "", l = 1;
|
|
1774
1774
|
else
|
|
1775
|
-
for (n = n.split(","),
|
|
1776
|
-
a = n[
|
|
1775
|
+
for (n = n.split(","), u = n.length; --u > -1; )
|
|
1776
|
+
a = n[u], we[a] && (l = 1, a = a === "transformOrigin" ? ie : N), He(i, a);
|
|
1777
1777
|
l && (He(i, N), s && (s.svg && i.removeAttribute("transform"), r.scale = r.rotate = r.translate = "none", vt(i, 1), s.uncache = 1, sn(r)));
|
|
1778
1778
|
}
|
|
1779
1779
|
}, zt = {
|
|
@@ -1852,17 +1852,17 @@ var Yi, Pe, Ke, Li, ze, Wi, Ii, fs = function() {
|
|
|
1852
1852
|
var t = pe(e, N);
|
|
1853
1853
|
return hn(t) ? _t : t.substr(7).match(yr).map(G);
|
|
1854
1854
|
}, ki = function(e, t) {
|
|
1855
|
-
var i = e._gsap || $e(e), r = e.style, n = er(e), s, a, l,
|
|
1856
|
-
return i.svg && e.getAttribute("transform") ? (l = e.transform.baseVal.consolidate().matrix, n = [l.a, l.b, l.c, l.d, l.e, l.f], n.join(",") === "1,0,0,1,0,0" ? _t : n) : (n === _t && !e.offsetParent && e !== Ke && !i.svg && (l = r.display, r.display = "block", s = e.parentNode, (!s || !e.offsetParent && !e.getBoundingClientRect().width) && (
|
|
1855
|
+
var i = e._gsap || $e(e), r = e.style, n = er(e), s, a, l, u;
|
|
1856
|
+
return i.svg && e.getAttribute("transform") ? (l = e.transform.baseVal.consolidate().matrix, n = [l.a, l.b, l.c, l.d, l.e, l.f], n.join(",") === "1,0,0,1,0,0" ? _t : n) : (n === _t && !e.offsetParent && e !== Ke && !i.svg && (l = r.display, r.display = "block", s = e.parentNode, (!s || !e.offsetParent && !e.getBoundingClientRect().width) && (u = 1, a = e.nextElementSibling, Ke.appendChild(e)), n = er(e), l ? r.display = l : He(e, "display"), u && (a ? s.insertBefore(e, a) : s ? s.appendChild(e) : Ke.removeChild(e))), t && n.length > 6 ? [n[0], n[1], n[4], n[5], n[12], n[13]] : n);
|
|
1857
1857
|
}, mi = function(e, t, i, r, n, s) {
|
|
1858
|
-
var a = e._gsap, l = n || ki(e, !0),
|
|
1859
|
-
i ? l !== _t && (E = f * g - m * d) && (P = v * (g / E) + _ * (-d / E) + (d * b - g * y) / E, w = v * (-m / E) + _ * (f / E) - (f * b - m * y) / E, v = P, _ = w) : (C = ln(e), v = C.x + (~x[0].indexOf("%") ? v / 100 * C.width : v), _ = C.y + (~(x[1] || x[0]).indexOf("%") ? _ / 100 * C.height : _)), r || r !== !1 && a.smooth ? (y = v -
|
|
1858
|
+
var a = e._gsap, l = n || ki(e, !0), u = a.xOrigin || 0, c = a.yOrigin || 0, h = a.xOffset || 0, p = a.yOffset || 0, f = l[0], m = l[1], d = l[2], g = l[3], y = l[4], b = l[5], x = t.split(" "), v = parseFloat(x[0]) || 0, _ = parseFloat(x[1]) || 0, C, E, P, w;
|
|
1859
|
+
i ? l !== _t && (E = f * g - m * d) && (P = v * (g / E) + _ * (-d / E) + (d * b - g * y) / E, w = v * (-m / E) + _ * (f / E) - (f * b - m * y) / E, v = P, _ = w) : (C = ln(e), v = C.x + (~x[0].indexOf("%") ? v / 100 * C.width : v), _ = C.y + (~(x[1] || x[0]).indexOf("%") ? _ / 100 * C.height : _)), r || r !== !1 && a.smooth ? (y = v - u, b = _ - c, a.xOffset = h + (y * f + b * d) - y, a.yOffset = p + (y * m + b * g) - b) : a.xOffset = a.yOffset = 0, a.xOrigin = v, a.yOrigin = _, a.smooth = !!r, a.origin = t, a.originIsAbsolute = !!i, e.style[ie] = "0px 0px", s && (Ae(s, a, "xOrigin", u, v), Ae(s, a, "yOrigin", c, _), Ae(s, a, "xOffset", h, a.xOffset), Ae(s, a, "yOffset", p, a.yOffset)), e.setAttribute("data-svg-origin", v + " " + _);
|
|
1860
1860
|
}, vt = function(e, t) {
|
|
1861
1861
|
var i = e._gsap || new Wr(e);
|
|
1862
1862
|
if ("x" in i && !t && !i.uncache)
|
|
1863
1863
|
return i;
|
|
1864
|
-
var r = e.style, n = i.scaleX < 0, s = "px", a = "deg", l = getComputedStyle(e),
|
|
1865
|
-
return
|
|
1864
|
+
var r = e.style, n = i.scaleX < 0, s = "px", a = "deg", l = getComputedStyle(e), u = pe(e, ie) || "0", c, h, p, f, m, d, g, y, b, x, v, _, C, E, P, w, T, D, S, L, I, $, F, O, J, st, at, ot, Re, Ui, xe, ke;
|
|
1865
|
+
return c = h = p = d = g = y = b = x = v = 0, f = m = 1, i.svg = !!(e.getCTM && cn(e)), l.translate && ((l.translate !== "none" || l.scale !== "none" || l.rotate !== "none") && (r[N] = (l.translate !== "none" ? "translate3d(" + (l.translate + " 0 0").split(" ").slice(0, 3).join(", ") + ") " : "") + (l.rotate !== "none" ? "rotate(" + l.rotate + ") " : "") + (l.scale !== "none" ? "scale(" + l.scale.split(" ").join(",") + ") " : "") + (l[N] !== "none" ? l[N] : "")), r.scale = r.rotate = r.translate = "none"), E = ki(e, i.svg), i.svg && (i.uncache ? (J = e.getBBox(), u = i.xOrigin - J.x + "px " + (i.yOrigin - J.y) + "px", O = "") : O = !t && e.getAttribute("data-svg-origin"), mi(e, O || u, !!O || i.originIsAbsolute, i.smooth !== !1, E)), _ = i.xOrigin || 0, C = i.yOrigin || 0, E !== _t && (D = E[0], S = E[1], L = E[2], I = E[3], c = $ = E[4], h = F = E[5], E.length === 6 ? (f = Math.sqrt(D * D + S * S), m = Math.sqrt(I * I + L * L), d = D || S ? Ye(S, D) * Ue : 0, b = L || I ? Ye(L, I) * Ue + d : 0, b && (m *= Math.abs(Math.cos(b * Je))), i.svg && (c -= _ - (_ * D + C * L), h -= C - (_ * S + C * I))) : (ke = E[6], Ui = E[7], at = E[8], ot = E[9], Re = E[10], xe = E[11], c = E[12], h = E[13], p = E[14], P = Ye(ke, Re), g = P * Ue, P && (w = Math.cos(-P), T = Math.sin(-P), O = $ * w + at * T, J = F * w + ot * T, st = ke * w + Re * T, at = $ * -T + at * w, ot = F * -T + ot * w, Re = ke * -T + Re * w, xe = Ui * -T + xe * w, $ = O, F = J, ke = st), P = Ye(-L, Re), y = P * Ue, P && (w = Math.cos(-P), T = Math.sin(-P), O = D * w - at * T, J = S * w - ot * T, st = L * w - Re * T, xe = I * T + xe * w, D = O, S = J, L = st), P = Ye(S, D), d = P * Ue, P && (w = Math.cos(P), T = Math.sin(P), O = D * w + S * T, J = $ * w + F * T, S = S * w - D * T, F = F * w - $ * T, D = O, $ = J), g && Math.abs(g) + Math.abs(d) > 359.9 && (g = d = 0, y = 180 - y), f = G(Math.sqrt(D * D + S * S + L * L)), m = G(Math.sqrt(F * F + ke * ke)), P = Ye($, F), b = Math.abs(P) > 2e-4 ? P * Ue : 0, v = xe ? 1 / (xe < 0 ? -xe : xe) : 0), i.svg && (O = e.getAttribute("transform"), i.forceCSS = e.setAttribute("transform", "") || !hn(pe(e, N)), O && e.setAttribute("transform", O))), Math.abs(b) > 90 && Math.abs(b) < 270 && (n ? (f *= -1, b += d <= 0 ? 180 : -180, d += d <= 0 ? 180 : -180) : (m *= -1, b += b <= 0 ? 180 : -180)), t = t || i.uncache, i.x = c - ((i.xPercent = c && (!t && i.xPercent || (Math.round(e.offsetWidth / 2) === Math.round(-c) ? -50 : 0))) ? e.offsetWidth * i.xPercent / 100 : 0) + s, i.y = h - ((i.yPercent = h && (!t && i.yPercent || (Math.round(e.offsetHeight / 2) === Math.round(-h) ? -50 : 0))) ? e.offsetHeight * i.yPercent / 100 : 0) + s, i.z = p + s, i.scaleX = G(f), i.scaleY = G(m), i.rotation = G(d) + a, i.rotationX = G(g) + a, i.rotationY = G(y) + a, i.skewX = b + a, i.skewY = x + a, i.transformPerspective = v + s, (i.zOrigin = parseFloat(u.split(" ")[2]) || !t && i.zOrigin || 0) && (r[ie] = Nt(u)), i.xOffset = i.yOffset = 0, i.force3D = oe.force3D, i.renderTransform = i.svg ? Rs : on ? dn : Is, i.uncache = 0, i;
|
|
1866
1866
|
}, Nt = function(e) {
|
|
1867
1867
|
return (e = e.split(" "))[0] + " " + e[1];
|
|
1868
1868
|
}, Kt = function(e, t, i) {
|
|
@@ -1871,40 +1871,40 @@ var Yi, Pe, Ke, Li, ze, Wi, Ii, fs = function() {
|
|
|
1871
1871
|
}, Is = function(e, t) {
|
|
1872
1872
|
t.z = "0px", t.rotationY = t.rotationX = "0deg", t.force3D = 0, dn(e, t);
|
|
1873
1873
|
}, Oe = "0deg", lt = "0px", Fe = ") ", dn = function(e, t) {
|
|
1874
|
-
var i = t || this, r = i.xPercent, n = i.yPercent, s = i.x, a = i.y, l = i.z,
|
|
1875
|
-
if (x && (h !== Oe ||
|
|
1876
|
-
var C = parseFloat(
|
|
1874
|
+
var i = t || this, r = i.xPercent, n = i.yPercent, s = i.x, a = i.y, l = i.z, u = i.rotation, c = i.rotationY, h = i.rotationX, p = i.skewX, f = i.skewY, m = i.scaleX, d = i.scaleY, g = i.transformPerspective, y = i.force3D, b = i.target, x = i.zOrigin, v = "", _ = y === "auto" && e && e !== 1 || y === !0;
|
|
1875
|
+
if (x && (h !== Oe || c !== Oe)) {
|
|
1876
|
+
var C = parseFloat(c) * Je, E = Math.sin(C), P = Math.cos(C), w;
|
|
1877
1877
|
C = parseFloat(h) * Je, w = Math.cos(C), s = Kt(b, s, E * w * -x), a = Kt(b, a, -Math.sin(C) * -x), l = Kt(b, l, P * w * -x + x);
|
|
1878
1878
|
}
|
|
1879
|
-
g !== lt && (v += "perspective(" + g + Fe), (r || n) && (v += "translate(" + r + "%, " + n + "%) "), (_ || s !== lt || a !== lt || l !== lt) && (v += l !== lt || _ ? "translate3d(" + s + ", " + a + ", " + l + ") " : "translate(" + s + ", " + a + Fe),
|
|
1879
|
+
g !== lt && (v += "perspective(" + g + Fe), (r || n) && (v += "translate(" + r + "%, " + n + "%) "), (_ || s !== lt || a !== lt || l !== lt) && (v += l !== lt || _ ? "translate3d(" + s + ", " + a + ", " + l + ") " : "translate(" + s + ", " + a + Fe), u !== Oe && (v += "rotate(" + u + Fe), c !== Oe && (v += "rotateY(" + c + Fe), h !== Oe && (v += "rotateX(" + h + Fe), (p !== Oe || f !== Oe) && (v += "skew(" + p + ", " + f + Fe), (m !== 1 || d !== 1) && (v += "scale(" + m + ", " + d + Fe), b.style[N] = v || "translate(0, 0)";
|
|
1880
1880
|
}, Rs = function(e, t) {
|
|
1881
|
-
var i = t || this, r = i.xPercent, n = i.yPercent, s = i.x, a = i.y, l = i.rotation,
|
|
1882
|
-
l = parseFloat(l),
|
|
1881
|
+
var i = t || this, r = i.xPercent, n = i.yPercent, s = i.x, a = i.y, l = i.rotation, u = i.skewX, c = i.skewY, h = i.scaleX, p = i.scaleY, f = i.target, m = i.xOrigin, d = i.yOrigin, g = i.xOffset, y = i.yOffset, b = i.forceCSS, x = parseFloat(s), v = parseFloat(a), _, C, E, P, w;
|
|
1882
|
+
l = parseFloat(l), u = parseFloat(u), c = parseFloat(c), c && (c = parseFloat(c), u += c, l += c), l || u ? (l *= Je, u *= Je, _ = Math.cos(l) * h, C = Math.sin(l) * h, E = Math.sin(l - u) * -p, P = Math.cos(l - u) * p, u && (c *= Je, w = Math.tan(u - c), w = Math.sqrt(1 + w * w), E *= w, P *= w, c && (w = Math.tan(c), w = Math.sqrt(1 + w * w), _ *= w, C *= w)), _ = G(_), C = G(C), E = G(E), P = G(P)) : (_ = h, P = p, C = E = 0), (x && !~(s + "").indexOf("px") || v && !~(a + "").indexOf("px")) && (x = Le(f, "x", s, "px"), v = Le(f, "y", a, "px")), (m || d || g || y) && (x = G(x + m - (m * _ + d * E) + g), v = G(v + d - (m * C + d * P) + y)), (r || n) && (w = f.getBBox(), x = G(x + r / 100 * w.width), v = G(v + n / 100 * w.height)), w = "matrix(" + _ + "," + C + "," + E + "," + P + "," + x + "," + v + ")", f.setAttribute("transform", w), b && (f.style[N] = w);
|
|
1883
1883
|
}, ks = function(e, t, i, r, n) {
|
|
1884
|
-
var s = 360, a = Y(n), l = parseFloat(n) * (a && ~n.indexOf("rad") ? Ue : 1),
|
|
1885
|
-
return a && (h = n.split("_")[1], h === "short" && (
|
|
1884
|
+
var s = 360, a = Y(n), l = parseFloat(n) * (a && ~n.indexOf("rad") ? Ue : 1), u = l - r, c = r + u + "deg", h, p;
|
|
1885
|
+
return a && (h = n.split("_")[1], h === "short" && (u %= s, u !== u % (s / 2) && (u += u < 0 ? s : -s)), h === "cw" && u < 0 ? u = (u + s * Xi) % s - ~~(u / s) * s : h === "ccw" && u > 0 && (u = (u - s * Xi) % s - ~~(u / s) * s)), e._pt = p = new te(e._pt, t, i, r, u, ys), p.e = c, p.u = "deg", e._props.push(i), p;
|
|
1886
1886
|
}, tr = function(e, t) {
|
|
1887
1887
|
for (var i in t)
|
|
1888
1888
|
e[i] = t[i];
|
|
1889
1889
|
return e;
|
|
1890
1890
|
}, Os = function(e, t, i) {
|
|
1891
|
-
var r = tr({}, i._gsap), n = "perspective,force3D,transformOrigin,svgOrigin", s = i.style, a, l,
|
|
1892
|
-
r.svg ? (
|
|
1891
|
+
var r = tr({}, i._gsap), n = "perspective,force3D,transformOrigin,svgOrigin", s = i.style, a, l, u, c, h, p, f, m;
|
|
1892
|
+
r.svg ? (u = i.getAttribute("transform"), i.setAttribute("transform", ""), s[N] = t, a = vt(i, 1), He(i, N), i.setAttribute("transform", u)) : (u = getComputedStyle(i)[N], s[N] = t, a = vt(i, 1), s[N] = u);
|
|
1893
1893
|
for (l in we)
|
|
1894
|
-
|
|
1894
|
+
u = r[l], c = a[l], u !== c && n.indexOf(l) < 0 && (f = X(u), m = X(c), h = f !== m ? Le(i, l, u, m) : parseFloat(u), p = parseFloat(c), e._pt = new te(e._pt, a, l, h, p - h, di), e._pt.u = m || 0, e._props.push(l));
|
|
1895
1895
|
tr(a, r);
|
|
1896
1896
|
};
|
|
1897
1897
|
ee("padding,margin,Width,Radius", function(o, e) {
|
|
1898
1898
|
var t = "Top", i = "Right", r = "Bottom", n = "Left", s = (e < 3 ? [t, i, r, n] : [t + n, t + i, r + i, r + n]).map(function(a) {
|
|
1899
1899
|
return e < 2 ? o + a : "border" + a + o;
|
|
1900
1900
|
});
|
|
1901
|
-
zt[e > 1 ? "border" + o : o] = function(a, l,
|
|
1901
|
+
zt[e > 1 ? "border" + o : o] = function(a, l, u, c, h) {
|
|
1902
1902
|
var p, f;
|
|
1903
1903
|
if (arguments.length < 4)
|
|
1904
1904
|
return p = s.map(function(m) {
|
|
1905
|
-
return ve(a, m,
|
|
1905
|
+
return ve(a, m, u);
|
|
1906
1906
|
}), f = p.join(" "), f.split(p[0]).length === 5 ? p[0] : f;
|
|
1907
|
-
p = (
|
|
1907
|
+
p = (c + "").split(" "), f = {}, s.forEach(function(m, d) {
|
|
1908
1908
|
return f[m] = p[d] = p[d] || p[(d - 1) / 2 | 0];
|
|
1909
1909
|
}), a.init(l, f, h);
|
|
1910
1910
|
};
|
|
@@ -1916,49 +1916,49 @@ var pn = {
|
|
|
1916
1916
|
return e.style && e.nodeType;
|
|
1917
1917
|
},
|
|
1918
1918
|
init: function(e, t, i, r, n) {
|
|
1919
|
-
var s = this._props, a = e.style, l = i.vars.startAt,
|
|
1919
|
+
var s = this._props, a = e.style, l = i.vars.startAt, u, c, h, p, f, m, d, g, y, b, x, v, _, C, E, P;
|
|
1920
1920
|
Li || fi(), this.styles = this.styles || an(e), P = this.styles.props, this.tween = i;
|
|
1921
1921
|
for (d in t)
|
|
1922
|
-
if (d !== "autoRound" && (
|
|
1923
|
-
if (f = typeof
|
|
1924
|
-
m(this, e, d,
|
|
1922
|
+
if (d !== "autoRound" && (c = t[d], !(ne[d] && Xr(d, t, i, r, e, n)))) {
|
|
1923
|
+
if (f = typeof c, m = zt[d], f === "function" && (c = c.call(i, r, e, n), f = typeof c), f === "string" && ~c.indexOf("random(") && (c = yt(c)), m)
|
|
1924
|
+
m(this, e, d, c, i) && (E = 1);
|
|
1925
1925
|
else if (d.substr(0, 2) === "--")
|
|
1926
|
-
|
|
1926
|
+
u = (getComputedStyle(e).getPropertyValue(d) + "").trim(), c += "", Me.lastIndex = 0, Me.test(u) || (g = X(u), y = X(c)), y ? g !== y && (u = Le(e, d, u, y) + y) : g && (c += g), this.add(a, "setProperty", u, c, r, n, 0, 0, d), s.push(d), P.push(d, 0, a[d]);
|
|
1927
1927
|
else if (f !== "undefined") {
|
|
1928
|
-
if (l && d in l ? (
|
|
1929
|
-
if (this.styles.save(d), f === "string" &&
|
|
1928
|
+
if (l && d in l ? (u = typeof l[d] == "function" ? l[d].call(i, r, e, n) : l[d], Y(u) && ~u.indexOf("random(") && (u = yt(u)), X(u + "") || u === "auto" || (u += oe.units[d] || X(ve(e, d)) || ""), (u + "").charAt(1) === "=" && (u = ve(e, d))) : u = ve(e, d), p = parseFloat(u), b = f === "string" && c.charAt(1) === "=" && c.substr(0, 2), b && (c = c.substr(2)), h = parseFloat(c), d in ge && (d === "autoAlpha" && (p === 1 && ve(e, "visibility") === "hidden" && h && (p = 0), P.push("visibility", 0, a.visibility), Ae(this, a, "visibility", p ? "inherit" : "hidden", h ? "inherit" : "hidden", !h)), d !== "scale" && d !== "transform" && (d = ge[d], ~d.indexOf(",") && (d = d.split(",")[0]))), x = d in we, x) {
|
|
1929
|
+
if (this.styles.save(d), f === "string" && c.substring(0, 6) === "var(--" && (c = pe(e, c.substring(4, c.indexOf(")"))), h = parseFloat(c)), v || (_ = e._gsap, _.renderTransform && !t.parseTransform || vt(e, t.parseTransform), C = t.smoothOrigin !== !1 && _.smooth, v = this._pt = new te(this._pt, a, N, 0, 1, _.renderTransform, _, 0, -1), v.dep = 1), d === "scale")
|
|
1930
1930
|
this._pt = new te(this._pt, _, "scaleY", _.scaleY, (b ? qe(_.scaleY, b + h) : h) - _.scaleY || 0, di), this._pt.u = 0, s.push("scaleY", d), d += "X";
|
|
1931
1931
|
else if (d === "transformOrigin") {
|
|
1932
|
-
P.push(ie, 0, a[ie]),
|
|
1932
|
+
P.push(ie, 0, a[ie]), c = Ds(c), _.svg ? mi(e, c, 0, C, 0, this) : (y = parseFloat(c.split(" ")[2]) || 0, y !== _.zOrigin && Ae(this, _, "zOrigin", _.zOrigin, y), Ae(this, a, d, Nt(u), Nt(c)));
|
|
1933
1933
|
continue;
|
|
1934
1934
|
} else if (d === "svgOrigin") {
|
|
1935
|
-
mi(e,
|
|
1935
|
+
mi(e, c, 1, C, 0, this);
|
|
1936
1936
|
continue;
|
|
1937
1937
|
} else if (d in un) {
|
|
1938
|
-
ks(this, _, d, p, b ? qe(p, b +
|
|
1938
|
+
ks(this, _, d, p, b ? qe(p, b + c) : c);
|
|
1939
1939
|
continue;
|
|
1940
1940
|
} else if (d === "smoothOrigin") {
|
|
1941
|
-
Ae(this, _, "smooth", _.smooth,
|
|
1941
|
+
Ae(this, _, "smooth", _.smooth, c);
|
|
1942
1942
|
continue;
|
|
1943
1943
|
} else if (d === "force3D") {
|
|
1944
|
-
_[d] =
|
|
1944
|
+
_[d] = c;
|
|
1945
1945
|
continue;
|
|
1946
1946
|
} else if (d === "transform") {
|
|
1947
|
-
Os(this,
|
|
1947
|
+
Os(this, c, e);
|
|
1948
1948
|
continue;
|
|
1949
1949
|
}
|
|
1950
1950
|
} else d in a || (d = nt(d) || d);
|
|
1951
|
-
if (x || (h || h === 0) && (p || p === 0) && !gs.test(
|
|
1952
|
-
g = (
|
|
1951
|
+
if (x || (h || h === 0) && (p || p === 0) && !gs.test(c) && d in a)
|
|
1952
|
+
g = (u + "").substr((p + "").length), h || (h = 0), y = X(c) || (d in oe.units ? oe.units[d] : g), g !== y && (p = Le(e, d, u, y)), this._pt = new te(this._pt, x ? _ : a, d, p, (b ? qe(p, b + h) : h) - p, !x && (y === "px" || d === "zIndex") && t.autoRound !== !1 ? xs : di), this._pt.u = y || 0, g !== y && y !== "%" && (this._pt.b = u, this._pt.r = bs);
|
|
1953
1953
|
else if (d in a)
|
|
1954
|
-
Ms.call(this, e, d,
|
|
1954
|
+
Ms.call(this, e, d, u, b ? b + c : c);
|
|
1955
1955
|
else if (d in e)
|
|
1956
|
-
this.add(e, d,
|
|
1956
|
+
this.add(e, d, u || e[d], b ? b + c : c, r, n);
|
|
1957
1957
|
else if (d !== "parseTransform") {
|
|
1958
|
-
vi(d,
|
|
1958
|
+
vi(d, c);
|
|
1959
1959
|
continue;
|
|
1960
1960
|
}
|
|
1961
|
-
x || (d in a ? P.push(d, 0, a[d]) : typeof e[d] == "function" ? P.push(d, 2, e[d]()) : P.push(d, 1,
|
|
1961
|
+
x || (d in a ? P.push(d, 0, a[d]) : typeof e[d] == "function" ? P.push(d, 2, e[d]()) : P.push(d, 1, u || e[d])), s.push(d);
|
|
1962
1962
|
}
|
|
1963
1963
|
}
|
|
1964
1964
|
E && en(this);
|
|
@@ -2360,19 +2360,19 @@ class Vs extends ye {
|
|
|
2360
2360
|
}, n = (b) => {
|
|
2361
2361
|
this._inputFocused && (b.preventDefault(), i(this._step * this._normalizeMouseWheel(b)));
|
|
2362
2362
|
};
|
|
2363
|
-
let s = !1, a, l,
|
|
2363
|
+
let s = !1, a, l, u, c, h;
|
|
2364
2364
|
const p = 5, f = (b) => {
|
|
2365
|
-
a = b.clientX, l =
|
|
2365
|
+
a = b.clientX, l = u = b.clientY, s = !0, c = this.getValue(), h = 0, window.addEventListener("mousemove", m), window.addEventListener("mouseup", d);
|
|
2366
2366
|
}, m = (b) => {
|
|
2367
2367
|
if (s) {
|
|
2368
2368
|
const x = b.clientX - a, v = b.clientY - l;
|
|
2369
2369
|
Math.abs(v) > p ? (b.preventDefault(), this.$input.blur(), s = !1, this._setDraggingStyle(!0, "vertical")) : Math.abs(x) > p && d();
|
|
2370
2370
|
}
|
|
2371
2371
|
if (!s) {
|
|
2372
|
-
const x = b.clientY -
|
|
2373
|
-
h -= x * this._step * this._arrowKeyMultiplier(b),
|
|
2372
|
+
const x = b.clientY - u;
|
|
2373
|
+
h -= x * this._step * this._arrowKeyMultiplier(b), c + h > this._max ? h = this._max - c : c + h < this._min && (h = this._min - c), this._snapClampSetValue(c + h);
|
|
2374
2374
|
}
|
|
2375
|
-
|
|
2375
|
+
u = b.clientY;
|
|
2376
2376
|
}, d = () => {
|
|
2377
2377
|
this._setDraggingStyle(!1, "vertical"), this._callOnFinishChange(), window.removeEventListener("mousemove", m), window.removeEventListener("mouseup", d);
|
|
2378
2378
|
}, g = () => {
|
|
@@ -2396,14 +2396,14 @@ class Vs extends ye {
|
|
|
2396
2396
|
this._callOnFinishChange(), this._setDraggingStyle(!1), window.removeEventListener("mousemove", r), window.removeEventListener("mouseup", n);
|
|
2397
2397
|
};
|
|
2398
2398
|
let s = !1, a, l;
|
|
2399
|
-
const
|
|
2399
|
+
const u = (y) => {
|
|
2400
2400
|
y.preventDefault(), this._setDraggingStyle(!0), t(y.touches[0].clientX), s = !1;
|
|
2401
|
-
},
|
|
2402
|
-
y.touches.length > 1 || (this._hasScrollBar ? (a = y.touches[0].clientX, l = y.touches[0].clientY, s = !0) :
|
|
2401
|
+
}, c = (y) => {
|
|
2402
|
+
y.touches.length > 1 || (this._hasScrollBar ? (a = y.touches[0].clientX, l = y.touches[0].clientY, s = !0) : u(y), window.addEventListener("touchmove", h, { passive: !1 }), window.addEventListener("touchend", p));
|
|
2403
2403
|
}, h = (y) => {
|
|
2404
2404
|
if (s) {
|
|
2405
2405
|
const b = y.touches[0].clientX - a, x = y.touches[0].clientY - l;
|
|
2406
|
-
Math.abs(b) > Math.abs(x) ?
|
|
2406
|
+
Math.abs(b) > Math.abs(x) ? u(y) : (window.removeEventListener("touchmove", h), window.removeEventListener("touchend", p));
|
|
2407
2407
|
} else
|
|
2408
2408
|
y.preventDefault(), t(y.touches[0].clientX);
|
|
2409
2409
|
}, p = () => {
|
|
@@ -2416,7 +2416,7 @@ class Vs extends ye {
|
|
|
2416
2416
|
const x = this._normalizeMouseWheel(y) * this._step;
|
|
2417
2417
|
this._snapClampSetValue(this.getValue() + x), this.$input.value = this.getValue(), clearTimeout(d), d = setTimeout(f, m);
|
|
2418
2418
|
};
|
|
2419
|
-
this.$slider.addEventListener("mousedown", i), this.$slider.addEventListener("touchstart",
|
|
2419
|
+
this.$slider.addEventListener("mousedown", i), this.$slider.addEventListener("touchstart", c, { passive: !1 }), this.$slider.addEventListener("wheel", g, { passive: !1 });
|
|
2420
2420
|
}
|
|
2421
2421
|
_setDraggingStyle(e, t = "horizontal") {
|
|
2422
2422
|
this.$slider && this.$slider.classList.toggle("lil-active", e), document.body.classList.toggle("lil-dragging", e), document.body.classList.toggle(`lil-${t}`, e);
|
|
@@ -3776,11 +3776,11 @@ class Ze {
|
|
|
3776
3776
|
), this.onProgress?.(0.4);
|
|
3777
3777
|
const r = 200, n = i.length;
|
|
3778
3778
|
for (let s = 0; s < n; s += r) {
|
|
3779
|
-
i.slice(s, s + r).forEach((
|
|
3780
|
-
|
|
3779
|
+
i.slice(s, s + r).forEach((u) => {
|
|
3780
|
+
u.path = this.createPath(u);
|
|
3781
3781
|
});
|
|
3782
3782
|
const l = 0.4 + 0.6 * (s + r) / n;
|
|
3783
|
-
this.onProgress?.(Math.min(0.99, l)), await new Promise((
|
|
3783
|
+
this.onProgress?.(Math.min(0.99, l)), await new Promise((u) => setTimeout(u, 0));
|
|
3784
3784
|
}
|
|
3785
3785
|
return console.log(
|
|
3786
3786
|
`Loaded and processed ${i.length} boundaries from ${this.topologyConfig.objectName}`
|
|
@@ -3802,7 +3802,7 @@ class Ze {
|
|
|
3802
3802
|
*/
|
|
3803
3803
|
loadInWorker(e, t, i) {
|
|
3804
3804
|
return new Promise((r, n) => {
|
|
3805
|
-
const s = new Blob([Ks], { type: "application/javascript" }), a = URL.createObjectURL(s), l = new Worker(a),
|
|
3805
|
+
const s = new Blob([Ks], { type: "application/javascript" }), a = URL.createObjectURL(s), l = new Worker(a), u = setTimeout(() => {
|
|
3806
3806
|
l.terminate(), URL.revokeObjectURL(a), n(new Error(`Worker timed out after 15s loading ${t}`));
|
|
3807
3807
|
}, 15e3);
|
|
3808
3808
|
l.onmessage = (p) => {
|
|
@@ -3810,13 +3810,13 @@ class Ze {
|
|
|
3810
3810
|
this.onProgress?.(p.data.progress || 0, p.data.status);
|
|
3811
3811
|
return;
|
|
3812
3812
|
}
|
|
3813
|
-
clearTimeout(
|
|
3813
|
+
clearTimeout(u), URL.revokeObjectURL(a), l.terminate(), p.data.success ? r(p.data.features) : n(new Error(p.data.error));
|
|
3814
3814
|
}, l.onerror = (p) => {
|
|
3815
|
-
clearTimeout(
|
|
3815
|
+
clearTimeout(u), URL.revokeObjectURL(a), l.terminate(), n(new Error("Worker error: " + p.message));
|
|
3816
3816
|
};
|
|
3817
|
-
const
|
|
3817
|
+
const c = new URL(e, window.location.href).href;
|
|
3818
3818
|
l.postMessage({
|
|
3819
|
-
url:
|
|
3819
|
+
url: c,
|
|
3820
3820
|
objectName: t,
|
|
3821
3821
|
idProperty: i,
|
|
3822
3822
|
topojsonUrl: "https://unpkg.com/topojson-client@3/dist/topojson-client.min.js"
|
|
@@ -3926,14 +3926,14 @@ class Ze {
|
|
|
3926
3926
|
const a = () => {
|
|
3927
3927
|
if (this.currentRenderId !== t) return;
|
|
3928
3928
|
const l = Math.min(s + r, n);
|
|
3929
|
-
for (let
|
|
3930
|
-
const
|
|
3929
|
+
for (let u = s; u < l; u++) {
|
|
3930
|
+
const c = this.countries[u], h = this.statsMap.get(c.id);
|
|
3931
3931
|
let p = "#2a2a2a";
|
|
3932
3932
|
if (h) {
|
|
3933
3933
|
const f = e.accessor(h), m = Xs(e, f);
|
|
3934
3934
|
p = this.interpolateColor(e.colorScale, m);
|
|
3935
3935
|
}
|
|
3936
|
-
this.drawFeature(
|
|
3936
|
+
this.drawFeature(c, p, i);
|
|
3937
3937
|
}
|
|
3938
3938
|
s = l, this.onTextureUpdate?.(), s < n && requestAnimationFrame(a);
|
|
3939
3939
|
};
|
|
@@ -3963,8 +3963,8 @@ class Ze {
|
|
|
3963
3963
|
t.forEach((i) => {
|
|
3964
3964
|
let r = null;
|
|
3965
3965
|
i.forEach((n, s) => {
|
|
3966
|
-
const a = n[0], l = n[1], [
|
|
3967
|
-
s === 0 || h ? e.moveTo(
|
|
3966
|
+
const a = n[0], l = n[1], [u, c] = this.projectPoint(a, l), h = r !== null && Math.abs(a - r) > 180;
|
|
3967
|
+
s === 0 || h ? e.moveTo(u, c) : e.lineTo(u, c), r = a;
|
|
3968
3968
|
}), e.closePath();
|
|
3969
3969
|
});
|
|
3970
3970
|
}
|
|
@@ -3973,20 +3973,20 @@ class Ze {
|
|
|
3973
3973
|
return [i, r];
|
|
3974
3974
|
}
|
|
3975
3975
|
interpolateColor(e, t) {
|
|
3976
|
-
const i = (
|
|
3977
|
-
r: parseInt(
|
|
3978
|
-
g: parseInt(
|
|
3979
|
-
b: parseInt(
|
|
3976
|
+
const i = (c) => ({
|
|
3977
|
+
r: parseInt(c.slice(1, 3), 16),
|
|
3978
|
+
g: parseInt(c.slice(3, 5), 16),
|
|
3979
|
+
b: parseInt(c.slice(5, 7), 16)
|
|
3980
3980
|
}), [r, n, s] = e.map(i);
|
|
3981
|
-
let a, l,
|
|
3981
|
+
let a, l, u;
|
|
3982
3982
|
if (t < 0.5) {
|
|
3983
|
-
const
|
|
3984
|
-
a = Math.round(r.r + (n.r - r.r) *
|
|
3983
|
+
const c = t * 2;
|
|
3984
|
+
a = Math.round(r.r + (n.r - r.r) * c), l = Math.round(r.g + (n.g - r.g) * c), u = Math.round(r.b + (n.b - r.b) * c);
|
|
3985
3985
|
} else {
|
|
3986
|
-
const
|
|
3987
|
-
a = Math.round(n.r + (s.r - n.r) *
|
|
3986
|
+
const c = (t - 0.5) * 2;
|
|
3987
|
+
a = Math.round(n.r + (s.r - n.r) * c), l = Math.round(n.g + (s.g - n.g) * c), u = Math.round(n.b + (s.b - n.b) * c);
|
|
3988
3988
|
}
|
|
3989
|
-
return `rgb(${a}, ${l}, ${
|
|
3989
|
+
return `rgb(${a}, ${l}, ${u})`;
|
|
3990
3990
|
}
|
|
3991
3991
|
/**
|
|
3992
3992
|
* Render a choropleth texture with custom values
|
|
@@ -3999,11 +3999,11 @@ class Ze {
|
|
|
3999
3999
|
const n = this.topologyConfig?.disableNormalization ? e instanceof Map ? Object.fromEntries(e) : e : qs(e), s = this.countries.length < 1500;
|
|
4000
4000
|
this.ctx.lineWidth = 0.5, this.ctx.strokeStyle = "rgba(0, 0, 0, 0.3)";
|
|
4001
4001
|
const a = 500, l = this.countries.length;
|
|
4002
|
-
let
|
|
4003
|
-
const
|
|
4002
|
+
let u = 0;
|
|
4003
|
+
const c = () => {
|
|
4004
4004
|
if (this.currentRenderId !== r) return;
|
|
4005
|
-
const h = Math.min(
|
|
4006
|
-
for (let p =
|
|
4005
|
+
const h = Math.min(u + a, l);
|
|
4006
|
+
for (let p = u; p < h; p++) {
|
|
4007
4007
|
const f = this.countries[p], m = n[f.id];
|
|
4008
4008
|
let d = "#2a2a2a";
|
|
4009
4009
|
if (m !== void 0) {
|
|
@@ -4015,9 +4015,9 @@ class Ze {
|
|
|
4015
4015
|
}
|
|
4016
4016
|
this.drawFeature(f, d, s);
|
|
4017
4017
|
}
|
|
4018
|
-
|
|
4018
|
+
u = h, this.onTextureUpdate?.(), u < l && requestAnimationFrame(c);
|
|
4019
4019
|
};
|
|
4020
|
-
return requestAnimationFrame(
|
|
4020
|
+
return requestAnimationFrame(c), this.canvas;
|
|
4021
4021
|
}
|
|
4022
4022
|
getCanvas() {
|
|
4023
4023
|
return this.canvas;
|
|
@@ -4049,27 +4049,27 @@ class Ze {
|
|
|
4049
4049
|
}
|
|
4050
4050
|
getBounds() {
|
|
4051
4051
|
if (this.countries.length === 0) return null;
|
|
4052
|
-
let e = 1 / 0, t = -1 / 0, i = 1 / 0, r = -1 / 0, n = 0, s = 1 / 0, a = -1 / 0, l = 1 / 0,
|
|
4052
|
+
let e = 1 / 0, t = -1 / 0, i = 1 / 0, r = -1 / 0, n = 0, s = 1 / 0, a = -1 / 0, l = 1 / 0, u = -1 / 0, c = 0;
|
|
4053
4053
|
const h = (y) => {
|
|
4054
4054
|
if (typeof y[0] == "number") {
|
|
4055
4055
|
const b = y[0], x = y[1];
|
|
4056
|
-
b < 0 ? (b < e && (e = b), b > t && (t = b), x < i && (i = x), x > r && (r = x), n++) : (b < s && (s = b), b > a && (a = b), x < l && (l = x), x >
|
|
4056
|
+
b < 0 ? (b < e && (e = b), b > t && (t = b), x < i && (i = x), x > r && (r = x), n++) : (b < s && (s = b), b > a && (a = b), x < l && (l = x), x > u && (u = x), c++);
|
|
4057
4057
|
} else
|
|
4058
4058
|
y.forEach(h);
|
|
4059
4059
|
};
|
|
4060
4060
|
if (this.countries.forEach((y) => {
|
|
4061
4061
|
y.geometry && h(y.geometry.coordinates);
|
|
4062
|
-
}), n === 0 &&
|
|
4063
|
-
if (n === 0) return [s, l, a,
|
|
4064
|
-
if (
|
|
4062
|
+
}), n === 0 && c === 0) return null;
|
|
4063
|
+
if (n === 0) return [s, l, a, u];
|
|
4064
|
+
if (c === 0) return [e, i, t, r];
|
|
4065
4065
|
const p = Math.min(e, s), f = Math.max(t, a);
|
|
4066
4066
|
if (f - p > 180) {
|
|
4067
|
-
if (n >
|
|
4067
|
+
if (n > c * 2)
|
|
4068
4068
|
return [e, i, t, r];
|
|
4069
|
-
if (
|
|
4070
|
-
return [s, l, a,
|
|
4069
|
+
if (c > n * 2)
|
|
4070
|
+
return [s, l, a, u];
|
|
4071
4071
|
}
|
|
4072
|
-
const d = Math.min(i, l), g = Math.max(r,
|
|
4072
|
+
const d = Math.min(i, l), g = Math.max(r, u);
|
|
4073
4073
|
return [p, d, f, g];
|
|
4074
4074
|
}
|
|
4075
4075
|
}
|
|
@@ -4409,21 +4409,21 @@ class na {
|
|
|
4409
4409
|
const m = i(f.country.id), d = r(f.country.name);
|
|
4410
4410
|
return m === n || d === s;
|
|
4411
4411
|
})) return;
|
|
4412
|
-
const l = t.size || "small",
|
|
4413
|
-
|
|
4414
|
-
const
|
|
4412
|
+
const l = t.size || "small", u = document.createElement("div");
|
|
4413
|
+
u.className = `country-label hidden size-${l} custom-label`, u.textContent = t.name;
|
|
4414
|
+
const c = new zi(u), h = {
|
|
4415
4415
|
id: t.id,
|
|
4416
4416
|
code: t.id,
|
|
4417
4417
|
name: t.name
|
|
4418
4418
|
}, p = {
|
|
4419
|
-
element:
|
|
4420
|
-
object:
|
|
4419
|
+
element: u,
|
|
4420
|
+
object: c,
|
|
4421
4421
|
country: h,
|
|
4422
4422
|
lat: t.lat,
|
|
4423
4423
|
lon: t.lon,
|
|
4424
4424
|
sizeCategory: l
|
|
4425
4425
|
};
|
|
4426
|
-
this.labelGroup.add(
|
|
4426
|
+
this.labelGroup.add(c), this.labels.push(p), this.dataIds.add(t.id), this.updateLabelPosition(c, p, this.currentMorph);
|
|
4427
4427
|
}), this.setStyle(this.currentStyle);
|
|
4428
4428
|
}
|
|
4429
4429
|
/**
|
|
@@ -4443,7 +4443,7 @@ class na {
|
|
|
4443
4443
|
cameraDirection = new A.Vector3();
|
|
4444
4444
|
labelNormal = new A.Vector3();
|
|
4445
4445
|
updateLabelPosition(e, t, i) {
|
|
4446
|
-
const { lat: r, lon: n, element: s } = t, a = (n + 180) / 360, l = (r + 90) / 180,
|
|
4446
|
+
const { lat: r, lon: n, element: s } = t, a = (n + 180) / 360, l = (r + 90) / 180, u = (a - 0.5) * 2 * Math.PI, c = (l - 0.5) * Math.PI, h = this.sphereRadius + 0.3, p = h * Math.cos(c) * Math.sin(u), f = h * Math.sin(c), m = h * Math.cos(c) * Math.cos(u), d = 2 * Math.PI * this.sphereRadius, g = Math.PI * this.sphereRadius, y = (a - 0.5) * d, b = (l - 0.5) * g, x = 0.3, v = i * i * (3 - 2 * i);
|
|
4447
4447
|
if (this.localPos.set(
|
|
4448
4448
|
y + v * (p - y),
|
|
4449
4449
|
b + v * (f - b),
|
|
@@ -4589,11 +4589,11 @@ class na {
|
|
|
4589
4589
|
const a = s.element.style.opacity, l = a === "" ? 1 : parseFloat(a) || 0;
|
|
4590
4590
|
if (l < 0.1 || s.element.classList.contains("hidden")) return;
|
|
4591
4591
|
s.object.getWorldPosition(n), n.project(e);
|
|
4592
|
-
const
|
|
4593
|
-
|
|
4592
|
+
const u = (n.x * 0.5 + 0.5) * t, c = (-n.y * 0.5 + 0.5) * i;
|
|
4593
|
+
u >= 0 && u <= t && c >= 0 && c <= i && n.z < 1 && r.push({
|
|
4594
4594
|
text: s.country.name,
|
|
4595
|
-
x:
|
|
4596
|
-
y:
|
|
4595
|
+
x: u,
|
|
4596
|
+
y: c,
|
|
4597
4597
|
opacity: l
|
|
4598
4598
|
});
|
|
4599
4599
|
}), r;
|
|
@@ -4812,11 +4812,11 @@ function fn(o = 256) {
|
|
|
4812
4812
|
}
|
|
4813
4813
|
var Qt = 12, sr = 5003, la = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535];
|
|
4814
4814
|
function ca(o, e, t, i, r = fn(512), n = new Uint8Array(256), s = new Int32Array(sr), a = new Int32Array(sr)) {
|
|
4815
|
-
let l = s.length,
|
|
4815
|
+
let l = s.length, u = Math.max(2, i);
|
|
4816
4816
|
n.fill(0), a.fill(0), s.fill(-1);
|
|
4817
|
-
let
|
|
4817
|
+
let c = 0, h = 0, p = u + 1, f = p, m = !1, d = f, g = (1 << d) - 1, y = 1 << p - 1, b = y + 1, x = y + 2, v = 0, _ = t[0], C = 0;
|
|
4818
4818
|
for (let w = l; w < 65536; w *= 2) ++C;
|
|
4819
|
-
C = 8 - C, r.writeByte(
|
|
4819
|
+
C = 8 - C, r.writeByte(u), P(y);
|
|
4820
4820
|
let E = t.length;
|
|
4821
4821
|
for (let w = 1; w < E; w++)
|
|
4822
4822
|
e: {
|
|
@@ -4834,9 +4834,9 @@ function ca(o, e, t, i, r = fn(512), n = new Uint8Array(256), s = new Int32Array
|
|
|
4834
4834
|
}
|
|
4835
4835
|
return P(_), P(b), r.writeByte(0), r.bytesView();
|
|
4836
4836
|
function P(w) {
|
|
4837
|
-
for (
|
|
4837
|
+
for (c &= la[h], h > 0 ? c |= w << h : c = w, h += d; h >= 8; ) n[v++] = c & 255, v >= 254 && (r.writeByte(v), r.writeBytesView(n, 0, v), v = 0), c >>= 8, h -= 8;
|
|
4838
4838
|
if ((x > g || m) && (m ? (d = f, g = (1 << d) - 1, m = !1) : (++d, g = d === Qt ? 1 << d : (1 << d) - 1)), w == b) {
|
|
4839
|
-
for (; h > 0; ) n[v++] =
|
|
4839
|
+
for (; h > 0; ) n[v++] = c & 255, v >= 254 && (r.writeByte(v), r.writeBytesView(n, 0, v), v = 0), c >>= 8, h -= 8;
|
|
4840
4840
|
v > 0 && (r.writeByte(v), r.writeBytesView(n, 0, v), v = 0);
|
|
4841
4841
|
}
|
|
4842
4842
|
}
|
|
@@ -4861,12 +4861,12 @@ function ar(o, e, t) {
|
|
|
4861
4861
|
var i = 0, r = 1e100;
|
|
4862
4862
|
let n = o[e], s = n.cnt;
|
|
4863
4863
|
n.ac;
|
|
4864
|
-
let a = n.rc, l = n.gc,
|
|
4865
|
-
for (var
|
|
4866
|
-
let p = o[
|
|
4864
|
+
let a = n.rc, l = n.gc, u = n.bc;
|
|
4865
|
+
for (var c = n.fw; c != 0; c = o[c].fw) {
|
|
4866
|
+
let p = o[c], f = p.cnt, m = s * f / (s + f);
|
|
4867
4867
|
if (!(m >= r)) {
|
|
4868
4868
|
var h = 0;
|
|
4869
|
-
h += m * It(p.rc - a), !(h >= r) && (h += m * It(p.gc - l), !(h >= r) && (h += m * It(p.bc -
|
|
4869
|
+
h += m * It(p.rc - a), !(h >= r) && (h += m * It(p.gc - l), !(h >= r) && (h += m * It(p.bc - u), !(h >= r) && (r = h, i = c)));
|
|
4870
4870
|
}
|
|
4871
4871
|
}
|
|
4872
4872
|
n.err = r, n.nn = i;
|
|
@@ -4877,16 +4877,16 @@ function ei() {
|
|
|
4877
4877
|
function ha(o, e) {
|
|
4878
4878
|
let t = e === "rgb444" ? 4096 : 65536, i = new Array(t), r = o.length;
|
|
4879
4879
|
if (e === "rgba4444") for (let n = 0; n < r; ++n) {
|
|
4880
|
-
let s = o[n], a = s >> 24 & 255, l = s >> 16 & 255,
|
|
4881
|
-
p.rc +=
|
|
4880
|
+
let s = o[n], a = s >> 24 & 255, l = s >> 16 & 255, u = s >> 8 & 255, c = s & 255, h = gn(c, u, l, a), p = h in i ? i[h] : i[h] = ei();
|
|
4881
|
+
p.rc += c, p.gc += u, p.bc += l, p.ac += a, p.cnt++;
|
|
4882
4882
|
}
|
|
4883
4883
|
else if (e === "rgb444") for (let n = 0; n < r; ++n) {
|
|
4884
|
-
let s = o[n], a = s >> 16 & 255, l = s >> 8 & 255,
|
|
4885
|
-
h.rc +=
|
|
4884
|
+
let s = o[n], a = s >> 16 & 255, l = s >> 8 & 255, u = s & 255, c = yn(u, l, a), h = c in i ? i[c] : i[c] = ei();
|
|
4885
|
+
h.rc += u, h.gc += l, h.bc += a, h.cnt++;
|
|
4886
4886
|
}
|
|
4887
4887
|
else for (let n = 0; n < r; ++n) {
|
|
4888
|
-
let s = o[n], a = s >> 16 & 255, l = s >> 8 & 255,
|
|
4889
|
-
h.rc +=
|
|
4888
|
+
let s = o[n], a = s >> 16 & 255, l = s >> 8 & 255, u = s & 255, c = mn(u, l, a), h = c in i ? i[c] : i[c] = ei();
|
|
4889
|
+
h.rc += u, h.gc += l, h.bc += a, h.cnt++;
|
|
4890
4890
|
}
|
|
4891
4891
|
return i;
|
|
4892
4892
|
}
|
|
@@ -4894,17 +4894,17 @@ function da(o, e, t = {}) {
|
|
|
4894
4894
|
let { format: i = "rgb565", clearAlpha: r = !0, clearAlphaColor: n = 0, clearAlphaThreshold: s = 0, oneBitAlpha: a = !1 } = t;
|
|
4895
4895
|
if (!o || !o.buffer) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
4896
4896
|
if (!(o instanceof Uint8Array) && !(o instanceof Uint8ClampedArray)) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
4897
|
-
let l = new Uint32Array(o.buffer),
|
|
4897
|
+
let l = new Uint32Array(o.buffer), u = t.useSqrt !== !1, c = i === "rgba4444", h = ha(l, i), p = h.length, f = p - 1, m = new Uint32Array(p + 1);
|
|
4898
4898
|
for (var d = 0, g = 0; g < p; ++g) {
|
|
4899
4899
|
let I = h[g];
|
|
4900
4900
|
if (I != null) {
|
|
4901
4901
|
var y = 1 / I.cnt;
|
|
4902
|
-
|
|
4902
|
+
c && (I.ac *= y), I.rc *= y, I.gc *= y, I.bc *= y, h[d++] = I;
|
|
4903
4903
|
}
|
|
4904
4904
|
}
|
|
4905
|
-
It(e) / d < 0.022 && (
|
|
4906
|
-
for (var g = 0; g < d - 1; ++g) h[g].fw = g + 1, h[g + 1].bk = g,
|
|
4907
|
-
|
|
4905
|
+
It(e) / d < 0.022 && (u = !1);
|
|
4906
|
+
for (var g = 0; g < d - 1; ++g) h[g].fw = g + 1, h[g + 1].bk = g, u && (h[g].cnt = Math.sqrt(h[g].cnt));
|
|
4907
|
+
u && (h[g].cnt = Math.sqrt(h[g].cnt));
|
|
4908
4908
|
var b, x, v;
|
|
4909
4909
|
for (g = 0; g < d; ++g) {
|
|
4910
4910
|
ar(h, g);
|
|
@@ -4923,14 +4923,14 @@ function da(o, e, t = {}) {
|
|
|
4923
4923
|
m[x] = P;
|
|
4924
4924
|
}
|
|
4925
4925
|
var w = h[E.nn], T = E.cnt, D = w.cnt, y = 1 / (T + D);
|
|
4926
|
-
|
|
4926
|
+
c && (E.ac = y * (T * E.ac + D * w.ac)), E.rc = y * (T * E.rc + D * w.rc), E.gc = y * (T * E.gc + D * w.gc), E.bc = y * (T * E.bc + D * w.bc), E.cnt += w.cnt, E.mtm = ++g, h[w.bk].fw = w.fw, h[w.fw].bk = w.bk, w.mtm = f;
|
|
4927
4927
|
}
|
|
4928
4928
|
let S = [];
|
|
4929
4929
|
var L = 0;
|
|
4930
4930
|
for (g = 0; ; ++L) {
|
|
4931
4931
|
let I = Tt(Math.round(h[g].rc), 0, 255), $ = Tt(Math.round(h[g].gc), 0, 255), F = Tt(Math.round(h[g].bc), 0, 255), O = 255;
|
|
4932
|
-
|
|
4933
|
-
let J =
|
|
4932
|
+
c && (O = Tt(Math.round(h[g].ac), 0, 255), a && (O = O <= (typeof a == "number" ? a : 127) ? 0 : 255), r && O <= s && (I = $ = F = n, O = 0));
|
|
4933
|
+
let J = c ? [I, $, F, O] : [I, $, F];
|
|
4934
4934
|
if (pa(S, J) || S.push(J), (g = h[g].fw) == 0) break;
|
|
4935
4935
|
}
|
|
4936
4936
|
return S;
|
|
@@ -4948,14 +4948,14 @@ function fa(o, e, t = "rgb565") {
|
|
|
4948
4948
|
if (e.length > 256) throw new Error("applyPalette() only works with 256 colors or less");
|
|
4949
4949
|
let i = new Uint32Array(o.buffer), r = i.length, n = t === "rgb444" ? 4096 : 65536, s = new Uint8Array(r), a = new Array(n);
|
|
4950
4950
|
if (t === "rgba4444") for (let l = 0; l < r; l++) {
|
|
4951
|
-
let
|
|
4951
|
+
let u = i[l], c = u >> 24 & 255, h = u >> 16 & 255, p = u >> 8 & 255, f = u & 255, m = gn(f, p, h, c), d = m in a ? a[m] : a[m] = ma(f, p, h, c, e);
|
|
4952
4952
|
s[l] = d;
|
|
4953
4953
|
}
|
|
4954
4954
|
else {
|
|
4955
4955
|
let l = t === "rgb444" ? yn : mn;
|
|
4956
|
-
for (let
|
|
4957
|
-
let
|
|
4958
|
-
s[
|
|
4956
|
+
for (let u = 0; u < r; u++) {
|
|
4957
|
+
let c = i[u], h = c >> 16 & 255, p = c >> 8 & 255, f = c & 255, m = l(f, p, h), d = m in a ? a[m] : a[m] = ga(f, p, h, e);
|
|
4958
|
+
s[u] = d;
|
|
4959
4959
|
}
|
|
4960
4960
|
}
|
|
4961
4961
|
return s;
|
|
@@ -4963,26 +4963,26 @@ function fa(o, e, t = "rgb565") {
|
|
|
4963
4963
|
function ma(o, e, t, i, r) {
|
|
4964
4964
|
let n = 0, s = 1e100;
|
|
4965
4965
|
for (let a = 0; a < r.length; a++) {
|
|
4966
|
-
let l = r[a],
|
|
4967
|
-
if (
|
|
4966
|
+
let l = r[a], u = l[3], c = Ne(u - i);
|
|
4967
|
+
if (c > s) continue;
|
|
4968
4968
|
let h = l[0];
|
|
4969
|
-
if (
|
|
4969
|
+
if (c += Ne(h - o), c > s) continue;
|
|
4970
4970
|
let p = l[1];
|
|
4971
|
-
if (
|
|
4971
|
+
if (c += Ne(p - e), c > s) continue;
|
|
4972
4972
|
let f = l[2];
|
|
4973
|
-
|
|
4973
|
+
c += Ne(f - t), !(c > s) && (s = c, n = a);
|
|
4974
4974
|
}
|
|
4975
4975
|
return n;
|
|
4976
4976
|
}
|
|
4977
4977
|
function ga(o, e, t, i) {
|
|
4978
4978
|
let r = 0, n = 1e100;
|
|
4979
4979
|
for (let s = 0; s < i.length; s++) {
|
|
4980
|
-
let a = i[s], l = a[0],
|
|
4981
|
-
if (
|
|
4982
|
-
let
|
|
4983
|
-
if (
|
|
4980
|
+
let a = i[s], l = a[0], u = Ne(l - o);
|
|
4981
|
+
if (u > n) continue;
|
|
4982
|
+
let c = a[1];
|
|
4983
|
+
if (u += Ne(c - e), u > n) continue;
|
|
4984
4984
|
let h = a[2];
|
|
4985
|
-
|
|
4985
|
+
u += Ne(h - t), !(u > n) && (n = u, r = s);
|
|
4986
4986
|
}
|
|
4987
4987
|
return r;
|
|
4988
4988
|
}
|
|
@@ -5003,18 +5003,18 @@ function ya(o = {}) {
|
|
|
5003
5003
|
return i.buffer;
|
|
5004
5004
|
}, get stream() {
|
|
5005
5005
|
return i;
|
|
5006
|
-
}, writeHeader:
|
|
5006
|
+
}, writeHeader: u, writeFrame(c, h, p, f = {}) {
|
|
5007
5007
|
let { transparent: m = !1, transparentIndex: d = 0, delay: g = 0, palette: y = null, repeat: b = 0, colorDepth: x = 8, dispose: v = -1 } = f, _ = !1;
|
|
5008
|
-
if (t ? l || (_ = !0,
|
|
5008
|
+
if (t ? l || (_ = !0, u(), l = !0) : _ = !!f.first, h = Math.max(0, Math.floor(h)), p = Math.max(0, Math.floor(p)), _) {
|
|
5009
5009
|
if (!y) throw new Error("First frame must include a { palette } option");
|
|
5010
5010
|
xa(i, h, p, y, x), or(i, y), b >= 0 && _a(i, b);
|
|
5011
5011
|
}
|
|
5012
5012
|
let C = Math.round(g / 10);
|
|
5013
5013
|
ba(i, v, C, m, d);
|
|
5014
5014
|
let E = !!y && !_;
|
|
5015
|
-
va(i, h, p, E ? y : null), E && or(i, y), Ea(i,
|
|
5015
|
+
va(i, h, p, E ? y : null), E && or(i, y), Ea(i, c, h, p, x, n, s, a);
|
|
5016
5016
|
} };
|
|
5017
|
-
function
|
|
5017
|
+
function u() {
|
|
5018
5018
|
bn(i, "GIF89a");
|
|
5019
5019
|
}
|
|
5020
5020
|
}
|
|
@@ -5113,11 +5113,11 @@ class wa {
|
|
|
5113
5113
|
drawLegendOnCanvas(e, t, i) {
|
|
5114
5114
|
try {
|
|
5115
5115
|
if (!this.legendElement || !this.legendElement.classList.contains("visible")) return;
|
|
5116
|
-
const r = this.legendElement, n = r.querySelector(".gralobe-legend-title") || r.querySelector(".legend-title"), s = r.querySelector(".gralobe-legend-gradient") || r.querySelector(".legend-gradient"), a = r.querySelector(".gralobe-legend-min") || r.querySelector(".legend-min"), l = r.querySelector(".gralobe-legend-max") || r.querySelector(".legend-max"),
|
|
5116
|
+
const r = this.legendElement, n = r.querySelector(".gralobe-legend-title") || r.querySelector(".legend-title"), s = r.querySelector(".gralobe-legend-gradient") || r.querySelector(".legend-gradient"), a = r.querySelector(".gralobe-legend-min") || r.querySelector(".legend-min"), l = r.querySelector(".gralobe-legend-max") || r.querySelector(".legend-max"), u = r.querySelector(".gralobe-legend-description") || r.querySelector(".legend-description");
|
|
5117
5117
|
if (!n || !s) return;
|
|
5118
|
-
const
|
|
5119
|
-
e.fillStyle = "rgba(0, 10, 20, 0.9)", e.strokeStyle = "rgba(100, 170, 255, 0.5)", e.lineWidth = 2, e.beginPath(), e.roundRect ? e.roundRect(f, m,
|
|
5120
|
-
const g = f + 16, y = m + 40, b =
|
|
5118
|
+
const c = 280, h = 100, p = 20, f = t - c - p, m = i - h - p, d = 12;
|
|
5119
|
+
e.fillStyle = "rgba(0, 10, 20, 0.9)", e.strokeStyle = "rgba(100, 170, 255, 0.5)", e.lineWidth = 2, e.beginPath(), e.roundRect ? e.roundRect(f, m, c, h, d) : e.rect(f, m, c, h), e.fill(), e.stroke(), e.fillStyle = "#44aaff", e.font = "bold 18px Arial, sans-serif", e.fillText(n.textContent || "", f + 16, m + 28);
|
|
5120
|
+
const g = f + 16, y = m + 40, b = c - 32, x = 20, v = s.style.background || "";
|
|
5121
5121
|
let _ = [];
|
|
5122
5122
|
const C = v.match(/rgba?\([^)]+\)/g);
|
|
5123
5123
|
if (C && C.length >= 2)
|
|
@@ -5137,7 +5137,7 @@ class wa {
|
|
|
5137
5137
|
const E = l.textContent || "", P = e.measureText(E).width;
|
|
5138
5138
|
e.fillText(E, g + b - P, m + 78);
|
|
5139
5139
|
}
|
|
5140
|
-
|
|
5140
|
+
u && u.textContent && (e.fillStyle = "#888888", e.font = "italic 12px Arial, sans-serif", e.fillText(u.textContent, g, m + 95));
|
|
5141
5141
|
} catch (r) {
|
|
5142
5142
|
console.warn("Failed to draw legend on canvas:", r);
|
|
5143
5143
|
}
|
|
@@ -5182,9 +5182,9 @@ class wa {
|
|
|
5182
5182
|
{ mime: "video/webm", ext: "webm" }
|
|
5183
5183
|
];
|
|
5184
5184
|
let s = "video/webm", a = "webm";
|
|
5185
|
-
for (const { mime:
|
|
5186
|
-
if (MediaRecorder.isTypeSupported(
|
|
5187
|
-
s =
|
|
5185
|
+
for (const { mime: u, ext: c } of n)
|
|
5186
|
+
if (MediaRecorder.isTypeSupported(u)) {
|
|
5187
|
+
s = u, a = c, console.log(`Video recording using: ${u}`);
|
|
5188
5188
|
break;
|
|
5189
5189
|
}
|
|
5190
5190
|
this.mediaRecorder = new MediaRecorder(r, {
|
|
@@ -5192,10 +5192,10 @@ class wa {
|
|
|
5192
5192
|
videoBitsPerSecond: 8e6
|
|
5193
5193
|
}), this.recordedChunks = [];
|
|
5194
5194
|
const l = a;
|
|
5195
|
-
this.mediaRecorder.ondataavailable = (
|
|
5196
|
-
|
|
5195
|
+
this.mediaRecorder.ondataavailable = (u) => {
|
|
5196
|
+
u.data.size > 0 && this.recordedChunks.push(u.data);
|
|
5197
5197
|
}, this.mediaRecorder.onstop = () => {
|
|
5198
|
-
const
|
|
5198
|
+
const u = s.split(";")[0], c = new Blob(this.recordedChunks, { type: u }), h = URL.createObjectURL(c);
|
|
5199
5199
|
this.downloadFile(h, `globe-${Date.now()}.${l}`), URL.revokeObjectURL(h);
|
|
5200
5200
|
}, this.mediaRecorder.onstart = () => {
|
|
5201
5201
|
this.isRecording = !0, setTimeout(() => t(), 50);
|
|
@@ -5254,10 +5254,10 @@ class wa {
|
|
|
5254
5254
|
const { fps: t = 20, filename: i } = e, r = Math.round(1e3 / t);
|
|
5255
5255
|
console.log(`Generating GIF with ${this.frames.length} frames at ${t} fps...`);
|
|
5256
5256
|
try {
|
|
5257
|
-
const n = this.frames[0], s = n.width, a = n.height, l = da(n.data, 256),
|
|
5257
|
+
const n = this.frames[0], s = n.width, a = n.height, l = da(n.data, 256), u = ya();
|
|
5258
5258
|
for (let m = 0; m < this.frames.length; m++) {
|
|
5259
5259
|
const d = this.frames[m], g = fa(d.data, l);
|
|
5260
|
-
|
|
5260
|
+
u.writeFrame(g, s, a, {
|
|
5261
5261
|
palette: m === 0 ? l : void 0,
|
|
5262
5262
|
// Only first frame needs palette
|
|
5263
5263
|
delay: r,
|
|
@@ -5265,8 +5265,8 @@ class wa {
|
|
|
5265
5265
|
// 0 = loop forever
|
|
5266
5266
|
}), m % 10 === 0 && await new Promise((y) => setTimeout(y, 0));
|
|
5267
5267
|
}
|
|
5268
|
-
|
|
5269
|
-
const
|
|
5268
|
+
u.finish();
|
|
5269
|
+
const c = u.bytes(), h = new Blob([c], { type: "image/gif" }), p = URL.createObjectURL(h), f = i || `globe-${Date.now()}.gif`;
|
|
5270
5270
|
this.downloadFile(p, f), setTimeout(() => URL.revokeObjectURL(p), 1e3), console.log(`GIF saved: ${f} (${this.frames.length} frames, ${(h.size / 1024).toFixed(1)}KB)`);
|
|
5271
5271
|
} catch (n) {
|
|
5272
5272
|
console.error("Failed to generate GIF:", n);
|
|
@@ -5475,10 +5475,10 @@ class Aa {
|
|
|
5475
5475
|
show(e) {
|
|
5476
5476
|
const t = this.element.querySelector(".gralobe-legend-title"), i = this.element.querySelector(".gralobe-legend-gradient"), r = this.element.querySelector(".gralobe-legend-min"), n = this.element.querySelector(".gralobe-legend-max"), s = this.element.querySelector(".gralobe-legend-description");
|
|
5477
5477
|
t.textContent = e.name, s.textContent = e.description;
|
|
5478
|
-
const [a, l,
|
|
5479
|
-
i.style.background = `linear-gradient(to right, ${a}, ${l}, ${
|
|
5480
|
-
const
|
|
5481
|
-
r.textContent =
|
|
5478
|
+
const [a, l, u] = e.colorScale;
|
|
5479
|
+
i.style.background = `linear-gradient(to right, ${a}, ${l}, ${u})`;
|
|
5480
|
+
const c = e.format ?? xn(e.unit);
|
|
5481
|
+
r.textContent = c(e.domain[0]), n.textContent = c(e.domain[1]), this.element.classList.add("visible"), this.visible = !0;
|
|
5482
5482
|
}
|
|
5483
5483
|
hide() {
|
|
5484
5484
|
this.element.classList.remove("visible"), this.visible = !1;
|
|
@@ -6450,8 +6450,8 @@ class $a {
|
|
|
6450
6450
|
*/
|
|
6451
6451
|
static generateSyntheticBoundary(e, t, i = 85) {
|
|
6452
6452
|
const n = [], a = i / 6371 * (180 / Math.PI), l = a / Math.cos(e * Math.PI / 180);
|
|
6453
|
-
for (let
|
|
6454
|
-
const
|
|
6453
|
+
for (let u = 0; u <= 16; u++) {
|
|
6454
|
+
const c = u / 16 * 2 * Math.PI, h = e + a * Math.sin(c), p = t + l * Math.cos(c);
|
|
6455
6455
|
n.push([p, h]);
|
|
6456
6456
|
}
|
|
6457
6457
|
return {
|
|
@@ -6479,24 +6479,24 @@ class $a {
|
|
|
6479
6479
|
);
|
|
6480
6480
|
const r = i ? [] : await this.loadBaseTopology(), n = [], s = {}, a = /* @__PURE__ */ new Set();
|
|
6481
6481
|
for (const l of e) {
|
|
6482
|
-
let
|
|
6482
|
+
let u = null;
|
|
6483
6483
|
if (!i) {
|
|
6484
|
-
for (const
|
|
6485
|
-
if (this.isPointInFeature(l,
|
|
6486
|
-
|
|
6484
|
+
for (const c of r)
|
|
6485
|
+
if (this.isPointInFeature(l, c)) {
|
|
6486
|
+
u = c;
|
|
6487
6487
|
break;
|
|
6488
6488
|
}
|
|
6489
6489
|
}
|
|
6490
|
-
if (
|
|
6491
|
-
const
|
|
6492
|
-
h && (h.id =
|
|
6490
|
+
if (u) {
|
|
6491
|
+
const c = u.properties.name_conve || u.properties.name || `ua_${Math.random()}`, h = a.has(c) ? null : JSON.parse(JSON.stringify(u));
|
|
6492
|
+
h && (h.id = c, l.name ? h.properties.name = l.name : h.properties.name || (h.properties.name = c), n.push(h), a.add(c)), s[c] = (s[c] || 0) + l.value;
|
|
6493
6493
|
} else {
|
|
6494
|
-
const
|
|
6494
|
+
const c = this.generateSyntheticBoundary(
|
|
6495
6495
|
l.lat,
|
|
6496
6496
|
l.lon,
|
|
6497
6497
|
t
|
|
6498
6498
|
);
|
|
6499
|
-
l.id && (
|
|
6499
|
+
l.id && (c.id = l.id), l.name && (c.properties.name = l.name), n.push(c), s[c.id] = l.value;
|
|
6500
6500
|
}
|
|
6501
6501
|
}
|
|
6502
6502
|
return {
|
|
@@ -6522,8 +6522,8 @@ class $a {
|
|
|
6522
6522
|
let n = !1;
|
|
6523
6523
|
const s = t[0];
|
|
6524
6524
|
for (let a = 0, l = s.length - 1; a < s.length; l = a++) {
|
|
6525
|
-
const
|
|
6526
|
-
|
|
6525
|
+
const u = s[a][0], c = s[a][1], h = s[l][0], p = s[l][1];
|
|
6526
|
+
c > r != p > r && i < (h - u) * (r - c) / (p - c) + u && (n = !n);
|
|
6527
6527
|
}
|
|
6528
6528
|
return n;
|
|
6529
6529
|
}
|
|
@@ -6542,6 +6542,8 @@ const dr = {
|
|
|
6542
6542
|
autoRotate: !1,
|
|
6543
6543
|
initialView: "globe",
|
|
6544
6544
|
showControls: !1,
|
|
6545
|
+
showDebug: !1,
|
|
6546
|
+
showToolbar: !1,
|
|
6545
6547
|
showLegend: !0,
|
|
6546
6548
|
effects: {
|
|
6547
6549
|
atmosphereIntensity: 0,
|
|
@@ -6625,14 +6627,14 @@ class Ha {
|
|
|
6625
6627
|
duration: 1
|
|
6626
6628
|
}));
|
|
6627
6629
|
}
|
|
6628
|
-
), this.config.showLegend && (this.legend = new Aa(this.container)), await this.createGlobe(), this.createStars(), this.config.effects.atmosphere && this.createAtmosphere(), this.countryLabels = new na(this.container, q), this.scene.add(this.countryLabels.getGroup()), this.globe && this.countryLabels.setGlobe(this.globe), this.countryLabels.setCamera(this.camera), this.countryLabels.setStyle(this.config.labels), this.exporter = new wa(this.renderer, this.scene, this.camera), this.legend && this.exporter.setLegendElement(this.legend.getElement()), this.countryLabels && this.exporter.setCountryLabels(this.countryLabels), this.config.showControls && this.createGUI(), this.setupInteraction(), await this.choropleth.waitForLoad();
|
|
6630
|
+
), this.config.showLegend && (this.legend = new Aa(this.container)), await this.createGlobe(), this.createStars(), this.config.effects.atmosphere && this.createAtmosphere(), this.countryLabels = new na(this.container, q), this.scene.add(this.countryLabels.getGroup()), this.globe && this.countryLabels.setGlobe(this.globe), this.countryLabels.setCamera(this.camera), this.countryLabels.setStyle(this.config.labels), this.exporter = new wa(this.renderer, this.scene, this.camera), this.legend && this.exporter.setLegendElement(this.legend.getElement()), this.countryLabels && this.exporter.setCountryLabels(this.countryLabels), this.config.showControls && this.config.showDebug && this.createGUI(), this.setupInteraction(), await this.choropleth.waitForLoad();
|
|
6629
6631
|
const i = this.choropleth.getFeatureLabels();
|
|
6630
6632
|
i.length > 0 && this.addCustomLabels(i), this.setStatistic(this.config.statistic), this.morph = this.config.initialView === "globe" ? 1 : 0, this.material && (this.material.uniforms.uMorph.value = this.morph), this.countryLabels?.setMorph(this.morph), window.addEventListener("resize", this.handleResize), document.addEventListener(
|
|
6631
6633
|
"fullscreenchange",
|
|
6632
6634
|
this.handleFullscreenChange
|
|
6633
6635
|
), this.renderer.domElement.tabIndex = 0, this.renderer.domElement.style.outline = "none", this.renderer.domElement.addEventListener("mousedown", () => {
|
|
6634
6636
|
this.renderer.domElement.focus();
|
|
6635
|
-
}), this.renderer.domElement.addEventListener("keydown", this.handleKeydown), this.animate(), this.config.showControls && (this.toolbar = new za(this.container, {
|
|
6637
|
+
}), this.renderer.domElement.addEventListener("keydown", this.handleKeydown), this.animate(), (this.config.showToolbar || this.config.showControls) && (this.toolbar = new za(this.container, {
|
|
6636
6638
|
onShowData: () => {
|
|
6637
6639
|
const n = (this.currentStatistic ? this.getStatisticMetadata(this.currentStatistic) : null)?.definition.name || "Current Data";
|
|
6638
6640
|
this.dataGrid?.show(n, this.currentValues || {});
|
|
@@ -6735,8 +6737,8 @@ class Ha {
|
|
|
6735
6737
|
createStars() {
|
|
6736
6738
|
const t = new A.BufferGeometry(), i = new Float32Array(3e3 * 3), r = new Float32Array(3e3), n = new Float32Array(3e3);
|
|
6737
6739
|
for (let a = 0; a < 3e3; a++) {
|
|
6738
|
-
const l = 300 + Math.random() * 300,
|
|
6739
|
-
i[a * 3] = l * Math.sin(
|
|
6740
|
+
const l = 300 + Math.random() * 300, u = Math.random() * Math.PI * 2, c = Math.acos(2 * Math.random() - 1);
|
|
6741
|
+
i[a * 3] = l * Math.sin(c) * Math.cos(u), i[a * 3 + 1] = l * Math.sin(c) * Math.sin(u), i[a * 3 + 2] = l * Math.cos(c), r[a] = 0.5 + Math.random() * 1.5, n[a] = Math.random() * Math.PI * 2;
|
|
6740
6742
|
}
|
|
6741
6743
|
t.setAttribute("position", new A.BufferAttribute(i, 3)), t.setAttribute("aSize", new A.BufferAttribute(r, 1)), t.setAttribute("aPhase", new A.BufferAttribute(n, 1));
|
|
6742
6744
|
const s = new A.ShaderMaterial({
|
|
@@ -6852,7 +6854,7 @@ class Ha {
|
|
|
6852
6854
|
const [f, m, d, g] = e, y = f / 180 * (t / 2), b = d / 180 * (t / 2), x = m / 90 * (i / 2), v = g / 90 * (i / 2);
|
|
6853
6855
|
r = (y + b) / 2, n = (x + v) / 2, s = (b - y) * 1.2, a = (v - x) * 1.2;
|
|
6854
6856
|
}
|
|
6855
|
-
const l = this.camera.fov * Math.PI / 180,
|
|
6857
|
+
const l = this.camera.fov * Math.PI / 180, u = this.camera.aspect, c = a / 2 / Math.tan(l / 2), h = s / (2 * Math.tan(l / 2) * u), p = Math.max(c, h);
|
|
6856
6858
|
this.controls.enabled = !1, j.to(this, {
|
|
6857
6859
|
morph: 0,
|
|
6858
6860
|
duration: 2,
|
|
@@ -6922,8 +6924,8 @@ class Ha {
|
|
|
6922
6924
|
if (n && (/* @__PURE__ */ new Date()).getTime() - s > 200) return;
|
|
6923
6925
|
const l = this.renderer.domElement.getBoundingClientRect();
|
|
6924
6926
|
if (t.x = (a.clientX - l.left) / l.width * 2 - 1, t.y = -((a.clientY - l.top) / l.height) * 2 + 1, this.morph < 0.1 && (e.setFromCamera(t, this.camera), e.ray.intersectPlane(i, r), r)) {
|
|
6925
|
-
const
|
|
6926
|
-
Math.abs(r.x) <=
|
|
6927
|
+
const u = Math.PI * q, c = Math.PI * q / 2;
|
|
6928
|
+
Math.abs(r.x) <= u && Math.abs(r.y) <= c && (j.to(this.controls.target, {
|
|
6927
6929
|
x: r.x,
|
|
6928
6930
|
y: r.y,
|
|
6929
6931
|
z: 0,
|
|
@@ -7056,25 +7058,34 @@ class Ha {
|
|
|
7056
7058
|
"#bd0026"
|
|
7057
7059
|
];
|
|
7058
7060
|
if (this.currentStatistic) {
|
|
7059
|
-
const
|
|
7060
|
-
|
|
7061
|
+
const c = this.getStatisticMetadata(this.currentStatistic);
|
|
7062
|
+
c && c.definition.colorScale && (n = c.definition.colorScale);
|
|
7061
7063
|
}
|
|
7062
7064
|
const s = Object.values(i.statistics), a = Math.max(...s, 1);
|
|
7063
|
-
|
|
7065
|
+
this.choropleth.renderCustomTexture(i.statistics, n, [
|
|
7064
7066
|
0,
|
|
7065
7067
|
a
|
|
7066
|
-
]), this.material && this.material.uniforms.uDataTexture.value && (this.material.uniforms.uDataTexture.value.needsUpdate = !0, this.material.uniforms.uDataOverlay.value = 1)
|
|
7067
|
-
|
|
7068
|
-
|
|
7068
|
+
]), this.material && this.material.uniforms.uDataTexture.value && (this.material.uniforms.uDataTexture.value.needsUpdate = !0, this.material.uniforms.uDataOverlay.value = 1);
|
|
7069
|
+
const l = {};
|
|
7070
|
+
let u = !1;
|
|
7071
|
+
if (e.forEach((c) => {
|
|
7072
|
+
if (c.name || c.label) {
|
|
7073
|
+
u = !0;
|
|
7074
|
+
const h = c.name || c.label || c.id || "Unknown";
|
|
7075
|
+
l[h] = c.value;
|
|
7076
|
+
}
|
|
7077
|
+
}), this.currentValues = u ? l : i.statistics, this.material && (this.material.uniforms.uCityLights.value = 1, this.config.effects.cityLights = !0), this.countryLabels && (this.countryLabels.getGroup().visible = !0), this.gui) {
|
|
7078
|
+
let c = this.gui.folders.find(
|
|
7079
|
+
(f) => f._title === "Display"
|
|
7069
7080
|
);
|
|
7070
|
-
if (
|
|
7071
|
-
(
|
|
7081
|
+
if (c || (c = this.gui.addFolder("Display")), !c.controllers.some(
|
|
7082
|
+
(f) => f.property === "pointRadius"
|
|
7072
7083
|
)) {
|
|
7073
|
-
const
|
|
7074
|
-
this.config.pointRadius =
|
|
7084
|
+
const f = { pointRadius: this.config.pointRadius || 140 }, m = c.add(f, "pointRadius", 10, 500, 5).name("Point Marker Radius").onChange(async (d) => {
|
|
7085
|
+
this.config.pointRadius = d, this.urbanPoints && await this.setUrbanData(this.urbanPoints);
|
|
7075
7086
|
});
|
|
7076
7087
|
this.addTooltip(
|
|
7077
|
-
|
|
7088
|
+
m,
|
|
7078
7089
|
"<b>Synthetic Geometry Radius</b><br><br>If our data consists of point locations (like cities) without defined 2D borders, we generate synthetic circular boundaries for them.<br><br>This control scales the size (in km) of these generated circles. Larger values make small cities more visible on the global map."
|
|
7079
7090
|
);
|
|
7080
7091
|
}
|