1/*! 2 * InertiaPlugin 3.8.0 3 * https://greensock.com 4 * 5 * @license Copyright 2021, GreenSock. All rights reserved. 6 * 7 */ 8 9!(function (t, e) { 10 "object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e(((t = t || self).window = t.window || {})); 11})(this, function (e) { 12 "use strict"; 13 function m() { 14 return n || ("undefined" != typeof window && (n = window.gsap)); 15 } 16 function p(t) { 17 return s(t).id; 18 } 19 function q(t) { 20 return f[p("string" == typeof t ? g(t)[0] : t)]; 21 } 22 function r(t) { 23 var e, 24 n = a; 25 if (0.05 <= t - i) for (i = t; n; ) ((e = n.g(n.t, n.p)) !== n.v1 || 0.2 < t - n.t1) && ((n.v2 = n.v1), (n.v1 = e), (n.t2 = n.t1), (n.t1 = t)), (n = n._next); 26 } 27 function t() { 28 (n = m()) && ((g = n.utils.toArray), (o = n.utils.getUnit), (s = n.core.getCache), (c = n.ticker), (l = 1)); 29 } 30 function u(t, e, n, i) { 31 (this.t = t), (this.p = e), (this.g = t._gsap.get), (this.rCap = d[n || o(this.g(t, e))]), (this.v1 = this.v2 = 0), (this.t1 = this.t2 = c.time), i && ((this._next = i)._prev = this); 32 } 33 var n, 34 l, 35 g, 36 o, 37 a, 38 c, 39 i, 40 s, 41 f = {}, 42 d = { deg: 360, rad: 2 * Math.PI }, 43 h = (function () { 44 function VelocityTracker(e, n) { 45 l || t(), (this.target = g(e)[0]), ((f[p(this.target)] = this)._props = {}), n && this.add(n); 46 } 47 VelocityTracker.register = function register(e) { 48 (n = e), t(); 49 }; 50 var e = VelocityTracker.prototype; 51 return ( 52 (e.get = function get(t, e) { 53 var n, 54 i, 55 r = this._props[t] || console.warn("Not tracking " + t + " velocity."); 56 return ( 57 (n = parseFloat(e ? r.v1 : r.g(r.t, r.p)) - parseFloat(r.v2)), 58 (i = r.rCap) && (n %= i) !== n % (i / 2) && (n = n < 0 ? n + i : n - i), 59 (function _round(t) { 60 return Math.round(1e4 * t) / 1e4; 61 })(n / ((e ? r.t1 : c.time) - r.t2)) 62 ); 63 }), 64 (e.getAll = function getAll() { 65 var t, 66 e = {}, 67 n = this._props; 68 for (t in n) e[t] = this.get(t); 69 return e; 70 }), 71 (e.isTracking = function isTracking(t) { 72 return t in this._props; 73 }), 74 (e.add = function add(t, e) { 75 t in this._props || (a || (c.add(r), (i = c.time)), (a = this._props[t] = new u(this.target, t, e, a))); 76 }), 77 (e.remove = function remove(t) { 78 var e, 79 n, 80 i = this._props[t]; 81 i && ((e = i._prev), (n = i._next), e && (e._next = n), n ? (n._prev = e) : a === i && (c.remove(r), (a = 0)), delete this._props[t]); 82 }), 83 (e.kill = function kill(t) { 84 for (var e in this._props) this.remove(e); 85 t || delete f[p(this.target)]; 86 }), 87 (VelocityTracker.track = function track(e, n, i) { 88 l || t(); 89 for (var r, o, a = [], c = g(e), s = n.split(","), u = (i || "").split(","), f = c.length; f--; ) { 90 for (r = q(c[f]) || new VelocityTracker(c[f]), o = s.length; o--; ) r.add(s[o], u[o] || u[0]); 91 a.push(r); 92 } 93 return a; 94 }), 95 (VelocityTracker.untrack = function untrack(t, e) { 96 var n = (e || "").split(","); 97 g(t).forEach(function (t) { 98 var e = q(t); 99 e && 100 (n.length
101 ? n.forEach(function (t) { 102 return e.remove(t); 103 }) 104 : e.kill(1)); 105 }); 106 }), 107 (VelocityTracker.isTracking = function isTracking(t, e) { 108 var n = q(t); 109 return n && n.isTracking(e); 110 }), 111 (VelocityTracker.getVelocity = function getVelocity(t, e) { 112 var n = q(t); 113 return n && n.isTracking(e) ? n.get(e) : console.warn("Not tracking velocity of " + e); 114 }), 115 VelocityTracker 116 ); 117 })(); 118 (h.getByTarget = q), m() && n.registerPlugin(h); 119 function J() { 120 return v || ("undefined" != typeof window && (v = window.gsap) && v.registerPlugin && v); 121 } 122 function L(t) { 123 return "number" == typeof t; 124 } 125 function M(t) { 126 return "object" == typeof t; 127 } 128 function N(t) { 129 return "function" == typeof t; 130 } 131 function Q() { 132 return String.fromCharCode.apply(null, arguments); 133 } 134 function U(t) { 135 return t; 136 } 137 function Y(t) { 138 return Math.round(1e4 * t) / 1e4; 139 } 140 function Z(t, e, n) { 141 for (var i in e) i in t || i === n || (t[i] = e[i]); 142 return t; 143 } 144 function $(t) { 145 var e, 146 n, 147 i = {}; 148 for (e in t) i[e] = M((n = t[e])) && !B(n) ? $(n) : n; 149 return i; 150 } 151 function _(t, e, n, i, r) { 152 var o, 153 a, 154 c, 155 s, 156 u = e.length, 157 f = 0, 158 l = R; 159 if (M(t)) { 160 for (; u--; ) { 161 for (c in ((o = e[u]), (a = 0), t)) a += (s = o[c] - t[c]) * s; 162 a < l && ((f = u), (l = a)); 163 } 164 if ((r || R) < R && r < Math.sqrt(l)) return t; 165 } else for (; u--; ) (a = (o = e[u]) - t) < 0 && (a = -a), a < l && i <= o && o <= n && ((f = u), (l = a)); 166 return e[f]; 167 } 168 function aa(t, e, n, i, r, o, a) { 169 if ("auto" === t.end) return t; 170 var c, 171 s, 172 u = t.end; 173 if (((n = isNaN(n) ? R : n), (i = isNaN(i) ? -R : i), M(e))) { 174 if (((c = e.calculated ? e : (N(u) ? u(e, a) : _(e, u, n, i, o)) || e), !e.calculated)) { 175 for (s in c) e[s] = c[s]; 176 e.calculated = !0; 177 } 178 c = c[r]; 179 } else c = N(u) ? u(e, a) : B(u) ? _(e, u, n, i, o) : parseFloat(u); 180 return n < c ? (c = n) : c < i && (c = i), { max: c, min: c, unitFactor: t.unitFactor }; 181 } 182 function ba(t, e, n) { 183 return isNaN(t[e]) ? n : +t[e]; 184 } 185 function ca(t, e) { 186 return (0.05 * e * t) / k; 187 } 188 function da(t, e, n) { 189 return Math.abs(((e - t) * k) / n / 0.05); 190 } 191 function fa(t, e, n, i) { 192 if (e.linkedProps) { 193 var r, 194 o, 195 a, 196 c, 197 s, 198 u, 199 f = e.linkedProps.split(","), 200 l = {}; 201 for (r = 0; r < f.length; r++) (a = e[(o = f[r])]) && ((c = L(a.velocity) ? a.velocity : (s = s || C(t)) && s.isTracking(o) ? s.get(o) : 0), (u = Math.abs(c / ba(a, "resistance", i))), (l[o] = parseFloat(n(t, o)) + ca(c, u))); 202 return l; 203 } 204 } 205 function ha() { 206 (v = J()) && 207 ((y = v.parseEase), 208 (x = v.utils.toArray), 209 (P = v.utils.getUnit), 210 (V = v.core.getCache), 211 (O = v.utils.clamp), 212 (w = y("power3")), 213 (k = w(0.05)), 214 (F = v.core.PropTween), 215 v.config({ resistance: 100, unitFactors: { time: 1e3, totalTime: 1e3, progress: 1e3, totalProgress: 1e3 } }), 216 (b = v.config()), 217 v.registerPlugin(h), 218 (T = 1)); 219 } 220 var v, 221 T, 222 y, 223 x, 224 w, 225 b, 226 P, 227 F, 228 V, 229 k, 230 O, 231 A, 232 C = h.getByTarget, 233 E = "InertiaPlugin", 234 j = '', 235 I = '', 236 B = Array.isArray, 237 R = 1e10, 238 W = { resistance: 1, checkpoint: 1, preventOvershoot: 1, linkedProps: 1, radius: 1, duration: 1 }, 239 S = { 240 version: "3.8.0", 241 name: "inertia", 242 register: function register(t) { 243 (v = t), ha(); 244 }, 245 init: function init(t, e, n, i, r) { 246 T || ha(); 247 var o = C(t); 248 if ("auto" === e) { 249 if (!o) return void console.warn("No inertia tracking on " + t + ". InertiaPlugin.track(target) first."); 250 e = o.getAll(); 251 }
252 (this.target = t), (this.tween = n), (A = e); 253 var a, 254 c, 255 s, 256 u, 257 f, 258 l, 259 p, 260 g, 261 d, 262 h = t._gsap, 263 v = h.get, 264 m = e.duration, 265 y = M(m), 266 w = e.preventOvershoot || (y && 0 === m.overshoot), 267 Q = ba(e, "resistance", b.resistance), 268 k = L(m) 269 ? m 270 : (function _calculateTweenDuration(t, e, n, i, r, o) { 271 if ( 272 (void 0 === n && (n = 10), 273 void 0 === i && (i = 0.2), 274 void 0 === r && (r = 1), 275 void 0 === o && (o = 0), 276 (function _isString(t) { 277 return "string" == typeof t; 278 })(t) && (t = x(t)[0]), 279 !t) 280 ) 281 return 0; 282 var a, 283 c, 284 s, 285 u, 286 f, 287 l, 288 p, 289 g, 290 d, 291 h, 292 v = 0, 293 m = R, 294 y = e.inertia || e, 295 w = V(t).get, 296 Q = ba(y, "resistance", b.resistance); 297 for (a in ((h = fa(t, y, w, Q)), y)) 298 W[a] || 299 ((c = y[a]), 300 M(c) || ((g = g || C(t)) && g.isTracking(a) ? (c = L(c) ? { velocity: c } : { velocity: g.get(a) }) : ((u = +c || 0), (s = Math.abs(u / Q)))), 301 M(c) && 302 ((u = L(c.velocity) ? c.velocity : (g = g || C(t)) && g.isTracking(a) ? g.get(a) : 0), 303 (s = O(i, n, Math.abs(u / ba(c, "resistance", Q)))), 304 (l = (f = parseFloat(w(t, a)) || 0) + ca(u, s)), 305 "end" in c && ((c = aa(c, h && a in h ? h : l, c.max, c.min, a, y.radius, u)), o && (A === e && (A = y = $(e)), (y[a] = Z(c, y[a], "end")))), 306 "max" in c && l > +c.max + 1e-10 307 ? ((d = c.unitFactor || b.unitFactors[a] || 1), (p = (f > c.max && c.min !== c.max) || (-15 < u * d && u * d < 45) ? i + 0.1 * (n - i) : da(f, c.max, u)) + r < m && (m = p + r)) 308 : "min" in c && 309 l < c.min - 1e-10 && 310 ((d = c.unitFactor || b.unitFactors[a] || 1), (p = (f < c.min && c.min !== c.max) || (-45 < u * d && u * d < 15) ? i + 0.1 * (n - i) : da(f, c.min, u)) + r < m && (m = p + r)), 311 v < p && (v = p)), 312 v < s && (v = s)); 313 return m < v && (v = m), n < v ? n : v < i ? i : v; 314 })(t, e, (y && m.max) || 10, (y && m.min) || 0.2, y && "overshoot" in m ? +m.overshoot : w ? 0 : 1, !0); 315 for (a in ((e = A), (A = 0), (d = fa(t, e, v, Q)), e)) 316 W[a] || 317 ((c = e[a]), 318 N(c) && (c = c(i, t, r)), 319 L(c) ? (f = c) : M(c) && !isNaN(c.velocity) ? (f = +c.velocity) : o && o.isTracking(a) ? (f = o.get(a)) : console.warn("ERROR: No velocity was defined for " + t + " property: " + a), 320 (l = ca(f, k)), 321 (g = 0), 322 (s = v(t, a)), 323 (u = P(s)), 324 (s = parseFloat(s)), 325 M(c) && 326 ((p = s + l), 327 "end" in c && (c = aa(c, d && a in d ? d : p, c.max, c.min, a, e.radius, f)), 328 "max" in c && +c.max < p ? (w || c.preventOvershoot ? (l = c.max - s) : (g = c.max - s - l)) : "min" in c && +c.min > p && (w || c.preventOvershoot ? (l = c.min - s) : (g = c.min - s - l))), 329 this._props.push(a), 330 (this._pt = new F(this._pt, t, a, s, 0, U, 0, h.set(t, a, this))), 331 (this._pt.u = u || 0), 332 (this._pt.c1 = l), 333 (this._pt.c2 = g)); 334 return n.duration(k), I; 335 }, 336 render: function render(t, e) { 337 var n = e._pt; 338 for (t = w(e.tween._time / e.tween._dur); n; ) n.set(n.t, n.p, Y(n.s + n.c1 * t + n.c2 * t * t) + n.u, n.d, t), (n = n._next); 339 }, 340 }; 341 "track,untrack,isTracking,getVelocity,getByTarget".split(",").forEach(function (t) { 342 return (S[t] = h[t]); 343 }), 344 J() && v.registerPlugin(S), 345 (e.InertiaPlugin = S), 346 (e.VelocityTracker = h), 347 (e.default = S); 348 if (typeof window === "undefined" || window !== e) { 349 Object.defineProperty(e, "__esModule", { value: !0 }); 350 } else { 351 delete e.default; 352 } 353});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.