vendor: 5,016 bytes, lines 1-59
1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8802],{ 2/***/25317: 3/***/function(t,e,r){ 4/* unused harmony exports Animation, Timeline, Tween, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ, TweenMax, TweenLite, TimelineMax, TimelineLite, default, wrap, wrapYoyo, distribute, random, snap, normalize, clamp, splitColor, toArray, selector, mapRange, pipe, unitize, interpolate, shuffle, _setDefaults, _removeLinkedListItem, _roundModifier */ 5function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e} 6/*! 7 * GSAP 3.13.0 8 * https://gsap.com 9 * 10 * @license Copyright 2008-2025, GreenSock. All rights reserved. 11 * Subject to the terms at https://gsap.com/standard-license 12 * @author: Jack Doyle, [email protected] 13*/ 14/* eslint-disable */ 15/* harmony export */r.d(e,{ 16/* harmony export */$i:function(){/* binding */return ut}, 17/* harmony export */DY:function(){/* binding */return dt}, 18/* harmony export */Fc:function(){/* binding */return b}, 19/* harmony export */Fo:function(){/* binding */return dr}, 20/* harmony export */GN:function(){/* binding */return De}, 21/* harmony export */JV:function(){/* binding */return cr}, 22/* harmony export */Ks:function(){/* binding */return ur}, 23/* harmony export */Ok:function(){/* binding */return pt}, 24/* harmony export */Pr:function(){/* binding */return vt}, 25/* harmony export */S5:function(){/* binding */return sr}, 26/* harmony export */SI:function(){/* binding */return V}, 27/* harmony export */UI:function(){/* binding */return le}, 28/* harmony export */Wy:function(){/* binding */return ee}, 29/* harmony export */bQ:function(){/* binding */return W}, 30/* harmony export */cy:function(){/* binding */return yt}, 31/* harmony export */d4:function(){/* binding */return j}, 32/* harmony export */fS:function(){/* binding */return mt}, 33/* harmony export */if:function(){/* binding */return $e}, 34/* harmony export */kr:function(){/* binding */return Ae}, 35/* harmony export */l1:function(){/* binding */return qe}, 36/* harmony export */lC:function(){/* binding */return X}, 37/* harmony export */m2:function(){/* binding */return I}, 38/* harmony export */p8:function(){/* binding */return Ar}, 39/* harmony export */r9:function(){/* binding */return z}, 40/* harmony export */xr:function(){/* binding */return Ce} 41/* harmony export */});var s,a,o,u,h,f,_,l,c,d, 42/* 43 * -------------------------------------------------------------------------------------- 44 * TICKER 45 * -------------------------------------------------------------------------------------- 46 */ 47p,m,v,g,y,T,w,b={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},k={duration:.5,overwrite:!1,delay:0},x=1e8,D=1e-8,M=2*Math.PI,A=M/4,C=0,R=Math.sqrt,E=Math.cos,S=Math.sin,z=function(t){return"string"==typeof t},O=function(t){return"function"==typeof t},P=function(t){return"number"==typeof t},I=function(t){return void 0===t},F=function(t){return"object"==typeof t},L=function(t){return!1!==t},U=function(){return"undefined"!=typeof window},B=function(t){return O(t)||z(t)},N="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){}, 48// note: IE10 has ArrayBuffer, but NOT ArrayBuffer.isView(). 49q=Array.isArray,Q=/(?:-?\.?\d|\.)+/gi, 50//only numbers (including negatives and decimals) but NOT relative values. 51V=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, 52//finds any numbers, including ones that start with += or -=, negative numbers, and ones in scientific notation like 1e-8. 53j=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,G=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, 54//duplicate so that while we're looping through matches from exec(), it doesn't contaminate the lastIndex of _numExp which we use to search for colors too. 55W=/[+-]=-?[.\d]+/,Y=/[^,'"\[\]\s]+/gi, 56// previously /[#\-+.]*\b[a-z\d\-=+%.]+/gi but didn't catch special characters. 57$=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,H={},J={},K=function(t){return(J=At(t,H))&&Ar},X=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},Z=function(t,e){return!e&&console.warn(t)},tt=function(t,e){return t&&(H[t]=e)&&J&&(J[t]=e)||H},et=function(){return 0},rt={suppressEvents:!0,isStart:!0,kill:!1},it={suppressEvents:!0,kill:!1},nt={suppressEvents:!0},st={},at=[],ot={},ut={},ht={},ft=30,_t=[],lt="",ct=function(t){var e,r,i=t[0];if(F(i)||O(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for( 58// find the first target with a harness. We assume targets passed into an animation will be of similar type, meaning the same kind of harness can be used for them all (performance optimization) 59r=_t.length;r--&&!_t[r].targetTest(i););e=_t[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new qe(t[r],e)))||t.splice(r,1);return t},dt=function(t){return t._gsap||ct(ne(t))[0]._gsap},pt=function(t,e,r){return(r=t[e])&&O(r)?t[e]():I(r)&&t.getAttribute&&t.getAttribute(e)||r}
vendor: 5,577 bytes, lines 59-88
59,mt=function(t,e){return(t=t.split(",")).forEach(e)||t}, 60//split a comma-delimited list of names into an array, then run a forEach() function and return the split array (this is just a way to consolidate/shorten some code). 61vt=function(t){return Math.round(1e5*t)/1e5||0},gt=function(t){return Math.round(1e7*t)/1e7||0}, 62// increased precision mostly for timing values. 63yt=function(t,e){var r=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),"+"===r?t+i:"-"===r?t-i:"*"===r?t*i:t/i},Tt=function(t,e){for( 64//searches one array to find matches for any of the items in the toFind array. As soon as one is found, it returns true. It does NOT return all the matches; it's simply a boolean search. 65var r=e.length,i=0;t.indexOf(e[i])<0&&++i<r;);return i<r},wt=function(){var t,e,r=at.length,i=at.slice(0);for(ot={},at.length=0,t=0;t<r;t++)(e=i[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)},bt=function(t){return!!(t._initted||t._startAt||t.add)},kt=function(t,e,r,i){at.length&&!a&&wt(),t.render(e,r,i||!!(a&&e<0&&bt(t))),at.length&&!a&&wt()},xt=function(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(Y).length<2?e:z(t)?t.trim():t},Dt=function(t){return t},Mt=function(t,e){for(var r in e)r in t||(t[r]=e[r]);return t},At=function(t,e){for(var r in e)t[r]=e[r];return t},Ct=function t(e,r){for(var i in r)"__proto__"!==i&&"constructor"!==i&&"prototype"!==i&&(e[i]=F(r[i])?t(e[i]||(e[i]={}),r[i]):r[i]);return e},Rt=function(t,e){var r,i={};for(r in t)r in e||(i[r]=t[r]);return i},Et=function(t){var e,r=t.parent||u,i=t.keyframes?(e=q(t.keyframes),function(t,r){for(var i in r)i in t||"duration"===i&&e||"ease"===i||(t[i]=r[i])}):Mt;if(L(t.inherit))for(;r;)i(t,r.vars.defaults),r=r.parent||r._dp;return t},St=function(t,e,r,i,n){void 0===r&&(r="_first"),void 0===i&&(i="_last");var s,a=t[i];if(n)for(s=e[n];a&&a[n]>s;)a=a._prev;return a?(e._next=a._next,a._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[i]=e,e._prev=a,e.parent=e._dp=t,e},zt=function(t,e,r,i){void 0===r&&(r="_first"),void 0===i&&(i="_last");var n=e._prev,s=e._next;n?n._next=s:t[r]===e&&(t[r]=s),s?s._prev=n:t[i]===e&&(t[i]=n),e._next=e._prev=e.parent=null},Ot=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},Pt=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for( 66// performance optimization: if a child animation is passed in we should only uncache if that child EXTENDS the animation (its end time is beyond the end) 67var r=t;r;)r._dirty=1,r=r.parent;return t},It=function(t,e,r,i){return t._startAt&&(a?t._startAt.revert(it):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))},Ft=function t(e){return!e||e._ts&&t(e.parent)},Lt=function(t){return t._repeat?Ut(t._tTime,t=t.duration()+t._rDelay)*t:0}, 68// feed in the totalTime and cycleDuration and it'll return the cycle (iteration minus 1) and if the playhead is exactly at the very END, it will NOT bump up to the next cycle. 69Ut=function(t,e){var r=Math.floor(t=gt(t/e));return t&&r===t?r-1:r},Bt=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},Nt=function(t){return t._end=gt(t._start+(t._tDur/Math.abs(t._ts||t._rts||D)||0))},qt=function(t,e){ 70// adjusts the animation's _start and _end according to the provided totalTime (only if the parent's smoothChildTiming is true and the animation isn't paused). It doesn't do any rendering or forcing things back into parent timelines, etc. - that's what totalTime() is for. 71var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=gt(r._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Nt(t),r._dirty||Pt(r,t)),t}, 72/* 73_totalTimeToTime = (clampedTotalTime, duration, repeat, repeatDelay, yoyo) => { 74 let cycleDuration = duration + repeatDelay, 75 time = _round(clampedTotalTime % cycleDuration); 76 if (time > duration) { 77 time = duration; 78 } 79 return (yoyo && (~~(clampedTotalTime / cycleDuration) & 1)) ? duration - time : time; 80}, 81*/ 82Qt=function(t,e){var r;//if the timeline has already ended but the inserted tween/timeline extends the duration, we should enable this timeline again so that it renders properly. We should also align the playhead with the parent timeline's when appropriate. 83if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&( 84// in case, for example, the _start is moved on a tween that has already rendered, or if it's being inserted into a timeline BEFORE where the playhead is currently. Imagine it's at its end state, then the startTime is moved WAY later (after the end of this timeline), it should render at its beginning. Special case: if it's a timeline (has .add() method) and no duration, we can skip rendering because the user may be populating it AFTER adding it to a parent timeline (unconventional, but possible, and we wouldn't want it to get removed if the parent's autoRemoveChildren is true). 85r=Bt(t.rawTime(),e),(!e._dur||te(0,e.totalDuration(),r)-e._tTime>D)&&e.render(r,!0)),Pt(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){ 86//in case any of the ancestors had completed but should now be enabled... 87if(t._dur<t.duration())for(r=t;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),//moves the timeline (shifts its startTime) if necessary, and also enables it. If it's currently zero, though, it may not be scheduled to render until later so there's no need to force it to align with the current playhead position. Only move to catch up with the playhead. 88r=r._dp;t._zTime=-1e-8}},Vt=function(t,e,r,i){// if the timeline is reversed and the new child makes it longer, we may
vendor: 16,919 bytes, lines 88-163
88need to adjust the parent's _start (push it back) 89return e.parent&&Ot(e),e._start=gt((P(r)?r:r||t!==u?Kt(t,r,e):t._time)+e._delay),e._end=gt(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),St(t,e,"_first","_last",t._sort?"_start":0),Yt(e)||(t._recent=e),i||Qt(t,e),t._ts<0&&qt(t,t._tTime),t},jt=function(t,e){return(H.ScrollTrigger||X("scrollTrigger",e))&&H.ScrollTrigger.create(e,t)},Gt=function(t,e,r,i,n){return He(t,e,n),t._initted?!r&&t._pt&&!a&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&c!==Ce.frame?(at.push(t),t._lazy=[n,i],1):void 0:1},Wt=function t(e){var r=e.parent;return r&&r._ts&&r._initted&&!r._lock&&(r.rawTime()<0||t(r))}, 90// check parent's _lock because when a timeline repeats/yoyos and does its artificial wrapping, we shouldn't force the ratio back to 0 91Yt=function(t){var e=t.data;return"isFromStart"===e||"isStart"===e},$t=function(t,e,r,i){var n=t._repeat,s=gt(e)||0,a=t._tTime/t._tDur;return a&&!i&&(t._time*=s/t._dur),t._dur=s,t._tDur=n?n<0?1e10:gt(s*(n+1)+t._rDelay*n):s,a>0&&!i&&qt(t,t._tTime=t._tDur*a),t.parent&&Nt(t),r||Pt(t.parent,t),t},Ht=function(t){return t instanceof Ve?Pt(t):$t(t,t._dur)},Jt={_start:0,endTime:et,totalDuration:et},Kt=function t(e,r,i){var 92//in case there's a child that infinitely repeats, users almost never intend for the insertion point of a new child to be based on a SUPER long value like that so we clip it and assume the most recently-added child's endTime should be used instead. 93n,s,a,o=e.labels,u=e._recent||Jt,h=e.duration()>=x?u.endTime(!1):e._dur;return z(r)&&(isNaN(r)||r in o)?( 94//if the string is a number like "1", check to see if there's a label with that name, otherwise interpret it as a number (absolute value). 95s=r.charAt(0),a="%"===r.substr(-1),n=r.indexOf("="),"<"===s||">"===s?(n>=0&&(r=r.replace(/=/,"")),("<"===s?u._start:u.endTime(u._repeat>=0))+(parseFloat(r.substr(1))||0)*(a?(n<0?u:i).totalDuration()/100:1)):n<0?(r in o||(o[r]=h),o[r]):(s=parseFloat(r.charAt(n-1)+r.substr(n+1)),a&&i&&(s=s/100*(q(i)?i[0]:i).totalDuration()),n>1?t(e,r.substr(0,n-1),i)+s:h+s)):null==r?h:+r},Xt=function(t,e,r){var i,n,s=P(e[1]),a=(s?2:1)+(t<2?0:1),o=e[a];if(s&&(o.duration=e[1]),o.parent=r,t){for(i=o,n=r;n&&!("immediateRender"in i);) 96// inheritance hasn't happened yet, but someone may have set a default in an ancestor timeline. We could do vars.immediateRender = _isNotFalse(_inheritDefaults(vars).immediateRender) but that'd exact a slight performance penalty because _inheritDefaults() also runs in the Tween constructor. We're paying a small kb price here to gain speed. 97i=n.vars.defaults||{},n=L(n.vars.inherit)&&n.parent;o.immediateRender=L(i.immediateRender),t<2?o.runBackwards=1:o.startAt=e[a-1]}return new tr(e[0],o,e[a+1])},Zt=function(t,e){return t||0===t?e(t):e},te=function(t,e,r){return r<t?t:r>e?e:r},ee=function(t,e){return z(t)&&(e=$.exec(t))?e[1]:""},re=[].slice,ie=function(t,e){return t&&F(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&F(t[0]))&&!t.nodeType&&t!==h}, 98//takes any value and returns an array. If it's a string (and leaveStrings isn't true), it'll use document.querySelectorAll() and convert that to an array. It'll also accept iterables like jQuery objects. 99ne=function(t,e,r){return o&&!e&&o.selector?o.selector(t):!z(t)||r||!f&&Re()?q(t)?function(t,e,r){return void 0===r&&(r=[]),t.forEach((function(t){var i;return z(t)&&!e||ie(t,1)?(i=r).push.apply(i,ne(t)):r.push(t)}))||r}(t,r):ie(t)?re.call(t,0):t?[t]:[]:re.call((e||_).querySelectorAll(t),0)},se=function(t){return t=ne(t)[0]||Z("Invalid scope")||{},function(e){var r=t.current||t.nativeElement||t;return ne(e,r.querySelectorAll?r:r===t?Z("Invalid scope")||_.createElement("div"):t)}},ae=function(t){return t.sort((function(){return.5-Math.random()}))}, 100// alternative that's a bit faster and more reliably diverse but bigger: for (let j, v, i = a.length; i; j = (Math.random() * i) | 0, v = a[--i], a[i] = a[j], a[j] = v); return a; 101//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length, each}. Returns a function that expects the following parameters: index, target, array. Recognizes the following 102oe=function(t){if(O(t))return t;var e=F(t)?t:{each:t}, 103//n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all. 104r=Fe(e.ease),i=e.from||0,n=parseFloat(e.base)||0,s={},a=i>0&&i<1,o=isNaN(i)||a,u=e.axis,h=i,f=i;return z(i)?h=f={center:.5,edges:.5,end:1}[i]||0:!a&&o&&(h=i[0],f=i[1]),function(t,a,_){var l,c,d,p,m,v,g,y,T,w=(_||e).length,b=s[w];if(!b){if(!(T="auto"===e.grid?0:(e.grid||[1,x])[1])){for(g=-x;g<(g=_[T++].getBoundingClientRect().left)&&T<w;);T<w&&T--}for(b=s[w]=[],l=o?Math.min(T,w)*h-.5:i%T,c=T===x?0:o?w*f/T-.5:i/T|0,g=0,y=x,v=0;v<w;v++)d=v%T-l,p=c-(v/T|0),b[v]=m=u?Math.abs("y"===u?p:d):R(d*d+p*p),m>g&&(g=m),m<y&&(y=m);"random"===i&&ae(b),b.max=g-y,b.min=y,b.v=w=(parseFloat(e.amount)||parseFloat(e.each)*(T>w?w-1:u?"y"===u?w/T:T:Math.max(T,w/T))||0)*("edges"===i?-1:1),b.b=w<0?n-w:n,b.u=ee(e.amount||e.each)||0,//unit 105r=r&&w<0?Pe(r):r}return w=(b[t]-b.min)/b.max||0,gt(b.b+(r?r(w):w)*b.v)+b.u;//round in order to work around floating point errors 106}},ue=function(t){ 107//pass in 0.1 get a function that'll round to the nearest tenth, or 5 to round to the closest 5, or 0.001 to the closest 1000th, etc. 108var e=Math.pow(10,((t+"").split(".")[1]||"").length);//to avoid floating point math errors (like 24 * 0.1 == 2.4000000000000004), we chop off at a specific number of decimal places (much faster than toFixed()) 109return function(r){var i=gt(Math.round(parseFloat(r)/t)*t*e);return(i-i%1)/e+(P(r)?0:ee(r));// n - n % 1 replaces Math.floor() in order to handle negative values properly. For example, Math.floor(-150.00000000000003) is 151! 110}},he=function(t,e){var r,i,n=q(t);return!n&&F(t)&&(r=n=t.radius||x,t.values?(t=ne(t.values),(i=!P(t[0]))&&(r*=r)):t=ue(t.increment)),Zt(e,n?O(t)?function(e){return i=t(e),Math.abs(i-e)<=r?i:e}:function(e){for(var n,s,a=parseFloat(i?e.x:e),o=parseFloat(i?e.y:0),u=x,h=0,f=t.length;f--;)(n=i?(n=t[f].x-a)*n+(s=t[f].y-o)*s:Math.abs(t[f]-a))<u&&(u=n,h=f);return h=!r||u<=r?t[h]:e,i||h===e||P(e)?h:h+ee(e)}:ue(t))},fe=function(t,e,r,i){return Zt(q(t)?!e:!0===r?!!(r=0):!i,(function(){return q(t)?t[~~(Math.random()*t.length)]:(r=r||1e-5)&&(i=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((t-r/2+Math.random()*(e-t+.99*r))/r)*r*i)/i}))},_e=function(t,e,r){return Zt(r,(function(r){return t[~~e(r)]}))},le=function(t){for( 111//replaces all occurrences of random(...) in a string with the calculated random value. can be a range like random(-100, 100, 5) or an array like random([0, 100, 500]) 112var e,r,i,n,s=0,a="";~(e=t.indexOf("random(",s));)i=t.indexOf(")",e),n="["===t.charAt(e+7),r=t.substr(e+7,i-e-7).match(n?Y:Q),a+=t.substr(s,e-s)+fe(n?r:+r[0],n?0:+r[1],+r[2]||1e-5),s=i+1;return a+t.substr(s,t.length-s)},ce=function(t,e,r,i,n){var s=e-t,a=i-r;return Zt(n,(function(e){return r+((e-t)/s*a||0)}))},de=function(t,e,r){ 113//used for nextLabel() and previousLabel() 114var i,n,s,a=t.labels,o=x;for(i in a)(n=a[i]-e)<0==!!r&&n&&o>(n=Math.abs(n))&&(s=i,o=n);return s},pe=function(t,e,r){var i,n,s,a=t.vars,u=a[e],h=o,f=t._ctx;if(u)return i=a[e+"Params"],n=a.callbackScope||t,r&&at.length&&wt(),//in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values. 115f&&(o=f),s=i?u.apply(n,i):u.call(n),o=h,s},me=function(t){return Ot(t),t.scrollTrigger&&t.scrollTrigger.kill(!!a),t.progress()<1&&pe(t,"onInterrupt"),t},ve=[],ge=function(t){if(t)// UMD packaging wraps things oddly, so for example MotionPathHelper becomes {MotionPathHelper:MotionPathHelper, default:MotionPathHelper}. 116if(t=!t.name&&t.default||t,U()||t.headless){ 117// edge case: some build tools may pass in a null/undefined value 118var e=t.name,r=O(t),i=e&&!r&&t.init?function(){this._props=[]}:t, 119//in case someone passes in an object that's not a plugin, like CustomEase 120n={init:et,render:hr,add:Ye,kill:_r,modifier:fr,rawVars:0},s={targetTest:0,get:0,getSetter:sr,aliases:{},register:0};if(Re(),t!==i){if(ut[e])return;Mt(i,Mt(Rt(t,n),s)),//static methods 121At(i.prototype,At(n,Rt(t,s))),//instance methods 122ut[i.prop=e]=i,t.targetTest&&(_t.push(i),st[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}tt(e,i),t.register&&t.register(Ar,i,dr)}else ve.push(t)}, 123/* 124 * -------------------------------------------------------------------------------------- 125 * COLORS 126 * -------------------------------------------------------------------------------------- 127 */ 128ye=255,Te={aqua:[0,ye,ye],lime:[0,ye,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,ye],navy:[0,0,128],white:[ye,ye,ye],olive:[128,128,0],yellow:[ye,ye,0],orange:[ye,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[ye,0,0],pink:[ye,192,203],cyan:[0,ye,ye],transparent:[ye,ye,ye,0]}, 129// possible future idea to replace the hard-coded color name values - put this in the ticker.wake() where we set the _doc: 130// let ctx = _doc.createElement("canvas").getContext("2d"); 131// _forEachName("aqua,lime,silver,black,maroon,teal,blue,navy,white,olive,yellow,orange,gray,purple,green,red,pink,cyan", color => {ctx.fillStyle = color; _colorLookup[color] = splitColor(ctx.fillStyle)}); 132we=function(t,e,r){return(6*(t+=t<0?1:t>1?-1:0)<1?e+(r-e)*t*6:t<.5?r:3*t<2?e+(r-e)*(2/3-t)*6:e)*ye+.5|0},be=function(t,e,r){var i,n,s,a,o,u,h,f,_,l,c=t?P(t)?[t>>16,t>>8&ye,t&ye]:0:Te.black;if(!c){if(","===t.substr(-1)&&( 133//sometimes a trailing comma is included and we should chop it off (typically from a comma-delimited list of values like a textShadow:"2px 2px 2px blue, 5px 5px 5px rgb(255,0,0)" - in this example "blue," has a trailing comma. We could strip it out inside parseComplex() but we'd need to do it to the beginning and ending values plus it wouldn't provide protection from other potential scenarios like if the user passes in a similar value. 134t=t.substr(0,t.length-1)),Te[t])c=Te[t];else if("#"===t.charAt(0)){if(t.length<6&&( 135//for shorthand like #9F0 or #9F0F (could have alpha) 136i=t.charAt(1),n=t.charAt(2),s=t.charAt(3),t="#"+i+i+n+n+s+s+(5===t.length?t.charAt(4)+t.charAt(4):"")),9===t.length)return[( 137// hex with alpha, like #fd5e53ff 138c=parseInt(t.substr(1,6),16))>>16,c>>8&ye,c&ye,parseInt(t.substr(7),16)/255];c=[(t=parseInt(t.substr(1),16))>>16,t>>8&ye,t&ye]}else if("hsl"===t.substr(0,3))if(c=l=t.match(Q),e){if(~t.indexOf("=")) 139//if relative values are found, just return the raw strings with the relative prefixes in place. 140return c=t.match(V),r&&c.length<4&&(c[3]=1),c}else a=+c[0]%360/360,o=+c[1]/100,i=2*(u=+c[2]/100)-(n=u<=.5?u*(o+1):u+o-u*o),c.length>3&&(c[3]*=1),//cast as number 141c[0]=we(a+1/3,i,n),c[1]=we(a,i,n),c[2]=we(a-1/3,i,n);else c=t.match(Q)||Te.transparent;c=c.map(Number)}return e&&!l&&(i=c[0]/ye,n=c[1]/ye,s=c[2]/ye,u=((h=Math.max(i,n,s))+(f=Math.min(i,n,s)))/2,h===f?a=o=0:(_=h-f,o=u>.5?_/(2-h-f):_/(h+f),a=h===i?(n-s)/_+(n<s?6:0):h===n?(s-i)/_+2:(i-n)/_+4,a*=60),c[0]=~~(a+.5),c[1]=~~(100*o+.5),c[2]=~~(100*u+.5)),r&&c.length<4&&(c[3]=1),c},ke=function(t){ 142// strips out the colors from the string, finds all the numeric slots (with units) and returns an array of those. The Array also has a "c" property which is an Array of the index values where the colors belong. This is to help work around issues where there's a mis-matched order of color/numeric data like drop-shadow(#f00 0px 1px 2px) and drop-shadow(0x 1px 2px #f00). This is basically a helper function used in _formatColors() 143var e=[],r=[],i=-1;return t.split(De).forEach((function(t){var n=t.match(j)||[];e.push.apply(e,n),r.push(i+=n.length+1)})),e.c=r,e},xe=function(t,e,r){var i,n,s,a,o="",u=(t+o).match(De),h=e?"hsla(":"rgba(",f=0;if(!u)return t;if(u=u.map((function(t){return(t=be(t,e,1))&&h+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"})),r&&(s=ke(t),(i=r.c).join(o)!==s.c.join(o)))for(a=(n=t.replace(De,"1").split(j)).length-1;f<a;f++)o+=n[f]+(~i.indexOf(f)?u.shift()||h+"0,0,0,0)":(s.length?s:u.length?u:r).shift());if(!n)for(a=(n=t.split(De)).length-1;f<a;f++)o+=n[f]+u[f];return o+n[a]},De=function(){var 144//we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc., 145t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Te)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),Me=/hsl[a]?\(/,Ae=function(t){var e,r=t.join(" ");if(De.lastIndex=0,De.test(r))// make sure the order of numbers/colors match with the END value. 146return e=Me.test(r),t[1]=xe(t[1],e),t[0]=xe(t[0],e,ke(t[1])),!0},Ce=function(){var t,e,r,i,n,s,a=Date.now,o=500,u=33,c=a(),d=c,m=1e3/240,v=m,g=[],y=function r(h){var f,_,l,p,y=a()-d,T=!0===h;//make sure the request is made before we dispatch the "tick" event so that timing is maintained. Otherwise, if processing the "tick" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise. 147if((y>o||y<0)&&(c+=y-u),((f=(l=(d+=y)-c)-v)>0||T)&&(p=++i.frame,n=l-1e3*i.time,i.time=l/=1e3,v+=f+(f>=m?4:m-f),_=1),T||(t=e(r)),_)for(s=0;s<g.length;s++) 148// use _i and check _listeners.length instead of a variable because a listener could get removed during the loop, and if that happens to an element less than the current index, it'd throw things off in the loop. 149g[s](l,n,p,h)};return i={time:0,frame:0,tick:function(){y(!0)},deltaRatio:function(t){return n/(1e3/(t||60))},wake:function(){l&&(!f&&U()&&(h=f=window,_=h.document||{},H.gsap=Ar,(h.gsapVersions||(h.gsapVersions=[])).push(Ar.version),K(J||h.GreenSockGlobals||!h.gsap&&h||{}),ve.forEach(ge)),r="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,t&&i.sleep(),e=r||function(t){return setTimeout(t,v-1e3*i.time+1|0)},p=1,y(2))},sleep:function(){(r?cancelAnimationFrame:clearTimeout)(t),p=0,e=et},lagSmoothing:function(t,e){o=t||Infinity,// zero should be interpreted as basically unlimited 150u=Math.min(e||33,o)},fps:function(t){m=1e3/(t||240),v=1e3*i.time+m},add:function(t,e,r){var n=e?function(e,r,s,a){t(e,r,s,a),i.remove(n)}:t;return i.remove(t),g[r?"unshift":"push"](n),Re(),n},remove:function(t,e){~(e=g.indexOf(t))&&g.splice(e,1)&&s>=e&&s--},_listeners:g}}(),Re=function(){return!p&&Ce.wake()}, 151//also ensures the core classes are initialized. 152/* 153* ------------------------------------------------- 154* EASING 155* ------------------------------------------------- 156*/ 157Ee={},Se=/^[\d.\-M][\d.\-,\s]/,ze=/["']/g,Oe=function(t){for( 158//takes a string like "{wiggles:10, type:anticipate})" and turns it into a real object. Notice it ends in ")" and includes the {} wrappers. This is because we only use this function for parsing ease configs and prioritized optimization rather than reusability. 159var e,r,i,n={},s=t.substr(1,t.length-3).split(":"),a=s[0],o=1,u=s.length;o<u;o++)r=s[o],e=o!==u-1?r.lastIndexOf(","):r.length,i=r.substr(0,e),n[a]=isNaN(i)?i.replace(ze,"").trim():+i,a=r.substr(e+1).trim();return n},Pe=function(t){return function(e){return 1-t(1-e)}}, 160// allow yoyoEase to be set in children and have those affected when the parent/ancestor timeline yoyos. 161Ie=function t(e,r){for(var i,n=e._first;n;)n instanceof Ve?t(n,r):!n.vars.yoyoEase||n._yoyo&&n._repeat||n._yoyo===r||(n.timeline?t(n.timeline,r):(i=n._ease,n._ease=n._yEase,n._yEase=i,n._yoyo=r)),n=n._next},Fe=function(t,e){return t&&(O(t)?t:Ee[t]||function(t){ 162//name can be a string like "elastic.out(1,0.5)", and pass in _easeMap as obj and it'll parse it out and call the actual function like _easeMap.Elastic.easeOut.config(1,0.5). It will also parse custom ease strings as long as CustomEase is loaded and registered (internally as _easeMap._CE). 163var e,r,i,n,s=(t+"").split("("),a=Ee[s[0]];return a&&s.length>1&&a.config?a.config.apply(null,~t.indexOf("{")?[Oe(s[1])]:(e=t,r=e.indexOf("(")+1,i=e.indexOf(")"),n=e.indexOf("(",r),e.substring(r,~n&&n<i?e.indexOf(")",i+1):i)).split(",").map(xt)):Ee._CE&&Se.test(t)?Ee._CE("",t):a}(t))||e},Le=function(t,e,r,i){void 0===r&&(r=function(t){return 1-e(1-t)}),void 0===i&&(i=function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var n,s={easeIn:e,easeOut:r,easeInOut:i};return mt(t,(function(t){for(var e in Ee[t]=H[t]=s,Ee[n=t.toLowerCase()]=r,s)Ee[n+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Ee[t+"."+e]=s[e]})),s},Ue=function(t){return function(e){return e<.5?(1-t(1-2*e))/2:.5+t(2*(e-.5))/2}},Be=function t(e,r,i){var n=r>=1?r:1,
vendor: 1,479 bytes, lines 164-179
164//note: if amplitude is < 1, we simply adjust the period for a more natural feel. Otherwise the math doesn't work right and the curve starts at 1. 165s=(i||(e?.3:.45))/(r<1?r:1),a=s/M*(Math.asin(1/n)||0),o=function(t){return 1===t?1:n*Math.pow(2,-10*t)*S((t-a)*s)+1},u="out"===e?o:"in"===e?function(t){return 1-o(1-t)}:Ue(o);return s=M/s,//precalculate to optimize 166u.config=function(r,i){return t(e,r,i)},u},Ne=function t(e,r){void 0===r&&(r=1.70158);var i=function(t){return t?--t*t*((r+1)*t+r)+1:0},n="out"===e?i:"in"===e?function(t){return 1-i(1-t)}:Ue(i);return n.config=function(r){return t(e,r)},n};// a cheaper (kb and cpu) but more mild way to get a parameterized weighted ease by feeding in a value between -1 (easeIn) and 1 (easeOut) where 0 is linear. 167// _weightedEase = ratio => { 168// let y = 0.5 + ratio / 2; 169// return p => (2 * (1 - p) * p * y + p * p); 170// }, 171// a stronger (but more expensive kb/cpu) parameterized weighted ease that lets you feed in a value between -1 (easeIn) and 1 (easeOut) where 0 is linear. 172// _weightedEaseStrong = ratio => { 173// ratio = .5 + ratio / 2; 174// let o = 1 / 3 * (ratio < .5 ? ratio : 1 - ratio), 175// b = ratio - o, 176// c = ratio + o; 177// return p => p === 1 ? p : 3 * b * (1 - p) * (1 - p) * p + 3 * c * (1 - p) * p * p + p * p * p; 178// }; 179mt("Linear,Quad,Cubic,Quart,Quint,Strong",(function(t,e){var r=e<5?e+1:e;Le(t+",Power"+(r-1),e?function(t){return Math.pow(t,r)}:function(t){return t},(function(t){return 1-Math.pow(1-t,r)}
vendor: 11,237 bytes, lines 179-224
179),(function(t){return t<.5?Math.pow(2*t,r)/2:1-Math.pow(2*(1-t),r)/2}))})),Ee.Linear.easeNone=Ee.none=Ee.Linear.easeIn,Le("Elastic",Be("in"),Be("out"),Be()),m=7.5625,y=2*(g=1/(v=2.75)),T=2.5*g,Le("Bounce",(function(t){return 1-w(1-t)}),w=function(t){return t<g?m*t*t:t<y?m*Math.pow(t-1.5/v,2)+.75:t<T?m*(t-=2.25/v)*t+.9375:m*Math.pow(t-2.625/v,2)+.984375}),Le("Expo",(function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)})),// previously 2 ** (10 * (p - 1)) but that doesn't end up with the value quite at the right spot so we do a blended ease to ensure it lands where it should perfectly. 180Le("Circ",(function(t){return-(R(1-t*t)-1)})),Le("Sine",(function(t){return 1===t?1:1-E(t*A)})),Le("Back",Ne("in"),Ne("out"),Ne()),Ee.SteppedEase=Ee.steps=H.SteppedEase={config:function(t,e){void 0===t&&(t=1);var r=1/t,i=t+(e?0:1),n=e?1:0;return function(t){return((i*te(0,.99999999,t)|0)+n)*r}}},k.ease=Ee["quad.out"],mt("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(t){return lt+=t+","+t+"Params,"})); 181/* 182 * -------------------------------------------------------------------------------------- 183 * CACHE 184 * -------------------------------------------------------------------------------------- 185 */ 186var qe=function(t,e){this.id=C++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:pt,this.set=e?e.getSetter:sr},Qe=function(){function t(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=Infinity===t.repeat?-2:t.repeat||0)&&( 187// TODO: repeat: Infinity on a timeline's children must flag that timeline internally and affect its totalDuration, otherwise it'll stop in the negative direction when reaching the start. 188this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,$t(this,+t.duration,1,1),this.data=t.data,o&&(this._ctx=o,o.data.push(this)),p||Ce.wake()}var e=t.prototype;return e.delay=function(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},e.duration=function(t){return arguments.length?this.totalDuration(this._repeat>0?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},e.totalDuration=function(t){return arguments.length?(this._dirty=0,$t(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(t,e){if(Re(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){// edge case: if this is a child of a timeline that already completed, for example, we must re-activate the parent. 189//in case any of the ancestor timelines had completed but should now be enabled, we should reset their totalTime() which will also ensure that they're lined up properly and enabled. Skip for animations that are on the root (wasteful). Example: a TimelineLite.exportRoot() is performed when there's a paused tween on the root, the export will not complete until that tween is unpaused, but imagine a child gets restarted later, after all [unpaused] tweens have completed. The start of that child would get pushed out, but one of the ancestors may have completed. 190for(qt(this,t),!r._dp||r.parent||Qt(r,this);r&&r.parent;)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;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&t<this._tDur||this._ts<0&&t>0||!this._tDur&&!t)&& 191//if the animation doesn't have a parent, put it back into its last parent (recorded as _dp for exactly cases like this). Limit to parents with autoRemoveChildren (like globalTimeline) so that if the user manually removes an animation from a timeline and then alters its playhead, it doesn't get added back in. 192Vt(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===D||!t&&!this._initted&&(this.add||this._ptLookup))&&( 193// check for _ptLookup on a Tween instance to ensure it has actually finished being instantiated, otherwise if this.reverse() gets called in the Animation constructor, it could trigger a render() here even though the _targets weren't populated, thus when _init() is called there won't be any PropTweens (it'll act like the tween is non-functional) 194this._ts||(this._pTime=t),// otherwise, if an animation is paused, then the playhead is moved back to zero, then resumed, it'd revert back to the original time at the pause 195//if (!this._lock) { // avoid endless recursion (not sure we need this yet or if it's worth the performance hit) 196// this._lock = 1; 197kt(this,t,e)),this},e.time=function(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+Lt(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time;// note: if the modulus results in 0, the playhead could be exactly at the end or the beginning, and we always defer to the END with a non-zero value, otherwise if you set the time() to the very end (duration()), it would render at the START! 198},e.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+Lt(this),e):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(t,e){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*r,e):this._repeat?Ut(this._tTime,r)+1:1}// potential future addition: 199// isPlayingBackwards() { 200// let animation = this, 201// orientation = 1; // 1 = forward, -1 = backward 202// while (animation) { 203// orientation *= animation.reversed() || (animation.repeat() && !(animation.iteration() & 1)) ? -1 : 1; 204// animation = animation.parent; 205// } 206// return orientation < 0; 207// } 208,e.timeScale=function(t,e){if(!arguments.length)return-1e-8===this._rts?0:this._rts;// recorded timeScale. Special case: if someone calls reverse() on an animation with timeScale of 0, we assign it -_tinyNum to remember it's reversed. 209if(this._rts===t)return this;var r=this.parent&&this._ts?Bt(this.parent._time,this):this._tTime;// make sure to do the parentToChildTotalTime() BEFORE setting the new _ts because the old one must be used in that calculation. 210// future addition? Up side: fast and minimal file size. Down side: only works on this animation; if a timeline is reversed, for example, its childrens' onReverse wouldn't get called. 211//(+value < 0 && this._rts >= 0) && _callback(this, "onReverse", true); 212// prioritize rendering where the parent's playhead lines up instead of this._tTime because there could be a tween that's animating another tween's timeScale in the same rendering loop (same parent), thus if the timeScale tween renders first, it would alter _start BEFORE _tTime was set on that tick (in the rendering loop), effectively freezing it until the timeScale tween finishes. 213// if parent.smoothChildTiming was false, the end time didn't get updated in the _alignPlayhead() method, so do it here. 214return this._rts=+t||0,this._ts=this._ps||-1e-8===t?0:this._rts,// _ts is the functional timeScale which would be 0 if the animation is paused. 215this.totalTime(te(-Math.abs(this._delay),this.totalDuration(),r),!1!==e),Nt(this),function(t){for(var e=t.parent;e&&e.parent;) 216//sometimes we must force a re-sort of all children and update the duration/totalDuration of all ancestor timelines immediately in case, for example, in the middle of a render loop, one tween alters another tween's timeScale which shoves its startTime before 0, forcing the parent timeline to shift around and shiftChildren() which could affect that next tween's render (startTime). Doesn't matter for the root timeline though. 217e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},e.paused=function(t){return arguments.length?(// possible future addition - if an animation is removed from its parent and then .restart() or .play() or .resume() is called, perhaps we should force it back into the globalTimeline but be careful because what if it's already at its end? We don't want it to just persist forever and not get released for GC. 218// !this.parent && !value && this._tTime < this._tDur && this !== _globalTimeline && _globalTimeline.add(this); 219this._ps!==t&&(this._ps=t,t?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),// if the pause occurs during the delay phase, make sure that's factored in when resuming. 220this._ts=this._act=0):(Re(),this._ts=this._rts,//only defer to _pTime (pauseTime) if tTime is zero. Remember, someone could pause() an animation, then scrub the playhead and resume(). If the parent doesn't have smoothChildTiming, we render at the rawTime() because the startTime won't get updated. 221this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==D&&(this._tTime-=D)))),this):this._ps},e.startTime=function(t){if(arguments.length){this._start=t;var e=this.parent||this._dp;return e&&(e._sort||!this.parent)&&Vt(e,this,t-this._delay),this}return this._start},e.endTime=function(t){return this._start+(L(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(t){var e=this.parent||this._dp;// _dp = detached parent 222return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Bt(e.rawTime(t),this):this._tTime:this._tTime},e.revert=function(t){void 0===t&&(t=nt);var e=a;return a=t,bt(this)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),a=e,this},e.globalTime=function(t){for(var e=this,r=arguments.length?t:e.rawTime();e;)r=e._start+r/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):r;// the _startAt tweens for .fromTo() and .from() that have immediateRender should always be FIRST in the timeline (important for context.revert()). "_sat" stands for _startAtTween, referring to the parent tween that created the _startAt. We must discern if that tween had immediateRender so that we can know whether or not to prioritize it in revert(). 223},e.repeat=function(t){return arguments.length?(this._repeat=Infinity===t?-2:t,Ht(this)):-2===this._repeat?Infinity:this._repeat},e.repeatDelay=function(t){if(arguments.length){var e=this._time;return this._rDelay=t,Ht(this),e?this.time(e):this}return this._rDelay},e.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},e.seek=function(t,e){return this.totalTime(Kt(this,t),L(e))},e.restart=function(t,e){// ensures onComplete fires on a zero-duration animation that gets restarted. 224return this.play().totalTime(t?-this._delay:0,L(e)),this._dur||(this._zTime=-1e-8),this},e.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},e.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},e.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-1e-8:0)),this):this._rts<0}
vendor: 4,639 bytes, lines 224-247
224,e.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function(){var t,e=this.parent||this._dp,r=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=r&&t<this.endTime(!0)-D))},e.eventCallback=function(t,e,r){var i=this.vars;return arguments.length>1?(e?(i[t]=e,r&&(i[t+"Params"]=r),"onUpdate"===t&&(this._onUpdate=e)):delete i[t],this):i[t]},e.then=function(t){var e=this;return new Promise((function(r){var i=O(t)?t:Dt,n=function(){var t=e.then;e.then=null,// temporarily null the then() method to avoid an infinite loop (see https://github.com/greensock/GSAP/issues/322) 225O(i)&&(i=i(e))&&(i.then||i===e)&&(e.then=t),r(i),e.then=t};e._initted&&1===e.totalProgress()&&e._ts>=0||!e._tTime&&e._ts<0?n():e._prom=n}))},e.kill=function(){me(this)},t}(); 226/* 227 * -------------------------------------------------------------------------------------- 228 * ANIMATION 229 * -------------------------------------------------------------------------------------- 230 */Mt(Qe.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom:0,_ps:!1,_rts:1}); 231/* 232 * ------------------------------------------------- 233 * TIMELINE 234 * ------------------------------------------------- 235 */ 236var Ve=function(t){function e(e,r){var n;return void 0===e&&(e={}),(n=t.call(this,e)||this).labels={},n.smoothChildTiming=!!e.smoothChildTiming,n.autoRemoveChildren=!!e.autoRemoveChildren,n._sort=L(e.sortChildren),u&&Vt(e.parent||u,i(n),r),e.reversed&&n.reverse(),e.paused&&n.paused(!0),e.scrollTrigger&&jt(i(n),e.scrollTrigger),n}n(e,t);var r=e.prototype;return r.to=function(t,e,r){return Xt(0,arguments,this),this},r.from=function(t,e,r){return Xt(1,arguments,this),this},r.fromTo=function(t,e,r,i){return Xt(2,arguments,this),this},r.set=function(t,e,r){return e.duration=0,e.parent=this,Et(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new tr(t,e,Kt(this,r),1),this},r.call=function(t,e,r){return Vt(this,tr.delayedCall(0,t,e),r)}//ONLY for backward compatibility! Maybe delete? 237,r.staggerTo=function(t,e,r,i,n,s,a){return r.duration=e,r.stagger=r.stagger||i,r.onComplete=s,r.onCompleteParams=a,r.parent=this,new tr(t,r,Kt(this,n)),this},r.staggerFrom=function(t,e,r,i,n,s,a){return r.runBackwards=1,Et(r).immediateRender=L(r.immediateRender),this.staggerTo(t,e,r,i,n,s,a)},r.staggerFromTo=function(t,e,r,i,n,s,a,o){return i.startAt=r,Et(i).immediateRender=L(i.immediateRender),this.staggerTo(t,e,i,n,s,a,o)},r.render=function(t,e,r){var i,n,s,o,h,f,_,l,c,d,p,m,v=this._time,g=this._dirty?this.totalDuration():this._tDur,y=this._dur,T=t<=0?0:gt(t), 238// if a paused timeline is resumed (or its _start is updated for another reason...which rounds it), that could result in the playhead shifting a **tiny** amount and a zero-duration child at that spot may get rendered at a different ratio, like its totalTime in render() may be 1e-17 instead of 0, for example. 239w=this._zTime<0!=t<0&&(this._initted||!y);if(this!==u&&T>g&&t>=0&&(T=g),T!==this._tTime||r||w){if(v!==this._time&&y&&( 240//if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump). 241T+=this._time-v,t+=this._time-v),i=T,c=this._start,f=!(l=this._ts),w&&(y||(v=this._zTime),//when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. 242(t||!e)&&(this._zTime=t)),this._repeat){if( 243//adjust the time for repeats and yoyos 244p=this._yoyo,h=y+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*h+t,e,r); 245/* 246 make sure children at the end/beginning of the timeline are rendered properly. If, for example, 247 a 3-second long timeline rendered at 2.9 seconds previously, and now renders at 3.2 seconds (which
vendor: 8,819 bytes, lines 248-290
248 would get translated to 2.8 seconds if the timeline yoyos or 0.2 seconds if it just repeats), there 249 could be a callback or a short tween that's at 2.95 or 3 seconds in which wouldn't render. So 250 we need to push the timeline to the end (and/or beginning depending on its yoyo value). Also we must 251 ensure that zero-duration tweens at the very beginning or end of the Timeline work. 252 */ 253if(i=gt(T%h),//round to avoid floating point errors. (4 % 0.8 should be 0 but some browsers report it as 0.79999999!) 254T===g?( 255// the tDur === tTime is for edge cases where there's a lengthy decimal on the duration and it may reach the very end but the time is rendered as not-quite-there (remember, tDur is rounded to 4 decimals whereas dur isn't) 256o=this._repeat,i=y):((// full decimal version of iterations, not the previous iteration (we're reusing prevIteration variable for efficiency) 257o=~~(d=gt(T/h)))&&o===d&&(i=y,o--),i>y&&(i=y)),d=Ut(this._tTime,h),!v&&this._tTime&&d!==o&&this._tTime-d*h-this._dur<=0&&(d=o),// edge case - if someone does addPause() at the very beginning of a repeating timeline, that pause is technically at the same spot as the end which causes this._time to get set to 0 when the totalTime would normally place the playhead at the end. See https://gsap.com/forums/topic/23823-closing-nav-animation-not-working-on-ie-and-iphone-6-maybe-other-older-browser/?tab=comments#comment-113005 also, this._tTime - prevIteration * cycleDuration - this._dur <= 0 just checks to make sure it wasn't previously in the "repeatDelay" portion 258p&&1&o&&(i=y-i,m=1),o!==d&&!this._lock){var b=p&&1&d,k=b===(p&&1&o);if(o<d&&(b=!b),v=b?0:T%y?y:T,// if the playhead is landing exactly at the end of an iteration, use that totalTime rather than only the duration, otherwise it'll skip the 2nd render since it's effectively at the same time. 259this._lock=1,this.render(v||(m?0:gt(o*h)),e,!y)._lock=0,this._tTime=T,// if a user gets the iteration() inside the onRepeat, for example, it should be accurate. 260!e&&this.parent&&pe(this,"onRepeat"),this.vars.repeatRefresh&&!m&&(this.invalidate()._lock=1),v&&v!==this._time||f!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act) 261// if prevTime is 0 and we render at the very end, _time will be the end, thus won't match. So in this edge case, prevTime won't match _time but that's okay. If it gets killed in the onRepeat, eject as well. 262return this;if(y=this._dur,// in case the duration changed in the onRepeat 263g=this._tDur,k&&(this._lock=2,v=b?y:-1e-4,this.render(v,!0),this.vars.repeatRefresh&&!m&&this.invalidate()),this._lock=0,!this._ts&&!f)return this;//in order for yoyoEase to work properly when there's a stagger, we must swap out the ease in each sub-tween. 264Ie(this,m)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(_=function(t,e,r){var i;if(r>e)for(i=t._first;i&&i._start<=r;){if("isPause"===i.data&&i._start>e)return i;i=i._next}else for(i=t._last;i&&i._start>=r;){if("isPause"===i.data&&i._start<e)return i;i=i._prev}}(this,gt(v),gt(i)),_&&(T-=i-(i=_._start))),this._tTime=T,this._time=i,this._act=!l,//as long as it's not paused, force it to be active so that if the user renders independent of the parent timeline, it'll be forced to re-render on the next tick. 265this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,v=0),!v&&T&&!e&&!d&&(pe(this,"onStart"),this._tTime!==T)) 266// in case the onStart triggered a render at a different spot, eject. Like if someone did animation.pause(0.5) or something inside the onStart. 267return this;if(i>=v&&t>=0)for(n=this._first;n;){if(s=n._next,(n._act||i>=n._start)&&n._ts&&_!==n){if(n.parent!==this) 268// an extreme edge case - the child's render could do something like kill() the "next" one in the linked list, or reparent it. In that case we must re-initiate the whole render to be safe. 269return this.render(t,e,r);if(n.render(n._ts>0?(i-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(i-n._start)*n._ts,e,r),i!==this._time||!this._ts&&!f){ 270//in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete 271_=0,s&&(T+=this._zTime=-1e-8);// it didn't finish rendering, so flag zTime as negative so that the next time render() is called it'll be forced (to render any remaining children) 272break}}n=s}else{n=this._last;//when the playhead goes backward beyond the start of this timeline, we must pass that information down to the child animations so that zero-duration tweens know whether to render their starting or ending values. 273for(var x=t<0?t:i;n;){if(s=n._prev,(n._act||x<=n._end)&&n._ts&&_!==n){if(n.parent!==this) 274// an extreme edge case - the child's render could do something like kill() the "next" one in the linked list, or reparent it. In that case we must re-initiate the whole render to be safe. 275return this.render(t,e,r);// if reverting, we should always force renders of initted tweens (but remember that .fromTo() or .from() may have a _startAt but not _initted yet). If, for example, a .fromTo() tween with a stagger (which creates an internal timeline) gets reverted BEFORE some of its child tweens render for the first time, it may not properly trigger them to revert. 276if(n.render(n._ts>0?(x-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(x-n._start)*n._ts,e,r||a&&bt(n)),i!==this._time||!this._ts&&!f){ 277//in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete 278_=0,s&&(T+=this._zTime=x?-1e-8:D);// it didn't finish rendering, so adjust zTime so that so that the next time render() is called it'll be forced (to render any remaining children) 279break}}n=s}}if(_&&!e&&(this.pause(),_.render(i>=v?0:-1e-8)._zTime=i>=v?1:-1,this._ts)) 280//the callback resumed playback! So since we may have held back the playhead due to where the pause is positioned, go ahead and jump to where it's SUPPOSED to be (if no pause happened). 281return this._start=c,//if the pause was at an earlier time and the user resumed in the callback, it could reposition the timeline (changing its startTime), throwing things off slightly, so we make sure the _start doesn't shift. 282Nt(this),this.render(t,e,r);this._onUpdate&&!e&&pe(this,"onUpdate",!0),(T===g&&this._tTime>=this.totalDuration()||!T&&v)&&(c!==this._start&&Math.abs(l)===Math.abs(this._ts)||this._lock||( 283// remember, a child's callback may alter this timeline's playhead or timeScale which is why we need to add some of these checks. 284(t||!y)&&(T===g&&this._ts>0||!T&&this._ts<0)&&Ot(this,1),// don't remove if the timeline is reversed and the playhead isn't at 0, otherwise tl.progress(1).reverse() won't work. Only remove if the playhead is at the end and timeScale is positive, or if the playhead is at 0 and the timeScale is negative. 285e||t<0&&!v||!T&&!v&&g||(pe(this,T===g&&t>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(T<g&&this.timeScale()>0)&&this._prom())))}return this},r.add=function(t,e){var r=this;if(P(e)||(e=Kt(this,e,t)),!(t instanceof Qe)){if(q(t))return t.forEach((function(t){return r.add(t,e)})),this;if(z(t))return this.addLabel(t,e);if(!O(t))return this;t=tr.delayedCall(0,t)}return this!==t?Vt(this,t,e):this;//don't allow a timeline to be added to itself as a child! 286},r.getChildren=function(t,e,r,i){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===i&&(i=-x);for(var n=[],s=this._first;s;)s._start>=i&&(s instanceof tr?e&&n.push(s):(r&&n.push(s),t&&n.push.apply(n,s.getChildren(!0,e,r)))),s=s._next;return n},r.getById=function(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},r.remove=function(t){return z(t)?this.removeLabel(t):O(t)?this.killTweensOf(t):(t.parent===this&&zt(this,t),t===this._recent&&(this._recent=this._last),Pt(this))},r.totalTime=function(e,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&( 287//special case for the global timeline (or any other that has no parent or detached parent). 288this._start=gt(Ce.time-(this._ts>0?e/this._ts:(this.totalDuration()-e)/-this._ts))),t.prototype.totalTime.call(this,e,r),this._forcing=0,this):this._tTime},r.addLabel=function(t,e){return this.labels[t]=Kt(this,e),this},r.removeLabel=function(t){return delete this.labels[t],this},r.addPause=function(t,e,r){var i=tr.delayedCall(0,e||et,r);return i.data="isPause",this._hasPause=1,Vt(this,i,Kt(this,t))},r.removePause=function(t){var e=this._first;for(t=Kt(this,t);e;)e._start===t&&"isPause"===e.data&&Ot(e),e=e._next},r.killTweensOf=function(t,e,r){for(var i=this.getTweensOf(t,r),n=i.length;n--;)je!==i[n]&&i[n].kill(t,e);return this},r.getTweensOf=function(t,e){for(var 289// a number is interpreted as a global time. If the animation spans 290r,i=[],n=ne(t),s=this._first,a=P(e);s;)s instanceof tr?Tt(s._targets,n)&&(a?(!je||s._initted&&s._ts)&&s.globalTime(0)<=e&&s.globalTime(s.totalDuration())>e:!e||s.isActive())&&
vendor: 4,147 bytes, lines 291-312
291// note: if this is for overwriting, it should only be for tweens that aren't paused and are initted. 292i.push(s):(r=s.getTweensOf(n,e)).length&&i.push.apply(i,r),s=s._next;return i}// potential future feature - targets() on timelines 293// targets() { 294// let result = []; 295// this.getChildren(true, true, false).forEach(t => result.push(...t.targets())); 296// return result.filter((v, i) => result.indexOf(v) === i); 297// } 298,r.tweenTo=function(t,e){e=e||{};var r,i=this,n=Kt(i,t),s=e,a=s.startAt,o=s.onStart,u=s.onStartParams,h=s.immediateRender,f=tr.to(i,Mt({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:n,overwrite:"auto",duration:e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale())||D,onStart:function(){if(i.pause(),!r){var t=e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale());f._dur!==t&&$t(f,t,0,1).render(f._time,!0,!0),r=1}o&&o.apply(f,u||[])}},e));return h?f.render(0):f},r.tweenFromTo=function(t,e,r){return this.tweenTo(e,Mt({startAt:{time:Kt(this,t)}},r))},r.recent=function(){return this._recent},r.nextLabel=function(t){return void 0===t&&(t=this._time),de(this,Kt(this,t))},r.previousLabel=function(t){return void 0===t&&(t=this._time),de(this,Kt(this,t),1)},r.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+D)},r.shiftChildren=function(t,e,r){void 0===r&&(r=0);for(var i,n=this._first,s=this.labels;n;)n._start>=r&&(n._start+=t,n._end+=t),n=n._next;if(e)for(i in s)s[i]>=r&&(s[i]+=t);return Pt(this)},r.invalidate=function(e){var r=this._first;for(this._lock=0;r;)r.invalidate(e),r=r._next;return t.prototype.invalidate.call(this,e)},r.clear=function(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Pt(this)},r.totalDuration=function(t){var e,r,i,n=0,s=this,a=s._last,o=x;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-t:t));if(s._dirty){for(i=s.parent;a;)e=a._prev,//record it here in case the tween changes position in the sequence... 299a._dirty&&a.totalDuration(),(//could change the tween._startTime, so make sure the animation's cache is clean before analyzing it. 300r=a._start)>o&&s._sort&&a._ts&&!s._lock?( 301//in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence 302s._lock=1,//prevent endless recursive calls - there are methods that get triggered that check duration/totalDuration when we add(). 303Vt(s,a,r-a._delay,1)._lock=0):o=r,r<0&&a._ts&&( 304//children aren't allowed to have negative startTimes unless smoothChildTiming is true, so adjust here if one is found. 305n-=r,(!i&&!s._dp||i&&i.smoothChildTiming)&&(s._start+=r/s._ts,s._time-=r,s._tTime-=r),s.shiftChildren(-r,!1,-Infinity),o=0),a._end>n&&a._ts&&(n=a._end),a=e;$t(s,s===u&&s._time>n?s._time:n,1,1),s._dirty=0}return s._tDur},e.updateRoot=function(t){if(u._ts&&(kt(u,Bt(t,u)),c=Ce.frame),Ce.frame>=ft){ft+=b.autoSleep||120;var e=u._first;if((!e||!e._ts)&&b.autoSleep&&Ce._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Ce.sleep()}}},e}(Qe);Mt(Ve.prototype,{_lock:0,_hasPause:0,_forcing:0});var je, 306//store a reference temporarily so we can avoid overwriting itself. 307Ge,We=function(t,e,r,i,n,s,a){ 308//note: we call _addComplexStringPropTween.call(tweenInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus "this" would refer to the plugin. 309var o,u,h,f,_,l,c,d,p=new dr(this._pt,t,e,0,1,ur,null,n),m=0,v=0;for(p.b=r,p.e=i,r+="",(c=~(//ensure values are strings 310i+="").indexOf("random("))&&(i=le(i)),s&&(s(d=[r,i],t,e),//pass an array with the starting and ending values and let the filter do whatever it needs to the values. 311r=d[0],i=d[1]),u=r.match(G)||[];o=G.exec(i);)f=o[0],_=i.substring(m,o.index),h?h=(h+1)%5:"rgba("===_.substr(-5)&&(h=1),f!==u[v++]&&(l=parseFloat(u[v-1])||0,//these nested PropTweens are handled in a special way - we'll never actually call a render or setter method on them. We'll just loop through them in the parent complex string PropTween's render method. 312p._pt={_next:p._pt,p:_||1===v?_:",",
vendor: 4,596 bytes, lines 313-336
313//note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case. 314s:l,c:"="===f.charAt(1)?yt(l,f)-l:parseFloat(f)-l,m:h&&h<4?Math.round:0},m=G.lastIndex);//start the linked list with this new PropTween. Remember, we call _addComplexStringPropTween.call(tweenInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus "this" would refer to the plugin. 315return p.c=m<i.length?i.substring(m,i.length):"",//we use the "c" of the PropTween to store the final part of the string (after the last number) 316p.fp=a,(W.test(i)||c)&&(p.e=0),this._pt=p,p},Ye=function(t,e,r,i,n,s,a,o,u,h){O(i)&&(i=i(n||0,t,s));var f,_=t[e],l="get"!==r?r:O(_)?u?t[e.indexOf("set")||!O(t["get"+e.substr(3)])?e:"get"+e.substr(3)](u):t[e]():_,c=O(_)?u?ir:rr:er;if(z(i)&&(~i.indexOf("random(")&&(i=le(i)),"="===i.charAt(1)&&((f=yt(l,i)+(ee(l)||0))||0===f)&&( 317// to avoid isNaN, like if someone passes in a value like "!= whatever" 318i=f)),!h||l!==i||Ge)return isNaN(l*i)||""===i?(!_&&!(e in t)&&X(e,i),We.call(this,t,e,l,i,c,o||b.stringFilter,u)):( 319// fun fact: any number multiplied by "" is evaluated as the number 0! 320f=new dr(this._pt,t,e,+l||0,i-(l||0),"boolean"==typeof _?or:ar,0,c),u&&(f.fp=u),a&&f.modifier(a,this,t),this._pt=f)},$e=function(t,e,r,i,n,s){var a,o,u,h;if(ut[t]&&!1!==(a=new ut[t]).init(n,a.rawVars?e[t]:function(t,e,r,i,n){if(O(t)&&(t=Ke(t,n,e,r,i)),!F(t)||t.style&&t.nodeType||q(t)||N(t))return z(t)?Ke(t,n,e,r,i):t;var s,a={};for(s in t)a[s]=Ke(t[s],n,e,r,i);return a}(e[t],i,n,s,r),r,i,s)&&(r._pt=o=new dr(r._pt,n,t,0,1,a.render,a,0,a.priority),r!==d))for(u=r._ptLookup[r._targets.indexOf(n)],//note: we can't use tween._ptLookup[index] because for staggered tweens, the index from the fullTargets array won't match what it is in each individual tween that spawns from the stagger. 321h=a._props.length;h--;)u[a._props[h]]=o;return a},He=function t(e,r,i){var n,o,h,f,_,l,c,d,p,m,v,g,y,T=e.vars,w=T.ease,b=T.startAt,M=T.immediateRender,A=T.lazy,C=T.onUpdate,R=T.runBackwards,E=T.yoyoEase,S=T.keyframes,z=T.autoRevert,O=e._dur,P=e._startAt,I=e._targets,F=e.parent,U=F&&"nested"===F.data?F.vars.targets:I,B="auto"===e._overwrite&&!s,N=e.timeline;//nested timelines should never run backwards - the backwards-ness is in the child tweens. 322if(N&&(!S||!w)&&(w="none"),e._ease=Fe(w,k.ease),e._yEase=E?Pe(Fe(!0===E?w:E,k.ease)):0,E&&e._yoyo&&!e._repeat&&( 323//there must have been a parent timeline with yoyo:true that is currently in its yoyo phase, so flip the eases. 324E=e._yEase,e._yEase=e._ease,e._ease=E),e._from=!N&&!!T.runBackwards,!N||S&&!T.stagger){if( 325//if there's an internal timeline, skip all the parsing because we passed that task down the chain. 326g=(d=I[0]?dt(I[0]).harness:0)&&T[d.prop],//someone may need to specify CSS-specific values AND non-CSS values, like if the element has an "x" property plus it's a standard DOM element. We allow people to distinguish by wrapping plugin-specific stuff in a css:{} object for example. 327n=Rt(T,st),P&&(P._zTime<0&&P.progress(1),// in case it's a lazy startAt that hasn't rendered yet. 328r<0&&R&&M&&!z?P.render(-1,!0):P.revert(R&&O?it:rt),// if it's a "startAt" (not "from()" or runBackwards: true), we only need to do a shallow revert (keep transforms cached in CSSPlugin) 329// don't just _removeFromParent(prevStartAt.render(-1, true)) because that'll leave inline styles. We're creating a new _startAt for "startAt" tweens that re-capture things to ensure that if the pre-tween values changed since the tween was created, they're recorded. 330P._lazy=0),b){// rare edge case, like if a render is forced in the negative direction of a non-initted tween. 331if(Ot(e._startAt=tr.set(I,Mt({data:"isStart",overwrite:!1,parent:F,immediateRender:!0,lazy:!P&&L(A),startAt:null,delay:0,onUpdate:C&&function(){return pe(e,"onUpdate")},stagger:0},b))),//copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, from, to).fromTo(e, to, from); 332e._startAt._dp=0,// don't allow it to get put back into root timeline! Like when revert() is called and totalTime() gets set. 333e._startAt._sat=e,// used in globalTime(). _sat stands for _startAtTween 334r<0&&(a||!M&&!z)&&e._startAt.revert(it),M&&O&&r<=0&&i<=0) 335// check tTime here because in the case of a yoyo tween whose playhead gets pushed to the end like tween.progress(1), we should allow it through so that the onComplete gets fired properly. 336return void(r&&(e._zTime=r));
vendor: 4,405 bytes, lines 336-358
336//we skip initialization here so that overwriting doesn't occur until the tween actually begins. Otherwise, if you create several immediateRender:true tweens of the same target/properties to drop into a Timeline, the last one created would overwrite the first ones because they didn't get placed into the timeline yet before the first render occurs and kicks in overwriting. 337}else if(R&&O&&!P)if(r&&(M=!1),//in rare cases (like if a from() tween runs and then is invalidate()-ed), immediateRender could be true but the initial forced-render gets skipped, so there's no need to force the render in this context when the _time is greater than 0 338h=Mt({overwrite:!1,data:"isFromStart", 339//we tag the tween with as "isFromStart" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a "from()" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in. 340lazy:M&&!P&&L(A),immediateRender:M, 341//zero-duration tweens render immediately by default, but if we're not specifically instructed to render this tween immediately, we should skip this and merely _init() to record the starting values (rendering them immediately would push them to completion which is wasteful in that case - we'd have to render(-1) immediately after) 342stagger:0,parent:F},n),g&&(h[d.prop]=g),// in case someone does something like .from(..., {css:{}}) 343Ot(e._startAt=tr.set(I,h)),e._startAt._dp=0,// don't allow it to get put back into root timeline! 344e._startAt._sat=e,// used in globalTime() 345r<0&&(a?e._startAt.revert(it):e._startAt.render(-1,!0)),e._zTime=r,M){if(!r)return}else t(e._startAt,D,D);//ensures that the initial values are recorded 346for(e._pt=e._ptCache=0,A=O&&L(A)||A&&!O,o=0;o<I.length;o++){if(c=(_=I[o])._gsap||ct(I)[o]._gsap,e._ptLookup[o]=m={},ot[c.id]&&at.length&&wt(),//if other tweens of the same target have recently initted but haven't rendered yet, we've got to force the render so that the starting values are correct (imagine populating a timeline with a bunch of sequential tweens and then jumping to the end) 347v=U===I?o:U.indexOf(_),d&&!1!==(p=new d).init(_,g||n,e,v,U)&&(e._pt=f=new dr(e._pt,_,p.name,0,1,p.render,p,0,p.priority),p._props.forEach((function(t){m[t]=f})),p.priority&&(l=1)),!d||g)for(h in n)ut[h]&&(p=$e(h,n,e,v,_,U))?p.priority&&(l=1):m[h]=f=Ye.call(e,_,h,"get",n[h],v,U,0,T.stringFilter);e._op&&e._op[o]&&e.kill(_,e._op[o]),B&&e._pt&&(je=e,u.killTweensOf(_,m,e.globalTime(r)),// make sure the overwriting doesn't overwrite THIS tween!!! 348y=!e.parent,je=0),e._pt&&A&&(ot[c.id]=1)}l&&cr(e),e._onInit&&e._onInit(e)}e._onUpdate=C,e._initted=(!e._op||e._pt)&&!y,// if overwrittenProps resulted in the entire tween being killed, do NOT flag it as initted or else it may render for one tick. 349S&&r<=0&&N.render(x,!0,!0)}, 350// parses multiple formats, like {"0%": {x: 100}, {"50%": {x: -20}} and { x: {"0%": 100, "50%": -20} }, and an "ease" can be set on any object. We populate an "allProps" object with an Array for each property, like {x: [{}, {}], y:[{}, {}]} with data for each property tween. The objects have a "t" (time), "v", (value), and "e" (ease) property. This allows us to piece together a timeline later. 351Je=function(t,e,r,i){var n,s,a=e.ease||i||"power1.inOut";if(q(e))s=r[t]||(r[t]=[]),// t = time (out of 100), v = value, e = ease 352e.forEach((function(t,r){return s.push({t:r/(e.length-1)*100,v:t,e:a})}));else for(n in e)s=r[n]||(r[n]=[]),"ease"===n||s.push({t:parseFloat(t),v:e[n],e:a})},Ke=function(t,e,r,i,n){return O(t)?t.call(e,r,i,n):z(t)&&~t.indexOf("random(")?le(t):t},Xe=lt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",Ze={};mt(Xe+",id,stagger,delay,duration,paused,scrollTrigger",(function(t){return Ze[t]=1})); 353/* 354 * -------------------------------------------------------------------------------------- 355 * TWEEN 356 * -------------------------------------------------------------------------------------- 357 */ 358var tr=function(t){function e(e,r,n,a){var o;"number"==typeof r&&(n.duration=r,r=n,n=null);var h,f,_,l,c,d,p,m,v=(o=t.call(this,a?r:Et(r))||this).vars,g=v.duration,y=v.delay,T=v.immediateRender,w=v.stagger,k=v.overwrite,x=v.ke
vendor: 9,125 bytes, lines 358-401
358yframes,D=v.defaults,M=v.scrollTrigger,A=v.yoyoEase,C=r.parent||u,R=(q(e)||N(e)?P(e[0]):"length"in r)?[e]:ne(e);if(o._targets=R.length?ct(R):Z("GSAP target "+e+" not found. https://gsap.com",!b.nullTargetWarn)||[],o._ptLookup=[],//PropTween lookup. An array containing an object for each target, having keys for each tweening property 359o._overwrite=k,x||w||B(g)||B(y)){if(r=o.vars,// we need to store the targets because for staggers and keyframes, we end up creating an individual tween for each but function-based values need to know the index and the whole Array of targets. 360(h=o.timeline=new Ve({data:"nested",defaults:D||{},targets:C&&"nested"===C.data?C.vars.targets:R})).kill(),h.parent=h._dp=i(o),h._start=0,w||B(g)||B(y)){if(l=R.length,p=w&&oe(w),F(w)) 361//users can pass in callbacks like onStart/onComplete in the stagger object. These should fire with each individual tween. 362for(c in w)~Xe.indexOf(c)&&(m||(m={}),m[c]=w[c]);for(f=0;f<l;f++)(_=Rt(r,Ze)).stagger=0,A&&(_.yoyoEase=A),m&&At(_,m),d=R[f],//don't just copy duration or delay because if they're a string or function, we'd end up in an infinite loop because _isFuncOrString() would evaluate as true in the child tweens, entering this loop, etc. So we parse the value straight from vars and default to 0. 363_.duration=+Ke(g,i(o),f,d,R),_.delay=(+Ke(y,i(o),f,d,R)||0)-o._delay,!w&&1===l&&_.delay&&( 364// if someone does delay:"random(1, 5)", repeat:-1, for example, the delay shouldn't be inside the repeat. 365o._delay=y=_.delay,o._start+=y,_.delay=0),h.to(d,_,p?p(f,d,R):0),h._ease=Ee.none;h.duration()?g=y=0:o.timeline=0}else if(x){Et(Mt(h.vars.defaults,{ease:"none"})),h._ease=Fe(x.ease||r.ease||"none");var E,S,z,O=0;if(q(x))x.forEach((function(t){return h.to(R,t,">")})),h.duration();else{for(c in _={},x)"ease"===c||"easeEach"===c||Je(c,x[c],_,x.easeEach);for(c in _)for(E=_[c].sort((function(t,e){return t.t-e.t})),O=0,f=0;f<E.length;f++)(z={ease:(S=E[f]).e,duration:(S.t-(f?E[f-1].t:0))/100*g})[c]=S.v,h.to(R,z,O),O+=z.duration;h.duration()<g&&h.to({},{duration:g-h.duration()})}}g||o.duration(g=h.duration())}else o.timeline=0;//speed optimization, faster lookups (no going up the prototype chain) 366return!0!==k||s||(je=i(o),u.killTweensOf(R),je=0),Vt(C,i(o),n),r.reversed&&o.reverse(),r.paused&&o.paused(!0),(T||!g&&!x&&o._start===gt(C._time)&&L(T)&&Ft(i(o))&&"nested"!==C.data)&&(o._tTime=-1e-8,//forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render) 367o.render(Math.max(0,-y)||0)),M&&jt(i(o),M),o}n(e,t);var r=e.prototype;return r.render=function(t,e,r){var i,n,s,o,u,h,f,_,l,c=this._time,d=this._tDur,p=this._dur,m=t<0,v=t>d-D&&!m?d:t<D?0:t;if(p){if(v!==this._tTime||!t||r||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==m||this._lazy){if( 368// this senses if we're crossing over the start time, in which case we must record _zTime and force the render, but we do it in this lengthy conditional way for performance reasons (usually we can skip the calculations): this._initted && (this._zTime < 0) !== (totalTime < 0) 369i=v,_=this.timeline,this._repeat){if( 370//adjust the time for repeats and yoyos 371o=p+this._rDelay,this._repeat<-1&&m)return this.totalTime(100*o+t,e,r);if(i=gt(v%o),//round to avoid floating point errors. (4 % 0.8 should be 0 but some browsers report it as 0.79999999!) 372v===d?( 373// the tDur === tTime is for edge cases where there's a lengthy decimal on the duration and it may reach the very end but the time is rendered as not-quite-there (remember, tDur is rounded to 4 decimals whereas dur isn't) 374s=this._repeat,i=p):(// full decimal version of iterations, not the previous iteration (we're reusing prevIteration variable for efficiency) 375s=~~(u=gt(v/o)))&&s===u?(i=p,s--):i>p&&(i=p),(h=this._yoyo&&1&s)&&(l=this._yEase,i=p-i),u=Ut(this._tTime,o),i===c&&!r&&this._initted&&s===u) 376//could be during the repeatDelay part. No need to render and fire callbacks. 377return this._tTime=v,this;s!==u&&(_&&this._yEase&&Ie(_,h),//repeatRefresh functionality 378this.vars.repeatRefresh&&!h&&!this._lock&&i!==o&&this._initted&&( 379// this._time will === cycleDuration when we render at EXACTLY the end of an iteration. Without this condition, it'd often do the repeatRefresh render TWICE (again on the very next tick). 380this._lock=r=1,//force, otherwise if lazy is true, the _attemptInitTween() will return and we'll jump out and get caught bouncing on each tick. 381this.render(gt(o*s),!0).invalidate()._lock=0))}if(!this._initted){if(Gt(this,m?t:i,r,e,v))// in constructor if immediateRender is true, we set _tTime to -_tinyNum to have the playhead cross the starting point but we can't leave _tTime as a negative number. 382return this._tTime=0,this;if(!(c===this._time||r&&this.vars.repeatRefresh&&s!==u)) 383// rare edge case - during initialization, an onUpdate in the _startAt (.fromTo()) might force this tween to render at a different spot in which case we should ditch this render() call so that it doesn't revert the values. But we also don't want to dump if we're doing a repeatRefresh render! 384return this;if(p!==this._dur) 385// while initting, a plugin like InertiaPlugin might alter the duration, so rerun from the start to ensure everything renders as it should. 386return this.render(t,e,r)}if(this._tTime=v,this._time=i,!this._act&&this._ts&&(this._act=1,//as long as it's not paused, force it to be active so that if the user renders independent of the parent timeline, it'll be forced to re-render on the next tick. 387this._lazy=0),this.ratio=f=(l||this._ease)(i/p),this._from&&(this.ratio=f=1-f),!c&&v&&!e&&!u&&(pe(this,"onStart"),this._tTime!==v)) 388// in case the onStart triggered a render at a different spot, eject. Like if someone did animation.pause(0.5) or something inside the onStart. 389return this;for(n=this._pt;n;)n.r(f,n.d),n=n._next;_&&_.render(t<0?t:_._dur*_._ease(i/this._dur),e,r)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(m&&It(this,t,0,r),//note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete. 390pe(this,"onUpdate")),this._repeat&&s!==u&&this.vars.onRepeat&&!e&&this.parent&&pe(this,"onRepeat"),v!==this._tDur&&v||this._tTime!==v||(m&&!this._onUpdate&&It(this,t,0,!0),(t||!p)&&(v===this._tDur&&this._ts>0||!v&&this._ts<0)&&Ot(this,1),// don't remove if we're rendering at exactly a time of 0, as there could be autoRevert values that should get set on the next tick (if the playhead goes backward beyond the startTime, negative totalTime). Don't remove if the timeline is reversed and the playhead isn't at 0, otherwise tl.progress(1).reverse() won't work. Only remove if the playhead is at the end and timeScale is positive, or if the playhead is at 0 and the timeScale is negative. 391e||m&&!c||!(v||c||h)||( 392// if prevTime and tTime are zero, we shouldn't fire the onReverseComplete. This could happen if you gsap.to(... {paused:true}).play(); 393pe(this,v===d?"onComplete":"onReverseComplete",!0),this._prom&&!(v<d&&this.timeScale()>0)&&this._prom()))}}else!function(t,e,r,i){var n,s,o,u=t.ratio,h=e<0||!e&&(!t._start&&Wt(t)&&(t._initted||!Yt(t))||(t._ts<0||t._dp._ts<0)&&!Yt(t))?0:1, 394// if the tween or its parent is reversed and the totalTime is 0, we should go to a ratio of 0. Edge case: if a from() or fromTo() stagger tween is placed later in a timeline, the "startAt" zero-duration tween could initially render at a time when the parent timeline's playhead is technically BEFORE where this tween is, so make sure that any "from" and "fromTo" startAt tweens are rendered the first time at a ratio of 1. 395f=t._rDelay,_=0;if(f&&t._repeat&&( 396// in case there's a zero-duration tween that has a repeat with a repeatDelay 397_=te(0,t._tDur,e),s=Ut(_,f),t._yoyo&&1&s&&(h=1-h),s!==Ut(t._tTime,f)&&( 398// if iteration changed 399u=1-h,t.vars.repeatRefresh&&t._initted&&t.invalidate())),h!==u||a||i||t._zTime===D||!e&&t._zTime){if(!t._initted&&Gt(t,e,i,r,_)) 400// if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately. 401return;for(o=t._zTime,t._zTime=e||(r?D:0),// when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect.
vendor: 4,787 bytes, lines 402-426
402r||(r=e&&!o),// if it was rendered previously at exactly 0 (_zTime) and now the playhead is moving away, DON'T fire callbacks otherwise they'll seem like duplicates. 403t.ratio=h,t._from&&(h=1-h),t._time=0,t._tTime=_,n=t._pt;n;)n.r(h,n.d),n=n._next;e<0&&It(t,e,0,!0),t._onUpdate&&!r&&pe(t,"onUpdate"),_&&t._repeat&&!r&&t.parent&&pe(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===h&&(h&&Ot(t,1),r||a||(pe(t,h?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,r);return this},r.targets=function(){return this._targets},r.invalidate=function(e){ 404// "soft" gives us a way to clear out everything EXCEPT the recorded pre-"from" portion of from() tweens. Otherwise, for example, if you tween.progress(1).render(0, true true).invalidate(), the "from" values would persist and then on the next render, the from() tweens would initialize and the current value would match the "from" values, thus animate from the same value to the same value (no animation). We tap into this in ScrollTrigger's refresh() where we must push a tween to completion and then back again but honor its init state in case the tween is dependent on another tween further up on the page. 405return(!e||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(e),t.prototype.invalidate.call(this,e)},r.resetTo=function(t,e,r,i,n){p||Ce.wake(),this._ts||this.play();var s=Math.min(this._dur,(this._dp._time-this._start)*this._ts);// don't just get tween.ratio because it may not have rendered yet. 406// possible future addition to allow an object with multiple values to update, like tween.resetTo({x: 100, y: 200}); At this point, it doesn't seem worth the added kb given the fact that most users will likely opt for the convenient gsap.quickTo() way of interacting with this method. 407// if (_isObject(property)) { // performance optimization 408// for (p in property) { 409// if (_updatePropTweens(this, p, property[p], value ? value[p] : null, start, ratio, time)) { 410// return this.resetTo(property, value, start, startIsRelative); // if a PropTween wasn't found for the property, it'll get forced with a re-initialization so we need to jump out and start over again. 411// } 412// } 413// } else { 414return this._initted||He(this,s),function(t,e,r,i,n,s,a,o){var u,h,f,_,l=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!l)for(l=t._ptCache[e]=[],f=t._ptLookup,_=t._targets.length;_--;){if((u=f[_][e])&&u.d&&u.d._pt)for( 415// it's a plugin, so find the nested PropTween 416u=u.d._pt;u&&u.p!==e&&u.fp!==e;) 417// "fp" is functionParam for things like setting CSS variables which require .setProperty("--var-name", value) 418u=u._next;if(!u) 419// there is no PropTween associated with that property, so we must FORCE one to be created and ditch out of this 420// if the tween has other properties that already rendered at new positions, we'd normally have to rewind to put them back like tween.render(0, true) before forcing an _initTween(), but that can create another edge case like tweening a timeline's progress would trigger onUpdates to fire which could move other things around. It's better to just inform users that .resetTo() should ONLY be used for tweens that already have that property. For example, you can't gsap.to(...{ y: 0 }) and then tween.restTo("x", 200) for example. 421return Ge=1,// otherwise, when we _addPropTween() and it finds no change between the start and end values, it skips creating a PropTween (for efficiency...why tween when there's no difference?) but in this case we NEED that PropTween created so we can edit it. 422t.vars[e]="+=0",He(t,a),Ge=0,o?Z(e+" not eligible for reset"):1;// if someone tries to do a quickTo() on a special property like borderRadius which must get split into 4 different properties, that's not eligible for .resetTo(). 423l.push(u)}for(_=l.length;_--;)// complex values may have nested PropTweens. We only accommodate the FIRST value. 424(u=(h=l[_])._pt||h).s=!i&&0!==i||n?u.s+(i||0)+s*u.c:i,u.c=r-u.s,h.e&&(h.e=vt(r)+ee(h.e)),// mainly for CSSPlugin (end value) 425h.b&&(h.b=u.s+ee(h.b))}(this,t,e,r,i,this._ease(s/this._dur),s,n)?this.resetTo(t,e,r,i,1):(//} 426qt(this,0),this.parent||St(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},r.kill=function(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?me(this):this.scrollTrigger&&this.scrollTrigger.kill(!!a),this;if(this.timeline){var r=this.timeline.totalDuration();// if a nested tween is killed that changes the duration, it should affect this tween's duration. We must use the ratio, though, because sometimes the internal timeline is stretched like for keyframes where they don't all add up to whatever the parent tween's duration was set to.
vendor: 4,635 bytes, lines 427-452
427return this.timeline.killTweensOf(t,e,je&&!0!==je.vars.overwrite)._first||me(this),// if nothing is left tweening, interrupt. 428this.parent&&r!==this.timeline.totalDuration()&&$t(this,this._dur*this.timeline._tDur/r,0,1),this}var i,n,s,o,u,h,f,_=this._targets,l=t?ne(t):_,c=this._ptLookup,d=this._pt;if((!e||"all"===e)&&function(t,e){for(var r=t.length,i=r===e.length;i&&r--&&t[r]===e[r];);return r<0}(_,l))return"all"===e&&(this._pt=0),me(this);for(i=this._op=this._op||[],"all"!==e&&( 429//so people can pass in a comma-delimited list of property names 430z(e)&&(u={},mt(e,(function(t){return u[t]=1})),e=u),e=function(t,e){var r,i,n,s,a=t[0]?dt(t[0]).harness:0,o=a&&a.aliases;if(!o)return e;for(i in r=At({},e),o)if(i in r)for(n=(s=o[i].split(",")).length;n--;)r[s[n]]=r[i];return r}(_,e)),f=_.length;f--;)if(~l.indexOf(_[f]))for(u in n=c[f],"all"===e?(i[f]=e,o=n,s={}):(s=i[f]=i[f]||{},o=e),o)(h=n&&n[u])&&("kill"in h.d&&!0!==h.d.kill(u)||zt(this,h,"_pt"),delete n[u]),"all"!==s&&(s[u]=1);//if all tweening properties are killed, kill the tween. Without this line, if there's a tween with multiple targets and then you killTweensOf() each target individually, the tween would technically still remain active and fire its onComplete even though there aren't any more properties tweening. 431return this._initted&&!this._pt&&d&&me(this),this},e.to=function(t,r){return new e(t,r,arguments[2])},e.from=function(t,e){return Xt(1,arguments)},e.delayedCall=function(t,r,i,n){return new e(r,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:r,onReverseComplete:r,onCompleteParams:i,onReverseCompleteParams:i,callbackScope:n});// we must use onReverseComplete too for things like timeline.add(() => {...}) which should be triggered in BOTH directions (forward and reverse) 432},e.fromTo=function(t,e,r){return Xt(2,arguments)},e.set=function(t,r){return r.duration=0,r.repeatDelay||(r.repeat=0),new e(t,r)},e.killTweensOf=function(t,e,r){return u.killTweensOf(t,e,r)},e}(Qe);Mt(tr.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),//add the pertinent timeline methods to Tween instances so that users can chain conveniently and create a timeline automatically. (removed due to concerns that it'd ultimately add to more confusion especially for beginners) 433// _forEachName("to,from,fromTo,set,call,add,addLabel,addPause", name => { 434// Tween.prototype[name] = function() { 435// let tl = new Timeline(); 436// return _addToTimeline(tl, this)[name].apply(tl, toArray(arguments)); 437// } 438// }); 439//for backward compatibility. Leverage the timeline calls. 440mt("staggerTo,staggerFrom,staggerFromTo",(function(t){tr[t]=function(){var e=new Ve,r=re.call(arguments,0);return r.splice("staggerFromTo"===t?5:4,0,0),e[t].apply(e,r)}})); 441/* 442 * -------------------------------------------------------------------------------------- 443 * PROPTWEEN 444 * -------------------------------------------------------------------------------------- 445 */ 446var er=function(t,e,r){return t[e]=r},rr=function(t,e,r){return t[e](r)},ir=function(t,e,r,i){return t[e](i.fp,r)},nr=function(t,e,r){return t.setAttribute(e,r)},sr=function(t,e){return O(t[e])?rr:I(t[e])&&t.setAttribute?nr:er},ar=function(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},or=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},ur=function(t,e){var r=e._pt,i="";if(!t&&e.b) 447//b = beginning string 448i=e.b;else if(1===t&&e.e) 449//e = ending string 450i=e.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+i,//we use the "p" property for the text inbetween (like a suffix). And in the context of a complex string, the modifier (m) is typically just Math.round(), like for RGB colors. 451r=r._next;i+=e.c}e.set(e.t,e.p,i,e)},hr=function(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},fr=function(t,e,r,i){for(var n,s=this._pt;s;)n=s._next,s.p===i&&s.modifier(t,e,r),s=n},_r=function(t){for(var e,r,i=this._pt;i;)r=i._next,i.p===t&&!i.op||i.op===t?zt(this,i,"_pt"):i.dep||(e=1),i=r;return!e},lr=function(t,e,r,i){i.mSet(t,e,i.m.call(i.tween,r,i.mt),i)},cr=function(t){//sorts the PropTween linked list in order of priority because some plugins need to do their work after ALL of the PropTweens were created (like RoundPropsPlugin and ModifiersPlugin) 452for(var e,r,i,n,s=t._pt;s;){for(e=s._next,r=i;r&&r.pr>s.pr;)r=r._next;(s._prev=r?r._prev:n)?s._prev._next=s:i=s,(s._next=r)?r._prev=s:n=s,s=e}t._pt=i},dr=function(){function t(t,e,r,i,n,s,a,o,u){this.t=e,this.s=i,this.c=n,this.p=r,this.r=s||ar,this.d=a||this,this.set=o||er,this.pr=u||0,this._next=t,t&&(t._prev=this)}return t.prototype.modifier=function(t,e,r){this.mSet=this.mSet||this.set,//in case it was already set
vendor: 11,832 bytes, lines 452-504
452(a PropTween can only have one modifier) 453this.set=lr,this.m=t,this.mt=r,//modifier target 454this.tween=e},t}();//PropTween key: t = target, p = prop, r = renderer, d = data, s = start, c = change, op = overwriteProperty (ONLY populated when it's different than p), pr = priority, _next/_prev for the linked list siblings, set = setter, m = modifier, mSet = modifierSetter (the original setter, before a modifier was added) 455//Initialization tasks 456mt(lt+"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(t){return st[t]=1})),H.TweenMax=H.TweenLite=tr,H.TimelineLite=H.TimelineMax=Ve,u=new Ve({sortChildren:!1,defaults:k,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),b.stringFilter=Ae;var pr=[],mr={},vr=[],gr=0,yr=0,Tr=function(t){return(mr[t]||vr).map((function(t){return t()}))},wr=function(){var t=Date.now(),e=[];t-gr>2&&(Tr("matchMediaInit"),pr.forEach((function(t){var r,i,n,s,a=t.queries,o=t.conditions;for(i in a)// Firefox doesn't update the "matches" property of the MediaQueryList object correctly - it only does so as it calls its change handler - so we must re-create a media query here to ensure it's accurate. 457(r=h.matchMedia(a[i]).matches)&&(n=1),r!==o[i]&&(o[i]=r,s=1);s&&(t.revert(),n&&e.push(t))})),Tr("matchMediaRevert"),e.forEach((function(t){return t.onMatch(t,(function(e){return t.add(null,e)}))})),gr=t,Tr("matchMedia"))},br=function(){function t(t,e){this.selector=e&&se(e),this.data=[],this._r=[],// returned/cleanup functions 458this.isReverted=!1,this.id=yr++,// to work around issues that frameworks like Vue cause by making things into Proxies which make it impossible to do something like _media.indexOf(this) because "this" would no longer refer to the Context instance itself - it'd refer to a Proxy! We needed a way to identify the context uniquely 459t&&this.add(t)}var e=t.prototype;return e.add=function(t,e,r){ 460// possible future addition if we need the ability to add() an animation to a context and for whatever reason cannot create that animation inside of a context.add(() => {...}) function. 461// if (name && _isFunction(name.revert)) { 462// this.data.push(name); 463// return (name._ctx = this); 464// } 465O(t)&&(r=e,e=t,t=O);var i=this,n=function(){var t,n=o,s=i.selector;return n&&n!==i&&n.data.push(i),r&&(i.selector=se(r)),o=i,t=e.apply(i,arguments),O(t)&&i._r.push(t),o=n,i.selector=s,i.isReverted=!1,t};return i.last=n,t===O?n(i,(function(t){return i.add(null,t)})):t?i[t]=n:n},e.ignore=function(t){var e=o;o=null,t(this),o=e},e.getTweens=function(){var e=[];return this.data.forEach((function(r){return r instanceof t?e.push.apply(e,r.getTweens()):r instanceof tr&&!(r.parent&&"nested"===r.parent.data)&&e.push(r)})),e},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(t,e){var r=this;if(t?function(){for(var e,i=r.getTweens(),n=r.data.length;n--;) 466// Flip plugin tweens are very different in that they should actually be pushed to their end. The plugin replaces the timeline's .revert() method to do exactly that. But we also need to remove any of those nested tweens inside the flip timeline so that they don't get individually reverted. 467"isFlip"===(e=r.data[n]).data&&(e.revert(),e.getChildren(!0,!0,!1).forEach((function(t){return i.splice(i.indexOf(t),1)})));// save as an object so that we can cache the globalTime for each tween to optimize performance during the sort 468for(i.map((function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-Infinity,t:t}})).sort((function(t,e){return e.g-t.g||-Infinity})).forEach((function(e){return e.t.revert(t)})),// note: all of the _startAt tweens should be reverted in reverse order that they were created, and they'll all have the same globalTime (-1) so the " || -1" in the sort keeps the order properly. 469n=r.data.length;n--;) 470// make sure we loop backwards so that, for example, SplitTexts that were created later on the same element get reverted first 471(e=r.data[n])instanceof Ve?"nested"!==e.data&&(e.scrollTrigger&&e.scrollTrigger.revert(),e.kill()):!(e instanceof tr)&&e.revert&&e.revert(t);r._r.forEach((function(e){return e(t,r)})),r.isReverted=!0}():this.data.forEach((function(t){return t.kill&&t.kill()})),this.clear(),e)for(var i=pr.length;i--;) 472// previously, we checked _media.indexOf(this), but some frameworks like Vue enforce Proxy objects that make it impossible to get the proper result that way, so we must use a unique ID number instead. 473pr[i].id===this.id&&pr.splice(i,1)}// killWithCleanup() { 474// this.kill(); 475// this._r.forEach(f => f(false, this)); 476// } 477,e.revert=function(t){this.kill(t||{})},t}(),kr=function(){function t(t){this.contexts=[],this.scope=t,o&&o.data.push(this)}var e=t.prototype;return e.add=function(t,e,r){F(t)||(t={matches:t});var i,n,s,a=new br(0,r||this.scope),u=a.conditions={};for(n in o&&!a.selector&&(a.selector=o.selector),// in case a context is created inside a context. Like a gsap.matchMedia() that's inside a scoped gsap.context() 478this.contexts.push(a),e=a.add("onMatch",e),a.queries=t,t)"all"===n?s=1:(i=h.matchMedia(t[n]))&&(pr.indexOf(a)<0&&pr.push(a),(u[n]=i.matches)&&(s=1),i.addListener?i.addListener(wr):i.addEventListener("change",wr));return s&&e(a,(function(t){return a.add(null,t)})),this}// refresh() { 479// let time = _lastMediaTime, 480// media = _media; 481// _lastMediaTime = -1; 482// _media = this.contexts; 483// _onMediaChange(); 484// _lastMediaTime = time; 485// _media = media; 486// } 487,e.revert=function(t){this.kill(t||{})},e.kill=function(t){this.contexts.forEach((function(e){return e.kill(t,!0)}))},t}(),xr={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach((function(t){return ge(t)}))},timeline:function(t){return new Ve(t)},getTweensOf:function(t,e){return u.getTweensOf(t,e)},getProperty:function(t,e,r,i){z(t)&&(t=ne(t)[0]);//in case selector text or an array is passed in 488var n=dt(t||{}).get,s=r?Dt:xt;return"native"===r&&(r=""),t?e?s((ut[e]&&ut[e].get||n)(t,e,r,i)):function(e,r,i){return s((ut[e]&&ut[e].get||n)(t,e,r,i))}:t},quickSetter:function(t,e,r){if((t=ne(t)).length>1){var i=t.map((function(t){return Ar.quickSetter(t,e,r)})),n=i.length;return function(t){for(var e=n;e--;)i[e](t)}}t=t[0]||{};var s=ut[e],a=dt(t),o=a.harness&&(a.harness.aliases||{})[e]||e, 489// in case it's an alias, like "rotate" for "rotation". 490u=s?function(e){var i=new s;d._pt=0,i.init(t,r?e+r:e,d,0,[t]),i.render(1,i),d._pt&&hr(1,d)}:a.set(t,o);return s?u:function(e){return u(t,o,r?e+r:e,a,1)}},quickTo:function(t,e,r){var i,n=Ar.to(t,Mt(((i={})[e]="+=0.1",i.paused=!0,i.stagger=0,i),r||{})),s=function(t,r,i){return n.resetTo(e,t,r,i)};return s.tween=n,s},isTweening:function(t){return u.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=Fe(t.ease,k.ease)),Ct(k,t||{})},config:function(t){return Ct(b,t||{})},registerEffect:function(t){var e=t.name,r=t.effect,i=t.plugins,n=t.defaults,s=t.extendTimeline;(i||"").split(",").forEach((function(t){return t&&!ut[t]&&!H[t]&&Z(e+" effect requires "+t+" plugin.")})),ht[e]=function(t,e,i){return r(ne(t),Mt(e||{},n),i)},s&&(Ve.prototype[e]=function(t,r,i){return this.add(ht[e](t,F(r)?r:(i=r)&&{},this),i)})},registerEase:function(t,e){Ee[t]=Fe(e)},parseEase:function(t,e){return arguments.length?Fe(t,e):Ee},getById:function(t){return u.getById(t)},exportRoot:function(t,e){void 0===t&&(t={});var r,i,n=new Ve(t);for(n.smoothChildTiming=L(t.smoothChildTiming),u.remove(n),n._dp=0,//otherwise it'll get re-activated when adding children and be re-introduced into _globalTimeline's linked list (then added to itself). 491n._time=n._tTime=u._time,r=u._first;r;)i=r._next,!e&&!r._dur&&r instanceof tr&&r.vars.onComplete===r._targets[0]||Vt(n,r,r._start-r._delay),r=i;return Vt(u,n,0),n},context:function(t,e){return t?new br(t,e):o},matchMedia:function(t){return new kr(t)},matchMediaRefresh:function(){return pr.forEach((function(t){var e,r,i=t.conditions;for(r in i)i[r]&&(i[r]=!1,e=1);e&&t.revert()}))||wr()},addEventListener:function(t,e){var r=mr[t]||(mr[t]=[]);~r.indexOf(e)||r.push(e)},removeEventListener:function(t,e){var r=mr[t],i=r&&r.indexOf(e);i>=0&&r.splice(i,1)},utils:{wrap:function t(e,r,i){ 492// NOTE: wrap() CANNOT be an arrow function! A very odd compiling bug causes problems (unrelated to GSAP). 493var n=r-e;return q(e)?_e(e,t(0,e.length),r):Zt(i,(function(t){return(n+(t-e)%n)%n+e}))},wrapYoyo:function t(e,r,i){var n=r-e,s=2*n;return q(e)?_e(e,t(0,e.length-1),r):Zt(i,(function(t){return e+((t=(s+(t-e)%s)%s||0)>n?s-t:t)}))},distribute:oe,random:fe,snap:he,normalize:function(t,e,r){return ce(t,e,0,1,r)},getUnit:ee,clamp:function(t,e,r){return Zt(r,(function(r){return te(t,e,r)}))},splitColor:be,toArray:ne,selector:se,mapRange:ce,pipe:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return e.reduce((function(t,e){return e(t)}),t)}},unitize:function(t,e){return function(r){return t(parseFloat(r))+(e||ee(r))}},interpolate:function t(e,r,i,n){var s=isNaN(e+r)?0:function(t){return(1-t)*e+t*r};if(!s){var a,o,u,h,f,_=z(e),l={};if(!0===i&&(n=1)&&(i=null),_)e={p:e},r={p:r};else if(q(e)&&!q(r)){for(u=[],h=e.length,f=h-2,o=1;o<h;o++)u.push(t(e[o-1],e[o]));//build the interpolators up front as a performance optimization so that when the function is called many times, it can just reuse them. 494h--,s=function(t){t*=h;var e=Math.min(f,~~t);return u[e](t-e)},i=r}else n||(e=At(q(e)?[]:{},e));if(!u){for(a in r)Ye.call(l,e,a,"get",r[a]);s=function(t){return hr(t,l)||(_?e.p:e)}}}return Zt(i,s)},shuffle:ae},install:K,effects:ht,ticker:Ce,updateRoot:Ve.updateRoot,plugins:ut,globalTimeline:u,core:{PropTween:dr,globals:tt,Tween:tr,Timeline:Ve,Animation:Qe,getCache:dt,_removeLinkedListItem:zt,reverting:function(){return a},context:function(t){return t&&o&&(o.data.push(t),t._ctx=o),o},suppressOverwrites:function(t){return s=t}}};mt("to,from,fromTo,delayedCall,set,killTweensOf",(function(t){return xr[t]=tr[t]})),Ce.add(Ve.updateRoot),d=xr.to({},{duration:0});// ---- EXTRA PLUGINS -------------------------------------------------------- 495var Dr=function(t,e){for(var r=t._pt;r&&r.p!==e&&r.op!==e&&r.fp!==e;)r=r._next;return r},Mr=function(t,e){return{name:t,headless:1,rawVars:1, 496//don't pre-process function-based values or "random()" strings. 497init:function(t,r,i){i._onInit=function(t){var i,n;if(z(r)&&(i={},mt(r,(function(t){return i[t]=1})),//if the user passes in a comma-delimited list of property names to roundProps, like "x,y", we round to whole numbers. 498r=i),e){for(n in i={},r)i[n]=e(r[n]);r=i}!function(t,e){var r,i,n,s=t._targets;for(r in e)for(i=s.length;i--;)(n=t._ptLookup[i][r])&&(n=n.d)&&(n._pt&&( 499// is a plugin 500n=Dr(n,r)),n&&n.modifier&&n.modifier(e[r],t,s[i],r))}(t,r)}}}},Ar=xr.registerPlugin({name:"attr",init:function(t,e,r,i,n){var s,a,o;for(s in this.tween=r,e)o=t.getAttribute(s)||"",(a=this.add(t,"setAttribute",(o||0)+"",e[s],i,n,0,0,s)).op=s,a.b=o,// record the beginning value so we can revert() 501this._props.push(s)},render:function(t,e){for(var r=e._pt;r;)a?r.set(r.t,r.p,r.b,r):r.r(t,r.d),// if reverting, go back to the original (pt.b) 502r=r._next}},{name:"endArray",headless:1,init:function(t,e){for(var r=e.length;r--;)this.add(t,r,t[r]||0,e[r],0,0,0,0,0,1)}},Mr("roundProps",ue),Mr("modifiers"),Mr("snap",he))||xr;//register core plugins 503//to prevent the core plugins from being dropped via aggressive tree shaking, we must include them in the variable declaration in this way. 504tr.version=Ve.version=Ar.version="3.13.0",l=1,U()&&Re(),Ee.Power0,Ee.Power1,Ee.Power2,Ee.Power3,Ee.Power4,Ee.Linear,Ee.Quad,Ee.Cubic,Ee.Quart,Ee.Quint,Ee.Strong,Ee.Elastic,Ee.Back,Ee.SteppedEase,Ee.Bounce,Ee.Sine,Ee.Expo,Ee.Circ}}]);
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.