gralobe 1.0.43 → 1.0.45

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 CHANGED
@@ -268,19 +268,19 @@ var ue = {
268
268
  center: 0.5,
269
269
  edges: 0.5,
270
270
  end: 1
271
- }[n] || 0 : !o && l && (c = n[0], u = n[1]), function(f, g, p) {
272
- var d = (p || t).length, m = s[d], _, y, b, x, v, P, E, C, w;
273
- if (!m) {
271
+ }[n] || 0 : !o && l && (c = n[0], u = n[1]), function(f, m, p) {
272
+ var d = (p || t).length, g = s[d], _, y, b, x, v, P, E, C, w;
273
+ if (!g) {
274
274
  if (w = t.grid === "auto" ? 0 : (t.grid || [1, ge])[1], !w) {
275
275
  for (E = -ge; E < (E = p[w++].getBoundingClientRect().left) && w < d; )
276
276
  ;
277
277
  w < d && w--;
278
278
  }
279
- for (m = s[d] = [], _ = l ? Math.min(w, d) * c - 0.5 : n % w, y = w === ge ? 0 : l ? d * u / w - 0.5 : n / w | 0, E = 0, C = ge, P = 0; P < d; P++)
280
- b = P % w - _, x = y - (P / w | 0), m[P] = v = h ? Math.abs(h === "y" ? x : b) : Ln(b * b + x * x), v > E && (E = v), v < C && (C = v);
281
- n === "random" && Xn(m), m.max = E - C, m.min = C, m.v = d = (parseFloat(t.amount) || parseFloat(t.each) * (w > d ? d - 1 : h ? h === "y" ? d / w : w : Math.max(w, d / w)) || 0) * (n === "edges" ? -1 : 1), m.b = d < 0 ? r - d : r, m.u = X(t.amount || t.each) || 0, i = i && d < 0 ? or(i) : i;
279
+ for (g = s[d] = [], _ = l ? Math.min(w, d) * c - 0.5 : n % w, y = w === ge ? 0 : l ? d * u / w - 0.5 : n / w | 0, E = 0, C = ge, P = 0; P < d; P++)
280
+ b = P % w - _, x = y - (P / w | 0), g[P] = v = h ? Math.abs(h === "y" ? x : b) : Ln(b * b + x * x), v > E && (E = v), v < C && (C = v);
281
+ n === "random" && Xn(g), g.max = E - C, g.min = C, g.v = d = (parseFloat(t.amount) || parseFloat(t.each) * (w > d ? d - 1 : h ? h === "y" ? d / w : w : Math.max(w, d / w)) || 0) * (n === "edges" ? -1 : 1), g.b = d < 0 ? r - d : r, g.u = X(t.amount || t.each) || 0, i = i && d < 0 ? or(i) : i;
282
282
  }
283
- return d = (m[f] - m.min) / m.max || 0, H(m.b + (i ? i(d) : d) * m.v) + m.u;
283
+ return d = (g[f] - g.min) / g.max || 0, H(g.b + (i ? i(d) : d) * g.v) + g.u;
284
284
  };
285
285
  }, gi = function(e) {
286
286
  var t = Math.pow(10, ((e + "").split(".")[1] || "").length);
@@ -293,8 +293,8 @@ var ue = {
293
293
  return !i && we(e) && (n = i = e.radius || ge, e.values ? (e = _e(e.values), (r = !Te(e[0])) && (n *= n)) : e = gi(e.increment)), Ue(t, i ? G(e) ? function(s) {
294
294
  return r = e(s), Math.abs(r - s) <= n ? r : s;
295
295
  } : function(s) {
296
- for (var o = parseFloat(r ? s.x : s), l = parseFloat(r ? s.y : 0), h = ge, c = 0, u = e.length, f, g; u--; )
297
- r ? (f = e[u].x - o, g = e[u].y - l, f = f * f + g * g) : f = Math.abs(e[u] - o), f < h && (h = f, c = u);
296
+ for (var o = parseFloat(r ? s.x : s), l = parseFloat(r ? s.y : 0), h = ge, c = 0, u = e.length, f, m; u--; )
297
+ r ? (f = e[u].x - o, m = e[u].y - l, f = f * f + m * m) : f = Math.abs(e[u] - o), f < h && (h = f, c = u);
298
298
  return c = !n || h <= n ? e[c] : s, r || c === s || Te(s) ? c : c + X(s);
299
299
  } : gi(e));
300
300
  }, Jn = function(e, t, i, n) {
@@ -339,8 +339,8 @@ var ue = {
339
339
  return i + ((l - e) / s * o || 0);
340
340
  });
341
341
  }, ds = function a(e, t, i, n) {
342
- var r = isNaN(e + t) ? 0 : function(g) {
343
- return (1 - g) * e + g * t;
342
+ var r = isNaN(e + t) ? 0 : function(m) {
343
+ return (1 - m) * e + m * t;
344
344
  };
345
345
  if (!r) {
346
346
  var s = K(e), o = {}, l, h, c, u, f;
@@ -429,7 +429,7 @@ var ue = {
429
429
  }, Qt = function(e, t, i) {
430
430
  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) * O + 0.5 | 0;
431
431
  }, rr = function(e, t, i) {
432
- var n = e ? Te(e) ? [e >> 16, e >> 8 & O, e & O] : 0 : yt.black, r, s, o, l, h, c, u, f, g, p;
432
+ var n = e ? Te(e) ? [e >> 16, e >> 8 & O, e & O] : 0 : yt.black, r, s, o, l, h, c, u, f, m, p;
433
433
  if (!n) {
434
434
  if (e.substr(-1) === "," && (e = e.substr(0, e.length - 1)), yt[e])
435
435
  n = yt[e];
@@ -446,7 +446,7 @@ var ue = {
446
446
  n = e.match(hi) || yt.transparent;
447
447
  n = n.map(Number);
448
448
  }
449
- return t && !p && (r = n[0] / O, s = n[1] / O, o = n[2] / O, u = Math.max(r, s, o), f = Math.min(r, s, o), c = (u + f) / 2, u === f ? l = h = 0 : (g = u - f, h = c > 0.5 ? g / (2 - u - f) : g / (u + f), l = u === r ? (s - o) / g + (s < o ? 6 : 0) : u === s ? (o - r) / g + 2 : (r - s) / g + 4, l *= 60), n[0] = ~~(l + 0.5), n[1] = ~~(h * 100 + 0.5), n[2] = ~~(c * 100 + 0.5)), i && n.length < 4 && (n[3] = 1), n;
449
+ return t && !p && (r = n[0] / O, s = n[1] / O, o = n[2] / O, u = Math.max(r, s, o), f = Math.min(r, s, o), c = (u + f) / 2, u === f ? l = h = 0 : (m = u - f, h = c > 0.5 ? m / (2 - u - f) : m / (u + f), l = u === r ? (s - o) / m + (s < o ? 6 : 0) : u === s ? (o - r) / m + 2 : (r - s) / m + 4, l *= 60), n[0] = ~~(l + 0.5), n[1] = ~~(h * 100 + 0.5), n[2] = ~~(c * 100 + 0.5)), i && n.length < 4 && (n[3] = 1), n;
450
450
  }, sr = function(e) {
451
451
  var t = [], i = [], n = -1;
452
452
  return e.split(Oe).forEach(function(r) {
@@ -476,11 +476,11 @@ var ue = {
476
476
  if (Oe.lastIndex = 0, Oe.test(t))
477
477
  return i = ps.test(t), e[1] = en(e[1], i), e[0] = en(e[0], i, sr(e[1])), !0;
478
478
  }, Ct, he = (function() {
479
- var a = Date.now, e = 500, t = 33, i = a(), n = i, r = 1e3 / 240, s = r, o = [], l, h, c, u, f, g, p = function d(m) {
480
- var _ = a() - n, y = m === !0, b, x, v, P;
479
+ var a = Date.now, e = 500, t = 33, i = a(), n = i, r = 1e3 / 240, s = r, o = [], l, h, c, u, f, m, p = function d(g) {
480
+ var _ = a() - n, y = g === !0, b, x, v, P;
481
481
  if ((_ > e || _ < 0) && (i += _ - t), n += _, v = n - i, b = v - s, (b > 0 || y) && (P = ++u.frame, f = v - u.time * 1e3, u.time = v = v / 1e3, s += b + (b >= r ? 4 : r - b), x = 1), y || (l = h(d)), x)
482
- for (g = 0; g < o.length; g++)
483
- o[g](v, f, P, m);
482
+ for (m = 0; m < o.length; m++)
483
+ o[m](v, f, P, g);
484
484
  };
485
485
  return u = {
486
486
  time: 0,
@@ -488,31 +488,31 @@ var ue = {
488
488
  tick: function() {
489
489
  p(!0);
490
490
  },
491
- deltaRatio: function(m) {
492
- return f / (1e3 / (m || 60));
491
+ deltaRatio: function(g) {
492
+ return f / (1e3 / (g || 60));
493
493
  },
494
494
  wake: function() {
495
- Un && (!ci && Ti() && (be = ci = window, Si = be.document || {}, de.gsap = ae, (be.gsapVersions || (be.gsapVersions = [])).push(ae.version), zn(Bt || be.GreenSockGlobals || !be.gsap && be || {}), ir.forEach(nr)), c = typeof requestAnimationFrame < "u" && requestAnimationFrame, l && u.sleep(), h = c || function(m) {
496
- return setTimeout(m, s - u.time * 1e3 + 1 | 0);
495
+ Un && (!ci && Ti() && (be = ci = window, Si = be.document || {}, de.gsap = ae, (be.gsapVersions || (be.gsapVersions = [])).push(ae.version), zn(Bt || be.GreenSockGlobals || !be.gsap && be || {}), ir.forEach(nr)), c = typeof requestAnimationFrame < "u" && requestAnimationFrame, l && u.sleep(), h = c || function(g) {
496
+ return setTimeout(g, s - u.time * 1e3 + 1 | 0);
497
497
  }, Ct = 1, p(2));
498
498
  },
499
499
  sleep: function() {
500
500
  (c ? cancelAnimationFrame : clearTimeout)(l), Ct = 0, h = wt;
501
501
  },
502
- lagSmoothing: function(m, _) {
503
- e = m || 1 / 0, t = Math.min(_ || 33, e);
502
+ lagSmoothing: function(g, _) {
503
+ e = g || 1 / 0, t = Math.min(_ || 33, e);
504
504
  },
505
- fps: function(m) {
506
- r = 1e3 / (m || 240), s = u.time * 1e3 + r;
505
+ fps: function(g) {
506
+ r = 1e3 / (g || 240), s = u.time * 1e3 + r;
507
507
  },
508
- add: function(m, _, y) {
508
+ add: function(g, _, y) {
509
509
  var b = _ ? function(x, v, P, E) {
510
- m(x, v, P, E), u.remove(b);
511
- } : m;
512
- return u.remove(m), o[y ? "unshift" : "push"](b), ut(), b;
510
+ g(x, v, P, E), u.remove(b);
511
+ } : g;
512
+ return u.remove(g), o[y ? "unshift" : "push"](b), ut(), b;
513
513
  },
514
- remove: function(m, _) {
515
- ~(_ = o.indexOf(m)) && o.splice(_, 1) && g >= _ && g--;
514
+ remove: function(g, _) {
515
+ ~(_ = o.indexOf(g)) && o.splice(_, 1) && m >= _ && m--;
516
516
  },
517
517
  _listeners: o
518
518
  }, u;
@@ -772,14 +772,14 @@ var J = /* @__PURE__ */ (function(a) {
772
772
  }, t.staggerFromTo = function(n, r, s, o, l, h, c, u) {
773
773
  return o.startAt = s, bt(o).immediateRender = ie(o.immediateRender), this.staggerTo(n, r, o, l, h, c, u);
774
774
  }, t.render = function(n, r, s) {
775
- var o = this._time, l = this._dirty ? this.totalDuration() : this._tDur, h = this._dur, c = n <= 0 ? 0 : H(n), u = this._zTime < 0 != n < 0 && (this._initted || !h), f, g, p, d, m, _, y, b, x, v, P, E;
775
+ var o = this._time, l = this._dirty ? this.totalDuration() : this._tDur, h = this._dur, c = n <= 0 ? 0 : H(n), u = this._zTime < 0 != n < 0 && (this._initted || !h), f, m, p, d, g, _, y, b, x, v, P, E;
776
776
  if (this !== N && c > l && n >= 0 && (c = l), c !== this._tTime || s || u) {
777
777
  if (o !== this._time && h && (c += this._time - o, n += this._time - o), f = c, x = this._start, b = this._ts, _ = !b, u && (h || (o = this._zTime), (n || !r) && (this._zTime = n)), this._repeat) {
778
- if (P = this._yoyo, m = h + this._rDelay, this._repeat < -1 && n < 0)
779
- return this.totalTime(m * 100 + n, r, s);
780
- if (f = H(c % m), c === l ? (d = this._repeat, f = h) : (v = H(c / m), d = ~~v, d && d === v && (f = h, d--), f > h && (f = h)), v = ht(this._tTime, m), !o && this._tTime && v !== d && this._tTime - v * m - this._dur <= 0 && (v = d), P && d & 1 && (f = h - f, E = 1), d !== v && !this._lock) {
778
+ if (P = this._yoyo, g = h + this._rDelay, this._repeat < -1 && n < 0)
779
+ return this.totalTime(g * 100 + n, r, s);
780
+ if (f = H(c % g), c === l ? (d = this._repeat, f = h) : (v = H(c / g), d = ~~v, d && d === v && (f = h, d--), f > h && (f = h)), v = ht(this._tTime, g), !o && this._tTime && v !== d && this._tTime - v * g - this._dur <= 0 && (v = d), P && d & 1 && (f = h - f, E = 1), d !== v && !this._lock) {
781
781
  var C = P && v & 1, w = C === (P && d & 1);
782
- if (d < v && (C = !C), o = C ? 0 : c % h ? h : c, this._lock = 1, this.render(o || (E ? 0 : H(d * m)), r, !h)._lock = 0, this._tTime = c, !r && this.parent && ce(this, "onRepeat"), this.vars.repeatRefresh && !E && (this.invalidate()._lock = 1), o && o !== this._time || _ !== !this._ts || this.vars.onRepeat && !this.parent && !this._act)
782
+ if (d < v && (C = !C), o = C ? 0 : c % h ? h : c, this._lock = 1, this.render(o || (E ? 0 : H(d * g)), r, !h)._lock = 0, this._tTime = c, !r && this.parent && ce(this, "onRepeat"), this.vars.repeatRefresh && !E && (this.invalidate()._lock = 1), o && o !== this._time || _ !== !this._ts || this.vars.onRepeat && !this.parent && !this._act)
783
783
  return this;
784
784
  if (h = this._dur, l = this._tDur, w && (this._lock = 2, o = C ? h : -1e-4, this.render(o, !0), this.vars.repeatRefresh && !E && this.invalidate()), this._lock = 0, !this._ts && !_)
785
785
  return this;
@@ -789,29 +789,29 @@ var J = /* @__PURE__ */ (function(a) {
789
789
  if (this._hasPause && !this._forcing && this._lock < 2 && (y = ns(this, H(o), H(f)), y && (c -= f - (f = y._start))), this._tTime = c, this._time = f, this._act = !b, this._initted || (this._onUpdate = this.vars.onUpdate, this._initted = 1, this._zTime = n, o = 0), !o && c && !r && !v && (ce(this, "onStart"), this._tTime !== c))
790
790
  return this;
791
791
  if (f >= o && n >= 0)
792
- for (g = this._first; g; ) {
793
- if (p = g._next, (g._act || f >= g._start) && g._ts && y !== g) {
794
- if (g.parent !== this)
792
+ for (m = this._first; m; ) {
793
+ if (p = m._next, (m._act || f >= m._start) && m._ts && y !== m) {
794
+ if (m.parent !== this)
795
795
  return this.render(n, r, s);
796
- if (g.render(g._ts > 0 ? (f - g._start) * g._ts : (g._dirty ? g.totalDuration() : g._tDur) + (f - g._start) * g._ts, r, s), f !== this._time || !this._ts && !_) {
796
+ if (m.render(m._ts > 0 ? (f - m._start) * m._ts : (m._dirty ? m.totalDuration() : m._tDur) + (f - m._start) * m._ts, r, s), f !== this._time || !this._ts && !_) {
797
797
  y = 0, p && (c += this._zTime = -k);
798
798
  break;
799
799
  }
800
800
  }
801
- g = p;
801
+ m = p;
802
802
  }
803
803
  else {
804
- g = this._last;
805
- for (var S = n < 0 ? n : f; g; ) {
806
- if (p = g._prev, (g._act || S <= g._end) && g._ts && y !== g) {
807
- if (g.parent !== this)
804
+ m = this._last;
805
+ for (var S = n < 0 ? n : f; m; ) {
806
+ if (p = m._prev, (m._act || S <= m._end) && m._ts && y !== m) {
807
+ if (m.parent !== this)
808
808
  return this.render(n, r, s);
809
- if (g.render(g._ts > 0 ? (S - g._start) * g._ts : (g._dirty ? g.totalDuration() : g._tDur) + (S - g._start) * g._ts, r, s || W && Ii(g)), f !== this._time || !this._ts && !_) {
809
+ if (m.render(m._ts > 0 ? (S - m._start) * m._ts : (m._dirty ? m.totalDuration() : m._tDur) + (S - m._start) * m._ts, r, s || W && Ii(m)), f !== this._time || !this._ts && !_) {
810
810
  y = 0, p && (c += this._zTime = S ? -k : k);
811
811
  break;
812
812
  }
813
813
  }
814
- g = p;
814
+ m = p;
815
815
  }
816
816
  }
817
817
  if (y && !r && (this.pause(), y.render(f >= o ? 0 : -k)._zTime = f >= o ? 1 : -1, this._ts))
@@ -868,7 +868,7 @@ var J = /* @__PURE__ */ (function(a) {
868
868
  return s;
869
869
  }, t.tweenTo = function(n, r) {
870
870
  r = r || {};
871
- var s = this, o = me(s, n), l = r, h = l.startAt, c = l.onStart, u = l.onStartParams, f = l.immediateRender, g, p = j.to(s, pe({
871
+ var s = this, o = me(s, n), l = r, h = l.startAt, c = l.onStart, u = l.onStartParams, f = l.immediateRender, m, p = j.to(s, pe({
872
872
  ease: r.ease || "none",
873
873
  lazy: !1,
874
874
  immediateRender: !1,
@@ -876,9 +876,9 @@ var J = /* @__PURE__ */ (function(a) {
876
876
  overwrite: "auto",
877
877
  duration: r.duration || Math.abs((o - (h && "time" in h ? h.time : s._time)) / s.timeScale()) || k,
878
878
  onStart: function() {
879
- if (s.pause(), !g) {
880
- var m = r.duration || Math.abs((o - (h && "time" in h ? h.time : s._time)) / s.timeScale());
881
- p._dur !== m && ct(p, m, 0, 1).render(p._time, !0, !0), g = 1;
879
+ if (s.pause(), !m) {
880
+ var g = r.duration || Math.abs((o - (h && "time" in h ? h.time : s._time)) / s.timeScale());
881
+ p._dur !== g && ct(p, g, 0, 1).render(p._time, !0, !0), m = 1;
882
882
  }
883
883
  c && c.apply(p, u || []);
884
884
  }
@@ -944,22 +944,22 @@ pe(J.prototype, {
944
944
  _forcing: 0
945
945
  });
946
946
  var bs = function(e, t, i, n, r, s, o) {
947
- var l = new re(this._pt, e, t, 0, 1, gr, null, r), h = 0, c = 0, u, f, g, p, d, m, _, y;
947
+ var l = new re(this._pt, e, t, 0, 1, gr, null, r), h = 0, c = 0, u, f, m, p, d, g, _, y;
948
948
  for (l.b = i, l.e = n, i += "", n += "", (_ = ~n.indexOf("random(")) && (n = Pt(n)), s && (y = [i, n], s(y, e, t), i = y[0], n = y[1]), f = i.match(Xt) || []; u = Xt.exec(n); )
949
- p = u[0], d = n.substring(h, u.index), g ? g = (g + 1) % 5 : d.substr(-5) === "rgba(" && (g = 1), p !== f[c++] && (m = parseFloat(f[c - 1]) || 0, l._pt = {
949
+ p = u[0], d = n.substring(h, u.index), m ? m = (m + 1) % 5 : d.substr(-5) === "rgba(" && (m = 1), p !== f[c++] && (g = parseFloat(f[c - 1]) || 0, l._pt = {
950
950
  _next: l._pt,
951
951
  p: d || c === 1 ? d : ",",
952
952
  //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.
953
- s: m,
954
- c: p.charAt(1) === "=" ? rt(m, p) - m : parseFloat(p) - m,
955
- m: g && g < 4 ? Math.round : 0
953
+ s: g,
954
+ c: p.charAt(1) === "=" ? rt(g, p) - g : parseFloat(p) - g,
955
+ m: m && m < 4 ? Math.round : 0
956
956
  }, h = Xt.lastIndex);
957
957
  return l.c = h < n.length ? n.substring(h, n.length) : "", l.fp = o, (kn.test(n) || _) && (l.e = 0), this._pt = l, l;
958
958
  }, Oi = function(e, t, i, n, r, s, o, l, h, c) {
959
959
  G(n) && (n = n(r || 0, e, s));
960
- var u = e[t], f = i !== "get" ? i : G(u) ? h ? e[t.indexOf("set") || !G(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](h) : e[t]() : u, g = G(u) ? h ? Ps : fr : Fi, p;
960
+ var u = e[t], f = i !== "get" ? i : G(u) ? h ? e[t.indexOf("set") || !G(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](h) : e[t]() : u, m = G(u) ? h ? Ps : fr : Fi, p;
961
961
  if (K(n) && (~n.indexOf("random(") && (n = Pt(n)), n.charAt(1) === "=" && (p = rt(f, n) + (X(f) || 0), (p || p === 0) && (n = p))), !c || f !== n || _i)
962
- return !isNaN(f * n) && n !== "" ? (p = new re(this._pt, e, t, +f || 0, n - (f || 0), typeof u == "boolean" ? As : mr, 0, g), h && (p.fp = h), o && p.modifier(o, this, e), this._pt = p) : (!u && !(t in e) && Mi(t, n), bs.call(this, e, t, f, n, g, l || ue.stringFilter, h));
962
+ return !isNaN(f * n) && n !== "" ? (p = new re(this._pt, e, t, +f || 0, n - (f || 0), typeof u == "boolean" ? As : mr, 0, m), h && (p.fp = h), o && p.modifier(o, this, e), this._pt = p) : (!u && !(t in e) && Mi(t, n), bs.call(this, e, t, f, n, m, l || ue.stringFilter, h));
963
963
  }, xs = function(e, t, i, n, r) {
964
964
  if (G(e) && (e = vt(e, r, t, i, n)), !we(e) || e.style && e.nodeType || q(e) || In(e))
965
965
  return K(e) ? vt(e, r, t, i, n) : e;
@@ -974,10 +974,10 @@ var bs = function(e, t, i, n, r, s, o) {
974
974
  h[o._props[c]] = l;
975
975
  return o;
976
976
  }, Me, _i, ki = function a(e, t, i) {
977
- var n = e.vars, r = n.ease, s = n.startAt, o = n.immediateRender, l = n.lazy, h = n.onUpdate, c = n.runBackwards, u = n.yoyoEase, f = n.keyframes, g = n.autoRevert, p = e._dur, d = e._startAt, m = e._targets, _ = e.parent, y = _ && _.data === "nested" ? _.vars.targets : m, b = e._overwrite === "auto" && !Ci, x = e.timeline, v, P, E, C, w, S, D, T, R, L, $, U, F;
977
+ var n = e.vars, r = n.ease, s = n.startAt, o = n.immediateRender, l = n.lazy, h = n.onUpdate, c = n.runBackwards, u = n.yoyoEase, f = n.keyframes, m = n.autoRevert, p = e._dur, d = e._startAt, g = e._targets, _ = e.parent, y = _ && _.data === "nested" ? _.vars.targets : g, b = e._overwrite === "auto" && !Ci, x = e.timeline, v, P, E, C, w, S, D, T, R, L, $, U, F;
978
978
  if (x && (!f || !r) && (r = "none"), e._ease = Ze(r, ot.ease), e._yEase = u ? or(Ze(u === !0 ? r : u, ot.ease)) : 0, u && e._yoyo && !e._repeat && (u = e._yEase, e._yEase = e._ease, e._ease = u), e._from = !x && !!n.runBackwards, !x || f && !n.stagger) {
979
- if (T = m[0] ? He(m[0]).harness : 0, U = T && n[T.prop], v = Gt(n, Di), d && (d._zTime < 0 && d.progress(1), t < 0 && c && o && !g ? d.render(-1, !0) : d.revert(c && p ? Ft : Kr), d._lazy = 0), s) {
980
- if (ke(e._startAt = j.set(m, pe({
979
+ if (T = g[0] ? He(g[0]).harness : 0, U = T && n[T.prop], v = Gt(n, Di), d && (d._zTime < 0 && d.progress(1), t < 0 && c && o && !m ? d.render(-1, !0) : d.revert(c && p ? Ft : Kr), d._lazy = 0), s) {
980
+ if (ke(e._startAt = j.set(g, pe({
981
981
  data: "isStart",
982
982
  overwrite: !1,
983
983
  parent: _,
@@ -989,7 +989,7 @@ var bs = function(e, t, i, n, r, s, o) {
989
989
  return ce(e, "onUpdate");
990
990
  },
991
991
  stagger: 0
992
- }, s))), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (W || !o && !g) && e._startAt.revert(Ft), o && p && t <= 0 && i <= 0) {
992
+ }, s))), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (W || !o && !m) && e._startAt.revert(Ft), o && p && t <= 0 && i <= 0) {
993
993
  t && (e._zTime = t);
994
994
  return;
995
995
  }
@@ -1004,13 +1004,13 @@ var bs = function(e, t, i, n, r, s, o) {
1004
1004
  stagger: 0,
1005
1005
  parent: _
1006
1006
  //ensures that nested tweens that had a stagger are handled properly, like gsap.from(".class", {y: gsap.utils.wrap([-100,100]), stagger: 0.5})
1007
- }, v), U && (E[T.prop] = U), ke(e._startAt = j.set(m, E)), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (W ? e._startAt.revert(Ft) : e._startAt.render(-1, !0)), e._zTime = t, !o)
1007
+ }, v), U && (E[T.prop] = U), ke(e._startAt = j.set(g, E)), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (W ? e._startAt.revert(Ft) : e._startAt.render(-1, !0)), e._zTime = t, !o)
1008
1008
  a(e._startAt, k, k);
1009
1009
  else if (!t)
1010
1010
  return;
1011
1011
  }
1012
- for (e._pt = e._ptCache = 0, l = p && ie(l) || l && !p, P = 0; P < m.length; P++) {
1013
- if (w = m[P], D = w._gsap || Li(m)[P]._gsap, e._ptLookup[P] = L = {}, ui[D.id] && Ie.length && $t(), $ = y === m ? P : y.indexOf(w), T && (R = new T()).init(w, U || v, e, $, y) !== !1 && (e._pt = C = new re(e._pt, w, R.name, 0, 1, R.render, R, 0, R.priority), R._props.forEach(function(ee) {
1012
+ for (e._pt = e._ptCache = 0, l = p && ie(l) || l && !p, P = 0; P < g.length; P++) {
1013
+ if (w = g[P], D = w._gsap || Li(g)[P]._gsap, e._ptLookup[P] = L = {}, ui[D.id] && Ie.length && $t(), $ = y === g ? P : y.indexOf(w), T && (R = new T()).init(w, U || v, e, $, y) !== !1 && (e._pt = C = new re(e._pt, w, R.name, 0, 1, R.render, R, 0, R.priority), R._props.forEach(function(ee) {
1014
1014
  L[ee] = C;
1015
1015
  }), R.priority && (S = 1)), !T || U)
1016
1016
  for (E in v)
@@ -1021,18 +1021,18 @@ var bs = function(e, t, i, n, r, s, o) {
1021
1021
  }
1022
1022
  e._onUpdate = h, e._initted = (!e._op || e._pt) && !F, f && t <= 0 && x.render(ge, !0, !0);
1023
1023
  }, vs = function(e, t, i, n, r, s, o, l) {
1024
- var h = (e._pt && e._ptCache || (e._ptCache = {}))[t], c, u, f, g;
1024
+ var h = (e._pt && e._ptCache || (e._ptCache = {}))[t], c, u, f, m;
1025
1025
  if (!h)
1026
- for (h = e._ptCache[t] = [], f = e._ptLookup, g = e._targets.length; g--; ) {
1027
- if (c = f[g][t], c && c.d && c.d._pt)
1026
+ for (h = e._ptCache[t] = [], f = e._ptLookup, m = e._targets.length; m--; ) {
1027
+ if (c = f[m][t], c && c.d && c.d._pt)
1028
1028
  for (c = c.d._pt; c && c.p !== t && c.fp !== t; )
1029
1029
  c = c._next;
1030
1030
  if (!c)
1031
1031
  return _i = 1, e.vars[t] = "+=0", ki(e, o), _i = 0, l ? Et(t + " not eligible for reset") : 1;
1032
1032
  h.push(c);
1033
1033
  }
1034
- for (g = h.length; g--; )
1035
- u = h[g], c = u._pt || u, c.s = (n || n === 0) && !r ? n : c.s + (n || 0) + s * c.c, c.c = i - c.s, u.e && (u.e = V(i) + X(u.e)), u.b && (u.b = c.s + X(u.b));
1034
+ for (m = h.length; m--; )
1035
+ u = h[m], c = u._pt || u, c.s = (n || n === 0) && !r ? n : c.s + (n || 0) + s * c.c, c.c = i - c.s, u.e && (u.e = V(i) + X(u.e)), u.b && (u.b = c.s + X(u.b));
1036
1036
  }, Es = function(e, t) {
1037
1037
  var i = e[0] ? He(e[0]).harness : 0, n = i && i.aliases, r, s, o, l;
1038
1038
  if (!n)
@@ -1071,8 +1071,8 @@ var j = /* @__PURE__ */ (function(a) {
1071
1071
  function e(i, n, r, s) {
1072
1072
  var o;
1073
1073
  typeof n == "number" && (r.duration = n, n = r, r = null), o = a.call(this, s ? n : bt(n)) || this;
1074
- var l = o.vars, h = l.duration, c = l.delay, u = l.immediateRender, f = l.stagger, g = l.overwrite, p = l.keyframes, d = l.defaults, m = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || N, b = (q(i) || In(i) ? Te(i[0]) : "length" in n) ? [i] : _e(i), x, v, P, E, C, w, S, D;
1075
- if (o._targets = b.length ? Li(b) : Et("GSAP target " + i + " not found. https://gsap.com", !ue.nullTargetWarn) || [], o._ptLookup = [], o._overwrite = g, p || f || Rt(h) || Rt(c)) {
1074
+ var l = o.vars, h = l.duration, c = l.delay, u = l.immediateRender, f = l.stagger, m = l.overwrite, p = l.keyframes, d = l.defaults, g = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || N, b = (q(i) || In(i) ? Te(i[0]) : "length" in n) ? [i] : _e(i), x, v, P, E, C, w, S, D;
1075
+ if (o._targets = b.length ? Li(b) : Et("GSAP target " + i + " not found. https://gsap.com", !ue.nullTargetWarn) || [], o._ptLookup = [], o._overwrite = m, p || f || Rt(h) || Rt(c)) {
1076
1076
  if (n = o.vars, x = o.timeline = new J({
1077
1077
  data: "nested",
1078
1078
  defaults: d || {},
@@ -1113,34 +1113,34 @@ var j = /* @__PURE__ */ (function(a) {
1113
1113
  h || o.duration(h = x.duration());
1114
1114
  } else
1115
1115
  o.timeline = 0;
1116
- return g === !0 && !Ci && (Me = Ce(o), N.killTweensOf(b), Me = 0), xe(y, Ce(o), r), n.reversed && o.reverse(), n.paused && o.paused(!0), (u || !h && !p && o._start === H(y._time) && ie(u) && es(Ce(o)) && y.data !== "nested") && (o._tTime = -k, o.render(Math.max(0, -c) || 0)), m && Zn(Ce(o), m), o;
1116
+ return m === !0 && !Ci && (Me = Ce(o), N.killTweensOf(b), Me = 0), xe(y, Ce(o), r), n.reversed && o.reverse(), n.paused && o.paused(!0), (u || !h && !p && o._start === H(y._time) && ie(u) && es(Ce(o)) && y.data !== "nested") && (o._tTime = -k, o.render(Math.max(0, -c) || 0)), g && Zn(Ce(o), g), o;
1117
1117
  }
1118
1118
  var t = e.prototype;
1119
1119
  return t.render = function(n, r, s) {
1120
- var o = this._time, l = this._tDur, h = this._dur, c = n < 0, u = n > l - k && !c ? l : n < k ? 0 : n, f, g, p, d, m, _, y, b, x;
1120
+ var o = this._time, l = this._tDur, h = this._dur, c = n < 0, u = n > l - k && !c ? l : n < k ? 0 : n, f, m, p, d, g, _, y, b, x;
1121
1121
  if (!h)
1122
1122
  is(this, n, r, s);
1123
1123
  else if (u !== this._tTime || !n || s || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== c || this._lazy) {
1124
1124
  if (f = u, b = this.timeline, this._repeat) {
1125
1125
  if (d = h + this._rDelay, this._repeat < -1 && c)
1126
1126
  return this.totalTime(d * 100 + n, r, s);
1127
- if (f = H(u % d), u === l ? (p = this._repeat, f = h) : (m = H(u / d), p = ~~m, p && p === m ? (f = h, p--) : f > h && (f = h)), _ = this._yoyo && p & 1, _ && (x = this._yEase, f = h - f), m = ht(this._tTime, d), f === o && !s && this._initted && p === m)
1127
+ if (f = H(u % d), u === l ? (p = this._repeat, f = h) : (g = H(u / d), p = ~~g, p && p === g ? (f = h, p--) : f > h && (f = h)), _ = this._yoyo && p & 1, _ && (x = this._yEase, f = h - f), g = ht(this._tTime, d), f === o && !s && this._initted && p === g)
1128
1128
  return this._tTime = u, this;
1129
- p !== m && (b && this._yEase && lr(b, _), this.vars.repeatRefresh && !_ && !this._lock && f !== d && this._initted && (this._lock = s = 1, this.render(H(d * p), !0).invalidate()._lock = 0));
1129
+ p !== g && (b && this._yEase && lr(b, _), this.vars.repeatRefresh && !_ && !this._lock && f !== d && this._initted && (this._lock = s = 1, this.render(H(d * p), !0).invalidate()._lock = 0));
1130
1130
  }
1131
1131
  if (!this._initted) {
1132
1132
  if (Kn(this, c ? n : f, s, r, u))
1133
1133
  return this._tTime = 0, this;
1134
- if (o !== this._time && !(s && this.vars.repeatRefresh && p !== m))
1134
+ if (o !== this._time && !(s && this.vars.repeatRefresh && p !== g))
1135
1135
  return this;
1136
1136
  if (h !== this._dur)
1137
1137
  return this.render(n, r, s);
1138
1138
  }
1139
- if (this._tTime = u, this._time = f, !this._act && this._ts && (this._act = 1, this._lazy = 0), this.ratio = y = (x || this._ease)(f / h), this._from && (this.ratio = y = 1 - y), !o && u && !r && !m && (ce(this, "onStart"), this._tTime !== u))
1139
+ if (this._tTime = u, this._time = f, !this._act && this._ts && (this._act = 1, this._lazy = 0), this.ratio = y = (x || this._ease)(f / h), this._from && (this.ratio = y = 1 - y), !o && u && !r && !g && (ce(this, "onStart"), this._tTime !== u))
1140
1140
  return this;
1141
- for (g = this._pt; g; )
1142
- g.r(y, g.d), g = g._next;
1143
- b && b.render(n < 0 ? n : b._dur * b._ease(f / this._dur), r, s) || this._startAt && (this._zTime = n), this._onUpdate && !r && (c && di(this, n, r, s), ce(this, "onUpdate")), this._repeat && p !== m && this.vars.onRepeat && !r && this.parent && ce(this, "onRepeat"), (u === this._tDur || !u) && this._tTime === u && (c && !this._onUpdate && di(this, n, !0, !0), (n || !h) && (u === this._tDur && this._ts > 0 || !u && this._ts < 0) && ke(this, 1), !r && !(c && !o) && (u || o || _) && (ce(this, u === l ? "onComplete" : "onReverseComplete", !0), this._prom && !(u < l && this.timeScale() > 0) && this._prom()));
1141
+ for (m = this._pt; m; )
1142
+ m.r(y, m.d), m = m._next;
1143
+ b && b.render(n < 0 ? n : b._dur * b._ease(f / this._dur), r, s) || this._startAt && (this._zTime = n), this._onUpdate && !r && (c && di(this, n, r, s), ce(this, "onUpdate")), this._repeat && p !== g && this.vars.onRepeat && !r && this.parent && ce(this, "onRepeat"), (u === this._tDur || !u) && this._tTime === u && (c && !this._onUpdate && di(this, n, !0, !0), (n || !h) && (u === this._tDur && this._ts > 0 || !u && this._ts < 0) && ke(this, 1), !r && !(c && !o) && (u || o || _) && (ce(this, u === l ? "onComplete" : "onReverseComplete", !0), this._prom && !(u < l && this.timeScale() > 0) && this._prom()));
1144
1144
  }
1145
1145
  return this;
1146
1146
  }, t.targets = function() {
@@ -1158,16 +1158,16 @@ var j = /* @__PURE__ */ (function(a) {
1158
1158
  var s = this.timeline.totalDuration();
1159
1159
  return this.timeline.killTweensOf(n, r, Me && Me.vars.overwrite !== !0)._first || _t(this), this.parent && s !== this.timeline.totalDuration() && ct(this, this._dur * this.timeline._tDur / s, 0, 1), this;
1160
1160
  }
1161
- var o = this._targets, l = n ? _e(n) : o, h = this._ptLookup, c = this._pt, u, f, g, p, d, m, _;
1161
+ var o = this._targets, l = n ? _e(n) : o, h = this._ptLookup, c = this._pt, u, f, m, p, d, g, _;
1162
1162
  if ((!r || r === "all") && Qr(o, l))
1163
1163
  return r === "all" && (this._pt = 0), _t(this);
1164
1164
  for (u = this._op = this._op || [], r !== "all" && (K(r) && (d = {}, ne(r, function(y) {
1165
1165
  return d[y] = 1;
1166
1166
  }), r = d), r = Es(o, r)), _ = o.length; _--; )
1167
1167
  if (~l.indexOf(o[_])) {
1168
- f = h[_], r === "all" ? (u[_] = r, p = f, g = {}) : (g = u[_] = u[_] || {}, p = r);
1168
+ f = h[_], r === "all" ? (u[_] = r, p = f, m = {}) : (m = u[_] = u[_] || {}, p = r);
1169
1169
  for (d in p)
1170
- m = f && f[d], m && ((!("kill" in m.d) || m.d.kill(d) === !0) && Zt(this, m, "_pt"), delete f[d]), g !== "all" && (g[d] = 1);
1170
+ g = f && f[d], g && ((!("kill" in g.d) || g.d.kill(d) === !0) && Zt(this, g, "_pt"), delete f[d]), m !== "all" && (m[d] = 1);
1171
1171
  }
1172
1172
  return this._initted && !this._pt && c && _t(this), this;
1173
1173
  }, e.to = function(n, r) {
@@ -1720,19 +1720,19 @@ var nn, De, st, Ni, Ve, rn, Bi, ks = function() {
1720
1720
  grid: 1,
1721
1721
  flex: 1
1722
1722
  }, Fe = function a(e, t, i, n) {
1723
- var r = parseFloat(i) || 0, s = (i + "").trim().substr((r + "").length) || "px", o = Ve.style, l = Fs.test(t), h = e.tagName.toLowerCase() === "svg", c = (h ? "client" : "offset") + (l ? "Width" : "Height"), u = 100, f = n === "px", g = n === "%", p, d, m, _;
1723
+ var r = parseFloat(i) || 0, s = (i + "").trim().substr((r + "").length) || "px", o = Ve.style, l = Fs.test(t), h = e.tagName.toLowerCase() === "svg", c = (h ? "client" : "offset") + (l ? "Width" : "Height"), u = 100, f = n === "px", m = n === "%", p, d, g, _;
1724
1724
  if (n === s || !r || hn[n] || hn[s])
1725
1725
  return r;
1726
- if (s !== "px" && !f && (r = a(e, t, i, "px")), _ = e.getCTM && Cr(e), (g || s === "%") && (Se[t] || ~t.indexOf("adius")))
1727
- return p = _ ? e.getBBox()[l ? "width" : "height"] : e[c], V(g ? r / p * u : r / 100 * p);
1728
- if (o[l ? "width" : "height"] = u + (f ? s : n), d = n !== "rem" && ~t.indexOf("adius") || n === "em" && e.appendChild && !h ? e : e.parentNode, _ && (d = (e.ownerSVGElement || {}).parentNode), (!d || d === De || !d.appendChild) && (d = De.body), m = d._gsap, m && g && m.width && l && m.time === he.time && !m.uncache)
1729
- return V(r / m.width * u);
1730
- if (g && (t === "height" || t === "width")) {
1726
+ if (s !== "px" && !f && (r = a(e, t, i, "px")), _ = e.getCTM && Cr(e), (m || s === "%") && (Se[t] || ~t.indexOf("adius")))
1727
+ return p = _ ? e.getBBox()[l ? "width" : "height"] : e[c], V(m ? r / p * u : r / 100 * p);
1728
+ if (o[l ? "width" : "height"] = u + (f ? s : n), d = n !== "rem" && ~t.indexOf("adius") || n === "em" && e.appendChild && !h ? e : e.parentNode, _ && (d = (e.ownerSVGElement || {}).parentNode), (!d || d === De || !d.appendChild) && (d = De.body), g = d._gsap, g && m && g.width && l && g.time === he.time && !g.uncache)
1729
+ return V(r / g.width * u);
1730
+ if (m && (t === "height" || t === "width")) {
1731
1731
  var y = e.style[t];
1732
1732
  e.style[t] = u + n, p = e[c], y ? e.style[t] = y : We(e, t);
1733
1733
  } else
1734
- (g || s === "%") && !Ws[ye(d, "display")] && (o.position = ye(e, "position")), d === e && (o.position = "static"), d.appendChild(Ve), p = Ve[c], d.removeChild(Ve), o.position = "absolute";
1735
- return l && g && (m = He(d), m.time = he.time, m.width = d[c]), V(f ? p * r / u : p && r ? u / p * r : 0);
1734
+ (m || s === "%") && !Ws[ye(d, "display")] && (o.position = ye(e, "position")), d === e && (o.position = "static"), d.appendChild(Ve), p = Ve[c], d.removeChild(Ve), o.position = "absolute";
1735
+ return l && m && (g = He(d), g.time = he.time, g.width = d[c]), V(f ? p * r / u : p && r ? u / p * r : 0);
1736
1736
  }, Ae = function(e, t, i, n) {
1737
1737
  var r;
1738
1738
  return Ni || vi(), t in ve && t !== "transform" && (t = ve[t], ~t.indexOf(",") && (t = t.split(",")[0])), Se[t] && t !== "transform" ? (r = St(e, n), r = t !== "transformOrigin" ? r[t] : r.svg ? r.origin : Yt(ye(e, se)) + " " + r.zOrigin + "px") : (r = e.style[t], (!r || r === "auto" || n || ~(r + "").indexOf("calc(")) && (r = Ht[t] && Ht[t](e, t, i) || ye(e, t) || $n(e, t) || (t === "opacity" ? 1 : 0))), i && !~(r + "").trim().indexOf(" ") ? Fe(e, t, r, i) + i : r;
@@ -1741,15 +1741,15 @@ var nn, De, st, Ni, Ve, rn, Bi, ks = function() {
1741
1741
  var r = dt(t, e, 1), s = r && ye(e, r, 1);
1742
1742
  s && s !== i ? (t = r, i = s) : t === "borderColor" && (i = ye(e, "borderTopColor"));
1743
1743
  }
1744
- var o = new re(this._pt, e.style, t, 0, 1, gr), l = 0, h = 0, c, u, f, g, p, d, m, _, y, b, x, v;
1744
+ var o = new re(this._pt, e.style, t, 0, 1, gr), l = 0, h = 0, c, u, f, m, p, d, g, _, y, b, x, v;
1745
1745
  if (o.b = i, o.e = n, i += "", n += "", n.substring(0, 6) === "var(--" && (n = ye(e, n.substring(4, n.indexOf(")")))), n === "auto" && (d = e.style[t], e.style[t] = n, n = ye(e, t) || n, d ? e.style[t] = d : We(e, t)), c = [i, n], ar(c), i = c[0], n = c[1], f = i.match(et) || [], v = n.match(et) || [], v.length) {
1746
1746
  for (; u = et.exec(n); )
1747
- m = u[0], y = n.substring(l, u.index), p ? p = (p + 1) % 5 : (y.substr(-5) === "rgba(" || y.substr(-5) === "hsla(") && (p = 1), m !== (d = f[h++] || "") && (g = parseFloat(d) || 0, x = d.substr((g + "").length), m.charAt(1) === "=" && (m = rt(g, m) + x), _ = parseFloat(m), b = m.substr((_ + "").length), l = et.lastIndex - b.length, b || (b = b || ue.units[t] || x, l === n.length && (n += b, o.e += b)), x !== b && (g = Fe(e, t, d, b) || 0), o._pt = {
1747
+ g = u[0], y = n.substring(l, u.index), p ? p = (p + 1) % 5 : (y.substr(-5) === "rgba(" || y.substr(-5) === "hsla(") && (p = 1), g !== (d = f[h++] || "") && (m = parseFloat(d) || 0, x = d.substr((m + "").length), g.charAt(1) === "=" && (g = rt(m, g) + x), _ = parseFloat(g), b = g.substr((_ + "").length), l = et.lastIndex - b.length, b || (b = b || ue.units[t] || x, l === n.length && (n += b, o.e += b)), x !== b && (m = Fe(e, t, d, b) || 0), o._pt = {
1748
1748
  _next: o._pt,
1749
1749
  p: y || h === 1 ? y : ",",
1750
1750
  //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.
1751
- s: g,
1752
- c: _ - g,
1751
+ s: m,
1752
+ c: _ - m,
1753
1753
  m: p && p < 4 || t === "zIndex" ? Math.round : 0
1754
1754
  });
1755
1755
  o.c = l < n.length ? n.substring(l, n.length) : "";
@@ -1854,14 +1854,14 @@ var nn, De, st, Ni, Ve, rn, Bi, ks = function() {
1854
1854
  var i = e._gsap || He(e), n = e.style, r = un(e), s, o, l, h;
1855
1855
  return i.svg && e.getAttribute("transform") ? (l = e.transform.baseVal.consolidate().matrix, r = [l.a, l.b, l.c, l.d, l.e, l.f], r.join(",") === "1,0,0,1,0,0" ? Tt : r) : (r === Tt && !e.offsetParent && e !== st && !i.svg && (l = n.display, n.display = "block", s = e.parentNode, (!s || !e.offsetParent && !e.getBoundingClientRect().width) && (h = 1, o = e.nextElementSibling, st.appendChild(e)), r = un(e), l ? n.display = l : We(e, "display"), h && (o ? s.insertBefore(e, o) : s ? s.appendChild(e) : st.removeChild(e))), t && r.length > 6 ? [r[0], r[1], r[4], r[5], r[12], r[13]] : r);
1856
1856
  }, Ei = function(e, t, i, n, r, s) {
1857
- var o = e._gsap, l = r || Gi(e, !0), h = o.xOrigin || 0, c = o.yOrigin || 0, u = o.xOffset || 0, f = o.yOffset || 0, g = l[0], p = l[1], d = l[2], m = l[3], _ = l[4], y = l[5], b = t.split(" "), x = parseFloat(b[0]) || 0, v = parseFloat(b[1]) || 0, P, E, C, w;
1858
- i ? l !== Tt && (E = g * m - p * d) && (C = x * (m / E) + v * (-d / E) + (d * y - m * _) / E, w = x * (-p / E) + v * (g / E) - (g * y - p * _) / E, x = C, v = w) : (P = Pr(e), x = P.x + (~b[0].indexOf("%") ? x / 100 * P.width : x), v = P.y + (~(b[1] || b[0]).indexOf("%") ? v / 100 * P.height : v)), n || n !== !1 && o.smooth ? (_ = x - h, y = v - c, o.xOffset = u + (_ * g + y * d) - _, o.yOffset = f + (_ * p + y * m) - y) : o.xOffset = o.yOffset = 0, o.xOrigin = x, o.yOrigin = v, o.smooth = !!n, o.origin = t, o.originIsAbsolute = !!i, e.style[se] = "0px 0px", s && (Re(s, o, "xOrigin", h, x), Re(s, o, "yOrigin", c, v), Re(s, o, "xOffset", u, o.xOffset), Re(s, o, "yOffset", f, o.yOffset)), e.setAttribute("data-svg-origin", x + " " + v);
1857
+ var o = e._gsap, l = r || Gi(e, !0), h = o.xOrigin || 0, c = o.yOrigin || 0, u = o.xOffset || 0, f = o.yOffset || 0, m = l[0], p = l[1], d = l[2], g = l[3], _ = l[4], y = l[5], b = t.split(" "), x = parseFloat(b[0]) || 0, v = parseFloat(b[1]) || 0, P, E, C, w;
1858
+ i ? l !== Tt && (E = m * g - p * d) && (C = x * (g / E) + v * (-d / E) + (d * y - g * _) / E, w = x * (-p / E) + v * (m / E) - (m * y - p * _) / E, x = C, v = w) : (P = Pr(e), x = P.x + (~b[0].indexOf("%") ? x / 100 * P.width : x), v = P.y + (~(b[1] || b[0]).indexOf("%") ? v / 100 * P.height : v)), n || n !== !1 && o.smooth ? (_ = x - h, y = v - c, o.xOffset = u + (_ * m + y * d) - _, o.yOffset = f + (_ * p + y * g) - y) : o.xOffset = o.yOffset = 0, o.xOrigin = x, o.yOrigin = v, o.smooth = !!n, o.origin = t, o.originIsAbsolute = !!i, e.style[se] = "0px 0px", s && (Re(s, o, "xOrigin", h, x), Re(s, o, "yOrigin", c, v), Re(s, o, "xOffset", u, o.xOffset), Re(s, o, "yOffset", f, o.yOffset)), e.setAttribute("data-svg-origin", x + " " + v);
1859
1859
  }, St = function(e, t) {
1860
1860
  var i = e._gsap || new cr(e);
1861
1861
  if ("x" in i && !t && !i.uncache)
1862
1862
  return i;
1863
- var n = e.style, r = i.scaleX < 0, s = "px", o = "deg", l = getComputedStyle(e), h = ye(e, se) || "0", c, u, f, g, p, d, m, _, y, b, x, v, P, E, C, w, S, D, T, R, L, $, U, F, ee, pt, ft, mt, ze, Yi, Pe, Ne;
1864
- return c = u = f = d = m = _ = y = b = x = 0, g = p = 1, i.svg = !!(e.getCTM && Cr(e)), l.translate && ((l.translate !== "none" || l.scale !== "none" || l.rotate !== "none") && (n[B] = (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[B] !== "none" ? l[B] : "")), n.scale = n.rotate = n.translate = "none"), E = Gi(e, i.svg), i.svg && (i.uncache ? (ee = e.getBBox(), h = i.xOrigin - ee.x + "px " + (i.yOrigin - ee.y) + "px", F = "") : F = !t && e.getAttribute("data-svg-origin"), Ei(e, F || h, !!F || i.originIsAbsolute, i.smooth !== !1, E)), v = i.xOrigin || 0, P = i.yOrigin || 0, E !== Tt && (D = E[0], T = E[1], R = E[2], L = E[3], c = $ = E[4], u = U = E[5], E.length === 6 ? (g = Math.sqrt(D * D + T * T), p = Math.sqrt(L * L + R * R), d = D || T ? qe(T, D) * Ge : 0, y = R || L ? qe(R, L) * Ge + d : 0, y && (p *= Math.abs(Math.cos(y * at))), i.svg && (c -= v - (v * D + P * R), u -= P - (v * T + P * L))) : (Ne = E[6], Yi = E[7], ft = E[8], mt = E[9], ze = E[10], Pe = E[11], c = E[12], u = E[13], f = E[14], C = qe(Ne, ze), m = C * Ge, C && (w = Math.cos(-C), S = Math.sin(-C), F = $ * w + ft * S, ee = U * w + mt * S, pt = Ne * w + ze * S, ft = $ * -S + ft * w, mt = U * -S + mt * w, ze = Ne * -S + ze * w, Pe = Yi * -S + Pe * w, $ = F, U = ee, Ne = pt), C = qe(-R, ze), _ = C * Ge, C && (w = Math.cos(-C), S = Math.sin(-C), F = D * w - ft * S, ee = T * w - mt * S, pt = R * w - ze * S, Pe = L * S + Pe * w, D = F, T = ee, R = pt), C = qe(T, D), d = C * Ge, C && (w = Math.cos(C), S = Math.sin(C), F = D * w + T * S, ee = $ * w + U * S, T = T * w - D * S, U = U * w - $ * S, D = F, $ = ee), m && Math.abs(m) + Math.abs(d) > 359.9 && (m = d = 0, _ = 180 - _), g = V(Math.sqrt(D * D + T * T + R * R)), p = V(Math.sqrt(U * U + Ne * Ne)), C = qe($, U), y = Math.abs(C) > 2e-4 ? C * Ge : 0, x = Pe ? 1 / (Pe < 0 ? -Pe : Pe) : 0), i.svg && (F = e.getAttribute("transform"), i.forceCSS = e.setAttribute("transform", "") || !Tr(ye(e, B)), F && e.setAttribute("transform", F))), Math.abs(y) > 90 && Math.abs(y) < 270 && (r ? (g *= -1, y += d <= 0 ? 180 : -180, d += d <= 0 ? 180 : -180) : (p *= -1, y += y <= 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 = u - ((i.yPercent = u && (!t && i.yPercent || (Math.round(e.offsetHeight / 2) === Math.round(-u) ? -50 : 0))) ? e.offsetHeight * i.yPercent / 100 : 0) + s, i.z = f + s, i.scaleX = V(g), i.scaleY = V(p), i.rotation = V(d) + o, i.rotationX = V(m) + o, i.rotationY = V(_) + o, i.skewX = y + o, i.skewY = b + o, i.transformPerspective = x + s, (i.zOrigin = parseFloat(h.split(" ")[2]) || !t && i.zOrigin || 0) && (n[se] = Yt(h)), i.xOffset = i.yOffset = 0, i.force3D = ue.force3D, i.renderTransform = i.svg ? ea : wr ? Sr : Js, i.uncache = 0, i;
1863
+ var n = e.style, r = i.scaleX < 0, s = "px", o = "deg", l = getComputedStyle(e), h = ye(e, se) || "0", c, u, f, m, p, d, g, _, y, b, x, v, P, E, C, w, S, D, T, R, L, $, U, F, ee, pt, ft, mt, ze, Yi, Pe, Ne;
1864
+ return c = u = f = d = g = _ = y = b = x = 0, m = p = 1, i.svg = !!(e.getCTM && Cr(e)), l.translate && ((l.translate !== "none" || l.scale !== "none" || l.rotate !== "none") && (n[B] = (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[B] !== "none" ? l[B] : "")), n.scale = n.rotate = n.translate = "none"), E = Gi(e, i.svg), i.svg && (i.uncache ? (ee = e.getBBox(), h = i.xOrigin - ee.x + "px " + (i.yOrigin - ee.y) + "px", F = "") : F = !t && e.getAttribute("data-svg-origin"), Ei(e, F || h, !!F || i.originIsAbsolute, i.smooth !== !1, E)), v = i.xOrigin || 0, P = i.yOrigin || 0, E !== Tt && (D = E[0], T = E[1], R = E[2], L = E[3], c = $ = E[4], u = U = E[5], E.length === 6 ? (m = Math.sqrt(D * D + T * T), p = Math.sqrt(L * L + R * R), d = D || T ? qe(T, D) * Ge : 0, y = R || L ? qe(R, L) * Ge + d : 0, y && (p *= Math.abs(Math.cos(y * at))), i.svg && (c -= v - (v * D + P * R), u -= P - (v * T + P * L))) : (Ne = E[6], Yi = E[7], ft = E[8], mt = E[9], ze = E[10], Pe = E[11], c = E[12], u = E[13], f = E[14], C = qe(Ne, ze), g = C * Ge, C && (w = Math.cos(-C), S = Math.sin(-C), F = $ * w + ft * S, ee = U * w + mt * S, pt = Ne * w + ze * S, ft = $ * -S + ft * w, mt = U * -S + mt * w, ze = Ne * -S + ze * w, Pe = Yi * -S + Pe * w, $ = F, U = ee, Ne = pt), C = qe(-R, ze), _ = C * Ge, C && (w = Math.cos(-C), S = Math.sin(-C), F = D * w - ft * S, ee = T * w - mt * S, pt = R * w - ze * S, Pe = L * S + Pe * w, D = F, T = ee, R = pt), C = qe(T, D), d = C * Ge, C && (w = Math.cos(C), S = Math.sin(C), F = D * w + T * S, ee = $ * w + U * S, T = T * w - D * S, U = U * w - $ * S, D = F, $ = ee), g && Math.abs(g) + Math.abs(d) > 359.9 && (g = d = 0, _ = 180 - _), m = V(Math.sqrt(D * D + T * T + R * R)), p = V(Math.sqrt(U * U + Ne * Ne)), C = qe($, U), y = Math.abs(C) > 2e-4 ? C * Ge : 0, x = Pe ? 1 / (Pe < 0 ? -Pe : Pe) : 0), i.svg && (F = e.getAttribute("transform"), i.forceCSS = e.setAttribute("transform", "") || !Tr(ye(e, B)), F && e.setAttribute("transform", F))), Math.abs(y) > 90 && Math.abs(y) < 270 && (r ? (m *= -1, y += d <= 0 ? 180 : -180, d += d <= 0 ? 180 : -180) : (p *= -1, y += y <= 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 = u - ((i.yPercent = u && (!t && i.yPercent || (Math.round(e.offsetHeight / 2) === Math.round(-u) ? -50 : 0))) ? e.offsetHeight * i.yPercent / 100 : 0) + s, i.z = f + s, i.scaleX = V(m), i.scaleY = V(p), i.rotation = V(d) + o, i.rotationX = V(g) + o, i.rotationY = V(_) + o, i.skewX = y + o, i.skewY = b + o, i.transformPerspective = x + s, (i.zOrigin = parseFloat(h.split(" ")[2]) || !t && i.zOrigin || 0) && (n[se] = Yt(h)), i.xOffset = i.yOffset = 0, i.force3D = ue.force3D, i.renderTransform = i.svg ? ea : wr ? Sr : Js, i.uncache = 0, i;
1865
1865
  }, Yt = function(e) {
1866
1866
  return (e = e.split(" "))[0] + " " + e[1];
1867
1867
  }, ni = function(e, t, i) {
@@ -1870,15 +1870,15 @@ var nn, De, st, Ni, Ve, rn, Bi, ks = function() {
1870
1870
  }, Js = function(e, t) {
1871
1871
  t.z = "0px", t.rotationY = t.rotationX = "0deg", t.force3D = 0, Sr(e, t);
1872
1872
  }, Be = "0deg", gt = "0px", $e = ") ", Sr = function(e, t) {
1873
- var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.z, h = i.rotation, c = i.rotationY, u = i.rotationX, f = i.skewX, g = i.skewY, p = i.scaleX, d = i.scaleY, m = i.transformPerspective, _ = i.force3D, y = i.target, b = i.zOrigin, x = "", v = _ === "auto" && e && e !== 1 || _ === !0;
1873
+ var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.z, h = i.rotation, c = i.rotationY, u = i.rotationX, f = i.skewX, m = i.skewY, p = i.scaleX, d = i.scaleY, g = i.transformPerspective, _ = i.force3D, y = i.target, b = i.zOrigin, x = "", v = _ === "auto" && e && e !== 1 || _ === !0;
1874
1874
  if (b && (u !== Be || c !== Be)) {
1875
1875
  var P = parseFloat(c) * at, E = Math.sin(P), C = Math.cos(P), w;
1876
1876
  P = parseFloat(u) * at, w = Math.cos(P), s = ni(y, s, E * w * -b), o = ni(y, o, -Math.sin(P) * -b), l = ni(y, l, C * w * -b + b);
1877
1877
  }
1878
- m !== gt && (x += "perspective(" + m + $e), (n || r) && (x += "translate(" + n + "%, " + r + "%) "), (v || s !== gt || o !== gt || l !== gt) && (x += l !== gt || v ? "translate3d(" + s + ", " + o + ", " + l + ") " : "translate(" + s + ", " + o + $e), h !== Be && (x += "rotate(" + h + $e), c !== Be && (x += "rotateY(" + c + $e), u !== Be && (x += "rotateX(" + u + $e), (f !== Be || g !== Be) && (x += "skew(" + f + ", " + g + $e), (p !== 1 || d !== 1) && (x += "scale(" + p + ", " + d + $e), y.style[B] = x || "translate(0, 0)";
1878
+ g !== gt && (x += "perspective(" + g + $e), (n || r) && (x += "translate(" + n + "%, " + r + "%) "), (v || s !== gt || o !== gt || l !== gt) && (x += l !== gt || v ? "translate3d(" + s + ", " + o + ", " + l + ") " : "translate(" + s + ", " + o + $e), h !== Be && (x += "rotate(" + h + $e), c !== Be && (x += "rotateY(" + c + $e), u !== Be && (x += "rotateX(" + u + $e), (f !== Be || m !== Be) && (x += "skew(" + f + ", " + m + $e), (p !== 1 || d !== 1) && (x += "scale(" + p + ", " + d + $e), y.style[B] = x || "translate(0, 0)";
1879
1879
  }, ea = function(e, t) {
1880
- var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.rotation, h = i.skewX, c = i.skewY, u = i.scaleX, f = i.scaleY, g = i.target, p = i.xOrigin, d = i.yOrigin, m = i.xOffset, _ = i.yOffset, y = i.forceCSS, b = parseFloat(s), x = parseFloat(o), v, P, E, C, w;
1881
- l = parseFloat(l), h = parseFloat(h), c = parseFloat(c), c && (c = parseFloat(c), h += c, l += c), l || h ? (l *= at, h *= at, v = Math.cos(l) * u, P = Math.sin(l) * u, E = Math.sin(l - h) * -f, C = Math.cos(l - h) * f, h && (c *= at, w = Math.tan(h - c), w = Math.sqrt(1 + w * w), E *= w, C *= w, c && (w = Math.tan(c), w = Math.sqrt(1 + w * w), v *= w, P *= w)), v = V(v), P = V(P), E = V(E), C = V(C)) : (v = u, C = f, P = E = 0), (b && !~(s + "").indexOf("px") || x && !~(o + "").indexOf("px")) && (b = Fe(g, "x", s, "px"), x = Fe(g, "y", o, "px")), (p || d || m || _) && (b = V(b + p - (p * v + d * E) + m), x = V(x + d - (p * P + d * C) + _)), (n || r) && (w = g.getBBox(), b = V(b + n / 100 * w.width), x = V(x + r / 100 * w.height)), w = "matrix(" + v + "," + P + "," + E + "," + C + "," + b + "," + x + ")", g.setAttribute("transform", w), y && (g.style[B] = w);
1880
+ var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.rotation, h = i.skewX, c = i.skewY, u = i.scaleX, f = i.scaleY, m = i.target, p = i.xOrigin, d = i.yOrigin, g = i.xOffset, _ = i.yOffset, y = i.forceCSS, b = parseFloat(s), x = parseFloat(o), v, P, E, C, w;
1881
+ l = parseFloat(l), h = parseFloat(h), c = parseFloat(c), c && (c = parseFloat(c), h += c, l += c), l || h ? (l *= at, h *= at, v = Math.cos(l) * u, P = Math.sin(l) * u, E = Math.sin(l - h) * -f, C = Math.cos(l - h) * f, h && (c *= at, w = Math.tan(h - c), w = Math.sqrt(1 + w * w), E *= w, C *= w, c && (w = Math.tan(c), w = Math.sqrt(1 + w * w), v *= w, P *= w)), v = V(v), P = V(P), E = V(E), C = V(C)) : (v = u, C = f, P = E = 0), (b && !~(s + "").indexOf("px") || x && !~(o + "").indexOf("px")) && (b = Fe(m, "x", s, "px"), x = Fe(m, "y", o, "px")), (p || d || g || _) && (b = V(b + p - (p * v + d * E) + g), x = V(x + d - (p * P + d * C) + _)), (n || r) && (w = m.getBBox(), b = V(b + n / 100 * w.width), x = V(x + r / 100 * w.height)), w = "matrix(" + v + "," + P + "," + E + "," + C + "," + b + "," + x + ")", m.setAttribute("transform", w), y && (m.style[B] = w);
1882
1882
  }, ta = function(e, t, i, n, r) {
1883
1883
  var s = 360, o = K(r), l = parseFloat(r) * (o && ~r.indexOf("rad") ? Ge : 1), h = l - n, c = n + h + "deg", u, f;
1884
1884
  return o && (u = r.split("_")[1], u === "short" && (h %= s, h !== h % (s / 2) && (h += h < 0 ? s : -s)), u === "cw" && h < 0 ? h = (h + s * sn) % s - ~~(h / s) * s : u === "ccw" && h > 0 && (h = (h - s * sn) % s - ~~(h / s) * s)), e._pt = f = new re(e._pt, t, i, n, h, zs), f.e = c, f.u = "deg", e._props.push(i), f;
@@ -1887,10 +1887,10 @@ var nn, De, st, Ni, Ve, rn, Bi, ks = function() {
1887
1887
  e[i] = t[i];
1888
1888
  return e;
1889
1889
  }, ia = function(e, t, i) {
1890
- var n = dn({}, i._gsap), r = "perspective,force3D,transformOrigin,svgOrigin", s = i.style, o, l, h, c, u, f, g, p;
1890
+ var n = dn({}, i._gsap), r = "perspective,force3D,transformOrigin,svgOrigin", s = i.style, o, l, h, c, u, f, m, p;
1891
1891
  n.svg ? (h = i.getAttribute("transform"), i.setAttribute("transform", ""), s[B] = t, o = St(i, 1), We(i, B), i.setAttribute("transform", h)) : (h = getComputedStyle(i)[B], s[B] = t, o = St(i, 1), s[B] = h);
1892
1892
  for (l in Se)
1893
- h = n[l], c = o[l], h !== c && r.indexOf(l) < 0 && (g = X(h), p = X(c), u = g !== p ? Fe(i, l, h, p) : parseFloat(h), f = parseFloat(c), e._pt = new re(e._pt, o, l, u, f - u, bi), e._pt.u = p || 0, e._props.push(l));
1893
+ h = n[l], c = o[l], h !== c && r.indexOf(l) < 0 && (m = X(h), p = X(c), u = m !== p ? Fe(i, l, h, p) : parseFloat(h), f = parseFloat(c), e._pt = new re(e._pt, o, l, u, f - u, bi), e._pt.u = p || 0, e._props.push(l));
1894
1894
  dn(o, n);
1895
1895
  };
1896
1896
  ne("padding,margin,Width,Radius", function(a, e) {
@@ -1898,14 +1898,14 @@ ne("padding,margin,Width,Radius", function(a, e) {
1898
1898
  return e < 2 ? a + o : "border" + o + a;
1899
1899
  });
1900
1900
  Ht[e > 1 ? "border" + a : a] = function(o, l, h, c, u) {
1901
- var f, g;
1901
+ var f, m;
1902
1902
  if (arguments.length < 4)
1903
1903
  return f = s.map(function(p) {
1904
1904
  return Ae(o, p, h);
1905
- }), g = f.join(" "), g.split(f[0]).length === 5 ? f[0] : g;
1906
- f = (c + "").split(" "), g = {}, s.forEach(function(p, d) {
1907
- return g[p] = f[d] = f[d] || f[(d - 1) / 2 | 0];
1908
- }), o.init(l, g, u);
1905
+ }), m = f.join(" "), m.split(f[0]).length === 5 ? f[0] : m;
1906
+ f = (c + "").split(" "), m = {}, s.forEach(function(p, d) {
1907
+ return m[p] = f[d] = f[d] || f[(d - 1) / 2 | 0];
1908
+ }), o.init(l, m, u);
1909
1909
  };
1910
1910
  });
1911
1911
  var Mr = {
@@ -1915,17 +1915,17 @@ var Mr = {
1915
1915
  return e.style && e.nodeType;
1916
1916
  },
1917
1917
  init: function(e, t, i, n, r) {
1918
- var s = this._props, o = e.style, l = i.vars.startAt, h, c, u, f, g, p, d, m, _, y, b, x, v, P, E, C;
1918
+ var s = this._props, o = e.style, l = i.vars.startAt, h, c, u, f, m, p, d, g, _, y, b, x, v, P, E, C;
1919
1919
  Ni || vi(), this.styles = this.styles || Er(e), C = this.styles.props, this.tween = i;
1920
1920
  for (d in t)
1921
1921
  if (d !== "autoRound" && (c = t[d], !(le[d] && ur(d, t, i, n, e, r)))) {
1922
- if (g = typeof c, p = Ht[d], g === "function" && (c = c.call(i, n, e, r), g = typeof c), g === "string" && ~c.indexOf("random(") && (c = Pt(c)), p)
1922
+ if (m = typeof c, p = Ht[d], m === "function" && (c = c.call(i, n, e, r), m = typeof c), m === "string" && ~c.indexOf("random(") && (c = Pt(c)), p)
1923
1923
  p(this, e, d, c, i) && (E = 1);
1924
1924
  else if (d.substr(0, 2) === "--")
1925
- h = (getComputedStyle(e).getPropertyValue(d) + "").trim(), c += "", Oe.lastIndex = 0, Oe.test(h) || (m = X(h), _ = X(c)), _ ? m !== _ && (h = Fe(e, d, h, _) + _) : m && (c += m), this.add(o, "setProperty", h, c, n, r, 0, 0, d), s.push(d), C.push(d, 0, o[d]);
1926
- else if (g !== "undefined") {
1927
- if (l && d in l ? (h = typeof l[d] == "function" ? l[d].call(i, n, e, r) : l[d], K(h) && ~h.indexOf("random(") && (h = Pt(h)), X(h + "") || h === "auto" || (h += ue.units[d] || X(Ae(e, d)) || ""), (h + "").charAt(1) === "=" && (h = Ae(e, d))) : h = Ae(e, d), f = parseFloat(h), y = g === "string" && c.charAt(1) === "=" && c.substr(0, 2), y && (c = c.substr(2)), u = parseFloat(c), d in ve && (d === "autoAlpha" && (f === 1 && Ae(e, "visibility") === "hidden" && u && (f = 0), C.push("visibility", 0, o.visibility), Re(this, o, "visibility", f ? "inherit" : "hidden", u ? "inherit" : "hidden", !u)), d !== "scale" && d !== "transform" && (d = ve[d], ~d.indexOf(",") && (d = d.split(",")[0]))), b = d in Se, b) {
1928
- if (this.styles.save(d), g === "string" && c.substring(0, 6) === "var(--" && (c = ye(e, c.substring(4, c.indexOf(")"))), u = parseFloat(c)), x || (v = e._gsap, v.renderTransform && !t.parseTransform || St(e, t.parseTransform), P = t.smoothOrigin !== !1 && v.smooth, x = this._pt = new re(this._pt, o, B, 0, 1, v.renderTransform, v, 0, -1), x.dep = 1), d === "scale")
1925
+ h = (getComputedStyle(e).getPropertyValue(d) + "").trim(), c += "", Oe.lastIndex = 0, Oe.test(h) || (g = X(h), _ = X(c)), _ ? g !== _ && (h = Fe(e, d, h, _) + _) : g && (c += g), this.add(o, "setProperty", h, c, n, r, 0, 0, d), s.push(d), C.push(d, 0, o[d]);
1926
+ else if (m !== "undefined") {
1927
+ if (l && d in l ? (h = typeof l[d] == "function" ? l[d].call(i, n, e, r) : l[d], K(h) && ~h.indexOf("random(") && (h = Pt(h)), X(h + "") || h === "auto" || (h += ue.units[d] || X(Ae(e, d)) || ""), (h + "").charAt(1) === "=" && (h = Ae(e, d))) : h = Ae(e, d), f = parseFloat(h), y = m === "string" && c.charAt(1) === "=" && c.substr(0, 2), y && (c = c.substr(2)), u = parseFloat(c), d in ve && (d === "autoAlpha" && (f === 1 && Ae(e, "visibility") === "hidden" && u && (f = 0), C.push("visibility", 0, o.visibility), Re(this, o, "visibility", f ? "inherit" : "hidden", u ? "inherit" : "hidden", !u)), d !== "scale" && d !== "transform" && (d = ve[d], ~d.indexOf(",") && (d = d.split(",")[0]))), b = d in Se, b) {
1928
+ if (this.styles.save(d), m === "string" && c.substring(0, 6) === "var(--" && (c = ye(e, c.substring(4, c.indexOf(")"))), u = parseFloat(c)), x || (v = e._gsap, v.renderTransform && !t.parseTransform || St(e, t.parseTransform), P = t.smoothOrigin !== !1 && v.smooth, x = this._pt = new re(this._pt, o, B, 0, 1, v.renderTransform, v, 0, -1), x.dep = 1), d === "scale")
1929
1929
  this._pt = new re(this._pt, v, "scaleY", v.scaleY, (y ? rt(v.scaleY, y + u) : u) - v.scaleY || 0, bi), this._pt.u = 0, s.push("scaleY", d), d += "X";
1930
1930
  else if (d === "transformOrigin") {
1931
1931
  C.push(se, 0, o[se]), c = qs(c), v.svg ? Ei(e, c, 0, P, 0, this) : (_ = parseFloat(c.split(" ")[2]) || 0, _ !== v.zOrigin && Re(this, v, "zOrigin", v.zOrigin, _), Re(this, o, d, Yt(h), Yt(c)));
@@ -1948,7 +1948,7 @@ var Mr = {
1948
1948
  }
1949
1949
  } else d in o || (d = dt(d) || d);
1950
1950
  if (b || (u || u === 0) && (f || f === 0) && !Us.test(c) && d in o)
1951
- m = (h + "").substr((f + "").length), u || (u = 0), _ = X(c) || (d in ue.units ? ue.units[d] : m), m !== _ && (f = Fe(e, d, h, _)), this._pt = new re(this._pt, b ? v : o, d, f, (y ? rt(f, y + u) : u) - f, !b && (_ === "px" || d === "zIndex") && t.autoRound !== !1 ? Bs : bi), this._pt.u = _ || 0, m !== _ && _ !== "%" && (this._pt.b = h, this._pt.r = Ns);
1951
+ g = (h + "").substr((f + "").length), u || (u = 0), _ = X(c) || (d in ue.units ? ue.units[d] : g), g !== _ && (f = Fe(e, d, h, _)), this._pt = new re(this._pt, b ? v : o, d, f, (y ? rt(f, y + u) : u) - f, !b && (_ === "px" || d === "zIndex") && t.autoRound !== !1 ? Bs : bi), this._pt.u = _ || 0, g !== _ && _ !== "%" && (this._pt.b = h, this._pt.r = Ns);
1952
1952
  else if (d in o)
1953
1953
  Xs.call(this, e, d, h, y ? y + c : c);
1954
1954
  else if (d in e)
@@ -2360,7 +2360,7 @@ class ca extends Ee {
2360
2360
  this._inputFocused && (y.preventDefault(), i(this._step * this._normalizeMouseWheel(y)));
2361
2361
  };
2362
2362
  let s = !1, o, l, h, c, u;
2363
- const f = 5, g = (y) => {
2363
+ const f = 5, m = (y) => {
2364
2364
  o = y.clientX, l = h = y.clientY, s = !0, c = this.getValue(), u = 0, window.addEventListener("mousemove", p), window.addEventListener("mouseup", d);
2365
2365
  }, p = (y) => {
2366
2366
  if (s) {
@@ -2374,12 +2374,12 @@ class ca extends Ee {
2374
2374
  h = y.clientY;
2375
2375
  }, d = () => {
2376
2376
  this._setDraggingStyle(!1, "vertical"), this._callOnFinishChange(), window.removeEventListener("mousemove", p), window.removeEventListener("mouseup", d);
2377
- }, m = () => {
2377
+ }, g = () => {
2378
2378
  this._inputFocused = !0;
2379
2379
  }, _ = () => {
2380
2380
  this._inputFocused = !1, this.updateDisplay(), this._callOnFinishChange();
2381
2381
  };
2382
- this.$input.addEventListener("input", t), this.$input.addEventListener("keydown", n), this.$input.addEventListener("wheel", r, { passive: !1 }), this.$input.addEventListener("mousedown", g), this.$input.addEventListener("focus", m), this.$input.addEventListener("blur", _);
2382
+ this.$input.addEventListener("input", t), this.$input.addEventListener("keydown", n), this.$input.addEventListener("wheel", r, { passive: !1 }), this.$input.addEventListener("mousedown", m), this.$input.addEventListener("focus", g), this.$input.addEventListener("blur", _);
2383
2383
  }
2384
2384
  _initSlider() {
2385
2385
  this._hasSlider = !0, this.$slider = document.createElement("div"), this.$slider.classList.add("lil-slider"), this.$fill = document.createElement("div"), this.$fill.classList.add("lil-fill"), this.$slider.appendChild(this.$fill), this.$widget.insertBefore(this.$slider, this.$input), this.domElement.classList.add("lil-has-slider");
@@ -2407,15 +2407,15 @@ class ca extends Ee {
2407
2407
  _.preventDefault(), t(_.touches[0].clientX);
2408
2408
  }, f = () => {
2409
2409
  this._callOnFinishChange(), this._setDraggingStyle(!1), window.removeEventListener("touchmove", u), window.removeEventListener("touchend", f);
2410
- }, g = this._callOnFinishChange.bind(this), p = 400;
2410
+ }, m = this._callOnFinishChange.bind(this), p = 400;
2411
2411
  let d;
2412
- const m = (_) => {
2412
+ const g = (_) => {
2413
2413
  if (Math.abs(_.deltaX) < Math.abs(_.deltaY) && this._hasScrollBar) return;
2414
2414
  _.preventDefault();
2415
2415
  const b = this._normalizeMouseWheel(_) * this._step;
2416
- this._snapClampSetValue(this.getValue() + b), this.$input.value = this.getValue(), clearTimeout(d), d = setTimeout(g, p);
2416
+ this._snapClampSetValue(this.getValue() + b), this.$input.value = this.getValue(), clearTimeout(d), d = setTimeout(m, p);
2417
2417
  };
2418
- this.$slider.addEventListener("mousedown", i), this.$slider.addEventListener("touchstart", c, { passive: !1 }), this.$slider.addEventListener("wheel", m, { passive: !1 });
2418
+ this.$slider.addEventListener("mousedown", i), this.$slider.addEventListener("touchstart", c, { passive: !1 }), this.$slider.addEventListener("wheel", g, { passive: !1 });
2419
2419
  }
2420
2420
  _setDraggingStyle(e, t = "horizontal") {
2421
2421
  this.$slider && this.$slider.classList.toggle("lil-active", e), document.body.classList.toggle("lil-dragging", e), document.body.classList.toggle(`lil-${t}`, e);
@@ -4201,7 +4201,8 @@ class it {
4201
4201
  url: e?.url || "https://cdn.jsdelivr.net/npm/world-atlas@2/countries-110m.json",
4202
4202
  objectName: e?.objectName || "countries",
4203
4203
  disableNormalization: e?.disableNormalization || !1,
4204
- idProperty: e?.idProperty
4204
+ idProperty: e?.idProperty,
4205
+ labelProperty: e?.labelProperty
4205
4206
  }, this.statsMap = /* @__PURE__ */ new Map(), Rr.forEach((n) => {
4206
4207
  this.statsMap.set(n.id, n);
4207
4208
  }), this.loadCountries();
@@ -4275,8 +4276,8 @@ class it {
4275
4276
  this.featureLabels = this.countries.map((e) => {
4276
4277
  const t = this.computeCentroid(e);
4277
4278
  if (!t) return null;
4278
- let i = e.properties?.name || e.properties?.NAME || e.properties?.Name || e.properties?.label || e.properties?.LABEL || "";
4279
- if (!i && e.properties) {
4279
+ let i = "";
4280
+ if (this.topologyConfig?.labelProperty && (i = e.properties?.[this.topologyConfig.labelProperty] || ""), i || (i = e.properties?.name || e.properties?.NAME || e.properties?.Name || e.properties?.label || e.properties?.LABEL || ""), !i && e.properties) {
4280
4281
  const n = Object.keys(e.properties);
4281
4282
  for (const r of n) {
4282
4283
  const s = r.toLowerCase(), o = e.properties[r];
@@ -4343,7 +4344,7 @@ class it {
4343
4344
  const c = this.countries[h], u = this.statsMap.get(c.id);
4344
4345
  let f = "#2a2a2a";
4345
4346
  if (u) {
4346
- const g = e.accessor(u), p = Da(e, g);
4347
+ const m = e.accessor(u), p = Da(e, m);
4347
4348
  f = this.interpolateColor(e.colorScale, p);
4348
4349
  }
4349
4350
  this.drawFeature(c, f, i);
@@ -4417,16 +4418,16 @@ class it {
4417
4418
  if (this.currentRenderId !== n) return;
4418
4419
  const u = Math.min(h + o, l);
4419
4420
  for (let f = h; f < u; f++) {
4420
- const g = this.countries[f], p = r[g.id];
4421
+ const m = this.countries[f], p = r[m.id];
4421
4422
  let d = "#2a2a2a";
4422
4423
  if (p !== void 0) {
4423
- const m = Math.max(
4424
+ const g = Math.max(
4424
4425
  0,
4425
4426
  Math.min(1, (p - i[0]) / (i[1] - i[0]))
4426
4427
  );
4427
- d = this.interpolateColor(t, m);
4428
+ d = this.interpolateColor(t, g);
4428
4429
  }
4429
- this.drawFeature(g, d, s);
4430
+ this.drawFeature(m, d, s);
4430
4431
  }
4431
4432
  h = u, this.onTextureUpdate?.(), h < l && requestAnimationFrame(c);
4432
4433
  };
@@ -4459,15 +4460,15 @@ class it {
4459
4460
  }), r === 0 && c === 0) return null;
4460
4461
  if (r === 0) return [s, l, o, h];
4461
4462
  if (c === 0) return [e, i, t, n];
4462
- const f = Math.min(e, s), g = Math.max(t, o);
4463
- if (g - f > 180) {
4463
+ const f = Math.min(e, s), m = Math.max(t, o);
4464
+ if (m - f > 180) {
4464
4465
  if (r > c * 2)
4465
4466
  return [e, i, t, n];
4466
4467
  if (c > r * 2)
4467
4468
  return [s, l, o, h];
4468
4469
  }
4469
- const d = Math.min(i, l), m = Math.max(n, h);
4470
- return [f, d, g, m];
4470
+ const d = Math.min(i, l), g = Math.max(n, h);
4471
+ return [f, d, m, g];
4471
4472
  }
4472
4473
  }
4473
4474
  class _n extends Gr {
@@ -4506,50 +4507,50 @@ class Oa {
4506
4507
  height: n
4507
4508
  };
4508
4509
  }, this.render = function(p, d) {
4509
- p.matrixWorldAutoUpdate === !0 && p.updateMatrixWorld(), d.parent === null && d.matrixWorldAutoUpdate === !0 && d.updateMatrixWorld(), yn.copy(d.matrixWorldInverse), bn.multiplyMatrices(d.projectionMatrix, yn), c(p, p, d), this.sortObjects && g(p);
4510
+ p.matrixWorldAutoUpdate === !0 && p.updateMatrixWorld(), d.parent === null && d.matrixWorldAutoUpdate === !0 && d.updateMatrixWorld(), yn.copy(d.matrixWorldInverse), bn.multiplyMatrices(d.projectionMatrix, yn), c(p, p, d), this.sortObjects && m(p);
4510
4511
  }, this.setSize = function(p, d) {
4511
4512
  i = p, n = d, r = i / 2, s = n / 2, l.style.width = p + "px", l.style.height = d + "px";
4512
4513
  };
4513
4514
  function h(p) {
4514
4515
  p.isCSS2DObject && (p.element.style.display = "none");
4515
- for (let d = 0, m = p.children.length; d < m; d++)
4516
+ for (let d = 0, g = p.children.length; d < g; d++)
4516
4517
  h(p.children[d]);
4517
4518
  }
4518
- function c(p, d, m) {
4519
+ function c(p, d, g) {
4519
4520
  if (p.visible === !1) {
4520
4521
  h(p);
4521
4522
  return;
4522
4523
  }
4523
4524
  if (p.isCSS2DObject) {
4524
4525
  Qe.setFromMatrixPosition(p.matrixWorld), Qe.applyMatrix4(bn);
4525
- const _ = Qe.z >= -1 && Qe.z <= 1 && p.layers.test(m.layers) === !0, y = p.element;
4526
- y.style.display = _ === !0 ? "" : "none", _ === !0 && (p.onBeforeRender(t, d, m), y.style.transform = "translate(" + -100 * p.center.x + "%," + -100 * p.center.y + "%)translate(" + (Qe.x * r + r) + "px," + (-Qe.y * s + s) + "px)", y.parentNode !== l && l.appendChild(y), p.onAfterRender(t, d, m));
4526
+ const _ = Qe.z >= -1 && Qe.z <= 1 && p.layers.test(g.layers) === !0, y = p.element;
4527
+ y.style.display = _ === !0 ? "" : "none", _ === !0 && (p.onBeforeRender(t, d, g), y.style.transform = "translate(" + -100 * p.center.x + "%," + -100 * p.center.y + "%)translate(" + (Qe.x * r + r) + "px," + (-Qe.y * s + s) + "px)", y.parentNode !== l && l.appendChild(y), p.onAfterRender(t, d, g));
4527
4528
  const b = {
4528
- distanceToCameraSquared: u(m, p)
4529
+ distanceToCameraSquared: u(g, p)
4529
4530
  };
4530
4531
  o.objects.set(p, b);
4531
4532
  }
4532
4533
  for (let _ = 0, y = p.children.length; _ < y; _++)
4533
- c(p.children[_], d, m);
4534
+ c(p.children[_], d, g);
4534
4535
  }
4535
4536
  function u(p, d) {
4536
4537
  return xn.setFromMatrixPosition(p.matrixWorld), vn.setFromMatrixPosition(d.matrixWorld), xn.distanceToSquared(vn);
4537
4538
  }
4538
4539
  function f(p) {
4539
4540
  const d = [];
4540
- return p.traverseVisible(function(m) {
4541
- m.isCSS2DObject && d.push(m);
4541
+ return p.traverseVisible(function(g) {
4542
+ g.isCSS2DObject && d.push(g);
4542
4543
  }), d;
4543
4544
  }
4544
- function g(p) {
4545
+ function m(p) {
4545
4546
  const d = f(p).sort(function(_, y) {
4546
4547
  if (_.renderOrder !== y.renderOrder)
4547
4548
  return y.renderOrder - _.renderOrder;
4548
4549
  const b = o.objects.get(_).distanceToCameraSquared, x = o.objects.get(y).distanceToCameraSquared;
4549
4550
  return b - x;
4550
- }), m = d.length;
4551
+ }), g = d.length;
4551
4552
  for (let _ = 0, y = d.length; _ < y; _++)
4552
- d[_].element.style.zIndex = m - _;
4553
+ d[_].element.style.zIndex = g - _;
4553
4554
  }
4554
4555
  }
4555
4556
  }
@@ -4886,21 +4887,26 @@ class $a {
4886
4887
  */
4887
4888
  addCustomLabels(e) {
4888
4889
  e.forEach((t) => {
4889
- const i = t.size || "small", n = document.createElement("div");
4890
- n.className = `country-label hidden size-${i} custom-label`, n.textContent = t.name;
4891
- const r = new _n(n), s = {
4890
+ const i = (m) => String(parseInt(m) || m).toLowerCase(), n = (m) => m.toLowerCase().replace(/^the\s+/, "").trim(), r = i(t.id), s = n(t.name);
4891
+ if (this.labels.some((m) => {
4892
+ const p = i(m.country.id), d = n(m.country.name);
4893
+ return p === r || d === s;
4894
+ })) return;
4895
+ const l = t.size || "small", h = document.createElement("div");
4896
+ h.className = `country-label hidden size-${l} custom-label`, h.textContent = t.name;
4897
+ const c = new _n(h), u = {
4892
4898
  id: t.id,
4893
4899
  code: t.id,
4894
4900
  name: t.name
4895
- }, o = {
4896
- element: n,
4897
- object: r,
4898
- country: s,
4901
+ }, f = {
4902
+ element: h,
4903
+ object: c,
4904
+ country: u,
4899
4905
  lat: t.lat,
4900
4906
  lon: t.lon,
4901
- sizeCategory: i
4907
+ sizeCategory: l
4902
4908
  };
4903
- this.labelGroup.add(r), this.labels.push(o), this.dataIds.add(t.id), this.updateLabelPosition(r, o, this.currentMorph);
4909
+ this.labelGroup.add(c), this.labels.push(f), this.dataIds.add(t.id), this.updateLabelPosition(c, f, this.currentMorph);
4904
4910
  }), this.setStyle(this.currentStyle);
4905
4911
  }
4906
4912
  /**
@@ -4920,14 +4926,14 @@ class $a {
4920
4926
  cameraDirection = new A.Vector3();
4921
4927
  labelNormal = new A.Vector3();
4922
4928
  updateLabelPosition(e, t, i) {
4923
- const { lat: n, lon: r, element: s } = t, o = (r + 180) / 360, l = (n + 90) / 180, h = (o - 0.5) * 2 * Math.PI, c = (l - 0.5) * Math.PI, u = this.sphereRadius + 0.3, f = u * Math.cos(c) * Math.sin(h), g = u * Math.sin(c), p = u * Math.cos(c) * Math.cos(h), d = 2 * Math.PI * this.sphereRadius, m = Math.PI * this.sphereRadius, _ = (o - 0.5) * d, y = (l - 0.5) * m, b = 0.3, x = i * i * (3 - 2 * i);
4929
+ const { lat: n, lon: r, element: s } = t, o = (r + 180) / 360, l = (n + 90) / 180, h = (o - 0.5) * 2 * Math.PI, c = (l - 0.5) * Math.PI, u = this.sphereRadius + 0.3, f = u * Math.cos(c) * Math.sin(h), m = u * Math.sin(c), p = u * Math.cos(c) * Math.cos(h), d = 2 * Math.PI * this.sphereRadius, g = Math.PI * this.sphereRadius, _ = (o - 0.5) * d, y = (l - 0.5) * g, b = 0.3, x = i * i * (3 - 2 * i);
4924
4930
  if (this.localPos.set(
4925
4931
  _ + x * (f - _),
4926
- y + x * (g - y),
4932
+ y + x * (m - y),
4927
4933
  b + x * (p - b)
4928
4934
  ), this.globe)
4929
4935
  if (this.worldPos.copy(this.localPos), this.worldPos.applyMatrix4(this.globe.matrixWorld), e.position.copy(this.worldPos), this.camera && x > 0.5) {
4930
- this.cameraDirection.copy(this.camera.position).normalize(), this.labelNormal.set(f, g, p).normalize(), this.labelNormal.applyMatrix4(this.globe.matrixWorld).normalize();
4936
+ this.cameraDirection.copy(this.camera.position).normalize(), this.labelNormal.set(f, m, p).normalize(), this.labelNormal.applyMatrix4(this.globe.matrixWorld).normalize();
4931
4937
  const v = this.labelNormal.dot(this.cameraDirection);
4932
4938
  s.style.opacity = v > 0.15 ? "" : "0";
4933
4939
  } else
@@ -5082,7 +5088,7 @@ var ai = 12, En = 5003, Va = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047,
5082
5088
  function ja(a, e, t, i, n = Lr(512), r = new Uint8Array(256), s = new Int32Array(En), o = new Int32Array(En)) {
5083
5089
  let l = s.length, h = Math.max(2, i);
5084
5090
  r.fill(0), o.fill(0), s.fill(-1);
5085
- let c = 0, u = 0, f = h + 1, g = f, p = !1, d = g, m = (1 << d) - 1, _ = 1 << f - 1, y = _ + 1, b = _ + 2, x = 0, v = t[0], P = 0;
5091
+ let c = 0, u = 0, f = h + 1, m = f, p = !1, d = m, g = (1 << d) - 1, _ = 1 << f - 1, y = _ + 1, b = _ + 2, x = 0, v = t[0], P = 0;
5086
5092
  for (let w = l; w < 65536; w *= 2) ++P;
5087
5093
  P = 8 - P, n.writeByte(h), C(_);
5088
5094
  let E = t.length;
@@ -5103,7 +5109,7 @@ function ja(a, e, t, i, n = Lr(512), r = new Uint8Array(256), s = new Int32Array
5103
5109
  return C(v), C(y), n.writeByte(0), n.bytesView();
5104
5110
  function C(w) {
5105
5111
  for (c &= Va[u], u > 0 ? c |= w << u : c = w, u += d; u >= 8; ) r[x++] = c & 255, x >= 254 && (n.writeByte(x), n.writeBytesView(r, 0, x), x = 0), c >>= 8, u -= 8;
5106
- if ((b > m || p) && (p ? (d = g, m = (1 << d) - 1, p = !1) : (++d, m = d === ai ? 1 << d : (1 << d) - 1)), w == y) {
5112
+ if ((b > g || p) && (p ? (d = m, g = (1 << d) - 1, p = !1) : (++d, g = d === ai ? 1 << d : (1 << d) - 1)), w == y) {
5107
5113
  for (; u > 0; ) r[x++] = c & 255, x >= 254 && (n.writeByte(x), n.writeBytesView(r, 0, x), x = 0), c >>= 8, u -= 8;
5108
5114
  x > 0 && (n.writeByte(x), n.writeBytesView(r, 0, x), x = 0);
5109
5115
  }
@@ -5131,7 +5137,7 @@ function wn(a, e, t) {
5131
5137
  r.ac;
5132
5138
  let o = r.rc, l = r.gc, h = r.bc;
5133
5139
  for (var c = r.fw; c != 0; c = a[c].fw) {
5134
- let f = a[c], g = f.cnt, p = s * g / (s + g);
5140
+ let f = a[c], m = f.cnt, p = s * m / (s + m);
5135
5141
  if (!(p >= n)) {
5136
5142
  var u = 0;
5137
5143
  u += p * Nt(f.rc - o), !(u >= n) && (u += p * Nt(f.gc - l), !(u >= n) && (u += p * Nt(f.bc - h), !(u >= n) && (n = u, i = c)));
@@ -5162,44 +5168,44 @@ function Za(a, e, t = {}) {
5162
5168
  let { format: i = "rgb565", clearAlpha: n = !0, clearAlphaColor: r = 0, clearAlphaThreshold: s = 0, oneBitAlpha: o = !1 } = t;
5163
5169
  if (!a || !a.buffer) throw new Error("quantize() expected RGBA Uint8Array data");
5164
5170
  if (!(a instanceof Uint8Array) && !(a instanceof Uint8ClampedArray)) throw new Error("quantize() expected RGBA Uint8Array data");
5165
- let l = new Uint32Array(a.buffer), h = t.useSqrt !== !1, c = i === "rgba4444", u = Ya(l, i), f = u.length, g = f - 1, p = new Uint32Array(f + 1);
5166
- for (var d = 0, m = 0; m < f; ++m) {
5167
- let L = u[m];
5171
+ let l = new Uint32Array(a.buffer), h = t.useSqrt !== !1, c = i === "rgba4444", u = Ya(l, i), f = u.length, m = f - 1, p = new Uint32Array(f + 1);
5172
+ for (var d = 0, g = 0; g < f; ++g) {
5173
+ let L = u[g];
5168
5174
  if (L != null) {
5169
5175
  var _ = 1 / L.cnt;
5170
5176
  c && (L.ac *= _), L.rc *= _, L.gc *= _, L.bc *= _, u[d++] = L;
5171
5177
  }
5172
5178
  }
5173
5179
  Nt(e) / d < 0.022 && (h = !1);
5174
- for (var m = 0; m < d - 1; ++m) u[m].fw = m + 1, u[m + 1].bk = m, h && (u[m].cnt = Math.sqrt(u[m].cnt));
5175
- h && (u[m].cnt = Math.sqrt(u[m].cnt));
5180
+ for (var g = 0; g < d - 1; ++g) u[g].fw = g + 1, u[g + 1].bk = g, h && (u[g].cnt = Math.sqrt(u[g].cnt));
5181
+ h && (u[g].cnt = Math.sqrt(u[g].cnt));
5176
5182
  var y, b, x;
5177
- for (m = 0; m < d; ++m) {
5178
- wn(u, m);
5179
- var v = u[m].err;
5183
+ for (g = 0; g < d; ++g) {
5184
+ wn(u, g);
5185
+ var v = u[g].err;
5180
5186
  for (b = ++p[0]; b > 1 && (x = b >> 1, !(u[y = p[x]].err <= v)); b = x) p[b] = y;
5181
- p[b] = m;
5187
+ p[b] = g;
5182
5188
  }
5183
5189
  var P = d - e;
5184
- for (m = 0; m < P; ) {
5190
+ for (g = 0; g < P; ) {
5185
5191
  for (var E; ; ) {
5186
5192
  var C = p[1];
5187
5193
  if (E = u[C], E.tm >= E.mtm && u[E.nn].mtm <= E.tm) break;
5188
- E.mtm == g ? C = p[1] = p[p[0]--] : (wn(u, C), E.tm = m);
5194
+ E.mtm == m ? C = p[1] = p[p[0]--] : (wn(u, C), E.tm = g);
5189
5195
  var v = u[C].err;
5190
5196
  for (b = 1; (x = b + b) <= p[0] && (x < p[0] && u[p[x]].err > u[p[x + 1]].err && x++, !(v <= u[y = p[x]].err)); b = x) p[b] = y;
5191
5197
  p[b] = C;
5192
5198
  }
5193
5199
  var w = u[E.nn], S = E.cnt, D = w.cnt, _ = 1 / (S + D);
5194
- c && (E.ac = _ * (S * E.ac + D * w.ac)), E.rc = _ * (S * E.rc + D * w.rc), E.gc = _ * (S * E.gc + D * w.gc), E.bc = _ * (S * E.bc + D * w.bc), E.cnt += w.cnt, E.mtm = ++m, u[w.bk].fw = w.fw, u[w.fw].bk = w.bk, w.mtm = g;
5200
+ c && (E.ac = _ * (S * E.ac + D * w.ac)), E.rc = _ * (S * E.rc + D * w.rc), E.gc = _ * (S * E.gc + D * w.gc), E.bc = _ * (S * E.bc + D * w.bc), E.cnt += w.cnt, E.mtm = ++g, u[w.bk].fw = w.fw, u[w.fw].bk = w.bk, w.mtm = m;
5195
5201
  }
5196
5202
  let T = [];
5197
5203
  var R = 0;
5198
- for (m = 0; ; ++R) {
5199
- let L = kt(Math.round(u[m].rc), 0, 255), $ = kt(Math.round(u[m].gc), 0, 255), U = kt(Math.round(u[m].bc), 0, 255), F = 255;
5200
- c && (F = kt(Math.round(u[m].ac), 0, 255), o && (F = F <= (typeof o == "number" ? o : 127) ? 0 : 255), n && F <= s && (L = $ = U = r, F = 0));
5204
+ for (g = 0; ; ++R) {
5205
+ let L = kt(Math.round(u[g].rc), 0, 255), $ = kt(Math.round(u[g].gc), 0, 255), U = kt(Math.round(u[g].bc), 0, 255), F = 255;
5206
+ c && (F = kt(Math.round(u[g].ac), 0, 255), o && (F = F <= (typeof o == "number" ? o : 127) ? 0 : 255), n && F <= s && (L = $ = U = r, F = 0));
5201
5207
  let ee = c ? [L, $, U, F] : [L, $, U];
5202
- if (Ka(T, ee) || T.push(ee), (m = u[m].fw) == 0) break;
5208
+ if (Ka(T, ee) || T.push(ee), (g = u[g].fw) == 0) break;
5203
5209
  }
5204
5210
  return T;
5205
5211
  }
@@ -5216,13 +5222,13 @@ function Wa(a, e, t = "rgb565") {
5216
5222
  if (e.length > 256) throw new Error("applyPalette() only works with 256 colors or less");
5217
5223
  let i = new Uint32Array(a.buffer), n = i.length, r = t === "rgb444" ? 4096 : 65536, s = new Uint8Array(n), o = new Array(r);
5218
5224
  if (t === "rgba4444") for (let l = 0; l < n; l++) {
5219
- let h = i[l], c = h >> 24 & 255, u = h >> 16 & 255, f = h >> 8 & 255, g = h & 255, p = Or(g, f, u, c), d = p in o ? o[p] : o[p] = Xa(g, f, u, c, e);
5225
+ let h = i[l], c = h >> 24 & 255, u = h >> 16 & 255, f = h >> 8 & 255, m = h & 255, p = Or(m, f, u, c), d = p in o ? o[p] : o[p] = Xa(m, f, u, c, e);
5220
5226
  s[l] = d;
5221
5227
  }
5222
5228
  else {
5223
5229
  let l = t === "rgb444" ? kr : Ir;
5224
5230
  for (let h = 0; h < n; h++) {
5225
- let c = i[h], u = c >> 16 & 255, f = c >> 8 & 255, g = c & 255, p = l(g, f, u), d = p in o ? o[p] : o[p] = qa(g, f, u, e);
5231
+ let c = i[h], u = c >> 16 & 255, f = c >> 8 & 255, m = c & 255, p = l(m, f, u), d = p in o ? o[p] : o[p] = qa(m, f, u, e);
5226
5232
  s[h] = d;
5227
5233
  }
5228
5234
  }
@@ -5237,8 +5243,8 @@ function Xa(a, e, t, i, n) {
5237
5243
  if (c += je(u - a), c > s) continue;
5238
5244
  let f = l[1];
5239
5245
  if (c += je(f - e), c > s) continue;
5240
- let g = l[2];
5241
- c += je(g - t), !(c > s) && (s = c, r = o);
5246
+ let m = l[2];
5247
+ c += je(m - t), !(c > s) && (s = c, r = o);
5242
5248
  }
5243
5249
  return r;
5244
5250
  }
@@ -5271,13 +5277,13 @@ function Qa(a = {}) {
5271
5277
  return i.buffer;
5272
5278
  }, get stream() {
5273
5279
  return i;
5274
- }, writeHeader: h, writeFrame(c, u, f, g = {}) {
5275
- let { transparent: p = !1, transparentIndex: d = 0, delay: m = 0, palette: _ = null, repeat: y = 0, colorDepth: b = 8, dispose: x = -1 } = g, v = !1;
5276
- if (t ? l || (v = !0, h(), l = !0) : v = !!g.first, u = Math.max(0, Math.floor(u)), f = Math.max(0, Math.floor(f)), v) {
5280
+ }, writeHeader: h, writeFrame(c, u, f, m = {}) {
5281
+ let { transparent: p = !1, transparentIndex: d = 0, delay: g = 0, palette: _ = null, repeat: y = 0, colorDepth: b = 8, dispose: x = -1 } = m, v = !1;
5282
+ if (t ? l || (v = !0, h(), l = !0) : v = !!m.first, u = Math.max(0, Math.floor(u)), f = Math.max(0, Math.floor(f)), v) {
5277
5283
  if (!_) throw new Error("First frame must include a { palette } option");
5278
5284
  eo(i, u, f, _, b), Pn(i, _), y >= 0 && to(i, y);
5279
5285
  }
5280
- let P = Math.round(m / 10);
5286
+ let P = Math.round(g / 10);
5281
5287
  Ja(i, x, P, p, d);
5282
5288
  let E = !!_ && !v;
5283
5289
  io(i, u, f, E ? _ : null), E && Pn(i, _), no(i, c, u, f, b, r, s, o);
@@ -5383,9 +5389,9 @@ class ro {
5383
5389
  if (!this.legendElement || !this.legendElement.classList.contains("visible")) return;
5384
5390
  const n = this.legendElement, r = n.querySelector(".gralobe-legend-title") || n.querySelector(".legend-title"), s = n.querySelector(".gralobe-legend-gradient") || n.querySelector(".legend-gradient"), o = n.querySelector(".gralobe-legend-min") || n.querySelector(".legend-min"), l = n.querySelector(".gralobe-legend-max") || n.querySelector(".legend-max"), h = n.querySelector(".gralobe-legend-description") || n.querySelector(".legend-description");
5385
5391
  if (!r || !s) return;
5386
- const c = 280, u = 100, f = 20, g = t - c - f, p = i - u - f, d = 12;
5387
- 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(g, p, c, u, d) : e.rect(g, p, c, u), e.fill(), e.stroke(), e.fillStyle = "#44aaff", e.font = "bold 18px Arial, sans-serif", e.fillText(r.textContent || "", g + 16, p + 28);
5388
- const m = g + 16, _ = p + 40, y = c - 32, b = 20, x = s.style.background || "";
5392
+ const c = 280, u = 100, f = 20, m = t - c - f, p = i - u - f, d = 12;
5393
+ 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(m, p, c, u, d) : e.rect(m, p, c, u), e.fill(), e.stroke(), e.fillStyle = "#44aaff", e.font = "bold 18px Arial, sans-serif", e.fillText(r.textContent || "", m + 16, p + 28);
5394
+ const g = m + 16, _ = p + 40, y = c - 32, b = 20, x = s.style.background || "";
5389
5395
  let v = [];
5390
5396
  const P = x.match(/rgba?\([^)]+\)/g);
5391
5397
  if (P && P.length >= 2)
@@ -5395,17 +5401,17 @@ class ro {
5395
5401
  E && E.length >= 2 && (v = E);
5396
5402
  }
5397
5403
  if (v.length >= 2) {
5398
- const E = e.createLinearGradient(m, 0, m + y, 0);
5399
- E.addColorStop(0, v[0]), v.length >= 3 ? (E.addColorStop(0.5, v[1]), E.addColorStop(1, v[2])) : E.addColorStop(1, v[1]), e.fillStyle = E, e.beginPath(), e.roundRect ? e.roundRect(m, _, y, b, 4) : e.rect(m, _, y, b), e.fill();
5404
+ const E = e.createLinearGradient(g, 0, g + y, 0);
5405
+ E.addColorStop(0, v[0]), v.length >= 3 ? (E.addColorStop(0.5, v[1]), E.addColorStop(1, v[2])) : E.addColorStop(1, v[1]), e.fillStyle = E, e.beginPath(), e.roundRect ? e.roundRect(g, _, y, b, 4) : e.rect(g, _, y, b), e.fill();
5400
5406
  } else {
5401
- const E = e.createLinearGradient(m, 0, m + y, 0);
5402
- E.addColorStop(0, "#cc6600"), E.addColorStop(0.5, "#ffaa44"), E.addColorStop(1, "#ffeecc"), e.fillStyle = E, e.beginPath(), e.roundRect ? e.roundRect(m, _, y, b, 4) : e.rect(m, _, y, b), e.fill(), console.log("Legend gradient style:", x);
5407
+ const E = e.createLinearGradient(g, 0, g + y, 0);
5408
+ E.addColorStop(0, "#cc6600"), E.addColorStop(0.5, "#ffaa44"), E.addColorStop(1, "#ffeecc"), e.fillStyle = E, e.beginPath(), e.roundRect ? e.roundRect(g, _, y, b, 4) : e.rect(g, _, y, b), e.fill(), console.log("Legend gradient style:", x);
5403
5409
  }
5404
- if (e.fillStyle = "#cccccc", e.font = "14px Arial, sans-serif", o && e.fillText(o.textContent || "", m, p + 78), l) {
5410
+ if (e.fillStyle = "#cccccc", e.font = "14px Arial, sans-serif", o && e.fillText(o.textContent || "", g, p + 78), l) {
5405
5411
  const E = l.textContent || "", C = e.measureText(E).width;
5406
- e.fillText(E, m + y - C, p + 78);
5412
+ e.fillText(E, g + y - C, p + 78);
5407
5413
  }
5408
- h && h.textContent && (e.fillStyle = "#888888", e.font = "italic 12px Arial, sans-serif", e.fillText(h.textContent, m, p + 95));
5414
+ h && h.textContent && (e.fillStyle = "#888888", e.font = "italic 12px Arial, sans-serif", e.fillText(h.textContent, g, p + 95));
5409
5415
  } catch (n) {
5410
5416
  console.warn("Failed to draw legend on canvas:", n);
5411
5417
  }
@@ -5524,8 +5530,8 @@ class ro {
5524
5530
  try {
5525
5531
  const r = this.frames[0], s = r.width, o = r.height, l = Za(r.data, 256), h = Qa();
5526
5532
  for (let p = 0; p < this.frames.length; p++) {
5527
- const d = this.frames[p], m = Wa(d.data, l);
5528
- h.writeFrame(m, s, o, {
5533
+ const d = this.frames[p], g = Wa(d.data, l);
5534
+ h.writeFrame(g, s, o, {
5529
5535
  palette: p === 0 ? l : void 0,
5530
5536
  // Only first frame needs palette
5531
5537
  delay: n,
@@ -5534,8 +5540,8 @@ class ro {
5534
5540
  }), p % 10 === 0 && await new Promise((_) => setTimeout(_, 0));
5535
5541
  }
5536
5542
  h.finish();
5537
- const c = h.bytes(), u = new Blob([c], { type: "image/gif" }), f = URL.createObjectURL(u), g = i || `globe-${Date.now()}.gif`;
5538
- this.downloadFile(f, g), setTimeout(() => URL.revokeObjectURL(f), 1e3), console.log(`GIF saved: ${g} (${this.frames.length} frames, ${(u.size / 1024).toFixed(1)}KB)`);
5543
+ const c = h.bytes(), u = new Blob([c], { type: "image/gif" }), f = URL.createObjectURL(u), m = i || `globe-${Date.now()}.gif`;
5544
+ this.downloadFile(f, m), setTimeout(() => URL.revokeObjectURL(f), 1e3), console.log(`GIF saved: ${m} (${this.frames.length} frames, ${(u.size / 1024).toFixed(1)}KB)`);
5539
5545
  } catch (r) {
5540
5546
  console.error("Failed to generate GIF:", r);
5541
5547
  }
@@ -6776,11 +6782,11 @@ class wo {
6776
6782
  }
6777
6783
  async init() {
6778
6784
  const e = this.config.width || this.container.clientWidth || 800, t = this.config.height || this.container.clientHeight || 600;
6779
- this.scene = new A.Scene(), this.scene.background = new A.Color(2066), this.camera = new A.PerspectiveCamera(50, e / t, 1, 1e3), this.camera.position.set(
6785
+ this.scene = new A.Scene(), this.scene.background = new A.Color(2066), this.camera = new A.PerspectiveCamera(50, e / t, 0.1, 1e3), this.camera.position.set(
6780
6786
  0,
6781
6787
  0,
6782
6788
  this.config.initialView === "flat" ? 350 : 150
6783
- ), this.renderer = new A.WebGLRenderer({ antialias: !0 }), this.renderer.setSize(e, t), this.renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)), this.container.appendChild(this.renderer.domElement), this.controls = new ga(this.camera, this.renderer.domElement), this.controls.enableDamping = !0, this.controls.minDistance = 10, this.controls.maxDistance = 400;
6789
+ ), this.renderer = new A.WebGLRenderer({ antialias: !0 }), this.renderer.setSize(e, t), this.renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)), this.container.appendChild(this.renderer.domElement), this.controls = new ga(this.camera, this.renderer.domElement), this.controls.enableDamping = !0, this.controls.minDistance = 2, this.controls.maxDistance = 400;
6784
6790
  try {
6785
6791
  this.choropleth = new it(
6786
6792
  this.config.topology,
@@ -7002,7 +7008,7 @@ class wo {
7002
7008
  const e = this.choropleth?.getBounds(), t = Math.PI * 2 * Q, i = Math.PI * Q;
7003
7009
  let n = 0, r = 0, s = t, o = i;
7004
7010
  if (e) {
7005
- const [g, p, d, m] = e, _ = g / 180 * (t / 2), y = d / 180 * (t / 2), b = p / 90 * (i / 2), x = m / 90 * (i / 2);
7011
+ const [m, p, d, g] = e, _ = m / 180 * (t / 2), y = d / 180 * (t / 2), b = p / 90 * (i / 2), x = g / 90 * (i / 2);
7006
7012
  n = (_ + y) / 2, r = (b + x) / 2, s = (y - _) * 1.2, o = (x - b) * 1.2;
7007
7013
  }
7008
7014
  const l = this.camera.fov * Math.PI / 180, h = this.camera.aspect, c = o / 2 / Math.tan(l / 2), u = s / (2 * Math.tan(l / 2) * h), f = Math.max(c, u);