gralobe 1.0.6 → 1.0.9

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
@@ -1,6 +1,6 @@
1
- import * as M from "three";
2
- import { Controls as Or, Vector3 as se, MOUSE as tt, TOUCH as Qe, Quaternion as Yi, Spherical as Zi, Vector2 as de, Ray as Lr, Plane as kr, MathUtils as Ur, Matrix4 as An, Object3D as Fr } from "three";
3
- const Ki = { type: "change" }, Pi = { type: "start" }, Tn = { type: "end" }, Mt = new Lr(), Xi = new kr(), Nr = Math.cos(70 * Ur.DEG2RAD), Y = new se(), J = 2 * Math.PI, O = {
1
+ import * as S from "three";
2
+ import { Controls as Lr, Vector3 as se, MOUSE as tt, TOUCH as Qe, Quaternion as Yi, Spherical as Zi, Vector2 as de, Ray as kr, Plane as Ur, MathUtils as Fr, Matrix4 as An, Object3D as Nr } from "three";
3
+ const Ki = { type: "change" }, Ci = { type: "start" }, Tn = { type: "end" }, Mt = new kr(), Xi = new Ur(), zr = Math.cos(70 * Fr.DEG2RAD), Y = new se(), J = 2 * Math.PI, I = {
4
4
  NONE: -1,
5
5
  ROTATE: 0,
6
6
  DOLLY: 1,
@@ -10,7 +10,7 @@ const Ki = { type: "change" }, Pi = { type: "start" }, Tn = { type: "end" }, Mt
10
10
  TOUCH_DOLLY_PAN: 5,
11
11
  TOUCH_DOLLY_ROTATE: 6
12
12
  }, Xt = 1e-6;
13
- class zr extends Or {
13
+ class $r extends Lr {
14
14
  /**
15
15
  * Constructs a new controls instance.
16
16
  *
@@ -18,7 +18,7 @@ class zr extends Or {
18
18
  * @param {?HTMLElement} domElement - The HTML element used for event listeners.
19
19
  */
20
20
  constructor(e, t = null) {
21
- super(e, t), this.state = O.NONE, this.target = new se(), this.cursor = new se(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: tt.ROTATE, MIDDLE: tt.DOLLY, RIGHT: tt.PAN }, this.touches = { ONE: Qe.ROTATE, TWO: Qe.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new se(), this._lastQuaternion = new Yi(), this._lastTargetPosition = new se(), this._quat = new Yi().setFromUnitVectors(e.up, new se(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Zi(), this._sphericalDelta = new Zi(), this._scale = 1, this._panOffset = new se(), this._rotateStart = new de(), this._rotateEnd = new de(), this._rotateDelta = new de(), this._panStart = new de(), this._panEnd = new de(), this._panDelta = new de(), this._dollyStart = new de(), this._dollyEnd = new de(), this._dollyDelta = new de(), this._dollyDirection = new se(), this._mouse = new de(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = $r.bind(this), this._onPointerDown = Br.bind(this), this._onPointerUp = Gr.bind(this), this._onContextMenu = Xr.bind(this), this._onMouseWheel = jr.bind(this), this._onKeyDown = Yr.bind(this), this._onTouchStart = Zr.bind(this), this._onTouchMove = Kr.bind(this), this._onMouseDown = Vr.bind(this), this._onMouseMove = Hr.bind(this), this._interceptControlDown = Wr.bind(this), this._interceptControlUp = qr.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
21
+ super(e, t), this.state = I.NONE, this.target = new se(), this.cursor = new se(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: tt.ROTATE, MIDDLE: tt.DOLLY, RIGHT: tt.PAN }, this.touches = { ONE: Qe.ROTATE, TWO: Qe.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new se(), this._lastQuaternion = new Yi(), this._lastTargetPosition = new se(), this._quat = new Yi().setFromUnitVectors(e.up, new se(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Zi(), this._sphericalDelta = new Zi(), this._scale = 1, this._panOffset = new se(), this._rotateStart = new de(), this._rotateEnd = new de(), this._rotateDelta = new de(), this._panStart = new de(), this._panEnd = new de(), this._panDelta = new de(), this._dollyStart = new de(), this._dollyEnd = new de(), this._dollyDelta = new de(), this._dollyDirection = new se(), this._mouse = new de(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Gr.bind(this), this._onPointerDown = Br.bind(this), this._onPointerUp = Vr.bind(this), this._onContextMenu = Wr.bind(this), this._onMouseWheel = Yr.bind(this), this._onKeyDown = Zr.bind(this), this._onTouchStart = Kr.bind(this), this._onTouchMove = Xr.bind(this), this._onMouseDown = Hr.bind(this), this._onMouseMove = jr.bind(this), this._interceptControlDown = qr.bind(this), this._interceptControlUp = Qr.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
22
22
  }
23
23
  connect(e) {
24
24
  super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
@@ -79,11 +79,11 @@ class zr extends Or {
79
79
  * was called, or the initial state.
80
80
  */
81
81
  reset() {
82
- this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Ki), this.update(), this.state = O.NONE;
82
+ this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Ki), this.update(), this.state = I.NONE;
83
83
  }
84
84
  update(e = null) {
85
85
  const t = this.object.position;
86
- Y.copy(t).sub(this.target), Y.applyQuaternion(this._quat), this._spherical.setFromVector3(Y), this.autoRotate && this.state === O.NONE && this._rotateLeft(this._getAutoRotationAngle(e)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
86
+ Y.copy(t).sub(this.target), Y.applyQuaternion(this._quat), this._spherical.setFromVector3(Y), this.autoRotate && this.state === I.NONE && this._rotateLeft(this._getAutoRotationAngle(e)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
87
87
  let i = this.minAzimuthAngle, n = this.maxAzimuthAngle;
88
88
  isFinite(i) && isFinite(n) && (i < -Math.PI ? i += J : i > Math.PI && (i -= J), n < -Math.PI ? n += J : n > Math.PI && (n -= J), i <= n ? this._spherical.theta = Math.max(i, Math.min(n, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (i + n) / 2 ? Math.max(i, this._spherical.theta) : Math.min(n, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
89
89
  let r = !1;
@@ -109,7 +109,7 @@ class zr extends Or {
109
109
  c.unproject(this.object), this.object.position.sub(c).add(o), this.object.updateMatrixWorld(), s = Y.length();
110
110
  } else
111
111
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
112
- s !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(s).add(this.object.position) : (Mt.origin.copy(this.object.position), Mt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Mt.direction)) < Nr ? this.object.lookAt(this.target) : (Xi.setFromNormalAndCoplanarPoint(this.object.up, this.target), Mt.intersectPlane(Xi, this.target))));
112
+ s !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(s).add(this.object.position) : (Mt.origin.copy(this.object.position), Mt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Mt.direction)) < zr ? this.object.lookAt(this.target) : (Xi.setFromNormalAndCoplanarPoint(this.object.up, this.target), Mt.intersectPlane(Xi, this.target))));
113
113
  } else if (this.object.isOrthographicCamera) {
114
114
  const s = this.object.zoom;
115
115
  this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), s !== this.object.zoom && (this.object.updateProjectionMatrix(), r = !0);
@@ -309,13 +309,13 @@ class zr extends Or {
309
309
  function Br(a) {
310
310
  this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(a.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(a) && (this._addPointer(a), a.pointerType === "touch" ? this._onTouchStart(a) : this._onMouseDown(a)));
311
311
  }
312
- function $r(a) {
312
+ function Gr(a) {
313
313
  this.enabled !== !1 && (a.pointerType === "touch" ? this._onTouchMove(a) : this._onMouseMove(a));
314
314
  }
315
- function Gr(a) {
315
+ function Vr(a) {
316
316
  switch (this._removePointer(a), this._pointers.length) {
317
317
  case 0:
318
- this.domElement.releasePointerCapture(a.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Tn), this.state = O.NONE;
318
+ this.domElement.releasePointerCapture(a.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Tn), this.state = I.NONE;
319
319
  break;
320
320
  case 1:
321
321
  const e = this._pointers[0], t = this._pointerPositions[e];
@@ -323,7 +323,7 @@ function Gr(a) {
323
323
  break;
324
324
  }
325
325
  }
326
- function Vr(a) {
326
+ function Hr(a) {
327
327
  let e;
328
328
  switch (a.button) {
329
329
  case 0:
@@ -341,117 +341,117 @@ function Vr(a) {
341
341
  switch (e) {
342
342
  case tt.DOLLY:
343
343
  if (this.enableZoom === !1) return;
344
- this._handleMouseDownDolly(a), this.state = O.DOLLY;
344
+ this._handleMouseDownDolly(a), this.state = I.DOLLY;
345
345
  break;
346
346
  case tt.ROTATE:
347
347
  if (a.ctrlKey || a.metaKey || a.shiftKey) {
348
348
  if (this.enablePan === !1) return;
349
- this._handleMouseDownPan(a), this.state = O.PAN;
349
+ this._handleMouseDownPan(a), this.state = I.PAN;
350
350
  } else {
351
351
  if (this.enableRotate === !1) return;
352
- this._handleMouseDownRotate(a), this.state = O.ROTATE;
352
+ this._handleMouseDownRotate(a), this.state = I.ROTATE;
353
353
  }
354
354
  break;
355
355
  case tt.PAN:
356
356
  if (a.ctrlKey || a.metaKey || a.shiftKey) {
357
357
  if (this.enableRotate === !1) return;
358
- this._handleMouseDownRotate(a), this.state = O.ROTATE;
358
+ this._handleMouseDownRotate(a), this.state = I.ROTATE;
359
359
  } else {
360
360
  if (this.enablePan === !1) return;
361
- this._handleMouseDownPan(a), this.state = O.PAN;
361
+ this._handleMouseDownPan(a), this.state = I.PAN;
362
362
  }
363
363
  break;
364
364
  default:
365
- this.state = O.NONE;
365
+ this.state = I.NONE;
366
366
  }
367
- this.state !== O.NONE && this.dispatchEvent(Pi);
367
+ this.state !== I.NONE && this.dispatchEvent(Ci);
368
368
  }
369
- function Hr(a) {
369
+ function jr(a) {
370
370
  switch (this.state) {
371
- case O.ROTATE:
371
+ case I.ROTATE:
372
372
  if (this.enableRotate === !1) return;
373
373
  this._handleMouseMoveRotate(a);
374
374
  break;
375
- case O.DOLLY:
375
+ case I.DOLLY:
376
376
  if (this.enableZoom === !1) return;
377
377
  this._handleMouseMoveDolly(a);
378
378
  break;
379
- case O.PAN:
379
+ case I.PAN:
380
380
  if (this.enablePan === !1) return;
381
381
  this._handleMouseMovePan(a);
382
382
  break;
383
383
  }
384
384
  }
385
- function jr(a) {
386
- this.enabled === !1 || this.enableZoom === !1 || this.state !== O.NONE || (a.preventDefault(), this.dispatchEvent(Pi), this._handleMouseWheel(this._customWheelEvent(a)), this.dispatchEvent(Tn));
387
- }
388
385
  function Yr(a) {
389
- this.enabled !== !1 && this._handleKeyDown(a);
386
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== I.NONE || (a.preventDefault(), this.dispatchEvent(Ci), this._handleMouseWheel(this._customWheelEvent(a)), this.dispatchEvent(Tn));
390
387
  }
391
388
  function Zr(a) {
389
+ this.enabled !== !1 && this._handleKeyDown(a);
390
+ }
391
+ function Kr(a) {
392
392
  switch (this._trackPointer(a), this._pointers.length) {
393
393
  case 1:
394
394
  switch (this.touches.ONE) {
395
395
  case Qe.ROTATE:
396
396
  if (this.enableRotate === !1) return;
397
- this._handleTouchStartRotate(a), this.state = O.TOUCH_ROTATE;
397
+ this._handleTouchStartRotate(a), this.state = I.TOUCH_ROTATE;
398
398
  break;
399
399
  case Qe.PAN:
400
400
  if (this.enablePan === !1) return;
401
- this._handleTouchStartPan(a), this.state = O.TOUCH_PAN;
401
+ this._handleTouchStartPan(a), this.state = I.TOUCH_PAN;
402
402
  break;
403
403
  default:
404
- this.state = O.NONE;
404
+ this.state = I.NONE;
405
405
  }
406
406
  break;
407
407
  case 2:
408
408
  switch (this.touches.TWO) {
409
409
  case Qe.DOLLY_PAN:
410
410
  if (this.enableZoom === !1 && this.enablePan === !1) return;
411
- this._handleTouchStartDollyPan(a), this.state = O.TOUCH_DOLLY_PAN;
411
+ this._handleTouchStartDollyPan(a), this.state = I.TOUCH_DOLLY_PAN;
412
412
  break;
413
413
  case Qe.DOLLY_ROTATE:
414
414
  if (this.enableZoom === !1 && this.enableRotate === !1) return;
415
- this._handleTouchStartDollyRotate(a), this.state = O.TOUCH_DOLLY_ROTATE;
415
+ this._handleTouchStartDollyRotate(a), this.state = I.TOUCH_DOLLY_ROTATE;
416
416
  break;
417
417
  default:
418
- this.state = O.NONE;
418
+ this.state = I.NONE;
419
419
  }
420
420
  break;
421
421
  default:
422
- this.state = O.NONE;
422
+ this.state = I.NONE;
423
423
  }
424
- this.state !== O.NONE && this.dispatchEvent(Pi);
424
+ this.state !== I.NONE && this.dispatchEvent(Ci);
425
425
  }
426
- function Kr(a) {
426
+ function Xr(a) {
427
427
  switch (this._trackPointer(a), this.state) {
428
- case O.TOUCH_ROTATE:
428
+ case I.TOUCH_ROTATE:
429
429
  if (this.enableRotate === !1) return;
430
430
  this._handleTouchMoveRotate(a), this.update();
431
431
  break;
432
- case O.TOUCH_PAN:
432
+ case I.TOUCH_PAN:
433
433
  if (this.enablePan === !1) return;
434
434
  this._handleTouchMovePan(a), this.update();
435
435
  break;
436
- case O.TOUCH_DOLLY_PAN:
436
+ case I.TOUCH_DOLLY_PAN:
437
437
  if (this.enableZoom === !1 && this.enablePan === !1) return;
438
438
  this._handleTouchMoveDollyPan(a), this.update();
439
439
  break;
440
- case O.TOUCH_DOLLY_ROTATE:
440
+ case I.TOUCH_DOLLY_ROTATE:
441
441
  if (this.enableZoom === !1 && this.enableRotate === !1) return;
442
442
  this._handleTouchMoveDollyRotate(a), this.update();
443
443
  break;
444
444
  default:
445
- this.state = O.NONE;
445
+ this.state = I.NONE;
446
446
  }
447
447
  }
448
- function Xr(a) {
448
+ function Wr(a) {
449
449
  this.enabled !== !1 && a.preventDefault();
450
450
  }
451
- function Wr(a) {
451
+ function qr(a) {
452
452
  a.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
453
453
  }
454
- function qr(a) {
454
+ function Qr(a) {
455
455
  a.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
456
456
  }
457
457
  function we(a) {
@@ -473,11 +473,11 @@ var he = {
473
473
  duration: 0.5,
474
474
  overwrite: !1,
475
475
  delay: 0
476
- }, Ci, K, N, fe = 1e8, k = 1 / fe, oi = Math.PI * 2, Qr = oi / 4, Jr = 0, Dn = Math.sqrt, es = Math.cos, ts = Math.sin, Z = function(e) {
476
+ }, Pi, K, N, fe = 1e8, k = 1 / fe, oi = Math.PI * 2, Jr = oi / 4, es = 0, Dn = Math.sqrt, ts = Math.cos, is = Math.sin, Z = function(e) {
477
477
  return typeof e == "string";
478
478
  }, G = function(e) {
479
479
  return typeof e == "function";
480
- }, Ce = function(e) {
480
+ }, Pe = function(e) {
481
481
  return typeof e == "number";
482
482
  }, Ai = function(e) {
483
483
  return typeof e > "u";
@@ -490,7 +490,7 @@ var he = {
490
490
  }, Rt = function(e) {
491
491
  return G(e) || Z(e);
492
492
  }, Mn = typeof ArrayBuffer == "function" && ArrayBuffer.isView || function() {
493
- }, W = Array.isArray, li = /(?:-?\.?\d|\.)+/gi, Rn = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, Je = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, Wt = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, In = /[+-]=-?[.\d]+/, On = /[^,'"\[\]\s]+/gi, is = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, z, _e, hi, Si, ce = {}, zt = {}, Ln, kn = function(e) {
493
+ }, W = Array.isArray, li = /(?:-?\.?\d|\.)+/gi, Rn = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, Je = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, Wt = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, On = /[+-]=-?[.\d]+/, In = /[^,'"\[\]\s]+/gi, ns = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, z, _e, hi, Si, ce = {}, zt = {}, Ln, kn = function(e) {
494
494
  return (zt = at(e, ce)) && re;
495
495
  }, Di = function(e, t) {
496
496
  return console.warn("Invalid property", e, "set to", t, "Missing plugin? gsap.registerPlugin()");
@@ -500,16 +500,16 @@ var he = {
500
500
  return e && (ce[e] = t) && zt && (zt[e] = t) || ce;
501
501
  }, vt = function() {
502
502
  return 0;
503
- }, ns = {
503
+ }, rs = {
504
504
  suppressEvents: !0,
505
505
  isStart: !0,
506
506
  kill: !1
507
507
  }, kt = {
508
508
  suppressEvents: !0,
509
509
  kill: !1
510
- }, rs = {
510
+ }, ss = {
511
511
  suppressEvents: !0
512
- }, Mi = {}, Re = [], ci = {}, Fn, ae = {}, qt = {}, Wi = 30, Ut = [], Ri = "", Ii = function(e) {
512
+ }, Mi = {}, Re = [], ci = {}, Fn, ae = {}, qt = {}, Wi = 30, Ut = [], Ri = "", Oi = function(e) {
513
513
  var t = e[0], i, n;
514
514
  if (Ee(t) || G(t) || (e = [e]), !(i = (t._gsap || {}).harness)) {
515
515
  for (n = Ut.length; n-- && !Ut[n].targetTest(t); )
@@ -520,7 +520,7 @@ var he = {
520
520
  e[n] && (e[n]._gsap || (e[n]._gsap = new or(e[n], i))) || e.splice(n, 1);
521
521
  return e;
522
522
  }, He = function(e) {
523
- return e._gsap || Ii(me(e))[0]._gsap;
523
+ return e._gsap || Oi(me(e))[0]._gsap;
524
524
  }, Nn = function(e, t, i) {
525
525
  return (i = e[t]) && G(i) ? e[t]() : Ai(i) && e.getAttribute && e.getAttribute(t) || i;
526
526
  }, te = function(e, t) {
@@ -532,28 +532,28 @@ var he = {
532
532
  }, it = function(e, t) {
533
533
  var i = t.charAt(0), n = parseFloat(t.substr(2));
534
534
  return e = parseFloat(e), i === "+" ? e + n : i === "-" ? e - n : i === "*" ? e * n : e / n;
535
- }, ss = function(e, t) {
535
+ }, as = function(e, t) {
536
536
  for (var i = t.length, n = 0; e.indexOf(t[n]) < 0 && ++n < i; )
537
537
  ;
538
538
  return n < i;
539
- }, Bt = function() {
539
+ }, $t = function() {
540
540
  var e = Re.length, t = Re.slice(0), i, n;
541
541
  for (ci = {}, Re.length = 0, i = 0; i < e; i++)
542
542
  n = t[i], n && n._lazy && (n.render(n._lazy[0], n._lazy[1], !0)._lazy = 0);
543
- }, Oi = function(e) {
543
+ }, Ii = function(e) {
544
544
  return !!(e._initted || e._startAt || e.add);
545
545
  }, zn = function(e, t, i, n) {
546
- Re.length && !K && Bt(), e.render(t, i, !!(K && t < 0 && Oi(e))), Re.length && !K && Bt();
547
- }, Bn = function(e) {
548
- var t = parseFloat(e);
549
- return (t || t === 0) && (e + "").match(On).length < 2 ? t : Z(e) ? e.trim() : e;
546
+ Re.length && !K && $t(), e.render(t, i, !!(K && t < 0 && Ii(e))), Re.length && !K && $t();
550
547
  }, $n = function(e) {
548
+ var t = parseFloat(e);
549
+ return (t || t === 0) && (e + "").match(In).length < 2 ? t : Z(e) ? e.trim() : e;
550
+ }, Bn = function(e) {
551
551
  return e;
552
552
  }, ue = function(e, t) {
553
553
  for (var i in t)
554
554
  i in e || (e[i] = t[i]);
555
555
  return e;
556
- }, as = function(e) {
556
+ }, os = function(e) {
557
557
  return function(t, i) {
558
558
  for (var n in i)
559
559
  n in t || n === "duration" && e || n === "ease" || (t[n] = i[n]);
@@ -566,18 +566,18 @@ var he = {
566
566
  for (var i in t)
567
567
  i !== "__proto__" && i !== "constructor" && i !== "prototype" && (e[i] = Ee(t[i]) ? a(e[i] || (e[i] = {}), t[i]) : t[i]);
568
568
  return e;
569
- }, $t = function(e, t) {
569
+ }, Bt = function(e, t) {
570
570
  var i = {}, n;
571
571
  for (n in e)
572
572
  n in t || (i[n] = e[n]);
573
573
  return i;
574
574
  }, yt = function(e) {
575
- var t = e.parent || z, i = e.keyframes ? as(W(e.keyframes)) : ue;
575
+ var t = e.parent || z, i = e.keyframes ? os(W(e.keyframes)) : ue;
576
576
  if (ee(e.inherit))
577
577
  for (; t; )
578
578
  i(e, t.vars.defaults), t = t.parent || t._dp;
579
579
  return e;
580
- }, os = function(e, t) {
580
+ }, ls = function(e, t) {
581
581
  for (var i = e.length, n = i === t.length; n && i-- && e[i] === t[i]; )
582
582
  ;
583
583
  return i < 0;
@@ -591,20 +591,20 @@ var he = {
591
591
  i === void 0 && (i = "_first"), n === void 0 && (n = "_last");
592
592
  var r = t._prev, s = t._next;
593
593
  r ? r._next = s : e[i] === t && (e[i] = s), s ? s._prev = r : e[n] === t && (e[n] = r), t._next = t._prev = t.parent = null;
594
- }, Oe = function(e, t) {
594
+ }, Ie = function(e, t) {
595
595
  e.parent && (!t || e.parent.autoRemoveChildren) && e.parent.remove && e.parent.remove(e), e._act = 0;
596
596
  }, je = function(e, t) {
597
597
  if (e && (!t || t._end > e._dur || t._start < 0))
598
598
  for (var i = e; i; )
599
599
  i._dirty = 1, i = i.parent;
600
600
  return e;
601
- }, ls = function(e) {
601
+ }, hs = function(e) {
602
602
  for (var t = e.parent; t && t.parent; )
603
603
  t._dirty = 1, t.totalDuration(), t = t.parent;
604
604
  return e;
605
605
  }, ui = function(e, t, i, n) {
606
606
  return e._startAt && (K ? e._startAt.revert(kt) : e.vars.immediateRender && !e.vars.autoRevert || e._startAt.render(t, !0, n));
607
- }, hs = function a(e) {
607
+ }, cs = function a(e) {
608
608
  return !e || e._ts && a(e.parent);
609
609
  }, Qi = function(e) {
610
610
  return e._repeat ? ot(e._tTime, e = e.duration() + e._rDelay) * e : 0;
@@ -627,7 +627,7 @@ var he = {
627
627
  e._zTime = -k;
628
628
  }
629
629
  }, ye = function(e, t, i, n) {
630
- return t.parent && Oe(t), t._start = j((Ce(i) ? i : i || e !== z ? pe(e, i, t) : e._time) + t._delay), t._end = j(t._start + (t.totalDuration() / Math.abs(t.timeScale()) || 0)), Gn(e, t, "_first", "_last", e._sort ? "_start" : 0), di(t) || (e._recent = t), n || Vn(e, t), e._ts < 0 && Kt(e, e._tTime), e;
630
+ return t.parent && Ie(t), t._start = j((Pe(i) ? i : i || e !== z ? pe(e, i, t) : e._time) + t._delay), t._end = j(t._start + (t.totalDuration() / Math.abs(t.timeScale()) || 0)), Gn(e, t, "_first", "_last", e._sort ? "_start" : 0), di(t) || (e._recent = t), n || Vn(e, t), e._ts < 0 && Kt(e, e._tTime), e;
631
631
  }, Hn = function(e, t) {
632
632
  return (ce.ScrollTrigger || Di("scrollTrigger", t)) && ce.ScrollTrigger.create(t, e);
633
633
  }, jn = function(e, t, i, n, r) {
@@ -635,22 +635,22 @@ var he = {
635
635
  return 1;
636
636
  if (!i && e._pt && !K && (e._dur && e.vars.lazy !== !1 || !e._dur && e.vars.lazy) && Fn !== oe.frame)
637
637
  return Re.push(e), e._lazy = [r, n], 1;
638
- }, cs = function a(e) {
638
+ }, us = function a(e) {
639
639
  var t = e.parent;
640
640
  return t && t._ts && t._initted && !t._lock && (t.rawTime() < 0 || a(t));
641
641
  }, di = function(e) {
642
642
  var t = e.data;
643
643
  return t === "isFromStart" || t === "isStart";
644
- }, us = function(e, t, i, n) {
645
- var r = e.ratio, s = t < 0 || !t && (!e._start && cs(e) && !(!e._initted && di(e)) || (e._ts < 0 || e._dp._ts < 0) && !di(e)) ? 0 : 1, o = e._rDelay, l = 0, c, h, u;
644
+ }, ds = function(e, t, i, n) {
645
+ var r = e.ratio, s = t < 0 || !t && (!e._start && us(e) && !(!e._initted && di(e)) || (e._ts < 0 || e._dp._ts < 0) && !di(e)) ? 0 : 1, o = e._rDelay, l = 0, c, h, u;
646
646
  if (o && e._repeat && (l = Dt(0, e._tDur, t), h = ot(l, o), e._yoyo && h & 1 && (s = 1 - s), h !== ot(e._tTime, o) && (r = 1 - s, e.vars.repeatRefresh && e._initted && e.invalidate())), s !== r || K || n || e._zTime === k || !t && e._zTime) {
647
647
  if (!e._initted && jn(e, t, n, i, l))
648
648
  return;
649
649
  for (u = e._zTime, e._zTime = t || (i ? k : 0), i || (i = t && !u), e.ratio = s, e._from && (s = 1 - s), e._time = 0, e._tTime = l, c = e._pt; c; )
650
650
  c.r(s, c.d), c = c._next;
651
- t < 0 && ui(e, t, i, !0), e._onUpdate && !i && le(e, "onUpdate"), l && e._repeat && !i && e.parent && le(e, "onRepeat"), (t >= e._tDur || t < 0) && e.ratio === s && (s && Oe(e, 1), !i && !K && (le(e, s ? "onComplete" : "onReverseComplete", !0), e._prom && e._prom()));
651
+ t < 0 && ui(e, t, i, !0), e._onUpdate && !i && le(e, "onUpdate"), l && e._repeat && !i && e.parent && le(e, "onRepeat"), (t >= e._tDur || t < 0) && e.ratio === s && (s && Ie(e, 1), !i && !K && (le(e, s ? "onComplete" : "onReverseComplete", !0), e._prom && e._prom()));
652
652
  } else e._zTime || (e._zTime = t);
653
- }, ds = function(e, t, i) {
653
+ }, ps = function(e, t, i) {
654
654
  var n;
655
655
  if (i > t)
656
656
  for (n = e._first; n && n._start <= i; ) {
@@ -669,15 +669,15 @@ var he = {
669
669
  return o && !n && (e._time *= s / e._dur), e._dur = s, e._tDur = r ? r < 0 ? 1e10 : j(s * (r + 1) + e._rDelay * r) : s, o > 0 && !n && Kt(e, e._tTime = e._tDur * o), e.parent && Zt(e), i || je(e.parent, e), e;
670
670
  }, Ji = function(e) {
671
671
  return e instanceof q ? je(e) : lt(e, e._dur);
672
- }, ps = {
672
+ }, fs = {
673
673
  _start: 0,
674
674
  endTime: vt,
675
675
  totalDuration: vt
676
676
  }, pe = function a(e, t, i) {
677
- var n = e.labels, r = e._recent || ps, s = e.duration() >= fe ? r.endTime(!1) : e._dur, o, l, c;
677
+ var n = e.labels, r = e._recent || fs, s = e.duration() >= fe ? r.endTime(!1) : e._dur, o, l, c;
678
678
  return Z(t) && (isNaN(t) || t in n) ? (l = t.charAt(0), c = t.substr(-1) === "%", o = t.indexOf("="), l === "<" || l === ">" ? (o >= 0 && (t = t.replace(/=/, "")), (l === "<" ? r._start : r.endTime(r._repeat >= 0)) + (parseFloat(t.substr(1)) || 0) * (c ? (o < 0 ? r : i).totalDuration() / 100 : 1)) : o < 0 ? (t in n || (n[t] = s), n[t]) : (l = parseFloat(t.charAt(o - 1) + t.substr(o + 1)), c && i && (l = l / 100 * (W(i) ? i[0] : i).totalDuration()), o > 1 ? a(e, t.substr(0, o - 1), i) + l : s + l)) : t == null ? s : +t;
679
679
  }, xt = function(e, t, i) {
680
- var n = Ce(t[1]), r = (n ? 2 : 1) + (e < 2 ? 0 : 1), s = t[r], o, l;
680
+ var n = Pe(t[1]), r = (n ? 2 : 1) + (e < 2 ? 0 : 1), s = t[r], o, l;
681
681
  if (n && (s.duration = t[1]), s.parent = i, e) {
682
682
  for (o = s, l = i; l && !("immediateRender" in o); )
683
683
  o = l.vars.defaults || {}, l = ee(l.vars.inherit) && l.parent;
@@ -689,20 +689,20 @@ var he = {
689
689
  }, Dt = function(e, t, i) {
690
690
  return i < e ? e : i > t ? t : i;
691
691
  }, X = function(e, t) {
692
- return !Z(e) || !(t = is.exec(e)) ? "" : t[1];
693
- }, fs = function(e, t, i) {
692
+ return !Z(e) || !(t = ns.exec(e)) ? "" : t[1];
693
+ }, ms = function(e, t, i) {
694
694
  return ke(i, function(n) {
695
695
  return Dt(e, t, n);
696
696
  });
697
697
  }, pi = [].slice, Yn = function(e, t) {
698
698
  return e && Ee(e) && "length" in e && (!t && !e.length || e.length - 1 in e && Ee(e[0])) && !e.nodeType && e !== _e;
699
- }, ms = function(e, t, i) {
699
+ }, gs = function(e, t, i) {
700
700
  return i === void 0 && (i = []), e.forEach(function(n) {
701
701
  var r;
702
702
  return Z(n) && !t || Yn(n, 1) ? (r = i).push.apply(r, me(n)) : i.push(n);
703
703
  }) || i;
704
704
  }, me = function(e, t, i) {
705
- return N && !t && N.selector ? N.selector(e) : Z(e) && !i && (hi || !ht()) ? pi.call((t || Si).querySelectorAll(e), 0) : W(e) ? ms(e, i) : Yn(e) ? pi.call(e, 0) : e ? [e] : [];
705
+ return N && !t && N.selector ? N.selector(e) : Z(e) && !i && (hi || !ht()) ? pi.call((t || Si).querySelectorAll(e), 0) : W(e) ? gs(e, i) : Yn(e) ? pi.call(e, 0) : e ? [e] : [];
706
706
  }, fi = function(e) {
707
707
  return e = me(e)[0] || Et("Invalid scope") || {}, function(t) {
708
708
  var i = e.current || e.nativeElement || e;
@@ -723,16 +723,16 @@ var he = {
723
723
  edges: 0.5,
724
724
  end: 1
725
725
  }[n] || 0 : !o && l && (h = n[0], u = n[1]), function(p, m, f) {
726
- var d = (f || t).length, g = s[d], _, y, x, b, E, P, w, C, v;
726
+ var d = (f || t).length, g = s[d], _, y, x, E, b, C, v, P, w;
727
727
  if (!g) {
728
- if (v = t.grid === "auto" ? 0 : (t.grid || [1, fe])[1], !v) {
729
- for (w = -fe; w < (w = f[v++].getBoundingClientRect().left) && v < d; )
728
+ if (w = t.grid === "auto" ? 0 : (t.grid || [1, fe])[1], !w) {
729
+ for (v = -fe; v < (v = f[w++].getBoundingClientRect().left) && w < d; )
730
730
  ;
731
- v < d && v--;
731
+ w < d && w--;
732
732
  }
733
- for (g = s[d] = [], _ = l ? Math.min(v, d) * h - 0.5 : n % v, y = v === fe ? 0 : l ? d * u / v - 0.5 : n / v | 0, w = 0, C = fe, P = 0; P < d; P++)
734
- x = P % v - _, b = y - (P / v | 0), g[P] = E = c ? Math.abs(c === "y" ? b : x) : Dn(x * x + b * b), E > w && (w = E), E < C && (C = E);
735
- n === "random" && Zn(g), g.max = w - C, g.min = C, g.v = d = (parseFloat(t.amount) || parseFloat(t.each) * (v > d ? d - 1 : c ? c === "y" ? d / v : v : Math.max(v, d / v)) || 0) * (n === "edges" ? -1 : 1), g.b = d < 0 ? r - d : r, g.u = X(t.amount || t.each) || 0, i = i && d < 0 ? rr(i) : i;
733
+ for (g = s[d] = [], _ = l ? Math.min(w, d) * h - 0.5 : n % w, y = w === fe ? 0 : l ? d * u / w - 0.5 : n / w | 0, v = 0, P = fe, C = 0; C < d; C++)
734
+ x = C % w - _, E = y - (C / w | 0), g[C] = b = c ? Math.abs(c === "y" ? E : x) : Dn(x * x + E * E), b > v && (v = b), b < P && (P = b);
735
+ n === "random" && Zn(g), g.max = v - P, g.min = P, g.v = d = (parseFloat(t.amount) || parseFloat(t.each) * (w > d ? d - 1 : c ? c === "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 ? rr(i) : i;
736
736
  }
737
737
  return d = (g[p] - g.min) / g.max || 0, j(g.b + (i ? i(d) : d) * g.v) + g.u;
738
738
  };
@@ -740,22 +740,22 @@ var he = {
740
740
  var t = Math.pow(10, ((e + "").split(".")[1] || "").length);
741
741
  return function(i) {
742
742
  var n = j(Math.round(parseFloat(i) / e) * e * t);
743
- return (n - n % 1) / t + (Ce(i) ? 0 : X(i));
743
+ return (n - n % 1) / t + (Pe(i) ? 0 : X(i));
744
744
  };
745
745
  }, Xn = function(e, t) {
746
746
  var i = W(e), n, r;
747
- return !i && Ee(e) && (n = i = e.radius || fe, e.values ? (e = me(e.values), (r = !Ce(e[0])) && (n *= n)) : e = mi(e.increment)), ke(t, i ? G(e) ? function(s) {
747
+ return !i && Ee(e) && (n = i = e.radius || fe, e.values ? (e = me(e.values), (r = !Pe(e[0])) && (n *= n)) : e = mi(e.increment)), ke(t, i ? G(e) ? function(s) {
748
748
  return r = e(s), Math.abs(r - s) <= n ? r : s;
749
749
  } : function(s) {
750
750
  for (var o = parseFloat(r ? s.x : s), l = parseFloat(r ? s.y : 0), c = fe, h = 0, u = e.length, p, m; u--; )
751
751
  r ? (p = e[u].x - o, m = e[u].y - l, p = p * p + m * m) : p = Math.abs(e[u] - o), p < c && (c = p, h = u);
752
- return h = !n || c <= n ? e[h] : s, r || h === s || Ce(s) ? h : h + X(s);
752
+ return h = !n || c <= n ? e[h] : s, r || h === s || Pe(s) ? h : h + X(s);
753
753
  } : mi(e));
754
754
  }, Wn = function(e, t, i, n) {
755
755
  return ke(W(e) ? !t : i === !0 ? !!(i = 0) : !n, function() {
756
756
  return W(e) ? e[~~(Math.random() * e.length)] : (i = i || 1e-5) && (n = i < 1 ? Math.pow(10, (i + "").length - 2) : 1) && Math.floor(Math.round((e - i / 2 + Math.random() * (t - e + i * 0.99)) / i) * i * n) / n;
757
757
  });
758
- }, gs = function() {
758
+ }, _s = function() {
759
759
  for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
760
760
  t[i] = arguments[i];
761
761
  return function(n) {
@@ -763,36 +763,36 @@ var he = {
763
763
  return s(r);
764
764
  }, n);
765
765
  };
766
- }, _s = function(e, t) {
766
+ }, ys = function(e, t) {
767
767
  return function(i) {
768
768
  return e(parseFloat(i)) + (t || X(i));
769
769
  };
770
- }, ys = function(e, t, i) {
770
+ }, xs = function(e, t, i) {
771
771
  return Qn(e, t, 0, 1, i);
772
772
  }, qn = function(e, t, i) {
773
773
  return ke(i, function(n) {
774
774
  return e[~~t(n)];
775
775
  });
776
- }, xs = function a(e, t, i) {
776
+ }, bs = function a(e, t, i) {
777
777
  var n = t - e;
778
778
  return W(e) ? qn(e, a(0, e.length), t) : ke(i, function(r) {
779
779
  return (n + (r - e) % n) % n + e;
780
780
  });
781
- }, bs = function a(e, t, i) {
781
+ }, Es = function a(e, t, i) {
782
782
  var n = t - e, r = n * 2;
783
783
  return W(e) ? qn(e, a(0, e.length - 1), t) : ke(i, function(s) {
784
784
  return s = (r + (s - e) % r) % r || 0, e + (s > n ? r - s : s);
785
785
  });
786
786
  }, wt = function(e) {
787
787
  for (var t = 0, i = "", n, r, s, o; ~(n = e.indexOf("random(", t)); )
788
- s = e.indexOf(")", n), o = e.charAt(n + 7) === "[", r = e.substr(n + 7, s - n - 7).match(o ? On : li), i += e.substr(t, n - t) + Wn(o ? r : +r[0], o ? 0 : +r[1], +r[2] || 1e-5), t = s + 1;
788
+ s = e.indexOf(")", n), o = e.charAt(n + 7) === "[", r = e.substr(n + 7, s - n - 7).match(o ? In : li), i += e.substr(t, n - t) + Wn(o ? r : +r[0], o ? 0 : +r[1], +r[2] || 1e-5), t = s + 1;
789
789
  return i + e.substr(t, e.length - t);
790
790
  }, Qn = function(e, t, i, n, r) {
791
791
  var s = t - e, o = n - i;
792
792
  return ke(r, function(l) {
793
793
  return i + ((l - e) / s * o || 0);
794
794
  });
795
- }, Es = function a(e, t, i, n) {
795
+ }, vs = function a(e, t, i, n) {
796
796
  var r = isNaN(e + t) ? 0 : function(m) {
797
797
  return (1 - m) * e + m * t;
798
798
  };
@@ -830,9 +830,9 @@ var he = {
830
830
  }, le = function(e, t, i) {
831
831
  var n = e.vars, r = n[t], s = N, o = e._ctx, l, c, h;
832
832
  if (r)
833
- return l = n[t + "Params"], c = n.callbackScope || e, i && Re.length && Bt(), o && (N = o), h = l ? r.apply(c, l) : r.call(c), N = s, h;
833
+ return l = n[t + "Params"], c = n.callbackScope || e, i && Re.length && $t(), o && (N = o), h = l ? r.apply(c, l) : r.call(c), N = s, h;
834
834
  }, mt = function(e) {
835
- return Oe(e), e.scrollTrigger && e.scrollTrigger.kill(!!K), e.progress() < 1 && le(e, "onInterrupt"), e;
835
+ return Ie(e), e.scrollTrigger && e.scrollTrigger.kill(!!K), e.progress() < 1 && le(e, "onInterrupt"), e;
836
836
  }, et, Jn = [], er = function(e) {
837
837
  if (e)
838
838
  if (e = !e.name && e.default || e, Ti() || e.headless) {
@@ -842,8 +842,8 @@ var he = {
842
842
  init: vt,
843
843
  render: Ni,
844
844
  add: Li,
845
- kill: Fs,
846
- modifier: Us,
845
+ kill: Ns,
846
+ modifier: Fs,
847
847
  rawVars: 0
848
848
  }, s = {
849
849
  targetTest: 0,
@@ -855,7 +855,7 @@ var he = {
855
855
  if (ht(), e !== n) {
856
856
  if (ae[t])
857
857
  return;
858
- ue(n, ue($t(e, r), s)), at(n.prototype, at(r, $t(e, s))), ae[n.prop = t] = n, e.targetTest && (Ut.push(n), Mi[t] = 1), t = (t === "css" ? "CSS" : t.charAt(0).toUpperCase() + t.substr(1)) + "Plugin";
858
+ ue(n, ue(Bt(e, r), s)), at(n.prototype, at(r, Bt(e, s))), ae[n.prop = t] = n, e.targetTest && (Ut.push(n), Mi[t] = 1), t = (t === "css" ? "CSS" : t.charAt(0).toUpperCase() + t.substr(1)) + "Plugin";
859
859
  }
860
860
  Un(t, n), e.register && e.register(re, n, ie);
861
861
  } else
@@ -883,7 +883,7 @@ var he = {
883
883
  }, Qt = function(e, t, i) {
884
884
  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) * L + 0.5 | 0;
885
885
  }, tr = function(e, t, i) {
886
- var n = e ? Ce(e) ? [e >> 16, e >> 8 & L, e & L] : 0 : gt.black, r, s, o, l, c, h, u, p, m, f;
886
+ var n = e ? Pe(e) ? [e >> 16, e >> 8 & L, e & L] : 0 : gt.black, r, s, o, l, c, h, u, p, m, f;
887
887
  if (!n) {
888
888
  if (e.substr(-1) === "," && (e = e.substr(0, e.length - 1)), gt[e])
889
889
  n = gt[e];
@@ -903,38 +903,38 @@ var he = {
903
903
  return t && !f && (r = n[0] / L, s = n[1] / L, o = n[2] / L, u = Math.max(r, s, o), p = Math.min(r, s, o), h = (u + p) / 2, u === p ? l = c = 0 : (m = u - p, c = h > 0.5 ? m / (2 - u - p) : m / (u + p), 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] = ~~(c * 100 + 0.5), n[2] = ~~(h * 100 + 0.5)), i && n.length < 4 && (n[3] = 1), n;
904
904
  }, ir = function(e) {
905
905
  var t = [], i = [], n = -1;
906
- return e.split(Ie).forEach(function(r) {
906
+ return e.split(Oe).forEach(function(r) {
907
907
  var s = r.match(Je) || [];
908
908
  t.push.apply(t, s), i.push(n += s.length + 1);
909
909
  }), t.c = i, t;
910
910
  }, tn = function(e, t, i) {
911
- var n = "", r = (e + n).match(Ie), s = t ? "hsla(" : "rgba(", o = 0, l, c, h, u;
911
+ var n = "", r = (e + n).match(Oe), s = t ? "hsla(" : "rgba(", o = 0, l, c, h, u;
912
912
  if (!r)
913
913
  return e;
914
914
  if (r = r.map(function(p) {
915
915
  return (p = tr(p, t, 1)) && s + (t ? p[0] + "," + p[1] + "%," + p[2] + "%," + p[3] : p.join(",")) + ")";
916
916
  }), i && (h = ir(e), l = i.c, l.join(n) !== h.c.join(n)))
917
- for (c = e.replace(Ie, "1").split(Je), u = c.length - 1; o < u; o++)
917
+ for (c = e.replace(Oe, "1").split(Je), u = c.length - 1; o < u; o++)
918
918
  n += c[o] + (~l.indexOf(o) ? r.shift() || s + "0,0,0,0)" : (h.length ? h : r.length ? r : i).shift());
919
919
  if (!c)
920
- for (c = e.split(Ie), u = c.length - 1; o < u; o++)
920
+ for (c = e.split(Oe), u = c.length - 1; o < u; o++)
921
921
  n += c[o] + r[o];
922
922
  return n + c[u];
923
- }, Ie = (function() {
923
+ }, Oe = (function() {
924
924
  var a = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b", e;
925
925
  for (e in gt)
926
926
  a += "|" + e + "\\b";
927
927
  return new RegExp(a + ")", "gi");
928
- })(), vs = /hsl[a]?\(/, nr = function(e) {
928
+ })(), ws = /hsl[a]?\(/, nr = function(e) {
929
929
  var t = e.join(" "), i;
930
- if (Ie.lastIndex = 0, Ie.test(t))
931
- return i = vs.test(t), e[1] = tn(e[1], i), e[0] = tn(e[0], i, ir(e[1])), !0;
932
- }, Pt, oe = (function() {
930
+ if (Oe.lastIndex = 0, Oe.test(t))
931
+ return i = ws.test(t), e[1] = tn(e[1], i), e[0] = tn(e[0], i, ir(e[1])), !0;
932
+ }, Ct, oe = (function() {
933
933
  var a = Date.now, e = 500, t = 33, i = a(), n = i, r = 1e3 / 240, s = r, o = [], l, c, h, u, p, m, f = function d(g) {
934
- var _ = a() - n, y = g === !0, x, b, E, P;
935
- if ((_ > e || _ < 0) && (i += _ - t), n += _, E = n - i, x = E - s, (x > 0 || y) && (P = ++u.frame, p = E - u.time * 1e3, u.time = E = E / 1e3, s += x + (x >= r ? 4 : r - x), b = 1), y || (l = c(d)), b)
934
+ var _ = a() - n, y = g === !0, x, E, b, C;
935
+ if ((_ > e || _ < 0) && (i += _ - t), n += _, b = n - i, x = b - s, (x > 0 || y) && (C = ++u.frame, p = b - u.time * 1e3, u.time = b = b / 1e3, s += x + (x >= r ? 4 : r - x), E = 1), y || (l = c(d)), E)
936
936
  for (m = 0; m < o.length; m++)
937
- o[m](E, p, P, g);
937
+ o[m](b, p, C, g);
938
938
  };
939
939
  return u = {
940
940
  time: 0,
@@ -948,10 +948,10 @@ var he = {
948
948
  wake: function() {
949
949
  Ln && (!hi && Ti() && (_e = hi = window, Si = _e.document || {}, ce.gsap = re, (_e.gsapVersions || (_e.gsapVersions = [])).push(re.version), kn(zt || _e.GreenSockGlobals || !_e.gsap && _e || {}), Jn.forEach(er)), h = typeof requestAnimationFrame < "u" && requestAnimationFrame, l && u.sleep(), c = h || function(g) {
950
950
  return setTimeout(g, s - u.time * 1e3 + 1 | 0);
951
- }, Pt = 1, f(2));
951
+ }, Ct = 1, f(2));
952
952
  },
953
953
  sleep: function() {
954
- (h ? cancelAnimationFrame : clearTimeout)(l), Pt = 0, c = vt;
954
+ (h ? cancelAnimationFrame : clearTimeout)(l), Ct = 0, c = vt;
955
955
  },
956
956
  lagSmoothing: function(g, _) {
957
957
  e = g || 1 / 0, t = Math.min(_ || 33, e);
@@ -960,8 +960,8 @@ var he = {
960
960
  r = 1e3 / (g || 240), s = u.time * 1e3 + r;
961
961
  },
962
962
  add: function(g, _, y) {
963
- var x = _ ? function(b, E, P, w) {
964
- g(b, E, P, w), u.remove(x);
963
+ var x = _ ? function(E, b, C, v) {
964
+ g(E, b, C, v), u.remove(x);
965
965
  } : g;
966
966
  return u.remove(g), o[y ? "unshift" : "push"](x), ht(), x;
967
967
  },
@@ -971,17 +971,17 @@ var he = {
971
971
  _listeners: o
972
972
  }, u;
973
973
  })(), ht = function() {
974
- return !Pt && oe.wake();
975
- }, S = {}, ws = /^[\d.\-M][\d.\-,\s]/, Ps = /["']/g, Cs = function(e) {
974
+ return !Ct && oe.wake();
975
+ }, D = {}, Cs = /^[\d.\-M][\d.\-,\s]/, Ps = /["']/g, As = function(e) {
976
976
  for (var t = {}, i = e.substr(1, e.length - 3).split(":"), n = i[0], r = 1, s = i.length, o, l, c; r < s; r++)
977
977
  l = i[r], o = r !== s - 1 ? l.lastIndexOf(",") : l.length, c = l.substr(0, o), t[n] = isNaN(c) ? c.replace(Ps, "").trim() : +c, n = l.substr(o + 1).trim();
978
978
  return t;
979
- }, As = function(e) {
979
+ }, Ts = function(e) {
980
980
  var t = e.indexOf("(") + 1, i = e.indexOf(")"), n = e.indexOf("(", t);
981
981
  return e.substring(t, ~n && n < i ? e.indexOf(")", i + 1) : i);
982
- }, Ts = function(e) {
983
- var t = (e + "").split("("), i = S[t[0]];
984
- return i && t.length > 1 && i.config ? i.config.apply(null, ~e.indexOf("{") ? [Cs(t[1])] : As(e).split(",").map(Bn)) : S._CE && ws.test(e) ? S._CE("", e) : i;
982
+ }, Ss = function(e) {
983
+ var t = (e + "").split("("), i = D[t[0]];
984
+ return i && t.length > 1 && i.config ? i.config.apply(null, ~e.indexOf("{") ? [As(t[1])] : Ts(e).split(",").map($n)) : D._CE && Cs.test(e) ? D._CE("", e) : i;
985
985
  }, rr = function(e) {
986
986
  return function(t) {
987
987
  return 1 - e(1 - t);
@@ -990,7 +990,7 @@ var he = {
990
990
  for (var i = e._first, n; i; )
991
991
  i instanceof q ? a(i, t) : i.vars.yoyoEase && (!i._yoyo || !i._repeat) && i._yoyo !== t && (i.timeline ? a(i.timeline, t) : (n = i._ease, i._ease = i._yEase, i._yEase = n, i._yoyo = t)), i = i._next;
992
992
  }, Ye = function(e, t) {
993
- return e && (G(e) ? e : S[e] || Ts(e)) || t;
993
+ return e && (G(e) ? e : D[e] || Ss(e)) || t;
994
994
  }, Xe = function(e, t, i, n) {
995
995
  i === void 0 && (i = function(l) {
996
996
  return 1 - t(1 - l);
@@ -1003,9 +1003,9 @@ var he = {
1003
1003
  easeInOut: n
1004
1004
  }, s;
1005
1005
  return te(e, function(o) {
1006
- S[o] = ce[o] = r, S[s = o.toLowerCase()] = i;
1006
+ D[o] = ce[o] = r, D[s = o.toLowerCase()] = i;
1007
1007
  for (var l in r)
1008
- S[s + (l === "easeIn" ? ".in" : l === "easeOut" ? ".out" : ".inOut")] = S[o + "." + l] = r[l];
1008
+ D[s + (l === "easeIn" ? ".in" : l === "easeOut" ? ".out" : ".inOut")] = D[o + "." + l] = r[l];
1009
1009
  }), r;
1010
1010
  }, ar = function(e) {
1011
1011
  return function(t) {
@@ -1013,7 +1013,7 @@ var he = {
1013
1013
  };
1014
1014
  }, Jt = function a(e, t, i) {
1015
1015
  var n = t >= 1 ? t : 1, r = (i || (e ? 0.3 : 0.45)) / (t < 1 ? t : 1), s = r / oi * (Math.asin(1 / n) || 0), o = function(h) {
1016
- return h === 1 ? 1 : n * Math.pow(2, -10 * h) * ts((h - s) * r) + 1;
1016
+ return h === 1 ? 1 : n * Math.pow(2, -10 * h) * is((h - s) * r) + 1;
1017
1017
  }, l = e === "out" ? o : e === "in" ? function(c) {
1018
1018
  return 1 - o(1 - c);
1019
1019
  } : ar(o);
@@ -1043,7 +1043,7 @@ te("Linear,Quad,Cubic,Quart,Quint,Strong", function(a, e) {
1043
1043
  return i < 0.5 ? Math.pow(i * 2, t) / 2 : 1 - Math.pow((1 - i) * 2, t) / 2;
1044
1044
  });
1045
1045
  });
1046
- S.Linear.easeNone = S.none = S.Linear.easeIn;
1046
+ D.Linear.easeNone = D.none = D.Linear.easeIn;
1047
1047
  Xe("Elastic", Jt("in"), Jt("out"), Jt());
1048
1048
  (function(a, e) {
1049
1049
  var t = 1 / e, i = 2 * t, n = 2.5 * t, r = function(o) {
@@ -1060,10 +1060,10 @@ Xe("Circ", function(a) {
1060
1060
  return -(Dn(1 - a * a) - 1);
1061
1061
  });
1062
1062
  Xe("Sine", function(a) {
1063
- return a === 1 ? 1 : -es(a * Qr) + 1;
1063
+ return a === 1 ? 1 : -ts(a * Jr) + 1;
1064
1064
  });
1065
1065
  Xe("Back", ei("in"), ei("out"), ei());
1066
- S.SteppedEase = S.steps = ce.SteppedEase = {
1066
+ D.SteppedEase = D.steps = ce.SteppedEase = {
1067
1067
  config: function(e, t) {
1068
1068
  e === void 0 && (e = 1);
1069
1069
  var i = 1 / e, n = e + (t ? 0 : 1), r = t ? 1 : 0, s = 1 - k;
@@ -1072,15 +1072,15 @@ S.SteppedEase = S.steps = ce.SteppedEase = {
1072
1072
  };
1073
1073
  }
1074
1074
  };
1075
- st.ease = S["quad.out"];
1075
+ st.ease = D["quad.out"];
1076
1076
  te("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", function(a) {
1077
1077
  return Ri += a + "," + a + "Params,";
1078
1078
  });
1079
1079
  var or = function(e, t) {
1080
- this.id = Jr++, e._gsap = this, this.target = e, this.harness = t, this.get = t ? t.get : Nn, this.set = t ? t.getSetter : Fi;
1081
- }, Ct = /* @__PURE__ */ (function() {
1080
+ this.id = es++, e._gsap = this, this.target = e, this.harness = t, this.get = t ? t.get : Nn, this.set = t ? t.getSetter : Fi;
1081
+ }, Pt = /* @__PURE__ */ (function() {
1082
1082
  function a(t) {
1083
- this.vars = t, this._delay = +t.delay || 0, (this._repeat = t.repeat === 1 / 0 ? -2 : t.repeat || 0) && (this._rDelay = t.repeatDelay || 0, this._yoyo = !!t.yoyo || !!t.yoyoEase), this._ts = 1, lt(this, +t.duration, 1, 1), this.data = t.data, N && (this._ctx = N, N.data.push(this)), Pt || oe.wake();
1083
+ this.vars = t, this._delay = +t.delay || 0, (this._repeat = t.repeat === 1 / 0 ? -2 : t.repeat || 0) && (this._rDelay = t.repeatDelay || 0, this._yoyo = !!t.yoyo || !!t.yoyoEase), this._ts = 1, lt(this, +t.duration, 1, 1), this.data = t.data, N && (this._ctx = N, N.data.push(this)), Ct || oe.wake();
1084
1084
  }
1085
1085
  var e = a.prototype;
1086
1086
  return e.delay = function(i) {
@@ -1114,7 +1114,7 @@ var or = function(e, t) {
1114
1114
  if (this._rts === i)
1115
1115
  return this;
1116
1116
  var r = this.parent && this._ts ? Gt(this.parent._time, this) : this._tTime;
1117
- return this._rts = +i || 0, this._ts = this._ps || i === -k ? 0 : this._rts, this.totalTime(Dt(-Math.abs(this._delay), this.totalDuration(), r), n !== !1), Zt(this), ls(this);
1117
+ return this._rts = +i || 0, this._ts = this._ps || i === -k ? 0 : this._rts, this.totalTime(Dt(-Math.abs(this._delay), this.totalDuration(), r), n !== !1), Zt(this), hs(this);
1118
1118
  }, e.paused = function(i) {
1119
1119
  return arguments.length ? (this._ps !== i && (this._ps = i, i ? (this._pTime = this._tTime || Math.max(-this._delay, this.rawTime()), this._ts = this._act = 0) : (ht(), this._ts = this._rts, this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, this.progress() === 1 && Math.abs(this._zTime) !== k && (this._tTime -= k)))), this) : this._ps;
1120
1120
  }, e.startTime = function(i) {
@@ -1130,9 +1130,9 @@ var or = function(e, t) {
1130
1130
  var n = this.parent || this._dp;
1131
1131
  return n ? i && (!this._ts || this._repeat && this._time && this.totalProgress() < 1) ? this._tTime % (this._dur + this._rDelay) : this._ts ? Gt(n.rawTime(i), this) : this._tTime : this._tTime;
1132
1132
  }, e.revert = function(i) {
1133
- i === void 0 && (i = rs);
1133
+ i === void 0 && (i = ss);
1134
1134
  var n = K;
1135
- return K = i, Oi(this) && (this.timeline && this.timeline.revert(i), this.totalTime(-0.01, i.suppressEvents)), this.data !== "nested" && i.kill !== !1 && this.kill(), K = n, this;
1135
+ return K = i, Ii(this) && (this.timeline && this.timeline.revert(i), this.totalTime(-0.01, i.suppressEvents)), this.data !== "nested" && i.kill !== !1 && this.kill(), K = n, this;
1136
1136
  }, e.globalTime = function(i) {
1137
1137
  for (var n = this, r = arguments.length ? i : n.rawTime(); n; )
1138
1138
  r = n._start + r / (Math.abs(n._ts) || 1), n = n._dp;
@@ -1172,7 +1172,7 @@ var or = function(e, t) {
1172
1172
  }, e.then = function(i) {
1173
1173
  var n = this;
1174
1174
  return new Promise(function(r) {
1175
- var s = G(i) ? i : $n, o = function() {
1175
+ var s = G(i) ? i : Bn, o = function() {
1176
1176
  var c = n.then;
1177
1177
  n.then = null, G(s) && (s = s(n)) && (s.then || s === n) && (n.then = c), r(s), n.then = c;
1178
1178
  };
@@ -1182,7 +1182,7 @@ var or = function(e, t) {
1182
1182
  mt(this);
1183
1183
  }, a;
1184
1184
  })();
1185
- ue(Ct.prototype, {
1185
+ ue(Pt.prototype, {
1186
1186
  _time: 0,
1187
1187
  _start: 0,
1188
1188
  _end: 0,
@@ -1226,21 +1226,21 @@ var q = /* @__PURE__ */ (function(a) {
1226
1226
  }, t.staggerFromTo = function(n, r, s, o, l, c, h, u) {
1227
1227
  return o.startAt = s, yt(o).immediateRender = ee(o.immediateRender), this.staggerTo(n, r, o, l, c, h, u);
1228
1228
  }, t.render = function(n, r, s) {
1229
- var o = this._time, l = this._dirty ? this.totalDuration() : this._tDur, c = this._dur, h = n <= 0 ? 0 : j(n), u = this._zTime < 0 != n < 0 && (this._initted || !c), p, m, f, d, g, _, y, x, b, E, P, w;
1229
+ var o = this._time, l = this._dirty ? this.totalDuration() : this._tDur, c = this._dur, h = n <= 0 ? 0 : j(n), u = this._zTime < 0 != n < 0 && (this._initted || !c), p, m, f, d, g, _, y, x, E, b, C, v;
1230
1230
  if (this !== z && h > l && n >= 0 && (h = l), h !== this._tTime || s || u) {
1231
- if (o !== this._time && c && (h += this._time - o, n += this._time - o), p = h, b = this._start, x = this._ts, _ = !x, u && (c || (o = this._zTime), (n || !r) && (this._zTime = n)), this._repeat) {
1232
- if (P = this._yoyo, g = c + this._rDelay, this._repeat < -1 && n < 0)
1231
+ if (o !== this._time && c && (h += this._time - o, n += this._time - o), p = h, E = this._start, x = this._ts, _ = !x, u && (c || (o = this._zTime), (n || !r) && (this._zTime = n)), this._repeat) {
1232
+ if (C = this._yoyo, g = c + this._rDelay, this._repeat < -1 && n < 0)
1233
1233
  return this.totalTime(g * 100 + n, r, s);
1234
- if (p = j(h % g), h === l ? (d = this._repeat, p = c) : (E = j(h / g), d = ~~E, d && d === E && (p = c, d--), p > c && (p = c)), E = ot(this._tTime, g), !o && this._tTime && E !== d && this._tTime - E * g - this._dur <= 0 && (E = d), P && d & 1 && (p = c - p, w = 1), d !== E && !this._lock) {
1235
- var C = P && E & 1, v = C === (P && d & 1);
1236
- if (d < E && (C = !C), o = C ? 0 : h % c ? c : h, this._lock = 1, this.render(o || (w ? 0 : j(d * g)), r, !c)._lock = 0, this._tTime = h, !r && this.parent && le(this, "onRepeat"), this.vars.repeatRefresh && !w && (this.invalidate()._lock = 1), o && o !== this._time || _ !== !this._ts || this.vars.onRepeat && !this.parent && !this._act)
1234
+ if (p = j(h % g), h === l ? (d = this._repeat, p = c) : (b = j(h / g), d = ~~b, d && d === b && (p = c, d--), p > c && (p = c)), b = ot(this._tTime, g), !o && this._tTime && b !== d && this._tTime - b * g - this._dur <= 0 && (b = d), C && d & 1 && (p = c - p, v = 1), d !== b && !this._lock) {
1235
+ var P = C && b & 1, w = P === (C && d & 1);
1236
+ if (d < b && (P = !P), o = P ? 0 : h % c ? c : h, this._lock = 1, this.render(o || (v ? 0 : j(d * g)), r, !c)._lock = 0, this._tTime = h, !r && this.parent && le(this, "onRepeat"), this.vars.repeatRefresh && !v && (this.invalidate()._lock = 1), o && o !== this._time || _ !== !this._ts || this.vars.onRepeat && !this.parent && !this._act)
1237
1237
  return this;
1238
- if (c = this._dur, l = this._tDur, v && (this._lock = 2, o = C ? c : -1e-4, this.render(o, !0), this.vars.repeatRefresh && !w && this.invalidate()), this._lock = 0, !this._ts && !_)
1238
+ if (c = this._dur, l = this._tDur, w && (this._lock = 2, o = P ? c : -1e-4, this.render(o, !0), this.vars.repeatRefresh && !v && this.invalidate()), this._lock = 0, !this._ts && !_)
1239
1239
  return this;
1240
- sr(this, w);
1240
+ sr(this, v);
1241
1241
  }
1242
1242
  }
1243
- if (this._hasPause && !this._forcing && this._lock < 2 && (y = ds(this, j(o), j(p)), y && (h -= p - (p = y._start))), this._tTime = h, this._time = p, this._act = !x, this._initted || (this._onUpdate = this.vars.onUpdate, this._initted = 1, this._zTime = n, o = 0), !o && h && !r && !E && (le(this, "onStart"), this._tTime !== h))
1243
+ if (this._hasPause && !this._forcing && this._lock < 2 && (y = ps(this, j(o), j(p)), y && (h -= p - (p = y._start))), this._tTime = h, this._time = p, this._act = !x, this._initted || (this._onUpdate = this.vars.onUpdate, this._initted = 1, this._zTime = n, o = 0), !o && h && !r && !b && (le(this, "onStart"), this._tTime !== h))
1244
1244
  return this;
1245
1245
  if (p >= o && n >= 0)
1246
1246
  for (m = this._first; m; ) {
@@ -1260,7 +1260,7 @@ var q = /* @__PURE__ */ (function(a) {
1260
1260
  if (f = m._prev, (m._act || T <= m._end) && m._ts && y !== m) {
1261
1261
  if (m.parent !== this)
1262
1262
  return this.render(n, r, s);
1263
- if (m.render(m._ts > 0 ? (T - m._start) * m._ts : (m._dirty ? m.totalDuration() : m._tDur) + (T - m._start) * m._ts, r, s || K && Oi(m)), p !== this._time || !this._ts && !_) {
1263
+ if (m.render(m._ts > 0 ? (T - m._start) * m._ts : (m._dirty ? m.totalDuration() : m._tDur) + (T - m._start) * m._ts, r, s || K && Ii(m)), p !== this._time || !this._ts && !_) {
1264
1264
  y = 0, f && (h += this._zTime = T ? -k : k);
1265
1265
  break;
1266
1266
  }
@@ -1269,13 +1269,13 @@ var q = /* @__PURE__ */ (function(a) {
1269
1269
  }
1270
1270
  }
1271
1271
  if (y && !r && (this.pause(), y.render(p >= o ? 0 : -k)._zTime = p >= o ? 1 : -1, this._ts))
1272
- return this._start = b, Zt(this), this.render(n, r, s);
1273
- this._onUpdate && !r && le(this, "onUpdate", !0), (h === l && this._tTime >= this.totalDuration() || !h && o) && (b === this._start || Math.abs(x) !== Math.abs(this._ts)) && (this._lock || ((n || !c) && (h === l && this._ts > 0 || !h && this._ts < 0) && Oe(this, 1), !r && !(n < 0 && !o) && (h || o || !l) && (le(this, h === l && n >= 0 ? "onComplete" : "onReverseComplete", !0), this._prom && !(h < l && this.timeScale() > 0) && this._prom())));
1272
+ return this._start = E, Zt(this), this.render(n, r, s);
1273
+ this._onUpdate && !r && le(this, "onUpdate", !0), (h === l && this._tTime >= this.totalDuration() || !h && o) && (E === this._start || Math.abs(x) !== Math.abs(this._ts)) && (this._lock || ((n || !c) && (h === l && this._ts > 0 || !h && this._ts < 0) && Ie(this, 1), !r && !(n < 0 && !o) && (h || o || !l) && (le(this, h === l && n >= 0 ? "onComplete" : "onReverseComplete", !0), this._prom && !(h < l && this.timeScale() > 0) && this._prom())));
1274
1274
  }
1275
1275
  return this;
1276
1276
  }, t.add = function(n, r) {
1277
1277
  var s = this;
1278
- if (Ce(r) || (r = pe(this, r, n)), !(n instanceof Ct)) {
1278
+ if (Pe(r) || (r = pe(this, r, n)), !(n instanceof Pt)) {
1279
1279
  if (W(n))
1280
1280
  return n.forEach(function(o) {
1281
1281
  return s.add(o, r);
@@ -1311,14 +1311,14 @@ var q = /* @__PURE__ */ (function(a) {
1311
1311
  }, t.removePause = function(n) {
1312
1312
  var r = this._first;
1313
1313
  for (n = pe(this, n); r; )
1314
- r._start === n && r.data === "isPause" && Oe(r), r = r._next;
1314
+ r._start === n && r.data === "isPause" && Ie(r), r = r._next;
1315
1315
  }, t.killTweensOf = function(n, r, s) {
1316
1316
  for (var o = this.getTweensOf(n, s), l = o.length; l--; )
1317
1317
  Te !== o[l] && o[l].kill(n, r);
1318
1318
  return this;
1319
1319
  }, t.getTweensOf = function(n, r) {
1320
- for (var s = [], o = me(n), l = this._first, c = Ce(r), h; l; )
1321
- l instanceof H ? ss(l._targets, o) && (c ? (!Te || l._initted && l._ts) && l.globalTime(0) <= r && l.globalTime(l.totalDuration()) > r : !r || l.isActive()) && s.push(l) : (h = l.getTweensOf(o, r)).length && s.push.apply(s, h), l = l._next;
1320
+ for (var s = [], o = me(n), l = this._first, c = Pe(r), h; l; )
1321
+ l instanceof H ? as(l._targets, o) && (c ? (!Te || l._initted && l._ts) && l.globalTime(0) <= r && l.globalTime(l.totalDuration()) > r : !r || l.isActive()) && s.push(l) : (h = l.getTweensOf(o, r)).length && s.push.apply(s, h), l = l._next;
1322
1322
  return s;
1323
1323
  }, t.tweenTo = function(n, r) {
1324
1324
  r = r || {};
@@ -1391,13 +1391,13 @@ var q = /* @__PURE__ */ (function(a) {
1391
1391
  }
1392
1392
  }
1393
1393
  }, e;
1394
- })(Ct);
1394
+ })(Pt);
1395
1395
  ue(q.prototype, {
1396
1396
  _lock: 0,
1397
1397
  _hasPause: 0,
1398
1398
  _forcing: 0
1399
1399
  });
1400
- var Ss = function(e, t, i, n, r, s, o) {
1400
+ var Ds = function(e, t, i, n, r, s, o) {
1401
1401
  var l = new ie(this._pt, e, t, 0, 1, pr, null, r), c = 0, h = 0, u, p, m, f, d, g, _, y;
1402
1402
  for (l.b = i, l.e = n, i += "", n += "", (_ = ~n.indexOf("random(")) && (n = wt(n)), s && (y = [i, n], s(y, e, t), i = y[0], n = y[1]), p = i.match(Wt) || []; u = Wt.exec(n); )
1403
1403
  f = u[0], d = n.substring(c, u.index), m ? m = (m + 1) % 5 : d.substr(-5) === "rgba(" && (m = 1), f !== p[h++] && (g = parseFloat(p[h - 1]) || 0, l._pt = {
@@ -1408,13 +1408,13 @@ var Ss = function(e, t, i, n, r, s, o) {
1408
1408
  c: f.charAt(1) === "=" ? it(g, f) - g : parseFloat(f) - g,
1409
1409
  m: m && m < 4 ? Math.round : 0
1410
1410
  }, c = Wt.lastIndex);
1411
- return l.c = c < n.length ? n.substring(c, n.length) : "", l.fp = o, (In.test(n) || _) && (l.e = 0), this._pt = l, l;
1411
+ return l.c = c < n.length ? n.substring(c, n.length) : "", l.fp = o, (On.test(n) || _) && (l.e = 0), this._pt = l, l;
1412
1412
  }, Li = function(e, t, i, n, r, s, o, l, c, h) {
1413
1413
  G(n) && (n = n(r || 0, e, s));
1414
- var u = e[t], p = i !== "get" ? i : G(u) ? c ? e[t.indexOf("set") || !G(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](c) : e[t]() : u, m = G(u) ? c ? Os : ur : Ui, f;
1414
+ var u = e[t], p = i !== "get" ? i : G(u) ? c ? e[t.indexOf("set") || !G(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](c) : e[t]() : u, m = G(u) ? c ? Ls : ur : Ui, f;
1415
1415
  if (Z(n) && (~n.indexOf("random(") && (n = wt(n)), n.charAt(1) === "=" && (f = it(p, n) + (X(p) || 0), (f || f === 0) && (n = f))), !h || p !== n || gi)
1416
- return !isNaN(p * n) && n !== "" ? (f = new ie(this._pt, e, t, +p || 0, n - (p || 0), typeof u == "boolean" ? ks : dr, 0, m), c && (f.fp = c), o && f.modifier(o, this, e), this._pt = f) : (!u && !(t in e) && Di(t, n), Ss.call(this, e, t, p, n, m, l || he.stringFilter, c));
1417
- }, Ds = function(e, t, i, n, r) {
1416
+ return !isNaN(p * n) && n !== "" ? (f = new ie(this._pt, e, t, +p || 0, n - (p || 0), typeof u == "boolean" ? Us : dr, 0, m), c && (f.fp = c), o && f.modifier(o, this, e), this._pt = f) : (!u && !(t in e) && Di(t, n), Ds.call(this, e, t, p, n, m, l || he.stringFilter, c));
1417
+ }, Ms = function(e, t, i, n, r) {
1418
1418
  if (G(e) && (e = bt(e, r, t, i, n)), !Ee(e) || e.style && e.nodeType || W(e) || Mn(e))
1419
1419
  return Z(e) ? bt(e, r, t, i, n) : e;
1420
1420
  var s = {}, o;
@@ -1423,15 +1423,15 @@ var Ss = function(e, t, i, n, r, s, o) {
1423
1423
  return s;
1424
1424
  }, lr = function(e, t, i, n, r, s) {
1425
1425
  var o, l, c, h;
1426
- if (ae[e] && (o = new ae[e]()).init(r, o.rawVars ? t[e] : Ds(t[e], n, r, s, i), i, n, s) !== !1 && (i._pt = l = new ie(i._pt, r, e, 0, 1, o.render, o, 0, o.priority), i !== et))
1426
+ if (ae[e] && (o = new ae[e]()).init(r, o.rawVars ? t[e] : Ms(t[e], n, r, s, i), i, n, s) !== !1 && (i._pt = l = new ie(i._pt, r, e, 0, 1, o.render, o, 0, o.priority), i !== et))
1427
1427
  for (c = i._ptLookup[i._targets.indexOf(r)], h = o._props.length; h--; )
1428
1428
  c[o._props[h]] = l;
1429
1429
  return o;
1430
1430
  }, Te, gi, ki = function a(e, t, i) {
1431
- var n = e.vars, r = n.ease, s = n.startAt, o = n.immediateRender, l = n.lazy, c = n.onUpdate, h = n.runBackwards, u = n.yoyoEase, p = n.keyframes, m = n.autoRevert, f = e._dur, d = e._startAt, g = e._targets, _ = e.parent, y = _ && _.data === "nested" ? _.vars.targets : g, x = e._overwrite === "auto" && !Ci, b = e.timeline, E, P, w, C, v, T, D, A, R, I, $, F, U;
1432
- if (b && (!p || !r) && (r = "none"), e._ease = Ye(r, st.ease), e._yEase = u ? rr(Ye(u === !0 ? r : u, st.ease)) : 0, u && e._yoyo && !e._repeat && (u = e._yEase, e._yEase = e._ease, e._ease = u), e._from = !b && !!n.runBackwards, !b || p && !n.stagger) {
1433
- if (A = g[0] ? He(g[0]).harness : 0, F = A && n[A.prop], E = $t(n, Mi), d && (d._zTime < 0 && d.progress(1), t < 0 && h && o && !m ? d.render(-1, !0) : d.revert(h && f ? kt : ns), d._lazy = 0), s) {
1434
- if (Oe(e._startAt = H.set(g, ue({
1431
+ var n = e.vars, r = n.ease, s = n.startAt, o = n.immediateRender, l = n.lazy, c = n.onUpdate, h = n.runBackwards, u = n.yoyoEase, p = n.keyframes, m = n.autoRevert, f = e._dur, d = e._startAt, g = e._targets, _ = e.parent, y = _ && _.data === "nested" ? _.vars.targets : g, x = e._overwrite === "auto" && !Pi, E = e.timeline, b, C, v, P, w, T, M, A, R, O, B, F, U;
1432
+ if (E && (!p || !r) && (r = "none"), e._ease = Ye(r, st.ease), e._yEase = u ? rr(Ye(u === !0 ? r : u, st.ease)) : 0, u && e._yoyo && !e._repeat && (u = e._yEase, e._yEase = e._ease, e._ease = u), e._from = !E && !!n.runBackwards, !E || p && !n.stagger) {
1433
+ if (A = g[0] ? He(g[0]).harness : 0, F = A && n[A.prop], b = Bt(n, Mi), d && (d._zTime < 0 && d.progress(1), t < 0 && h && o && !m ? d.render(-1, !0) : d.revert(h && f ? kt : rs), d._lazy = 0), s) {
1434
+ if (Ie(e._startAt = H.set(g, ue({
1435
1435
  data: "isStart",
1436
1436
  overwrite: !1,
1437
1437
  parent: _,
@@ -1448,7 +1448,7 @@ var Ss = function(e, t, i, n, r, s, o) {
1448
1448
  return;
1449
1449
  }
1450
1450
  } else if (h && f && !d) {
1451
- if (t && (o = !1), w = ue({
1451
+ if (t && (o = !1), v = ue({
1452
1452
  overwrite: !1,
1453
1453
  data: "isFromStart",
1454
1454
  //we tag the tween with as "isFromStart" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a "from()" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in.
@@ -1458,23 +1458,23 @@ var Ss = function(e, t, i, n, r, s, o) {
1458
1458
  stagger: 0,
1459
1459
  parent: _
1460
1460
  //ensures that nested tweens that had a stagger are handled properly, like gsap.from(".class", {y: gsap.utils.wrap([-100,100]), stagger: 0.5})
1461
- }, E), F && (w[A.prop] = F), Oe(e._startAt = H.set(g, w)), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (K ? e._startAt.revert(kt) : e._startAt.render(-1, !0)), e._zTime = t, !o)
1461
+ }, b), F && (v[A.prop] = F), Ie(e._startAt = H.set(g, v)), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (K ? e._startAt.revert(kt) : e._startAt.render(-1, !0)), e._zTime = t, !o)
1462
1462
  a(e._startAt, k, k);
1463
1463
  else if (!t)
1464
1464
  return;
1465
1465
  }
1466
- for (e._pt = e._ptCache = 0, l = f && ee(l) || l && !f, P = 0; P < g.length; P++) {
1467
- if (v = g[P], D = v._gsap || Ii(g)[P]._gsap, e._ptLookup[P] = I = {}, ci[D.id] && Re.length && Bt(), $ = y === g ? P : y.indexOf(v), A && (R = new A()).init(v, F || E, e, $, y) !== !1 && (e._pt = C = new ie(e._pt, v, R.name, 0, 1, R.render, R, 0, R.priority), R._props.forEach(function(Q) {
1468
- I[Q] = C;
1466
+ for (e._pt = e._ptCache = 0, l = f && ee(l) || l && !f, C = 0; C < g.length; C++) {
1467
+ if (w = g[C], M = w._gsap || Oi(g)[C]._gsap, e._ptLookup[C] = O = {}, ci[M.id] && Re.length && $t(), B = y === g ? C : y.indexOf(w), A && (R = new A()).init(w, F || b, e, B, y) !== !1 && (e._pt = P = new ie(e._pt, w, R.name, 0, 1, R.render, R, 0, R.priority), R._props.forEach(function(Q) {
1468
+ O[Q] = P;
1469
1469
  }), R.priority && (T = 1)), !A || F)
1470
- for (w in E)
1471
- ae[w] && (R = lr(w, E, e, $, v, y)) ? R.priority && (T = 1) : I[w] = C = Li.call(e, v, w, "get", E[w], $, y, 0, n.stringFilter);
1472
- e._op && e._op[P] && e.kill(v, e._op[P]), x && e._pt && (Te = e, z.killTweensOf(v, I, e.globalTime(t)), U = !e.parent, Te = 0), e._pt && l && (ci[D.id] = 1);
1470
+ for (v in b)
1471
+ ae[v] && (R = lr(v, b, e, B, w, y)) ? R.priority && (T = 1) : O[v] = P = Li.call(e, w, v, "get", b[v], B, y, 0, n.stringFilter);
1472
+ e._op && e._op[C] && e.kill(w, e._op[C]), x && e._pt && (Te = e, z.killTweensOf(w, O, e.globalTime(t)), U = !e.parent, Te = 0), e._pt && l && (ci[M.id] = 1);
1473
1473
  }
1474
1474
  T && fr(e), e._onInit && e._onInit(e);
1475
1475
  }
1476
- e._onUpdate = c, e._initted = (!e._op || e._pt) && !U, p && t <= 0 && b.render(fe, !0, !0);
1477
- }, Ms = function(e, t, i, n, r, s, o, l) {
1476
+ e._onUpdate = c, e._initted = (!e._op || e._pt) && !U, p && t <= 0 && E.render(fe, !0, !0);
1477
+ }, Rs = function(e, t, i, n, r, s, o, l) {
1478
1478
  var c = (e._pt && e._ptCache || (e._ptCache = {}))[t], h, u, p, m;
1479
1479
  if (!c)
1480
1480
  for (c = e._ptCache[t] = [], p = e._ptLookup, m = e._targets.length; m--; ) {
@@ -1487,7 +1487,7 @@ var Ss = function(e, t, i, n, r, s, o) {
1487
1487
  }
1488
1488
  for (m = c.length; m--; )
1489
1489
  u = c[m], h = u._pt || u, h.s = (n || n === 0) && !r ? n : h.s + (n || 0) + s * h.c, h.c = i - h.s, u.e && (u.e = V(i) + X(u.e)), u.b && (u.b = h.s + X(u.b));
1490
- }, Rs = function(e, t) {
1490
+ }, Os = function(e, t) {
1491
1491
  var i = e[0] ? He(e[0]).harness : 0, n = i && i.aliases, r, s, o, l;
1492
1492
  if (!n)
1493
1493
  return t;
@@ -1525,60 +1525,60 @@ var H = /* @__PURE__ */ (function(a) {
1525
1525
  function e(i, n, r, s) {
1526
1526
  var o;
1527
1527
  typeof n == "number" && (r.duration = n, n = r, r = null), o = a.call(this, s ? n : yt(n)) || this;
1528
- var l = o.vars, c = l.duration, h = l.delay, u = l.immediateRender, p = l.stagger, m = l.overwrite, f = l.keyframes, d = l.defaults, g = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || z, x = (W(i) || Mn(i) ? Ce(i[0]) : "length" in n) ? [i] : me(i), b, E, P, w, C, v, T, D;
1529
- if (o._targets = x.length ? Ii(x) : Et("GSAP target " + i + " not found. https://gsap.com", !he.nullTargetWarn) || [], o._ptLookup = [], o._overwrite = m, f || p || Rt(c) || Rt(h)) {
1530
- if (n = o.vars, b = o.timeline = new q({
1528
+ var l = o.vars, c = l.duration, h = l.delay, u = l.immediateRender, p = l.stagger, m = l.overwrite, f = l.keyframes, d = l.defaults, g = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || z, x = (W(i) || Mn(i) ? Pe(i[0]) : "length" in n) ? [i] : me(i), E, b, C, v, P, w, T, M;
1529
+ if (o._targets = x.length ? Oi(x) : Et("GSAP target " + i + " not found. https://gsap.com", !he.nullTargetWarn) || [], o._ptLookup = [], o._overwrite = m, f || p || Rt(c) || Rt(h)) {
1530
+ if (n = o.vars, E = o.timeline = new q({
1531
1531
  data: "nested",
1532
1532
  defaults: d || {},
1533
1533
  targets: y && y.data === "nested" ? y.vars.targets : x
1534
- }), b.kill(), b.parent = b._dp = we(o), b._start = 0, p || Rt(c) || Rt(h)) {
1535
- if (w = x.length, T = p && Kn(p), Ee(p))
1536
- for (C in p)
1537
- ~hr.indexOf(C) && (D || (D = {}), D[C] = p[C]);
1538
- for (E = 0; E < w; E++)
1539
- P = $t(n, cr), P.stagger = 0, _ && (P.yoyoEase = _), D && at(P, D), v = x[E], P.duration = +bt(c, we(o), E, v, x), P.delay = (+bt(h, we(o), E, v, x) || 0) - o._delay, !p && w === 1 && P.delay && (o._delay = h = P.delay, o._start += h, P.delay = 0), b.to(v, P, T ? T(E, v, x) : 0), b._ease = S.none;
1540
- b.duration() ? c = h = 0 : o.timeline = 0;
1534
+ }), E.kill(), E.parent = E._dp = we(o), E._start = 0, p || Rt(c) || Rt(h)) {
1535
+ if (v = x.length, T = p && Kn(p), Ee(p))
1536
+ for (P in p)
1537
+ ~hr.indexOf(P) && (M || (M = {}), M[P] = p[P]);
1538
+ for (b = 0; b < v; b++)
1539
+ C = Bt(n, cr), C.stagger = 0, _ && (C.yoyoEase = _), M && at(C, M), w = x[b], C.duration = +bt(c, we(o), b, w, x), C.delay = (+bt(h, we(o), b, w, x) || 0) - o._delay, !p && v === 1 && C.delay && (o._delay = h = C.delay, o._start += h, C.delay = 0), E.to(w, C, T ? T(b, w, x) : 0), E._ease = D.none;
1540
+ E.duration() ? c = h = 0 : o.timeline = 0;
1541
1541
  } else if (f) {
1542
- yt(ue(b.vars.defaults, {
1542
+ yt(ue(E.vars.defaults, {
1543
1543
  ease: "none"
1544
- })), b._ease = Ye(f.ease || n.ease || "none");
1545
- var A = 0, R, I, $;
1544
+ })), E._ease = Ye(f.ease || n.ease || "none");
1545
+ var A = 0, R, O, B;
1546
1546
  if (W(f))
1547
1547
  f.forEach(function(F) {
1548
- return b.to(x, F, ">");
1549
- }), b.duration();
1548
+ return E.to(x, F, ">");
1549
+ }), E.duration();
1550
1550
  else {
1551
- P = {};
1552
- for (C in f)
1553
- C === "ease" || C === "easeEach" || Is(C, f[C], P, f.easeEach);
1554
- for (C in P)
1555
- for (R = P[C].sort(function(F, U) {
1551
+ C = {};
1552
+ for (P in f)
1553
+ P === "ease" || P === "easeEach" || Is(P, f[P], C, f.easeEach);
1554
+ for (P in C)
1555
+ for (R = C[P].sort(function(F, U) {
1556
1556
  return F.t - U.t;
1557
- }), A = 0, E = 0; E < R.length; E++)
1558
- I = R[E], $ = {
1559
- ease: I.e,
1560
- duration: (I.t - (E ? R[E - 1].t : 0)) / 100 * c
1561
- }, $[C] = I.v, b.to(x, $, A), A += $.duration;
1562
- b.duration() < c && b.to({}, {
1563
- duration: c - b.duration()
1557
+ }), A = 0, b = 0; b < R.length; b++)
1558
+ O = R[b], B = {
1559
+ ease: O.e,
1560
+ duration: (O.t - (b ? R[b - 1].t : 0)) / 100 * c
1561
+ }, B[P] = O.v, E.to(x, B, A), A += B.duration;
1562
+ E.duration() < c && E.to({}, {
1563
+ duration: c - E.duration()
1564
1564
  });
1565
1565
  }
1566
1566
  }
1567
- c || o.duration(c = b.duration());
1567
+ c || o.duration(c = E.duration());
1568
1568
  } else
1569
1569
  o.timeline = 0;
1570
- return m === !0 && !Ci && (Te = we(o), z.killTweensOf(x), Te = 0), ye(y, we(o), r), n.reversed && o.reverse(), n.paused && o.paused(!0), (u || !c && !f && o._start === j(y._time) && ee(u) && hs(we(o)) && y.data !== "nested") && (o._tTime = -k, o.render(Math.max(0, -h) || 0)), g && Hn(we(o), g), o;
1570
+ return m === !0 && !Pi && (Te = we(o), z.killTweensOf(x), Te = 0), ye(y, we(o), r), n.reversed && o.reverse(), n.paused && o.paused(!0), (u || !c && !f && o._start === j(y._time) && ee(u) && cs(we(o)) && y.data !== "nested") && (o._tTime = -k, o.render(Math.max(0, -h) || 0)), g && Hn(we(o), g), o;
1571
1571
  }
1572
1572
  var t = e.prototype;
1573
1573
  return t.render = function(n, r, s) {
1574
- var o = this._time, l = this._tDur, c = this._dur, h = n < 0, u = n > l - k && !h ? l : n < k ? 0 : n, p, m, f, d, g, _, y, x, b;
1574
+ var o = this._time, l = this._tDur, c = this._dur, h = n < 0, u = n > l - k && !h ? l : n < k ? 0 : n, p, m, f, d, g, _, y, x, E;
1575
1575
  if (!c)
1576
- us(this, n, r, s);
1576
+ ds(this, n, r, s);
1577
1577
  else if (u !== this._tTime || !n || s || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== h || this._lazy) {
1578
1578
  if (p = u, x = this.timeline, this._repeat) {
1579
1579
  if (d = c + this._rDelay, this._repeat < -1 && h)
1580
1580
  return this.totalTime(d * 100 + n, r, s);
1581
- if (p = j(u % d), u === l ? (f = this._repeat, p = c) : (g = j(u / d), f = ~~g, f && f === g ? (p = c, f--) : p > c && (p = c)), _ = this._yoyo && f & 1, _ && (b = this._yEase, p = c - p), g = ot(this._tTime, d), p === o && !s && this._initted && f === g)
1581
+ if (p = j(u % d), u === l ? (f = this._repeat, p = c) : (g = j(u / d), f = ~~g, f && f === g ? (p = c, f--) : p > c && (p = c)), _ = this._yoyo && f & 1, _ && (E = this._yEase, p = c - p), g = ot(this._tTime, d), p === o && !s && this._initted && f === g)
1582
1582
  return this._tTime = u, this;
1583
1583
  f !== g && (x && this._yEase && sr(x, _), this.vars.repeatRefresh && !_ && !this._lock && p !== d && this._initted && (this._lock = s = 1, this.render(j(d * f), !0).invalidate()._lock = 0));
1584
1584
  }
@@ -1590,11 +1590,11 @@ var H = /* @__PURE__ */ (function(a) {
1590
1590
  if (c !== this._dur)
1591
1591
  return this.render(n, r, s);
1592
1592
  }
1593
- if (this._tTime = u, this._time = p, !this._act && this._ts && (this._act = 1, this._lazy = 0), this.ratio = y = (b || this._ease)(p / c), this._from && (this.ratio = y = 1 - y), !o && u && !r && !g && (le(this, "onStart"), this._tTime !== u))
1593
+ if (this._tTime = u, this._time = p, !this._act && this._ts && (this._act = 1, this._lazy = 0), this.ratio = y = (E || this._ease)(p / c), this._from && (this.ratio = y = 1 - y), !o && u && !r && !g && (le(this, "onStart"), this._tTime !== u))
1594
1594
  return this;
1595
1595
  for (m = this._pt; m; )
1596
1596
  m.r(y, m.d), m = m._next;
1597
- x && x.render(n < 0 ? n : x._dur * x._ease(p / this._dur), r, s) || this._startAt && (this._zTime = n), this._onUpdate && !r && (h && ui(this, n, r, s), le(this, "onUpdate")), this._repeat && f !== g && this.vars.onRepeat && !r && this.parent && le(this, "onRepeat"), (u === this._tDur || !u) && this._tTime === u && (h && !this._onUpdate && ui(this, n, !0, !0), (n || !c) && (u === this._tDur && this._ts > 0 || !u && this._ts < 0) && Oe(this, 1), !r && !(h && !o) && (u || o || _) && (le(this, u === l ? "onComplete" : "onReverseComplete", !0), this._prom && !(u < l && this.timeScale() > 0) && this._prom()));
1597
+ x && x.render(n < 0 ? n : x._dur * x._ease(p / this._dur), r, s) || this._startAt && (this._zTime = n), this._onUpdate && !r && (h && ui(this, n, r, s), le(this, "onUpdate")), this._repeat && f !== g && this.vars.onRepeat && !r && this.parent && le(this, "onRepeat"), (u === this._tDur || !u) && this._tTime === u && (h && !this._onUpdate && ui(this, n, !0, !0), (n || !c) && (u === this._tDur && this._ts > 0 || !u && this._ts < 0) && Ie(this, 1), !r && !(h && !o) && (u || o || _) && (le(this, u === l ? "onComplete" : "onReverseComplete", !0), this._prom && !(u < l && this.timeScale() > 0) && this._prom()));
1598
1598
  }
1599
1599
  return this;
1600
1600
  }, t.targets = function() {
@@ -1602,9 +1602,9 @@ var H = /* @__PURE__ */ (function(a) {
1602
1602
  }, t.invalidate = function(n) {
1603
1603
  return (!n || !this.vars.runBackwards) && (this._startAt = 0), this._pt = this._op = this._onUpdate = this._lazy = this.ratio = 0, this._ptLookup = [], this.timeline && this.timeline.invalidate(n), a.prototype.invalidate.call(this, n);
1604
1604
  }, t.resetTo = function(n, r, s, o, l) {
1605
- Pt || oe.wake(), this._ts || this.play();
1605
+ Ct || oe.wake(), this._ts || this.play();
1606
1606
  var c = Math.min(this._dur, (this._dp._time - this._start) * this._ts), h;
1607
- return this._initted || ki(this, c), h = this._ease(c / this._dur), Ms(this, n, r, s, o, h, c, l) ? this.resetTo(n, r, s, o, 1) : (Kt(this, 0), this.parent || Gn(this._dp, this, "_first", "_last", this._dp._sort ? "_start" : 0), this.render(0));
1607
+ return this._initted || ki(this, c), h = this._ease(c / this._dur), Rs(this, n, r, s, o, h, c, l) ? this.resetTo(n, r, s, o, 1) : (Kt(this, 0), this.parent || Gn(this._dp, this, "_first", "_last", this._dp._sort ? "_start" : 0), this.render(0));
1608
1608
  }, t.kill = function(n, r) {
1609
1609
  if (r === void 0 && (r = "all"), !n && (!r || r === "all"))
1610
1610
  return this._lazy = this._pt = 0, this.parent ? mt(this) : this.scrollTrigger && this.scrollTrigger.kill(!!K), this;
@@ -1613,11 +1613,11 @@ var H = /* @__PURE__ */ (function(a) {
1613
1613
  return this.timeline.killTweensOf(n, r, Te && Te.vars.overwrite !== !0)._first || mt(this), this.parent && s !== this.timeline.totalDuration() && lt(this, this._dur * this.timeline._tDur / s, 0, 1), this;
1614
1614
  }
1615
1615
  var o = this._targets, l = n ? me(n) : o, c = this._ptLookup, h = this._pt, u, p, m, f, d, g, _;
1616
- if ((!r || r === "all") && os(o, l))
1616
+ if ((!r || r === "all") && ls(o, l))
1617
1617
  return r === "all" && (this._pt = 0), mt(this);
1618
1618
  for (u = this._op = this._op || [], r !== "all" && (Z(r) && (d = {}, te(r, function(y) {
1619
1619
  return d[y] = 1;
1620
- }), r = d), r = Rs(o, r)), _ = o.length; _--; )
1620
+ }), r = d), r = Os(o, r)), _ = o.length; _--; )
1621
1621
  if (~l.indexOf(o[_])) {
1622
1622
  p = c[_], r === "all" ? (u[_] = r, f = p, m = {}) : (m = u[_] = u[_] || {}, f = r);
1623
1623
  for (d in f)
@@ -1647,7 +1647,7 @@ var H = /* @__PURE__ */ (function(a) {
1647
1647
  }, e.killTweensOf = function(n, r, s) {
1648
1648
  return z.killTweensOf(n, r, s);
1649
1649
  }, e;
1650
- })(Ct);
1650
+ })(Pt);
1651
1651
  ue(H.prototype, {
1652
1652
  _targets: [],
1653
1653
  _lazy: 0,
@@ -1665,15 +1665,15 @@ var Ui = function(e, t, i) {
1665
1665
  return e[t] = i;
1666
1666
  }, ur = function(e, t, i) {
1667
1667
  return e[t](i);
1668
- }, Os = function(e, t, i, n) {
1668
+ }, Ls = function(e, t, i, n) {
1669
1669
  return e[t](n.fp, i);
1670
- }, Ls = function(e, t, i) {
1670
+ }, ks = function(e, t, i) {
1671
1671
  return e.setAttribute(t, i);
1672
1672
  }, Fi = function(e, t) {
1673
- return G(e[t]) ? ur : Ai(e[t]) && e.setAttribute ? Ls : Ui;
1673
+ return G(e[t]) ? ur : Ai(e[t]) && e.setAttribute ? ks : Ui;
1674
1674
  }, dr = function(e, t) {
1675
1675
  return t.set(t.t, t.p, Math.round((t.s + t.c * e) * 1e6) / 1e6, t);
1676
- }, ks = function(e, t) {
1676
+ }, Us = function(e, t) {
1677
1677
  return t.set(t.t, t.p, !!(t.s + t.c * e), t);
1678
1678
  }, pr = function(e, t) {
1679
1679
  var i = t._pt, n = "";
@@ -1690,14 +1690,14 @@ var Ui = function(e, t, i) {
1690
1690
  }, Ni = function(e, t) {
1691
1691
  for (var i = t._pt; i; )
1692
1692
  i.r(e, i.d), i = i._next;
1693
- }, Us = function(e, t, i, n) {
1693
+ }, Fs = function(e, t, i, n) {
1694
1694
  for (var r = this._pt, s; r; )
1695
1695
  s = r._next, r.p === n && r.modifier(e, t, i), r = s;
1696
- }, Fs = function(e) {
1696
+ }, Ns = function(e) {
1697
1697
  for (var t = this._pt, i, n; t; )
1698
1698
  n = t._next, t.p === e && !t.op || t.op === e ? Yt(this, t, "_pt") : t.dep || (i = 1), t = n;
1699
1699
  return !i;
1700
- }, Ns = function(e, t, i, n) {
1700
+ }, zs = function(e, t, i, n) {
1701
1701
  n.mSet(e, t, n.m.call(n.tween, i, n.mt), n);
1702
1702
  }, fr = function(e) {
1703
1703
  for (var t = e._pt, i, n, r, s; t; ) {
@@ -1712,7 +1712,7 @@ var Ui = function(e, t, i) {
1712
1712
  }
1713
1713
  var e = a.prototype;
1714
1714
  return e.modifier = function(i, n, r) {
1715
- this.mSet = this.mSet || this.set, this.set = Ns, this.m = i, this.mt = r, this.tween = n;
1715
+ this.mSet = this.mSet || this.set, this.set = zs, this.m = i, this.mt = r, this.tween = n;
1716
1716
  }, a;
1717
1717
  })();
1718
1718
  te(Ri + "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger", function(a) {
@@ -1728,8 +1728,8 @@ z = new q({
1728
1728
  smoothChildTiming: !0
1729
1729
  });
1730
1730
  he.stringFilter = nr;
1731
- var Ze = [], Ft = {}, zs = [], nn = 0, Bs = 0, ti = function(e) {
1732
- return (Ft[e] || zs).map(function(t) {
1731
+ var Ze = [], Ft = {}, $s = [], nn = 0, Bs = 0, ti = function(e) {
1732
+ return (Ft[e] || $s).map(function(t) {
1733
1733
  return t();
1734
1734
  });
1735
1735
  }, _i = function() {
@@ -1797,7 +1797,7 @@ var Ze = [], Ft = {}, zs = [], nn = 0, Bs = 0, ti = function(e) {
1797
1797
  }, e.revert = function(i) {
1798
1798
  this.kill(i || {});
1799
1799
  }, a;
1800
- })(), $s = /* @__PURE__ */ (function() {
1800
+ })(), Gs = /* @__PURE__ */ (function() {
1801
1801
  function a(t) {
1802
1802
  this.contexts = [], this.scope = t, N && N.data.push(this);
1803
1803
  }
@@ -1836,7 +1836,7 @@ var Ze = [], Ft = {}, zs = [], nn = 0, Bs = 0, ti = function(e) {
1836
1836
  },
1837
1837
  getProperty: function(e, t, i, n) {
1838
1838
  Z(e) && (e = me(e)[0]);
1839
- var r = He(e || {}).get, s = i ? $n : Bn;
1839
+ var r = He(e || {}).get, s = i ? Bn : $n;
1840
1840
  return i === "native" && (i = ""), e && (t ? s((ae[t] && ae[t].get || r)(e, t, i, n)) : function(o, l, c) {
1841
1841
  return s((ae[o] && ae[o].get || r)(e, o, l, c));
1842
1842
  });
@@ -1886,10 +1886,10 @@ var Ze = [], Ft = {}, zs = [], nn = 0, Bs = 0, ti = function(e) {
1886
1886
  });
1887
1887
  },
1888
1888
  registerEase: function(e, t) {
1889
- S[e] = Ye(t);
1889
+ D[e] = Ye(t);
1890
1890
  },
1891
1891
  parseEase: function(e, t) {
1892
- return arguments.length ? Ye(e, t) : S;
1892
+ return arguments.length ? Ye(e, t) : D;
1893
1893
  },
1894
1894
  getById: function(e) {
1895
1895
  return z.getById(e);
@@ -1905,7 +1905,7 @@ var Ze = [], Ft = {}, zs = [], nn = 0, Bs = 0, ti = function(e) {
1905
1905
  return e ? new mr(e, t) : N;
1906
1906
  },
1907
1907
  matchMedia: function(e) {
1908
- return new $s(e);
1908
+ return new Gs(e);
1909
1909
  },
1910
1910
  matchMediaRefresh: function() {
1911
1911
  return Ze.forEach(function(e) {
@@ -1924,21 +1924,21 @@ var Ze = [], Ft = {}, zs = [], nn = 0, Bs = 0, ti = function(e) {
1924
1924
  n >= 0 && i.splice(n, 1);
1925
1925
  },
1926
1926
  utils: {
1927
- wrap: xs,
1928
- wrapYoyo: bs,
1927
+ wrap: bs,
1928
+ wrapYoyo: Es,
1929
1929
  distribute: Kn,
1930
1930
  random: Wn,
1931
1931
  snap: Xn,
1932
- normalize: ys,
1932
+ normalize: xs,
1933
1933
  getUnit: X,
1934
- clamp: fs,
1934
+ clamp: ms,
1935
1935
  splitColor: tr,
1936
1936
  toArray: me,
1937
1937
  selector: fi,
1938
1938
  mapRange: Qn,
1939
- pipe: gs,
1940
- unitize: _s,
1941
- interpolate: Es,
1939
+ pipe: _s,
1940
+ unitize: ys,
1941
+ interpolate: vs,
1942
1942
  shuffle: Zn
1943
1943
  },
1944
1944
  install: kn,
@@ -1952,7 +1952,7 @@ var Ze = [], Ft = {}, zs = [], nn = 0, Bs = 0, ti = function(e) {
1952
1952
  globals: Un,
1953
1953
  Tween: H,
1954
1954
  Timeline: q,
1955
- Animation: Ct,
1955
+ Animation: Pt,
1956
1956
  getCache: He,
1957
1957
  _removeLinkedListItem: Yt,
1958
1958
  reverting: function() {
@@ -1962,7 +1962,7 @@ var Ze = [], Ft = {}, zs = [], nn = 0, Bs = 0, ti = function(e) {
1962
1962
  return e && N && (N.data.push(e), e._ctx = N), N;
1963
1963
  },
1964
1964
  suppressOverwrites: function(e) {
1965
- return Ci = e;
1965
+ return Pi = e;
1966
1966
  }
1967
1967
  }
1968
1968
  };
@@ -1973,15 +1973,15 @@ oe.add(q.updateRoot);
1973
1973
  et = Vt.to({}, {
1974
1974
  duration: 0
1975
1975
  });
1976
- var Gs = function(e, t) {
1976
+ var Vs = function(e, t) {
1977
1977
  for (var i = e._pt; i && i.p !== t && i.op !== t && i.fp !== t; )
1978
1978
  i = i._next;
1979
1979
  return i;
1980
- }, Vs = function(e, t) {
1980
+ }, Hs = function(e, t) {
1981
1981
  var i = e._targets, n, r, s;
1982
1982
  for (n in t)
1983
1983
  for (r = i.length; r--; )
1984
- s = e._ptLookup[r][n], s && (s = s.d) && (s._pt && (s = Gs(s, n)), s && s.modifier && s.modifier(t[n], e, i[r], n));
1984
+ s = e._ptLookup[r][n], s && (s = s.d) && (s._pt && (s = Vs(s, n)), s && s.modifier && s.modifier(t[n], e, i[r], n));
1985
1985
  }, ii = function(e, t) {
1986
1986
  return {
1987
1987
  name: e,
@@ -1999,7 +1999,7 @@ var Gs = function(e, t) {
1999
1999
  l[c] = t(r[c]);
2000
2000
  r = l;
2001
2001
  }
2002
- Vs(o, r);
2002
+ Hs(o, r);
2003
2003
  };
2004
2004
  }
2005
2005
  };
@@ -2026,90 +2026,90 @@ var Gs = function(e, t) {
2026
2026
  H.version = q.version = re.version = "3.13.0";
2027
2027
  Ln = 1;
2028
2028
  Ti() && ht();
2029
- S.Power0;
2030
- S.Power1;
2031
- S.Power2;
2032
- S.Power3;
2033
- S.Power4;
2034
- S.Linear;
2035
- S.Quad;
2036
- S.Cubic;
2037
- S.Quart;
2038
- S.Quint;
2039
- S.Strong;
2040
- S.Elastic;
2041
- S.Back;
2042
- S.SteppedEase;
2043
- S.Bounce;
2044
- S.Sine;
2045
- S.Expo;
2046
- S.Circ;
2047
- var rn, Se, nt, zi, Ge, sn, Bi, Hs = function() {
2029
+ D.Power0;
2030
+ D.Power1;
2031
+ D.Power2;
2032
+ D.Power3;
2033
+ D.Power4;
2034
+ D.Linear;
2035
+ D.Quad;
2036
+ D.Cubic;
2037
+ D.Quart;
2038
+ D.Quint;
2039
+ D.Strong;
2040
+ D.Elastic;
2041
+ D.Back;
2042
+ D.SteppedEase;
2043
+ D.Bounce;
2044
+ D.Sine;
2045
+ D.Expo;
2046
+ D.Circ;
2047
+ var rn, Se, nt, zi, Ge, sn, $i, js = function() {
2048
2048
  return typeof window < "u";
2049
- }, Ae = {}, Be = 180 / Math.PI, rt = Math.PI / 180, We = Math.atan2, an = 1e8, $i = /([A-Z])/g, js = /(left|right|width|margin|padding|x)/i, Ys = /[\s,\(]\S/, xe = {
2049
+ }, Ae = {}, $e = 180 / Math.PI, rt = Math.PI / 180, We = Math.atan2, an = 1e8, Bi = /([A-Z])/g, Ys = /(left|right|width|margin|padding|x)/i, Zs = /[\s,\(]\S/, xe = {
2050
2050
  autoAlpha: "opacity,visibility",
2051
2051
  scale: "scaleX,scaleY",
2052
2052
  alpha: "opacity"
2053
2053
  }, yi = function(e, t) {
2054
2054
  return t.set(t.t, t.p, Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u, t);
2055
- }, Zs = function(e, t) {
2056
- return t.set(t.t, t.p, e === 1 ? t.e : Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u, t);
2057
2055
  }, Ks = function(e, t) {
2058
- return t.set(t.t, t.p, e ? Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u : t.b, t);
2056
+ return t.set(t.t, t.p, e === 1 ? t.e : Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u, t);
2059
2057
  }, Xs = function(e, t) {
2058
+ return t.set(t.t, t.p, e ? Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u : t.b, t);
2059
+ }, Ws = function(e, t) {
2060
2060
  var i = t.s + t.c * e;
2061
2061
  t.set(t.t, t.p, ~~(i + (i < 0 ? -0.5 : 0.5)) + t.u, t);
2062
2062
  }, gr = function(e, t) {
2063
2063
  return t.set(t.t, t.p, e ? t.e : t.b, t);
2064
2064
  }, _r = function(e, t) {
2065
2065
  return t.set(t.t, t.p, e !== 1 ? t.b : t.e, t);
2066
- }, Ws = function(e, t, i) {
2067
- return e.style[t] = i;
2068
2066
  }, qs = function(e, t, i) {
2069
- return e.style.setProperty(t, i);
2067
+ return e.style[t] = i;
2070
2068
  }, Qs = function(e, t, i) {
2071
- return e._gsap[t] = i;
2069
+ return e.style.setProperty(t, i);
2072
2070
  }, Js = function(e, t, i) {
2071
+ return e._gsap[t] = i;
2072
+ }, ea = function(e, t, i) {
2073
2073
  return e._gsap.scaleX = e._gsap.scaleY = i;
2074
- }, ea = function(e, t, i, n, r) {
2074
+ }, ta = function(e, t, i, n, r) {
2075
2075
  var s = e._gsap;
2076
2076
  s.scaleX = s.scaleY = i, s.renderTransform(r, s);
2077
- }, ta = function(e, t, i, n, r) {
2077
+ }, ia = function(e, t, i, n, r) {
2078
2078
  var s = e._gsap;
2079
2079
  s[t] = i, s.renderTransform(r, s);
2080
- }, B = "transform", ne = B + "Origin", ia = function a(e, t) {
2080
+ }, $ = "transform", ne = $ + "Origin", na = function a(e, t) {
2081
2081
  var i = this, n = this.target, r = n.style, s = n._gsap;
2082
2082
  if (e in Ae && r) {
2083
2083
  if (this.tfm = this.tfm || {}, e !== "transform")
2084
2084
  e = xe[e] || e, ~e.indexOf(",") ? e.split(",").forEach(function(o) {
2085
- return i.tfm[o] = Pe(n, o);
2086
- }) : this.tfm[e] = s.x ? s[e] : Pe(n, e), e === ne && (this.tfm.zOrigin = s.zOrigin);
2085
+ return i.tfm[o] = Ce(n, o);
2086
+ }) : this.tfm[e] = s.x ? s[e] : Ce(n, e), e === ne && (this.tfm.zOrigin = s.zOrigin);
2087
2087
  else
2088
2088
  return xe.transform.split(",").forEach(function(o) {
2089
2089
  return a.call(i, o, t);
2090
2090
  });
2091
- if (this.props.indexOf(B) >= 0)
2091
+ if (this.props.indexOf($) >= 0)
2092
2092
  return;
2093
- s.svg && (this.svgo = n.getAttribute("data-svg-origin"), this.props.push(ne, t, "")), e = B;
2093
+ s.svg && (this.svgo = n.getAttribute("data-svg-origin"), this.props.push(ne, t, "")), e = $;
2094
2094
  }
2095
2095
  (r || t) && this.props.push(e, t, r[e]);
2096
2096
  }, yr = function(e) {
2097
2097
  e.translate && (e.removeProperty("translate"), e.removeProperty("scale"), e.removeProperty("rotate"));
2098
- }, na = function() {
2098
+ }, ra = function() {
2099
2099
  var e = this.props, t = this.target, i = t.style, n = t._gsap, r, s;
2100
2100
  for (r = 0; r < e.length; r += 3)
2101
- e[r + 1] ? e[r + 1] === 2 ? t[e[r]](e[r + 2]) : t[e[r]] = e[r + 2] : e[r + 2] ? i[e[r]] = e[r + 2] : i.removeProperty(e[r].substr(0, 2) === "--" ? e[r] : e[r].replace($i, "-$1").toLowerCase());
2101
+ e[r + 1] ? e[r + 1] === 2 ? t[e[r]](e[r + 2]) : t[e[r]] = e[r + 2] : e[r + 2] ? i[e[r]] = e[r + 2] : i.removeProperty(e[r].substr(0, 2) === "--" ? e[r] : e[r].replace(Bi, "-$1").toLowerCase());
2102
2102
  if (this.tfm) {
2103
2103
  for (s in this.tfm)
2104
2104
  n[s] = this.tfm[s];
2105
- n.svg && (n.renderTransform(), t.setAttribute("data-svg-origin", this.svgo || "")), r = Bi(), (!r || !r.isStart) && !i[B] && (yr(i), n.zOrigin && i[ne] && (i[ne] += " " + n.zOrigin + "px", n.zOrigin = 0, n.renderTransform()), n.uncache = 1);
2105
+ n.svg && (n.renderTransform(), t.setAttribute("data-svg-origin", this.svgo || "")), r = $i(), (!r || !r.isStart) && !i[$] && (yr(i), n.zOrigin && i[ne] && (i[ne] += " " + n.zOrigin + "px", n.zOrigin = 0, n.renderTransform()), n.uncache = 1);
2106
2106
  }
2107
2107
  }, xr = function(e, t) {
2108
2108
  var i = {
2109
2109
  target: e,
2110
2110
  props: [],
2111
- revert: na,
2112
- save: ia
2111
+ revert: ra,
2112
+ save: na
2113
2113
  };
2114
2114
  return e._gsap || re.core.getCache(e), t && e.style && e.nodeType && t.split(",").forEach(function(n) {
2115
2115
  return i.save(n);
@@ -2119,7 +2119,7 @@ var rn, Se, nt, zi, Ge, sn, Bi, Hs = function() {
2119
2119
  return i && i.style ? i : Se.createElement(e);
2120
2120
  }, ge = function a(e, t, i) {
2121
2121
  var n = getComputedStyle(e);
2122
- return n[t] || n.getPropertyValue(t.replace($i, "-$1").toLowerCase()) || n.getPropertyValue(t) || !i && a(e, ct(t) || t, 1) || "";
2122
+ return n[t] || n.getPropertyValue(t.replace(Bi, "-$1").toLowerCase()) || n.getPropertyValue(t) || !i && a(e, ct(t) || t, 1) || "";
2123
2123
  }, on = "O,Moz,ms,Ms,Webkit".split(","), ct = function(e, t, i) {
2124
2124
  var n = t || Ge, r = n.style, s = 5;
2125
2125
  if (e in r && !i)
@@ -2128,9 +2128,9 @@ var rn, Se, nt, zi, Ge, sn, Bi, Hs = function() {
2128
2128
  ;
2129
2129
  return s < 0 ? null : (s === 3 ? "ms" : s >= 0 ? on[s] : "") + e;
2130
2130
  }, bi = function() {
2131
- Hs() && window.document && (rn = window, Se = rn.document, nt = Se.documentElement, Ge = xi("div") || {
2131
+ js() && window.document && (rn = window, Se = rn.document, nt = Se.documentElement, Ge = xi("div") || {
2132
2132
  style: {}
2133
- }, xi("div"), B = ct(B), ne = B + "Origin", Ge.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0", br = !!ct("perspective"), Bi = re.core.reverting, zi = 1);
2133
+ }, xi("div"), $ = ct($), ne = $ + "Origin", Ge.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0", br = !!ct("perspective"), $i = re.core.reverting, zi = 1);
2134
2134
  }, ln = function(e) {
2135
2135
  var t = e.ownerSVGElement, i = xi("svg", t && t.getAttribute("xmlns") || "http://www.w3.org/2000/svg"), n = e.cloneNode(!0), r;
2136
2136
  n.style.display = "block", i.appendChild(n), nt.appendChild(i);
@@ -2161,7 +2161,7 @@ var rn, Se, nt, zi, Ge, sn, Bi, Hs = function() {
2161
2161
  }, Ke = function(e, t) {
2162
2162
  if (t) {
2163
2163
  var i = e.style, n;
2164
- t in Ae && t !== ne && (t = B), i.removeProperty ? (n = t.substr(0, 2), (n === "ms" || t.substr(0, 6) === "webkit") && (t = "-" + t), i.removeProperty(n === "--" ? t : t.replace($i, "-$1").toLowerCase())) : i.removeAttribute(t);
2164
+ t in Ae && t !== ne && (t = $), i.removeProperty ? (n = t.substr(0, 2), (n === "ms" || t.substr(0, 6) === "webkit") && (t = "-" + t), i.removeProperty(n === "--" ? t : t.replace(Bi, "-$1").toLowerCase())) : i.removeAttribute(t);
2165
2165
  }
2166
2166
  }, De = function(e, t, i, n, r, s) {
2167
2167
  var o = new ie(e._pt, t, i, 0, 1, s ? _r : gr);
@@ -2170,11 +2170,11 @@ var rn, Se, nt, zi, Ge, sn, Bi, Hs = function() {
2170
2170
  deg: 1,
2171
2171
  rad: 1,
2172
2172
  turn: 1
2173
- }, ra = {
2173
+ }, sa = {
2174
2174
  grid: 1,
2175
2175
  flex: 1
2176
2176
  }, Le = function a(e, t, i, n) {
2177
- var r = parseFloat(i) || 0, s = (i + "").trim().substr((r + "").length) || "px", o = Ge.style, l = js.test(t), c = e.tagName.toLowerCase() === "svg", h = (c ? "client" : "offset") + (l ? "Width" : "Height"), u = 100, p = n === "px", m = n === "%", f, d, g, _;
2177
+ var r = parseFloat(i) || 0, s = (i + "").trim().substr((r + "").length) || "px", o = Ge.style, l = Ys.test(t), c = e.tagName.toLowerCase() === "svg", h = (c ? "client" : "offset") + (l ? "Width" : "Height"), u = 100, p = n === "px", m = n === "%", f, d, g, _;
2178
2178
  if (n === s || !r || cn[n] || cn[s])
2179
2179
  return r;
2180
2180
  if (s !== "px" && !p && (r = a(e, t, i, "px")), _ = e.getCTM && vr(e), (m || s === "%") && (Ae[t] || ~t.indexOf("adius")))
@@ -2185,20 +2185,20 @@ var rn, Se, nt, zi, Ge, sn, Bi, Hs = function() {
2185
2185
  var y = e.style[t];
2186
2186
  e.style[t] = u + n, f = e[h], y ? e.style[t] = y : Ke(e, t);
2187
2187
  } else
2188
- (m || s === "%") && !ra[ge(d, "display")] && (o.position = ge(e, "position")), d === e && (o.position = "static"), d.appendChild(Ge), f = Ge[h], d.removeChild(Ge), o.position = "absolute";
2188
+ (m || s === "%") && !sa[ge(d, "display")] && (o.position = ge(e, "position")), d === e && (o.position = "static"), d.appendChild(Ge), f = Ge[h], d.removeChild(Ge), o.position = "absolute";
2189
2189
  return l && m && (g = He(d), g.time = oe.time, g.width = d[h]), V(p ? f * r / u : f && r ? u / f * r : 0);
2190
- }, Pe = function(e, t, i, n) {
2190
+ }, Ce = function(e, t, i, n) {
2191
2191
  var r;
2192
2192
  return zi || bi(), t in xe && t !== "transform" && (t = xe[t], ~t.indexOf(",") && (t = t.split(",")[0])), Ae[t] && t !== "transform" ? (r = Tt(e, n), r = t !== "transformOrigin" ? r[t] : r.svg ? r.origin : jt(ge(e, ne)) + " " + r.zOrigin + "px") : (r = e.style[t], (!r || r === "auto" || n || ~(r + "").indexOf("calc(")) && (r = Ht[t] && Ht[t](e, t, i) || ge(e, t) || Nn(e, t) || (t === "opacity" ? 1 : 0))), i && !~(r + "").trim().indexOf(" ") ? Le(e, t, r, i) + i : r;
2193
- }, sa = function(e, t, i, n) {
2193
+ }, aa = function(e, t, i, n) {
2194
2194
  if (!i || i === "none") {
2195
2195
  var r = ct(t, e, 1), s = r && ge(e, r, 1);
2196
2196
  s && s !== i ? (t = r, i = s) : t === "borderColor" && (i = ge(e, "borderTopColor"));
2197
2197
  }
2198
- var o = new ie(this._pt, e.style, t, 0, 1, pr), l = 0, c = 0, h, u, p, m, f, d, g, _, y, x, b, E;
2199
- if (o.b = i, o.e = n, i += "", n += "", n.substring(0, 6) === "var(--" && (n = ge(e, n.substring(4, n.indexOf(")")))), n === "auto" && (d = e.style[t], e.style[t] = n, n = ge(e, t) || n, d ? e.style[t] = d : Ke(e, t)), h = [i, n], nr(h), i = h[0], n = h[1], p = i.match(Je) || [], E = n.match(Je) || [], E.length) {
2198
+ var o = new ie(this._pt, e.style, t, 0, 1, pr), l = 0, c = 0, h, u, p, m, f, d, g, _, y, x, E, b;
2199
+ if (o.b = i, o.e = n, i += "", n += "", n.substring(0, 6) === "var(--" && (n = ge(e, n.substring(4, n.indexOf(")")))), n === "auto" && (d = e.style[t], e.style[t] = n, n = ge(e, t) || n, d ? e.style[t] = d : Ke(e, t)), h = [i, n], nr(h), i = h[0], n = h[1], p = i.match(Je) || [], b = n.match(Je) || [], b.length) {
2200
2200
  for (; u = Je.exec(n); )
2201
- g = u[0], y = n.substring(l, u.index), f ? f = (f + 1) % 5 : (y.substr(-5) === "rgba(" || y.substr(-5) === "hsla(") && (f = 1), g !== (d = p[c++] || "") && (m = parseFloat(d) || 0, b = d.substr((m + "").length), g.charAt(1) === "=" && (g = it(m, g) + b), _ = parseFloat(g), x = g.substr((_ + "").length), l = Je.lastIndex - x.length, x || (x = x || he.units[t] || b, l === n.length && (n += x, o.e += x)), b !== x && (m = Le(e, t, d, x) || 0), o._pt = {
2201
+ g = u[0], y = n.substring(l, u.index), f ? f = (f + 1) % 5 : (y.substr(-5) === "rgba(" || y.substr(-5) === "hsla(") && (f = 1), g !== (d = p[c++] || "") && (m = parseFloat(d) || 0, E = d.substr((m + "").length), g.charAt(1) === "=" && (g = it(m, g) + E), _ = parseFloat(g), x = g.substr((_ + "").length), l = Je.lastIndex - x.length, x || (x = x || he.units[t] || E, l === n.length && (n += x, o.e += x)), E !== x && (m = Le(e, t, d, x) || 0), o._pt = {
2202
2202
  _next: o._pt,
2203
2203
  p: y || c === 1 ? y : ",",
2204
2204
  //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.
@@ -2209,30 +2209,30 @@ var rn, Se, nt, zi, Ge, sn, Bi, Hs = function() {
2209
2209
  o.c = l < n.length ? n.substring(l, n.length) : "";
2210
2210
  } else
2211
2211
  o.r = t === "display" && n === "none" ? _r : gr;
2212
- return In.test(n) && (o.e = 0), this._pt = o, o;
2212
+ return On.test(n) && (o.e = 0), this._pt = o, o;
2213
2213
  }, un = {
2214
2214
  top: "0%",
2215
2215
  bottom: "100%",
2216
2216
  left: "0%",
2217
2217
  right: "100%",
2218
2218
  center: "50%"
2219
- }, aa = function(e) {
2219
+ }, oa = function(e) {
2220
2220
  var t = e.split(" "), i = t[0], n = t[1] || "50%";
2221
2221
  return (i === "top" || i === "bottom" || n === "left" || n === "right") && (e = i, i = n, n = e), t[0] = un[i] || i, t[1] = un[n] || n, t.join(" ");
2222
- }, oa = function(e, t) {
2222
+ }, la = function(e, t) {
2223
2223
  if (t.tween && t.tween._time === t.tween._dur) {
2224
2224
  var i = t.t, n = i.style, r = t.u, s = i._gsap, o, l, c;
2225
2225
  if (r === "all" || r === !0)
2226
2226
  n.cssText = "", l = 1;
2227
2227
  else
2228
2228
  for (r = r.split(","), c = r.length; --c > -1; )
2229
- o = r[c], Ae[o] && (l = 1, o = o === "transformOrigin" ? ne : B), Ke(i, o);
2230
- l && (Ke(i, B), s && (s.svg && i.removeAttribute("transform"), n.scale = n.rotate = n.translate = "none", Tt(i, 1), s.uncache = 1, yr(n)));
2229
+ o = r[c], Ae[o] && (l = 1, o = o === "transformOrigin" ? ne : $), Ke(i, o);
2230
+ l && (Ke(i, $), s && (s.svg && i.removeAttribute("transform"), n.scale = n.rotate = n.translate = "none", Tt(i, 1), s.uncache = 1, yr(n)));
2231
2231
  }
2232
2232
  }, Ht = {
2233
2233
  clearProps: function(e, t, i, n, r) {
2234
2234
  if (r.data !== "isFromStart") {
2235
- var s = e._pt = new ie(e._pt, t, i, 0, 0, oa);
2235
+ var s = e._pt = new ie(e._pt, t, i, 0, 0, la);
2236
2236
  return s.u = n, s.pr = -10, s.tween = r, e._props.push(i), 1;
2237
2237
  }
2238
2238
  }
@@ -2299,50 +2299,50 @@ var rn, Se, nt, zi, Ge, sn, Bi, Hs = function() {
2299
2299
  return 1;
2300
2300
  }
2301
2301
  */
2302
- }, At = [1, 0, 0, 1, 0, 0], wr = {}, Pr = function(e) {
2302
+ }, At = [1, 0, 0, 1, 0, 0], wr = {}, Cr = function(e) {
2303
2303
  return e === "matrix(1, 0, 0, 1, 0, 0)" || e === "none" || !e;
2304
2304
  }, dn = function(e) {
2305
- var t = ge(e, B);
2306
- return Pr(t) ? At : t.substr(7).match(Rn).map(V);
2305
+ var t = ge(e, $);
2306
+ return Cr(t) ? At : t.substr(7).match(Rn).map(V);
2307
2307
  }, Gi = function(e, t) {
2308
2308
  var i = e._gsap || He(e), n = e.style, r = dn(e), s, o, l, c;
2309
2309
  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" ? At : r) : (r === At && !e.offsetParent && e !== nt && !i.svg && (l = n.display, n.display = "block", s = e.parentNode, (!s || !e.offsetParent && !e.getBoundingClientRect().width) && (c = 1, o = e.nextElementSibling, nt.appendChild(e)), r = dn(e), l ? n.display = l : Ke(e, "display"), c && (o ? s.insertBefore(e, o) : s ? s.appendChild(e) : nt.removeChild(e))), t && r.length > 6 ? [r[0], r[1], r[4], r[5], r[12], r[13]] : r);
2310
2310
  }, Ei = function(e, t, i, n, r, s) {
2311
- var o = e._gsap, l = r || Gi(e, !0), c = o.xOrigin || 0, h = o.yOrigin || 0, u = o.xOffset || 0, p = o.yOffset || 0, m = l[0], f = l[1], d = l[2], g = l[3], _ = l[4], y = l[5], x = t.split(" "), b = parseFloat(x[0]) || 0, E = parseFloat(x[1]) || 0, P, w, C, v;
2312
- i ? l !== At && (w = m * g - f * d) && (C = b * (g / w) + E * (-d / w) + (d * y - g * _) / w, v = b * (-f / w) + E * (m / w) - (m * y - f * _) / w, b = C, E = v) : (P = Er(e), b = P.x + (~x[0].indexOf("%") ? b / 100 * P.width : b), E = P.y + (~(x[1] || x[0]).indexOf("%") ? E / 100 * P.height : E)), n || n !== !1 && o.smooth ? (_ = b - c, y = E - h, o.xOffset = u + (_ * m + y * d) - _, o.yOffset = p + (_ * f + y * g) - y) : o.xOffset = o.yOffset = 0, o.xOrigin = b, o.yOrigin = E, o.smooth = !!n, o.origin = t, o.originIsAbsolute = !!i, e.style[ne] = "0px 0px", s && (De(s, o, "xOrigin", c, b), De(s, o, "yOrigin", h, E), De(s, o, "xOffset", u, o.xOffset), De(s, o, "yOffset", p, o.yOffset)), e.setAttribute("data-svg-origin", b + " " + E);
2311
+ var o = e._gsap, l = r || Gi(e, !0), c = o.xOrigin || 0, h = o.yOrigin || 0, u = o.xOffset || 0, p = o.yOffset || 0, m = l[0], f = l[1], d = l[2], g = l[3], _ = l[4], y = l[5], x = t.split(" "), E = parseFloat(x[0]) || 0, b = parseFloat(x[1]) || 0, C, v, P, w;
2312
+ i ? l !== At && (v = m * g - f * d) && (P = E * (g / v) + b * (-d / v) + (d * y - g * _) / v, w = E * (-f / v) + b * (m / v) - (m * y - f * _) / v, E = P, b = w) : (C = Er(e), E = C.x + (~x[0].indexOf("%") ? E / 100 * C.width : E), b = C.y + (~(x[1] || x[0]).indexOf("%") ? b / 100 * C.height : b)), n || n !== !1 && o.smooth ? (_ = E - c, y = b - h, o.xOffset = u + (_ * m + y * d) - _, o.yOffset = p + (_ * f + y * g) - y) : o.xOffset = o.yOffset = 0, o.xOrigin = E, o.yOrigin = b, o.smooth = !!n, o.origin = t, o.originIsAbsolute = !!i, e.style[ne] = "0px 0px", s && (De(s, o, "xOrigin", c, E), De(s, o, "yOrigin", h, b), De(s, o, "xOffset", u, o.xOffset), De(s, o, "yOffset", p, o.yOffset)), e.setAttribute("data-svg-origin", E + " " + b);
2313
2313
  }, Tt = function(e, t) {
2314
2314
  var i = e._gsap || new or(e);
2315
2315
  if ("x" in i && !t && !i.uncache)
2316
2316
  return i;
2317
- var n = e.style, r = i.scaleX < 0, s = "px", o = "deg", l = getComputedStyle(e), c = ge(e, ne) || "0", h, u, p, m, f, d, g, _, y, x, b, E, P, w, C, v, T, D, A, R, I, $, F, U, Q, ut, dt, pt, Ue, ji, ve, Fe;
2318
- return h = u = p = d = g = _ = y = x = b = 0, m = f = 1, i.svg = !!(e.getCTM && vr(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"), w = Gi(e, i.svg), i.svg && (i.uncache ? (Q = e.getBBox(), c = i.xOrigin - Q.x + "px " + (i.yOrigin - Q.y) + "px", U = "") : U = !t && e.getAttribute("data-svg-origin"), Ei(e, U || c, !!U || i.originIsAbsolute, i.smooth !== !1, w)), E = i.xOrigin || 0, P = i.yOrigin || 0, w !== At && (D = w[0], A = w[1], R = w[2], I = w[3], h = $ = w[4], u = F = w[5], w.length === 6 ? (m = Math.sqrt(D * D + A * A), f = Math.sqrt(I * I + R * R), d = D || A ? We(A, D) * Be : 0, y = R || I ? We(R, I) * Be + d : 0, y && (f *= Math.abs(Math.cos(y * rt))), i.svg && (h -= E - (E * D + P * R), u -= P - (E * A + P * I))) : (Fe = w[6], ji = w[7], dt = w[8], pt = w[9], Ue = w[10], ve = w[11], h = w[12], u = w[13], p = w[14], C = We(Fe, Ue), g = C * Be, C && (v = Math.cos(-C), T = Math.sin(-C), U = $ * v + dt * T, Q = F * v + pt * T, ut = Fe * v + Ue * T, dt = $ * -T + dt * v, pt = F * -T + pt * v, Ue = Fe * -T + Ue * v, ve = ji * -T + ve * v, $ = U, F = Q, Fe = ut), C = We(-R, Ue), _ = C * Be, C && (v = Math.cos(-C), T = Math.sin(-C), U = D * v - dt * T, Q = A * v - pt * T, ut = R * v - Ue * T, ve = I * T + ve * v, D = U, A = Q, R = ut), C = We(A, D), d = C * Be, C && (v = Math.cos(C), T = Math.sin(C), U = D * v + A * T, Q = $ * v + F * T, A = A * v - D * T, F = F * v - $ * T, D = U, $ = Q), g && Math.abs(g) + Math.abs(d) > 359.9 && (g = d = 0, _ = 180 - _), m = V(Math.sqrt(D * D + A * A + R * R)), f = V(Math.sqrt(F * F + Fe * Fe)), C = We($, F), y = Math.abs(C) > 2e-4 ? C * Be : 0, b = ve ? 1 / (ve < 0 ? -ve : ve) : 0), i.svg && (U = e.getAttribute("transform"), i.forceCSS = e.setAttribute("transform", "") || !Pr(ge(e, B)), U && e.setAttribute("transform", U))), Math.abs(y) > 90 && Math.abs(y) < 270 && (r ? (m *= -1, y += d <= 0 ? 180 : -180, d += d <= 0 ? 180 : -180) : (f *= -1, y += y <= 0 ? 180 : -180)), t = t || i.uncache, i.x = h - ((i.xPercent = h && (!t && i.xPercent || (Math.round(e.offsetWidth / 2) === Math.round(-h) ? -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 = p + s, i.scaleX = V(m), i.scaleY = V(f), i.rotation = V(d) + o, i.rotationX = V(g) + o, i.rotationY = V(_) + o, i.skewX = y + o, i.skewY = x + o, i.transformPerspective = b + s, (i.zOrigin = parseFloat(c.split(" ")[2]) || !t && i.zOrigin || 0) && (n[ne] = jt(c)), i.xOffset = i.yOffset = 0, i.force3D = he.force3D, i.renderTransform = i.svg ? ha : br ? Cr : la, i.uncache = 0, i;
2317
+ var n = e.style, r = i.scaleX < 0, s = "px", o = "deg", l = getComputedStyle(e), c = ge(e, ne) || "0", h, u, p, m, f, d, g, _, y, x, E, b, C, v, P, w, T, M, A, R, O, B, F, U, Q, ut, dt, pt, Ue, ji, ve, Fe;
2318
+ return h = u = p = d = g = _ = y = x = E = 0, m = f = 1, i.svg = !!(e.getCTM && vr(e)), l.translate && ((l.translate !== "none" || l.scale !== "none" || l.rotate !== "none") && (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[$] !== "none" ? l[$] : "")), n.scale = n.rotate = n.translate = "none"), v = Gi(e, i.svg), i.svg && (i.uncache ? (Q = e.getBBox(), c = i.xOrigin - Q.x + "px " + (i.yOrigin - Q.y) + "px", U = "") : U = !t && e.getAttribute("data-svg-origin"), Ei(e, U || c, !!U || i.originIsAbsolute, i.smooth !== !1, v)), b = i.xOrigin || 0, C = i.yOrigin || 0, v !== At && (M = v[0], A = v[1], R = v[2], O = v[3], h = B = v[4], u = F = v[5], v.length === 6 ? (m = Math.sqrt(M * M + A * A), f = Math.sqrt(O * O + R * R), d = M || A ? We(A, M) * $e : 0, y = R || O ? We(R, O) * $e + d : 0, y && (f *= Math.abs(Math.cos(y * rt))), i.svg && (h -= b - (b * M + C * R), u -= C - (b * A + C * O))) : (Fe = v[6], ji = v[7], dt = v[8], pt = v[9], Ue = v[10], ve = v[11], h = v[12], u = v[13], p = v[14], P = We(Fe, Ue), g = P * $e, P && (w = Math.cos(-P), T = Math.sin(-P), U = B * w + dt * T, Q = F * w + pt * T, ut = Fe * w + Ue * T, dt = B * -T + dt * w, pt = F * -T + pt * w, Ue = Fe * -T + Ue * w, ve = ji * -T + ve * w, B = U, F = Q, Fe = ut), P = We(-R, Ue), _ = P * $e, P && (w = Math.cos(-P), T = Math.sin(-P), U = M * w - dt * T, Q = A * w - pt * T, ut = R * w - Ue * T, ve = O * T + ve * w, M = U, A = Q, R = ut), P = We(A, M), d = P * $e, P && (w = Math.cos(P), T = Math.sin(P), U = M * w + A * T, Q = B * w + F * T, A = A * w - M * T, F = F * w - B * T, M = U, B = Q), g && Math.abs(g) + Math.abs(d) > 359.9 && (g = d = 0, _ = 180 - _), m = V(Math.sqrt(M * M + A * A + R * R)), f = V(Math.sqrt(F * F + Fe * Fe)), P = We(B, F), y = Math.abs(P) > 2e-4 ? P * $e : 0, E = ve ? 1 / (ve < 0 ? -ve : ve) : 0), i.svg && (U = e.getAttribute("transform"), i.forceCSS = e.setAttribute("transform", "") || !Cr(ge(e, $)), U && e.setAttribute("transform", U))), Math.abs(y) > 90 && Math.abs(y) < 270 && (r ? (m *= -1, y += d <= 0 ? 180 : -180, d += d <= 0 ? 180 : -180) : (f *= -1, y += y <= 0 ? 180 : -180)), t = t || i.uncache, i.x = h - ((i.xPercent = h && (!t && i.xPercent || (Math.round(e.offsetWidth / 2) === Math.round(-h) ? -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 = p + s, i.scaleX = V(m), i.scaleY = V(f), i.rotation = V(d) + o, i.rotationX = V(g) + o, i.rotationY = V(_) + o, i.skewX = y + o, i.skewY = x + o, i.transformPerspective = E + s, (i.zOrigin = parseFloat(c.split(" ")[2]) || !t && i.zOrigin || 0) && (n[ne] = jt(c)), i.xOffset = i.yOffset = 0, i.force3D = he.force3D, i.renderTransform = i.svg ? ca : br ? Pr : ha, i.uncache = 0, i;
2319
2319
  }, jt = function(e) {
2320
2320
  return (e = e.split(" "))[0] + " " + e[1];
2321
2321
  }, ni = function(e, t, i) {
2322
2322
  var n = X(t);
2323
2323
  return V(parseFloat(t) + parseFloat(Le(e, "x", i + "px", n))) + n;
2324
- }, la = function(e, t) {
2325
- t.z = "0px", t.rotationY = t.rotationX = "0deg", t.force3D = 0, Cr(e, t);
2326
- }, Ne = "0deg", ft = "0px", ze = ") ", Cr = function(e, t) {
2327
- var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.z, c = i.rotation, h = i.rotationY, u = i.rotationX, p = i.skewX, m = i.skewY, f = i.scaleX, d = i.scaleY, g = i.transformPerspective, _ = i.force3D, y = i.target, x = i.zOrigin, b = "", E = _ === "auto" && e && e !== 1 || _ === !0;
2328
- if (x && (u !== Ne || h !== Ne)) {
2329
- var P = parseFloat(h) * rt, w = Math.sin(P), C = Math.cos(P), v;
2330
- P = parseFloat(u) * rt, v = Math.cos(P), s = ni(y, s, w * v * -x), o = ni(y, o, -Math.sin(P) * -x), l = ni(y, l, C * v * -x + x);
2331
- }
2332
- g !== ft && (b += "perspective(" + g + ze), (n || r) && (b += "translate(" + n + "%, " + r + "%) "), (E || s !== ft || o !== ft || l !== ft) && (b += l !== ft || E ? "translate3d(" + s + ", " + o + ", " + l + ") " : "translate(" + s + ", " + o + ze), c !== Ne && (b += "rotate(" + c + ze), h !== Ne && (b += "rotateY(" + h + ze), u !== Ne && (b += "rotateX(" + u + ze), (p !== Ne || m !== Ne) && (b += "skew(" + p + ", " + m + ze), (f !== 1 || d !== 1) && (b += "scale(" + f + ", " + d + ze), y.style[B] = b || "translate(0, 0)";
2333
2324
  }, ha = function(e, t) {
2334
- var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.rotation, c = i.skewX, h = i.skewY, u = i.scaleX, p = i.scaleY, m = i.target, f = i.xOrigin, d = i.yOrigin, g = i.xOffset, _ = i.yOffset, y = i.forceCSS, x = parseFloat(s), b = parseFloat(o), E, P, w, C, v;
2335
- l = parseFloat(l), c = parseFloat(c), h = parseFloat(h), h && (h = parseFloat(h), c += h, l += h), l || c ? (l *= rt, c *= rt, E = Math.cos(l) * u, P = Math.sin(l) * u, w = Math.sin(l - c) * -p, C = Math.cos(l - c) * p, c && (h *= rt, v = Math.tan(c - h), v = Math.sqrt(1 + v * v), w *= v, C *= v, h && (v = Math.tan(h), v = Math.sqrt(1 + v * v), E *= v, P *= v)), E = V(E), P = V(P), w = V(w), C = V(C)) : (E = u, C = p, P = w = 0), (x && !~(s + "").indexOf("px") || b && !~(o + "").indexOf("px")) && (x = Le(m, "x", s, "px"), b = Le(m, "y", o, "px")), (f || d || g || _) && (x = V(x + f - (f * E + d * w) + g), b = V(b + d - (f * P + d * C) + _)), (n || r) && (v = m.getBBox(), x = V(x + n / 100 * v.width), b = V(b + r / 100 * v.height)), v = "matrix(" + E + "," + P + "," + w + "," + C + "," + x + "," + b + ")", m.setAttribute("transform", v), y && (m.style[B] = v);
2336
- }, ca = function(e, t, i, n, r) {
2337
- var s = 360, o = Z(r), l = parseFloat(r) * (o && ~r.indexOf("rad") ? Be : 1), c = l - n, h = n + c + "deg", u, p;
2338
- return o && (u = r.split("_")[1], u === "short" && (c %= s, c !== c % (s / 2) && (c += c < 0 ? s : -s)), u === "cw" && c < 0 ? c = (c + s * an) % s - ~~(c / s) * s : u === "ccw" && c > 0 && (c = (c - s * an) % s - ~~(c / s) * s)), e._pt = p = new ie(e._pt, t, i, n, c, Zs), p.e = h, p.u = "deg", e._props.push(i), p;
2325
+ t.z = "0px", t.rotationY = t.rotationX = "0deg", t.force3D = 0, Pr(e, t);
2326
+ }, Ne = "0deg", ft = "0px", ze = ") ", Pr = function(e, t) {
2327
+ var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.z, c = i.rotation, h = i.rotationY, u = i.rotationX, p = i.skewX, m = i.skewY, f = i.scaleX, d = i.scaleY, g = i.transformPerspective, _ = i.force3D, y = i.target, x = i.zOrigin, E = "", b = _ === "auto" && e && e !== 1 || _ === !0;
2328
+ if (x && (u !== Ne || h !== Ne)) {
2329
+ var C = parseFloat(h) * rt, v = Math.sin(C), P = Math.cos(C), w;
2330
+ C = parseFloat(u) * rt, w = Math.cos(C), s = ni(y, s, v * w * -x), o = ni(y, o, -Math.sin(C) * -x), l = ni(y, l, P * w * -x + x);
2331
+ }
2332
+ g !== ft && (E += "perspective(" + g + ze), (n || r) && (E += "translate(" + n + "%, " + r + "%) "), (b || s !== ft || o !== ft || l !== ft) && (E += l !== ft || b ? "translate3d(" + s + ", " + o + ", " + l + ") " : "translate(" + s + ", " + o + ze), c !== Ne && (E += "rotate(" + c + ze), h !== Ne && (E += "rotateY(" + h + ze), u !== Ne && (E += "rotateX(" + u + ze), (p !== Ne || m !== Ne) && (E += "skew(" + p + ", " + m + ze), (f !== 1 || d !== 1) && (E += "scale(" + f + ", " + d + ze), y.style[$] = E || "translate(0, 0)";
2333
+ }, ca = function(e, t) {
2334
+ var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.rotation, c = i.skewX, h = i.skewY, u = i.scaleX, p = i.scaleY, m = i.target, f = i.xOrigin, d = i.yOrigin, g = i.xOffset, _ = i.yOffset, y = i.forceCSS, x = parseFloat(s), E = parseFloat(o), b, C, v, P, w;
2335
+ l = parseFloat(l), c = parseFloat(c), h = parseFloat(h), h && (h = parseFloat(h), c += h, l += h), l || c ? (l *= rt, c *= rt, b = Math.cos(l) * u, C = Math.sin(l) * u, v = Math.sin(l - c) * -p, P = Math.cos(l - c) * p, c && (h *= rt, w = Math.tan(c - h), w = Math.sqrt(1 + w * w), v *= w, P *= w, h && (w = Math.tan(h), w = Math.sqrt(1 + w * w), b *= w, C *= w)), b = V(b), C = V(C), v = V(v), P = V(P)) : (b = u, P = p, C = v = 0), (x && !~(s + "").indexOf("px") || E && !~(o + "").indexOf("px")) && (x = Le(m, "x", s, "px"), E = Le(m, "y", o, "px")), (f || d || g || _) && (x = V(x + f - (f * b + d * v) + g), E = V(E + d - (f * C + d * P) + _)), (n || r) && (w = m.getBBox(), x = V(x + n / 100 * w.width), E = V(E + r / 100 * w.height)), w = "matrix(" + b + "," + C + "," + v + "," + P + "," + x + "," + E + ")", m.setAttribute("transform", w), y && (m.style[$] = w);
2336
+ }, ua = function(e, t, i, n, r) {
2337
+ var s = 360, o = Z(r), l = parseFloat(r) * (o && ~r.indexOf("rad") ? $e : 1), c = l - n, h = n + c + "deg", u, p;
2338
+ return o && (u = r.split("_")[1], u === "short" && (c %= s, c !== c % (s / 2) && (c += c < 0 ? s : -s)), u === "cw" && c < 0 ? c = (c + s * an) % s - ~~(c / s) * s : u === "ccw" && c > 0 && (c = (c - s * an) % s - ~~(c / s) * s)), e._pt = p = new ie(e._pt, t, i, n, c, Ks), p.e = h, p.u = "deg", e._props.push(i), p;
2339
2339
  }, pn = function(e, t) {
2340
2340
  for (var i in t)
2341
2341
  e[i] = t[i];
2342
2342
  return e;
2343
- }, ua = function(e, t, i) {
2343
+ }, da = function(e, t, i) {
2344
2344
  var n = pn({}, i._gsap), r = "perspective,force3D,transformOrigin,svgOrigin", s = i.style, o, l, c, h, u, p, m, f;
2345
- n.svg ? (c = i.getAttribute("transform"), i.setAttribute("transform", ""), s[B] = t, o = Tt(i, 1), Ke(i, B), i.setAttribute("transform", c)) : (c = getComputedStyle(i)[B], s[B] = t, o = Tt(i, 1), s[B] = c);
2345
+ n.svg ? (c = i.getAttribute("transform"), i.setAttribute("transform", ""), s[$] = t, o = Tt(i, 1), Ke(i, $), i.setAttribute("transform", c)) : (c = getComputedStyle(i)[$], s[$] = t, o = Tt(i, 1), s[$] = c);
2346
2346
  for (l in Ae)
2347
2347
  c = n[l], h = o[l], c !== h && r.indexOf(l) < 0 && (m = X(c), f = X(h), u = m !== f ? Le(i, l, c, f) : parseFloat(c), p = parseFloat(h), e._pt = new ie(e._pt, o, l, u, p - u, yi), e._pt.u = f || 0, e._props.push(l));
2348
2348
  pn(o, n);
@@ -2355,7 +2355,7 @@ te("padding,margin,Width,Radius", function(a, e) {
2355
2355
  var p, m;
2356
2356
  if (arguments.length < 4)
2357
2357
  return p = s.map(function(f) {
2358
- return Pe(o, f, c);
2358
+ return Ce(o, f, c);
2359
2359
  }), m = p.join(" "), m.split(p[0]).length === 5 ? p[0] : m;
2360
2360
  p = (h + "").split(" "), m = {}, s.forEach(function(f, d) {
2361
2361
  return m[f] = p[d] = p[d] || p[(d - 1) / 2 | 0];
@@ -2369,65 +2369,65 @@ var Ar = {
2369
2369
  return e.style && e.nodeType;
2370
2370
  },
2371
2371
  init: function(e, t, i, n, r) {
2372
- var s = this._props, o = e.style, l = i.vars.startAt, c, h, u, p, m, f, d, g, _, y, x, b, E, P, w, C;
2373
- zi || bi(), this.styles = this.styles || xr(e), C = this.styles.props, this.tween = i;
2372
+ var s = this._props, o = e.style, l = i.vars.startAt, c, h, u, p, m, f, d, g, _, y, x, E, b, C, v, P;
2373
+ zi || bi(), this.styles = this.styles || xr(e), P = this.styles.props, this.tween = i;
2374
2374
  for (d in t)
2375
2375
  if (d !== "autoRound" && (h = t[d], !(ae[d] && lr(d, t, i, n, e, r)))) {
2376
2376
  if (m = typeof h, f = Ht[d], m === "function" && (h = h.call(i, n, e, r), m = typeof h), m === "string" && ~h.indexOf("random(") && (h = wt(h)), f)
2377
- f(this, e, d, h, i) && (w = 1);
2377
+ f(this, e, d, h, i) && (v = 1);
2378
2378
  else if (d.substr(0, 2) === "--")
2379
- c = (getComputedStyle(e).getPropertyValue(d) + "").trim(), h += "", Ie.lastIndex = 0, Ie.test(c) || (g = X(c), _ = X(h)), _ ? g !== _ && (c = Le(e, d, c, _) + _) : g && (h += g), this.add(o, "setProperty", c, h, n, r, 0, 0, d), s.push(d), C.push(d, 0, o[d]);
2379
+ c = (getComputedStyle(e).getPropertyValue(d) + "").trim(), h += "", Oe.lastIndex = 0, Oe.test(c) || (g = X(c), _ = X(h)), _ ? g !== _ && (c = Le(e, d, c, _) + _) : g && (h += g), this.add(o, "setProperty", c, h, n, r, 0, 0, d), s.push(d), P.push(d, 0, o[d]);
2380
2380
  else if (m !== "undefined") {
2381
- if (l && d in l ? (c = typeof l[d] == "function" ? l[d].call(i, n, e, r) : l[d], Z(c) && ~c.indexOf("random(") && (c = wt(c)), X(c + "") || c === "auto" || (c += he.units[d] || X(Pe(e, d)) || ""), (c + "").charAt(1) === "=" && (c = Pe(e, d))) : c = Pe(e, d), p = parseFloat(c), y = m === "string" && h.charAt(1) === "=" && h.substr(0, 2), y && (h = h.substr(2)), u = parseFloat(h), d in xe && (d === "autoAlpha" && (p === 1 && Pe(e, "visibility") === "hidden" && u && (p = 0), C.push("visibility", 0, o.visibility), De(this, o, "visibility", p ? "inherit" : "hidden", u ? "inherit" : "hidden", !u)), d !== "scale" && d !== "transform" && (d = xe[d], ~d.indexOf(",") && (d = d.split(",")[0]))), x = d in Ae, x) {
2382
- if (this.styles.save(d), m === "string" && h.substring(0, 6) === "var(--" && (h = ge(e, h.substring(4, h.indexOf(")"))), u = parseFloat(h)), b || (E = e._gsap, E.renderTransform && !t.parseTransform || Tt(e, t.parseTransform), P = t.smoothOrigin !== !1 && E.smooth, b = this._pt = new ie(this._pt, o, B, 0, 1, E.renderTransform, E, 0, -1), b.dep = 1), d === "scale")
2383
- this._pt = new ie(this._pt, E, "scaleY", E.scaleY, (y ? it(E.scaleY, y + u) : u) - E.scaleY || 0, yi), this._pt.u = 0, s.push("scaleY", d), d += "X";
2381
+ if (l && d in l ? (c = typeof l[d] == "function" ? l[d].call(i, n, e, r) : l[d], Z(c) && ~c.indexOf("random(") && (c = wt(c)), X(c + "") || c === "auto" || (c += he.units[d] || X(Ce(e, d)) || ""), (c + "").charAt(1) === "=" && (c = Ce(e, d))) : c = Ce(e, d), p = parseFloat(c), y = m === "string" && h.charAt(1) === "=" && h.substr(0, 2), y && (h = h.substr(2)), u = parseFloat(h), d in xe && (d === "autoAlpha" && (p === 1 && Ce(e, "visibility") === "hidden" && u && (p = 0), P.push("visibility", 0, o.visibility), De(this, o, "visibility", p ? "inherit" : "hidden", u ? "inherit" : "hidden", !u)), d !== "scale" && d !== "transform" && (d = xe[d], ~d.indexOf(",") && (d = d.split(",")[0]))), x = d in Ae, x) {
2382
+ if (this.styles.save(d), m === "string" && h.substring(0, 6) === "var(--" && (h = ge(e, h.substring(4, h.indexOf(")"))), u = parseFloat(h)), E || (b = e._gsap, b.renderTransform && !t.parseTransform || Tt(e, t.parseTransform), C = t.smoothOrigin !== !1 && b.smooth, E = this._pt = new ie(this._pt, o, $, 0, 1, b.renderTransform, b, 0, -1), E.dep = 1), d === "scale")
2383
+ this._pt = new ie(this._pt, b, "scaleY", b.scaleY, (y ? it(b.scaleY, y + u) : u) - b.scaleY || 0, yi), this._pt.u = 0, s.push("scaleY", d), d += "X";
2384
2384
  else if (d === "transformOrigin") {
2385
- C.push(ne, 0, o[ne]), h = aa(h), E.svg ? Ei(e, h, 0, P, 0, this) : (_ = parseFloat(h.split(" ")[2]) || 0, _ !== E.zOrigin && De(this, E, "zOrigin", E.zOrigin, _), De(this, o, d, jt(c), jt(h)));
2385
+ P.push(ne, 0, o[ne]), h = oa(h), b.svg ? Ei(e, h, 0, C, 0, this) : (_ = parseFloat(h.split(" ")[2]) || 0, _ !== b.zOrigin && De(this, b, "zOrigin", b.zOrigin, _), De(this, o, d, jt(c), jt(h)));
2386
2386
  continue;
2387
2387
  } else if (d === "svgOrigin") {
2388
- Ei(e, h, 1, P, 0, this);
2388
+ Ei(e, h, 1, C, 0, this);
2389
2389
  continue;
2390
2390
  } else if (d in wr) {
2391
- ca(this, E, d, p, y ? it(p, y + h) : h);
2391
+ ua(this, b, d, p, y ? it(p, y + h) : h);
2392
2392
  continue;
2393
2393
  } else if (d === "smoothOrigin") {
2394
- De(this, E, "smooth", E.smooth, h);
2394
+ De(this, b, "smooth", b.smooth, h);
2395
2395
  continue;
2396
2396
  } else if (d === "force3D") {
2397
- E[d] = h;
2397
+ b[d] = h;
2398
2398
  continue;
2399
2399
  } else if (d === "transform") {
2400
- ua(this, h, e);
2400
+ da(this, h, e);
2401
2401
  continue;
2402
2402
  }
2403
2403
  } else d in o || (d = ct(d) || d);
2404
- if (x || (u || u === 0) && (p || p === 0) && !Ys.test(h) && d in o)
2405
- g = (c + "").substr((p + "").length), u || (u = 0), _ = X(h) || (d in he.units ? he.units[d] : g), g !== _ && (p = Le(e, d, c, _)), this._pt = new ie(this._pt, x ? E : o, d, p, (y ? it(p, y + u) : u) - p, !x && (_ === "px" || d === "zIndex") && t.autoRound !== !1 ? Xs : yi), this._pt.u = _ || 0, g !== _ && _ !== "%" && (this._pt.b = c, this._pt.r = Ks);
2404
+ if (x || (u || u === 0) && (p || p === 0) && !Zs.test(h) && d in o)
2405
+ g = (c + "").substr((p + "").length), u || (u = 0), _ = X(h) || (d in he.units ? he.units[d] : g), g !== _ && (p = Le(e, d, c, _)), this._pt = new ie(this._pt, x ? b : o, d, p, (y ? it(p, y + u) : u) - p, !x && (_ === "px" || d === "zIndex") && t.autoRound !== !1 ? Ws : yi), this._pt.u = _ || 0, g !== _ && _ !== "%" && (this._pt.b = c, this._pt.r = Xs);
2406
2406
  else if (d in o)
2407
- sa.call(this, e, d, c, y ? y + h : h);
2407
+ aa.call(this, e, d, c, y ? y + h : h);
2408
2408
  else if (d in e)
2409
2409
  this.add(e, d, c || e[d], y ? y + h : h, n, r);
2410
2410
  else if (d !== "parseTransform") {
2411
2411
  Di(d, h);
2412
2412
  continue;
2413
2413
  }
2414
- x || (d in o ? C.push(d, 0, o[d]) : typeof e[d] == "function" ? C.push(d, 2, e[d]()) : C.push(d, 1, c || e[d])), s.push(d);
2414
+ x || (d in o ? P.push(d, 0, o[d]) : typeof e[d] == "function" ? P.push(d, 2, e[d]()) : P.push(d, 1, c || e[d])), s.push(d);
2415
2415
  }
2416
2416
  }
2417
- w && fr(this);
2417
+ v && fr(this);
2418
2418
  },
2419
2419
  render: function(e, t) {
2420
- if (t.tween._time || !Bi())
2420
+ if (t.tween._time || !$i())
2421
2421
  for (var i = t._pt; i; )
2422
2422
  i.r(e, i.d), i = i._next;
2423
2423
  else
2424
2424
  t.styles.revert();
2425
2425
  },
2426
- get: Pe,
2426
+ get: Ce,
2427
2427
  aliases: xe,
2428
2428
  getSetter: function(e, t, i) {
2429
2429
  var n = xe[t];
2430
- return n && n.indexOf(",") < 0 && (t = n), t in Ae && t !== ne && (e._gsap.x || Pe(e, "x")) ? i && sn === i ? t === "scale" ? Js : Qs : (sn = i || {}) && (t === "scale" ? ea : ta) : e.style && !Ai(e.style[t]) ? Ws : ~t.indexOf("-") ? qs : Fi(e, t);
2430
+ return n && n.indexOf(",") < 0 && (t = n), t in Ae && t !== ne && (e._gsap.x || Ce(e, "x")) ? i && sn === i ? t === "scale" ? ea : Js : (sn = i || {}) && (t === "scale" ? ta : ia) : e.style && !Ai(e.style[t]) ? qs : ~t.indexOf("-") ? Qs : Fi(e, t);
2431
2431
  },
2432
2432
  core: {
2433
2433
  _removeProperty: Ke,
@@ -2679,7 +2679,7 @@ class be {
2679
2679
  this.listen(!1), this.parent.children.splice(this.parent.children.indexOf(this), 1), this.parent.controllers.splice(this.parent.controllers.indexOf(this), 1), this.parent.$children.removeChild(this.domElement);
2680
2680
  }
2681
2681
  }
2682
- class da extends be {
2682
+ class pa extends be {
2683
2683
  constructor(e, t, i) {
2684
2684
  super(e, t, i, "lil-boolean", "label"), this.$input = document.createElement("input"), this.$input.setAttribute("type", "checkbox"), this.$input.setAttribute("aria-labelledby", this.$name.id), this.$widget.appendChild(this.$input), this.$input.addEventListener("change", () => {
2685
2685
  this.setValue(this.$input.checked), this._callOnFinishChange();
@@ -2693,7 +2693,7 @@ function vi(a) {
2693
2693
  let e, t;
2694
2694
  return (e = a.match(/(#|0x)?([a-f0-9]{6})/i)) ? t = e[2] : (e = a.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/)) ? t = parseInt(e[1]).toString(16).padStart(2, 0) + parseInt(e[2]).toString(16).padStart(2, 0) + parseInt(e[3]).toString(16).padStart(2, 0) : (e = a.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i)) && (t = e[1] + e[1] + e[2] + e[2] + e[3] + e[3]), t ? "#" + t : !1;
2695
2695
  }
2696
- const pa = {
2696
+ const fa = {
2697
2697
  isPrimitive: !0,
2698
2698
  match: (a) => typeof a == "string",
2699
2699
  fromHexString: vi,
@@ -2703,7 +2703,7 @@ const pa = {
2703
2703
  match: (a) => typeof a == "number",
2704
2704
  fromHexString: (a) => parseInt(a.substring(1), 16),
2705
2705
  toHexString: (a) => "#" + a.toString(16).padStart(6, 0)
2706
- }, fa = {
2706
+ }, ma = {
2707
2707
  isPrimitive: !1,
2708
2708
  match: (a) => Array.isArray(a) || ArrayBuffer.isView(a),
2709
2709
  fromHexString(a, e, t = 1) {
@@ -2715,7 +2715,7 @@ const pa = {
2715
2715
  const n = a * i << 16 ^ e * i << 8 ^ t * i << 0;
2716
2716
  return St.toHexString(n);
2717
2717
  }
2718
- }, ma = {
2718
+ }, ga = {
2719
2719
  isPrimitive: !1,
2720
2720
  match: (a) => Object(a) === a,
2721
2721
  fromHexString(a, e, t = 1) {
@@ -2727,13 +2727,13 @@ const pa = {
2727
2727
  const n = a * i << 16 ^ e * i << 8 ^ t * i << 0;
2728
2728
  return St.toHexString(n);
2729
2729
  }
2730
- }, ga = [pa, St, fa, ma];
2731
- function _a(a) {
2732
- return ga.find((e) => e.match(a));
2730
+ }, _a = [fa, St, ma, ga];
2731
+ function ya(a) {
2732
+ return _a.find((e) => e.match(a));
2733
2733
  }
2734
- class ya extends be {
2734
+ class xa extends be {
2735
2735
  constructor(e, t, i, n) {
2736
- super(e, t, i, "lil-color"), this.$input = document.createElement("input"), this.$input.setAttribute("type", "color"), this.$input.setAttribute("tabindex", -1), this.$input.setAttribute("aria-labelledby", this.$name.id), this.$text = document.createElement("input"), this.$text.setAttribute("type", "text"), this.$text.setAttribute("spellcheck", "false"), this.$text.setAttribute("aria-labelledby", this.$name.id), this.$display = document.createElement("div"), this.$display.classList.add("lil-display"), this.$display.appendChild(this.$input), this.$widget.appendChild(this.$display), this.$widget.appendChild(this.$text), this._format = _a(this.initialValue), this._rgbScale = n, this._initialValueHexString = this.save(), this._textFocused = !1, this.$input.addEventListener("input", () => {
2736
+ super(e, t, i, "lil-color"), this.$input = document.createElement("input"), this.$input.setAttribute("type", "color"), this.$input.setAttribute("tabindex", -1), this.$input.setAttribute("aria-labelledby", this.$name.id), this.$text = document.createElement("input"), this.$text.setAttribute("type", "text"), this.$text.setAttribute("spellcheck", "false"), this.$text.setAttribute("aria-labelledby", this.$name.id), this.$display = document.createElement("div"), this.$display.classList.add("lil-display"), this.$display.appendChild(this.$input), this.$widget.appendChild(this.$display), this.$widget.appendChild(this.$text), this._format = ya(this.initialValue), this._rgbScale = n, this._initialValueHexString = this.save(), this._textFocused = !1, this.$input.addEventListener("input", () => {
2737
2737
  this._setValueFromHexString(this.$input.value);
2738
2738
  }), this.$input.addEventListener("blur", () => {
2739
2739
  this._callOnFinishChange();
@@ -2774,7 +2774,7 @@ class ri extends be {
2774
2774
  }, { passive: !0 }), this.$disable = this.$button;
2775
2775
  }
2776
2776
  }
2777
- class xa extends be {
2777
+ class ba extends be {
2778
2778
  constructor(e, t, i, n, r, s) {
2779
2779
  super(e, t, i, "lil-number"), this._initInput(), this.min(n), this.max(r);
2780
2780
  const o = s !== void 0;
@@ -2818,8 +2818,8 @@ class xa extends be {
2818
2818
  o = y.clientX, l = c = y.clientY, s = !0, h = this.getValue(), u = 0, window.addEventListener("mousemove", f), window.addEventListener("mouseup", d);
2819
2819
  }, f = (y) => {
2820
2820
  if (s) {
2821
- const x = y.clientX - o, b = y.clientY - l;
2822
- Math.abs(b) > p ? (y.preventDefault(), this.$input.blur(), s = !1, this._setDraggingStyle(!0, "vertical")) : Math.abs(x) > p && d();
2821
+ const x = y.clientX - o, E = y.clientY - l;
2822
+ Math.abs(E) > p ? (y.preventDefault(), this.$input.blur(), s = !1, this._setDraggingStyle(!0, "vertical")) : Math.abs(x) > p && d();
2823
2823
  }
2824
2824
  if (!s) {
2825
2825
  const x = y.clientY - c;
@@ -2837,7 +2837,7 @@ class xa extends be {
2837
2837
  }
2838
2838
  _initSlider() {
2839
2839
  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");
2840
- const e = (_, y, x, b, E) => (_ - y) / (x - y) * (E - b) + b, t = (_) => {
2840
+ const e = (_, y, x, E, b) => (_ - y) / (x - y) * (b - E) + E, t = (_) => {
2841
2841
  const y = this.$slider.getBoundingClientRect();
2842
2842
  let x = e(_, y.left, y.right, this._min, this._max);
2843
2843
  this._snapClampSetValue(x);
@@ -2909,7 +2909,7 @@ class xa extends be {
2909
2909
  return this._max !== void 0;
2910
2910
  }
2911
2911
  }
2912
- class ba extends be {
2912
+ class Ea extends be {
2913
2913
  constructor(e, t, i, n) {
2914
2914
  super(e, t, i, "lil-option"), this.$select = document.createElement("select"), this.$select.setAttribute("aria-labelledby", this.$name.id), this.$display = document.createElement("div"), this.$display.classList.add("lil-display"), this.$select.addEventListener("change", () => {
2915
2915
  this.setValue(this._values[this.$select.selectedIndex]), this._callOnFinishChange();
@@ -2930,7 +2930,7 @@ class ba extends be {
2930
2930
  return this.$select.selectedIndex = t, this.$display.textContent = t === -1 ? e : this._names[t], this;
2931
2931
  }
2932
2932
  }
2933
- class Ea extends be {
2933
+ class va extends be {
2934
2934
  constructor(e, t, i) {
2935
2935
  super(e, t, i, "lil-string"), this.$input = document.createElement("input"), this.$input.setAttribute("type", "text"), this.$input.setAttribute("spellcheck", "false"), this.$input.setAttribute("aria-labelledby", this.$name.id), this.$input.addEventListener("input", () => {
2936
2936
  this.setValue(this.$input.value);
@@ -2944,7 +2944,7 @@ class Ea extends be {
2944
2944
  return this.$input.value = this.getValue(), this;
2945
2945
  }
2946
2946
  }
2947
- var va = `.lil-gui {
2947
+ var wa = `.lil-gui {
2948
2948
  font-family: var(--font-family);
2949
2949
  font-size: var(--font-size);
2950
2950
  line-height: 1;
@@ -3366,7 +3366,7 @@ var va = `.lil-gui {
3366
3366
  font-family: "lil-gui";
3367
3367
  src: url("data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAALkAAsAAAAABtQAAAKVAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDMgqBBIEbATYCJAMUCwwABCAFhAoHgQQbHAbIDiUFEYVARAAAYQTVWNmz9MxhEgodq49wYRUFKE8GWNiUBxI2LBRaVnc51U83Gmhs0Q7JXWMiz5eteLwrKwuxHO8VFxUX9UpZBs6pa5ABRwHA+t3UxUnH20EvVknRerzQgX6xC/GH6ZUvTcAjAv122dF28OTqCXrPuyaDER30YBA1xnkVutDDo4oCi71Ca7rrV9xS8dZHbPHefsuwIyCpmT7j+MnjAH5X3984UZoFFuJ0yiZ4XEJFxjagEBeqs+e1iyK8Xf/nOuwF+vVK0ur765+vf7txotUi0m3N0m/84RGSrBCNrh8Ee5GjODjF4gnWP+dJrH/Lk9k4oT6d+gr6g/wssA2j64JJGP6cmx554vUZnpZfn6ZfX2bMwPPrlANsB86/DiHjhl0OP+c87+gaJo/gY084s3HoYL/ZkWHTRfBXvvoHnnkHvngKun4KBE/ede7tvq3/vQOxDXB1/fdNz6XbPdcr0Vhpojj9dG+owuSKFsslCi1tgEjirjXdwMiov2EioadxmqTHUCIwo8NgQaeIasAi0fTYSPTbSmwbMOFduyh9wvBrESGY0MtgRjtgQR8Q1bRPohn2UoCRZf9wyYANMXFeJTysqAe0I4mrherOekFdKMrYvJjLvOIUM9SuwYB5DVZUwwVjJJOaUnZCmcEkIZZrKqNvRGRMvmFZsmhP4VMKCSXBhSqUBxgMS7h0cZvEd71AWkEhGWaeMFcNnpqyJkyXgYL7PQ1MoSq0wDAkRtJIijkZSmqYTiSImfLiSWXIZwhRh3Rug2X0kk1Dgj+Iu43u5p98ghopcpSo0Uyc8SnjlYX59WUeaMoDqmVD2TOWD9a4pCRAzf2ECgwGcrHjPOWY9bNxq/OL3I/QjwEAAAA=") format("woff2");
3368
3368
  }`;
3369
- function wa(a) {
3369
+ function Ca(a) {
3370
3370
  const e = document.createElement("style");
3371
3371
  e.innerHTML = a;
3372
3372
  const t = document.querySelector("head link[rel=stylesheet], head style");
@@ -3422,7 +3422,7 @@ class Vi {
3422
3422
  this.parent.children.push(this), this.parent.folders.push(this), this.parent.$children.appendChild(this.domElement);
3423
3423
  return;
3424
3424
  }
3425
- this.domElement.classList.add("lil-root"), l && this.domElement.classList.add("lil-allow-touch-styles"), !fn && o && (wa(va), fn = !0), i ? i.appendChild(this.domElement) : t && (this.domElement.classList.add("lil-auto-place", "autoPlace"), document.body.appendChild(this.domElement)), n && this.domElement.style.setProperty("--width", n + "px"), this._closeFolders = s;
3425
+ this.domElement.classList.add("lil-root"), l && this.domElement.classList.add("lil-allow-touch-styles"), !fn && o && (Ca(wa), fn = !0), i ? i.appendChild(this.domElement) : t && (this.domElement.classList.add("lil-auto-place", "autoPlace"), document.body.appendChild(this.domElement)), n && this.domElement.style.setProperty("--width", n + "px"), this._closeFolders = s;
3426
3426
  }
3427
3427
  /**
3428
3428
  * Adds a controller to the GUI, inferring controller type using the `typeof` operator.
@@ -3441,15 +3441,15 @@ class Vi {
3441
3441
  */
3442
3442
  add(e, t, i, n, r) {
3443
3443
  if (Object(i) === i)
3444
- return new ba(this, e, t, i);
3444
+ return new Ea(this, e, t, i);
3445
3445
  const s = e[t];
3446
3446
  switch (typeof s) {
3447
3447
  case "number":
3448
- return new xa(this, e, t, i, n, r);
3448
+ return new ba(this, e, t, i, n, r);
3449
3449
  case "boolean":
3450
- return new da(this, e, t);
3450
+ return new pa(this, e, t);
3451
3451
  case "string":
3452
- return new Ea(this, e, t);
3452
+ return new va(this, e, t);
3453
3453
  case "function":
3454
3454
  return new ri(this, e, t);
3455
3455
  }
@@ -3478,7 +3478,7 @@ class Vi {
3478
3478
  * @returns {Controller}
3479
3479
  */
3480
3480
  addColor(e, t, i = 1) {
3481
- return new ya(this, e, t, i);
3481
+ return new xa(this, e, t, i);
3482
3482
  }
3483
3483
  /**
3484
3484
  * Adds a folder to the GUI, which is just another GUI. This method returns
@@ -3708,7 +3708,7 @@ class Vi {
3708
3708
  function Pa(a) {
3709
3709
  return a;
3710
3710
  }
3711
- function Ca(a) {
3711
+ function Aa(a) {
3712
3712
  if (a == null) return Pa;
3713
3713
  var e, t, i = a.scale[0], n = a.scale[1], r = a.translate[0], s = a.translate[1];
3714
3714
  return function(o, l) {
@@ -3718,25 +3718,25 @@ function Ca(a) {
3718
3718
  return u;
3719
3719
  };
3720
3720
  }
3721
- function Aa(a, e) {
3721
+ function Ta(a, e) {
3722
3722
  for (var t, i = a.length, n = i - e; n < --i; ) t = a[n], a[n++] = a[i], a[i] = t;
3723
3723
  }
3724
- function Ta(a, e) {
3724
+ function Sa(a, e) {
3725
3725
  return typeof e == "string" && (e = a.objects[e]), e.type === "GeometryCollection" ? { type: "FeatureCollection", features: e.geometries.map(function(t) {
3726
3726
  return mn(a, t);
3727
3727
  }) } : mn(a, e);
3728
3728
  }
3729
3729
  function mn(a, e) {
3730
- var t = e.id, i = e.bbox, n = e.properties == null ? {} : e.properties, r = Sa(a, e);
3730
+ var t = e.id, i = e.bbox, n = e.properties == null ? {} : e.properties, r = Da(a, e);
3731
3731
  return t == null && i == null ? { type: "Feature", properties: n, geometry: r } : i == null ? { type: "Feature", id: t, properties: n, geometry: r } : { type: "Feature", id: t, bbox: i, properties: n, geometry: r };
3732
3732
  }
3733
- function Sa(a, e) {
3734
- var t = Ca(a.transform), i = a.arcs;
3733
+ function Da(a, e) {
3734
+ var t = Aa(a.transform), i = a.arcs;
3735
3735
  function n(h, u) {
3736
3736
  u.length && u.pop();
3737
3737
  for (var p = i[h < 0 ? ~h : h], m = 0, f = p.length; m < f; ++m)
3738
3738
  u.push(t(p[m], m));
3739
- h < 0 && Aa(u, f);
3739
+ h < 0 && Ta(u, f);
3740
3740
  }
3741
3741
  function r(h) {
3742
3742
  return t(h);
@@ -3881,7 +3881,7 @@ const Tr = [
3881
3881
  { id: "858", code: "UY", name: "Uruguay", population: 3.5, gdpPerCapita: 25041, co2Emissions: 2, lifeExpectancy: 78.4, humanDevIndex: 0.83, internetUsers: 87, renewableEnergy: 55, urbanPopulation: 95.6, healthExpenditure: 9.3, educationExpenditure: 5, forestArea: 10.5, accessElectricity: 100 },
3882
3882
  { id: "188", code: "CR", name: "Costa Rica", population: 5, gdpPerCapita: 23101, co2Emissions: 1.5, lifeExpectancy: 80.8, humanDevIndex: 0.809, internetUsers: 81, renewableEnergy: 73, urbanPopulation: 81.4, healthExpenditure: 7.3, educationExpenditure: 6.7, forestArea: 59, accessElectricity: 100 },
3883
3883
  { id: "591", code: "PA", name: "Panama", population: 4.4, gdpPerCapita: 35317, co2Emissions: 2.5, lifeExpectancy: 79.2, humanDevIndex: 0.805, internetUsers: 68, renewableEnergy: 35, urbanPopulation: 68.4, healthExpenditure: 7.3, educationExpenditure: 3.2, forestArea: 62.1, accessElectricity: 95 }
3884
- ], Da = [
3884
+ ], Ma = [
3885
3885
  {
3886
3886
  id: "humanDevIndex",
3887
3887
  name: "Human Development Index",
@@ -3983,11 +3983,11 @@ const Tr = [
3983
3983
  format: (a) => `${a.toFixed(0)}%`
3984
3984
  }
3985
3985
  ];
3986
- function Ma(a, e) {
3986
+ function Ra(a, e) {
3987
3987
  const [t, i] = a.domain;
3988
3988
  return Math.max(0, Math.min(1, (e - t) / (i - t)));
3989
3989
  }
3990
- const Ra = {
3990
+ const Oa = {
3991
3991
  // North America
3992
3992
  US: "840",
3993
3993
  USA: "840",
@@ -4188,7 +4188,7 @@ const Ra = {
4188
4188
  };
4189
4189
  function gn(a) {
4190
4190
  const e = a.toUpperCase().trim();
4191
- return /^\d{1,3}$/.test(a) ? a.padStart(3, "0") : Ra[e] || a;
4191
+ return /^\d{1,3}$/.test(a) ? a.padStart(3, "0") : Oa[e] || a;
4192
4192
  }
4193
4193
  function Ia(a) {
4194
4194
  const e = {};
@@ -4198,15 +4198,15 @@ function Ia(a) {
4198
4198
  e[gn(t)] = i;
4199
4199
  }), e;
4200
4200
  }
4201
- const It = 2048, Ot = 1024;
4202
- class Oa {
4201
+ const Ot = 2048, It = 1024;
4202
+ class La {
4203
4203
  canvas;
4204
4204
  ctx;
4205
4205
  countries = [];
4206
4206
  loaded = !1;
4207
4207
  statsMap;
4208
4208
  constructor() {
4209
- this.canvas = document.createElement("canvas"), this.canvas.width = It, this.canvas.height = Ot, this.ctx = this.canvas.getContext("2d"), this.statsMap = /* @__PURE__ */ new Map(), Tr.forEach((e) => {
4209
+ this.canvas = document.createElement("canvas"), this.canvas.width = Ot, this.canvas.height = It, this.ctx = this.canvas.getContext("2d"), this.statsMap = /* @__PURE__ */ new Map(), Tr.forEach((e) => {
4210
4210
  this.statsMap.set(e.id, e);
4211
4211
  }), this.loadCountries();
4212
4212
  }
@@ -4214,7 +4214,7 @@ class Oa {
4214
4214
  try {
4215
4215
  const t = await (await fetch(
4216
4216
  "https://cdn.jsdelivr.net/npm/world-atlas@2/countries-110m.json"
4217
- )).json(), i = Ta(t, t.objects.countries);
4217
+ )).json(), i = Sa(t, t.objects.countries);
4218
4218
  this.countries = i.features, this.loaded = !0, console.log(`Loaded ${this.countries.length} country boundaries`);
4219
4219
  } catch (e) {
4220
4220
  console.error("Failed to load country boundaries:", e);
@@ -4231,10 +4231,10 @@ class Oa {
4231
4231
  * Render a choropleth texture for the given statistic
4232
4232
  */
4233
4233
  renderTexture(e) {
4234
- return this.ctx.fillStyle = "#1a3a5c", this.ctx.fillRect(0, 0, It, Ot), this.loaded ? (this.countries.forEach((t) => {
4234
+ return this.ctx.fillStyle = "#1a3a5c", this.ctx.fillRect(0, 0, Ot, It), this.loaded ? (this.countries.forEach((t) => {
4235
4235
  const i = this.statsMap.get(t.id);
4236
4236
  if (i) {
4237
- const n = e.accessor(i), r = Ma(e, n), s = this.interpolateColor(e.colorScale, r);
4237
+ const n = e.accessor(i), r = Ra(e, n), s = this.interpolateColor(e.colorScale, r);
4238
4238
  this.ctx.fillStyle = s;
4239
4239
  } else
4240
4240
  this.ctx.fillStyle = "#2a2a2a";
@@ -4278,7 +4278,7 @@ class Oa {
4278
4278
  * Project lat/lon to canvas coordinates (equirectangular projection)
4279
4279
  */
4280
4280
  projectPoint(e, t) {
4281
- const i = (e + 180) / 360 * It, n = (90 - t) / 180 * Ot;
4281
+ const i = (e + 180) / 360 * Ot, n = (90 - t) / 180 * It;
4282
4282
  return [i, n];
4283
4283
  }
4284
4284
  interpolateColor(e, t) {
@@ -4301,7 +4301,7 @@ class Oa {
4301
4301
  * Render a choropleth texture with custom values
4302
4302
  */
4303
4303
  renderCustomTexture(e, t, i) {
4304
- if (this.ctx.fillStyle = "#1a3a5c", this.ctx.fillRect(0, 0, It, Ot), !this.loaded)
4304
+ if (this.ctx.fillStyle = "#1a3a5c", this.ctx.fillRect(0, 0, Ot, It), !this.loaded)
4305
4305
  return this.canvas;
4306
4306
  const n = Ia(e);
4307
4307
  return this.countries.forEach((r) => {
@@ -4332,19 +4332,28 @@ class Oa {
4332
4332
  return this.canvas.toDataURL("image/png");
4333
4333
  }
4334
4334
  }
4335
- class La {
4335
+ function Sr(a) {
4336
+ return a === "%" ? (e) => `${e.toFixed(1)}%` : a === "$" ? (e) => `$${e.toLocaleString()}` : a === "years" ? (e) => `${e.toFixed(1)} yrs` : a.includes("per capita") || a.includes("per 100") || a.includes("per 1000") ? (e) => `${e.toFixed(1)}` : a === "% GDP" || a === "% of GDP" ? (e) => `${e.toFixed(1)}%` : a === "" || a === "index" ? (e) => e.toFixed(3) : (e) => {
4337
+ const t = Number.isInteger(e) ? e.toLocaleString() : e.toFixed(1);
4338
+ return a ? `${t} ${a}` : t;
4339
+ };
4340
+ }
4341
+ function go(a, e, t) {
4342
+ return (t ?? Sr(e))(a);
4343
+ }
4344
+ class ka {
4336
4345
  container;
4337
4346
  visible = !1;
4338
4347
  constructor() {
4339
- this.container = document.createElement("div"), this.container.id = "legend", this.container.innerHTML = `
4348
+ this.container = document.createElement("div"), this.container.id = "legend", this.container.setAttribute("data-testid", "globe-legend"), this.container.innerHTML = `
4340
4349
  <div class="legend-hint">Press G to toggle globe/flat</div>
4341
- <div class="legend-title"></div>
4350
+ <div class="legend-title" data-testid="legend-title"></div>
4342
4351
  <div class="legend-gradient"></div>
4343
4352
  <div class="legend-labels">
4344
- <span class="legend-min"></span>
4345
- <span class="legend-max"></span>
4353
+ <span class="legend-min" data-testid="legend-min"></span>
4354
+ <span class="legend-max" data-testid="legend-max"></span>
4346
4355
  </div>
4347
- <div class="legend-description"></div>
4356
+ <div class="legend-description" data-testid="legend-description"></div>
4348
4357
  `, this.applyStyles(), document.body.appendChild(this.container);
4349
4358
  }
4350
4359
  applyStyles() {
@@ -4410,11 +4419,19 @@ class La {
4410
4419
  }
4411
4420
  `, document.head.appendChild(e);
4412
4421
  }
4422
+ /**
4423
+ * Show the legend with the given statistic definition.
4424
+ *
4425
+ * If the statistic doesn't have a format function (e.g., when loaded from JSON),
4426
+ * a default formatter is created based on the unit.
4427
+ */
4413
4428
  show(e) {
4414
4429
  const t = this.container.querySelector(".legend-title"), i = this.container.querySelector(".legend-gradient"), n = this.container.querySelector(".legend-min"), r = this.container.querySelector(".legend-max"), s = this.container.querySelector(".legend-description");
4415
4430
  t.textContent = e.name, s.textContent = e.description;
4416
4431
  const [o, l, c] = e.colorScale;
4417
- i.style.background = `linear-gradient(to right, ${o}, ${l}, ${c})`, n.textContent = e.format(e.domain[0]), r.textContent = e.format(e.domain[1]), this.container.classList.add("visible"), this.visible = !0;
4432
+ i.style.background = `linear-gradient(to right, ${o}, ${l}, ${c})`;
4433
+ const h = e.format ?? Sr(e.unit);
4434
+ n.textContent = h(e.domain[0]), r.textContent = h(e.domain[1]), this.container.classList.add("visible"), this.visible = !0;
4418
4435
  }
4419
4436
  hide() {
4420
4437
  this.container.classList.remove("visible"), this.visible = !1;
@@ -4422,12 +4439,15 @@ class La {
4422
4439
  isVisible() {
4423
4440
  return this.visible;
4424
4441
  }
4442
+ getContainer() {
4443
+ return this.container;
4444
+ }
4425
4445
  dispose() {
4426
4446
  this.container.remove();
4427
4447
  }
4428
4448
  }
4429
- var ka = { trailer: 59 };
4430
- function Sr(a = 256) {
4449
+ var Ua = { trailer: 59 };
4450
+ function Dr(a = 256) {
4431
4451
  let e = 0, t = new Uint8Array(a);
4432
4452
  return { get buffer() {
4433
4453
  return t.buffer;
@@ -4454,45 +4474,45 @@ function Sr(a = 256) {
4454
4474
  t = new Uint8Array(n), e > 0 && t.set(o.subarray(0, e), 0);
4455
4475
  }
4456
4476
  }
4457
- var si = 12, _n = 5003, Ua = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535];
4458
- function Fa(a, e, t, i, n = Sr(512), r = new Uint8Array(256), s = new Int32Array(_n), o = new Int32Array(_n)) {
4477
+ var si = 12, _n = 5003, Fa = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535];
4478
+ function Na(a, e, t, i, n = Dr(512), r = new Uint8Array(256), s = new Int32Array(_n), o = new Int32Array(_n)) {
4459
4479
  let l = s.length, c = Math.max(2, i);
4460
4480
  r.fill(0), o.fill(0), s.fill(-1);
4461
- let h = 0, u = 0, p = c + 1, m = p, f = !1, d = m, g = (1 << d) - 1, _ = 1 << p - 1, y = _ + 1, x = _ + 2, b = 0, E = t[0], P = 0;
4462
- for (let v = l; v < 65536; v *= 2) ++P;
4463
- P = 8 - P, n.writeByte(c), C(_);
4464
- let w = t.length;
4465
- for (let v = 1; v < w; v++)
4481
+ let h = 0, u = 0, p = c + 1, m = p, f = !1, d = m, g = (1 << d) - 1, _ = 1 << p - 1, y = _ + 1, x = _ + 2, E = 0, b = t[0], C = 0;
4482
+ for (let w = l; w < 65536; w *= 2) ++C;
4483
+ C = 8 - C, n.writeByte(c), P(_);
4484
+ let v = t.length;
4485
+ for (let w = 1; w < v; w++)
4466
4486
  e: {
4467
- let T = t[v], D = (T << si) + E, A = T << P ^ E;
4468
- if (s[A] === D) {
4469
- E = o[A];
4487
+ let T = t[w], M = (T << si) + b, A = T << C ^ b;
4488
+ if (s[A] === M) {
4489
+ b = o[A];
4470
4490
  break e;
4471
4491
  }
4472
4492
  let R = A === 0 ? 1 : l - A;
4473
- for (; s[A] >= 0; ) if (A -= R, A < 0 && (A += l), s[A] === D) {
4474
- E = o[A];
4493
+ for (; s[A] >= 0; ) if (A -= R, A < 0 && (A += l), s[A] === M) {
4494
+ b = o[A];
4475
4495
  break e;
4476
4496
  }
4477
- C(E), E = T, x < 1 << si ? (o[A] = x++, s[A] = D) : (s.fill(-1), x = _ + 2, f = !0, C(_));
4497
+ P(b), b = T, x < 1 << si ? (o[A] = x++, s[A] = M) : (s.fill(-1), x = _ + 2, f = !0, P(_));
4478
4498
  }
4479
- return C(E), C(y), n.writeByte(0), n.bytesView();
4480
- function C(v) {
4481
- for (h &= Ua[u], u > 0 ? h |= v << u : h = v, u += d; u >= 8; ) r[b++] = h & 255, b >= 254 && (n.writeByte(b), n.writeBytesView(r, 0, b), b = 0), h >>= 8, u -= 8;
4482
- if ((x > g || f) && (f ? (d = m, g = (1 << d) - 1, f = !1) : (++d, g = d === si ? 1 << d : (1 << d) - 1)), v == y) {
4483
- for (; u > 0; ) r[b++] = h & 255, b >= 254 && (n.writeByte(b), n.writeBytesView(r, 0, b), b = 0), h >>= 8, u -= 8;
4484
- b > 0 && (n.writeByte(b), n.writeBytesView(r, 0, b), b = 0);
4499
+ return P(b), P(y), n.writeByte(0), n.bytesView();
4500
+ function P(w) {
4501
+ for (h &= Fa[u], u > 0 ? h |= w << u : h = w, u += d; u >= 8; ) r[E++] = h & 255, E >= 254 && (n.writeByte(E), n.writeBytesView(r, 0, E), E = 0), h >>= 8, u -= 8;
4502
+ if ((x > g || f) && (f ? (d = m, g = (1 << d) - 1, f = !1) : (++d, g = d === si ? 1 << d : (1 << d) - 1)), w == y) {
4503
+ for (; u > 0; ) r[E++] = h & 255, E >= 254 && (n.writeByte(E), n.writeBytesView(r, 0, E), E = 0), h >>= 8, u -= 8;
4504
+ E > 0 && (n.writeByte(E), n.writeBytesView(r, 0, E), E = 0);
4485
4505
  }
4486
4506
  }
4487
4507
  }
4488
- var Na = Fa;
4489
- function Dr(a, e, t) {
4508
+ var za = Na;
4509
+ function Mr(a, e, t) {
4490
4510
  return a << 8 & 63488 | e << 2 & 992 | t >> 3;
4491
4511
  }
4492
- function Mr(a, e, t, i) {
4512
+ function Rr(a, e, t, i) {
4493
4513
  return a >> 4 | e & 240 | (t & 240) << 4 | (i & 240) << 8;
4494
4514
  }
4495
- function Rr(a, e, t) {
4515
+ function Or(a, e, t) {
4496
4516
  return a >> 4 << 8 | e & 240 | t >> 4;
4497
4517
  }
4498
4518
  function Lt(a, e, t) {
@@ -4518,18 +4538,18 @@ function yn(a, e, t) {
4518
4538
  function ai() {
4519
4539
  return { ac: 0, rc: 0, gc: 0, bc: 0, cnt: 0, nn: 0, fw: 0, bk: 0, tm: 0, mtm: 0, err: 0 };
4520
4540
  }
4521
- function za(a, e) {
4541
+ function $a(a, e) {
4522
4542
  let t = e === "rgb444" ? 4096 : 65536, i = new Array(t), n = a.length;
4523
4543
  if (e === "rgba4444") for (let r = 0; r < n; ++r) {
4524
- let s = a[r], o = s >> 24 & 255, l = s >> 16 & 255, c = s >> 8 & 255, h = s & 255, u = Mr(h, c, l, o), p = u in i ? i[u] : i[u] = ai();
4544
+ let s = a[r], o = s >> 24 & 255, l = s >> 16 & 255, c = s >> 8 & 255, h = s & 255, u = Rr(h, c, l, o), p = u in i ? i[u] : i[u] = ai();
4525
4545
  p.rc += h, p.gc += c, p.bc += l, p.ac += o, p.cnt++;
4526
4546
  }
4527
4547
  else if (e === "rgb444") for (let r = 0; r < n; ++r) {
4528
- let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, c = s & 255, h = Rr(c, l, o), u = h in i ? i[h] : i[h] = ai();
4548
+ let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, c = s & 255, h = Or(c, l, o), u = h in i ? i[h] : i[h] = ai();
4529
4549
  u.rc += c, u.gc += l, u.bc += o, u.cnt++;
4530
4550
  }
4531
4551
  else for (let r = 0; r < n; ++r) {
4532
- let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, c = s & 255, h = Dr(c, l, o), u = h in i ? i[h] : i[h] = ai();
4552
+ let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, c = s & 255, h = Mr(c, l, o), u = h in i ? i[h] : i[h] = ai();
4533
4553
  u.rc += c, u.gc += l, u.bc += o, u.cnt++;
4534
4554
  }
4535
4555
  return i;
@@ -4538,73 +4558,73 @@ function Ba(a, e, t = {}) {
4538
4558
  let { format: i = "rgb565", clearAlpha: n = !0, clearAlphaColor: r = 0, clearAlphaThreshold: s = 0, oneBitAlpha: o = !1 } = t;
4539
4559
  if (!a || !a.buffer) throw new Error("quantize() expected RGBA Uint8Array data");
4540
4560
  if (!(a instanceof Uint8Array) && !(a instanceof Uint8ClampedArray)) throw new Error("quantize() expected RGBA Uint8Array data");
4541
- let l = new Uint32Array(a.buffer), c = t.useSqrt !== !1, h = i === "rgba4444", u = za(l, i), p = u.length, m = p - 1, f = new Uint32Array(p + 1);
4561
+ let l = new Uint32Array(a.buffer), c = t.useSqrt !== !1, h = i === "rgba4444", u = $a(l, i), p = u.length, m = p - 1, f = new Uint32Array(p + 1);
4542
4562
  for (var d = 0, g = 0; g < p; ++g) {
4543
- let I = u[g];
4544
- if (I != null) {
4545
- var _ = 1 / I.cnt;
4546
- h && (I.ac *= _), I.rc *= _, I.gc *= _, I.bc *= _, u[d++] = I;
4563
+ let O = u[g];
4564
+ if (O != null) {
4565
+ var _ = 1 / O.cnt;
4566
+ h && (O.ac *= _), O.rc *= _, O.gc *= _, O.bc *= _, u[d++] = O;
4547
4567
  }
4548
4568
  }
4549
4569
  Nt(e) / d < 0.022 && (c = !1);
4550
4570
  for (var g = 0; g < d - 1; ++g) u[g].fw = g + 1, u[g + 1].bk = g, c && (u[g].cnt = Math.sqrt(u[g].cnt));
4551
4571
  c && (u[g].cnt = Math.sqrt(u[g].cnt));
4552
- var y, x, b;
4572
+ var y, x, E;
4553
4573
  for (g = 0; g < d; ++g) {
4554
4574
  yn(u, g);
4555
- var E = u[g].err;
4556
- for (x = ++f[0]; x > 1 && (b = x >> 1, !(u[y = f[b]].err <= E)); x = b) f[x] = y;
4575
+ var b = u[g].err;
4576
+ for (x = ++f[0]; x > 1 && (E = x >> 1, !(u[y = f[E]].err <= b)); x = E) f[x] = y;
4557
4577
  f[x] = g;
4558
4578
  }
4559
- var P = d - e;
4560
- for (g = 0; g < P; ) {
4561
- for (var w; ; ) {
4562
- var C = f[1];
4563
- if (w = u[C], w.tm >= w.mtm && u[w.nn].mtm <= w.tm) break;
4564
- w.mtm == m ? C = f[1] = f[f[0]--] : (yn(u, C), w.tm = g);
4565
- var E = u[C].err;
4566
- for (x = 1; (b = x + x) <= f[0] && (b < f[0] && u[f[b]].err > u[f[b + 1]].err && b++, !(E <= u[y = f[b]].err)); x = b) f[x] = y;
4567
- f[x] = C;
4579
+ var C = d - e;
4580
+ for (g = 0; g < C; ) {
4581
+ for (var v; ; ) {
4582
+ var P = f[1];
4583
+ if (v = u[P], v.tm >= v.mtm && u[v.nn].mtm <= v.tm) break;
4584
+ v.mtm == m ? P = f[1] = f[f[0]--] : (yn(u, P), v.tm = g);
4585
+ var b = u[P].err;
4586
+ for (x = 1; (E = x + x) <= f[0] && (E < f[0] && u[f[E]].err > u[f[E + 1]].err && E++, !(b <= u[y = f[E]].err)); x = E) f[x] = y;
4587
+ f[x] = P;
4568
4588
  }
4569
- var v = u[w.nn], T = w.cnt, D = v.cnt, _ = 1 / (T + D);
4570
- h && (w.ac = _ * (T * w.ac + D * v.ac)), w.rc = _ * (T * w.rc + D * v.rc), w.gc = _ * (T * w.gc + D * v.gc), w.bc = _ * (T * w.bc + D * v.bc), w.cnt += v.cnt, w.mtm = ++g, u[v.bk].fw = v.fw, u[v.fw].bk = v.bk, v.mtm = m;
4589
+ var w = u[v.nn], T = v.cnt, M = w.cnt, _ = 1 / (T + M);
4590
+ h && (v.ac = _ * (T * v.ac + M * w.ac)), v.rc = _ * (T * v.rc + M * w.rc), v.gc = _ * (T * v.gc + M * w.gc), v.bc = _ * (T * v.bc + M * w.bc), v.cnt += w.cnt, v.mtm = ++g, u[w.bk].fw = w.fw, u[w.fw].bk = w.bk, w.mtm = m;
4571
4591
  }
4572
4592
  let A = [];
4573
4593
  var R = 0;
4574
4594
  for (g = 0; ; ++R) {
4575
- let I = Lt(Math.round(u[g].rc), 0, 255), $ = Lt(Math.round(u[g].gc), 0, 255), F = Lt(Math.round(u[g].bc), 0, 255), U = 255;
4576
- h && (U = Lt(Math.round(u[g].ac), 0, 255), o && (U = U <= (typeof o == "number" ? o : 127) ? 0 : 255), n && U <= s && (I = $ = F = r, U = 0));
4577
- let Q = h ? [I, $, F, U] : [I, $, F];
4578
- if ($a(A, Q) || A.push(Q), (g = u[g].fw) == 0) break;
4595
+ let O = Lt(Math.round(u[g].rc), 0, 255), B = Lt(Math.round(u[g].gc), 0, 255), F = Lt(Math.round(u[g].bc), 0, 255), U = 255;
4596
+ h && (U = Lt(Math.round(u[g].ac), 0, 255), o && (U = U <= (typeof o == "number" ? o : 127) ? 0 : 255), n && U <= s && (O = B = F = r, U = 0));
4597
+ let Q = h ? [O, B, F, U] : [O, B, F];
4598
+ if (Ga(A, Q) || A.push(Q), (g = u[g].fw) == 0) break;
4579
4599
  }
4580
4600
  return A;
4581
4601
  }
4582
- function $a(a, e) {
4602
+ function Ga(a, e) {
4583
4603
  for (let t = 0; t < a.length; t++) {
4584
4604
  let i = a[t], n = i[0] === e[0] && i[1] === e[1] && i[2] === e[2], r = i.length >= 4 && e.length >= 4 ? i[3] === e[3] : !0;
4585
4605
  if (n && r) return !0;
4586
4606
  }
4587
4607
  return !1;
4588
4608
  }
4589
- function Ga(a, e, t = "rgb565") {
4609
+ function Va(a, e, t = "rgb565") {
4590
4610
  if (!a || !a.buffer) throw new Error("quantize() expected RGBA Uint8Array data");
4591
4611
  if (!(a instanceof Uint8Array) && !(a instanceof Uint8ClampedArray)) throw new Error("quantize() expected RGBA Uint8Array data");
4592
4612
  if (e.length > 256) throw new Error("applyPalette() only works with 256 colors or less");
4593
4613
  let i = new Uint32Array(a.buffer), n = i.length, r = t === "rgb444" ? 4096 : 65536, s = new Uint8Array(n), o = new Array(r);
4594
4614
  if (t === "rgba4444") for (let l = 0; l < n; l++) {
4595
- let c = i[l], h = c >> 24 & 255, u = c >> 16 & 255, p = c >> 8 & 255, m = c & 255, f = Mr(m, p, u, h), d = f in o ? o[f] : o[f] = Va(m, p, u, h, e);
4615
+ let c = i[l], h = c >> 24 & 255, u = c >> 16 & 255, p = c >> 8 & 255, m = c & 255, f = Rr(m, p, u, h), d = f in o ? o[f] : o[f] = Ha(m, p, u, h, e);
4596
4616
  s[l] = d;
4597
4617
  }
4598
4618
  else {
4599
- let l = t === "rgb444" ? Rr : Dr;
4619
+ let l = t === "rgb444" ? Or : Mr;
4600
4620
  for (let c = 0; c < n; c++) {
4601
- let h = i[c], u = h >> 16 & 255, p = h >> 8 & 255, m = h & 255, f = l(m, p, u), d = f in o ? o[f] : o[f] = Ha(m, p, u, e);
4621
+ let h = i[c], u = h >> 16 & 255, p = h >> 8 & 255, m = h & 255, f = l(m, p, u), d = f in o ? o[f] : o[f] = ja(m, p, u, e);
4602
4622
  s[c] = d;
4603
4623
  }
4604
4624
  }
4605
4625
  return s;
4606
4626
  }
4607
- function Va(a, e, t, i, n) {
4627
+ function Ha(a, e, t, i, n) {
4608
4628
  let r = 0, s = 1e100;
4609
4629
  for (let o = 0; o < n.length; o++) {
4610
4630
  let l = n[o], c = l[3], h = Ve(c - i);
@@ -4618,7 +4638,7 @@ function Va(a, e, t, i, n) {
4618
4638
  }
4619
4639
  return r;
4620
4640
  }
4621
- function Ha(a, e, t, i) {
4641
+ function ja(a, e, t, i) {
4622
4642
  let n = 0, r = 1e100;
4623
4643
  for (let s = 0; s < i.length; s++) {
4624
4644
  let o = i[s], l = o[0], c = Ve(l - a);
@@ -4633,12 +4653,12 @@ function Ha(a, e, t, i) {
4633
4653
  function Ve(a) {
4634
4654
  return a * a;
4635
4655
  }
4636
- function ja(a = {}) {
4637
- let { initialCapacity: e = 4096, auto: t = !0 } = a, i = Sr(e), n = 5003, r = new Uint8Array(256), s = new Int32Array(n), o = new Int32Array(n), l = !1;
4656
+ function Ya(a = {}) {
4657
+ let { initialCapacity: e = 4096, auto: t = !0 } = a, i = Dr(e), n = 5003, r = new Uint8Array(256), s = new Int32Array(n), o = new Int32Array(n), l = !1;
4638
4658
  return { reset() {
4639
4659
  i.reset(), l = !1;
4640
4660
  }, finish() {
4641
- i.writeByte(ka.trailer);
4661
+ i.writeByte(Ua.trailer);
4642
4662
  }, bytes() {
4643
4663
  return i.bytes();
4644
4664
  }, bytesView() {
@@ -4648,30 +4668,30 @@ function ja(a = {}) {
4648
4668
  }, get stream() {
4649
4669
  return i;
4650
4670
  }, writeHeader: c, writeFrame(h, u, p, m = {}) {
4651
- let { transparent: f = !1, transparentIndex: d = 0, delay: g = 0, palette: _ = null, repeat: y = 0, colorDepth: x = 8, dispose: b = -1 } = m, E = !1;
4652
- if (t ? l || (E = !0, c(), l = !0) : E = !!m.first, u = Math.max(0, Math.floor(u)), p = Math.max(0, Math.floor(p)), E) {
4671
+ let { transparent: f = !1, transparentIndex: d = 0, delay: g = 0, palette: _ = null, repeat: y = 0, colorDepth: x = 8, dispose: E = -1 } = m, b = !1;
4672
+ if (t ? l || (b = !0, c(), l = !0) : b = !!m.first, u = Math.max(0, Math.floor(u)), p = Math.max(0, Math.floor(p)), b) {
4653
4673
  if (!_) throw new Error("First frame must include a { palette } option");
4654
- Za(i, u, p, _, x), xn(i, _), y >= 0 && Ka(i, y);
4674
+ Ka(i, u, p, _, x), xn(i, _), y >= 0 && Xa(i, y);
4655
4675
  }
4656
- let P = Math.round(g / 10);
4657
- Ya(i, b, P, f, d);
4658
- let w = !!_ && !E;
4659
- Xa(i, u, p, w ? _ : null), w && xn(i, _), Wa(i, h, u, p, x, r, s, o);
4676
+ let C = Math.round(g / 10);
4677
+ Za(i, E, C, f, d);
4678
+ let v = !!_ && !b;
4679
+ Wa(i, u, p, v ? _ : null), v && xn(i, _), qa(i, h, u, p, x, r, s, o);
4660
4680
  } };
4661
4681
  function c() {
4662
4682
  Ir(i, "GIF89a");
4663
4683
  }
4664
4684
  }
4665
- function Ya(a, e, t, i, n) {
4685
+ function Za(a, e, t, i, n) {
4666
4686
  a.writeByte(33), a.writeByte(249), a.writeByte(4), n < 0 && (n = 0, i = !1);
4667
4687
  var r, s;
4668
4688
  i ? (r = 1, s = 2) : (r = 0, s = 0), e >= 0 && (s = e & 7), s <<= 2, a.writeByte(0 | s | 0 | r), Me(a, t), a.writeByte(n || 0), a.writeByte(0);
4669
4689
  }
4670
- function Za(a, e, t, i, n = 8) {
4690
+ function Ka(a, e, t, i, n = 8) {
4671
4691
  let r = 1, s = 0, o = Hi(i.length) - 1, l = r << 7 | n - 1 << 4 | s << 3 | o;
4672
4692
  Me(a, e), Me(a, t), a.writeBytes([l, 0, 0]);
4673
4693
  }
4674
- function Ka(a, e) {
4694
+ function Xa(a, e) {
4675
4695
  a.writeByte(33), a.writeByte(255), a.writeByte(11), Ir(a, "NETSCAPE2.0"), a.writeByte(3), a.writeByte(1), Me(a, e), a.writeByte(0);
4676
4696
  }
4677
4697
  function xn(a, e) {
@@ -4681,14 +4701,14 @@ function xn(a, e) {
4681
4701
  i < e.length && (n = e[i]), a.writeByte(n[0]), a.writeByte(n[1]), a.writeByte(n[2]);
4682
4702
  }
4683
4703
  }
4684
- function Xa(a, e, t, i) {
4704
+ function Wa(a, e, t, i) {
4685
4705
  if (a.writeByte(44), Me(a, 0), Me(a, 0), Me(a, e), Me(a, t), i) {
4686
4706
  let n = 0, r = 0, s = Hi(i.length) - 1;
4687
4707
  a.writeByte(128 | n | r | 0 | s);
4688
4708
  } else a.writeByte(0);
4689
4709
  }
4690
- function Wa(a, e, t, i, n = 8, r, s, o) {
4691
- Na(t, i, e, n, a, r, s, o);
4710
+ function qa(a, e, t, i, n = 8, r, s, o) {
4711
+ za(t, i, e, n, a, r, s, o);
4692
4712
  }
4693
4713
  function Me(a, e) {
4694
4714
  a.writeByte(e & 255), a.writeByte(e >> 8 & 255);
@@ -4699,7 +4719,7 @@ function Ir(a, e) {
4699
4719
  function Hi(a) {
4700
4720
  return Math.max(Math.ceil(Math.log2(a)), 1);
4701
4721
  }
4702
- class qa {
4722
+ class Qa {
4703
4723
  renderer;
4704
4724
  scene;
4705
4725
  camera;
@@ -4709,22 +4729,94 @@ class qa {
4709
4729
  recordedChunks = [];
4710
4730
  captureCanvas;
4711
4731
  captureCtx;
4732
+ compositeCanvas;
4733
+ compositeCtx;
4712
4734
  gifWidth = 480;
4713
4735
  gifHeight = 270;
4736
+ legendElement = null;
4737
+ countryLabels = null;
4714
4738
  constructor(e, t, i) {
4715
- this.renderer = e, this.scene = t, this.camera = i, this.captureCanvas = document.createElement("canvas"), this.captureCtx = this.captureCanvas.getContext("2d", { willReadFrequently: !0 });
4739
+ this.renderer = e, this.scene = t, this.camera = i, this.captureCanvas = document.createElement("canvas"), this.captureCtx = this.captureCanvas.getContext("2d", { willReadFrequently: !0 }), this.compositeCanvas = document.createElement("canvas"), this.compositeCtx = this.compositeCanvas.getContext("2d");
4740
+ }
4741
+ /**
4742
+ * Set the legend element to include in exports
4743
+ */
4744
+ setLegendElement(e) {
4745
+ this.legendElement = e;
4746
+ }
4747
+ /**
4748
+ * Set the country labels component to include in exports
4749
+ */
4750
+ setCountryLabels(e) {
4751
+ this.countryLabels = e;
4752
+ }
4753
+ /**
4754
+ * Draw country labels onto canvas
4755
+ */
4756
+ drawCountryLabelsOnCanvas(e, t, i) {
4757
+ if (this.countryLabels)
4758
+ try {
4759
+ this.countryLabels.getVisibleLabelsForCanvas(this.camera, t, i).forEach((r) => {
4760
+ e.save(), e.globalAlpha = r.opacity, e.font = "bold 12px Arial, sans-serif", e.textAlign = "center", e.textBaseline = "middle", e.strokeStyle = "rgba(0, 0, 0, 0.8)", e.lineWidth = 3, e.strokeText(r.text, r.x, r.y), e.fillStyle = "#ffffff", e.fillText(r.text, r.x, r.y), e.restore();
4761
+ });
4762
+ } catch (n) {
4763
+ console.warn("Failed to draw country labels:", n);
4764
+ }
4765
+ }
4766
+ /**
4767
+ * Draw all overlays (legend + country labels) onto canvas
4768
+ */
4769
+ drawOverlaysOnCanvas(e, t, i) {
4770
+ this.drawCountryLabelsOnCanvas(e, t, i), this.drawLegendOnCanvas(e, t, i);
4716
4771
  }
4717
4772
  /**
4718
- * Capture a single screenshot
4773
+ * Draw legend onto canvas at specified position
4774
+ */
4775
+ drawLegendOnCanvas(e, t, i) {
4776
+ try {
4777
+ if (!this.legendElement || !this.legendElement.classList.contains("visible")) return;
4778
+ const n = this.legendElement, r = n.querySelector(".legend-title"), s = n.querySelector(".legend-gradient"), o = n.querySelector(".legend-min"), l = n.querySelector(".legend-max"), c = n.querySelector(".legend-description");
4779
+ if (!r || !s) return;
4780
+ const h = 280, u = 100, p = 20, m = t - h - p, f = i - u - p, d = 12;
4781
+ 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, f, h, u, d) : e.rect(m, f, h, u), e.fill(), e.stroke(), e.fillStyle = "#44aaff", e.font = "bold 18px Arial, sans-serif", e.fillText(r.textContent || "", m + 16, f + 28);
4782
+ const g = m + 16, _ = f + 40, y = h - 32, x = 20, E = s.style.background || "";
4783
+ let b = [];
4784
+ const C = E.match(/rgba?\([^)]+\)/g);
4785
+ if (C && C.length >= 2)
4786
+ b = C;
4787
+ else {
4788
+ const v = E.match(/#[0-9a-fA-F]{3,8}/g);
4789
+ v && v.length >= 2 && (b = v);
4790
+ }
4791
+ if (b.length >= 2) {
4792
+ const v = e.createLinearGradient(g, 0, g + y, 0);
4793
+ v.addColorStop(0, b[0]), b.length >= 3 ? (v.addColorStop(0.5, b[1]), v.addColorStop(1, b[2])) : v.addColorStop(1, b[1]), e.fillStyle = v, e.beginPath(), e.roundRect ? e.roundRect(g, _, y, x, 4) : e.rect(g, _, y, x), e.fill();
4794
+ } else {
4795
+ const v = e.createLinearGradient(g, 0, g + y, 0);
4796
+ v.addColorStop(0, "#cc6600"), v.addColorStop(0.5, "#ffaa44"), v.addColorStop(1, "#ffeecc"), e.fillStyle = v, e.beginPath(), e.roundRect ? e.roundRect(g, _, y, x, 4) : e.rect(g, _, y, x), e.fill(), console.log("Legend gradient style:", E);
4797
+ }
4798
+ if (e.fillStyle = "#cccccc", e.font = "14px Arial, sans-serif", o && e.fillText(o.textContent || "", g, f + 78), l) {
4799
+ const v = l.textContent || "", P = e.measureText(v).width;
4800
+ e.fillText(v, g + y - P, f + 78);
4801
+ }
4802
+ c && c.textContent && (e.fillStyle = "#888888", e.font = "italic 12px Arial, sans-serif", e.fillText(c.textContent, g, f + 95));
4803
+ } catch (n) {
4804
+ console.warn("Failed to draw legend on canvas:", n);
4805
+ }
4806
+ }
4807
+ /**
4808
+ * Capture a single screenshot (includes legend if visible)
4719
4809
  */
4720
4810
  screenshot(e = {}) {
4721
4811
  const { width: t = 1920, height: i = 1080 } = e, n = this.renderer.domElement.width, r = this.renderer.domElement.height;
4722
- this.renderer.setSize(t, i), this.camera.aspect = t / i, this.camera.updateProjectionMatrix(), this.renderer.render(this.scene, this.camera);
4723
- const s = this.renderer.domElement.toDataURL("image/png");
4812
+ this.renderer.setSize(t, i), this.camera.aspect = t / i, this.camera.updateProjectionMatrix(), this.renderer.render(this.scene, this.camera), this.compositeCanvas.width = t, this.compositeCanvas.height = i, this.compositeCtx.drawImage(this.renderer.domElement, 0, 0), this.drawOverlaysOnCanvas(this.compositeCtx, t, i);
4813
+ const s = this.compositeCanvas.toDataURL("image/png");
4724
4814
  this.renderer.setSize(n, r), this.camera.aspect = n / r, this.camera.updateProjectionMatrix(), this.downloadFile(s, `globe-${Date.now()}.png`);
4725
4815
  }
4726
4816
  /**
4727
4817
  * Start recording video using MediaRecorder
4818
+ * Prefers MP4 format when available, falls back to WebM
4819
+ * Includes legend overlay if visible
4728
4820
  * Returns a promise that resolves when recording has started
4729
4821
  */
4730
4822
  startVideoRecording(e = {}) {
@@ -4733,20 +4825,46 @@ class qa {
4733
4825
  t();
4734
4826
  return;
4735
4827
  }
4736
- const n = this.renderer.domElement.captureStream(60);
4828
+ const i = this.renderer.domElement;
4829
+ this.compositeCanvas.width = i.width, this.compositeCanvas.height = i.height, this.compositeCtx.drawImage(i, 0, 0), this.drawOverlaysOnCanvas(this.compositeCtx, this.compositeCanvas.width, this.compositeCanvas.height);
4830
+ const n = this.compositeCanvas.captureStream(60), r = [
4831
+ { mime: "video/mp4;codecs=avc1", ext: "mp4" },
4832
+ { mime: "video/mp4", ext: "mp4" },
4833
+ { mime: "video/webm;codecs=h264", ext: "webm" },
4834
+ { mime: "video/webm;codecs=vp9", ext: "webm" },
4835
+ { mime: "video/webm;codecs=vp8", ext: "webm" },
4836
+ { mime: "video/webm", ext: "webm" }
4837
+ ];
4838
+ let s = "video/webm", o = "webm";
4839
+ for (const { mime: c, ext: h } of r)
4840
+ if (MediaRecorder.isTypeSupported(c)) {
4841
+ s = c, o = h, console.log(`Video recording using: ${c}`);
4842
+ break;
4843
+ }
4737
4844
  this.mediaRecorder = new MediaRecorder(n, {
4738
- mimeType: "video/webm;codecs=vp9",
4845
+ mimeType: s,
4739
4846
  videoBitsPerSecond: 8e6
4740
- }), this.recordedChunks = [], this.mediaRecorder.ondataavailable = (r) => {
4741
- r.data.size > 0 && this.recordedChunks.push(r.data);
4847
+ }), this.recordedChunks = [];
4848
+ const l = o;
4849
+ this.mediaRecorder.ondataavailable = (c) => {
4850
+ c.data.size > 0 && this.recordedChunks.push(c.data);
4742
4851
  }, this.mediaRecorder.onstop = () => {
4743
- const r = new Blob(this.recordedChunks, { type: "video/webm" }), s = URL.createObjectURL(r);
4744
- this.downloadFile(s, `globe-${Date.now()}.webm`), URL.revokeObjectURL(s);
4852
+ const c = s.split(";")[0], h = new Blob(this.recordedChunks, { type: c }), u = URL.createObjectURL(h);
4853
+ this.downloadFile(u, `globe-${Date.now()}.${l}`), URL.revokeObjectURL(u);
4745
4854
  }, this.mediaRecorder.onstart = () => {
4746
- this.isRecording = !0, t();
4855
+ this.isRecording = !0, setTimeout(() => t(), 50);
4747
4856
  }, this.mediaRecorder.start(100);
4748
4857
  });
4749
4858
  }
4859
+ /**
4860
+ * Update video frame - call this in animation loop while recording video
4861
+ * Composites the renderer output with the legend overlay
4862
+ */
4863
+ updateVideoFrame() {
4864
+ if (!this.isRecording || !this.mediaRecorder) return;
4865
+ const e = this.compositeCanvas.width, t = this.compositeCanvas.height;
4866
+ this.compositeCtx.drawImage(this.renderer.domElement, 0, 0, e, t), this.drawOverlaysOnCanvas(this.compositeCtx, e, t);
4867
+ }
4750
4868
  /**
4751
4869
  * Stop video recording
4752
4870
  */
@@ -4764,12 +4882,12 @@ class qa {
4764
4882
  }
4765
4883
  /**
4766
4884
  * Capture a single GIF frame (call this in animation loop)
4767
- * Captures RGBA data directly from canvas
4885
+ * Captures RGBA data directly from canvas, includes legend if visible
4768
4886
  */
4769
4887
  captureGifFrame() {
4770
4888
  if (!this.isRecording) return;
4771
4889
  const e = this.renderer.domElement, t = this.gifWidth, i = this.gifHeight;
4772
- this.captureCtx.drawImage(e, 0, 0, t, i);
4890
+ this.captureCtx.drawImage(e, 0, 0, t, i), this.drawOverlaysOnCanvas(this.captureCtx, t, i);
4773
4891
  const n = this.captureCtx.getImageData(0, 0, t, i);
4774
4892
  this.frames.push({
4775
4893
  data: new Uint8ClampedArray(n.data),
@@ -4790,9 +4908,9 @@ class qa {
4790
4908
  const { fps: t = 20, filename: i } = e, n = Math.round(1e3 / t);
4791
4909
  console.log(`Generating GIF with ${this.frames.length} frames at ${t} fps...`);
4792
4910
  try {
4793
- const r = this.frames[0], s = r.width, o = r.height, l = Ba(r.data, 256), c = ja();
4911
+ const r = this.frames[0], s = r.width, o = r.height, l = Ba(r.data, 256), c = Ya();
4794
4912
  for (let f = 0; f < this.frames.length; f++) {
4795
- const d = this.frames[f], g = Ga(d.data, l);
4913
+ const d = this.frames[f], g = Va(d.data, l);
4796
4914
  c.writeFrame(g, s, o, {
4797
4915
  palette: f === 0 ? l : void 0,
4798
4916
  // Only first frame needs palette
@@ -4826,7 +4944,7 @@ class qa {
4826
4944
  i.href = e, i.download = t, i.style.display = "none", document.body.appendChild(i), i.click(), document.body.removeChild(i);
4827
4945
  }
4828
4946
  }
4829
- class Qa extends Fr {
4947
+ class Ja extends Nr {
4830
4948
  /**
4831
4949
  * Constructs a new CSS2D object.
4832
4950
  *
@@ -4844,7 +4962,7 @@ class Qa extends Fr {
4844
4962
  }
4845
4963
  }
4846
4964
  const qe = new se(), bn = new An(), En = new An(), vn = new se(), wn = new se();
4847
- class Ja {
4965
+ class eo {
4848
4966
  /**
4849
4967
  * Constructs a new CSS2D renderer.
4850
4968
  *
@@ -4901,15 +5019,15 @@ class Ja {
4901
5019
  const d = p(f).sort(function(_, y) {
4902
5020
  if (_.renderOrder !== y.renderOrder)
4903
5021
  return y.renderOrder - _.renderOrder;
4904
- const x = o.objects.get(_).distanceToCameraSquared, b = o.objects.get(y).distanceToCameraSquared;
4905
- return x - b;
5022
+ const x = o.objects.get(_).distanceToCameraSquared, E = o.objects.get(y).distanceToCameraSquared;
5023
+ return x - E;
4906
5024
  }), g = d.length;
4907
5025
  for (let _ = 0, y = d.length; _ < y; _++)
4908
5026
  d[_].element.style.zIndex = g - _;
4909
5027
  }
4910
5028
  }
4911
5029
  }
4912
- const eo = {
5030
+ const to = {
4913
5031
  // Major economies
4914
5032
  CN: [35, 105],
4915
5033
  IN: [22, 78],
@@ -5008,7 +5126,7 @@ const eo = {
5008
5126
  UY: [-33, -56],
5009
5127
  CR: [10, -84],
5010
5128
  PA: [9, -80]
5011
- }, to = /* @__PURE__ */ new Set([
5129
+ }, io = /* @__PURE__ */ new Set([
5012
5130
  "CN",
5013
5131
  "IN",
5014
5132
  "US",
@@ -5039,7 +5157,7 @@ const eo = {
5039
5157
  "PK",
5040
5158
  "BD",
5041
5159
  "VN"
5042
- ]), io = /* @__PURE__ */ new Set([
5160
+ ]), no = /* @__PURE__ */ new Set([
5043
5161
  "CN",
5044
5162
  "IN",
5045
5163
  "US",
@@ -5047,7 +5165,7 @@ const eo = {
5047
5165
  "RU",
5048
5166
  "AU",
5049
5167
  "CA"
5050
- ]), no = /* @__PURE__ */ new Set(["RU", "CA", "US", "CN", "BR", "AU"]), ro = /* @__PURE__ */ new Set([
5168
+ ]), ro = /* @__PURE__ */ new Set(["RU", "CA", "US", "CN", "BR", "AU"]), so = /* @__PURE__ */ new Set([
5051
5169
  "IN",
5052
5170
  "AR",
5053
5171
  "KZ",
@@ -5078,7 +5196,7 @@ const eo = {
5078
5196
  "TR",
5079
5197
  "CL",
5080
5198
  "MM"
5081
- ]), so = /* @__PURE__ */ new Set([
5199
+ ]), ao = /* @__PURE__ */ new Set([
5082
5200
  "AF",
5083
5201
  "UA",
5084
5202
  "MG",
@@ -5120,7 +5238,7 @@ const eo = {
5120
5238
  "IQ",
5121
5239
  "BD"
5122
5240
  ]);
5123
- class ao {
5241
+ class oo {
5124
5242
  labelRenderer;
5125
5243
  labels = [];
5126
5244
  labelGroup;
@@ -5130,7 +5248,9 @@ class ao {
5130
5248
  globe = null;
5131
5249
  camera = null;
5132
5250
  constructor(e, t) {
5133
- this.sphereRadius = t, this.labelRenderer = new Ja(), this.labelRenderer.setSize(window.innerWidth, window.innerHeight), this.labelRenderer.domElement.style.position = "absolute", this.labelRenderer.domElement.style.top = "0", this.labelRenderer.domElement.style.left = "0", this.labelRenderer.domElement.style.pointerEvents = "none", e.appendChild(this.labelRenderer.domElement), this.labelGroup = new M.Group(), this.injectStyles(), this.createLabels();
5251
+ this.sphereRadius = t, this.labelRenderer = new eo();
5252
+ const i = e.clientWidth || 800, n = e.clientHeight || 600;
5253
+ this.labelRenderer.setSize(i, n), this.labelRenderer.domElement.style.position = "absolute", this.labelRenderer.domElement.style.top = "0", this.labelRenderer.domElement.style.left = "0", this.labelRenderer.domElement.style.pointerEvents = "none", e.appendChild(this.labelRenderer.domElement), this.labelGroup = new S.Group(), this.injectStyles(), this.createLabels();
5134
5254
  }
5135
5255
  injectStyles() {
5136
5256
  const e = document.createElement("style");
@@ -5217,15 +5337,15 @@ class ao {
5217
5337
  `, document.head.appendChild(e);
5218
5338
  }
5219
5339
  getSizeCategory(e) {
5220
- return no.has(e) ? "large" : ro.has(e) ? "medium" : so.has(e) ? "small" : "tiny";
5340
+ return ro.has(e) ? "large" : so.has(e) ? "medium" : ao.has(e) ? "small" : "tiny";
5221
5341
  }
5222
5342
  createLabels() {
5223
5343
  Tr.forEach((e) => {
5224
- const t = eo[e.code];
5344
+ const t = to[e.code];
5225
5345
  if (!t) return;
5226
5346
  const [i, n] = t, r = this.getSizeCategory(e.code), s = document.createElement("div");
5227
5347
  s.className = `country-label hidden size-${r}`, s.textContent = e.name;
5228
- const o = new Qa(s), l = {
5348
+ const o = new Ja(s), l = {
5229
5349
  element: s,
5230
5350
  object: o,
5231
5351
  country: e,
@@ -5236,8 +5356,8 @@ class ao {
5236
5356
  this.labelGroup.add(o), this.labels.push(l), this.updateLabelPosition(o, l, this.currentMorph);
5237
5357
  });
5238
5358
  }
5239
- tempVector = new M.Vector3();
5240
- cameraDirection = new M.Vector3();
5359
+ tempVector = new S.Vector3();
5360
+ cameraDirection = new S.Vector3();
5241
5361
  updateLabelPosition(e, t, i) {
5242
5362
  const { lat: n, lon: r, element: s } = t, o = n * Math.PI / 180, l = r * Math.PI / 180, c = this.sphereRadius + 0.5, h = c * Math.cos(o) * Math.sin(l), u = c * Math.sin(o), p = c * Math.cos(o) * Math.cos(l), m = 2 * Math.PI * this.sphereRadius, f = Math.PI * this.sphereRadius, d = (r + 180) / 360, g = (n + 90) / 180, _ = (d - 0.5) * m, y = (g - 0.5) * f, x = 0.5;
5243
5363
  if (this.globe && i > 0.01)
@@ -5247,8 +5367,8 @@ class ao {
5247
5367
  this.tempVector.z * i + x * (1 - i)
5248
5368
  ), this.camera && i > 0.5) {
5249
5369
  this.cameraDirection.copy(this.camera.position).normalize();
5250
- const P = this.tempVector.clone().normalize().dot(this.cameraDirection) > -0.1;
5251
- s.style.opacity = P ? "" : "0";
5370
+ const C = this.tempVector.clone().normalize().dot(this.cameraDirection) > 0.15;
5371
+ s.style.opacity = C ? "" : "0";
5252
5372
  } else
5253
5373
  s.style.opacity = "";
5254
5374
  else
@@ -5276,10 +5396,10 @@ class ao {
5276
5396
  n = !1;
5277
5397
  break;
5278
5398
  case "minimal":
5279
- n = io.has(i);
5399
+ n = no.has(i);
5280
5400
  break;
5281
5401
  case "major":
5282
- n = to.has(i);
5402
+ n = io.has(i);
5283
5403
  break;
5284
5404
  case "all":
5285
5405
  case "capitals":
@@ -5333,6 +5453,25 @@ class ao {
5333
5453
  getStyle() {
5334
5454
  return this.currentStyle;
5335
5455
  }
5456
+ /**
5457
+ * Get visible labels with their screen positions for canvas rendering
5458
+ */
5459
+ getVisibleLabelsForCanvas(e, t, i) {
5460
+ if (this.currentStyle === "none") return [];
5461
+ const n = [], r = new S.Vector3();
5462
+ return this.labels.forEach((s) => {
5463
+ const o = s.element.style.opacity, l = o === "" ? 1 : parseFloat(o) || 0;
5464
+ if (l < 0.1 || s.element.classList.contains("hidden")) return;
5465
+ s.object.getWorldPosition(r), r.project(e);
5466
+ const c = (r.x * 0.5 + 0.5) * t, h = (-r.y * 0.5 + 0.5) * i;
5467
+ c >= 0 && c <= t && h >= 0 && h <= i && r.z < 1 && n.push({
5468
+ text: s.country.name,
5469
+ x: c,
5470
+ y: h,
5471
+ opacity: l
5472
+ });
5473
+ }), n;
5474
+ }
5336
5475
  /**
5337
5476
  * Dispose resources
5338
5477
  */
@@ -5453,7 +5592,7 @@ const wi = {
5453
5592
  }
5454
5593
  };
5455
5594
  wi.lifeExpectancy;
5456
- const $e = 50, oo = `
5595
+ const Be = 50, lo = `
5457
5596
  uniform float uMorph;
5458
5597
  uniform float uTime;
5459
5598
  uniform float uParchment;
@@ -5473,7 +5612,7 @@ varying float vDiscard;
5473
5612
  varying float vExtrudeAmount;
5474
5613
 
5475
5614
  const float PI = 3.14159265359;
5476
- const float RADIUS = ${$e.toFixed(1)};
5615
+ const float RADIUS = ${Be.toFixed(1)};
5477
5616
 
5478
5617
  // Hash functions for procedural variation
5479
5618
  float hash(vec2 p) {
@@ -5663,7 +5802,7 @@ void main() {
5663
5802
 
5664
5803
  gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);
5665
5804
  }
5666
- `, lo = `
5805
+ `, ho = `
5667
5806
  uniform sampler2D uTexture;
5668
5807
  uniform sampler2D uDataTexture;
5669
5808
  uniform sampler2D uCloudTexture;
@@ -5820,13 +5959,13 @@ void main() {
5820
5959
 
5821
5960
  gl_FragColor = vec4(color, 1.0);
5822
5961
  }
5823
- `, ho = `
5962
+ `, co = `
5824
5963
  varying vec3 vNormal;
5825
5964
  varying vec3 vPosition;
5826
5965
  uniform float uMorph;
5827
5966
 
5828
5967
  const float PI = 3.14159265359;
5829
- const float RADIUS = ${$e.toFixed(1)};
5968
+ const float RADIUS = ${Be.toFixed(1)};
5830
5969
 
5831
5970
  void main() {
5832
5971
  vNormal = normalize(normalMatrix * normal);
@@ -5855,7 +5994,7 @@ void main() {
5855
5994
  vPosition = pos;
5856
5995
  gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);
5857
5996
  }
5858
- `, co = `
5997
+ `, uo = `
5859
5998
  varying vec3 vNormal;
5860
5999
  varying vec3 vPosition;
5861
6000
  uniform float uMorph;
@@ -5870,7 +6009,7 @@ void main() {
5870
6009
 
5871
6010
  gl_FragColor = vec4(color, intensity * 0.6);
5872
6011
  }
5873
- `, uo = `
6012
+ `, po = `
5874
6013
  attribute float aSize;
5875
6014
  attribute float aPhase;
5876
6015
  uniform float uTime;
@@ -5887,7 +6026,7 @@ void main() {
5887
6026
  gl_PointSize = aSize * (300.0 / -mvPosition.z) * twinkle;
5888
6027
  gl_Position = projectionMatrix * mvPosition;
5889
6028
  }
5890
- `, po = `
6029
+ `, fo = `
5891
6030
  varying float vOpacity;
5892
6031
 
5893
6032
  void main() {
@@ -5897,14 +6036,14 @@ void main() {
5897
6036
 
5898
6037
  gl_FragColor = vec4(1.0, 1.0, 1.0, alpha * vOpacity * 0.9);
5899
6038
  }
5900
- `, Pn = {
6039
+ `, Cn = {
5901
6040
  satellite: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_atmos_2048.jpg",
5902
6041
  natural: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_day_4096.jpg",
5903
6042
  dark: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_lights_2048.png",
5904
6043
  light: "https://raw.githubusercontent.com/turban/webgl-earth/master/images/2_no_clouds_4k.jpg",
5905
6044
  night: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_lights_2048.png",
5906
6045
  topographic: "https://eoimages.gsfc.nasa.gov/images/imagerecords/74000/74117/world.topo.200407.3x5400x2700.jpg"
5907
- }, Cn = {
6046
+ }, Pn = {
5908
6047
  texture: "satellite",
5909
6048
  labels: "all",
5910
6049
  statistic: "lifeExpectancy",
@@ -5920,7 +6059,7 @@ void main() {
5920
6059
  },
5921
6060
  extrudeHeight: !1
5922
6061
  };
5923
- class mo {
6062
+ class _o {
5924
6063
  container;
5925
6064
  config;
5926
6065
  // Three.js core
@@ -5939,13 +6078,16 @@ class mo {
5939
6078
  legend = null;
5940
6079
  exporter = null;
5941
6080
  countryLabels = null;
5942
- textureLoader = new M.TextureLoader();
6081
+ textureLoader = new S.TextureLoader();
5943
6082
  dataTexture = null;
5944
6083
  // State
5945
6084
  morph = 0;
5946
6085
  currentStatistic = null;
5947
6086
  animationId = null;
5948
6087
  isDestroyed = !1;
6088
+ /** Promise that resolves when fully initialized */
6089
+ ready;
6090
+ resolveReady;
5949
6091
  /**
5950
6092
  * Create a new GlobeViz instance
5951
6093
  * @param container CSS selector or HTMLElement
@@ -5959,31 +6101,33 @@ class mo {
5959
6101
  } else
5960
6102
  this.container = e;
5961
6103
  this.config = {
5962
- ...Cn,
6104
+ ...Pn,
5963
6105
  ...t,
5964
- effects: { ...Cn.effects, ...t.effects }
5965
- }, this.init();
6106
+ effects: { ...Pn.effects, ...t.effects }
6107
+ }, this.ready = new Promise((i) => {
6108
+ this.resolveReady = i;
6109
+ }), this.init();
5966
6110
  }
5967
6111
  async init() {
5968
6112
  const e = this.config.width || this.container.clientWidth || 800, t = this.config.height || this.container.clientHeight || 600;
5969
- this.scene = new M.Scene(), this.scene.background = new M.Color(2066), this.camera = new M.PerspectiveCamera(50, e / t, 1, 1e3), this.camera.position.set(0, 0, this.config.initialView === "flat" ? 350 : 150), this.renderer = new M.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 zr(this.camera, this.renderer.domElement), this.controls.enableDamping = !0, this.controls.minDistance = 80, this.controls.maxDistance = 400, this.choropleth = new Oa(), this.config.showLegend && (this.legend = new La()), await this.createGlobe(), this.createStars(), this.config.effects.atmosphere && this.createAtmosphere(), this.countryLabels = new ao(this.container, $e), 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 qa(this.renderer, this.scene, this.camera), this.config.showControls && this.createGUI(), await this.choropleth.waitForLoad(), 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), window.addEventListener("keydown", this.handleKeydown), this.animate();
6113
+ this.scene = new S.Scene(), this.scene.background = new S.Color(2066), this.camera = new S.PerspectiveCamera(50, e / t, 1, 1e3), this.camera.position.set(0, 0, this.config.initialView === "flat" ? 350 : 150), this.renderer = new S.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 $r(this.camera, this.renderer.domElement), this.controls.enableDamping = !0, this.controls.minDistance = 80, this.controls.maxDistance = 400, this.choropleth = new La(), this.config.showLegend && (this.legend = new ka()), await this.createGlobe(), this.createStars(), this.config.effects.atmosphere && this.createAtmosphere(), this.countryLabels = new oo(this.container, Be), 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 Qa(this.renderer, this.scene, this.camera), this.config.showControls && this.createGUI(), await this.choropleth.waitForLoad(), 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), window.addEventListener("keydown", this.handleKeydown), this.animate(), this.resolveReady();
5970
6114
  }
5971
6115
  async createGlobe() {
5972
6116
  const e = await this.textureLoader.loadAsync(
5973
- Pn[this.config.texture]
6117
+ Cn[this.config.texture]
5974
6118
  );
5975
- e.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), e.minFilter = M.LinearMipmapLinearFilter, e.magFilter = M.LinearFilter;
6119
+ e.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), e.minFilter = S.LinearMipmapLinearFilter, e.magFilter = S.LinearFilter;
5976
6120
  const t = document.createElement("canvas");
5977
- t.width = 2048, t.height = 1024, this.dataTexture = new M.CanvasTexture(t);
5978
- const i = new M.PlaneGeometry(
5979
- Math.PI * 2 * $e,
5980
- Math.PI * $e,
6121
+ t.width = 2048, t.height = 1024, this.dataTexture = new S.CanvasTexture(t);
6122
+ const i = new S.PlaneGeometry(
6123
+ Math.PI * 2 * Be,
6124
+ Math.PI * Be,
5981
6125
  256,
5982
6126
  128
5983
6127
  );
5984
- this.material = new M.ShaderMaterial({
5985
- vertexShader: oo,
5986
- fragmentShader: lo,
6128
+ this.material = new S.ShaderMaterial({
6129
+ vertexShader: lo,
6130
+ fragmentShader: ho,
5987
6131
  uniforms: {
5988
6132
  // Core uniforms
5989
6133
  uMorph: { value: 0 },
@@ -5998,7 +6142,7 @@ class mo {
5998
6142
  uDataOpacity: { value: 0 },
5999
6143
  uDataOverlay: { value: 0 },
6000
6144
  uExtrudeHeight: { value: this.config.extrudeHeight ? 1 : 0 },
6001
- uSunDir: { value: new M.Vector3(1, 0.5, 1).normalize() },
6145
+ uSunDir: { value: new S.Vector3(1, 0.5, 1).normalize() },
6002
6146
  // Effect uniforms
6003
6147
  uClouds: { value: this.config.effects.clouds ? 1 : 0 },
6004
6148
  uCloudSpeed: { value: this.config.effects.cloudSpeed || 1 },
@@ -6016,54 +6160,54 @@ class mo {
6016
6160
  uScanEffect: { value: 0 },
6017
6161
  uScanSpeed: { value: 1 },
6018
6162
  uHologram: { value: this.config.effects.hologramMode ? 1 : 0 },
6019
- uHologramColor: { value: new M.Color(65535) },
6163
+ uHologramColor: { value: new S.Color(65535) },
6020
6164
  uVintage: { value: this.config.effects.vintageMode ? 1 : 0 },
6021
6165
  uThermal: { value: this.config.effects.thermalMode ? 1 : 0 },
6022
6166
  uBlueprint: { value: this.config.effects.blueprintMode ? 1 : 0 },
6023
6167
  uGlowPulse: { value: this.config.effects.glowPulse ? 1 : 0 },
6024
- uGlowColor: { value: new M.Color(4491519) }
6168
+ uGlowColor: { value: new S.Color(4491519) }
6025
6169
  },
6026
- side: M.DoubleSide
6027
- }), this.globe = new M.Mesh(i, this.material), this.scene.add(this.globe);
6170
+ side: S.DoubleSide
6171
+ }), this.globe = new S.Mesh(i, this.material), this.scene.add(this.globe);
6028
6172
  }
6029
6173
  createAtmosphere() {
6030
- const e = new M.PlaneGeometry(
6031
- Math.PI * 2 * $e * 1.15,
6032
- Math.PI * $e * 1.15,
6174
+ const e = new S.PlaneGeometry(
6175
+ Math.PI * 2 * Be * 1.15,
6176
+ Math.PI * Be * 1.15,
6033
6177
  128,
6034
6178
  64
6035
- ), t = new M.ShaderMaterial({
6036
- vertexShader: ho,
6037
- fragmentShader: co,
6179
+ ), t = new S.ShaderMaterial({
6180
+ vertexShader: co,
6181
+ fragmentShader: uo,
6038
6182
  uniforms: {
6039
6183
  uMorph: { value: 0 }
6040
6184
  },
6041
- side: M.BackSide,
6185
+ side: S.BackSide,
6042
6186
  transparent: !0,
6043
- blending: M.AdditiveBlending,
6187
+ blending: S.AdditiveBlending,
6044
6188
  depthWrite: !1
6045
6189
  });
6046
- this.atmosphere = new M.Mesh(e, t), this.scene.add(this.atmosphere);
6190
+ this.atmosphere = new S.Mesh(e, t), this.scene.add(this.atmosphere);
6047
6191
  }
6048
6192
  createStars() {
6049
- const t = new M.BufferGeometry(), i = new Float32Array(3e3 * 3), n = new Float32Array(3e3), r = new Float32Array(3e3);
6193
+ const t = new S.BufferGeometry(), i = new Float32Array(3e3 * 3), n = new Float32Array(3e3), r = new Float32Array(3e3);
6050
6194
  for (let o = 0; o < 3e3; o++) {
6051
6195
  const l = 300 + Math.random() * 300, c = Math.random() * Math.PI * 2, h = Math.acos(2 * Math.random() - 1);
6052
6196
  i[o * 3] = l * Math.sin(h) * Math.cos(c), i[o * 3 + 1] = l * Math.sin(h) * Math.sin(c), i[o * 3 + 2] = l * Math.cos(h), n[o] = 0.5 + Math.random() * 1.5, r[o] = Math.random() * Math.PI * 2;
6053
6197
  }
6054
- t.setAttribute("position", new M.BufferAttribute(i, 3)), t.setAttribute("aSize", new M.BufferAttribute(n, 1)), t.setAttribute("aPhase", new M.BufferAttribute(r, 1));
6055
- const s = new M.ShaderMaterial({
6056
- vertexShader: uo,
6057
- fragmentShader: po,
6198
+ t.setAttribute("position", new S.BufferAttribute(i, 3)), t.setAttribute("aSize", new S.BufferAttribute(n, 1)), t.setAttribute("aPhase", new S.BufferAttribute(r, 1));
6199
+ const s = new S.ShaderMaterial({
6200
+ vertexShader: po,
6201
+ fragmentShader: fo,
6058
6202
  uniforms: {
6059
6203
  uTime: { value: 0 },
6060
6204
  uTwinkle: { value: this.config.effects.starTwinkle ? 1 : 0 }
6061
6205
  },
6062
6206
  transparent: !0,
6063
- blending: M.AdditiveBlending,
6207
+ blending: S.AdditiveBlending,
6064
6208
  depthWrite: !1
6065
6209
  });
6066
- this.stars = new M.Points(t, s), this.scene.add(this.stars);
6210
+ this.stars = new S.Points(t, s), this.scene.add(this.stars);
6067
6211
  }
6068
6212
  createGUI() {
6069
6213
  this.gui = new Vi({ title: "Globe Controls", width: 300 });
@@ -6130,11 +6274,11 @@ class mo {
6130
6274
  return;
6131
6275
  }
6132
6276
  this.currentStatistic = e;
6133
- const i = Da.find((n) => n.id === e);
6277
+ const i = Ma.find((n) => n.id === e);
6134
6278
  if (i && this.choropleth) {
6135
6279
  const n = this.choropleth.renderTexture(i);
6136
6280
  if (this.material && n) {
6137
- const r = new M.CanvasTexture(n);
6281
+ const r = new S.CanvasTexture(n);
6138
6282
  r.needsUpdate = !0, this.material.uniforms.uDataTexture.value = r, this.material.uniforms.uDataOverlay.value = 1, this.material.uniforms.uDataOpacity.value = 0.7;
6139
6283
  }
6140
6284
  }
@@ -6148,7 +6292,7 @@ class mo {
6148
6292
  t.definition.domain
6149
6293
  );
6150
6294
  if (this.material && i) {
6151
- const n = new M.CanvasTexture(i);
6295
+ const n = new S.CanvasTexture(i);
6152
6296
  n.needsUpdate = !0, this.material.uniforms.uDataTexture.value = n, this.material.uniforms.uDataOverlay.value = 1, this.material.uniforms.uDataOpacity.value = 0.7;
6153
6297
  }
6154
6298
  }
@@ -6159,11 +6303,11 @@ class mo {
6159
6303
  this.countryLabels?.setStyle(e);
6160
6304
  }
6161
6305
  async setTexture(e) {
6162
- const t = Pn[e];
6306
+ const t = Cn[e];
6163
6307
  if (!(!t || !this.material))
6164
6308
  try {
6165
6309
  const i = await this.textureLoader.loadAsync(t);
6166
- i.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), i.minFilter = M.LinearMipmapLinearFilter, i.magFilter = M.LinearFilter, this.material.uniforms.uTexture.value = i;
6310
+ i.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), i.minFilter = S.LinearMipmapLinearFilter, i.magFilter = S.LinearFilter, this.material.uniforms.uTexture.value = i;
6167
6311
  } catch (i) {
6168
6312
  console.error("Failed to load texture:", e, i);
6169
6313
  }
@@ -6199,8 +6343,10 @@ class mo {
6199
6343
  }
6200
6344
  export {
6201
6345
  wi as BUILT_IN_STATISTICS,
6202
- mo as GlobeViz,
6346
+ _o as GlobeViz,
6203
6347
  Tr as WORLD_STATISTICS,
6348
+ Sr as createFormatter,
6349
+ go as formatValue,
6204
6350
  Ia as normalizeCountryValues,
6205
6351
  gn as toNumericCode
6206
6352
  };