gralobe 1.0.4 → 1.0.6
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/README.md +17 -3
- package/dist/gralobe.js +988 -739
- package/dist/gralobe.js.map +1 -1
- package/dist/gralobe.umd.cjs +13 -13
- package/dist/gralobe.umd.cjs.map +1 -1
- package/dist/index.d.ts +15 -0
- package/package.json +1 -1
package/dist/gralobe.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
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
|
|
3
|
-
const
|
|
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 = {
|
|
4
4
|
NONE: -1,
|
|
5
5
|
ROTATE: 0,
|
|
6
6
|
DOLLY: 1,
|
|
@@ -9,7 +9,7 @@ const Xi = { type: "change" }, Pi = { type: "start" }, Tn = { type: "end" }, Mt
|
|
|
9
9
|
TOUCH_PAN: 4,
|
|
10
10
|
TOUCH_DOLLY_PAN: 5,
|
|
11
11
|
TOUCH_DOLLY_ROTATE: 6
|
|
12
|
-
},
|
|
12
|
+
}, Xt = 1e-6;
|
|
13
13
|
class zr extends Or {
|
|
14
14
|
/**
|
|
15
15
|
* Constructs a new controls instance.
|
|
@@ -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 =
|
|
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();
|
|
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(
|
|
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;
|
|
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 ===
|
|
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);
|
|
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,12 +109,12 @@ 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)) <
|
|
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))));
|
|
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);
|
|
116
116
|
}
|
|
117
|
-
return this._scale = 1, this._performCursorZoom = !1, r || this._lastPosition.distanceToSquared(this.object.position) >
|
|
117
|
+
return this._scale = 1, this._performCursorZoom = !1, r || this._lastPosition.distanceToSquared(this.object.position) > Xt || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Xt || this._lastTargetPosition.distanceToSquared(this.target) > Xt ? (this.dispatchEvent(Ki), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
|
|
118
118
|
}
|
|
119
119
|
_getAutoRotationAngle(e) {
|
|
120
120
|
return e !== null ? J / 60 * this.autoRotateSpeed * e : J / 60 / 60 * this.autoRotateSpeed;
|
|
@@ -306,16 +306,16 @@ class zr extends Or {
|
|
|
306
306
|
return e.ctrlKey && !this._controlActive && (i.deltaY *= 10), i;
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
function
|
|
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
312
|
function $r(a) {
|
|
313
313
|
this.enabled !== !1 && (a.pointerType === "touch" ? this._onTouchMove(a) : this._onMouseMove(a));
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function Gr(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 =
|
|
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;
|
|
319
319
|
break;
|
|
320
320
|
case 1:
|
|
321
321
|
const e = this._pointers[0], t = this._pointerPositions[e];
|
|
@@ -341,108 +341,108 @@ 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 =
|
|
344
|
+
this._handleMouseDownDolly(a), this.state = O.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 =
|
|
349
|
+
this._handleMouseDownPan(a), this.state = O.PAN;
|
|
350
350
|
} else {
|
|
351
351
|
if (this.enableRotate === !1) return;
|
|
352
|
-
this._handleMouseDownRotate(a), this.state =
|
|
352
|
+
this._handleMouseDownRotate(a), this.state = O.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 =
|
|
358
|
+
this._handleMouseDownRotate(a), this.state = O.ROTATE;
|
|
359
359
|
} else {
|
|
360
360
|
if (this.enablePan === !1) return;
|
|
361
|
-
this._handleMouseDownPan(a), this.state =
|
|
361
|
+
this._handleMouseDownPan(a), this.state = O.PAN;
|
|
362
362
|
}
|
|
363
363
|
break;
|
|
364
364
|
default:
|
|
365
|
-
this.state =
|
|
365
|
+
this.state = O.NONE;
|
|
366
366
|
}
|
|
367
|
-
this.state !==
|
|
367
|
+
this.state !== O.NONE && this.dispatchEvent(Pi);
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function Hr(a) {
|
|
370
370
|
switch (this.state) {
|
|
371
|
-
case
|
|
371
|
+
case O.ROTATE:
|
|
372
372
|
if (this.enableRotate === !1) return;
|
|
373
373
|
this._handleMouseMoveRotate(a);
|
|
374
374
|
break;
|
|
375
|
-
case
|
|
375
|
+
case O.DOLLY:
|
|
376
376
|
if (this.enableZoom === !1) return;
|
|
377
377
|
this._handleMouseMoveDolly(a);
|
|
378
378
|
break;
|
|
379
|
-
case
|
|
379
|
+
case O.PAN:
|
|
380
380
|
if (this.enablePan === !1) return;
|
|
381
381
|
this._handleMouseMovePan(a);
|
|
382
382
|
break;
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
385
|
function jr(a) {
|
|
386
|
-
this.enabled === !1 || this.enableZoom === !1 || this.state !==
|
|
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
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function Yr(a) {
|
|
389
389
|
this.enabled !== !1 && this._handleKeyDown(a);
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Zr(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 =
|
|
397
|
+
this._handleTouchStartRotate(a), this.state = O.TOUCH_ROTATE;
|
|
398
398
|
break;
|
|
399
399
|
case Qe.PAN:
|
|
400
400
|
if (this.enablePan === !1) return;
|
|
401
|
-
this._handleTouchStartPan(a), this.state =
|
|
401
|
+
this._handleTouchStartPan(a), this.state = O.TOUCH_PAN;
|
|
402
402
|
break;
|
|
403
403
|
default:
|
|
404
|
-
this.state =
|
|
404
|
+
this.state = O.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 =
|
|
411
|
+
this._handleTouchStartDollyPan(a), this.state = O.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 =
|
|
415
|
+
this._handleTouchStartDollyRotate(a), this.state = O.TOUCH_DOLLY_ROTATE;
|
|
416
416
|
break;
|
|
417
417
|
default:
|
|
418
|
-
this.state =
|
|
418
|
+
this.state = O.NONE;
|
|
419
419
|
}
|
|
420
420
|
break;
|
|
421
421
|
default:
|
|
422
|
-
this.state =
|
|
422
|
+
this.state = O.NONE;
|
|
423
423
|
}
|
|
424
|
-
this.state !==
|
|
424
|
+
this.state !== O.NONE && this.dispatchEvent(Pi);
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function Kr(a) {
|
|
427
427
|
switch (this._trackPointer(a), this.state) {
|
|
428
|
-
case
|
|
428
|
+
case O.TOUCH_ROTATE:
|
|
429
429
|
if (this.enableRotate === !1) return;
|
|
430
430
|
this._handleTouchMoveRotate(a), this.update();
|
|
431
431
|
break;
|
|
432
|
-
case
|
|
432
|
+
case O.TOUCH_PAN:
|
|
433
433
|
if (this.enablePan === !1) return;
|
|
434
434
|
this._handleTouchMovePan(a), this.update();
|
|
435
435
|
break;
|
|
436
|
-
case
|
|
436
|
+
case O.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
|
|
440
|
+
case O.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 =
|
|
445
|
+
this.state = O.NONE;
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
function Xr(a) {
|
|
@@ -451,7 +451,7 @@ function Xr(a) {
|
|
|
451
451
|
function Wr(a) {
|
|
452
452
|
a.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
453
453
|
}
|
|
454
|
-
function
|
|
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) {
|
|
@@ -459,7 +459,7 @@ function we(a) {
|
|
|
459
459
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
460
460
|
return a;
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function Sn(a, e) {
|
|
463
463
|
a.prototype = Object.create(e.prototype), a.prototype.constructor = a, a.__proto__ = e;
|
|
464
464
|
}
|
|
465
465
|
var he = {
|
|
@@ -473,78 +473,78 @@ var he = {
|
|
|
473
473
|
duration: 0.5,
|
|
474
474
|
overwrite: !1,
|
|
475
475
|
delay: 0
|
|
476
|
-
}, Ci,
|
|
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) {
|
|
477
477
|
return typeof e == "string";
|
|
478
|
-
},
|
|
478
|
+
}, G = function(e) {
|
|
479
479
|
return typeof e == "function";
|
|
480
480
|
}, Ce = function(e) {
|
|
481
481
|
return typeof e == "number";
|
|
482
|
-
},
|
|
482
|
+
}, Ai = function(e) {
|
|
483
483
|
return typeof e > "u";
|
|
484
|
-
},
|
|
484
|
+
}, Ee = function(e) {
|
|
485
485
|
return typeof e == "object";
|
|
486
486
|
}, ee = function(e) {
|
|
487
487
|
return e !== !1;
|
|
488
|
-
},
|
|
488
|
+
}, Ti = function() {
|
|
489
489
|
return typeof window < "u";
|
|
490
490
|
}, Rt = function(e) {
|
|
491
|
-
return
|
|
492
|
-
},
|
|
493
|
-
},
|
|
494
|
-
return (
|
|
491
|
+
return G(e) || Z(e);
|
|
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) {
|
|
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()");
|
|
497
|
-
},
|
|
497
|
+
}, Et = function(e, t) {
|
|
498
498
|
return !t && console.warn(e);
|
|
499
|
-
},
|
|
500
|
-
return e && (ce[e] = t) &&
|
|
501
|
-
},
|
|
499
|
+
}, Un = function(e, t) {
|
|
500
|
+
return e && (ce[e] = t) && zt && (zt[e] = t) || ce;
|
|
501
|
+
}, vt = function() {
|
|
502
502
|
return 0;
|
|
503
|
-
},
|
|
503
|
+
}, ns = {
|
|
504
504
|
suppressEvents: !0,
|
|
505
505
|
isStart: !0,
|
|
506
506
|
kill: !1
|
|
507
507
|
}, kt = {
|
|
508
508
|
suppressEvents: !0,
|
|
509
509
|
kill: !1
|
|
510
|
-
},
|
|
510
|
+
}, rs = {
|
|
511
511
|
suppressEvents: !0
|
|
512
|
-
}, Mi = {}, Re = [], ci = {},
|
|
512
|
+
}, Mi = {}, Re = [], ci = {}, Fn, ae = {}, qt = {}, Wi = 30, Ut = [], Ri = "", Ii = function(e) {
|
|
513
513
|
var t = e[0], i, n;
|
|
514
|
-
if (
|
|
515
|
-
for (n =
|
|
514
|
+
if (Ee(t) || G(t) || (e = [e]), !(i = (t._gsap || {}).harness)) {
|
|
515
|
+
for (n = Ut.length; n-- && !Ut[n].targetTest(t); )
|
|
516
516
|
;
|
|
517
|
-
i =
|
|
517
|
+
i = Ut[n];
|
|
518
518
|
}
|
|
519
519
|
for (n = e.length; n--; )
|
|
520
|
-
e[n] && (e[n]._gsap || (e[n]._gsap = new
|
|
520
|
+
e[n] && (e[n]._gsap || (e[n]._gsap = new or(e[n], i))) || e.splice(n, 1);
|
|
521
521
|
return e;
|
|
522
|
-
},
|
|
523
|
-
return e._gsap ||
|
|
524
|
-
},
|
|
525
|
-
return (i = e[t]) &&
|
|
522
|
+
}, He = function(e) {
|
|
523
|
+
return e._gsap || Ii(me(e))[0]._gsap;
|
|
524
|
+
}, Nn = function(e, t, i) {
|
|
525
|
+
return (i = e[t]) && G(i) ? e[t]() : Ai(i) && e.getAttribute && e.getAttribute(t) || i;
|
|
526
526
|
}, te = function(e, t) {
|
|
527
527
|
return (e = e.split(",")).forEach(t) || e;
|
|
528
|
-
},
|
|
528
|
+
}, V = function(e) {
|
|
529
529
|
return Math.round(e * 1e5) / 1e5 || 0;
|
|
530
|
-
},
|
|
530
|
+
}, j = function(e) {
|
|
531
531
|
return Math.round(e * 1e7) / 1e7 || 0;
|
|
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
|
-
},
|
|
535
|
+
}, ss = 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
|
-
},
|
|
539
|
+
}, Bt = 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
|
-
},
|
|
543
|
+
}, Oi = function(e) {
|
|
544
544
|
return !!(e._initted || e._startAt || e.add);
|
|
545
545
|
}, zn = function(e, t, i, n) {
|
|
546
|
-
Re.length && !
|
|
547
|
-
},
|
|
546
|
+
Re.length && !K && Bt(), e.render(t, i, !!(K && t < 0 && Oi(e))), Re.length && !K && Bt();
|
|
547
|
+
}, Bn = function(e) {
|
|
548
548
|
var t = parseFloat(e);
|
|
549
549
|
return (t || t === 0) && (e + "").match(On).length < 2 ? t : Z(e) ? e.trim() : e;
|
|
550
550
|
}, $n = function(e) {
|
|
@@ -553,7 +553,7 @@ var he = {
|
|
|
553
553
|
for (var i in t)
|
|
554
554
|
i in e || (e[i] = t[i]);
|
|
555
555
|
return e;
|
|
556
|
-
},
|
|
556
|
+
}, as = 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]);
|
|
@@ -564,93 +564,93 @@ var he = {
|
|
|
564
564
|
return e;
|
|
565
565
|
}, qi = function a(e, t) {
|
|
566
566
|
for (var i in t)
|
|
567
|
-
i !== "__proto__" && i !== "constructor" && i !== "prototype" && (e[i] =
|
|
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
|
-
},
|
|
569
|
+
}, $t = 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 ||
|
|
575
|
+
var t = e.parent || z, i = e.keyframes ? as(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
|
-
},
|
|
580
|
+
}, os = 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;
|
|
584
|
-
},
|
|
584
|
+
}, Gn = function(e, t, i, n, r) {
|
|
585
585
|
var s = e[n], o;
|
|
586
586
|
if (r)
|
|
587
587
|
for (o = t[r]; s && s[r] > o; )
|
|
588
588
|
s = s._prev;
|
|
589
589
|
return s ? (t._next = s._next, s._next = t) : (t._next = e[i], e[i] = t), t._next ? t._next._prev = t : e[n] = t, t._prev = s, t.parent = t._dp = e, t;
|
|
590
|
-
},
|
|
590
|
+
}, Yt = function(e, t, i, n) {
|
|
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
|
-
},
|
|
594
|
+
}, Oe = 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
|
-
},
|
|
601
|
+
}, ls = 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
|
-
return e._startAt && (
|
|
607
|
-
},
|
|
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) {
|
|
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;
|
|
611
611
|
}, ot = function(e, t) {
|
|
612
|
-
var i = Math.floor(e =
|
|
612
|
+
var i = Math.floor(e = j(e / t));
|
|
613
613
|
return e && i === e ? i - 1 : i;
|
|
614
|
-
},
|
|
614
|
+
}, Gt = function(e, t) {
|
|
615
615
|
return (e - t._start) * t._ts + (t._ts >= 0 ? 0 : t._dirty ? t.totalDuration() : t._tDur);
|
|
616
|
-
},
|
|
617
|
-
return e._end =
|
|
618
|
-
},
|
|
616
|
+
}, Zt = function(e) {
|
|
617
|
+
return e._end = j(e._start + (e._tDur / Math.abs(e._ts || e._rts || k) || 0));
|
|
618
|
+
}, Kt = function(e, t) {
|
|
619
619
|
var i = e._dp;
|
|
620
|
-
return i && i.smoothChildTiming && e._ts && (e._start =
|
|
620
|
+
return i && i.smoothChildTiming && e._ts && (e._start = j(i._time - (e._ts > 0 ? t / e._ts : ((e._dirty ? e.totalDuration() : e._tDur) - t) / -e._ts)), Zt(e), i._dirty || je(i, e)), e;
|
|
621
621
|
}, Vn = function(e, t) {
|
|
622
622
|
var i;
|
|
623
|
-
if ((t._time || !t._dur && t._initted || t._start < e._time && (t._dur || !t.add)) && (i =
|
|
623
|
+
if ((t._time || !t._dur && t._initted || t._start < e._time && (t._dur || !t.add)) && (i = Gt(e.rawTime(), t), (!t._dur || Dt(0, t.totalDuration(), i) - t._tTime > k) && t.render(i, !0)), je(e, t)._dp && e._initted && e._time >= e._dur && e._ts) {
|
|
624
624
|
if (e._dur < e.duration())
|
|
625
625
|
for (i = e; i._dp; )
|
|
626
626
|
i.rawTime() >= 0 && i.totalTime(i._tTime), i = i._dp;
|
|
627
|
-
e._zTime = -
|
|
627
|
+
e._zTime = -k;
|
|
628
628
|
}
|
|
629
629
|
}, ye = function(e, t, i, n) {
|
|
630
|
-
return t.parent &&
|
|
631
|
-
},
|
|
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;
|
|
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) {
|
|
634
|
-
if (
|
|
634
|
+
if (ki(e, t, r), !e._initted)
|
|
635
635
|
return 1;
|
|
636
|
-
if (!i && e._pt && !
|
|
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
|
-
},
|
|
638
|
+
}, cs = 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
|
-
},
|
|
645
|
-
var r = e.ratio, s = t < 0 || !t && (!e._start &&
|
|
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 ||
|
|
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;
|
|
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
|
-
for (u = e._zTime, e._zTime = t || (i ?
|
|
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 &&
|
|
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()));
|
|
652
652
|
} else e._zTime || (e._zTime = t);
|
|
653
|
-
},
|
|
653
|
+
}, ds = function(e, t, i) {
|
|
654
654
|
var n;
|
|
655
655
|
if (i > t)
|
|
656
656
|
for (n = e._first; n && n._start <= i; ) {
|
|
@@ -665,17 +665,17 @@ var he = {
|
|
|
665
665
|
n = n._prev;
|
|
666
666
|
}
|
|
667
667
|
}, lt = function(e, t, i, n) {
|
|
668
|
-
var r = e._repeat, s =
|
|
669
|
-
return o && !n && (e._time *= s / e._dur), e._dur = s, e._tDur = r ? r < 0 ? 1e10 :
|
|
668
|
+
var r = e._repeat, s = j(t) || 0, o = e._tTime / e._tDur;
|
|
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
|
-
return e instanceof q ?
|
|
672
|
-
},
|
|
671
|
+
return e instanceof q ? je(e) : lt(e, e._dur);
|
|
672
|
+
}, ps = {
|
|
673
673
|
_start: 0,
|
|
674
|
-
endTime:
|
|
675
|
-
totalDuration:
|
|
674
|
+
endTime: vt,
|
|
675
|
+
totalDuration: vt
|
|
676
676
|
}, pe = function a(e, t, i) {
|
|
677
|
-
var n = e.labels, r = e._recent ||
|
|
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 * (
|
|
677
|
+
var n = e.labels, r = e._recent || ps, s = e.duration() >= fe ? r.endTime(!1) : e._dur, o, l, c;
|
|
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
680
|
var n = Ce(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) {
|
|
@@ -683,39 +683,39 @@ var he = {
|
|
|
683
683
|
o = l.vars.defaults || {}, l = ee(l.vars.inherit) && l.parent;
|
|
684
684
|
s.immediateRender = ee(o.immediateRender), e < 2 ? s.runBackwards = 1 : s.startAt = t[r - 1];
|
|
685
685
|
}
|
|
686
|
-
return new
|
|
687
|
-
},
|
|
686
|
+
return new H(t[0], s, t[r + 1]);
|
|
687
|
+
}, ke = function(e, t) {
|
|
688
688
|
return e || e === 0 ? t(e) : t;
|
|
689
689
|
}, Dt = function(e, t, i) {
|
|
690
690
|
return i < e ? e : i > t ? t : i;
|
|
691
|
-
},
|
|
692
|
-
return !Z(e) || !(t =
|
|
693
|
-
},
|
|
694
|
-
return
|
|
691
|
+
}, X = function(e, t) {
|
|
692
|
+
return !Z(e) || !(t = is.exec(e)) ? "" : t[1];
|
|
693
|
+
}, fs = function(e, t, i) {
|
|
694
|
+
return ke(i, function(n) {
|
|
695
695
|
return Dt(e, t, n);
|
|
696
696
|
});
|
|
697
|
-
}, pi = [].slice,
|
|
698
|
-
return e &&
|
|
699
|
-
},
|
|
697
|
+
}, pi = [].slice, Yn = function(e, t) {
|
|
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) {
|
|
700
700
|
return i === void 0 && (i = []), e.forEach(function(n) {
|
|
701
701
|
var r;
|
|
702
|
-
return Z(n) && !t ||
|
|
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
|
|
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] : [];
|
|
706
706
|
}, fi = function(e) {
|
|
707
|
-
return e = me(e)[0] ||
|
|
707
|
+
return e = me(e)[0] || Et("Invalid scope") || {}, function(t) {
|
|
708
708
|
var i = e.current || e.nativeElement || e;
|
|
709
|
-
return me(t, i.querySelectorAll ? i : i === e ?
|
|
709
|
+
return me(t, i.querySelectorAll ? i : i === e ? Et("Invalid scope") || Si.createElement("div") : e);
|
|
710
710
|
};
|
|
711
|
-
},
|
|
711
|
+
}, Zn = function(e) {
|
|
712
712
|
return e.sort(function() {
|
|
713
713
|
return 0.5 - Math.random();
|
|
714
714
|
});
|
|
715
|
-
},
|
|
716
|
-
if (
|
|
715
|
+
}, Kn = function(e) {
|
|
716
|
+
if (G(e))
|
|
717
717
|
return e;
|
|
718
|
-
var t =
|
|
718
|
+
var t = Ee(e) ? e : {
|
|
719
719
|
each: e
|
|
720
720
|
}, i = Ye(t.ease), n = t.from || 0, r = parseFloat(t.base) || 0, s = {}, o = n > 0 && n < 1, l = isNaN(n) || o, c = t.axis, h = n, u = n;
|
|
721
721
|
return Z(n) ? h = u = {
|
|
@@ -723,39 +723,39 @@ 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,
|
|
726
|
+
var d = (f || t).length, g = s[d], _, y, x, b, E, P, w, C, v;
|
|
727
727
|
if (!g) {
|
|
728
|
-
if (
|
|
729
|
-
for (w = -fe; w < (w = f[
|
|
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; )
|
|
730
730
|
;
|
|
731
|
-
|
|
731
|
+
v < d && v--;
|
|
732
732
|
}
|
|
733
|
-
for (g = s[d] = [], _ = l ? Math.min(
|
|
734
|
-
x = P %
|
|
735
|
-
n === "random" &&
|
|
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;
|
|
736
736
|
}
|
|
737
|
-
return d = (g[p] - g.min) / g.max || 0,
|
|
737
|
+
return d = (g[p] - g.min) / g.max || 0, j(g.b + (i ? i(d) : d) * g.v) + g.u;
|
|
738
738
|
};
|
|
739
739
|
}, mi = function(e) {
|
|
740
740
|
var t = Math.pow(10, ((e + "").split(".")[1] || "").length);
|
|
741
741
|
return function(i) {
|
|
742
|
-
var n =
|
|
743
|
-
return (n - n % 1) / t + (Ce(i) ? 0 :
|
|
742
|
+
var n = j(Math.round(parseFloat(i) / e) * e * t);
|
|
743
|
+
return (n - n % 1) / t + (Ce(i) ? 0 : X(i));
|
|
744
744
|
};
|
|
745
745
|
}, Xn = function(e, t) {
|
|
746
|
-
var i =
|
|
747
|
-
return !i &&
|
|
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) {
|
|
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 +
|
|
752
|
+
return h = !n || c <= n ? e[h] : s, r || h === s || Ce(s) ? h : h + X(s);
|
|
753
753
|
} : mi(e));
|
|
754
754
|
}, Wn = function(e, t, i, n) {
|
|
755
|
-
return
|
|
756
|
-
return
|
|
755
|
+
return ke(W(e) ? !t : i === !0 ? !!(i = 0) : !n, function() {
|
|
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
|
-
},
|
|
758
|
+
}, gs = 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
|
-
},
|
|
766
|
+
}, _s = function(e, t) {
|
|
767
767
|
return function(i) {
|
|
768
|
-
return e(parseFloat(i)) + (t ||
|
|
768
|
+
return e(parseFloat(i)) + (t || X(i));
|
|
769
769
|
};
|
|
770
|
-
},
|
|
771
|
-
return
|
|
772
|
-
},
|
|
773
|
-
return
|
|
770
|
+
}, ys = function(e, t, i) {
|
|
771
|
+
return Qn(e, t, 0, 1, i);
|
|
772
|
+
}, qn = function(e, t, i) {
|
|
773
|
+
return ke(i, function(n) {
|
|
774
774
|
return e[~~t(n)];
|
|
775
775
|
});
|
|
776
|
-
},
|
|
776
|
+
}, xs = function a(e, t, i) {
|
|
777
777
|
var n = t - e;
|
|
778
|
-
return
|
|
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
|
-
},
|
|
781
|
+
}, bs = function a(e, t, i) {
|
|
782
782
|
var n = t - e, r = n * 2;
|
|
783
|
-
return
|
|
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
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;
|
|
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
|
-
return
|
|
792
|
+
return ke(r, function(l) {
|
|
793
793
|
return i + ((l - e) / s * o || 0);
|
|
794
794
|
});
|
|
795
|
-
},
|
|
795
|
+
}, Es = 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
|
};
|
|
@@ -804,7 +804,7 @@ var he = {
|
|
|
804
804
|
}, t = {
|
|
805
805
|
p: t
|
|
806
806
|
};
|
|
807
|
-
else if (
|
|
807
|
+
else if (W(e) && !W(t)) {
|
|
808
808
|
for (h = [], u = e.length, p = u - 2, c = 1; c < u; c++)
|
|
809
809
|
h.push(a(e[c - 1], e[c]));
|
|
810
810
|
u--, r = function(f) {
|
|
@@ -812,38 +812,38 @@ var he = {
|
|
|
812
812
|
var d = Math.min(p, ~~f);
|
|
813
813
|
return h[d](f - d);
|
|
814
814
|
}, i = t;
|
|
815
|
-
} else n || (e = at(
|
|
815
|
+
} else n || (e = at(W(e) ? [] : {}, e));
|
|
816
816
|
if (!h) {
|
|
817
817
|
for (l in t)
|
|
818
818
|
Li.call(o, e, l, "get", t[l]);
|
|
819
819
|
r = function(f) {
|
|
820
|
-
return
|
|
820
|
+
return Ni(f, o) || (s ? e.p : e);
|
|
821
821
|
};
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
|
-
return
|
|
824
|
+
return ke(i, r);
|
|
825
825
|
}, en = function(e, t, i) {
|
|
826
826
|
var n = e.labels, r = fe, s, o, l;
|
|
827
827
|
for (s in n)
|
|
828
828
|
o = n[s] - t, o < 0 == !!i && o && r > (o = Math.abs(o)) && (l = s, r = o);
|
|
829
829
|
return l;
|
|
830
830
|
}, le = function(e, t, i) {
|
|
831
|
-
var n = e.vars, r = n[t], s =
|
|
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 &&
|
|
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;
|
|
834
834
|
}, mt = function(e) {
|
|
835
|
-
return
|
|
836
|
-
}, et,
|
|
835
|
+
return Oe(e), e.scrollTrigger && e.scrollTrigger.kill(!!K), e.progress() < 1 && le(e, "onInterrupt"), e;
|
|
836
|
+
}, et, Jn = [], er = function(e) {
|
|
837
837
|
if (e)
|
|
838
|
-
if (e = !e.name && e.default || e,
|
|
839
|
-
var t = e.name, i =
|
|
838
|
+
if (e = !e.name && e.default || e, Ti() || e.headless) {
|
|
839
|
+
var t = e.name, i = G(e), n = t && !i && e.init ? function() {
|
|
840
840
|
this._props = [];
|
|
841
841
|
} : e, r = {
|
|
842
|
-
init:
|
|
843
|
-
render:
|
|
842
|
+
init: vt,
|
|
843
|
+
render: Ni,
|
|
844
844
|
add: Li,
|
|
845
|
-
kill:
|
|
846
|
-
modifier:
|
|
845
|
+
kill: Fs,
|
|
846
|
+
modifier: Us,
|
|
847
847
|
rawVars: 0
|
|
848
848
|
}, s = {
|
|
849
849
|
targetTest: 0,
|
|
@@ -855,11 +855,11 @@ var he = {
|
|
|
855
855
|
if (ht(), e !== n) {
|
|
856
856
|
if (ae[t])
|
|
857
857
|
return;
|
|
858
|
-
ue(n, ue(
|
|
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";
|
|
859
859
|
}
|
|
860
|
-
|
|
860
|
+
Un(t, n), e.register && e.register(re, n, ie);
|
|
861
861
|
} else
|
|
862
|
-
|
|
862
|
+
Jn.push(e);
|
|
863
863
|
}, L = 255, gt = {
|
|
864
864
|
aqua: [0, L, L],
|
|
865
865
|
lime: [0, L, 0],
|
|
@@ -880,9 +880,9 @@ var he = {
|
|
|
880
880
|
pink: [L, 192, 203],
|
|
881
881
|
cyan: [0, L, L],
|
|
882
882
|
transparent: [L, L, L, 0]
|
|
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
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;
|
|
887
887
|
if (!n) {
|
|
888
888
|
if (e.substr(-1) === "," && (e = e.substr(0, e.length - 1)), gt[e])
|
|
@@ -893,48 +893,48 @@ var he = {
|
|
|
893
893
|
e = parseInt(e.substr(1), 16), n = [e >> 16, e >> 8 & L, e & L];
|
|
894
894
|
} else if (e.substr(0, 3) === "hsl") {
|
|
895
895
|
if (n = f = e.match(li), !t)
|
|
896
|
-
l = +n[0] % 360 / 360, c = +n[1] / 100, h = +n[2] / 100, s = h <= 0.5 ? h * (c + 1) : h + c - h * c, r = h * 2 - s, n.length > 3 && (n[3] *= 1), n[0] =
|
|
896
|
+
l = +n[0] % 360 / 360, c = +n[1] / 100, h = +n[2] / 100, s = h <= 0.5 ? h * (c + 1) : h + c - h * c, r = h * 2 - s, n.length > 3 && (n[3] *= 1), n[0] = Qt(l + 1 / 3, r, s), n[1] = Qt(l, r, s), n[2] = Qt(l - 1 / 3, r, s);
|
|
897
897
|
else if (~e.indexOf("="))
|
|
898
|
-
return n = e.match(
|
|
898
|
+
return n = e.match(Rn), i && n.length < 4 && (n[3] = 1), n;
|
|
899
899
|
} else
|
|
900
900
|
n = e.match(li) || gt.transparent;
|
|
901
901
|
n = n.map(Number);
|
|
902
902
|
}
|
|
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(
|
|
906
|
+
return e.split(Ie).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(
|
|
911
|
+
var n = "", r = (e + n).match(Ie), 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
|
-
return (p =
|
|
916
|
-
}), i && (h =
|
|
917
|
-
for (c = e.replace(
|
|
915
|
+
return (p = tr(p, t, 1)) && s + (t ? p[0] + "," + p[1] + "%," + p[2] + "%," + p[3] : p.join(",")) + ")";
|
|
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++)
|
|
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(
|
|
920
|
+
for (c = e.split(Ie), u = c.length - 1; o < u; o++)
|
|
921
921
|
n += c[o] + r[o];
|
|
922
922
|
return n + c[u];
|
|
923
|
-
},
|
|
923
|
+
}, Ie = (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]?\(/,
|
|
928
|
+
})(), vs = /hsl[a]?\(/, nr = function(e) {
|
|
929
929
|
var t = e.join(" "), i;
|
|
930
|
-
if (
|
|
931
|
-
return i = vs.test(t), e[1] = tn(e[1], i), e[0] = tn(e[0], 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
932
|
}, Pt, 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,
|
|
935
|
-
if ((_ > e || _ < 0) && (i += _ - t), n += _,
|
|
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)
|
|
936
936
|
for (m = 0; m < o.length; m++)
|
|
937
|
-
o[m](
|
|
937
|
+
o[m](E, p, P, g);
|
|
938
938
|
};
|
|
939
939
|
return u = {
|
|
940
940
|
time: 0,
|
|
@@ -946,12 +946,12 @@ var he = {
|
|
|
946
946
|
return p / (1e3 / (g || 60));
|
|
947
947
|
},
|
|
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
951
|
}, Pt = 1, f(2));
|
|
952
952
|
},
|
|
953
953
|
sleep: function() {
|
|
954
|
-
(h ? cancelAnimationFrame : clearTimeout)(l), Pt = 0, c =
|
|
954
|
+
(h ? cancelAnimationFrame : clearTimeout)(l), Pt = 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,
|
|
964
|
-
g(b,
|
|
963
|
+
var x = _ ? function(b, E, P, w) {
|
|
964
|
+
g(b, E, P, w), u.remove(x);
|
|
965
965
|
} : g;
|
|
966
966
|
return u.remove(g), o[y ? "unshift" : "push"](x), ht(), x;
|
|
967
967
|
},
|
|
@@ -972,26 +972,26 @@ var he = {
|
|
|
972
972
|
}, u;
|
|
973
973
|
})(), ht = function() {
|
|
974
974
|
return !Pt && oe.wake();
|
|
975
|
-
}, S = {},
|
|
975
|
+
}, S = {}, ws = /^[\d.\-M][\d.\-,\s]/, Ps = /["']/g, Cs = 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
|
-
l = i[r], o = r !== s - 1 ? l.lastIndexOf(",") : l.length, c = l.substr(0, o), t[n] = isNaN(c) ? c.replace(
|
|
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
|
-
},
|
|
979
|
+
}, As = 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
982
|
}, Ts = function(e) {
|
|
983
983
|
var t = (e + "").split("("), i = S[t[0]];
|
|
984
|
-
return i && t.length > 1 && i.config ? i.config.apply(null, ~e.indexOf("{") ? [
|
|
985
|
-
},
|
|
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;
|
|
985
|
+
}, rr = function(e) {
|
|
986
986
|
return function(t) {
|
|
987
987
|
return 1 - e(1 - t);
|
|
988
988
|
};
|
|
989
|
-
},
|
|
989
|
+
}, sr = function a(e, t) {
|
|
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 && (
|
|
994
|
-
},
|
|
993
|
+
return e && (G(e) ? e : S[e] || Ts(e)) || t;
|
|
994
|
+
}, Xe = function(e, t, i, n) {
|
|
995
995
|
i === void 0 && (i = function(l) {
|
|
996
996
|
return 1 - t(1 - l);
|
|
997
997
|
}), n === void 0 && (n = function(l) {
|
|
@@ -1007,33 +1007,33 @@ var he = {
|
|
|
1007
1007
|
for (var l in r)
|
|
1008
1008
|
S[s + (l === "easeIn" ? ".in" : l === "easeOut" ? ".out" : ".inOut")] = S[o + "." + l] = r[l];
|
|
1009
1009
|
}), r;
|
|
1010
|
-
},
|
|
1010
|
+
}, ar = function(e) {
|
|
1011
1011
|
return function(t) {
|
|
1012
1012
|
return t < 0.5 ? (1 - e(1 - t * 2)) / 2 : 0.5 + e((t - 0.5) * 2) / 2;
|
|
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) *
|
|
1016
|
+
return h === 1 ? 1 : n * Math.pow(2, -10 * h) * ts((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);
|
|
1020
1020
|
return r = oi / r, l.config = function(c, h) {
|
|
1021
1021
|
return a(e, c, h);
|
|
1022
1022
|
}, l;
|
|
1023
|
-
},
|
|
1023
|
+
}, ei = function a(e, t) {
|
|
1024
1024
|
t === void 0 && (t = 1.70158);
|
|
1025
1025
|
var i = function(s) {
|
|
1026
1026
|
return s ? --s * s * ((t + 1) * s + t) + 1 : 0;
|
|
1027
1027
|
}, n = e === "out" ? i : e === "in" ? function(r) {
|
|
1028
1028
|
return 1 - i(1 - r);
|
|
1029
|
-
} :
|
|
1029
|
+
} : ar(i);
|
|
1030
1030
|
return n.config = function(r) {
|
|
1031
1031
|
return a(e, r);
|
|
1032
1032
|
}, n;
|
|
1033
1033
|
};
|
|
1034
1034
|
te("Linear,Quad,Cubic,Quart,Quint,Strong", function(a, e) {
|
|
1035
1035
|
var t = e < 5 ? e + 1 : e;
|
|
1036
|
-
|
|
1036
|
+
Xe(a + ",Power" + (t - 1), e ? function(i) {
|
|
1037
1037
|
return Math.pow(i, t);
|
|
1038
1038
|
} : function(i) {
|
|
1039
1039
|
return i;
|
|
@@ -1044,29 +1044,29 @@ te("Linear,Quad,Cubic,Quart,Quint,Strong", function(a, e) {
|
|
|
1044
1044
|
});
|
|
1045
1045
|
});
|
|
1046
1046
|
S.Linear.easeNone = S.none = S.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) {
|
|
1050
1050
|
return o < t ? a * o * o : o < i ? a * Math.pow(o - 1.5 / e, 2) + 0.75 : o < n ? a * (o -= 2.25 / e) * o + 0.9375 : a * Math.pow(o - 2.625 / e, 2) + 0.984375;
|
|
1051
1051
|
};
|
|
1052
|
-
|
|
1052
|
+
Xe("Bounce", function(s) {
|
|
1053
1053
|
return 1 - r(1 - s);
|
|
1054
1054
|
}, r);
|
|
1055
1055
|
})(7.5625, 2.75);
|
|
1056
|
-
|
|
1056
|
+
Xe("Expo", function(a) {
|
|
1057
1057
|
return Math.pow(2, 10 * (a - 1)) * a + a * a * a * a * a * a * (1 - a);
|
|
1058
1058
|
});
|
|
1059
|
-
|
|
1060
|
-
return -(
|
|
1059
|
+
Xe("Circ", function(a) {
|
|
1060
|
+
return -(Dn(1 - a * a) - 1);
|
|
1061
1061
|
});
|
|
1062
|
-
|
|
1063
|
-
return a === 1 ? 1 : -
|
|
1062
|
+
Xe("Sine", function(a) {
|
|
1063
|
+
return a === 1 ? 1 : -es(a * Qr) + 1;
|
|
1064
1064
|
});
|
|
1065
|
-
|
|
1065
|
+
Xe("Back", ei("in"), ei("out"), ei());
|
|
1066
1066
|
S.SteppedEase = S.steps = ce.SteppedEase = {
|
|
1067
1067
|
config: function(e, t) {
|
|
1068
1068
|
e === void 0 && (e = 1);
|
|
1069
|
-
var i = 1 / e, n = e + (t ? 0 : 1), r = t ? 1 : 0, s = 1 -
|
|
1069
|
+
var i = 1 / e, n = e + (t ? 0 : 1), r = t ? 1 : 0, s = 1 - k;
|
|
1070
1070
|
return function(o) {
|
|
1071
1071
|
return ((n * Dt(0, s, o) | 0) + r) * i;
|
|
1072
1072
|
};
|
|
@@ -1076,11 +1076,11 @@ st.ease = S["quad.out"];
|
|
|
1076
1076
|
te("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", function(a) {
|
|
1077
1077
|
return Ri += a + "," + a + "Params,";
|
|
1078
1078
|
});
|
|
1079
|
-
var
|
|
1080
|
-
this.id =
|
|
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
1081
|
}, Ct = /* @__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,
|
|
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();
|
|
1084
1084
|
}
|
|
1085
1085
|
var e = a.prototype;
|
|
1086
1086
|
return e.delay = function(i) {
|
|
@@ -1094,11 +1094,11 @@ var ar = function(e, t) {
|
|
|
1094
1094
|
return this._tTime;
|
|
1095
1095
|
var r = this._dp;
|
|
1096
1096
|
if (r && r.smoothChildTiming && this._ts) {
|
|
1097
|
-
for (
|
|
1097
|
+
for (Kt(this, i), !r._dp || r.parent || Vn(r, this); r && r.parent; )
|
|
1098
1098
|
r.parent._time !== r._start + (r._ts >= 0 ? r._tTime / r._ts : (r.totalDuration() - r._tTime) / -r._ts) && r.totalTime(r._tTime, !0), r = r.parent;
|
|
1099
1099
|
!this.parent && this._dp.autoRemoveChildren && (this._ts > 0 && i < this._tDur || this._ts < 0 && i > 0 || !this._tDur && !i) && ye(this._dp, this, this._start - this._delay);
|
|
1100
1100
|
}
|
|
1101
|
-
return (this._tTime !== i || !this._dur && !n || this._initted && Math.abs(this._zTime) ===
|
|
1101
|
+
return (this._tTime !== i || !this._dur && !n || this._initted && Math.abs(this._zTime) === k || !i && !this._initted && (this.add || this._ptLookup)) && (this._ts || (this._pTime = i), zn(this, i, n)), this;
|
|
1102
1102
|
}, e.time = function(i, n) {
|
|
1103
1103
|
return arguments.length ? this.totalTime(Math.min(this.totalDuration(), i + Qi(this)) % (this._dur + this._rDelay) || (i ? this._dur : 0), n) : this._time;
|
|
1104
1104
|
}, e.totalProgress = function(i, n) {
|
|
@@ -1110,13 +1110,13 @@ var ar = function(e, t) {
|
|
|
1110
1110
|
return arguments.length ? this.totalTime(this._time + (i - 1) * r, n) : this._repeat ? ot(this._tTime, r) + 1 : 1;
|
|
1111
1111
|
}, e.timeScale = function(i, n) {
|
|
1112
1112
|
if (!arguments.length)
|
|
1113
|
-
return this._rts === -
|
|
1113
|
+
return this._rts === -k ? 0 : this._rts;
|
|
1114
1114
|
if (this._rts === i)
|
|
1115
1115
|
return this;
|
|
1116
|
-
var r = this.parent && this._ts ?
|
|
1117
|
-
return this._rts = +i || 0, this._ts = this._ps || i === -
|
|
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);
|
|
1118
1118
|
}, e.paused = function(i) {
|
|
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) !==
|
|
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) {
|
|
1121
1121
|
if (arguments.length) {
|
|
1122
1122
|
this._start = i;
|
|
@@ -1128,11 +1128,11 @@ var ar = function(e, t) {
|
|
|
1128
1128
|
return this._start + (ee(i) ? this.totalDuration() : this.duration()) / Math.abs(this._ts || 1);
|
|
1129
1129
|
}, e.rawTime = function(i) {
|
|
1130
1130
|
var n = this.parent || this._dp;
|
|
1131
|
-
return n ? i && (!this._ts || this._repeat && this._time && this.totalProgress() < 1) ? this._tTime % (this._dur + this._rDelay) : this._ts ?
|
|
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 =
|
|
1134
|
-
var n =
|
|
1135
|
-
return
|
|
1133
|
+
i === void 0 && (i = rs);
|
|
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;
|
|
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;
|
|
@@ -1150,7 +1150,7 @@ var ar = function(e, t) {
|
|
|
1150
1150
|
}, e.seek = function(i, n) {
|
|
1151
1151
|
return this.totalTime(pe(this, i), ee(n));
|
|
1152
1152
|
}, e.restart = function(i, n) {
|
|
1153
|
-
return this.play().totalTime(i ? -this._delay : 0, ee(n)), this._dur || (this._zTime = -
|
|
1153
|
+
return this.play().totalTime(i ? -this._delay : 0, ee(n)), this._dur || (this._zTime = -k), this;
|
|
1154
1154
|
}, e.play = function(i, n) {
|
|
1155
1155
|
return i != null && this.seek(i, n), this.reversed(!1).paused(!1);
|
|
1156
1156
|
}, e.reverse = function(i, n) {
|
|
@@ -1160,21 +1160,21 @@ var ar = function(e, t) {
|
|
|
1160
1160
|
}, e.resume = function() {
|
|
1161
1161
|
return this.paused(!1);
|
|
1162
1162
|
}, e.reversed = function(i) {
|
|
1163
|
-
return arguments.length ? (!!i !== this.reversed() && this.timeScale(-this._rts || (i ? -
|
|
1163
|
+
return arguments.length ? (!!i !== this.reversed() && this.timeScale(-this._rts || (i ? -k : 0)), this) : this._rts < 0;
|
|
1164
1164
|
}, e.invalidate = function() {
|
|
1165
|
-
return this._initted = this._act = 0, this._zTime = -
|
|
1165
|
+
return this._initted = this._act = 0, this._zTime = -k, this;
|
|
1166
1166
|
}, e.isActive = function() {
|
|
1167
1167
|
var i = this.parent || this._dp, n = this._start, r;
|
|
1168
|
-
return !!(!i || this._ts && this._initted && i.isActive() && (r = i.rawTime(!0)) >= n && r < this.endTime(!0) -
|
|
1168
|
+
return !!(!i || this._ts && this._initted && i.isActive() && (r = i.rawTime(!0)) >= n && r < this.endTime(!0) - k);
|
|
1169
1169
|
}, e.eventCallback = function(i, n, r) {
|
|
1170
1170
|
var s = this.vars;
|
|
1171
1171
|
return arguments.length > 1 ? (n ? (s[i] = n, r && (s[i + "Params"] = r), i === "onUpdate" && (this._onUpdate = n)) : delete s[i], this) : s[i];
|
|
1172
1172
|
}, e.then = function(i) {
|
|
1173
1173
|
var n = this;
|
|
1174
1174
|
return new Promise(function(r) {
|
|
1175
|
-
var s =
|
|
1175
|
+
var s = G(i) ? i : $n, o = function() {
|
|
1176
1176
|
var c = n.then;
|
|
1177
|
-
n.then = null,
|
|
1177
|
+
n.then = null, G(s) && (s = s(n)) && (s.then || s === n) && (n.then = c), r(s), n.then = c;
|
|
1178
1178
|
};
|
|
1179
1179
|
n._initted && n.totalProgress() === 1 && n._ts >= 0 || !n._tTime && n._ts < 0 ? o() : n._prom = o;
|
|
1180
1180
|
});
|
|
@@ -1197,16 +1197,16 @@ ue(Ct.prototype, {
|
|
|
1197
1197
|
_ts: 1,
|
|
1198
1198
|
_dp: 0,
|
|
1199
1199
|
ratio: 0,
|
|
1200
|
-
_zTime: -
|
|
1200
|
+
_zTime: -k,
|
|
1201
1201
|
_prom: 0,
|
|
1202
1202
|
_ps: !1,
|
|
1203
1203
|
_rts: 1
|
|
1204
1204
|
});
|
|
1205
1205
|
var q = /* @__PURE__ */ (function(a) {
|
|
1206
|
-
|
|
1206
|
+
Sn(e, a);
|
|
1207
1207
|
function e(i, n) {
|
|
1208
1208
|
var r;
|
|
1209
|
-
return i === void 0 && (i = {}), r = a.call(this, i) || this, r.labels = {}, r.smoothChildTiming = !!i.smoothChildTiming, r.autoRemoveChildren = !!i.autoRemoveChildren, r._sort = ee(i.sortChildren),
|
|
1209
|
+
return i === void 0 && (i = {}), r = a.call(this, i) || this, r.labels = {}, r.smoothChildTiming = !!i.smoothChildTiming, r.autoRemoveChildren = !!i.autoRemoveChildren, r._sort = ee(i.sortChildren), z && ye(i.parent || z, we(r), n), i.reversed && r.reverse(), i.paused && r.paused(!0), i.scrollTrigger && Hn(we(r), i.scrollTrigger), r;
|
|
1210
1210
|
}
|
|
1211
1211
|
var t = e.prototype;
|
|
1212
1212
|
return t.to = function(n, r, s) {
|
|
@@ -1216,31 +1216,31 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1216
1216
|
}, t.fromTo = function(n, r, s, o) {
|
|
1217
1217
|
return xt(2, arguments, this), this;
|
|
1218
1218
|
}, t.set = function(n, r, s) {
|
|
1219
|
-
return r.duration = 0, r.parent = this, yt(r).repeatDelay || (r.repeat = 0), r.immediateRender = !!r.immediateRender, new
|
|
1219
|
+
return r.duration = 0, r.parent = this, yt(r).repeatDelay || (r.repeat = 0), r.immediateRender = !!r.immediateRender, new H(n, r, pe(this, s), 1), this;
|
|
1220
1220
|
}, t.call = function(n, r, s) {
|
|
1221
|
-
return ye(this,
|
|
1221
|
+
return ye(this, H.delayedCall(0, n, r), s);
|
|
1222
1222
|
}, t.staggerTo = function(n, r, s, o, l, c, h) {
|
|
1223
|
-
return s.duration = r, s.stagger = s.stagger || o, s.onComplete = c, s.onCompleteParams = h, s.parent = this, new
|
|
1223
|
+
return s.duration = r, s.stagger = s.stagger || o, s.onComplete = c, s.onCompleteParams = h, s.parent = this, new H(n, s, pe(this, l)), this;
|
|
1224
1224
|
}, t.staggerFrom = function(n, r, s, o, l, c, h) {
|
|
1225
1225
|
return s.runBackwards = 1, yt(s).immediateRender = ee(s.immediateRender), this.staggerTo(n, r, s, o, l, c, h);
|
|
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 :
|
|
1230
|
-
if (this !==
|
|
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;
|
|
1230
|
+
if (this !== z && h > l && n >= 0 && (h = l), h !== this._tTime || s || u) {
|
|
1231
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
1232
|
if (P = this._yoyo, g = c + this._rDelay, this._repeat < -1 && n < 0)
|
|
1233
1233
|
return this.totalTime(g * 100 + n, r, s);
|
|
1234
|
-
if (p =
|
|
1235
|
-
var C = P &&
|
|
1236
|
-
if (d <
|
|
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)
|
|
1237
1237
|
return this;
|
|
1238
|
-
if (c = this._dur, l = this._tDur,
|
|
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 && !_)
|
|
1239
1239
|
return this;
|
|
1240
|
-
|
|
1240
|
+
sr(this, w);
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
1243
|
-
if (this._hasPause && !this._forcing && this._lock < 2 && (y =
|
|
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))
|
|
1244
1244
|
return this;
|
|
1245
1245
|
if (p >= o && n >= 0)
|
|
1246
1246
|
for (m = this._first; m; ) {
|
|
@@ -1248,7 +1248,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1248
1248
|
if (m.parent !== this)
|
|
1249
1249
|
return this.render(n, r, s);
|
|
1250
1250
|
if (m.render(m._ts > 0 ? (p - m._start) * m._ts : (m._dirty ? m.totalDuration() : m._tDur) + (p - m._start) * m._ts, r, s), p !== this._time || !this._ts && !_) {
|
|
1251
|
-
y = 0, f && (h += this._zTime = -
|
|
1251
|
+
y = 0, f && (h += this._zTime = -k);
|
|
1252
1252
|
break;
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
@@ -1256,34 +1256,34 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1256
1256
|
}
|
|
1257
1257
|
else {
|
|
1258
1258
|
m = this._last;
|
|
1259
|
-
for (var
|
|
1260
|
-
if (f = m._prev, (m._act ||
|
|
1259
|
+
for (var T = n < 0 ? n : p; m; ) {
|
|
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 ? (
|
|
1264
|
-
y = 0, f && (h += this._zTime =
|
|
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 && !_) {
|
|
1264
|
+
y = 0, f && (h += this._zTime = T ? -k : k);
|
|
1265
1265
|
break;
|
|
1266
1266
|
}
|
|
1267
1267
|
}
|
|
1268
1268
|
m = f;
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
|
-
if (y && !r && (this.pause(), y.render(p >= o ? 0 : -
|
|
1272
|
-
return this._start = b,
|
|
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) &&
|
|
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())));
|
|
1274
1274
|
}
|
|
1275
1275
|
return this;
|
|
1276
1276
|
}, t.add = function(n, r) {
|
|
1277
1277
|
var s = this;
|
|
1278
1278
|
if (Ce(r) || (r = pe(this, r, n)), !(n instanceof Ct)) {
|
|
1279
|
-
if (
|
|
1279
|
+
if (W(n))
|
|
1280
1280
|
return n.forEach(function(o) {
|
|
1281
1281
|
return s.add(o, r);
|
|
1282
1282
|
}), this;
|
|
1283
1283
|
if (Z(n))
|
|
1284
1284
|
return this.addLabel(n, r);
|
|
1285
|
-
if (
|
|
1286
|
-
n =
|
|
1285
|
+
if (G(n))
|
|
1286
|
+
n = H.delayedCall(0, n);
|
|
1287
1287
|
else
|
|
1288
1288
|
return this;
|
|
1289
1289
|
}
|
|
@@ -1291,44 +1291,44 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1291
1291
|
}, t.getChildren = function(n, r, s, o) {
|
|
1292
1292
|
n === void 0 && (n = !0), r === void 0 && (r = !0), s === void 0 && (s = !0), o === void 0 && (o = -fe);
|
|
1293
1293
|
for (var l = [], c = this._first; c; )
|
|
1294
|
-
c._start >= o && (c instanceof
|
|
1294
|
+
c._start >= o && (c instanceof H ? r && l.push(c) : (s && l.push(c), n && l.push.apply(l, c.getChildren(!0, r, s)))), c = c._next;
|
|
1295
1295
|
return l;
|
|
1296
1296
|
}, t.getById = function(n) {
|
|
1297
1297
|
for (var r = this.getChildren(1, 1, 1), s = r.length; s--; )
|
|
1298
1298
|
if (r[s].vars.id === n)
|
|
1299
1299
|
return r[s];
|
|
1300
1300
|
}, t.remove = function(n) {
|
|
1301
|
-
return Z(n) ? this.removeLabel(n) :
|
|
1301
|
+
return Z(n) ? this.removeLabel(n) : G(n) ? this.killTweensOf(n) : (n.parent === this && Yt(this, n), n === this._recent && (this._recent = this._last), je(this));
|
|
1302
1302
|
}, t.totalTime = function(n, r) {
|
|
1303
|
-
return arguments.length ? (this._forcing = 1, !this._dp && this._ts && (this._start =
|
|
1303
|
+
return arguments.length ? (this._forcing = 1, !this._dp && this._ts && (this._start = j(oe.time - (this._ts > 0 ? n / this._ts : (this.totalDuration() - n) / -this._ts))), a.prototype.totalTime.call(this, n, r), this._forcing = 0, this) : this._tTime;
|
|
1304
1304
|
}, t.addLabel = function(n, r) {
|
|
1305
1305
|
return this.labels[n] = pe(this, r), this;
|
|
1306
1306
|
}, t.removeLabel = function(n) {
|
|
1307
1307
|
return delete this.labels[n], this;
|
|
1308
1308
|
}, t.addPause = function(n, r, s) {
|
|
1309
|
-
var o =
|
|
1309
|
+
var o = H.delayedCall(0, r || vt, s);
|
|
1310
1310
|
return o.data = "isPause", this._hasPause = 1, ye(this, o, pe(this, n));
|
|
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" &&
|
|
1314
|
+
r._start === n && r.data === "isPause" && Oe(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
1320
|
for (var s = [], o = me(n), l = this._first, c = Ce(r), h; l; )
|
|
1321
|
-
l instanceof
|
|
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;
|
|
1322
1322
|
return s;
|
|
1323
1323
|
}, t.tweenTo = function(n, r) {
|
|
1324
1324
|
r = r || {};
|
|
1325
|
-
var s = this, o = pe(s, n), l = r, c = l.startAt, h = l.onStart, u = l.onStartParams, p = l.immediateRender, m, f =
|
|
1325
|
+
var s = this, o = pe(s, n), l = r, c = l.startAt, h = l.onStart, u = l.onStartParams, p = l.immediateRender, m, f = H.to(s, ue({
|
|
1326
1326
|
ease: r.ease || "none",
|
|
1327
1327
|
lazy: !1,
|
|
1328
1328
|
immediateRender: !1,
|
|
1329
1329
|
time: o,
|
|
1330
1330
|
overwrite: "auto",
|
|
1331
|
-
duration: r.duration || Math.abs((o - (c && "time" in c ? c.time : s._time)) / s.timeScale()) ||
|
|
1331
|
+
duration: r.duration || Math.abs((o - (c && "time" in c ? c.time : s._time)) / s.timeScale()) || k,
|
|
1332
1332
|
onStart: function() {
|
|
1333
1333
|
if (s.pause(), !m) {
|
|
1334
1334
|
var g = r.duration || Math.abs((o - (c && "time" in c ? c.time : s._time)) / s.timeScale());
|
|
@@ -1351,7 +1351,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1351
1351
|
}, t.previousLabel = function(n) {
|
|
1352
1352
|
return n === void 0 && (n = this._time), en(this, pe(this, n), 1);
|
|
1353
1353
|
}, t.currentLabel = function(n) {
|
|
1354
|
-
return arguments.length ? this.seek(n, !0) : this.previousLabel(this._time +
|
|
1354
|
+
return arguments.length ? this.seek(n, !0) : this.previousLabel(this._time + k);
|
|
1355
1355
|
}, t.shiftChildren = function(n, r, s) {
|
|
1356
1356
|
s === void 0 && (s = 0);
|
|
1357
1357
|
for (var o = this._first, l = this.labels, c; o; )
|
|
@@ -1359,7 +1359,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1359
1359
|
if (r)
|
|
1360
1360
|
for (c in l)
|
|
1361
1361
|
l[c] >= s && (l[c] += n);
|
|
1362
|
-
return
|
|
1362
|
+
return je(this);
|
|
1363
1363
|
}, t.invalidate = function(n) {
|
|
1364
1364
|
var r = this._first;
|
|
1365
1365
|
for (this._lock = 0; r; )
|
|
@@ -1369,7 +1369,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1369
1369
|
n === void 0 && (n = !0);
|
|
1370
1370
|
for (var r = this._first, s; r; )
|
|
1371
1371
|
s = r._next, this.remove(r), r = s;
|
|
1372
|
-
return this._dp && (this._time = this._tTime = this._pTime = 0), n && (this.labels = {}),
|
|
1372
|
+
return this._dp && (this._time = this._tTime = this._pTime = 0), n && (this.labels = {}), je(this);
|
|
1373
1373
|
}, t.totalDuration = function(n) {
|
|
1374
1374
|
var r = 0, s = this, o = s._last, l = fe, c, h, u;
|
|
1375
1375
|
if (arguments.length)
|
|
@@ -1377,13 +1377,13 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1377
1377
|
if (s._dirty) {
|
|
1378
1378
|
for (u = s.parent; o; )
|
|
1379
1379
|
c = o._prev, o._dirty && o.totalDuration(), h = o._start, h > l && s._sort && o._ts && !s._lock ? (s._lock = 1, ye(s, o, h - o._delay, 1)._lock = 0) : l = h, h < 0 && o._ts && (r -= h, (!u && !s._dp || u && u.smoothChildTiming) && (s._start += h / s._ts, s._time -= h, s._tTime -= h), s.shiftChildren(-h, !1, -1 / 0), l = 0), o._end > r && o._ts && (r = o._end), o = c;
|
|
1380
|
-
lt(s, s ===
|
|
1380
|
+
lt(s, s === z && s._time > r ? s._time : r, 1, 1), s._dirty = 0;
|
|
1381
1381
|
}
|
|
1382
1382
|
return s._tDur;
|
|
1383
1383
|
}, e.updateRoot = function(n) {
|
|
1384
|
-
if (
|
|
1385
|
-
|
|
1386
|
-
var r =
|
|
1384
|
+
if (z._ts && (zn(z, Gt(n, z)), Fn = oe.frame), oe.frame >= Wi) {
|
|
1385
|
+
Wi += he.autoSleep || 120;
|
|
1386
|
+
var r = z._first;
|
|
1387
1387
|
if ((!r || !r._ts) && he.autoSleep && oe._listeners.length < 2) {
|
|
1388
1388
|
for (; r && !r._ts; )
|
|
1389
1389
|
r = r._next;
|
|
@@ -1397,9 +1397,9 @@ ue(q.prototype, {
|
|
|
1397
1397
|
_hasPause: 0,
|
|
1398
1398
|
_forcing: 0
|
|
1399
1399
|
});
|
|
1400
|
-
var
|
|
1401
|
-
var l = new ie(this._pt, e, t, 0, 1,
|
|
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(
|
|
1400
|
+
var Ss = function(e, t, i, n, r, s, o) {
|
|
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
|
+
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 = {
|
|
1404
1404
|
_next: l._pt,
|
|
1405
1405
|
p: d || h === 1 ? d : ",",
|
|
@@ -1407,31 +1407,31 @@ var As = function(e, t, i, n, r, s, o) {
|
|
|
1407
1407
|
s: g,
|
|
1408
1408
|
c: f.charAt(1) === "=" ? it(g, f) - g : parseFloat(f) - g,
|
|
1409
1409
|
m: m && m < 4 ? Math.round : 0
|
|
1410
|
-
}, c =
|
|
1411
|
-
return l.c = c < n.length ? n.substring(c, n.length) : "", l.fp = o, (
|
|
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;
|
|
1412
1412
|
}, Li = function(e, t, i, n, r, s, o, l, c, h) {
|
|
1413
|
-
|
|
1414
|
-
var u = e[t], p = i !== "get" ? i :
|
|
1415
|
-
if (Z(n) && (~n.indexOf("random(") && (n = wt(n)), n.charAt(1) === "=" && (f = it(p, n) + (
|
|
1416
|
-
return !isNaN(p * n) && n !== "" ? (f = new ie(this._pt, e, t, +p || 0, n - (p || 0), typeof u == "boolean" ?
|
|
1417
|
-
},
|
|
1418
|
-
if (
|
|
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;
|
|
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) {
|
|
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;
|
|
1421
1421
|
for (o in e)
|
|
1422
1422
|
s[o] = bt(e[o], r, t, i, n);
|
|
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] :
|
|
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))
|
|
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
|
-
},
|
|
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,
|
|
1432
|
-
if (b && (!p || !r) && (r = "none"), e._ease = Ye(r, st.ease), e._yEase = u ?
|
|
1433
|
-
if (
|
|
1434
|
-
if (
|
|
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({
|
|
1435
1435
|
data: "isStart",
|
|
1436
1436
|
overwrite: !1,
|
|
1437
1437
|
parent: _,
|
|
@@ -1443,7 +1443,7 @@ var As = function(e, t, i, n, r, s, o) {
|
|
|
1443
1443
|
return le(e, "onUpdate");
|
|
1444
1444
|
},
|
|
1445
1445
|
stagger: 0
|
|
1446
|
-
}, s))), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (
|
|
1446
|
+
}, s))), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (K || !o && !m) && e._startAt.revert(kt), o && f && t <= 0 && i <= 0) {
|
|
1447
1447
|
t && (e._zTime = t);
|
|
1448
1448
|
return;
|
|
1449
1449
|
}
|
|
@@ -1458,23 +1458,23 @@ var As = 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
|
-
},
|
|
1462
|
-
a(e._startAt,
|
|
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)
|
|
1462
|
+
a(e._startAt, k, k);
|
|
1463
1463
|
else if (!t)
|
|
1464
1464
|
return;
|
|
1465
1465
|
}
|
|
1466
1466
|
for (e._pt = e._ptCache = 0, l = f && ee(l) || l && !f, P = 0; P < g.length; P++) {
|
|
1467
|
-
if (
|
|
1468
|
-
|
|
1469
|
-
}), R.priority && (
|
|
1470
|
-
for (w in
|
|
1471
|
-
ae[w] && (R =
|
|
1472
|
-
e._op && e._op[P] && e.kill(
|
|
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;
|
|
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);
|
|
1473
1473
|
}
|
|
1474
|
-
|
|
1474
|
+
T && fr(e), e._onInit && e._onInit(e);
|
|
1475
1475
|
}
|
|
1476
1476
|
e._onUpdate = c, e._initted = (!e._op || e._pt) && !U, p && t <= 0 && b.render(fe, !0, !0);
|
|
1477
|
-
},
|
|
1477
|
+
}, Ms = 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--; ) {
|
|
@@ -1482,13 +1482,13 @@ var As = function(e, t, i, n, r, s, o) {
|
|
|
1482
1482
|
for (h = h.d._pt; h && h.p !== t && h.fp !== t; )
|
|
1483
1483
|
h = h._next;
|
|
1484
1484
|
if (!h)
|
|
1485
|
-
return gi = 1, e.vars[t] = "+=0",
|
|
1485
|
+
return gi = 1, e.vars[t] = "+=0", ki(e, o), gi = 0, l ? Et(t + " not eligible for reset") : 1;
|
|
1486
1486
|
c.push(h);
|
|
1487
1487
|
}
|
|
1488
1488
|
for (m = c.length; m--; )
|
|
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 =
|
|
1490
|
-
},
|
|
1491
|
-
var i = e[0] ?
|
|
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) {
|
|
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;
|
|
1494
1494
|
r = at({}, t);
|
|
@@ -1497,9 +1497,9 @@ var As = function(e, t, i, n, r, s, o) {
|
|
|
1497
1497
|
for (l = n[s].split(","), o = l.length; o--; )
|
|
1498
1498
|
r[l[o]] = r[s];
|
|
1499
1499
|
return r;
|
|
1500
|
-
},
|
|
1500
|
+
}, Is = function(e, t, i, n) {
|
|
1501
1501
|
var r = t.ease || n || "power1.inOut", s, o;
|
|
1502
|
-
if (
|
|
1502
|
+
if (W(t))
|
|
1503
1503
|
o = i[e] || (i[e] = []), t.forEach(function(l, c) {
|
|
1504
1504
|
return o.push({
|
|
1505
1505
|
t: c / (t.length - 1) * 100,
|
|
@@ -1515,50 +1515,50 @@ var As = function(e, t, i, n, r, s, o) {
|
|
|
1515
1515
|
e: r
|
|
1516
1516
|
});
|
|
1517
1517
|
}, bt = function(e, t, i, n, r) {
|
|
1518
|
-
return
|
|
1519
|
-
},
|
|
1520
|
-
te(
|
|
1521
|
-
return
|
|
1518
|
+
return G(e) ? e.call(t, i, n, r) : Z(e) && ~e.indexOf("random(") ? wt(e) : e;
|
|
1519
|
+
}, hr = Ri + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert", cr = {};
|
|
1520
|
+
te(hr + ",id,stagger,delay,duration,paused,scrollTrigger", function(a) {
|
|
1521
|
+
return cr[a] = 1;
|
|
1522
1522
|
});
|
|
1523
|
-
var
|
|
1524
|
-
|
|
1523
|
+
var H = /* @__PURE__ */ (function(a) {
|
|
1524
|
+
Sn(e, 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 ||
|
|
1529
|
-
if (o._targets = x.length ?
|
|
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
1530
|
if (n = o.vars, b = o.timeline = new q({
|
|
1531
1531
|
data: "nested",
|
|
1532
1532
|
defaults: d || {},
|
|
1533
1533
|
targets: y && y.data === "nested" ? y.vars.targets : x
|
|
1534
1534
|
}), b.kill(), b.parent = b._dp = we(o), b._start = 0, p || Rt(c) || Rt(h)) {
|
|
1535
|
-
if (w = x.length,
|
|
1535
|
+
if (w = x.length, T = p && Kn(p), Ee(p))
|
|
1536
1536
|
for (C in p)
|
|
1537
|
-
~
|
|
1538
|
-
for (
|
|
1539
|
-
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
1540
|
b.duration() ? c = h = 0 : o.timeline = 0;
|
|
1541
1541
|
} else if (f) {
|
|
1542
1542
|
yt(ue(b.vars.defaults, {
|
|
1543
1543
|
ease: "none"
|
|
1544
1544
|
})), b._ease = Ye(f.ease || n.ease || "none");
|
|
1545
|
-
var
|
|
1546
|
-
if (
|
|
1545
|
+
var A = 0, R, I, $;
|
|
1546
|
+
if (W(f))
|
|
1547
1547
|
f.forEach(function(F) {
|
|
1548
1548
|
return b.to(x, F, ">");
|
|
1549
1549
|
}), b.duration();
|
|
1550
1550
|
else {
|
|
1551
1551
|
P = {};
|
|
1552
1552
|
for (C in f)
|
|
1553
|
-
C === "ease" || C === "easeEach" ||
|
|
1553
|
+
C === "ease" || C === "easeEach" || Is(C, f[C], P, f.easeEach);
|
|
1554
1554
|
for (C in P)
|
|
1555
1555
|
for (R = P[C].sort(function(F, U) {
|
|
1556
1556
|
return F.t - U.t;
|
|
1557
|
-
}),
|
|
1558
|
-
|
|
1559
|
-
ease:
|
|
1560
|
-
duration: (
|
|
1561
|
-
},
|
|
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
1562
|
b.duration() < c && b.to({}, {
|
|
1563
1563
|
duration: c - b.duration()
|
|
1564
1564
|
});
|
|
@@ -1567,20 +1567,20 @@ var j = /* @__PURE__ */ (function(a) {
|
|
|
1567
1567
|
c || o.duration(c = b.duration());
|
|
1568
1568
|
} else
|
|
1569
1569
|
o.timeline = 0;
|
|
1570
|
-
return m === !0 && !Ci && (
|
|
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;
|
|
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 -
|
|
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;
|
|
1575
1575
|
if (!c)
|
|
1576
|
-
|
|
1576
|
+
us(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 =
|
|
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)
|
|
1582
1582
|
return this._tTime = u, this;
|
|
1583
|
-
f !== g && (x && this._yEase &&
|
|
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
|
}
|
|
1585
1585
|
if (!this._initted) {
|
|
1586
1586
|
if (jn(this, h ? n : p, s, r, u))
|
|
@@ -1594,7 +1594,7 @@ var j = /* @__PURE__ */ (function(a) {
|
|
|
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) &&
|
|
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()));
|
|
1598
1598
|
}
|
|
1599
1599
|
return this;
|
|
1600
1600
|
}, t.targets = function() {
|
|
@@ -1604,24 +1604,24 @@ var j = /* @__PURE__ */ (function(a) {
|
|
|
1604
1604
|
}, t.resetTo = function(n, r, s, o, l) {
|
|
1605
1605
|
Pt || 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 ||
|
|
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));
|
|
1608
1608
|
}, t.kill = function(n, r) {
|
|
1609
1609
|
if (r === void 0 && (r = "all"), !n && (!r || r === "all"))
|
|
1610
|
-
return this._lazy = this._pt = 0, this.parent ? mt(this) : this.scrollTrigger && this.scrollTrigger.kill(!!
|
|
1610
|
+
return this._lazy = this._pt = 0, this.parent ? mt(this) : this.scrollTrigger && this.scrollTrigger.kill(!!K), this;
|
|
1611
1611
|
if (this.timeline) {
|
|
1612
1612
|
var s = this.timeline.totalDuration();
|
|
1613
|
-
return this.timeline.killTweensOf(n, r,
|
|
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") &&
|
|
1616
|
+
if ((!r || r === "all") && os(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 =
|
|
1620
|
+
}), r = d), r = Rs(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)
|
|
1624
|
-
g = p && p[d], g && ((!("kill" in g.d) || g.d.kill(d) === !0) &&
|
|
1624
|
+
g = p && p[d], g && ((!("kill" in g.d) || g.d.kill(d) === !0) && Yt(this, g, "_pt"), delete p[d]), m !== "all" && (m[d] = 1);
|
|
1625
1625
|
}
|
|
1626
1626
|
return this._initted && !this._pt && h && mt(this), this;
|
|
1627
1627
|
}, e.to = function(n, r) {
|
|
@@ -1645,10 +1645,10 @@ var j = /* @__PURE__ */ (function(a) {
|
|
|
1645
1645
|
}, e.set = function(n, r) {
|
|
1646
1646
|
return r.duration = 0, r.repeatDelay || (r.repeat = 0), new e(n, r);
|
|
1647
1647
|
}, e.killTweensOf = function(n, r, s) {
|
|
1648
|
-
return
|
|
1648
|
+
return z.killTweensOf(n, r, s);
|
|
1649
1649
|
}, e;
|
|
1650
1650
|
})(Ct);
|
|
1651
|
-
ue(
|
|
1651
|
+
ue(H.prototype, {
|
|
1652
1652
|
_targets: [],
|
|
1653
1653
|
_lazy: 0,
|
|
1654
1654
|
_startAt: 0,
|
|
@@ -1656,26 +1656,26 @@ ue(j.prototype, {
|
|
|
1656
1656
|
_onInit: 0
|
|
1657
1657
|
});
|
|
1658
1658
|
te("staggerTo,staggerFrom,staggerFromTo", function(a) {
|
|
1659
|
-
|
|
1659
|
+
H[a] = function() {
|
|
1660
1660
|
var e = new q(), t = pi.call(arguments, 0);
|
|
1661
1661
|
return t.splice(a === "staggerFromTo" ? 5 : 4, 0, 0), e[a].apply(e, t);
|
|
1662
1662
|
};
|
|
1663
1663
|
});
|
|
1664
1664
|
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
1668
|
}, Os = function(e, t, i, n) {
|
|
1669
1669
|
return e[t](n.fp, i);
|
|
1670
|
-
},
|
|
1670
|
+
}, Ls = function(e, t, i) {
|
|
1671
1671
|
return e.setAttribute(t, i);
|
|
1672
1672
|
}, Fi = function(e, t) {
|
|
1673
|
-
return
|
|
1674
|
-
},
|
|
1673
|
+
return G(e[t]) ? ur : Ai(e[t]) && e.setAttribute ? Ls : Ui;
|
|
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
|
-
},
|
|
1676
|
+
}, ks = 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 = "";
|
|
1680
1680
|
if (!e && t.b)
|
|
1681
1681
|
n = t.b;
|
|
@@ -1687,19 +1687,19 @@ var Ui = function(e, t, i) {
|
|
|
1687
1687
|
n += t.c;
|
|
1688
1688
|
}
|
|
1689
1689
|
t.set(t.t, t.p, n, t);
|
|
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
|
-
},
|
|
1693
|
+
}, Us = 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
|
-
},
|
|
1696
|
+
}, Fs = function(e) {
|
|
1697
1697
|
for (var t = this._pt, i, n; t; )
|
|
1698
|
-
n = t._next, t.p === e && !t.op || t.op === e ?
|
|
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
|
-
},
|
|
1700
|
+
}, Ns = 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; ) {
|
|
1704
1704
|
for (i = t._next, n = r; n && n.pr > t.pr; )
|
|
1705
1705
|
n = n._next;
|
|
@@ -1708,63 +1708,63 @@ var Ui = function(e, t, i) {
|
|
|
1708
1708
|
e._pt = r;
|
|
1709
1709
|
}, ie = /* @__PURE__ */ (function() {
|
|
1710
1710
|
function a(t, i, n, r, s, o, l, c, h) {
|
|
1711
|
-
this.t = i, this.s = r, this.c = s, this.p = n, this.r = o ||
|
|
1711
|
+
this.t = i, this.s = r, this.c = s, this.p = n, this.r = o || dr, this.d = l || this, this.set = c || Ui, this.pr = h || 0, this._next = t, t && (t._prev = this);
|
|
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 =
|
|
1715
|
+
this.mSet = this.mSet || this.set, this.set = Ns, 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) {
|
|
1719
1719
|
return Mi[a] = 1;
|
|
1720
1720
|
});
|
|
1721
|
-
ce.TweenMax = ce.TweenLite =
|
|
1721
|
+
ce.TweenMax = ce.TweenLite = H;
|
|
1722
1722
|
ce.TimelineLite = ce.TimelineMax = q;
|
|
1723
|
-
|
|
1723
|
+
z = new q({
|
|
1724
1724
|
sortChildren: !1,
|
|
1725
1725
|
defaults: st,
|
|
1726
1726
|
autoRemoveChildren: !0,
|
|
1727
1727
|
id: "root",
|
|
1728
1728
|
smoothChildTiming: !0
|
|
1729
1729
|
});
|
|
1730
|
-
he.stringFilter =
|
|
1731
|
-
var Ze = [],
|
|
1732
|
-
return (
|
|
1730
|
+
he.stringFilter = nr;
|
|
1731
|
+
var Ze = [], Ft = {}, zs = [], nn = 0, Bs = 0, ti = function(e) {
|
|
1732
|
+
return (Ft[e] || zs).map(function(t) {
|
|
1733
1733
|
return t();
|
|
1734
1734
|
});
|
|
1735
1735
|
}, _i = function() {
|
|
1736
1736
|
var e = Date.now(), t = [];
|
|
1737
|
-
e - nn > 2 && (
|
|
1737
|
+
e - nn > 2 && (ti("matchMediaInit"), Ze.forEach(function(i) {
|
|
1738
1738
|
var n = i.queries, r = i.conditions, s, o, l, c;
|
|
1739
1739
|
for (o in n)
|
|
1740
1740
|
s = _e.matchMedia(n[o]).matches, s && (l = 1), s !== r[o] && (r[o] = s, c = 1);
|
|
1741
1741
|
c && (i.revert(), l && t.push(i));
|
|
1742
|
-
}),
|
|
1742
|
+
}), ti("matchMediaRevert"), t.forEach(function(i) {
|
|
1743
1743
|
return i.onMatch(i, function(n) {
|
|
1744
1744
|
return i.add(null, n);
|
|
1745
1745
|
});
|
|
1746
|
-
}), nn = e,
|
|
1747
|
-
},
|
|
1746
|
+
}), nn = e, ti("matchMedia"));
|
|
1747
|
+
}, mr = /* @__PURE__ */ (function() {
|
|
1748
1748
|
function a(t, i) {
|
|
1749
|
-
this.selector = i && fi(i), this.data = [], this._r = [], this.isReverted = !1, this.id =
|
|
1749
|
+
this.selector = i && fi(i), this.data = [], this._r = [], this.isReverted = !1, this.id = Bs++, t && this.add(t);
|
|
1750
1750
|
}
|
|
1751
1751
|
var e = a.prototype;
|
|
1752
1752
|
return e.add = function(i, n, r) {
|
|
1753
|
-
|
|
1753
|
+
G(i) && (r = n, n = i, i = G);
|
|
1754
1754
|
var s = this, o = function() {
|
|
1755
|
-
var c =
|
|
1756
|
-
return c && c !== s && c.data.push(s), r && (s.selector = fi(r)),
|
|
1755
|
+
var c = N, h = s.selector, u;
|
|
1756
|
+
return c && c !== s && c.data.push(s), r && (s.selector = fi(r)), N = s, u = n.apply(s, arguments), G(u) && s._r.push(u), N = c, s.selector = h, s.isReverted = !1, u;
|
|
1757
1757
|
};
|
|
1758
|
-
return s.last = o, i ===
|
|
1758
|
+
return s.last = o, i === G ? o(s, function(l) {
|
|
1759
1759
|
return s.add(null, l);
|
|
1760
1760
|
}) : i ? s[i] = o : o;
|
|
1761
1761
|
}, e.ignore = function(i) {
|
|
1762
|
-
var n =
|
|
1763
|
-
|
|
1762
|
+
var n = N;
|
|
1763
|
+
N = null, i(this), N = n;
|
|
1764
1764
|
}, e.getTweens = function() {
|
|
1765
1765
|
var i = [];
|
|
1766
1766
|
return this.data.forEach(function(n) {
|
|
1767
|
-
return n instanceof a ? i.push.apply(i, n.getTweens()) : n instanceof
|
|
1767
|
+
return n instanceof a ? i.push.apply(i, n.getTweens()) : n instanceof H && !(n.parent && n.parent.data === "nested") && i.push(n);
|
|
1768
1768
|
}), i;
|
|
1769
1769
|
}, e.clear = function() {
|
|
1770
1770
|
this._r.length = this.data.length = 0;
|
|
@@ -1785,7 +1785,7 @@ var Ze = [], It = {}, zs = [], nn = 0, Ns = 0, Jt = function(e) {
|
|
|
1785
1785
|
}).forEach(function(h) {
|
|
1786
1786
|
return h.t.revert(i);
|
|
1787
1787
|
}), l = r.data.length; l--; )
|
|
1788
|
-
c = r.data[l], c instanceof q ? c.data !== "nested" && (c.scrollTrigger && c.scrollTrigger.revert(), c.kill()) : !(c instanceof
|
|
1788
|
+
c = r.data[l], c instanceof q ? c.data !== "nested" && (c.scrollTrigger && c.scrollTrigger.revert(), c.kill()) : !(c instanceof H) && c.revert && c.revert(i);
|
|
1789
1789
|
r._r.forEach(function(h) {
|
|
1790
1790
|
return h(i, r);
|
|
1791
1791
|
}), r.isReverted = !0;
|
|
@@ -1799,15 +1799,15 @@ var Ze = [], It = {}, zs = [], nn = 0, Ns = 0, Jt = function(e) {
|
|
|
1799
1799
|
}, a;
|
|
1800
1800
|
})(), $s = /* @__PURE__ */ (function() {
|
|
1801
1801
|
function a(t) {
|
|
1802
|
-
this.contexts = [], this.scope = t,
|
|
1802
|
+
this.contexts = [], this.scope = t, N && N.data.push(this);
|
|
1803
1803
|
}
|
|
1804
1804
|
var e = a.prototype;
|
|
1805
1805
|
return e.add = function(i, n, r) {
|
|
1806
|
-
|
|
1806
|
+
Ee(i) || (i = {
|
|
1807
1807
|
matches: i
|
|
1808
1808
|
});
|
|
1809
|
-
var s = new
|
|
1810
|
-
|
|
1809
|
+
var s = new mr(0, r || this.scope), o = s.conditions = {}, l, c, h;
|
|
1810
|
+
N && !s.selector && (s.selector = N.selector), this.contexts.push(s), n = s.add("onMatch", n), s.queries = i;
|
|
1811
1811
|
for (c in i)
|
|
1812
1812
|
c === "all" ? h = 1 : (l = _e.matchMedia(i[c]), l && (Ze.indexOf(s) < 0 && Ze.push(s), (o[c] = l.matches) && (h = 1), l.addListener ? l.addListener(_i) : l.addEventListener("change", _i)));
|
|
1813
1813
|
return h && n(s, function(u) {
|
|
@@ -1820,23 +1820,23 @@ var Ze = [], It = {}, zs = [], nn = 0, Ns = 0, Jt = function(e) {
|
|
|
1820
1820
|
return n.kill(i, !0);
|
|
1821
1821
|
});
|
|
1822
1822
|
}, a;
|
|
1823
|
-
})(),
|
|
1823
|
+
})(), Vt = {
|
|
1824
1824
|
registerPlugin: function() {
|
|
1825
1825
|
for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
|
|
1826
1826
|
t[i] = arguments[i];
|
|
1827
1827
|
t.forEach(function(n) {
|
|
1828
|
-
return
|
|
1828
|
+
return er(n);
|
|
1829
1829
|
});
|
|
1830
1830
|
},
|
|
1831
1831
|
timeline: function(e) {
|
|
1832
1832
|
return new q(e);
|
|
1833
1833
|
},
|
|
1834
1834
|
getTweensOf: function(e, t) {
|
|
1835
|
-
return
|
|
1835
|
+
return z.getTweensOf(e, t);
|
|
1836
1836
|
},
|
|
1837
1837
|
getProperty: function(e, t, i, n) {
|
|
1838
1838
|
Z(e) && (e = me(e)[0]);
|
|
1839
|
-
var r =
|
|
1839
|
+
var r = He(e || {}).get, s = i ? $n : Bn;
|
|
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
|
});
|
|
@@ -1852,9 +1852,9 @@ var Ze = [], It = {}, zs = [], nn = 0, Ns = 0, Jt = function(e) {
|
|
|
1852
1852
|
};
|
|
1853
1853
|
}
|
|
1854
1854
|
e = e[0] || {};
|
|
1855
|
-
var s = ae[t], o =
|
|
1855
|
+
var s = ae[t], o = He(e), l = o.harness && (o.harness.aliases || {})[t] || t, c = s ? function(h) {
|
|
1856
1856
|
var u = new s();
|
|
1857
|
-
et._pt = 0, u.init(e, i ? h + i : h, et, 0, [e]), u.render(1, u), et._pt &&
|
|
1857
|
+
et._pt = 0, u.init(e, i ? h + i : h, et, 0, [e]), u.render(1, u), et._pt && Ni(1, et);
|
|
1858
1858
|
} : o.set(e, l);
|
|
1859
1859
|
return s ? c : function(h) {
|
|
1860
1860
|
return c(e, l, i ? h + i : h, o, 1);
|
|
@@ -1867,7 +1867,7 @@ var Ze = [], It = {}, zs = [], nn = 0, Ns = 0, Jt = function(e) {
|
|
|
1867
1867
|
return s.tween = r, s;
|
|
1868
1868
|
},
|
|
1869
1869
|
isTweening: function(e) {
|
|
1870
|
-
return
|
|
1870
|
+
return z.getTweensOf(e, !0).length > 0;
|
|
1871
1871
|
},
|
|
1872
1872
|
defaults: function(e) {
|
|
1873
1873
|
return e && e.ease && (e.ease = Ye(e.ease, st.ease)), qi(st, e || {});
|
|
@@ -1878,11 +1878,11 @@ var Ze = [], It = {}, zs = [], nn = 0, Ns = 0, Jt = function(e) {
|
|
|
1878
1878
|
registerEffect: function(e) {
|
|
1879
1879
|
var t = e.name, i = e.effect, n = e.plugins, r = e.defaults, s = e.extendTimeline;
|
|
1880
1880
|
(n || "").split(",").forEach(function(o) {
|
|
1881
|
-
return o && !ae[o] && !ce[o] &&
|
|
1882
|
-
}),
|
|
1881
|
+
return o && !ae[o] && !ce[o] && Et(t + " effect requires " + o + " plugin.");
|
|
1882
|
+
}), qt[t] = function(o, l, c) {
|
|
1883
1883
|
return i(me(o), ue(l || {}, r), c);
|
|
1884
1884
|
}, s && (q.prototype[t] = function(o, l, c) {
|
|
1885
|
-
return this.add(
|
|
1885
|
+
return this.add(qt[t](o, Ee(l) ? l : (c = l) && {}, this), c);
|
|
1886
1886
|
});
|
|
1887
1887
|
},
|
|
1888
1888
|
registerEase: function(e, t) {
|
|
@@ -1892,17 +1892,17 @@ var Ze = [], It = {}, zs = [], nn = 0, Ns = 0, Jt = function(e) {
|
|
|
1892
1892
|
return arguments.length ? Ye(e, t) : S;
|
|
1893
1893
|
},
|
|
1894
1894
|
getById: function(e) {
|
|
1895
|
-
return
|
|
1895
|
+
return z.getById(e);
|
|
1896
1896
|
},
|
|
1897
1897
|
exportRoot: function(e, t) {
|
|
1898
1898
|
e === void 0 && (e = {});
|
|
1899
1899
|
var i = new q(e), n, r;
|
|
1900
|
-
for (i.smoothChildTiming = ee(e.smoothChildTiming),
|
|
1901
|
-
r = n._next, (t || !(!n._dur && n instanceof
|
|
1902
|
-
return ye(
|
|
1900
|
+
for (i.smoothChildTiming = ee(e.smoothChildTiming), z.remove(i), i._dp = 0, i._time = i._tTime = z._time, n = z._first; n; )
|
|
1901
|
+
r = n._next, (t || !(!n._dur && n instanceof H && n.vars.onComplete === n._targets[0])) && ye(i, n, n._start - n._delay), n = r;
|
|
1902
|
+
return ye(z, i, 0), i;
|
|
1903
1903
|
},
|
|
1904
1904
|
context: function(e, t) {
|
|
1905
|
-
return e ? new
|
|
1905
|
+
return e ? new mr(e, t) : N;
|
|
1906
1906
|
},
|
|
1907
1907
|
matchMedia: function(e) {
|
|
1908
1908
|
return new $s(e);
|
|
@@ -1916,50 +1916,50 @@ var Ze = [], It = {}, zs = [], nn = 0, Ns = 0, Jt = function(e) {
|
|
|
1916
1916
|
}) || _i();
|
|
1917
1917
|
},
|
|
1918
1918
|
addEventListener: function(e, t) {
|
|
1919
|
-
var i =
|
|
1919
|
+
var i = Ft[e] || (Ft[e] = []);
|
|
1920
1920
|
~i.indexOf(t) || i.push(t);
|
|
1921
1921
|
},
|
|
1922
1922
|
removeEventListener: function(e, t) {
|
|
1923
|
-
var i =
|
|
1923
|
+
var i = Ft[e], n = i && i.indexOf(t);
|
|
1924
1924
|
n >= 0 && i.splice(n, 1);
|
|
1925
1925
|
},
|
|
1926
1926
|
utils: {
|
|
1927
|
-
wrap:
|
|
1928
|
-
wrapYoyo:
|
|
1929
|
-
distribute:
|
|
1927
|
+
wrap: xs,
|
|
1928
|
+
wrapYoyo: bs,
|
|
1929
|
+
distribute: Kn,
|
|
1930
1930
|
random: Wn,
|
|
1931
1931
|
snap: Xn,
|
|
1932
|
-
normalize:
|
|
1933
|
-
getUnit:
|
|
1934
|
-
clamp:
|
|
1935
|
-
splitColor:
|
|
1932
|
+
normalize: ys,
|
|
1933
|
+
getUnit: X,
|
|
1934
|
+
clamp: fs,
|
|
1935
|
+
splitColor: tr,
|
|
1936
1936
|
toArray: me,
|
|
1937
1937
|
selector: fi,
|
|
1938
|
-
mapRange:
|
|
1939
|
-
pipe:
|
|
1940
|
-
unitize:
|
|
1941
|
-
interpolate:
|
|
1942
|
-
shuffle:
|
|
1938
|
+
mapRange: Qn,
|
|
1939
|
+
pipe: gs,
|
|
1940
|
+
unitize: _s,
|
|
1941
|
+
interpolate: Es,
|
|
1942
|
+
shuffle: Zn
|
|
1943
1943
|
},
|
|
1944
|
-
install:
|
|
1945
|
-
effects:
|
|
1944
|
+
install: kn,
|
|
1945
|
+
effects: qt,
|
|
1946
1946
|
ticker: oe,
|
|
1947
1947
|
updateRoot: q.updateRoot,
|
|
1948
1948
|
plugins: ae,
|
|
1949
|
-
globalTimeline:
|
|
1949
|
+
globalTimeline: z,
|
|
1950
1950
|
core: {
|
|
1951
1951
|
PropTween: ie,
|
|
1952
|
-
globals:
|
|
1953
|
-
Tween:
|
|
1952
|
+
globals: Un,
|
|
1953
|
+
Tween: H,
|
|
1954
1954
|
Timeline: q,
|
|
1955
1955
|
Animation: Ct,
|
|
1956
|
-
getCache:
|
|
1957
|
-
_removeLinkedListItem:
|
|
1956
|
+
getCache: He,
|
|
1957
|
+
_removeLinkedListItem: Yt,
|
|
1958
1958
|
reverting: function() {
|
|
1959
|
-
return
|
|
1959
|
+
return K;
|
|
1960
1960
|
},
|
|
1961
1961
|
context: function(e) {
|
|
1962
|
-
return e &&
|
|
1962
|
+
return e && N && (N.data.push(e), e._ctx = N), N;
|
|
1963
1963
|
},
|
|
1964
1964
|
suppressOverwrites: function(e) {
|
|
1965
1965
|
return Ci = e;
|
|
@@ -1967,13 +1967,13 @@ var Ze = [], It = {}, zs = [], nn = 0, Ns = 0, Jt = function(e) {
|
|
|
1967
1967
|
}
|
|
1968
1968
|
};
|
|
1969
1969
|
te("to,from,fromTo,delayedCall,set,killTweensOf", function(a) {
|
|
1970
|
-
return
|
|
1970
|
+
return Vt[a] = H[a];
|
|
1971
1971
|
});
|
|
1972
1972
|
oe.add(q.updateRoot);
|
|
1973
|
-
et =
|
|
1973
|
+
et = Vt.to({}, {
|
|
1974
1974
|
duration: 0
|
|
1975
1975
|
});
|
|
1976
|
-
var
|
|
1976
|
+
var Gs = 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;
|
|
@@ -1981,8 +1981,8 @@ var Bs = 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 =
|
|
1985
|
-
},
|
|
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));
|
|
1985
|
+
}, ii = function(e, t) {
|
|
1986
1986
|
return {
|
|
1987
1987
|
name: e,
|
|
1988
1988
|
headless: 1,
|
|
@@ -2003,7 +2003,7 @@ var Bs = function(e, t) {
|
|
|
2003
2003
|
};
|
|
2004
2004
|
}
|
|
2005
2005
|
};
|
|
2006
|
-
}, re =
|
|
2006
|
+
}, re = Vt.registerPlugin({
|
|
2007
2007
|
name: "attr",
|
|
2008
2008
|
init: function(e, t, i, n, r) {
|
|
2009
2009
|
var s, o, l;
|
|
@@ -2013,7 +2013,7 @@ var Bs = function(e, t) {
|
|
|
2013
2013
|
},
|
|
2014
2014
|
render: function(e, t) {
|
|
2015
2015
|
for (var i = t._pt; i; )
|
|
2016
|
-
|
|
2016
|
+
K ? i.set(i.t, i.p, i.b, i) : i.r(e, i.d), i = i._next;
|
|
2017
2017
|
}
|
|
2018
2018
|
}, {
|
|
2019
2019
|
name: "endArray",
|
|
@@ -2022,10 +2022,10 @@ var Bs = function(e, t) {
|
|
|
2022
2022
|
for (var i = t.length; i--; )
|
|
2023
2023
|
this.add(e, i, e[i] || 0, t[i], 0, 0, 0, 0, 0, 1);
|
|
2024
2024
|
}
|
|
2025
|
-
},
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2025
|
+
}, ii("roundProps", mi), ii("modifiers"), ii("snap", Xn)) || Vt;
|
|
2026
|
+
H.version = q.version = re.version = "3.13.0";
|
|
2027
|
+
Ln = 1;
|
|
2028
|
+
Ti() && ht();
|
|
2029
2029
|
S.Power0;
|
|
2030
2030
|
S.Power1;
|
|
2031
2031
|
S.Power2;
|
|
@@ -2044,42 +2044,42 @@ S.Bounce;
|
|
|
2044
2044
|
S.Sine;
|
|
2045
2045
|
S.Expo;
|
|
2046
2046
|
S.Circ;
|
|
2047
|
-
var rn, Se, nt,
|
|
2047
|
+
var rn, Se, nt, zi, Ge, sn, Bi, Hs = function() {
|
|
2048
2048
|
return typeof window < "u";
|
|
2049
|
-
},
|
|
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 = {
|
|
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
|
-
}, Ys = 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
|
}, 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
|
+
}, Ks = function(e, t) {
|
|
2058
2058
|
return t.set(t.t, t.p, e ? Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u : t.b, t);
|
|
2059
2059
|
}, Xs = 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
|
-
}, mr = function(e, t) {
|
|
2063
|
-
return t.set(t.t, t.p, e ? t.e : t.b, t);
|
|
2064
2062
|
}, gr = function(e, t) {
|
|
2063
|
+
return t.set(t.t, t.p, e ? t.e : t.b, t);
|
|
2064
|
+
}, _r = function(e, t) {
|
|
2065
2065
|
return t.set(t.t, t.p, e !== 1 ? t.b : t.e, t);
|
|
2066
2066
|
}, Ws = function(e, t, i) {
|
|
2067
2067
|
return e.style[t] = i;
|
|
2068
|
-
}, Ks = function(e, t, i) {
|
|
2069
|
-
return e.style.setProperty(t, i);
|
|
2070
2068
|
}, qs = function(e, t, i) {
|
|
2071
|
-
return e.
|
|
2069
|
+
return e.style.setProperty(t, i);
|
|
2072
2070
|
}, Qs = function(e, t, i) {
|
|
2071
|
+
return e._gsap[t] = i;
|
|
2072
|
+
}, Js = function(e, t, i) {
|
|
2073
2073
|
return e._gsap.scaleX = e._gsap.scaleY = i;
|
|
2074
|
-
},
|
|
2074
|
+
}, ea = function(e, t, i, n, r) {
|
|
2075
2075
|
var s = e._gsap;
|
|
2076
2076
|
s.scaleX = s.scaleY = i, s.renderTransform(r, s);
|
|
2077
|
-
},
|
|
2077
|
+
}, ta = function(e, t, i, n, r) {
|
|
2078
2078
|
var s = e._gsap;
|
|
2079
2079
|
s[t] = i, s.renderTransform(r, s);
|
|
2080
|
-
},
|
|
2080
|
+
}, B = "transform", ne = B + "Origin", ia = function a(e, t) {
|
|
2081
2081
|
var i = this, n = this.target, r = n.style, s = n._gsap;
|
|
2082
|
-
if (e in
|
|
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
2085
|
return i.tfm[o] = Pe(n, o);
|
|
@@ -2088,49 +2088,49 @@ var rn, Se, nt, Ni, Ve, sn, $i, Gs = function() {
|
|
|
2088
2088
|
return xe.transform.split(",").forEach(function(o) {
|
|
2089
2089
|
return a.call(i, o, t);
|
|
2090
2090
|
});
|
|
2091
|
-
if (this.props.indexOf(
|
|
2091
|
+
if (this.props.indexOf(B) >= 0)
|
|
2092
2092
|
return;
|
|
2093
|
-
s.svg && (this.svgo = n.getAttribute("data-svg-origin"), this.props.push(ne, t, "")), e =
|
|
2093
|
+
s.svg && (this.svgo = n.getAttribute("data-svg-origin"), this.props.push(ne, t, "")), e = B;
|
|
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
|
-
},
|
|
2098
|
+
}, na = 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(
|
|
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());
|
|
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 =
|
|
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);
|
|
2106
2106
|
}
|
|
2107
|
-
},
|
|
2107
|
+
}, xr = function(e, t) {
|
|
2108
2108
|
var i = {
|
|
2109
2109
|
target: e,
|
|
2110
2110
|
props: [],
|
|
2111
|
-
revert:
|
|
2112
|
-
save:
|
|
2111
|
+
revert: na,
|
|
2112
|
+
save: ia
|
|
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);
|
|
2116
2116
|
}), i;
|
|
2117
|
-
},
|
|
2117
|
+
}, br, xi = function(e, t) {
|
|
2118
2118
|
var i = Se.createElementNS ? Se.createElementNS((t || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), e) : Se.createElement(e);
|
|
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(
|
|
2122
|
+
return n[t] || n.getPropertyValue(t.replace($i, "-$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
|
-
var n = t ||
|
|
2124
|
+
var n = t || Ge, r = n.style, s = 5;
|
|
2125
2125
|
if (e in r && !i)
|
|
2126
2126
|
return e;
|
|
2127
2127
|
for (e = e.charAt(0).toUpperCase() + e.substr(1); s-- && !(on[s] + e in r); )
|
|
2128
2128
|
;
|
|
2129
2129
|
return s < 0 ? null : (s === 3 ? "ms" : s >= 0 ? on[s] : "") + e;
|
|
2130
2130
|
}, bi = function() {
|
|
2131
|
-
|
|
2131
|
+
Hs() && window.document && (rn = window, Se = rn.document, nt = Se.documentElement, Ge = xi("div") || {
|
|
2132
2132
|
style: {}
|
|
2133
|
-
}, xi("div"),
|
|
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);
|
|
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);
|
|
@@ -2143,7 +2143,7 @@ var rn, Se, nt, Ni, Ve, sn, $i, Gs = function() {
|
|
|
2143
2143
|
for (var i = t.length; i--; )
|
|
2144
2144
|
if (e.hasAttribute(t[i]))
|
|
2145
2145
|
return e.getAttribute(t[i]);
|
|
2146
|
-
},
|
|
2146
|
+
}, Er = function(e) {
|
|
2147
2147
|
var t, i;
|
|
2148
2148
|
try {
|
|
2149
2149
|
t = e.getBBox();
|
|
@@ -2157,46 +2157,46 @@ var rn, Se, nt, Ni, Ve, sn, $i, Gs = function() {
|
|
|
2157
2157
|
height: 0
|
|
2158
2158
|
} : t;
|
|
2159
2159
|
}, vr = function(e) {
|
|
2160
|
-
return !!(e.getCTM && (!e.parentNode || e.ownerSVGElement) &&
|
|
2161
|
-
},
|
|
2160
|
+
return !!(e.getCTM && (!e.parentNode || e.ownerSVGElement) && Er(e));
|
|
2161
|
+
}, Ke = function(e, t) {
|
|
2162
2162
|
if (t) {
|
|
2163
2163
|
var i = e.style, n;
|
|
2164
|
-
t in
|
|
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);
|
|
2165
2165
|
}
|
|
2166
2166
|
}, De = function(e, t, i, n, r, s) {
|
|
2167
|
-
var o = new ie(e._pt, t, i, 0, 1, s ?
|
|
2167
|
+
var o = new ie(e._pt, t, i, 0, 1, s ? _r : gr);
|
|
2168
2168
|
return e._pt = o, o.b = n, o.e = r, e._props.push(i), o;
|
|
2169
2169
|
}, cn = {
|
|
2170
2170
|
deg: 1,
|
|
2171
2171
|
rad: 1,
|
|
2172
2172
|
turn: 1
|
|
2173
|
-
},
|
|
2173
|
+
}, ra = {
|
|
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 =
|
|
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, _;
|
|
2178
2178
|
if (n === s || !r || cn[n] || cn[s])
|
|
2179
2179
|
return r;
|
|
2180
|
-
if (s !== "px" && !p && (r = a(e, t, i, "px")), _ = e.getCTM && vr(e), (m || s === "%") && (
|
|
2181
|
-
return f = _ ? e.getBBox()[l ? "width" : "height"] : e[h],
|
|
2180
|
+
if (s !== "px" && !p && (r = a(e, t, i, "px")), _ = e.getCTM && vr(e), (m || s === "%") && (Ae[t] || ~t.indexOf("adius")))
|
|
2181
|
+
return f = _ ? e.getBBox()[l ? "width" : "height"] : e[h], V(m ? r / f * u : r / 100 * f);
|
|
2182
2182
|
if (o[l ? "width" : "height"] = u + (p ? s : n), d = n !== "rem" && ~t.indexOf("adius") || n === "em" && e.appendChild && !c ? e : e.parentNode, _ && (d = (e.ownerSVGElement || {}).parentNode), (!d || d === Se || !d.appendChild) && (d = Se.body), g = d._gsap, g && m && g.width && l && g.time === oe.time && !g.uncache)
|
|
2183
|
-
return
|
|
2183
|
+
return V(r / g.width * u);
|
|
2184
2184
|
if (m && (t === "height" || t === "width")) {
|
|
2185
2185
|
var y = e.style[t];
|
|
2186
|
-
e.style[t] = u + n, f = e[h], y ? e.style[t] = y :
|
|
2186
|
+
e.style[t] = u + n, f = e[h], y ? e.style[t] = y : Ke(e, t);
|
|
2187
2187
|
} else
|
|
2188
|
-
(m || s === "%") && !
|
|
2189
|
-
return l && m && (g =
|
|
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";
|
|
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
2190
|
}, Pe = function(e, t, i, n) {
|
|
2191
2191
|
var r;
|
|
2192
|
-
return
|
|
2193
|
-
},
|
|
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) {
|
|
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,
|
|
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 :
|
|
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) {
|
|
2200
2200
|
for (; u = Je.exec(n); )
|
|
2201
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 = {
|
|
2202
2202
|
_next: o._pt,
|
|
@@ -2208,31 +2208,31 @@ var rn, Se, nt, Ni, Ve, sn, $i, Gs = function() {
|
|
|
2208
2208
|
});
|
|
2209
2209
|
o.c = l < n.length ? n.substring(l, n.length) : "";
|
|
2210
2210
|
} else
|
|
2211
|
-
o.r = t === "display" && n === "none" ?
|
|
2212
|
-
return
|
|
2211
|
+
o.r = t === "display" && n === "none" ? _r : gr;
|
|
2212
|
+
return In.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
|
-
},
|
|
2219
|
+
}, aa = 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
|
-
},
|
|
2222
|
+
}, oa = 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],
|
|
2230
|
-
l && (
|
|
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)));
|
|
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,
|
|
2235
|
+
var s = e._pt = new ie(e._pt, t, i, 0, 0, oa);
|
|
2236
2236
|
return s.u = n, s.pr = -10, s.tween = r, e._props.push(i), 1;
|
|
2237
2237
|
}
|
|
2238
2238
|
}
|
|
@@ -2299,59 +2299,59 @@ var rn, Se, nt, Ni, Ve, sn, $i, Gs = function() {
|
|
|
2299
2299
|
return 1;
|
|
2300
2300
|
}
|
|
2301
2301
|
*/
|
|
2302
|
-
},
|
|
2302
|
+
}, At = [1, 0, 0, 1, 0, 0], wr = {}, Pr = 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,
|
|
2306
|
-
return
|
|
2307
|
-
},
|
|
2308
|
-
var i = e._gsap ||
|
|
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" ?
|
|
2310
|
-
},
|
|
2311
|
-
var o = e._gsap, l = r ||
|
|
2312
|
-
i ? l !==
|
|
2313
|
-
},
|
|
2314
|
-
var i = e._gsap || new
|
|
2305
|
+
var t = ge(e, B);
|
|
2306
|
+
return Pr(t) ? At : t.substr(7).match(Rn).map(V);
|
|
2307
|
+
}, Gi = function(e, t) {
|
|
2308
|
+
var i = e._gsap || He(e), n = e.style, r = dn(e), s, o, l, c;
|
|
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
|
+
}, 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);
|
|
2313
|
+
}, Tt = function(e, t) {
|
|
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,
|
|
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[
|
|
2319
|
-
},
|
|
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;
|
|
2319
|
+
}, jt = function(e) {
|
|
2320
2320
|
return (e = e.split(" "))[0] + " " + e[1];
|
|
2321
|
-
},
|
|
2322
|
-
var n =
|
|
2323
|
-
return
|
|
2324
|
-
}, oa = function(e, t) {
|
|
2325
|
-
t.z = "0px", t.rotationY = t.rotationX = "0deg", t.force3D = 0, Pr(e, t);
|
|
2326
|
-
}, ze = "0deg", ft = "0px", Ne = ") ", 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, b = "", v = _ === "auto" && e && e !== 1 || _ === !0;
|
|
2328
|
-
if (x && (u !== ze || h !== ze)) {
|
|
2329
|
-
var P = parseFloat(h) * rt, w = Math.sin(P), C = Math.cos(P), E;
|
|
2330
|
-
P = parseFloat(u) * rt, E = Math.cos(P), s = ti(y, s, w * E * -x), o = ti(y, o, -Math.sin(P) * -x), l = ti(y, l, C * E * -x + x);
|
|
2331
|
-
}
|
|
2332
|
-
g !== ft && (b += "perspective(" + g + Ne), (n || r) && (b += "translate(" + n + "%, " + r + "%) "), (v || s !== ft || o !== ft || l !== ft) && (b += l !== ft || v ? "translate3d(" + s + ", " + o + ", " + l + ") " : "translate(" + s + ", " + o + Ne), c !== ze && (b += "rotate(" + c + Ne), h !== ze && (b += "rotateY(" + h + Ne), u !== ze && (b += "rotateX(" + u + Ne), (p !== ze || m !== ze) && (b += "skew(" + p + ", " + m + Ne), (f !== 1 || d !== 1) && (b += "scale(" + f + ", " + d + Ne), y.style[$] = b || "translate(0, 0)";
|
|
2321
|
+
}, ni = function(e, t, i) {
|
|
2322
|
+
var n = X(t);
|
|
2323
|
+
return V(parseFloat(t) + parseFloat(Le(e, "x", i + "px", n))) + n;
|
|
2333
2324
|
}, la = function(e, t) {
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
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
|
+
}, 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;
|
|
2339
2339
|
}, pn = function(e, t) {
|
|
2340
2340
|
for (var i in t)
|
|
2341
2341
|
e[i] = t[i];
|
|
2342
2342
|
return e;
|
|
2343
|
-
},
|
|
2343
|
+
}, ua = 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[
|
|
2346
|
-
for (l in
|
|
2347
|
-
c = n[l], h = o[l], c !== h && r.indexOf(l) < 0 && (m =
|
|
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);
|
|
2346
|
+
for (l in Ae)
|
|
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);
|
|
2349
2349
|
};
|
|
2350
2350
|
te("padding,margin,Width,Radius", function(a, e) {
|
|
2351
2351
|
var t = "Top", i = "Right", n = "Bottom", r = "Left", s = (e < 3 ? [t, i, n, r] : [t + r, t + i, n + i, n + r]).map(function(o) {
|
|
2352
2352
|
return e < 2 ? a + o : "border" + o + a;
|
|
2353
2353
|
});
|
|
2354
|
-
|
|
2354
|
+
Ht[e > 1 ? "border" + a : a] = function(o, l, c, h, u) {
|
|
2355
2355
|
var p, m;
|
|
2356
2356
|
if (arguments.length < 4)
|
|
2357
2357
|
return p = s.map(function(f) {
|
|
@@ -2362,49 +2362,49 @@ te("padding,margin,Width,Radius", function(a, e) {
|
|
|
2362
2362
|
}), o.init(l, m, u);
|
|
2363
2363
|
};
|
|
2364
2364
|
});
|
|
2365
|
-
var
|
|
2365
|
+
var Ar = {
|
|
2366
2366
|
name: "css",
|
|
2367
2367
|
register: bi,
|
|
2368
2368
|
targetTest: function(e) {
|
|
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,
|
|
2373
|
-
|
|
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;
|
|
2374
2374
|
for (d in t)
|
|
2375
|
-
if (d !== "autoRound" && (h = t[d], !(ae[d] &&
|
|
2376
|
-
if (m = typeof h, f =
|
|
2375
|
+
if (d !== "autoRound" && (h = t[d], !(ae[d] && lr(d, t, i, n, e, r)))) {
|
|
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
2377
|
f(this, e, d, h, i) && (w = 1);
|
|
2378
2378
|
else if (d.substr(0, 2) === "--")
|
|
2379
|
-
c = (getComputedStyle(e).getPropertyValue(d) + "").trim(), h += "",
|
|
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]);
|
|
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)),
|
|
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 || (
|
|
2383
|
-
this._pt = new ie(this._pt,
|
|
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";
|
|
2384
2384
|
else if (d === "transformOrigin") {
|
|
2385
|
-
C.push(ne, 0, o[ne]), h =
|
|
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)));
|
|
2386
2386
|
continue;
|
|
2387
2387
|
} else if (d === "svgOrigin") {
|
|
2388
|
-
|
|
2388
|
+
Ei(e, h, 1, P, 0, this);
|
|
2389
2389
|
continue;
|
|
2390
|
-
} else if (d in
|
|
2391
|
-
|
|
2390
|
+
} else if (d in wr) {
|
|
2391
|
+
ca(this, E, d, p, y ? it(p, y + h) : h);
|
|
2392
2392
|
continue;
|
|
2393
2393
|
} else if (d === "smoothOrigin") {
|
|
2394
|
-
De(this,
|
|
2394
|
+
De(this, E, "smooth", E.smooth, h);
|
|
2395
2395
|
continue;
|
|
2396
2396
|
} else if (d === "force3D") {
|
|
2397
|
-
|
|
2397
|
+
E[d] = h;
|
|
2398
2398
|
continue;
|
|
2399
2399
|
} else if (d === "transform") {
|
|
2400
|
-
|
|
2400
|
+
ua(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) && !
|
|
2405
|
-
g = (c + "").substr((p + "").length), u || (u = 0), _ =
|
|
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);
|
|
2406
2406
|
else if (d in o)
|
|
2407
|
-
|
|
2407
|
+
sa.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") {
|
|
@@ -2414,10 +2414,10 @@ var Cr = {
|
|
|
2414
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);
|
|
2415
2415
|
}
|
|
2416
2416
|
}
|
|
2417
|
-
w &&
|
|
2417
|
+
w && fr(this);
|
|
2418
2418
|
},
|
|
2419
2419
|
render: function(e, t) {
|
|
2420
|
-
if (t.tween._time ||
|
|
2420
|
+
if (t.tween._time || !Bi())
|
|
2421
2421
|
for (var i = t._pt; i; )
|
|
2422
2422
|
i.r(e, i.d), i = i._next;
|
|
2423
2423
|
else
|
|
@@ -2427,21 +2427,21 @@ var Cr = {
|
|
|
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
|
|
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);
|
|
2431
2431
|
},
|
|
2432
2432
|
core: {
|
|
2433
|
-
_removeProperty:
|
|
2434
|
-
_getMatrix:
|
|
2433
|
+
_removeProperty: Ke,
|
|
2434
|
+
_getMatrix: Gi
|
|
2435
2435
|
}
|
|
2436
2436
|
};
|
|
2437
2437
|
re.utils.checkPrefix = ct;
|
|
2438
|
-
re.core.getStyleSaver =
|
|
2438
|
+
re.core.getStyleSaver = xr;
|
|
2439
2439
|
(function(a, e, t, i) {
|
|
2440
2440
|
var n = te(a + "," + e + "," + t, function(r) {
|
|
2441
|
-
|
|
2441
|
+
Ae[r] = 1;
|
|
2442
2442
|
});
|
|
2443
2443
|
te(e, function(r) {
|
|
2444
|
-
he.units[r] = "deg",
|
|
2444
|
+
he.units[r] = "deg", wr[r] = 1;
|
|
2445
2445
|
}), xe[n[13]] = a + "," + e, te(i, function(r) {
|
|
2446
2446
|
var s = r.split(":");
|
|
2447
2447
|
xe[s[1]] = n[s[0]];
|
|
@@ -2450,8 +2450,8 @@ re.core.getStyleSaver = yr;
|
|
|
2450
2450
|
te("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective", function(a) {
|
|
2451
2451
|
he.units[a] = "px";
|
|
2452
2452
|
});
|
|
2453
|
-
re.registerPlugin(
|
|
2454
|
-
var _t = re.registerPlugin(
|
|
2453
|
+
re.registerPlugin(Ar);
|
|
2454
|
+
var _t = re.registerPlugin(Ar) || re;
|
|
2455
2455
|
_t.core.Tween;
|
|
2456
2456
|
class be {
|
|
2457
2457
|
constructor(e, t, i, n, r = "div") {
|
|
@@ -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
|
|
2682
|
+
class da 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();
|
|
@@ -2689,21 +2689,21 @@ class ua extends be {
|
|
|
2689
2689
|
return this.$input.checked = this.getValue(), this;
|
|
2690
2690
|
}
|
|
2691
2691
|
}
|
|
2692
|
-
function
|
|
2692
|
+
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
|
|
2696
|
+
const pa = {
|
|
2697
2697
|
isPrimitive: !0,
|
|
2698
2698
|
match: (a) => typeof a == "string",
|
|
2699
|
-
fromHexString:
|
|
2700
|
-
toHexString:
|
|
2699
|
+
fromHexString: vi,
|
|
2700
|
+
toHexString: vi
|
|
2701
2701
|
}, St = {
|
|
2702
2702
|
isPrimitive: !0,
|
|
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
|
-
},
|
|
2706
|
+
}, fa = {
|
|
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 da = {
|
|
|
2715
2715
|
const n = a * i << 16 ^ e * i << 8 ^ t * i << 0;
|
|
2716
2716
|
return St.toHexString(n);
|
|
2717
2717
|
}
|
|
2718
|
-
},
|
|
2718
|
+
}, ma = {
|
|
2719
2719
|
isPrimitive: !1,
|
|
2720
2720
|
match: (a) => Object(a) === a,
|
|
2721
2721
|
fromHexString(a, e, t = 1) {
|
|
@@ -2727,18 +2727,18 @@ const da = {
|
|
|
2727
2727
|
const n = a * i << 16 ^ e * i << 8 ^ t * i << 0;
|
|
2728
2728
|
return St.toHexString(n);
|
|
2729
2729
|
}
|
|
2730
|
-
},
|
|
2731
|
-
function
|
|
2732
|
-
return
|
|
2730
|
+
}, ga = [pa, St, fa, ma];
|
|
2731
|
+
function _a(a) {
|
|
2732
|
+
return ga.find((e) => e.match(a));
|
|
2733
2733
|
}
|
|
2734
|
-
class
|
|
2734
|
+
class ya 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 =
|
|
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", () => {
|
|
2737
2737
|
this._setValueFromHexString(this.$input.value);
|
|
2738
2738
|
}), this.$input.addEventListener("blur", () => {
|
|
2739
2739
|
this._callOnFinishChange();
|
|
2740
2740
|
}), this.$text.addEventListener("input", () => {
|
|
2741
|
-
const r =
|
|
2741
|
+
const r = vi(this.$text.value);
|
|
2742
2742
|
r && this._setValueFromHexString(r);
|
|
2743
2743
|
}), this.$text.addEventListener("focus", () => {
|
|
2744
2744
|
this._textFocused = !0, this.$text.select();
|
|
@@ -2766,7 +2766,7 @@ class _a extends be {
|
|
|
2766
2766
|
return this.$input.value = this._format.toHexString(this.getValue(), this._rgbScale), this._textFocused || (this.$text.value = this.$input.value.substring(1)), this.$display.style.backgroundColor = this.$input.value, this;
|
|
2767
2767
|
}
|
|
2768
2768
|
}
|
|
2769
|
-
class
|
|
2769
|
+
class ri extends be {
|
|
2770
2770
|
constructor(e, t, i) {
|
|
2771
2771
|
super(e, t, i, "lil-function"), this.$button = document.createElement("button"), this.$button.appendChild(this.$name), this.$widget.appendChild(this.$button), this.$button.addEventListener("click", (n) => {
|
|
2772
2772
|
n.preventDefault(), this.getValue().call(this.object), this._callOnChange();
|
|
@@ -2774,7 +2774,7 @@ class ii extends be {
|
|
|
2774
2774
|
}, { passive: !0 }), this.$disable = this.$button;
|
|
2775
2775
|
}
|
|
2776
2776
|
}
|
|
2777
|
-
class
|
|
2777
|
+
class xa 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;
|
|
@@ -2837,7 +2837,7 @@ class ya 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,
|
|
2840
|
+
const e = (_, y, x, b, E) => (_ - y) / (x - y) * (E - b) + b, 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 ya extends be {
|
|
|
2909
2909
|
return this._max !== void 0;
|
|
2910
2910
|
}
|
|
2911
2911
|
}
|
|
2912
|
-
class
|
|
2912
|
+
class ba 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 xa 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
|
|
2933
|
+
class Ea 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);
|
|
@@ -3366,14 +3366,14 @@ 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
|
|
3369
|
+
function wa(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");
|
|
3373
3373
|
t ? document.head.insertBefore(e, t) : document.head.appendChild(e);
|
|
3374
3374
|
}
|
|
3375
3375
|
let fn = !1;
|
|
3376
|
-
class
|
|
3376
|
+
class Vi {
|
|
3377
3377
|
/**
|
|
3378
3378
|
* Creates a panel that holds controllers.
|
|
3379
3379
|
* @example
|
|
@@ -3422,7 +3422,7 @@ class Gi {
|
|
|
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 && (
|
|
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;
|
|
3426
3426
|
}
|
|
3427
3427
|
/**
|
|
3428
3428
|
* Adds a controller to the GUI, inferring controller type using the `typeof` operator.
|
|
@@ -3441,17 +3441,17 @@ class Gi {
|
|
|
3441
3441
|
*/
|
|
3442
3442
|
add(e, t, i, n, r) {
|
|
3443
3443
|
if (Object(i) === i)
|
|
3444
|
-
return new
|
|
3444
|
+
return new ba(this, e, t, i);
|
|
3445
3445
|
const s = e[t];
|
|
3446
3446
|
switch (typeof s) {
|
|
3447
3447
|
case "number":
|
|
3448
|
-
return new
|
|
3448
|
+
return new xa(this, e, t, i, n, r);
|
|
3449
3449
|
case "boolean":
|
|
3450
|
-
return new
|
|
3450
|
+
return new da(this, e, t);
|
|
3451
3451
|
case "string":
|
|
3452
|
-
return new
|
|
3452
|
+
return new Ea(this, e, t);
|
|
3453
3453
|
case "function":
|
|
3454
|
-
return new
|
|
3454
|
+
return new ri(this, e, t);
|
|
3455
3455
|
}
|
|
3456
3456
|
console.error(`gui.add failed
|
|
3457
3457
|
property:`, t, `
|
|
@@ -3478,7 +3478,7 @@ class Gi {
|
|
|
3478
3478
|
* @returns {Controller}
|
|
3479
3479
|
*/
|
|
3480
3480
|
addColor(e, t, i = 1) {
|
|
3481
|
-
return new
|
|
3481
|
+
return new ya(this, e, t, i);
|
|
3482
3482
|
}
|
|
3483
3483
|
/**
|
|
3484
3484
|
* Adds a folder to the GUI, which is just another GUI. This method returns
|
|
@@ -3493,7 +3493,7 @@ class Gi {
|
|
|
3493
3493
|
* @returns {GUI}
|
|
3494
3494
|
*/
|
|
3495
3495
|
addFolder(e) {
|
|
3496
|
-
const t = new
|
|
3496
|
+
const t = new Vi({ parent: this, title: e });
|
|
3497
3497
|
return this.root._closeFolders && t.close(), t;
|
|
3498
3498
|
}
|
|
3499
3499
|
/**
|
|
@@ -3504,7 +3504,7 @@ class Gi {
|
|
|
3504
3504
|
*/
|
|
3505
3505
|
load(e, t = !0) {
|
|
3506
3506
|
return e.controllers && this.controllers.forEach((i) => {
|
|
3507
|
-
i instanceof
|
|
3507
|
+
i instanceof ri || i._name in e.controllers && i.load(e.controllers[i._name]);
|
|
3508
3508
|
}), t && e.folders && this.folders.forEach((i) => {
|
|
3509
3509
|
i._title in e.folders && i.load(e.folders[i._title]);
|
|
3510
3510
|
}), this;
|
|
@@ -3535,7 +3535,7 @@ class Gi {
|
|
|
3535
3535
|
folders: {}
|
|
3536
3536
|
};
|
|
3537
3537
|
return this.controllers.forEach((i) => {
|
|
3538
|
-
if (!(i instanceof
|
|
3538
|
+
if (!(i instanceof ri)) {
|
|
3539
3539
|
if (i._name in t.controllers)
|
|
3540
3540
|
throw new Error(`Cannot save GUI with duplicate property "${i._name}"`);
|
|
3541
3541
|
t.controllers[i._name] = i.save();
|
|
@@ -3705,11 +3705,11 @@ class Gi {
|
|
|
3705
3705
|
}), e;
|
|
3706
3706
|
}
|
|
3707
3707
|
}
|
|
3708
|
-
function
|
|
3708
|
+
function Pa(a) {
|
|
3709
3709
|
return a;
|
|
3710
3710
|
}
|
|
3711
|
-
function
|
|
3712
|
-
if (a == null) return
|
|
3711
|
+
function Ca(a) {
|
|
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) {
|
|
3715
3715
|
l || (e = t = 0);
|
|
@@ -3718,7 +3718,7 @@ function Pa(a) {
|
|
|
3718
3718
|
return u;
|
|
3719
3719
|
};
|
|
3720
3720
|
}
|
|
3721
|
-
function
|
|
3721
|
+
function Aa(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
3724
|
function Ta(a, e) {
|
|
@@ -3727,16 +3727,16 @@ function Ta(a, e) {
|
|
|
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 =
|
|
3730
|
+
var t = e.id, i = e.bbox, n = e.properties == null ? {} : e.properties, r = Sa(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
|
|
3734
|
-
var t =
|
|
3733
|
+
function Sa(a, e) {
|
|
3734
|
+
var t = Ca(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 &&
|
|
3739
|
+
h < 0 && Aa(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
|
-
],
|
|
3884
|
+
], Da = [
|
|
3885
3885
|
{
|
|
3886
3886
|
id: "humanDevIndex",
|
|
3887
3887
|
name: "Human Development Index",
|
|
@@ -3983,19 +3983,230 @@ const Tr = [
|
|
|
3983
3983
|
format: (a) => `${a.toFixed(0)}%`
|
|
3984
3984
|
}
|
|
3985
3985
|
];
|
|
3986
|
-
function
|
|
3986
|
+
function Ma(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
|
|
3991
|
-
|
|
3990
|
+
const Ra = {
|
|
3991
|
+
// North America
|
|
3992
|
+
US: "840",
|
|
3993
|
+
USA: "840",
|
|
3994
|
+
"UNITED STATES": "840",
|
|
3995
|
+
AMERICA: "840",
|
|
3996
|
+
CA: "124",
|
|
3997
|
+
CAN: "124",
|
|
3998
|
+
CANADA: "124",
|
|
3999
|
+
MX: "484",
|
|
4000
|
+
MEX: "484",
|
|
4001
|
+
MEXICO: "484",
|
|
4002
|
+
// Europe
|
|
4003
|
+
DE: "276",
|
|
4004
|
+
DEU: "276",
|
|
4005
|
+
GERMANY: "276",
|
|
4006
|
+
DEUTSCHLAND: "276",
|
|
4007
|
+
FR: "250",
|
|
4008
|
+
FRA: "250",
|
|
4009
|
+
FRANCE: "250",
|
|
4010
|
+
GB: "826",
|
|
4011
|
+
GBR: "826",
|
|
4012
|
+
UK: "826",
|
|
4013
|
+
"UNITED KINGDOM": "826",
|
|
4014
|
+
BRITAIN: "826",
|
|
4015
|
+
ENGLAND: "826",
|
|
4016
|
+
IT: "380",
|
|
4017
|
+
ITA: "380",
|
|
4018
|
+
ITALY: "380",
|
|
4019
|
+
ES: "724",
|
|
4020
|
+
ESP: "724",
|
|
4021
|
+
SPAIN: "724",
|
|
4022
|
+
PT: "620",
|
|
4023
|
+
PRT: "620",
|
|
4024
|
+
PORTUGAL: "620",
|
|
4025
|
+
NL: "528",
|
|
4026
|
+
NLD: "528",
|
|
4027
|
+
NETHERLANDS: "528",
|
|
4028
|
+
HOLLAND: "528",
|
|
4029
|
+
BE: "056",
|
|
4030
|
+
BEL: "056",
|
|
4031
|
+
BELGIUM: "056",
|
|
4032
|
+
AT: "040",
|
|
4033
|
+
AUT: "040",
|
|
4034
|
+
AUSTRIA: "040",
|
|
4035
|
+
CH: "756",
|
|
4036
|
+
CHE: "756",
|
|
4037
|
+
SWITZERLAND: "756",
|
|
4038
|
+
PL: "616",
|
|
4039
|
+
POL: "616",
|
|
4040
|
+
POLAND: "616",
|
|
4041
|
+
SE: "752",
|
|
4042
|
+
SWE: "752",
|
|
4043
|
+
SWEDEN: "752",
|
|
4044
|
+
NO: "578",
|
|
4045
|
+
NOR: "578",
|
|
4046
|
+
NORWAY: "578",
|
|
4047
|
+
DK: "208",
|
|
4048
|
+
DNK: "208",
|
|
4049
|
+
DENMARK: "208",
|
|
4050
|
+
FI: "246",
|
|
4051
|
+
FIN: "246",
|
|
4052
|
+
FINLAND: "246",
|
|
4053
|
+
IE: "372",
|
|
4054
|
+
IRL: "372",
|
|
4055
|
+
IRELAND: "372",
|
|
4056
|
+
GR: "300",
|
|
4057
|
+
GRC: "300",
|
|
4058
|
+
GREECE: "300",
|
|
4059
|
+
CZ: "203",
|
|
4060
|
+
CZE: "203",
|
|
4061
|
+
"CZECH REPUBLIC": "203",
|
|
4062
|
+
CZECHIA: "203",
|
|
4063
|
+
RO: "642",
|
|
4064
|
+
ROU: "642",
|
|
4065
|
+
ROMANIA: "642",
|
|
4066
|
+
HU: "348",
|
|
4067
|
+
HUN: "348",
|
|
4068
|
+
HUNGARY: "348",
|
|
4069
|
+
UA: "804",
|
|
4070
|
+
UKR: "804",
|
|
4071
|
+
UKRAINE: "804",
|
|
4072
|
+
RU: "643",
|
|
4073
|
+
RUS: "643",
|
|
4074
|
+
RUSSIA: "643",
|
|
4075
|
+
"RUSSIAN FEDERATION": "643",
|
|
4076
|
+
// Asia
|
|
4077
|
+
CN: "156",
|
|
4078
|
+
CHN: "156",
|
|
4079
|
+
CHINA: "156",
|
|
4080
|
+
JP: "392",
|
|
4081
|
+
JPN: "392",
|
|
4082
|
+
JAPAN: "392",
|
|
4083
|
+
KR: "410",
|
|
4084
|
+
KOR: "410",
|
|
4085
|
+
"SOUTH KOREA": "410",
|
|
4086
|
+
KOREA: "410",
|
|
4087
|
+
IN: "356",
|
|
4088
|
+
IND: "356",
|
|
4089
|
+
INDIA: "356",
|
|
4090
|
+
ID: "360",
|
|
4091
|
+
IDN: "360",
|
|
4092
|
+
INDONESIA: "360",
|
|
4093
|
+
TH: "764",
|
|
4094
|
+
THA: "764",
|
|
4095
|
+
THAILAND: "764",
|
|
4096
|
+
VN: "704",
|
|
4097
|
+
VNM: "704",
|
|
4098
|
+
VIETNAM: "704",
|
|
4099
|
+
PH: "608",
|
|
4100
|
+
PHL: "608",
|
|
4101
|
+
PHILIPPINES: "608",
|
|
4102
|
+
MY: "458",
|
|
4103
|
+
MYS: "458",
|
|
4104
|
+
MALAYSIA: "458",
|
|
4105
|
+
SG: "702",
|
|
4106
|
+
SGP: "702",
|
|
4107
|
+
SINGAPORE: "702",
|
|
4108
|
+
PK: "586",
|
|
4109
|
+
PAK: "586",
|
|
4110
|
+
PAKISTAN: "586",
|
|
4111
|
+
BD: "050",
|
|
4112
|
+
BGD: "050",
|
|
4113
|
+
BANGLADESH: "050",
|
|
4114
|
+
TR: "792",
|
|
4115
|
+
TUR: "792",
|
|
4116
|
+
TURKEY: "792",
|
|
4117
|
+
TURKIYE: "792",
|
|
4118
|
+
SA: "682",
|
|
4119
|
+
SAU: "682",
|
|
4120
|
+
"SAUDI ARABIA": "682",
|
|
4121
|
+
AE: "784",
|
|
4122
|
+
ARE: "784",
|
|
4123
|
+
UAE: "784",
|
|
4124
|
+
"UNITED ARAB EMIRATES": "784",
|
|
4125
|
+
IL: "376",
|
|
4126
|
+
ISR: "376",
|
|
4127
|
+
ISRAEL: "376",
|
|
4128
|
+
IR: "364",
|
|
4129
|
+
IRN: "364",
|
|
4130
|
+
IRAN: "364",
|
|
4131
|
+
IQ: "368",
|
|
4132
|
+
IRQ: "368",
|
|
4133
|
+
IRAQ: "368",
|
|
4134
|
+
// Oceania
|
|
4135
|
+
AU: "036",
|
|
4136
|
+
AUS: "036",
|
|
4137
|
+
AUSTRALIA: "036",
|
|
4138
|
+
NZ: "554",
|
|
4139
|
+
NZL: "554",
|
|
4140
|
+
"NEW ZEALAND": "554",
|
|
4141
|
+
// South America
|
|
4142
|
+
BR: "076",
|
|
4143
|
+
BRA: "076",
|
|
4144
|
+
BRAZIL: "076",
|
|
4145
|
+
AR: "032",
|
|
4146
|
+
ARG: "032",
|
|
4147
|
+
ARGENTINA: "032",
|
|
4148
|
+
CL: "152",
|
|
4149
|
+
CHL: "152",
|
|
4150
|
+
CHILE: "152",
|
|
4151
|
+
CO: "170",
|
|
4152
|
+
COL: "170",
|
|
4153
|
+
COLOMBIA: "170",
|
|
4154
|
+
PE: "604",
|
|
4155
|
+
PER: "604",
|
|
4156
|
+
PERU: "604",
|
|
4157
|
+
VE: "862",
|
|
4158
|
+
VEN: "862",
|
|
4159
|
+
VENEZUELA: "862",
|
|
4160
|
+
// Africa
|
|
4161
|
+
ZA: "710",
|
|
4162
|
+
ZAF: "710",
|
|
4163
|
+
"SOUTH AFRICA": "710",
|
|
4164
|
+
EG: "818",
|
|
4165
|
+
EGY: "818",
|
|
4166
|
+
EGYPT: "818",
|
|
4167
|
+
NG: "566",
|
|
4168
|
+
NGA: "566",
|
|
4169
|
+
NIGERIA: "566",
|
|
4170
|
+
KE: "404",
|
|
4171
|
+
KEN: "404",
|
|
4172
|
+
KENYA: "404",
|
|
4173
|
+
ET: "231",
|
|
4174
|
+
ETH: "231",
|
|
4175
|
+
ETHIOPIA: "231",
|
|
4176
|
+
MA: "504",
|
|
4177
|
+
MAR: "504",
|
|
4178
|
+
MOROCCO: "504",
|
|
4179
|
+
DZ: "012",
|
|
4180
|
+
DZA: "012",
|
|
4181
|
+
ALGERIA: "012",
|
|
4182
|
+
TN: "788",
|
|
4183
|
+
TUN: "788",
|
|
4184
|
+
TUNISIA: "788",
|
|
4185
|
+
GH: "288",
|
|
4186
|
+
GHA: "288",
|
|
4187
|
+
GHANA: "288"
|
|
4188
|
+
};
|
|
4189
|
+
function gn(a) {
|
|
4190
|
+
const e = a.toUpperCase().trim();
|
|
4191
|
+
return /^\d{1,3}$/.test(a) ? a.padStart(3, "0") : Ra[e] || a;
|
|
4192
|
+
}
|
|
4193
|
+
function Ia(a) {
|
|
4194
|
+
const e = {};
|
|
4195
|
+
return a instanceof Map ? a.forEach((t, i) => {
|
|
4196
|
+
e[gn(i)] = t;
|
|
4197
|
+
}) : Object.entries(a).forEach(([t, i]) => {
|
|
4198
|
+
e[gn(t)] = i;
|
|
4199
|
+
}), e;
|
|
4200
|
+
}
|
|
4201
|
+
const It = 2048, Ot = 1024;
|
|
4202
|
+
class Oa {
|
|
3992
4203
|
canvas;
|
|
3993
4204
|
ctx;
|
|
3994
4205
|
countries = [];
|
|
3995
4206
|
loaded = !1;
|
|
3996
4207
|
statsMap;
|
|
3997
4208
|
constructor() {
|
|
3998
|
-
this.canvas = document.createElement("canvas"), this.canvas.width =
|
|
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) => {
|
|
3999
4210
|
this.statsMap.set(e.id, e);
|
|
4000
4211
|
}), this.loadCountries();
|
|
4001
4212
|
}
|
|
@@ -4020,10 +4231,10 @@ class Ma {
|
|
|
4020
4231
|
* Render a choropleth texture for the given statistic
|
|
4021
4232
|
*/
|
|
4022
4233
|
renderTexture(e) {
|
|
4023
|
-
return this.ctx.fillStyle = "#1a3a5c", this.ctx.fillRect(0, 0,
|
|
4234
|
+
return this.ctx.fillStyle = "#1a3a5c", this.ctx.fillRect(0, 0, It, Ot), this.loaded ? (this.countries.forEach((t) => {
|
|
4024
4235
|
const i = this.statsMap.get(t.id);
|
|
4025
4236
|
if (i) {
|
|
4026
|
-
const n = e.accessor(i), r =
|
|
4237
|
+
const n = e.accessor(i), r = Ma(e, n), s = this.interpolateColor(e.colorScale, r);
|
|
4027
4238
|
this.ctx.fillStyle = s;
|
|
4028
4239
|
} else
|
|
4029
4240
|
this.ctx.fillStyle = "#2a2a2a";
|
|
@@ -4067,7 +4278,7 @@ class Ma {
|
|
|
4067
4278
|
* Project lat/lon to canvas coordinates (equirectangular projection)
|
|
4068
4279
|
*/
|
|
4069
4280
|
projectPoint(e, t) {
|
|
4070
|
-
const i = (e + 180) / 360 *
|
|
4281
|
+
const i = (e + 180) / 360 * It, n = (90 - t) / 180 * Ot;
|
|
4071
4282
|
return [i, n];
|
|
4072
4283
|
}
|
|
4073
4284
|
interpolateColor(e, t) {
|
|
@@ -4086,6 +4297,28 @@ class Ma {
|
|
|
4086
4297
|
}
|
|
4087
4298
|
return `rgb(${o}, ${l}, ${c})`;
|
|
4088
4299
|
}
|
|
4300
|
+
/**
|
|
4301
|
+
* Render a choropleth texture with custom values
|
|
4302
|
+
*/
|
|
4303
|
+
renderCustomTexture(e, t, i) {
|
|
4304
|
+
if (this.ctx.fillStyle = "#1a3a5c", this.ctx.fillRect(0, 0, It, Ot), !this.loaded)
|
|
4305
|
+
return this.canvas;
|
|
4306
|
+
const n = Ia(e);
|
|
4307
|
+
return this.countries.forEach((r) => {
|
|
4308
|
+
const s = n[r.id];
|
|
4309
|
+
if (s !== void 0) {
|
|
4310
|
+
const o = Math.max(0, Math.min(
|
|
4311
|
+
1,
|
|
4312
|
+
(s - i[0]) / (i[1] - i[0])
|
|
4313
|
+
)), l = this.interpolateColor(t, o);
|
|
4314
|
+
this.ctx.fillStyle = l;
|
|
4315
|
+
} else
|
|
4316
|
+
this.ctx.fillStyle = "#2a2a2a";
|
|
4317
|
+
this.drawCountry(r);
|
|
4318
|
+
}), this.ctx.strokeStyle = "rgba(0, 0, 0, 0.3)", this.ctx.lineWidth = 0.5, this.countries.forEach((r) => {
|
|
4319
|
+
this.strokeCountry(r);
|
|
4320
|
+
}), this.canvas;
|
|
4321
|
+
}
|
|
4089
4322
|
/**
|
|
4090
4323
|
* Get canvas for debugging
|
|
4091
4324
|
*/
|
|
@@ -4099,7 +4332,7 @@ class Ma {
|
|
|
4099
4332
|
return this.canvas.toDataURL("image/png");
|
|
4100
4333
|
}
|
|
4101
4334
|
}
|
|
4102
|
-
class
|
|
4335
|
+
class La {
|
|
4103
4336
|
container;
|
|
4104
4337
|
visible = !1;
|
|
4105
4338
|
constructor() {
|
|
@@ -4193,8 +4426,8 @@ class Ra {
|
|
|
4193
4426
|
this.container.remove();
|
|
4194
4427
|
}
|
|
4195
4428
|
}
|
|
4196
|
-
var
|
|
4197
|
-
function
|
|
4429
|
+
var ka = { trailer: 59 };
|
|
4430
|
+
function Sr(a = 256) {
|
|
4198
4431
|
let e = 0, t = new Uint8Array(a);
|
|
4199
4432
|
return { get buffer() {
|
|
4200
4433
|
return t.buffer;
|
|
@@ -4221,54 +4454,54 @@ function Ar(a = 256) {
|
|
|
4221
4454
|
t = new Uint8Array(n), e > 0 && t.set(o.subarray(0, e), 0);
|
|
4222
4455
|
}
|
|
4223
4456
|
}
|
|
4224
|
-
var si = 12,
|
|
4225
|
-
function
|
|
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)) {
|
|
4226
4459
|
let l = s.length, c = Math.max(2, i);
|
|
4227
4460
|
r.fill(0), o.fill(0), s.fill(-1);
|
|
4228
|
-
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,
|
|
4229
|
-
for (let
|
|
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;
|
|
4230
4463
|
P = 8 - P, n.writeByte(c), C(_);
|
|
4231
4464
|
let w = t.length;
|
|
4232
|
-
for (let
|
|
4465
|
+
for (let v = 1; v < w; v++)
|
|
4233
4466
|
e: {
|
|
4234
|
-
let
|
|
4235
|
-
if (s[
|
|
4236
|
-
|
|
4467
|
+
let T = t[v], D = (T << si) + E, A = T << P ^ E;
|
|
4468
|
+
if (s[A] === D) {
|
|
4469
|
+
E = o[A];
|
|
4237
4470
|
break e;
|
|
4238
4471
|
}
|
|
4239
|
-
let R =
|
|
4240
|
-
for (; s[
|
|
4241
|
-
|
|
4472
|
+
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];
|
|
4242
4475
|
break e;
|
|
4243
4476
|
}
|
|
4244
|
-
C(
|
|
4477
|
+
C(E), E = T, x < 1 << si ? (o[A] = x++, s[A] = D) : (s.fill(-1), x = _ + 2, f = !0, C(_));
|
|
4245
4478
|
}
|
|
4246
|
-
return C(
|
|
4247
|
-
function C(
|
|
4248
|
-
for (h &=
|
|
4249
|
-
if ((x > g || f) && (f ? (d = m, g = (1 << d) - 1, f = !1) : (++d, g = d === si ? 1 << d : (1 << d) - 1)),
|
|
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) {
|
|
4250
4483
|
for (; u > 0; ) r[b++] = h & 255, b >= 254 && (n.writeByte(b), n.writeBytesView(r, 0, b), b = 0), h >>= 8, u -= 8;
|
|
4251
4484
|
b > 0 && (n.writeByte(b), n.writeBytesView(r, 0, b), b = 0);
|
|
4252
4485
|
}
|
|
4253
4486
|
}
|
|
4254
4487
|
}
|
|
4255
|
-
var
|
|
4256
|
-
function
|
|
4488
|
+
var Na = Fa;
|
|
4489
|
+
function Dr(a, e, t) {
|
|
4257
4490
|
return a << 8 & 63488 | e << 2 & 992 | t >> 3;
|
|
4258
4491
|
}
|
|
4259
|
-
function
|
|
4492
|
+
function Mr(a, e, t, i) {
|
|
4260
4493
|
return a >> 4 | e & 240 | (t & 240) << 4 | (i & 240) << 8;
|
|
4261
4494
|
}
|
|
4262
|
-
function
|
|
4495
|
+
function Rr(a, e, t) {
|
|
4263
4496
|
return a >> 4 << 8 | e & 240 | t >> 4;
|
|
4264
4497
|
}
|
|
4265
|
-
function
|
|
4498
|
+
function Lt(a, e, t) {
|
|
4266
4499
|
return a < e ? e : a > t ? t : a;
|
|
4267
4500
|
}
|
|
4268
|
-
function
|
|
4501
|
+
function Nt(a) {
|
|
4269
4502
|
return a * a;
|
|
4270
4503
|
}
|
|
4271
|
-
function
|
|
4504
|
+
function yn(a, e, t) {
|
|
4272
4505
|
var i = 0, n = 1e100;
|
|
4273
4506
|
let r = a[e], s = r.cnt;
|
|
4274
4507
|
r.ac;
|
|
@@ -4277,7 +4510,7 @@ function _n(a, e, t) {
|
|
|
4277
4510
|
let p = a[h], m = p.cnt, f = s * m / (s + m);
|
|
4278
4511
|
if (!(f >= n)) {
|
|
4279
4512
|
var u = 0;
|
|
4280
|
-
u += f *
|
|
4513
|
+
u += f * Nt(p.rc - o), !(u >= n) && (u += f * Nt(p.gc - l), !(u >= n) && (u += f * Nt(p.bc - c), !(u >= n) && (n = u, i = h)));
|
|
4281
4514
|
}
|
|
4282
4515
|
}
|
|
4283
4516
|
r.err = n, r.nn = i;
|
|
@@ -4285,42 +4518,42 @@ function _n(a, e, t) {
|
|
|
4285
4518
|
function ai() {
|
|
4286
4519
|
return { ac: 0, rc: 0, gc: 0, bc: 0, cnt: 0, nn: 0, fw: 0, bk: 0, tm: 0, mtm: 0, err: 0 };
|
|
4287
4520
|
}
|
|
4288
|
-
function
|
|
4521
|
+
function za(a, e) {
|
|
4289
4522
|
let t = e === "rgb444" ? 4096 : 65536, i = new Array(t), n = a.length;
|
|
4290
4523
|
if (e === "rgba4444") for (let r = 0; r < n; ++r) {
|
|
4291
|
-
let s = a[r], o = s >> 24 & 255, l = s >> 16 & 255, c = s >> 8 & 255, h = s & 255, u =
|
|
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();
|
|
4292
4525
|
p.rc += h, p.gc += c, p.bc += l, p.ac += o, p.cnt++;
|
|
4293
4526
|
}
|
|
4294
4527
|
else if (e === "rgb444") for (let r = 0; r < n; ++r) {
|
|
4295
|
-
let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, c = s & 255, h =
|
|
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();
|
|
4296
4529
|
u.rc += c, u.gc += l, u.bc += o, u.cnt++;
|
|
4297
4530
|
}
|
|
4298
4531
|
else for (let r = 0; r < n; ++r) {
|
|
4299
|
-
let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, c = s & 255, h =
|
|
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();
|
|
4300
4533
|
u.rc += c, u.gc += l, u.bc += o, u.cnt++;
|
|
4301
4534
|
}
|
|
4302
4535
|
return i;
|
|
4303
4536
|
}
|
|
4304
|
-
function
|
|
4537
|
+
function Ba(a, e, t = {}) {
|
|
4305
4538
|
let { format: i = "rgb565", clearAlpha: n = !0, clearAlphaColor: r = 0, clearAlphaThreshold: s = 0, oneBitAlpha: o = !1 } = t;
|
|
4306
4539
|
if (!a || !a.buffer) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
4307
4540
|
if (!(a instanceof Uint8Array) && !(a instanceof Uint8ClampedArray)) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
4308
|
-
let l = new Uint32Array(a.buffer), c = t.useSqrt !== !1, h = i === "rgba4444", u =
|
|
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);
|
|
4309
4542
|
for (var d = 0, g = 0; g < p; ++g) {
|
|
4310
|
-
let
|
|
4311
|
-
if (
|
|
4312
|
-
var _ = 1 /
|
|
4313
|
-
h && (
|
|
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;
|
|
4314
4547
|
}
|
|
4315
4548
|
}
|
|
4316
|
-
|
|
4549
|
+
Nt(e) / d < 0.022 && (c = !1);
|
|
4317
4550
|
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));
|
|
4318
4551
|
c && (u[g].cnt = Math.sqrt(u[g].cnt));
|
|
4319
4552
|
var y, x, b;
|
|
4320
4553
|
for (g = 0; g < d; ++g) {
|
|
4321
|
-
|
|
4322
|
-
var
|
|
4323
|
-
for (x = ++f[0]; x > 1 && (b = x >> 1, !(u[y = f[b]].err <=
|
|
4554
|
+
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;
|
|
4324
4557
|
f[x] = g;
|
|
4325
4558
|
}
|
|
4326
4559
|
var P = d - e;
|
|
@@ -4328,84 +4561,84 @@ function Fa(a, e, t = {}) {
|
|
|
4328
4561
|
for (var w; ; ) {
|
|
4329
4562
|
var C = f[1];
|
|
4330
4563
|
if (w = u[C], w.tm >= w.mtm && u[w.nn].mtm <= w.tm) break;
|
|
4331
|
-
w.mtm == m ? C = f[1] = f[f[0]--] : (
|
|
4332
|
-
var
|
|
4333
|
-
for (x = 1; (b = x + x) <= f[0] && (b < f[0] && u[f[b]].err > u[f[b + 1]].err && b++, !(
|
|
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;
|
|
4334
4567
|
f[x] = C;
|
|
4335
4568
|
}
|
|
4336
|
-
var
|
|
4337
|
-
h && (w.ac = _ * (
|
|
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;
|
|
4338
4571
|
}
|
|
4339
|
-
let
|
|
4572
|
+
let A = [];
|
|
4340
4573
|
var R = 0;
|
|
4341
4574
|
for (g = 0; ; ++R) {
|
|
4342
|
-
let
|
|
4343
|
-
h && (U =
|
|
4344
|
-
let Q = h ? [
|
|
4345
|
-
if (
|
|
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;
|
|
4346
4579
|
}
|
|
4347
|
-
return
|
|
4580
|
+
return A;
|
|
4348
4581
|
}
|
|
4349
|
-
function
|
|
4582
|
+
function $a(a, e) {
|
|
4350
4583
|
for (let t = 0; t < a.length; t++) {
|
|
4351
4584
|
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;
|
|
4352
4585
|
if (n && r) return !0;
|
|
4353
4586
|
}
|
|
4354
4587
|
return !1;
|
|
4355
4588
|
}
|
|
4356
|
-
function
|
|
4589
|
+
function Ga(a, e, t = "rgb565") {
|
|
4357
4590
|
if (!a || !a.buffer) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
4358
4591
|
if (!(a instanceof Uint8Array) && !(a instanceof Uint8ClampedArray)) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
4359
4592
|
if (e.length > 256) throw new Error("applyPalette() only works with 256 colors or less");
|
|
4360
4593
|
let i = new Uint32Array(a.buffer), n = i.length, r = t === "rgb444" ? 4096 : 65536, s = new Uint8Array(n), o = new Array(r);
|
|
4361
4594
|
if (t === "rgba4444") for (let l = 0; l < n; l++) {
|
|
4362
|
-
let c = i[l], h = c >> 24 & 255, u = c >> 16 & 255, p = c >> 8 & 255, m = c & 255, f =
|
|
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);
|
|
4363
4596
|
s[l] = d;
|
|
4364
4597
|
}
|
|
4365
4598
|
else {
|
|
4366
|
-
let l = t === "rgb444" ?
|
|
4599
|
+
let l = t === "rgb444" ? Rr : Dr;
|
|
4367
4600
|
for (let c = 0; c < n; c++) {
|
|
4368
|
-
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] =
|
|
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);
|
|
4369
4602
|
s[c] = d;
|
|
4370
4603
|
}
|
|
4371
4604
|
}
|
|
4372
4605
|
return s;
|
|
4373
4606
|
}
|
|
4374
|
-
function
|
|
4607
|
+
function Va(a, e, t, i, n) {
|
|
4375
4608
|
let r = 0, s = 1e100;
|
|
4376
4609
|
for (let o = 0; o < n.length; o++) {
|
|
4377
|
-
let l = n[o], c = l[3], h =
|
|
4610
|
+
let l = n[o], c = l[3], h = Ve(c - i);
|
|
4378
4611
|
if (h > s) continue;
|
|
4379
4612
|
let u = l[0];
|
|
4380
|
-
if (h +=
|
|
4613
|
+
if (h += Ve(u - a), h > s) continue;
|
|
4381
4614
|
let p = l[1];
|
|
4382
|
-
if (h +=
|
|
4615
|
+
if (h += Ve(p - e), h > s) continue;
|
|
4383
4616
|
let m = l[2];
|
|
4384
|
-
h +=
|
|
4617
|
+
h += Ve(m - t), !(h > s) && (s = h, r = o);
|
|
4385
4618
|
}
|
|
4386
4619
|
return r;
|
|
4387
4620
|
}
|
|
4388
|
-
function
|
|
4621
|
+
function Ha(a, e, t, i) {
|
|
4389
4622
|
let n = 0, r = 1e100;
|
|
4390
4623
|
for (let s = 0; s < i.length; s++) {
|
|
4391
|
-
let o = i[s], l = o[0], c =
|
|
4624
|
+
let o = i[s], l = o[0], c = Ve(l - a);
|
|
4392
4625
|
if (c > r) continue;
|
|
4393
4626
|
let h = o[1];
|
|
4394
|
-
if (c +=
|
|
4627
|
+
if (c += Ve(h - e), c > r) continue;
|
|
4395
4628
|
let u = o[2];
|
|
4396
|
-
c +=
|
|
4629
|
+
c += Ve(u - t), !(c > r) && (r = c, n = s);
|
|
4397
4630
|
}
|
|
4398
4631
|
return n;
|
|
4399
4632
|
}
|
|
4400
|
-
function
|
|
4633
|
+
function Ve(a) {
|
|
4401
4634
|
return a * a;
|
|
4402
4635
|
}
|
|
4403
|
-
function
|
|
4404
|
-
let { initialCapacity: e = 4096, auto: t = !0 } = a, i =
|
|
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;
|
|
4405
4638
|
return { reset() {
|
|
4406
4639
|
i.reset(), l = !1;
|
|
4407
4640
|
}, finish() {
|
|
4408
|
-
i.writeByte(
|
|
4641
|
+
i.writeByte(ka.trailer);
|
|
4409
4642
|
}, bytes() {
|
|
4410
4643
|
return i.bytes();
|
|
4411
4644
|
}, bytesView() {
|
|
@@ -4415,58 +4648,58 @@ function Va(a = {}) {
|
|
|
4415
4648
|
}, get stream() {
|
|
4416
4649
|
return i;
|
|
4417
4650
|
}, writeHeader: c, writeFrame(h, u, p, m = {}) {
|
|
4418
|
-
let { transparent: f = !1, transparentIndex: d = 0, delay: g = 0, palette: _ = null, repeat: y = 0, colorDepth: x = 8, dispose: b = -1 } = m,
|
|
4419
|
-
if (t ? l || (
|
|
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) {
|
|
4420
4653
|
if (!_) throw new Error("First frame must include a { palette } option");
|
|
4421
|
-
|
|
4654
|
+
Za(i, u, p, _, x), xn(i, _), y >= 0 && Ka(i, y);
|
|
4422
4655
|
}
|
|
4423
4656
|
let P = Math.round(g / 10);
|
|
4424
|
-
|
|
4425
|
-
let w = !!_ && !
|
|
4426
|
-
|
|
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);
|
|
4427
4660
|
} };
|
|
4428
4661
|
function c() {
|
|
4429
|
-
|
|
4662
|
+
Ir(i, "GIF89a");
|
|
4430
4663
|
}
|
|
4431
4664
|
}
|
|
4432
|
-
function
|
|
4665
|
+
function Ya(a, e, t, i, n) {
|
|
4433
4666
|
a.writeByte(33), a.writeByte(249), a.writeByte(4), n < 0 && (n = 0, i = !1);
|
|
4434
4667
|
var r, s;
|
|
4435
4668
|
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);
|
|
4436
4669
|
}
|
|
4437
|
-
function
|
|
4438
|
-
let r = 1, s = 0, o =
|
|
4670
|
+
function Za(a, e, t, i, n = 8) {
|
|
4671
|
+
let r = 1, s = 0, o = Hi(i.length) - 1, l = r << 7 | n - 1 << 4 | s << 3 | o;
|
|
4439
4672
|
Me(a, e), Me(a, t), a.writeBytes([l, 0, 0]);
|
|
4440
4673
|
}
|
|
4441
|
-
function
|
|
4442
|
-
a.writeByte(33), a.writeByte(255), a.writeByte(11),
|
|
4674
|
+
function Ka(a, e) {
|
|
4675
|
+
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);
|
|
4443
4676
|
}
|
|
4444
|
-
function
|
|
4445
|
-
let t = 1 <<
|
|
4677
|
+
function xn(a, e) {
|
|
4678
|
+
let t = 1 << Hi(e.length);
|
|
4446
4679
|
for (let i = 0; i < t; i++) {
|
|
4447
4680
|
let n = [0, 0, 0];
|
|
4448
4681
|
i < e.length && (n = e[i]), a.writeByte(n[0]), a.writeByte(n[1]), a.writeByte(n[2]);
|
|
4449
4682
|
}
|
|
4450
4683
|
}
|
|
4451
|
-
function
|
|
4684
|
+
function Xa(a, e, t, i) {
|
|
4452
4685
|
if (a.writeByte(44), Me(a, 0), Me(a, 0), Me(a, e), Me(a, t), i) {
|
|
4453
|
-
let n = 0, r = 0, s =
|
|
4686
|
+
let n = 0, r = 0, s = Hi(i.length) - 1;
|
|
4454
4687
|
a.writeByte(128 | n | r | 0 | s);
|
|
4455
4688
|
} else a.writeByte(0);
|
|
4456
4689
|
}
|
|
4457
|
-
function
|
|
4458
|
-
|
|
4690
|
+
function Wa(a, e, t, i, n = 8, r, s, o) {
|
|
4691
|
+
Na(t, i, e, n, a, r, s, o);
|
|
4459
4692
|
}
|
|
4460
4693
|
function Me(a, e) {
|
|
4461
4694
|
a.writeByte(e & 255), a.writeByte(e >> 8 & 255);
|
|
4462
4695
|
}
|
|
4463
|
-
function
|
|
4696
|
+
function Ir(a, e) {
|
|
4464
4697
|
for (var t = 0; t < e.length; t++) a.writeByte(e.charCodeAt(t));
|
|
4465
4698
|
}
|
|
4466
|
-
function
|
|
4699
|
+
function Hi(a) {
|
|
4467
4700
|
return Math.max(Math.ceil(Math.log2(a)), 1);
|
|
4468
4701
|
}
|
|
4469
|
-
class
|
|
4702
|
+
class qa {
|
|
4470
4703
|
renderer;
|
|
4471
4704
|
scene;
|
|
4472
4705
|
camera;
|
|
@@ -4557,9 +4790,9 @@ class Xa {
|
|
|
4557
4790
|
const { fps: t = 20, filename: i } = e, n = Math.round(1e3 / t);
|
|
4558
4791
|
console.log(`Generating GIF with ${this.frames.length} frames at ${t} fps...`);
|
|
4559
4792
|
try {
|
|
4560
|
-
const r = this.frames[0], s = r.width, o = r.height, l =
|
|
4793
|
+
const r = this.frames[0], s = r.width, o = r.height, l = Ba(r.data, 256), c = ja();
|
|
4561
4794
|
for (let f = 0; f < this.frames.length; f++) {
|
|
4562
|
-
const d = this.frames[f], g =
|
|
4795
|
+
const d = this.frames[f], g = Ga(d.data, l);
|
|
4563
4796
|
c.writeFrame(g, s, o, {
|
|
4564
4797
|
palette: f === 0 ? l : void 0,
|
|
4565
4798
|
// Only first frame needs palette
|
|
@@ -4593,7 +4826,7 @@ class Xa {
|
|
|
4593
4826
|
i.href = e, i.download = t, i.style.display = "none", document.body.appendChild(i), i.click(), document.body.removeChild(i);
|
|
4594
4827
|
}
|
|
4595
4828
|
}
|
|
4596
|
-
class
|
|
4829
|
+
class Qa extends Fr {
|
|
4597
4830
|
/**
|
|
4598
4831
|
* Constructs a new CSS2D object.
|
|
4599
4832
|
*
|
|
@@ -4610,8 +4843,8 @@ class Wa extends Ur {
|
|
|
4610
4843
|
return super.copy(e, t), this.element = e.element.cloneNode(!0), this.center = e.center, this;
|
|
4611
4844
|
}
|
|
4612
4845
|
}
|
|
4613
|
-
const qe = new se(),
|
|
4614
|
-
class
|
|
4846
|
+
const qe = new se(), bn = new An(), En = new An(), vn = new se(), wn = new se();
|
|
4847
|
+
class Ja {
|
|
4615
4848
|
/**
|
|
4616
4849
|
* Constructs a new CSS2D renderer.
|
|
4617
4850
|
*
|
|
@@ -4629,7 +4862,7 @@ class Ka {
|
|
|
4629
4862
|
height: n
|
|
4630
4863
|
};
|
|
4631
4864
|
}, this.render = function(f, d) {
|
|
4632
|
-
f.matrixWorldAutoUpdate === !0 && f.updateMatrixWorld(), d.parent === null && d.matrixWorldAutoUpdate === !0 && d.updateMatrixWorld(),
|
|
4865
|
+
f.matrixWorldAutoUpdate === !0 && f.updateMatrixWorld(), d.parent === null && d.matrixWorldAutoUpdate === !0 && d.updateMatrixWorld(), bn.copy(d.matrixWorldInverse), En.multiplyMatrices(d.projectionMatrix, bn), h(f, f, d), this.sortObjects && m(f);
|
|
4633
4866
|
}, this.setSize = function(f, d) {
|
|
4634
4867
|
i = f, n = d, r = i / 2, s = n / 2, l.style.width = f + "px", l.style.height = d + "px";
|
|
4635
4868
|
};
|
|
@@ -4644,7 +4877,7 @@ class Ka {
|
|
|
4644
4877
|
return;
|
|
4645
4878
|
}
|
|
4646
4879
|
if (f.isCSS2DObject) {
|
|
4647
|
-
qe.setFromMatrixPosition(f.matrixWorld), qe.applyMatrix4(
|
|
4880
|
+
qe.setFromMatrixPosition(f.matrixWorld), qe.applyMatrix4(En);
|
|
4648
4881
|
const _ = qe.z >= -1 && qe.z <= 1 && f.layers.test(g.layers) === !0, y = f.element;
|
|
4649
4882
|
y.style.display = _ === !0 ? "" : "none", _ === !0 && (f.onBeforeRender(t, d, g), y.style.transform = "translate(" + -100 * f.center.x + "%," + -100 * f.center.y + "%)translate(" + (qe.x * r + r) + "px," + (-qe.y * s + s) + "px)", y.parentNode !== l && l.appendChild(y), f.onAfterRender(t, d, g));
|
|
4650
4883
|
const x = {
|
|
@@ -4656,7 +4889,7 @@ class Ka {
|
|
|
4656
4889
|
h(f.children[_], d, g);
|
|
4657
4890
|
}
|
|
4658
4891
|
function u(f, d) {
|
|
4659
|
-
return vn.setFromMatrixPosition(f.matrixWorld),
|
|
4892
|
+
return vn.setFromMatrixPosition(f.matrixWorld), wn.setFromMatrixPosition(d.matrixWorld), vn.distanceToSquared(wn);
|
|
4660
4893
|
}
|
|
4661
4894
|
function p(f) {
|
|
4662
4895
|
const d = [];
|
|
@@ -4676,7 +4909,7 @@ class Ka {
|
|
|
4676
4909
|
}
|
|
4677
4910
|
}
|
|
4678
4911
|
}
|
|
4679
|
-
const
|
|
4912
|
+
const eo = {
|
|
4680
4913
|
// Major economies
|
|
4681
4914
|
CN: [35, 105],
|
|
4682
4915
|
IN: [22, 78],
|
|
@@ -4775,7 +5008,7 @@ const qa = {
|
|
|
4775
5008
|
UY: [-33, -56],
|
|
4776
5009
|
CR: [10, -84],
|
|
4777
5010
|
PA: [9, -80]
|
|
4778
|
-
},
|
|
5011
|
+
}, to = /* @__PURE__ */ new Set([
|
|
4779
5012
|
"CN",
|
|
4780
5013
|
"IN",
|
|
4781
5014
|
"US",
|
|
@@ -4806,7 +5039,7 @@ const qa = {
|
|
|
4806
5039
|
"PK",
|
|
4807
5040
|
"BD",
|
|
4808
5041
|
"VN"
|
|
4809
|
-
]),
|
|
5042
|
+
]), io = /* @__PURE__ */ new Set([
|
|
4810
5043
|
"CN",
|
|
4811
5044
|
"IN",
|
|
4812
5045
|
"US",
|
|
@@ -4814,7 +5047,7 @@ const qa = {
|
|
|
4814
5047
|
"RU",
|
|
4815
5048
|
"AU",
|
|
4816
5049
|
"CA"
|
|
4817
|
-
]),
|
|
5050
|
+
]), no = /* @__PURE__ */ new Set(["RU", "CA", "US", "CN", "BR", "AU"]), ro = /* @__PURE__ */ new Set([
|
|
4818
5051
|
"IN",
|
|
4819
5052
|
"AR",
|
|
4820
5053
|
"KZ",
|
|
@@ -4845,7 +5078,7 @@ const qa = {
|
|
|
4845
5078
|
"TR",
|
|
4846
5079
|
"CL",
|
|
4847
5080
|
"MM"
|
|
4848
|
-
]),
|
|
5081
|
+
]), so = /* @__PURE__ */ new Set([
|
|
4849
5082
|
"AF",
|
|
4850
5083
|
"UA",
|
|
4851
5084
|
"MG",
|
|
@@ -4887,7 +5120,7 @@ const qa = {
|
|
|
4887
5120
|
"IQ",
|
|
4888
5121
|
"BD"
|
|
4889
5122
|
]);
|
|
4890
|
-
class
|
|
5123
|
+
class ao {
|
|
4891
5124
|
labelRenderer;
|
|
4892
5125
|
labels = [];
|
|
4893
5126
|
labelGroup;
|
|
@@ -4897,7 +5130,7 @@ class no {
|
|
|
4897
5130
|
globe = null;
|
|
4898
5131
|
camera = null;
|
|
4899
5132
|
constructor(e, t) {
|
|
4900
|
-
this.sphereRadius = t, this.labelRenderer = new
|
|
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();
|
|
4901
5134
|
}
|
|
4902
5135
|
injectStyles() {
|
|
4903
5136
|
const e = document.createElement("style");
|
|
@@ -4984,15 +5217,15 @@ class no {
|
|
|
4984
5217
|
`, document.head.appendChild(e);
|
|
4985
5218
|
}
|
|
4986
5219
|
getSizeCategory(e) {
|
|
4987
|
-
return
|
|
5220
|
+
return no.has(e) ? "large" : ro.has(e) ? "medium" : so.has(e) ? "small" : "tiny";
|
|
4988
5221
|
}
|
|
4989
5222
|
createLabels() {
|
|
4990
5223
|
Tr.forEach((e) => {
|
|
4991
|
-
const t =
|
|
5224
|
+
const t = eo[e.code];
|
|
4992
5225
|
if (!t) return;
|
|
4993
5226
|
const [i, n] = t, r = this.getSizeCategory(e.code), s = document.createElement("div");
|
|
4994
5227
|
s.className = `country-label hidden size-${r}`, s.textContent = e.name;
|
|
4995
|
-
const o = new
|
|
5228
|
+
const o = new Qa(s), l = {
|
|
4996
5229
|
element: s,
|
|
4997
5230
|
object: o,
|
|
4998
5231
|
country: e,
|
|
@@ -5043,10 +5276,10 @@ class no {
|
|
|
5043
5276
|
n = !1;
|
|
5044
5277
|
break;
|
|
5045
5278
|
case "minimal":
|
|
5046
|
-
n =
|
|
5279
|
+
n = io.has(i);
|
|
5047
5280
|
break;
|
|
5048
5281
|
case "major":
|
|
5049
|
-
n =
|
|
5282
|
+
n = to.has(i);
|
|
5050
5283
|
break;
|
|
5051
5284
|
case "all":
|
|
5052
5285
|
case "capitals":
|
|
@@ -5220,7 +5453,7 @@ const wi = {
|
|
|
5220
5453
|
}
|
|
5221
5454
|
};
|
|
5222
5455
|
wi.lifeExpectancy;
|
|
5223
|
-
const
|
|
5456
|
+
const $e = 50, oo = `
|
|
5224
5457
|
uniform float uMorph;
|
|
5225
5458
|
uniform float uTime;
|
|
5226
5459
|
uniform float uParchment;
|
|
@@ -5240,7 +5473,7 @@ varying float vDiscard;
|
|
|
5240
5473
|
varying float vExtrudeAmount;
|
|
5241
5474
|
|
|
5242
5475
|
const float PI = 3.14159265359;
|
|
5243
|
-
const float RADIUS = ${
|
|
5476
|
+
const float RADIUS = ${$e.toFixed(1)};
|
|
5244
5477
|
|
|
5245
5478
|
// Hash functions for procedural variation
|
|
5246
5479
|
float hash(vec2 p) {
|
|
@@ -5430,7 +5663,7 @@ void main() {
|
|
|
5430
5663
|
|
|
5431
5664
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);
|
|
5432
5665
|
}
|
|
5433
|
-
`,
|
|
5666
|
+
`, lo = `
|
|
5434
5667
|
uniform sampler2D uTexture;
|
|
5435
5668
|
uniform sampler2D uDataTexture;
|
|
5436
5669
|
uniform sampler2D uCloudTexture;
|
|
@@ -5587,13 +5820,13 @@ void main() {
|
|
|
5587
5820
|
|
|
5588
5821
|
gl_FragColor = vec4(color, 1.0);
|
|
5589
5822
|
}
|
|
5590
|
-
`,
|
|
5823
|
+
`, ho = `
|
|
5591
5824
|
varying vec3 vNormal;
|
|
5592
5825
|
varying vec3 vPosition;
|
|
5593
5826
|
uniform float uMorph;
|
|
5594
5827
|
|
|
5595
5828
|
const float PI = 3.14159265359;
|
|
5596
|
-
const float RADIUS = ${
|
|
5829
|
+
const float RADIUS = ${$e.toFixed(1)};
|
|
5597
5830
|
|
|
5598
5831
|
void main() {
|
|
5599
5832
|
vNormal = normalize(normalMatrix * normal);
|
|
@@ -5622,7 +5855,7 @@ void main() {
|
|
|
5622
5855
|
vPosition = pos;
|
|
5623
5856
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);
|
|
5624
5857
|
}
|
|
5625
|
-
`,
|
|
5858
|
+
`, co = `
|
|
5626
5859
|
varying vec3 vNormal;
|
|
5627
5860
|
varying vec3 vPosition;
|
|
5628
5861
|
uniform float uMorph;
|
|
@@ -5637,7 +5870,7 @@ void main() {
|
|
|
5637
5870
|
|
|
5638
5871
|
gl_FragColor = vec4(color, intensity * 0.6);
|
|
5639
5872
|
}
|
|
5640
|
-
`,
|
|
5873
|
+
`, uo = `
|
|
5641
5874
|
attribute float aSize;
|
|
5642
5875
|
attribute float aPhase;
|
|
5643
5876
|
uniform float uTime;
|
|
@@ -5654,7 +5887,7 @@ void main() {
|
|
|
5654
5887
|
gl_PointSize = aSize * (300.0 / -mvPosition.z) * twinkle;
|
|
5655
5888
|
gl_Position = projectionMatrix * mvPosition;
|
|
5656
5889
|
}
|
|
5657
|
-
`,
|
|
5890
|
+
`, po = `
|
|
5658
5891
|
varying float vOpacity;
|
|
5659
5892
|
|
|
5660
5893
|
void main() {
|
|
@@ -5664,14 +5897,14 @@ void main() {
|
|
|
5664
5897
|
|
|
5665
5898
|
gl_FragColor = vec4(1.0, 1.0, 1.0, alpha * vOpacity * 0.9);
|
|
5666
5899
|
}
|
|
5667
|
-
`,
|
|
5900
|
+
`, Pn = {
|
|
5668
5901
|
satellite: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_atmos_2048.jpg",
|
|
5669
5902
|
natural: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_day_4096.jpg",
|
|
5670
5903
|
dark: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_lights_2048.png",
|
|
5671
5904
|
light: "https://raw.githubusercontent.com/turban/webgl-earth/master/images/2_no_clouds_4k.jpg",
|
|
5672
5905
|
night: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_lights_2048.png",
|
|
5673
5906
|
topographic: "https://eoimages.gsfc.nasa.gov/images/imagerecords/74000/74117/world.topo.200407.3x5400x2700.jpg"
|
|
5674
|
-
},
|
|
5907
|
+
}, Cn = {
|
|
5675
5908
|
texture: "satellite",
|
|
5676
5909
|
labels: "all",
|
|
5677
5910
|
statistic: "lifeExpectancy",
|
|
@@ -5687,7 +5920,7 @@ void main() {
|
|
|
5687
5920
|
},
|
|
5688
5921
|
extrudeHeight: !1
|
|
5689
5922
|
};
|
|
5690
|
-
class
|
|
5923
|
+
class mo {
|
|
5691
5924
|
container;
|
|
5692
5925
|
config;
|
|
5693
5926
|
// Three.js core
|
|
@@ -5726,31 +5959,31 @@ class uo {
|
|
|
5726
5959
|
} else
|
|
5727
5960
|
this.container = e;
|
|
5728
5961
|
this.config = {
|
|
5729
|
-
...
|
|
5962
|
+
...Cn,
|
|
5730
5963
|
...t,
|
|
5731
|
-
effects: { ...
|
|
5964
|
+
effects: { ...Cn.effects, ...t.effects }
|
|
5732
5965
|
}, this.init();
|
|
5733
5966
|
}
|
|
5734
5967
|
async init() {
|
|
5735
5968
|
const e = this.config.width || this.container.clientWidth || 800, t = this.config.height || this.container.clientHeight || 600;
|
|
5736
|
-
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
|
|
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();
|
|
5737
5970
|
}
|
|
5738
5971
|
async createGlobe() {
|
|
5739
5972
|
const e = await this.textureLoader.loadAsync(
|
|
5740
|
-
|
|
5973
|
+
Pn[this.config.texture]
|
|
5741
5974
|
);
|
|
5742
5975
|
e.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), e.minFilter = M.LinearMipmapLinearFilter, e.magFilter = M.LinearFilter;
|
|
5743
5976
|
const t = document.createElement("canvas");
|
|
5744
5977
|
t.width = 2048, t.height = 1024, this.dataTexture = new M.CanvasTexture(t);
|
|
5745
5978
|
const i = new M.PlaneGeometry(
|
|
5746
|
-
Math.PI * 2 *
|
|
5747
|
-
Math.PI *
|
|
5979
|
+
Math.PI * 2 * $e,
|
|
5980
|
+
Math.PI * $e,
|
|
5748
5981
|
256,
|
|
5749
5982
|
128
|
|
5750
5983
|
);
|
|
5751
5984
|
this.material = new M.ShaderMaterial({
|
|
5752
|
-
vertexShader:
|
|
5753
|
-
fragmentShader:
|
|
5985
|
+
vertexShader: oo,
|
|
5986
|
+
fragmentShader: lo,
|
|
5754
5987
|
uniforms: {
|
|
5755
5988
|
// Core uniforms
|
|
5756
5989
|
uMorph: { value: 0 },
|
|
@@ -5795,13 +6028,13 @@ class uo {
|
|
|
5795
6028
|
}
|
|
5796
6029
|
createAtmosphere() {
|
|
5797
6030
|
const e = new M.PlaneGeometry(
|
|
5798
|
-
Math.PI * 2 *
|
|
5799
|
-
Math.PI *
|
|
6031
|
+
Math.PI * 2 * $e * 1.15,
|
|
6032
|
+
Math.PI * $e * 1.15,
|
|
5800
6033
|
128,
|
|
5801
6034
|
64
|
|
5802
6035
|
), t = new M.ShaderMaterial({
|
|
5803
|
-
vertexShader:
|
|
5804
|
-
fragmentShader:
|
|
6036
|
+
vertexShader: ho,
|
|
6037
|
+
fragmentShader: co,
|
|
5805
6038
|
uniforms: {
|
|
5806
6039
|
uMorph: { value: 0 }
|
|
5807
6040
|
},
|
|
@@ -5820,8 +6053,8 @@ class uo {
|
|
|
5820
6053
|
}
|
|
5821
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));
|
|
5822
6055
|
const s = new M.ShaderMaterial({
|
|
5823
|
-
vertexShader:
|
|
5824
|
-
fragmentShader:
|
|
6056
|
+
vertexShader: uo,
|
|
6057
|
+
fragmentShader: po,
|
|
5825
6058
|
uniforms: {
|
|
5826
6059
|
uTime: { value: 0 },
|
|
5827
6060
|
uTwinkle: { value: this.config.effects.starTwinkle ? 1 : 0 }
|
|
@@ -5833,7 +6066,7 @@ class uo {
|
|
|
5833
6066
|
this.stars = new M.Points(t, s), this.scene.add(this.stars);
|
|
5834
6067
|
}
|
|
5835
6068
|
createGUI() {
|
|
5836
|
-
this.gui = new
|
|
6069
|
+
this.gui = new Vi({ title: "Globe Controls", width: 300 });
|
|
5837
6070
|
const e = this.gui.addFolder("View");
|
|
5838
6071
|
e.add({ toGlobe: () => this.toGlobe() }, "toGlobe").name("→ Globe"), e.add({ toFlat: () => this.toFlat() }, "toFlat").name("→ Flat Map"), e.add({ morph: this.morph }, "morph", 0, 1).name("Morph").onChange((r) => this.setMorph(r)), e.open();
|
|
5839
6072
|
const t = this.gui.addFolder("Statistics"), i = Object.keys(wi);
|
|
@@ -5897,7 +6130,7 @@ class uo {
|
|
|
5897
6130
|
return;
|
|
5898
6131
|
}
|
|
5899
6132
|
this.currentStatistic = e;
|
|
5900
|
-
const i =
|
|
6133
|
+
const i = Da.find((n) => n.id === e);
|
|
5901
6134
|
if (i && this.choropleth) {
|
|
5902
6135
|
const n = this.choropleth.renderTexture(i);
|
|
5903
6136
|
if (this.material && n) {
|
|
@@ -5906,13 +6139,27 @@ class uo {
|
|
|
5906
6139
|
}
|
|
5907
6140
|
}
|
|
5908
6141
|
this.legend && i && this.legend.show(i);
|
|
6142
|
+
} else {
|
|
6143
|
+
const t = e;
|
|
6144
|
+
if (this.currentStatistic = t.definition.id, this.choropleth) {
|
|
6145
|
+
const i = this.choropleth.renderCustomTexture(
|
|
6146
|
+
t.values,
|
|
6147
|
+
t.definition.colorScale,
|
|
6148
|
+
t.definition.domain
|
|
6149
|
+
);
|
|
6150
|
+
if (this.material && i) {
|
|
6151
|
+
const n = new M.CanvasTexture(i);
|
|
6152
|
+
n.needsUpdate = !0, this.material.uniforms.uDataTexture.value = n, this.material.uniforms.uDataOverlay.value = 1, this.material.uniforms.uDataOpacity.value = 0.7;
|
|
6153
|
+
}
|
|
6154
|
+
}
|
|
6155
|
+
this.legend && this.legend.show(t.definition);
|
|
5909
6156
|
}
|
|
5910
6157
|
}
|
|
5911
6158
|
setLabels(e) {
|
|
5912
6159
|
this.countryLabels?.setStyle(e);
|
|
5913
6160
|
}
|
|
5914
6161
|
async setTexture(e) {
|
|
5915
|
-
const t =
|
|
6162
|
+
const t = Pn[e];
|
|
5916
6163
|
if (!(!t || !this.material))
|
|
5917
6164
|
try {
|
|
5918
6165
|
const i = await this.textureLoader.loadAsync(t);
|
|
@@ -5952,7 +6199,9 @@ class uo {
|
|
|
5952
6199
|
}
|
|
5953
6200
|
export {
|
|
5954
6201
|
wi as BUILT_IN_STATISTICS,
|
|
5955
|
-
|
|
5956
|
-
Tr as WORLD_STATISTICS
|
|
6202
|
+
mo as GlobeViz,
|
|
6203
|
+
Tr as WORLD_STATISTICS,
|
|
6204
|
+
Ia as normalizeCountryValues,
|
|
6205
|
+
gn as toNumericCode
|
|
5957
6206
|
};
|
|
5958
6207
|
//# sourceMappingURL=gralobe.js.map
|