PageSourceSearch

https://meltmethod.ca/wp-content/plugins/BallerWP/ball.js?ver=7.1.3

js meltmethod.ca collected 2026-10-09 01:40:09 UTC 242,029 bytes, 4,886 lines download raw bytes

vendor: 5,254 bytes, lines 1-10
1/*!
2 * GSAP 3.12.5
3 * https://gsap.com
4 * 
5 * @license Copyright 2024, GreenSock. All rights reserved.
6 * Subject to the terms at https://gsap.com/standard-license or for Club GSAP members, the agreement issued with that membership.
7 * @author: Jack Doyle, [email protected]
8 */
9
10!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(e){"use strict";function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r(t){return"string"==typeof t}function s(t){return"function"==typeof t}function t(t){return"number"==typeof t}function u(t){return void 0===t}function v(t){return"object"==typeof t}function w(t){return!1!==t}function x(){return"undefined"!=typeof window}function y(t){return s(t)||r(t)}function P(t){return(i=yt(t,ot))&&ze}function Q(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")}function R(t,e){return!e&&console.warn(t)}function S(t,e){return t&&(ot[t]=e)&&i&&(i[t]=e)||ot}function T(){return 0}function ea(t){var e,r,i=t[0];if(v(i)||s(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for(r=gt.length;r--&&!gt[r].targetTest(i););e=gt[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new Vt(t[r],e)))||t.splice(r,1);return t}function fa(t){return t._gsap||ea(Mt(t))[0]._gsap}function ga(t,e,r){return(r=t[e])&&s(r)?t[e]():u(r)&&t.getAttribute&&t.getAttribute(e)||r}function ha(t,e){return(t=t.split(",")).forEach(e)||t}function ia(t){return Math.round(1e5*t)/1e5||0}function ja(t){return Math.round(1e7*t)/1e7||0}function ka(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}function la(t,e){for(var r=e.length,i=0;t.indexOf(e[i])<0&&++i<r;);return i<r}function ma(){var t,e,r=dt.length,i=dt.slice(0);for(ct={},t=dt.length=0;t<r;t++)(e=i[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)}function na(t,e,r,i){dt.length&&!L&&ma(),t.render(e,r,i||L&&e<0&&(t._initted||t._startAt)),dt.length&&!L&&ma()}function oa(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(at).length<2?e:r(t)?t.trim():t}function pa(t){return t}function qa(t,e){for(var r in e)r in t||(t[r]=e[r]);return t}function ta(t,e){for(var r in e)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=v(e[r])?ta(t[r]||(t[r]={}),e[r]):e[r]);return t}function ua(t,e){var r,i={};for(r in t)r in e||(i[r]=t[r]);return i}function va(t){var e=t.parent||I,r=t.keyframes?function _setKeyframeDefaults(i){return function(t,e){for(var r in e)r in t||"duration"===r&&i||"ease"===r||(t[r]=e[r])}}(Z(t.keyframes)):qa;if(w(t.inherit))for(;e;)r(t,e.vars.defaults),e=e.parent||e._dp;return t}function xa(t,e,r,i,n){void 0===r&&(r="_first"),void 0===i&&(i="_last");var a,s=t[i];if(n)for(a=e[n];s&&s[n]>a;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[i]=e,e._prev=s,e.parent=e._dp=t,e}function ya(t,e,r,i){void 0===r&&(r="_first"),void 0===i&&(i="_last");var n=e._prev,a=e._next;n?n._next=a:t[r]===e&&(t[r]=a),a?a._prev=n:t[i]===e&&(t[i]=n),e._next=e._prev=e.parent=null}function za(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0}function Aa(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t}function Ca(t,e,r,i){return t._startAt&&(L?t._startAt.revert(ht):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))}function Ea(t){return t._repeat?Tt(t._tTime,t=t.duration()+t._rDelay)*t:0}function Ga(t,e){return(t-e._start)*e._ts+(0<=e._ts?0:e._dirty?e.totalDuration():e._tDur)}function Ha(t){return t._end=ja(t._start+(t._tDur/Math.abs(t._ts||t._rts||X)||0))}function Ia(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=ja(r._time-(0<t._ts?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Ha(t),r._dirty||Aa(r,t)),t}function Ja(t,e){var r;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(r=Ga(t.rawTime(),e),(!e._dur||Ot(0,e.totalDuration(),r)-e._tTime>X)&&e.render(r,!0)),Aa(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(r=t;r._dp;)0<=r.rawTime()&&r.totalTime(r._tTime),r=r._dp;t._zTime=-X}}function Ka(e,r,i,n){return r.parent&&za(r),r._start=ja((t(i)?i:i||e!==I?xt(e,i,r):e._time)+r._delay),r._end=ja(r._start+(r.totalDuration()/Math.abs(r.timeScale())||0)),xa(e,r,"_first","_last",e._sort?"_start":0),bt(r)||(e._recent=r),n||Ja(e,r),e._ts<0&&Ia(e,e._tTime),e}function La(t,e){return(ot.ScrollTrigger||Q("scrollTrigger",e))&&ot.ScrollTrigger.create(e,t)}function Ma(t,e,r,i,n){return Qt(t,e,n),t._initted?!r&&t._pt&&!L&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&f!==Rt.frame?(dt.push(t),t._lazy=[n,i],1):void 0:1}function Ra(t,e,r,i){var n=t._repeat,a=ja(e)||0,s=t._tTime/t._tDur;return s&&!i&&(t._time*=a/t._dur),t._dur=a,t._tDur=n?n<0?1e10:ja(a*(n+1)+t._rDelay*n):a,0<s&&!i&&Ia(t,t._tTime=t._tDur*s),t.parent&&Ha(t),r||Aa(t.parent,t),t}function Sa(t){return t instanceof Xt?Aa(t):Ra(t,t._dur)}
vendor: 6,707 bytes, line 10
10function Va(e,r,i){var n,a,s=t(r[1]),o=(s?2:1)+(e<2?0:1),u=r[o];if(s&&(u.duration=r[1]),u.parent=i,e){for(n=u,a=i;a&&!("immediateRender"in n);)n=a.vars.defaults||{},a=w(a.vars.inherit)&&a.parent;u.immediateRender=w(n.immediateRender),e<2?u.runBackwards=1:u.startAt=r[o-1]}return new $t(r[0],u,r[1+o])}function Wa(t,e){return t||0===t?e(t):e}function Ya(t,e){return r(t)&&(e=st.exec(t))?e[1]:""}function _a(t,e){return t&&v(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&v(t[0]))&&!t.nodeType&&t!==h}function cb(r){return r=Mt(r)[0]||R("Invalid scope")||{},function(t){var e=r.current||r.nativeElement||r;return Mt(t,e.querySelectorAll?e:e===r?R("Invalid scope")||a.createElement("div"):r)}}function db(t){return t.sort(function(){return.5-Math.random()})}function eb(t){if(s(t))return t;var p=v(t)?t:{each:t},_=jt(p.ease),m=p.from||0,g=parseFloat(p.base)||0,y={},e=0<m&&m<1,T=isNaN(m)||e,b=p.axis,w=m,x=m;return r(m)?w=x={center:.5,edges:.5,end:1}[m]||0:!e&&T&&(w=m[0],x=m[1]),function(t,e,r){var i,n,a,s,o,u,h,l,f,d=(r||p).length,c=y[d];if(!c){if(!(f="auto"===p.grid?0:(p.grid||[1,U])[1])){for(h=-U;h<(h=r[f++].getBoundingClientRect().left)&&f<d;);f<d&&f--}for(c=y[d]=[],i=T?Math.min(f,d)*w-.5:m%f,n=f===U?0:T?d*x/f-.5:m/f|0,l=U,u=h=0;u<d;u++)a=u%f-i,s=n-(u/f|0),c[u]=o=b?Math.abs("y"===b?s:a):K(a*a+s*s),h<o&&(h=o),o<l&&(l=o);"random"===m&&db(c),c.max=h-l,c.min=l,c.v=d=(parseFloat(p.amount)||parseFloat(p.each)*(d<f?d-1:b?"y"===b?d/f:f:Math.max(f,d/f))||0)*("edges"===m?-1:1),c.b=d<0?g-d:g,c.u=Ya(p.amount||p.each)||0,_=_&&d<0?Yt(_):_}return d=(c[t]-c.min)/c.max||0,ja(c.b+(_?_(d):d)*c.v)+c.u}}function fb(i){var n=Math.pow(10,((i+"").split(".")[1]||"").length);return function(e){var r=ja(Math.round(parseFloat(e)/i)*i*n);return(r-r%1)/n+(t(e)?0:Ya(e))}}function gb(h,e){var l,f,r=Z(h);return!r&&v(h)&&(l=r=h.radius||U,h.values?(h=Mt(h.values),(f=!t(h[0]))&&(l*=l)):h=fb(h.increment)),Wa(e,r?s(h)?function(t){return f=h(t),Math.abs(f-t)<=l?f:t}:function(e){for(var r,i,n=parseFloat(f?e.x:e),a=parseFloat(f?e.y:0),s=U,o=0,u=h.length;u--;)(r=f?(r=h[u].x-n)*r+(i=h[u].y-a)*i:Math.abs(h[u]-n))<s&&(s=r,o=u);return o=!l||s<=l?h[o]:e,f||o===e||t(e)?o:o+Ya(e)}:fb(h))}function hb(t,e,r,i){return Wa(Z(t)?!e:!0===r?!!(r=0):!i,function(){return Z(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})}function lb(e,r,t){return Wa(t,function(t){return e[~~r(t)]})}function ob(t){for(var e,r,i,n,a=0,s="";~(e=t.indexOf("random(",a));)i=t.indexOf(")",e),n="["===t.charAt(e+7),r=t.substr(e+7,i-e-7).match(n?at:tt),s+=t.substr(a,e-a)+hb(n?r:+r[0],n?0:+r[1],+r[2]||1e-5),a=i+1;return s+t.substr(a,t.length-a)}function rb(t,e,r){var i,n,a,s=t.labels,o=U;for(i in s)(n=s[i]-e)<0==!!r&&n&&o>(n=Math.abs(n))&&(a=i,o=n);return a}function tb(t){return za(t),t.scrollTrigger&&t.scrollTrigger.kill(!!L),t.progress()<1&&Ct(t,"onInterrupt"),t}function wb(t){if(t)if(t=!t.name&&t.default||t,x()||t.headless){var e=t.name,r=s(t),i=e&&!r&&t.init?function(){this._props=[]}:t,n={init:T,render:he,add:Wt,kill:ce,modifier:fe,rawVars:0},a={targetTest:0,get:0,getSetter:ne,aliases:{},register:0};if(Ft(),t!==i){if(pt[e])return;qa(i,qa(ua(t,n),a)),yt(i.prototype,yt(n,ua(t,a))),pt[i.prop=e]=i,t.targetTest&&(gt.push(i),ft[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}S(e,i),t.register&&t.register(ze,i,_e)}else At.push(t)}function zb(t,e,r){return(6*(t+=t<0?1:1<t?-1:0)<1?e+(r-e)*t*6:t<.5?r:3*t<2?e+(r-e)*(2/3-t)*6:e)*St+.5|0}function Ab(e,r,i){var n,a,s,o,u,h,l,f,d,c,p=e?t(e)?[e>>16,e>>8&St,e&St]:0:zt.black;if(!p){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),zt[e])p=zt[e];else if("#"===e.charAt(0)){if(e.length<6&&(e="#"+(n=e.charAt(1))+n+(a=e.charAt(2))+a+(s=e.charAt(3))+s+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(p=parseInt(e.substr(1,6),16))>>16,p>>8&St,p&St,parseInt(e.substr(7),16)/255];p=[(e=parseInt(e.substr(1),16))>>16,e>>8&St,e&St]}else if("hsl"===e.substr(0,3))if(p=c=e.match(tt),r){if(~e.indexOf("="))return p=e.match(et),i&&p.length<4&&(p[3]=1),p}else o=+p[0]%360/360,u=p[1]/100,n=2*(h=p[2]/100)-(a=h<=.5?h*(u+1):h+u-h*u),3<p.length&&(p[3]*=1),p[0]=zb(o+1/3,n,a),p[1]=zb(o,n,a),p[2]=zb(o-1/3,n,a);else p=e.match(tt)||zt.transparent;p=p.map(Number)}return r&&!c&&(n=p[0]/St,a=p[1]/St,s=p[2]/St,h=((l=Math.max(n,a,s))+(f=Math.min(n,a,s)))/2,l===f?o=u=0:(d=l-f,u=.5<h?d/(2-l-f):d/(l+f),o=l===n?(a-s)/d+(a<s?6:0):l===a?(s-n)/d+2:(n-a)/d+4,o*=60),p[0]=~~(o+.5),p[1]=~~(100*u+.5),p[2]=~~(100*h+.5)),i&&p.length<4&&(p[3]=1),p}function Bb(t){var r=[],i=[],n=-1;return t.split(Et).forEach(function(t){var e=t.match(rt)||[];r.push.apply(r,e),i.push(n+=e.length+1)}),r.c=i,r}function Cb(t,e,r){var i,n,a,s,o="",u=(t+o).match(Et),h=e?"hsla(":"rgba(",l=0;if(!u)return t;if(u=u.map(function(t){return(t=Ab(t,e,1))&&h+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"}),r&&(a=Bb(t),(i=r.c).join(o)!==a.c.join(o)))for(s=(n=t.replace(Et,"1").split(rt)).length-1;l<s;l++)o+=n[l]+(~i.indexOf(l)?u.shift()||h+"0,0,0,0)":(a.length?a:u.length?u:r).shift());if(!n)for(s=(n=t.split(Et)).length-1;l<s;l++)o+=n[l]+u[l];return o+n[s]}function Fb(t){var e,r=t.join(" ");if(Et.lastIndex=0,Et.test(r))return e=Dt.test(r),t[1]=Cb(t[1],e),t[0]=Cb(t[0],e,Bb(t[1])),!0}function Ob(t){var e=(t+"").split("("),r=Lt[e[0]];return r&&1<e.length&&r.config?r.config.apply(null,~t.indexOf("{")?[function _parseObjectInString(t){for(var e,r,i,n={},a=t.substr(1,t.length-3).split(":"),s=a[0],o=1,u=a.length;o<u;o++)r=a[o],e=o!==u-1?r.lastIndexOf(","):r.length,i=r.substr(0,e),n[s]=isNaN(i)?i.replace(Bt,"").trim():+i,s=r.substr(e+1).trim();return n}(e[1])]:function _valueInParentheses(t){var e=t.indexOf("(")+1,r=t.indexOf(")"),i=t.indexOf("(",e);return t.substring(e,~i&&i<r?t.indexOf(")",r+1):r)}(t).split(",").map(oa)):Lt._CE&&It.test(t)?Lt._CE("",t):r}function Qb(t,e){for(var r,i=t._first;i;)i instanceof Xt?Qb(i,e):!i.vars.yoyoEase||i._yoyo&&i._repeat||i._yoyo===e||(i.timeline?Qb(i.timeline,e):(r=i._ease,i._ease=i._yEase,i._yEase=r,i._yoyo=e)),i=i._next}function Sb(t,e,r,i){void 0===r&&(r=function easeOut(t){return 1-e(1-t)}),void 0===i&&(i=function easeInOut(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var n,a={easeIn:e,easeOut:r,easeInOut:i};return ha(t,function(t){for(var e in Lt[t]=ot[t]=a,Lt[n=t.toLowerCase()]=r,a)Lt[n+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Lt[t+"."+e]=a[e]}),a}function Tb(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}}function Ub(r,t,e){function Jm(t){return 1===t?1:i*Math.pow(2,-10*t)*H((t-a)*n)+1}var i=1<=t?t:1,n=(e||(r?.3:.45))/(t<1?t:1),a=n/N*(Math.asin(1/i)||0),s="out"===r?Jm:"in"===r?function(t){return 1-Jm(1-t)}:Tb(Jm);
vendor: 5,255 bytes, line 10
10return n=N/n,s.config=function(t,e){return Ub(r,t,e)},s}function Vb(e,r){function Rm(t){return t?--t*t*((r+1)*t+r)+1:0}void 0===r&&(r=1.70158);var t="out"===e?Rm:"in"===e?function(t){return 1-Rm(1-t)}:Tb(Rm);return t.config=function(t){return Vb(e,t)},t}var F,L,l,I,h,n,a,i,o,f,d,c,p,_,m,g,b,O,k,M,C,A,z,E,D,B,Y,j,q={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},V={duration:.5,overwrite:!1,delay:0},U=1e8,X=1/U,N=2*Math.PI,G=N/4,W=0,K=Math.sqrt,J=Math.cos,H=Math.sin,$="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},Z=Array.isArray,tt=/(?:-?\.?\d|\.)+/gi,et=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,rt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,it=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,nt=/[+-]=-?[.\d]+/,at=/[^,'"\[\]\s]+/gi,st=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ot={},ut={suppressEvents:!0,isStart:!0,kill:!1},ht={suppressEvents:!0,kill:!1},lt={suppressEvents:!0},ft={},dt=[],ct={},pt={},_t={},mt=30,gt=[],vt="",yt=function _merge(t,e){for(var r in e)t[r]=e[r];return t},Tt=function _animationCycle(t,e){var r=Math.floor(t/=e);return t&&r===t?r-1:r},bt=function _isFromOrFromStart(t){var e=t.data;return"isFromStart"===e||"isStart"===e},wt={_start:0,endTime:T,totalDuration:T},xt=function _parsePosition(t,e,i){var n,a,s,o=t.labels,u=t._recent||wt,h=t.duration()>=U?u.endTime(!1):t._dur;return r(e)&&(isNaN(e)||e in o)?(a=e.charAt(0),s="%"===e.substr(-1),n=e.indexOf("="),"<"===a||">"===a?(0<=n&&(e=e.replace(/=/,"")),("<"===a?u._start:u.endTime(0<=u._repeat))+(parseFloat(e.substr(1))||0)*(s?(n<0?u:i).totalDuration()/100:1)):n<0?(e in o||(o[e]=h),o[e]):(a=parseFloat(e.charAt(n-1)+e.substr(n+1)),s&&i&&(a=a/100*(Z(i)?i[0]:i).totalDuration()),1<n?_parsePosition(t,e.substr(0,n-1),i)+a:h+a)):null==e?h:+e},Ot=function _clamp(t,e,r){return r<t?t:e<r?e:r},kt=[].slice,Mt=function toArray(t,e,i){return l&&!e&&l.selector?l.selector(t):!r(t)||i||!n&&Ft()?Z(t)?function _flatten(t,e,i){return void 0===i&&(i=[]),t.forEach(function(t){return r(t)&&!e||_a(t,1)?i.push.apply(i,Mt(t)):i.push(t)})||i}(t,i):_a(t)?kt.call(t,0):t?[t]:[]:kt.call((e||a).querySelectorAll(t),0)},Pt=function mapRange(e,t,r,i,n){var a=t-e,s=i-r;return Wa(n,function(t){return r+((t-e)/a*s||0)})},Ct=function _callback(t,e,r){var i,n,a,s=t.vars,o=s[e],u=l,h=t._ctx;if(o)return i=s[e+"Params"],n=s.callbackScope||t,r&&dt.length&&ma(),h&&(l=h),a=i?o.apply(n,i):o.call(n),l=u,a},At=[],St=255,zt={aqua:[0,St,St],lime:[0,St,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,St],navy:[0,0,128],white:[St,St,St],olive:[128,128,0],yellow:[St,St,0],orange:[St,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[St,0,0],pink:[St,192,203],cyan:[0,St,St],transparent:[St,St,St,0]},Et=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in zt)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),Dt=/hsl[a]?\(/,Rt=(k=Date.now,M=500,C=33,A=k(),z=A,D=E=1e3/240,g={time:0,frame:0,tick:function tick(){yl(!0)},deltaRatio:function deltaRatio(t){return b/(1e3/(t||60))},wake:function wake(){o&&(!n&&x()&&(h=n=window,a=h.document||{},ot.gsap=ze,(h.gsapVersions||(h.gsapVersions=[])).push(ze.version),P(i||h.GreenSockGlobals||!h.gsap&&h||{}),At.forEach(wb)),m="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,p&&g.sleep(),_=m||function(t){return setTimeout(t,D-1e3*g.time+1|0)},c=1,yl(2))},sleep:function sleep(){(m?cancelAnimationFrame:clearTimeout)(p),c=0,_=T},lagSmoothing:function lagSmoothing(t,e){M=t||1/0,C=Math.min(e||33,M)},fps:function fps(t){E=1e3/(t||240),D=1e3*g.time+E},add:function add(n,t,e){var a=t?function(t,e,r,i){n(t,e,r,i),g.remove(a)}:n;return g.remove(n),B[e?"unshift":"push"](a),Ft(),a},remove:function remove(t,e){~(e=B.indexOf(t))&&B.splice(e,1)&&e<=O&&O--},_listeners:B=[]}),Ft=function _wake(){return!c&&Rt.wake()},Lt={},It=/^[\d.\-M][\d.\-,\s]/,Bt=/["']/g,Yt=function _invertEase(e){return function(t){return 1-e(1-t)}},jt=function _parseEase(t,e){return t&&(s(t)?t:Lt[t]||Ob(t))||e};function yl(t){var e,r,i,n,a=k()-z,s=!0===t;if((M<a||a<0)&&(A+=a-C),(0<(e=(i=(z+=a)-A)-D)||s)&&(n=++g.frame,b=i-1e3*g.time,g.time=i/=1e3,D+=e+(E<=e?4:E-e),r=1),s||(p=_(yl)),r)for(O=0;O<B.length;O++)B[O](i,b,n,t)}function gn(t){return t<j?Y*t*t:t<.7272727272727273?Y*Math.pow(t-1.5/2.75,2)+.75:t<.9090909090909092?Y*(t-=2.25/2.75)*t+.9375:Y*Math.pow(t-2.625/2.75,2)+.984375}ha("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var r=e<5?e+1:e;Sb(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)},function(t){return t<.5?Math.pow(2*t,r)/2:1-Math.pow(2*(1-t),r)/2})}),Lt.Linear.easeNone=Lt.none=Lt.Linear.easeIn,Sb("Elastic",Ub("in"),Ub("out"),Ub()),Y=7.5625,j=1/2.75,Sb("Bounce",function(t){return 1-gn(1-t)},gn),Sb("Expo",function(t){return t?Math.pow(2,10*(t-1)):0}),Sb("Circ",function(t){return-(K(1-t*t)-1)}),Sb("Sine",function(t){return 1===t?1:1-J(t*G)}),Sb("Back",Vb("in"),Vb("out"),Vb()),Lt.SteppedEase=Lt.steps=ot.SteppedEase={config:function config(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*Ot(0,.99999999,t)|0)+n)*r}}},V.ease=Lt["quad.out"],ha("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return vt+=t+","+t+"Param
10s,"});var qt,Vt=function GSCache(t,e){this.id=W++,(t._gsap=this).target=t,this.harness=e,this.get=e?e.get:ga,this.set=e?e.getSetter:ne},Ut=((qt=Animation.prototype).delay=function delay(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},qt.duration=function duration(t){return arguments.length?this.totalDuration(0<this._repeat?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},qt.totalDuration=function totalDuration(t){return arguments.length?(this._dirty=0,Ra(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},qt.totalTime=function totalTime(t,e){if(Ft(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(Ia(this,t),!r._dp||r.parent||Ja(r,this);r&&r.parent;)r.parent._time!==r._start+(0<=r._ts?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(0<this._ts&&t<this._tDur||this._ts<0&&0<t||!this._tDur&&!t)&&Ka(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===X||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),na(this,t,e)),this},qt.time=function time(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+Ea(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},qt.totalProgress=function totalProgress(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):0<this.rawTime()?1:0},qt.progress=function progress(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+Ea(this),e):this.duration()?Math.min(1,this._time/this._dur):0<this.rawTime()?1:0},qt.iteration=function iteration(t,e){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*r,e):this._repeat?Tt(this._tTime,r)+1:1},qt.timeScale=function timeScale(t,e){if(!arguments.length)return this._rts===-X?0:this._rts;if(this._rts===t)return this;var r=this.parent&&this._ts?Ga(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||t===-X?0:this._rts,this.totalTime(Ot(-Math.abs(this._delay),this._tDur,r),!1!==e),Ha(this),function _recacheAncestors(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},qt.paused=function paused(t){return arguments.length?(this._ps!==t&&((this._ps=t)?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Ft(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==X&&(this._tTime-=X)))),this):this._ps},qt.startTime=function startTime(t){if(arguments.length){this._start=t;var e=this.parent||this._dp;return!e||!e._sort&&this.parent||Ka(e,this,t-this._delay),this}return this._start},qt.endTime=function endTime(t){return this._start+(w(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},qt.rawTime=function rawTime(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Ga(e.rawTime(t),this):this._tTime:this._tTime},qt.revert=function revert(t){void 0===t&&(t=lt);var e=L;return L=t,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),L=e,this},qt.globalTime=function globalTime(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},qt.repeat=function repeat(t){return arguments.length?(this._repeat=t===1/0?-2:t,Sa(this)):-2===this._repeat?1/0:this._repeat},qt.repeatDelay=function repeatDelay(t){if(arguments.length){var e=this._time;return this._rDelay=t,Sa(this),e?this.time(e):this}return this._rDelay},qt.yoyo=function yoyo(t){return arguments.length?(this._yoyo=t,this):this._yoyo},qt.seek=function seek(t,e){return this.totalTime(xt(this,t),w(e))},qt.restart=function restart(t,e){return this.play().totalTime(t?-this._delay:0,w(e))},qt.play=function play(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},qt.reverse=function reverse(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},qt.pause=function pause(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},qt.resume=function resume(){return this.paused(!1)},qt.reversed=function reversed(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-X:0)),this):this._rts<0}
vendor: 3,228 bytes, line 10
10,qt.invalidate=function invalidate(){return this._initted=this._act=0,this._zTime=-X,this},qt.isActive=function isActive(){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)-X))},qt.eventCallback=function eventCallback(t,e,r){var i=this.vars;return 1<arguments.length?(e?(i[t]=e,r&&(i[t+"Params"]=r),"onUpdate"===t&&(this._onUpdate=e)):delete i[t],this):i[t]},qt.then=function then(t){var i=this;return new Promise(function(e){function Co(){var t=i.then;i.then=null,s(r)&&(r=r(i))&&(r.then||r===i)&&(i.then=t),e(r),i.then=t}var r=s(t)?t:pa;i._initted&&1===i.totalProgress()&&0<=i._ts||!i._tTime&&i._ts<0?Co():i._prom=Co})},qt.kill=function kill(){tb(this)},Animation);function Animation(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Ra(this,+t.duration,1,1),this.data=t.data,l&&(this._ctx=l).data.push(this),c||Rt.wake()}qa(Ut.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:-X,_prom:0,_ps:!1,_rts:1});var Xt=function(i){function Timeline(t,e){var r;return void 0===t&&(t={}),(r=i.call(this,t)||this).labels={},r.smoothChildTiming=!!t.smoothChildTiming,r.autoRemoveChildren=!!t.autoRemoveChildren,r._sort=w(t.sortChildren),I&&Ka(t.parent||I,_assertThisInitialized(r),e),t.reversed&&r.reverse(),t.paused&&r.paused(!0),t.scrollTrigger&&La(_assertThisInitialized(r),t.scrollTrigger),r}_inheritsLoose(Timeline,i);var e=Timeline.prototype;return e.to=function to(t,e,r){return Va(0,arguments,this),this},e.from=function from(t,e,r){return Va(1,arguments,this),this},e.fromTo=function fromTo(t,e,r,i){return Va(2,arguments,this),this},e.set=function set(t,e,r){return e.duration=0,e.parent=this,va(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new $t(t,e,xt(this,r),1),this},e.call=function call(t,e,r){return Ka(this,$t.delayedCall(0,t,e),r)},e.staggerTo=function staggerTo(t,e,r,i,n,a,s){return r.duration=e,r.stagger=r.stagger||i,r.onComplete=a,r.onCompleteParams=s,r.parent=this,new $t(t,r,xt(this,n)),this},e.staggerFrom=function staggerFrom(t,e,r,i,n,a,s){return r.runBackwards=1,va(r).immediateRender=w(r.immediateRender),this.staggerTo(t,e,r,i,n,a,s)},e.staggerFromTo=function staggerFromTo(t,e,r,i,n,a,s,o){return i.startAt=r,va(i).immediateRender=w(i.immediateRender),this.staggerTo(t,e,i,n,a,s,o)},e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f,d,c,p,_=this._time,m=this._dirty?this.totalDuration():this._tDur,g=this._dur,v=t<=0?0:ja(t),y=this._zTime<0!=t<0&&(this._initted||!g);if(this!==I&&m<v&&0<=t&&(v=m),v!==this._tTime||r||y){if(_!==this._time&&g&&(v+=this._time-_,t+=this._time-_),i=v,f=this._start,u=!(l=this._ts),y&&(g||(_=this._zTime),!t&&e||(this._zTime=t)),this._repeat){if(c=this._yoyo,o=g+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*o+t,e,r);if(i=ja(v%o),v===m?(s=this._repeat,i=g):((s=~~(v/o))&&s===v/o&&(i=g,s--),g<i&&(i=g)),d=Tt(this._tTime,o),!_&&this._tTime&&d!==s&&this._tTime-d*o-this._dur<=0&&(d=s),c&&1&s&&(i=g-i,p=1),s!==d&&!this._lock){var T=c&&1&d,b=T===(c&&
vendor: 44,758 bytes, line 10
101&s);if(s<d&&(T=!T),_=T?0:v%g?g:v,this._lock=1,this.render(_||(p?0:ja(s*o)),e,!g)._lock=0,this._tTime=v,!e&&this.parent&&Ct(this,"onRepeat"),this.vars.repeatRefresh&&!p&&(this.invalidate()._lock=1),_&&_!==this._time||u!=!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(g=this._dur,m=this._tDur,b&&(this._lock=2,_=T?g:-1e-4,this.render(_,!0),this.vars.repeatRefresh&&!p&&this.invalidate()),this._lock=0,!this._ts&&!u)return this;Qb(this,p)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(h=function _findNextPauseTween(t,e,r){var i;if(e<r)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,ja(_),ja(i)))&&(v-=i-(i=h._start)),this._tTime=v,this._time=i,this._act=!l,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,_=0),!_&&i&&!e&&!s&&(Ct(this,"onStart"),this._tTime!==v))return this;if(_<=i&&0<=t)for(n=this._first;n;){if(a=n._next,(n._act||i>=n._start)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(i-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(i-n._start)*n._ts,e,r),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=-X);break}}n=a}else{n=this._last;for(var w=t<0?t:i;n;){if(a=n._prev,(n._act||w<=n._end)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(w-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(w-n._start)*n._ts,e,r||L&&(n._initted||n._startAt)),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=w?-X:X);break}}n=a}}if(h&&!e&&(this.pause(),h.render(_<=i?0:-X)._zTime=_<=i?1:-1,this._ts))return this._start=f,Ha(this),this.render(t,e,r);this._onUpdate&&!e&&Ct(this,"onUpdate",!0),(v===m&&this._tTime>=this.totalDuration()||!v&&_)&&(f!==this._start&&Math.abs(l)===Math.abs(this._ts)||this._lock||(!t&&g||!(v===m&&0<this._ts||!v&&this._ts<0)||za(this,1),e||t<0&&!_||!v&&!_&&m||(Ct(this,v===m&&0<=t?"onComplete":"onReverseComplete",!0),!this._prom||v<m&&0<this.timeScale()||this._prom())))}return this},e.add=function add(e,i){var n=this;if(t(i)||(i=xt(this,i,e)),!(e instanceof Ut)){if(Z(e))return e.forEach(function(t){return n.add(t,i)}),this;if(r(e))return this.addLabel(e,i);if(!s(e))return this;e=$t.delayedCall(0,e)}return this!==e?Ka(this,e,i):this},e.getChildren=function getChildren(t,e,r,i){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===i&&(i=-U);for(var n=[],a=this._first;a;)a._start>=i&&(a instanceof $t?e&&n.push(a):(r&&n.push(a),t&&n.push.apply(n,a.getChildren(!0,e,r)))),a=a._next;return n},e.getById=function getById(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},e.remove=function remove(t){return r(t)?this.removeLabel(t):s(t)?this.killTweensOf(t):(ya(this,t),t===this._recent&&(this._recent=this._last),Aa(this))},e.totalTime=function totalTime(t,e){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ja(Rt.time-(0<this._ts?t/this._ts:(this.totalDuration()-t)/-this._ts))),i.prototype.totalTime.call(this,t,e),this._forcing=0,this):this._tTime},e.addLabel=function addLabel(t,e){return this.labels[t]=xt(this,e),this},e.removeLabel=function removeLabel(t){return delete this.labels[t],this},e.addPause=function addPause(t,e,r){var i=$t.delayedCall(0,e||T,r);return i.data="isPause",this._hasPause=1,Ka(this,i,xt(this,t))},e.removePause=function removePause(t){var e=this._first;for(t=xt(this,t);e;)e._start===t&&"isPause"===e.data&&za(e),e=e._next},e.killTweensOf=function killTweensOf(t,e,r){for(var i=this.getTweensOf(t,r),n=i.length;n--;)Nt!==i[n]&&i[n].kill(t,e);return this},e.getTweensOf=function getTweensOf(e,r){for(var i,n=[],a=Mt(e),s=this._first,o=t(r);s;)s instanceof $t?la(s._targets,a)&&(o?(!Nt||s._initted&&s._ts)&&s.globalTime(0)<=r&&s.globalTime(s.totalDuration())>r:!r||s.isActive())&&n.push(s):(i=s.getTweensOf(a,r)).length&&n.push.apply(n,i),s=s._next;return n},e.tweenTo=function tweenTo(t,e){e=e||{};var r,i=this,n=xt(i,t),a=e.startAt,s=e.onStart,o=e.onStartParams,u=e.immediateRender,h=$t.to(i,qa({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())||X,onStart:function onStart(){if(i.pause(),!r){var t=e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale());h._dur!==t&&Ra(h,t,0,1).render(h._time,!0,!0),r=1}s&&s.apply(h,o||[])}},e));return u?h.render(0):h},e.tweenFromTo=function tweenFromTo(t,e,r){return this.tweenTo(e,qa({startAt:{time:xt(this,t)}},r))},e.recent=function recent(){return this._recent},e.nextLabel=function nextLabel(t){return void 0===t&&(t=this._time),rb(this,xt(this,t))},e.previousLabel=function previousLabel(t){return void 0===t&&(t=this._time),rb(this,xt(this,t),1)},e.currentLabel=function currentLabel(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+X)},e.shiftChildren=function shiftChildren(t,e,r){void 0===r&&(r=0);for(var i,n=this._first,a=this.labels;n;)n._start>=r&&(n._start+=t,n._end+=t),n=n._next;if(e)for(i in a)a[i]>=r&&(a[i]+=t);return Aa(this)},e.invalidate=function invalidate(t){var e=this._first;for(this._lock=0;e;)e.invalidate(t),e=e._next;return i.prototype.invalidate.call(this,t)},e.clear=function clear(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={}),Aa(this)},e.totalDuration=function totalDuration(t){var e,r,i,n=0,a=this,s=a._last,o=U;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-t:t));if(a._dirty){for(i=a.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),o<(r=s._start)&&a._sort&&s._ts&&!a._lock?(a._lock=1,Ka(a,s,r-s._delay,1)._lock=0):o=r,r<0&&s._ts&&(n-=r,(!i&&!a._dp||i&&i.smoothChildTiming)&&(a._start+=r/a._ts,a._time-=r,a._tTime-=r),a.shiftChildren(-r,!1,-Infinity),o=0),s._end>n&&s._ts&&(n=s._end),s=e;Ra(a,a===I&&a._time>n?a._time:n,1,1),a._dirty=0}return a._tDur},Timeline.updateRoot=function updateRoot(t){if(I._ts&&(na(I,Ga(t,I)),f=Rt.frame),Rt.frame>=mt){mt+=q.autoSleep||120;var e=I._first;if((!e||!e._ts)&&q.autoSleep&&Rt._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Rt.sleep()}}},Timeline}(Ut);qa(Xt.prototype,{_lock:0,_hasPause:0,_forcing:0});function ac(t,e,i,n,a,o){var u,h,l,f;if(pt[t]&&!1!==(u=new pt[t]).init(a,u.rawVars?e[t]:function _processVars(t,e,i,n,a){if(s(t)&&(t=Kt(t,a,e,i,n)),!v(t)||t.style&&t.nodeType||Z(t)||$(t))return r(t)?Kt(t,a,e,i,n):t;var o,u={};for(o in t)u[o]=Kt(t[o],a,e,i,n);return u}(e[t],n,a,o,i),i,n,o)&&(i._pt=h=new _e(i._pt,a,t,0,1,u.render,u,0,u.priority),i!==d))for(l=i._ptLookup[i._targets.indexOf(a)],f=u._props.length;f--;)l[u._props[f]]=h;return u}function gc(t,r,e,i){var n,a,s=r.ease||i||"power1.inOut";if(Z(r))a=e[t]||(e[t]=[]),r.forEach(function(t,e){return a.push({t:e/(r.length-1)*100,v:t,e:s})});else for(n in r)a=e[n]||(e[n]=[]),"ease"===n||a.push({t:parseFloat(t),v:r[n],e:s})}var Nt,Gt,Wt=function _addPropTween(t,e,i,n,a,o,u,h,l,f){s(n)&&(n=n(a||0,t,o));var d,c=t[e],p="get"!==i?i:s(c)?l?t[e.indexOf("set")||!s(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():c,_=s(c)?l?re:te:Zt;if(r(n)&&(~n.indexOf("random(")&&(n=ob(n)),"="===n.charAt(1)&&(!(d=ka(p,n)+(Ya(p)||0))&&0!==d||(n=d))),!f||p!==n||Gt)return isNaN(p*n)||""===n?(c||e in t||Q(e,n),function _addComplexStringPropTween(t,e,r,i,n,a,s){var o,u,h,l,f,d,c,p,_=new _e(this._pt,t,e,0,1,ue,null,n),m=0,g=0;for(_.b=r,_.e=i,r+="",(c=~(i+="").indexOf("random("))&&(i=ob(i)),a&&(a(p=[r,i],t,e),r=p[0],i=p[1]),u=r.match(it)||[];o=it.exec(i);)l=o[0],f=i.substring(m,o.index),h?h=(h+1)%5:"rgba("===f.substr(-5)&&(h=1),l!==u[g++]&&(d=parseFloat(u[g-1])||0,_._pt={_next:_._pt,p:f||1===g?f:",",s:d,c:"="===l.charAt(1)?ka(d,l)-d:parseFloat(l)-d,m:h&&h<4?Math.round:0},m=it.lastIndex);return _.c=m<i.length?i.substring(m,i.length):"",_.fp=s,(nt.test(i)||c)&&(_.e=0),this._pt=_}.call(this,t,e,p,n,_,h||q.stringFilter,l)):(d=new _e(this._pt,t,e,+p||0,n-(p||0),"boolean"==typeof c?se:ae,0,_),l&&(d.fp=l),u&&d.modifier(u,this,t),this._pt=d)},Qt=function _initTween(t,e,r){var i,n,a,s,o,u,h,l,f,d,c,p,_,m=t.vars,g=m.ease,v=m.startAt,y=m.immediateRender,T=m.lazy,b=m.onUpdate,x=m.runBackwards,O=m.yoyoEase,k=m.keyframes,M=m.autoRevert,P=t._dur,C=t._startAt,A=t._targets,S=t.parent,z=S&&"nested"===S.data?S.vars.targets:A,E="auto"===t._overwrite&&!F,D=t.timeline;if(!D||k&&g||(g="none"),t._ease=jt(g,V.ease),t._yEase=O?Yt(jt(!0===O?g:O,V.ease)):0,O&&t._yoyo&&!t._repeat&&(O=t._yEase,t._yEase=t._ease,t._ease=O),t._from=!D&&!!m.runBackwards,!D||k&&!m.stagger){if(p=(l=A[0]?fa(A[0]).harness:0)&&m[l.prop],i=ua(m,ft),C&&(C._zTime<0&&C.progress(1),e<0&&x&&y&&!M?C.render(-1,!0):C.revert(x&&P?ht:ut),C._lazy=0),v){if(za(t._startAt=$t.set(A,qa({data:"isStart",overwrite:!1,parent:S,immediateRender:!0,lazy:!C&&w(T),startAt:null,delay:0,onUpdate:b&&function(){return Ct(t,"onUpdate")},stagger:0},v))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(L||!y&&!M)&&t._startAt.revert(ht),y&&P&&e<=0&&r<=0)return void(e&&(t._zTime=e))}else if(x&&P&&!C)if(e&&(y=!1),a=qa({overwrite:!1,data:"isFromStart",lazy:y&&!C&&w(T),immediateRender:y,stagger:0,parent:S},i),p&&(a[l.prop]=p),za(t._startAt=$t.set(A,a)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(L?t._startAt.revert(ht):t._startAt.render(-1,!0)),t._zTime=e,y){if(!e)return}else _initTween(t._startAt,X,X);for(t._pt=t._ptCache=0,T=P&&w(T)||T&&!P,n=0;n<A.length;n++){if(h=(o=A[n])._gsap||ea(A)[n]._gsap,t._ptLookup[n]=d={},ct[h.id]&&dt.length&&ma(),c=z===A?n:z.indexOf(o),l&&!1!==(f=new l).init(o,p||i,t,c,z)&&(t._pt=s=new _e(t._pt,o,f.name,0,1,f.render,f,0,f.priority),f._props.forEach(function(t){d[t]=s}),f.priority&&(u=1)),!l||p)for(a in i)pt[a]&&(f=ac(a,i,t,c,o,z))?f.priority&&(u=1):d[a]=s=Wt.call(t,o,a,"get",i[a],c,z,0,m.stringFilter);t._op&&t._op[n]&&t.kill(o,t._op[n]),E&&t._pt&&(Nt=t,I.killTweensOf(o,d,t.globalTime(e)),_=!t.parent,Nt=0),t._pt&&T&&(ct[h.id]=1)}u&&pe(t),t._onInit&&t._onInit(t)}t._onUpdate=b,t._initted=(!t._op||t._pt)&&!_,k&&e<=0&&D.render(U,!0,!0)},Kt=function _parseFuncOrString(t,e,i,n,a){return s(t)?t.call(e,i,n,a):r(t)&&~t.indexOf("random(")?ob(t):t},Jt=vt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",Ht={};ha(Jt+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return Ht[t]=1});var $t=function(D){function Tween(e,r,i,n){var a;"number"==typeof r&&(i.duration=r,r=i,i=null);var s,o,u,h,l,f,d,c,p=(a=D.call(this,n?r:va(r))||this).vars,_=p.duration,m=p.delay,g=p.immediateRender,T=p.stagger,b=p.overwrite,x=p.keyframes,O=p.defaults,k=p.scrollTrigger,M=p.yoyoEase,P=r.parent||I,C=(Z(e)||$(e)?t(e[0]):"length"in r)?[e]:Mt(e);if(a._targets=C.length?ea(C):R("GSAP target "+e+" not found. https://gsap.com",!q.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=b,x||T||y(_)||y(m)){if(r=a.vars,(s=a.timeline=new Xt({data:"nested",defaults:O||{},targets:P&&"nested"===P.data?P.vars.targets:C})).kill(),s.parent=s._dp=_assertThisInitialized(a),s._start=0,T||y(_)||y(m)){if(h=C.length,d=T&&eb(T),v(T))for(l in T)~Jt.indexOf(l)&&((c=c||{})[l]=T[l]);for(o=0;o<h;o++)(u=ua(r,Ht)).stagger=0,M&&(u.yoyoEase=M),c&&yt(u,c),f=C[o],u.duration=+Kt(_,_assertThisInitialized(a),o,f,C),u.delay=(+Kt(m,_assertThisInitialized(a),o,f,C)||0)-a._delay,!T&&1===h&&u.delay&&(a._delay=m=u.delay,a._start+=m,u.delay=0),s.to(f,u,d?d(o,f,C):0),s._ease=Lt.none;s.duration()?_=m=0:a.timeline=0}else if(x){va(qa(s.vars.defaults,{ease:"none"})),s._ease=jt(x.ease||r.ease||"none");var A,S,z,E=0;if(Z(x))x.forEach(function(t){return s.to(C,t,">")}),s.duration();else{for(l in u={},x)"ease"===l||"easeEach"===l||gc(l,x[l],u,x.easeEach);for(l in u)for(A=u[l].sort(function(t,e){return t.t-e.t}),o=E=0;o<A.length;o++)(z={ease:(S=A[o]).e,duration:(S.t-(o?A[o-1].t:0))/100*_})[l]=S.v,s.to(C,z,E),E+=z.duration;s.duration()<_&&s.to({},{duration:_-s.duration()})}}_||a.duration(_=s.duration())}else a.timeline=0;return!0!==b||F||(Nt=_assertThisInitialized(a),I.killTweensOf(C),Nt=0),Ka(P,_assertThisInitialized(a),i),r.reversed&&a.reverse(),r.paused&&a.paused(!0),(g||!_&&!x&&a._start===ja(P._time)&&w(g)&&function _hasNoPausedAncestors(t){return!t||t._ts&&_hasNoPausedAncestors(t.parent)}(_assertThisInitialized(a))&&"nested"!==P.data)&&(a._tTime=-X,a.render(Math.max(0,-m)||0)),k&&La(_assertThisInitialized(a),k),a}_inheritsLoose(Tween,D);var e=Tween.prototype;return e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f,d=this._time,c=this._tDur,p=this._dur,_=t<0,m=c-X<t&&!_?c:t<X?0:t;if(p){if(m!==this._tTime||!t||r||!this._initted&&this._tTime||this._startAt&&this._zTime<0!=_){if(i=m,l=this.timeline,this._repeat){if(s=p+this._rDelay,this._repeat<-1&&_)return this.totalTime(100*s+t,e,r);if(i=ja(m%s),m===c?(a=this._repeat,i=p):((a=~~(m/s))&&a===ja(m/s)&&(i=p,a--),p<i&&(i=p)),(u=this._yoyo&&1&a)&&(f=this._yEase,i=p-i),o=Tt(this._tTime,s),i===d&&!r&&this._initted&&a===o)return this._tTime=m,this;a!==o&&(l&&this._yEase&&Qb(l,u),this.vars.repeatRefresh&&!u&&!this._lock&&this._time!==s&&this._initted&&(this._lock=r=1,this.render(ja(s*a),!0).invalidate()._lock=0))}if(!this._initted){if(Ma(this,_?t:i,r,e,m))return this._tTime=0,this;if(!(d===this._time||r&&this.vars.repeatRefresh&&a!==o))return this;if(p!==this._dur)return this.render(t,e,r)}if(this._tTime=m,this._time=i,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=h=(f||this._ease)(i/p),this._from&&(this.ratio=h=1-h),i&&!d&&!e&&!a&&(Ct(this,"onStart"),this._tTime!==m))return this;for(n=this._pt;n;)n.r(h,n.d),n=n._next;l&&l.render(t<0?t:l._dur*l._ease(i/this._dur),e,r)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(_&&Ca(this,t,0,r),Ct(this,"onUpdate")),this._repeat&&a!==o&&this.vars.onRepeat&&!e&&this.parent&&Ct(this,"onRepeat"),m!==this._tDur&&m||this._tTime!==m||(_&&!this._onUpdate&&Ca(this,t,0,!0),!t&&p||!(m===this._tDur&&0<this._ts||!m&&this._ts<0)||za(this,1),e||_&&!d||!(m||d||u)||(Ct(this,m===c?"onComplete":"onReverseComplete",!0),!this._prom||m<c&&0<this.timeScale()||this._prom()))}}else!function _renderZeroDurationTween(t,e,r,i){var n,a,s,o=t.ratio,u=e<0||!e&&(!t._start&&function _parentPlayheadIsBeforeStart(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||_parentPlayheadIsBeforeStart(e))}(t)&&(t._initted||!bt(t))||(t._ts<0||t._dp._ts<0)&&!bt(t))?0:1,h=t._rDelay,l=0;if(h&&t._repeat&&(l=Ot(0,t._tDur,e),a=Tt(l,h),t._yoyo&&1&a&&(u=1-u),a!==Tt(t._tTime,h)&&(o=1-u,t.vars.repeatRefresh&&t._initted&&t.invalidate())),u!==o||L||i||t._zTime===X||!e&&t._zTime){if(!t._initted&&Ma(t,e,i,r,l))return;for(s=t._zTime,t._zTime=e||(r?X:0),r=r||e&&!s,t.ratio=u,t._from&&(u=1-u),t._time=0,t._tTime=l,n=t._pt;n;)n.r(u,n.d),n=n._next;e<0&&Ca(t,e,0,!0),t._onUpdate&&!r&&Ct(t,"onUpdate"),l&&t._repeat&&!r&&t.parent&&Ct(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===u&&(u&&za(t,1),r||L||(Ct(t,u?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,r);return this},e.targets=function targets(){return this._targets},e.invalidate=function invalidate(t){return t&&this.vars.runBackwards||(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),D.prototype.invalidate.call(this,t)},e.resetTo=function resetTo(t,e,r,i,n){c||Rt.wake(),this._ts||this.play();var a,s=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Qt(this,s),a=this._ease(s/this._dur),function _updatePropTweens(t,e,r,i,n,a,s,o){var u,h,l,f,d=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!d)for(d=t._ptCache[e]=[],l=t._ptLookup,f=t._targets.length;f--;){if((u=l[f][e])&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==e&&u.fp!==e;)u=u._next;if(!u)return Gt=1,t.vars[e]="+=0",Qt(t,s),Gt=0,o?R(e+" not eligible for reset"):1;d.push(u)}for(f=d.length;f--;)(u=(h=d[f])._pt||h).s=!i&&0!==i||n?u.s+(i||0)+a*u.c:i,u.c=r-u.s,h.e&&(h.e=ia(r)+Ya(h.e)),h.b&&(h.b=u.s+Ya(h.b))}(this,t,e,r,i,a,s,n)?this.resetTo(t,e,r,i,1):(Ia(this,0),this.parent||xa(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function kill(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?tb(this):this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Nt&&!0!==Nt.vars.overwrite)._first||tb(this),this.parent&&i!==this.timeline.totalDuration()&&Ra(this,this._dur*this.timeline._tDur/i,0,1),this}var n,a,s,o,u,h,l,f=this._targets,d=t?Mt(t):f,c=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function _arraysMatch(t,e){for(var r=t.length,i=r===e.length;i&&r--&&t[r]===e[r];);return r<0}(f,d))return"all"===e&&(this._pt=0),tb(this);for(n=this._op=this._op||[],"all"!==e&&(r(e)&&(u={},ha(e,function(t){return u[t]=1}),e=u),e=function _addAliasesToVars(t,e){var r,i,n,a,s=t[0]?fa(t[0]).harness:0,o=s&&s.aliases;if(!o)return e;for(i in r=yt({},e),o)if(i in r)for(n=(a=o[i].split(",")).length;n--;)r[a[n]]=r[i];return r}(f,e)),l=f.length;l--;)if(~d.indexOf(f[l]))for(u in a=c[l],"all"===e?(n[l]=e,o=a,s={}):(s=n[l]=n[l]||{},o=e),o)(h=a&&a[u])&&("kill"in h.d&&!0!==h.d.kill(u)||ya(this,h,"_pt"),delete a[u]),"all"!==s&&(s[u]=1);return this._initted&&!this._pt&&p&&tb(this),this},Tween.to=function to(t,e,r){return new Tween(t,e,r)},Tween.from=function from(t,e){return Va(1,arguments)},Tween.delayedCall=function delayedCall(t,e,r,i){return new Tween(e,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:e,onReverseComplete:e,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},Tween.fromTo=function fromTo(t,e,r){return Va(2,arguments)},Tween.set=function set(t,e){return e.duration=0,e.repeatDelay||(e.repeat=0),new Tween(t,e)},Tween.killTweensOf=function killTweensOf(t,e,r){return I.killTweensOf(t,e,r)},Tween}(Ut);qa($t.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ha("staggerTo,staggerFrom,staggerFromTo",function(r){$t[r]=function(){var t=new Xt,e=kt.call(arguments,0);return e.splice("staggerFromTo"===r?5:4,0,0),t[r].apply(t,e)}});function oc(t,e,r){return t.setAttribute(e,r)}function wc(t,e,r,i){i.mSet(t,e,i.m.call(i.tween,r,i.mt),i)}var Zt=function _setterPlain(t,e,r){return t[e]=r},te=function _setterFunc(t,e,r){return t[e](r)},re=function _setterFuncWithParam(t,e,r,i){return t[e](i.fp,r)},ne=function _getSetter(t,e){return s(t[e])?te:u(t[e])&&t.setAttribute?oc:Zt},ae=function _renderPlain(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},se=function _renderBoolean(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},ue=function _renderComplexString(t,e){var r=e._pt,i="";if(!t&&e.b)i=e.b;else if(1===t&&e.e)i=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,r=r._next;i+=e.c}e.set(e.t,e.p,i,e)},he=function _renderPropTweens(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},fe=function _addPluginModifier(t,e,r,i){for(var n,a=this._pt;a;)n=a._next,a.p===i&&a.modifier(t,e,r),a=n},ce=function _killPropTweensOf(t){for(var e,r,i=this._pt;i;)r=i._next,i.p===t&&!i.op||i.op===t?ya(this,i,"_pt"):i.dep||(e=1),i=r;return!e},pe=function _sortPropTweensByPriority(t){for(var e,r,i,n,a=t._pt;a;){for(e=a._next,r=i;r&&r.pr>a.pr;)r=r._next;(a._prev=r?r._prev:n)?a._prev._next=a:i=a,(a._next=r)?r._prev=a:n=a,a=e}t._pt=i},_e=(PropTween.prototype.modifier=function modifier(t,e,r){this.mSet=this.mSet||this.set,this.set=wc,this.m=t,this.mt=r,this.tween=e},PropTween);function PropTween(t,e,r,i,n,a,s,o,u){this.t=e,this.s=i,this.c=n,this.p=r,this.r=a||ae,this.d=s||this,this.set=o||Zt,this.pr=u||0,(this._next=t)&&(t._prev=this)}ha(vt+"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 ft[t]=1}),ot.TweenMax=ot.TweenLite=$t,ot.TimelineLite=ot.TimelineMax=Xt,I=new Xt({sortChildren:!1,defaults:V,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),q.stringFilter=Fb;function Ec(t){return(ye[t]||Te).map(function(t){return t()})}function Fc(){var t=Date.now(),o=[];2<t-Oe&&(Ec("matchMediaInit"),ge.forEach(function(t){var e,r,i,n,a=t.queries,s=t.conditions;for(r in a)(e=h.matchMedia(a[r]).matches)&&(i=1),e!==s[r]&&(s[r]=e,n=1);n&&(t.revert(),i&&o.push(t))}),Ec("matchMediaRevert"),o.forEach(function(e){return e.onMatch(e,function(t){return e.add(null,t)})}),Oe=t,Ec("matchMedia"))}var me,ge=[],ye={},Te=[],Oe=0,Me=0,Pe=((me=Context.prototype).add=function add(t,i,n){function Gw(){var t,e=l,r=a.selector;return e&&e!==a&&e.data.push(a),n&&(a.selector=cb(n)),l=a,t=i.apply(a,arguments),s(t)&&a._r.push(t),l=e,a.selector=r,a.isReverted=!1,t}s(t)&&(n=i,i=t,t=s);var a=this;return a.last=Gw,t===s?Gw(a,function(t){return a.add(null,t)}):t?a[t]=Gw:Gw},me.ignore=function ignore(t){var e=l;l=null,t(this),l=e},me.getTweens=function getTweens(){var e=[];return this.data.forEach(function(t){return t instanceof Context?e.push.apply(e,t.getTweens()):t instanceof $t&&!(t.parent&&"nested"===t.parent.data)&&e.push(t)}),e},me.clear=function clear(){this._r.length=this.data.length=0},me.kill=function kill(i,t){var n=this;if(i?function(){for(var t,e=n.getTweens(),r=n.data.length;r--;)"isFlip"===(t=n.data[r]).data&&(t.revert(),t.getChildren(!0,!0,!1).forEach(function(t){return e.splice(e.indexOf(t),1)}));for(e.map(function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t:t}}).sort(function(t,e){return e.g-t.g||-1/0}).forEach(function(t){return t.t.revert(i)}),r=n.data.length;r--;)(t=n.data[r])instanceof Xt?"nested"!==t.data&&(t.scrollTrigger&&t.scrollTrigger.revert(),t.kill()):t instanceof $t||!t.revert||t.revert(i);n._r.forEach(function(t){return t(i,n)}),n.isReverted=!0}():this.data.forEach(function(t){return t.kill&&t.kill()}),this.clear(),t)for(var e=ge.length;e--;)ge[e].id===this.id&&ge.splice(e,1)},me.revert=function revert(t){this.kill(t||{})},Context);function Context(t,e){this.selector=e&&cb(e),this.data=[],this._r=[],this.isReverted=!1,this.id=Me++,t&&this.add(t)}var Ce,Ae=((Ce=MatchMedia.prototype).add=function add(t,e,r){v(t)||(t={matches:t});var i,n,a,s=new Pe(0,r||this.scope),o=s.conditions={};for(n in l&&!s.selector&&(s.selector=l.selector),this.contexts.push(s),e=s.add("onMatch",e),s.queries=t)"all"===n?a=1:(i=h.matchMedia(t[n]))&&(ge.indexOf(s)<0&&ge.push(s),(o[n]=i.matches)&&(a=1),i.addListener?i.addListener(Fc):i.addEventListener("change",Fc));return a&&e(s,function(t){return s.add(null,t)}),this},Ce.revert=function revert(t){this.kill(t||{})},Ce.kill=function kill(e){this.contexts.forEach(function(t){return t.kill(e,!0)})},MatchMedia);function MatchMedia(t){this.contexts=[],this.scope=t,l&&l.data.push(this)}var Se={registerPlugin:function registerPlugin(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t){return wb(t)})},timeline:function timeline(t){return new Xt(t)},getTweensOf:function getTweensOf(t,e){return I.getTweensOf(t,e)},getProperty:function getProperty(i,t,e,n){r(i)&&(i=Mt(i)[0]);var a=fa(i||{}).get,s=e?pa:oa;return"native"===e&&(e=""),i?t?s((pt[t]&&pt[t].get||a)(i,t,e,n)):function(t,e,r){return s((pt[t]&&pt[t].get||a)(i,t,e,r))}:i},quickSetter:function quickSetter(r,e,i){if(1<(r=Mt(r)).length){var n=r.map(function(t){return ze.quickSetter(t,e,i)}),a=n.length;return function(t){for(var e=a;e--;)n[e](t)}}r=r[0]||{};var s=pt[e],o=fa(r),u=o.harness&&(o.harness.aliases||{})[e]||e,h=s?function(t){var e=new s;d._pt=0,e.init(r,i?t+i:t,d,0,[r]),e.render(1,e),d._pt&&he(1,d)}:o.set(r,u);return s?h:function(t){return h(r,u,i?t+i:t,o,1)}},quickTo:function quickTo(t,i,e){function $x(t,e,r){return n.resetTo(i,t,e,r)}var r,n=ze.to(t,yt(((r={})[i]="+=0.1",r.paused=!0,r),e||{}));return $x.tween=n,$x},isTweening:function isTweening(t){return 0<I.getTweensOf(t,!0).length},defaults:function defaults(t){return t&&t.ease&&(t.ease=jt(t.ease,V.ease)),ta(V,t||{})},config:function config(t){return ta(q,t||{})},registerEffect:function registerEffect(t){var i=t.name,n=t.effect,e=t.plugins,a=t.defaults,r=t.extendTimeline;(e||"").split(",").forEach(function(t){return t&&!pt[t]&&!ot[t]&&R(i+" effect requires "+t+" plugin.")}),_t[i]=function(t,e,r){return n(Mt(t),qa(e||{},a),r)},r&&(Xt.prototype[i]=function(t,e,r){return this.add(_t[i](t,v(e)?e:(r=e)&&{},this),r)})},registerEase:function registerEase(t,e){Lt[t]=jt(e)},parseEase:function parseEase(t,e){return arguments.length?jt(t,e):Lt},getById:function getById(t){return I.getById(t)},exportRoot:function exportRoot(t,e){void 0===t&&(t={});var r,i,n=new Xt(t);for(n.smoothChildTiming=w(t.smoothChildTiming),I.remove(n),n._dp=0,n._time=n._tTime=I._time,r=I._first;r;)i=r._next,!e&&!r._dur&&r instanceof $t&&r.vars.onComplete===r._targets[0]||Ka(n,r,r._start-r._delay),r=i;return Ka(I,n,0),n},context:function context(t,e){return t?new Pe(t,e):l},matchMedia:function matchMedia(t){return new Ae(t)},matchMediaRefresh:function matchMediaRefresh(){return ge.forEach(function(t){var e,r,i=t.conditions;for(r in i)i[r]&&(i[r]=!1,e=1);e&&t.revert()})||Fc()},addEventListener:function addEventListener(t,e){var r=ye[t]||(ye[t]=[]);~r.indexOf(e)||r.push(e)},removeEventListener:function removeEventListener(t,e){var r=ye[t],i=r&&r.indexOf(e);0<=i&&r.splice(i,1)},utils:{wrap:function wrap(e,t,r){var i=t-e;return Z(e)?lb(e,wrap(0,e.length),t):Wa(r,function(t){return(i+(t-e)%i)%i+e})},wrapYoyo:function wrapYoyo(e,t,r){var i=t-e,n=2*i;return Z(e)?lb(e,wrapYoyo(0,e.length-1),t):Wa(r,function(t){return e+(i<(t=(n+(t-e)%n)%n||0)?n-t:t)})},distribute:eb,random:hb,snap:gb,normalize:function normalize(t,e,r){return Pt(t,e,0,1,r)},getUnit:Ya,clamp:function clamp(e,r,t){return Wa(t,function(t){return Ot(e,r,t)})},splitColor:Ab,toArray:Mt,selector:cb,mapRange:Pt,pipe:function pipe(){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 unitize(e,r){return function(t){return e(parseFloat(t))+(r||Ya(t))}},interpolate:function interpolate(e,i,t,n){var a=isNaN(e+i)?0:function(t){return(1-t)*e+t*i};if(!a){var s,o,u,h,l,f=r(e),d={};if(!0===t&&(n=1)&&(t=null),f)e={p:e},i={p:i};else if(Z(e)&&!Z(i)){for(u=[],h=e.length,l=h-2,o=1;o<h;o++)u.push(interpolate(e[o-1],e[o]));h--,a=function func(t){t*=h;var e=Math.min(l,~~t);return u[e](t-e)},t=i}else n||(e=yt(Z(e)?[]:{},e));if(!u){for(s in i)Wt.call(d,e,s,"get",i[s]);a=function func(t){return he(t,d)||(f?e.p:e)}}}return Wa(t,a)},shuffle:db},install:P,effects:_t,ticker:Rt,updateRoot:Xt.updateRoot,plugins:pt,globalTimeline:I,core:{PropTween:_e,globals:S,Tween:$t,Timeline:Xt,Animation:Ut,getCache:fa,_removeLinkedListItem:ya,reverting:function reverting(){return L},context:function context(t){return t&&l&&(l.data.push(t),t._ctx=l),l},suppressOverwrites:function suppressOverwrites(t){return F=t}}};ha("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Se[t]=$t[t]}),Rt.add(Xt.updateRoot),d=Se.to({},{duration:0});function Jc(t,e){for(var r=t._pt;r&&r.p!==e&&r.op!==e&&r.fp!==e;)r=r._next;return r}function Lc(t,a){return{name:t,rawVars:1,init:function init(t,n,e){e._onInit=function(t){var e,i;if(r(n)&&(e={},ha(n,function(t){return e[t]=1}),n=e),a){for(i in e={},n)e[i]=a(n[i]);n=e}!function _addModifiers(t,e){var r,i,n,a=t._targets;for(r in e)for(i=a.length;i--;)(n=(n=t._ptLookup[i][r])&&n.d)&&(n._pt&&(n=Jc(n,r)),n&&n.modifier&&n.modifier(e[r],t,a[i],r))}(t,n)}}}}var ze=Se.registerPlugin({name:"attr",init:function init(t,e,r,i,n){var a,s,o;for(a in this.tween=r,e)o=t.getAttribute(a)||"",(s=this.add(t,"setAttribute",(o||0)+"",e[a],i,n,0,0,a)).op=a,s.b=o,this._props.push(a)},render:function render(t,e){for(var r=e._pt;r;)L?r.set(r.t,r.p,r.b,r):r.r(t,r.d),r=r._next}},{name:"endArray",init:function init(t,e){for(var r=e.length;r--;)this.add(t,r,t[r]||0,e[r],0,0,0,0,0,1)}},Lc("roundProps",fb),Lc("modifiers"),Lc("snap",gb))||Se;$t.version=Xt.version=ze.version="3.12.5",o=1,x()&&Ft();function vd(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function wd(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function xd(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function yd(t,e){var r=e.s+e.c*t;e.set(e.t,e.p,~~(r+(r<0?-.5:.5))+e.u,e)}function zd(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)}function Ad(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)}function Bd(t,e,r){return t.style[e]=r}function Cd(t,e,r){return t.style.setProperty(e,r)}function Dd(t,e,r){return t._gsap[e]=r}function Ed(t,e,r){return t._gsap.scaleX=t._gsap.scaleY=r}function Fd(t,e,r,i,n){var a=t._gsap;a.scaleX=a.scaleY=r,a.renderTransform(n,a)}function Gd(t,e,r,i,n){var a=t._gsap;a[e]=r,a.renderTransform(n,a)}function Jd(t,e){var r=this,i=this.target,n=i.style,a=i._gsap;if(t in ar&&n){if(this.tfm=this.tfm||{},"transform"===t)return dr.transform.split(",").forEach(function(t){return Jd.call(r,t,e)});if(~(t=dr[t]||t).indexOf(",")?t.split(",").forEach(function(t){return r.tfm[t]=yr(i,t)}):this.tfm[t]=a.x?a[t]:yr(i,t),t===pr&&(this.tfm.zOrigin=a.zOrigin),0<=this.props.indexOf(cr))return;a.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(pr,e,"")),t=cr}(n||e)&&this.props.push(t,e,n[t])}function Kd(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))}function Ld(){var t,e,r=this.props,i=this.target,n=i.style,a=i._gsap;for(t=0;t<r.length;t+=3)r[t+1]?i[r[t]]=r[t+2]:r[t+2]?n[r[t]]=r[t+2]:n.removeProperty("--"===r[t].substr(0,2)?r[t]:r[t].replace(hr,"-$1").toLowerCase());if(this.tfm){for(e in this.tfm)a[e]=this.tfm[e];a.svg&&(a.renderTransform(),i.setAttribute("data-svg-origin",this.svgo||"")),(t=Be())&&t.isStart||n[cr]||(Kd(n),a.zOrigin&&n[pr]&&(n[pr]+=" "+a.zOrigin+"px",a.zOrigin=0,a.renderTransform()),a.uncache=1)}}function Md(t,e){var r={target:t,props:[],revert:Ld,save:Jd};return t._gsap||ze.core.getCache(t),e&&e.split(",").forEach(function(t){return r.save(t)}),r}function Od(t,e){var r=De.createElementNS?De.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):De.createElement(t);return r&&r.style?r:De.createElement(t)}function Pd(t,e,r){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(hr,"-$1").toLowerCase())||i.getPropertyValue(e)||!r&&Pd(t,mr(e)||e,1)||""}function Sd(){(function _windowExists(){return"undefined"!=typeof window})()&&window.document&&(Ee=window,De=Ee.document,Re=De.documentElement,Le=Od("div")||{style:{}},Od("div"),cr=mr(cr),pr=cr+"Origin",Le.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Ye=!!mr("perspective"),Be=ze.core.reverting,Fe=1)}function Td(t){var e,r=Od("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,n=this.nextSibling,a=this.style.cssText;if(Re.appendChild(r),r.appendChild(this),this.style.display="block",t)try{e=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=Td}catch(t){}else this._gsapBBox&&(e=this._gsapBBox());return i&&(n?i.insertBefore(this,n):i.appendChild(this)),Re.removeChild(r),this.style.cssText=a,e}function Ud(t,e){for(var r=e.length;r--;)if(t.hasAttribute(e[r]))return t.getAttribute(e[r])}function Vd(e){var r;try{r=e.getBBox()}catch(t){r=Td.call(e,!0)}return r&&(r.width||r.height)||e.getBBox===Td||(r=Td.call(e,!0)),!r||r.width||r.x||r.y?r:{x:+Ud(e,["x","cx","x1"])||0,y:+Ud(e,["y","cy","y1"])||0,width:0,height:0}}function Wd(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!Vd(t))}function Xd(t,e){if(e){var r,i=t.style;e in ar&&e!==pr&&(e=cr),i.removeProperty?("ms"!==(r=e.substr(0,2))&&"webkit"!==e.substr(0,6)||(e="-"+e),i.removeProperty("--"===r?e:e.replace(hr,"-$1").toLowerCase())):i.removeAttribute(e)}}function Yd(t,e,r,i,n,a){var s=new _e(t._pt,e,r,0,1,a?Ad:zd);return(t._pt=s).b=i,s.e=n,t._props.push(r),s}function _d(t,e,r,i){var n,a,s,o,u=parseFloat(r)||0,h=(r+"").trim().substr((u+"").length)||"px",l=Le.style,f=lr.test(e),d="svg"===t.tagName.toLowerCase(),c=(d?"client":"offset")+(f?"Width":"Height"),p="px"===i,_="%"===i;if(i===h||!u||gr[i]||gr[h])return u;if("px"===h||p||(u=_d(t,e,r,"px")),o=t.getCTM&&Wd(t),(_||"%"===h)&&(ar[e]||~e.indexOf("adius")))return n=o?t.getBBox()[f?"width":"height"]:t[c],ia(_?u/n*100:u/100*n);if(l[f?"width":"height"]=100+(p?h:i),a=~e.indexOf("adius")||"em"===i&&t.appendChild&&!d?t:t.parentNode,o&&(a=(t.ownerSVGElement||{}).parentNode),a&&a!==De&&a.appendChild||(a=De.body),(s=a._gsap)&&_&&s.width&&f&&s.time===Rt.time&&!s.uncache)return ia(u/s.width*100);if(!_||"height"!==e&&"width"!==e)!_&&"%"!==h||vr[Pd(a,"display")]||(l.position=Pd(t,"position")),a===t&&(l.position="static"),a.appendChild(Le),n=Le[c],a.removeChild(Le),l.position="absolute";else{var m=t.style[e];t.style[e]=100+i,n=t[c],m?t.style[e]=m:Xd(t,e)}return f&&_&&((s=fa(a)).time=Rt.time,s.width=a[c]),ia(p?n*u/100:n&&u?100/n*u:0)}function be(t,e,r,i){if(!r||"none"===r){var n=mr(e,t,1),a=n&&Pd(t,n,1);a&&a!==r?(e=n,r=a):"borderColor"===e&&(r=Pd(t,"borderTopColor"))}var s,o,u,h,l,f,d,c,p,_,m,g=new _e(this._pt,t.style,e,0,1,ue),v=0,y=0;if(g.b=r,g.e=i,r+="","auto"===(i+="")&&(f=t.style[e],t.style[e]=i,i=Pd(t,e)||i,f?t.style[e]=f:Xd(t,e)),Fb(s=[r,i]),i=s[1],u=(r=s[0]).match(rt)||[],(i.match(rt)||[]).length){for(;o=rt.exec(i);)d=o[0],p=i.substring(v,o.index),l?l=(l+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(l=1),d!==(f=u[y++]||"")&&(h=parseFloat(f)||0,m=f.substr((h+"").length),"="===d.charAt(1)&&(d=ka(h,d)+m),c=parseFloat(d),_=d.substr((c+"").length),v=rt.lastIndex-_.length,_||(_=_||q.units[e]||m,v===i.length&&(i+=_,g.e+=_)),m!==_&&(h=_d(t,e,f,_)||0),g._pt={_next:g._pt,p:p||1===y?p:",",s:h,c:c-h,m:l&&l<4||"zIndex"===e?Math.round:0});g.c=v<i.length?i.substring(v,i.length):""}else g.r="display"===e&&"none"===i?Ad:zd;return nt.test(i)&&(g.e=0),this._pt=g}function de(t){var e=t.split(" "),r=e[0],i=e[1]||"50%";return"top"!==r&&"bottom"!==r&&"left"!==i&&"right"!==i||(t=r,r=i,i=t),e[0]=Tr[r]||r,e[1]=Tr[i]||i,e.join(" ")}function ee(t,e){if(e.tween&&e.tween._time===e.tween._dur){var r,i,n,a=e.t,s=a.style,o=e.u,u=a._gsap;if("all"===o||!0===o)s.cssText="",i=1;else for(n=(o=o.split(",")).length;-1<--n;)r=o[n],ar[r]&&(i=1,r="transformOrigin"===r?pr:cr),Xd(a,r);i&&(Xd(a,cr),u&&(u.svg&&a.removeAttribute("transform"),Or(a,1),u.uncache=1,Kd(s)))}}function ie(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t}function je(t){var e=Pd(t,cr);return ie(e)?wr:e.substr(7).match(et).map(ia)}function ke(t,e){var r,i,n,a,s=t._gsap||fa(t),o=t.style,u=je(t);return s.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(u=[(n=t.transform.baseVal.consolidate().matrix).a,n.b,n.c,n.d,n.e,n.f]).join(",")?wr:u:(u!==wr||t.offsetParent||t===Re||s.svg||(n=o.display,o.display="block",(r=t.parentNode)&&t.offsetParent||(a=1,i=t.nextElementSibling,Re.appendChild(t)),u=je(t),n?o.display=n:Xd(t,"display"),a&&(i?r.insertBefore(t,i):r?r.appendChild(t):Re.removeChild(t))),e&&6<u.length?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)}function le(t,e,r,i,n,a){var s,o,u,h=t._gsap,l=n||ke(t,!0),f=h.xOrigin||0,d=h.yOrigin||0,c=h.xOffset||0,p=h.yOffset||0,_=l[0],m=l[1],g=l[2],v=l[3],y=l[4],T=l[5],b=e.split(" "),w=parseFloat(b[0])||0,x=parseFloat(b[1])||0;r?l!==wr&&(o=_*v-m*g)&&(u=w*(-m/o)+x*(_/o)-(_*T-m*y)/o,w=w*(v/o)+x*(-g/o)+(g*T-v*y)/o,x=u):(w=(s=Vd(t)).x+(~b[0].indexOf("%")?w/100*s.width:w),x=s.y+(~(b[1]||b[0]).indexOf("%")?x/100*s.height:x)),i||!1!==i&&h.smooth?(y=w-f,T=x-d,h.xOffset=c+(y*_+T*g)-y,h.yOffset=p+(y*m+T*v)-T):h.xOffset=h.yOffset=0,h.xOrigin=w,h.yOrigin=x,h.smooth=!!i,h.origin=e,h.originIsAbsolute=!!r,t.style[pr]="0px 0px",a&&(Yd(a,h,"xOrigin",f,w),Yd(a,h,"yOrigin",d,x),Yd(a,h,"xOffset",c,h.xOffset),Yd(a,h,"yOffset",p,h.yOffset)),t.setAttribute("data-svg-origin",w+" "+x)}function oe(t,e,r){var i=Ya(e);return ia(parseFloat(e)+parseFloat(_d(t,"x",r+"px",i)))+i}function ve(t,e,i,n,a){var s,o,u=360,h=r(a),l=parseFloat(a)*(h&&~a.indexOf("rad")?sr:1)-n,f=n+l+"deg";return h&&("short"===(s=a.split("_")[1])&&(l%=u)!==l%180&&(l+=l<0?u:-u),"cw"===s&&l<0?l=(l+36e9)%u-~~(l/u)*u:"ccw"===s&&0<l&&(l=(l-36e9)%u-~~(l/u)*u)),t._pt=o=new _e(t._pt,e,i,n,l,wd),o.e=f,o.u="deg",t._props.push(i),o}function we(t,e){for(var r in e)t[r]=e[r];return t}function xe(t,e,r){var i,n,a,s,o,u,h,l=we({},r._gsap),f=r.style;for(n in l.svg?(a=r.getAttribute("transform"),r.setAttribute("transform",""),f[cr]=e,i=Or(r,1),Xd(r,cr),r.setAttribute("transform",a)):(a=getComputedStyle(r)[cr],f[cr]=e,i=Or(r,1),f[cr]=a),ar)(a=l[n])!==(s=i[n])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(n)<0&&(o=Ya(a)!==(h=Ya(s))?_d(r,n,a,h):parseFloat(a),u=parseFloat(s),t._pt=new _e(t._pt,i,n,o,u-o,vd),t._pt.u=h||0,t._props.push(n));we(i,l)}var Ee,De,Re,Fe,Le,Ie,Be,Ye,qe=Lt.Power0,Ve=Lt.Power1,Ue=Lt.Power2,Xe=Lt.Power3,Ne=Lt.Power4,Ge=Lt.Linear,We=Lt.Quad,Qe=Lt.Cubic,Ke=Lt.Quart,Je=Lt.Quint,He=Lt.Strong,$e=Lt.Elastic,Ze=Lt.Back,tr=Lt.SteppedEase,er=Lt.Bounce,rr=Lt.Sine,ir=Lt.Expo,nr=Lt.Circ,ar={},sr=180/Math.PI,or=Math.PI/180,ur=Math.atan2,hr=/([A-Z])/g,lr=/(left|right|width|margin|padding|x)/i,fr=/[\s,\(]\S/,dr={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},cr="transform",pr=cr+"Origin",_r="O,Moz,ms,Ms,Webkit".split(","),mr=function _checkPropPrefix(t,e,r){var i=(e||Le).style,n=5;if(t in i&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);n--&&!(_r[n]+t in i););return n<0?null:(3===n?"ms":0<=n?_r[n]:"")+t},gr={deg:1,rad:1,turn:1},vr={grid:1,flex:1},yr=function _get(t,e,r,i){var n;return Fe||Sd(),e in dr&&"transform"!==e&&~(e=dr[e]).indexOf(",")&&(e=e.split(",")[0]),ar[e]&&"transform"!==e?(n=Or(t,i),n="transformOrigin"!==e?n[e]:n.svg?n.origin:kr(Pd(t,pr))+" "+n.zOrigin+"px"):(n=t.style[e])&&"auto"!==n&&!i&&!~(n+"").indexOf("calc(")||(n=br[e]&&br[e](t,e,r)||Pd(t,e)||ga(t,e)||("opacity"===e?1:0)),r&&!~(n+"").trim().indexOf(" ")?_d(t,e,n,r)+r:n},Tr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},br={clearProps:function clearProps(t,e,r,i,n){if("isFromStart"!==n.data){var a=t._pt=new _e(t._pt,e,r,0,0,ee);return a.u=i,a.pr=-10,a.tween=n,t._props.push(r),1}}},wr=[1,0,0,1,0,0],xr={},Or=function _parseTransform(t,e){var r=t._gsap||new Vt(t);if("x"in r&&!e&&!r.uncache)return r;var i,n,a,s,o,u,h,l,f,d,c,p,_,m,g,v,y,T,b,w,x,O,k,M,P,C,A,S,z,E,D,R,F=t.style,L=r.scaleX<0,I="deg",B=getComputedStyle(t),Y=Pd(t,pr)||"0";return i=n=a=u=h=l=f=d=c=0,s=o=1,r.svg=!(!t.getCTM||!Wd(t)),B.translate&&("none"===B.translate&&"none"===B.scale&&"none"===B.rotate||(F[cr]=("none"!==B.translate?"translate3d("+(B.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==B.rotate?"rotate("+B.rotate+") ":"")+("none"!==B.scale?"scale("+B.scale.split(" ").join(",")+") ":"")+("none"!==B[cr]?B[cr]:"")),F.scale=F.rotate=F.translate="none"),m=ke(t,r.svg),r.svg&&(M=r.uncache?(P=t.getBBox(),Y=r.xOrigin-P.x+"px "+(r.yOrigin-P.y)+"px",""):!e&&t.getAttribute("data-svg-origin"),le(t,M||Y,!!M||r.originIsAbsolute,!1!==r.smooth,m)),p=r.xOrigin||0,_=r.yOrigin||0,m!==wr&&(T=m[0],b=m[1],w=m[2],x=m[3],i=O=m[4],n=k=m[5],6===m.length?(s=Math.sqrt(T*T+b*b),o=Math.sqrt(x*x+w*w),u=T||b?ur(b,T)*sr:0,(f=w||x?ur(w,x)*sr+u:0)&&(o*=Math.abs(Math.cos(f*or))),r.svg&&(i-=p-(p*T+_*w),n-=_-(p*b+_*x))):(R=m[6],E=m[7],A=m[8],S=m[9],z=m[10],D=m[11],i=m[12],n=m[13],a=m[14],h=(g=ur(R,z))*sr,g&&(M=O*(v=Math.cos(-g))+A*(y=Math.sin(-g)),P=k*v+S*y,C=R*v+z*y,A=O*-y+A*v,S=k*-y+S*v,z=R*-y+z*v,D=E*-y+D*v,O=M,k=P,R=C),l=(g=ur(-w,z))*sr,g&&(v=Math.cos(-g),D=x*(y=Math.sin(-g))+D*v,T=M=T*v-A*y,b=P=b*v-S*y,w=C=w*v-z*y),u=(g=ur(b,T))*sr,g&&(M=T*(v=Math.cos(g))+b*(y=Math.sin(g)),P=O*v+k*y,b=b*v-T*y,k=k*v-O*y,T=M,O=P),h&&359.9<Math.abs(h)+Math.abs(u)&&(h=u=0,l=180-l),s=ia(Math.sqrt(T*T+b*b+w*w)),o=ia(Math.sqrt(k*k+R*R)),g=ur(O,k),f=2e-4<Math.abs(g)?g*sr:0,c=D?1/(D<0?-D:D):0),r.svg&&(M=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!ie(Pd(t,cr)),M&&t.setAttribute("transform",M))),90<Math.abs(f)&&Math.abs(f)<270&&(L?(s*=-1,f+=u<=0?180:-180,u+=u<=0?180:-180):(o*=-1,f+=f<=0?180:-180)),e=e||r.uncache,r.x=i-((r.xPercent=i&&(!e&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-i)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+"px",r.y=n-((r.yPercent=n&&(!e&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-n)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+"px",r.z=a+"px",r.scaleX=ia(s),r.scaleY=ia(o),r.rotation=ia(u)+I,r.rotationX=ia(h)+I,r.rotationY=ia(l)+I,r.skewX=f+I,r.skewY=d+I,r.transformPerspective=c+"px",(r.zOrigin=parseFloat(Y.split(" ")[2])||!e&&r.zOrigin||0)&&(F[pr]=kr(Y)),r.xOffset=r.yOffset=0,r.force3D=q.force3D,r.renderTransform=r.svg?zr:Ye?Sr:Mr,r.uncache=0,r},kr=function _firstTwoOnly(t){return(t=t.split(" "))[0]+" "+t[1]},Mr=function _renderNon3DTransforms(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Sr(t,e)},Pr="0deg",Cr="0px",Ar=") ",Sr=function _renderCSSTransforms(t,e){var r=e||this,i=r.xPercent,n=r.yPercent,a=r.x,s=r.y,o=r.z,u=r.rotation,h=r.rotationY,l=r.rotationX,f=r.skewX,d=r.skewY,c=r.scaleX,p=r.scaleY,_=r.transformPerspective,m=r.force3D,g=r.target,v=r.zOrigin,y="",T="auto"===m&&t&&1!==t||!0===m;if(v&&(l!==Pr||h!==Pr)){var b,w=parseFloat(h)*or,x=Math.sin(w),O=Math.cos(w);w=parseFloat(l)*or,b=Math.cos(w),a=oe(g,a,x*b*-v),s=oe(g,s,-Math.sin(w)*-v),o=oe(g,o,O*b*-v+v)}_!==Cr&&(y+="perspective("+_+Ar),(i||n)&&(y+="translate("+i+"%, "+n+"%) "),!T&&a===Cr&&s===Cr&&o===Cr||(y+=o!==Cr||T?"translate3d("+a+", "+s+", "+o+") ":"translate("+a+", "+s+Ar),u!==Pr&&(y+="rotate("+u+Ar),h!==Pr&&(y+="rotateY("+h+Ar),l!==Pr&&(y+="rotateX("+l+Ar),f===Pr&&d===Pr||(y+="skew("+f+", "+d+Ar),1===c&&1===p||(y+="scale("+c+", "+p+Ar),g.style[cr]=y||"translate(0, 0)"},zr=function _renderSVGTransforms(t,e){var r,i,n,a,s,o=e||this,u=o.xPercent,h=o.yPercent,l=o.x,f=o.y,d=o.rotation,c=o.skewX,p=o.skewY,_=o.scaleX,m=o.scaleY,g=o.target,v=o.xOrigin,y=o.yOrigin,T=o.xOffset,b=o.yOffset,w=o.forceCSS,x=parseFloat(l),O=parseFloat(f);d=parseFloat(d),c=parseFloat(c),(p=parseFloat(p))&&(c+=p=parseFloat(p),d+=p),d||c?(d*=or,c*=or,r=Math.cos(d)*_,i=Math.sin(d)*_,n=Math.sin(d-c)*-m,a=Math.cos(d-c)*m,c&&(p*=or,s=Math.tan(c-p),n*=s=Math.sqrt(1+s*s),a*=s,p&&(s=Math.tan(p),r*=s=Math.sqrt(1+s*s),i*=s)),r=ia(r),i=ia(i),n=ia(n),a=ia(a)):(r=_,a=m,i=n=0),(x&&!~(l+"").indexOf("px")||O&&!~(f+"").indexOf("px"))&&(x=_d(g,"x",l,"px"),O=_d(g,"y",f,"px")),(v||y||T||b)&&(x=ia(x+v-(v*r+y*n)+T),O=ia(O+y-(v*i+y*a)+b)),(u||h)&&(s=g.getBBox(),x=ia(x+u/100*s.width),O=ia(O+h/100*s.height)),s="matrix("+r+","+i+","+n+","+a+","+x+","+O+")",g.setAttribute("transform",s),w&&(g.style[cr]=s)};ha("padding,margin,Width,Radius",function(e,r){var t="Right",i="Bottom",n="Left",o=(r<3?["Top",t,i,n]:["Top"+n,"Top"+t,i+t,i+n]).map(function(t){return r<2?e+t:"border"+t+e});br[1<r?"border"+e:e]=function(e,t,r,i,n){var a,s;if(arguments.length<4)return a=o.map(function(t){return yr(e,t,r)}),5===(s=a.join(" ")).split(a[0]).length?a[0]:s;a=(i+"").split(" "),s={},o.forEach(function(t,e){return s[t]=a[e]=a[e]||a[(e-1)/2|0]}),e.init(t,s,n)}});var Er,Dr,Rr,Fr={name:"css",register:Sd,targetTest:function targetTest(t){return t.style&&t.nodeType},init:function init(t,e,i,n,a){var s,o,u,h,l,f,d,c,p,_,m,g,v,y,T,b,w=this._props,x=t.style,O=i.vars.startAt;for(d in Fe||Sd(),this.styles=this.styles||Md(t),b=this.styles.props,this.tween=i,e)if("autoRound"!==d&&(o=e[d],!pt[d]||!ac(d,e,i,n,t,a)))if(l=typeof o,f=br[d],"function"===l&&(l=typeof(o=o.call(i,n,t,a))),"string"===l&&~o.indexOf("random(")&&(o=ob(o)),f)f(this,t,d,o,i)&&(T=1);else if("--"===d.substr(0,2))s=(getComputedStyle(t).getPropertyValue(d)+"").trim(),o+="",Et.lastIndex=0,Et.test(s)||(c=Ya(s),p=Ya(o)),p?c!==p&&(s=_d(t,d,s,p)+p):c&&(o+=c),this.add(x,"setProperty",s,o,n,a,0,0,d),w.push(d),b.push(d,0,x[d]);else if("undefined"!==l){if(O&&d in O?(s="function"==typeof O[d]?O[d].call(i,n,t,a):O[d],r(s)&&~s.indexOf("random(")&&(s=ob(s)),Ya(s+"")||"auto"===s||(s+=q.units[d]||Ya(yr(t,d))||""),"="===(s+"").charAt(1)&&(s=yr(t,d))):s=yr(t,d),h=parseFloat(s),(_="string"===l&&"="===o.charAt(1)&&o.substr(0,2))&&(o=o.substr(2)),u=parseFloat(o),d in dr&&("autoAlpha"===d&&(1===h&&"hidden"===yr(t,"visibility")&&u&&(h=0),b.push("visibility",0,x.visibility),Yd(this,x,"visibility",h?"inherit":"hidden",u?"inherit":"hidden",!u)),"scale"!==d&&"transform"!==d&&~(d=dr[d]).indexOf(",")&&(d=d.split(",")[0])),m=d in ar)if(this.styles.save(d),g||((v=t._gsap).renderTransform&&!e.parseTransform||Or(t,e.parseTransform),y=!1!==e.smoothOrigin&&v.smooth,(g=this._pt=new _e(this._pt,x,cr,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===d)this._pt=new _e(this._pt,v,"scaleY",v.scaleY,(_?ka(v.scaleY,_+u):u)-v.scaleY||0,vd),this._pt.u=0,w.push("scaleY",d),d+="X";else{if("transformOrigin"===d){b.push(pr,0,x[pr]),o=de(o),v.svg?le(t,o,0,y,0,this):((p=parseFloat(o.split(" ")[2])||0)!==v.zOrigin&&Yd(this,v,"zOrigin",v.zOrigin,p),Yd(this,x,d,kr(s),kr(o)));continue}if("svgOrigin"===d){le(t,o,1,y,0,this);continue}
vendor: 4,988 bytes, lines 10-21
10if(d in xr){ve(this,v,d,h,_?ka(h,_+o):o);continue}if("smoothOrigin"===d){Yd(this,v,"smooth",v.smooth,o);continue}if("force3D"===d){v[d]=o;continue}if("transform"===d){xe(this,o,t);continue}}else d in x||(d=mr(d)||d);if(m||(u||0===u)&&(h||0===h)&&!fr.test(o)&&d in x)u=u||0,(c=(s+"").substr((h+"").length))!==(p=Ya(o)||(d in q.units?q.units[d]:c))&&(h=_d(t,d,s,p)),this._pt=new _e(this._pt,m?v:x,d,h,(_?ka(h,_+u):u)-h,m||"px"!==p&&"zIndex"!==d||!1===e.autoRound?vd:yd),this._pt.u=p||0,c!==p&&"%"!==p&&(this._pt.b=s,this._pt.r=xd);else if(d in x)be.call(this,t,d,s,_?_+o:o);else if(d in t)this.add(t,d,s||t[d],_?_+o:o,n,a);else if("parseTransform"!==d){Q(d,o);continue}m||(d in x?b.push(d,0,x[d]):b.push(d,1,s||t[d])),w.push(d)}T&&pe(this)},render:function render(t,e){if(e.tween._time||!Be())for(var r=e._pt;r;)r.r(t,r.d),r=r._next;else e.styles.revert()},get:yr,aliases:dr,getSetter:function getSetter(t,e,r){var i=dr[e];return i&&i.indexOf(",")<0&&(e=i),e in ar&&e!==pr&&(t._gsap.x||yr(t,"x"))?r&&Ie===r?"scale"===e?Ed:Dd:(Ie=r||{})&&("scale"===e?Fd:Gd):t.style&&!u(t.style[e])?Bd:~e.indexOf("-")?Cd:ne(t,e)},core:{_removeProperty:Xd,_getMatrix:ke}};ze.utils.checkPrefix=mr,ze.core.getStyleSaver=Md,Rr=ha((Er="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(Dr="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",function(t){ar[t]=1}),ha(Dr,function(t){q.units[t]="deg",xr[t]=1}),dr[Rr[13]]=Er+","+Dr,ha("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",function(t){var e=t.split(":");dr[e[1]]=Rr[e[0]]}),ha("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){q.units[t]="px"}),ze.registerPlugin(Fr);var Lr=ze.registerPlugin(Fr)||ze,Ir=Lr.core.Tween;e.Back=Ze,e.Bounce=er,e.CSSPlugin=Fr,e.Circ=nr,e.Cubic=Qe,e.Elastic=$e,e.Expo=ir,e.Linear=Ge,e.Power0=qe,e.Power1=Ve,e.Power2=Ue,e.Power3=Xe,e.Power4=Ne,e.Quad=We,e.Quart=Ke,e.Quint=Je,e.Sine=rr,e.SteppedEase=tr,e.Strong=He,e.TimelineLite=Xt,e.TimelineMax=Xt,e.TweenLite=$t,e.TweenMax=Ir,e.default=Lr,e.gsap=Lr;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}});
11
12/*!
13 * ScrollTrigger 3.12.5
14 * https://gsap.com
15 * 
16 * @license Copyright 2024, GreenSock. All rights reserved.
17 * Subject to the terms at https://gsap.com/standard-license or for Club GSAP members, the agreement issued with that membership.
18 * @author: Jack Doyle, [email protected]
19 */
20
21!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).window=e.window||{})}(this,function(e){"use strict";function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(){return Ce||"undefined"!=typeof window&&(Ce=window.gsap)&&Ce.registerPlugin&&Ce}function z(e,t){return~Le.indexOf(e)&&Le[Le.indexOf(e)+1][t]}function A(e){return!!~t.indexOf(e)}function B(e,t,r,n,o){return e.addEventListener(t,r,{passive:!1!==n,capture:!!o})}function C(e,t,r,n){return e.removeEventListener(t,r,!!n)}function F(){return De&&De.isPressed||Ie.cache++}function G(r,n){function dd(e){if(e||0===e){o&&(Se.history.scrollRestoration="manual");var t=De&&De.isPressed;e=dd.v=Math.round(e)||(De&&De.iOS?1:0),r(e),dd.cacheID=Ie.cache,t&&i("ss",e)}else(n||Ie.cache!==dd.cacheID||i("ref"))&&(dd.cacheID=Ie.cache,dd.v=r());return dd.v+dd.offset}return dd.offset=0,r&&dd}function J(e,t){return(t&&t._ctx&&t._ctx.selector||Ce.utils.toArray)(e)[0]||("string"==typeof e&&!1!==Ce.config().nullTargetWarn?console.warn("Element not found:",e):null)}function K(t,e){var r=e.s,n=e.sc;A(t)&&(t=ke.scrollingElement||Pe);var o=Ie.indexOf(t),i=n===Fe.sc?1:2;~o||(o=Ie.push(t)-1),Ie[o+i]||B(t,"scroll",F);var a=Ie[o+i],s=a||(Ie[o+i]=G(z(t,r),!0)||(A(t)?n:G(function(e){return arguments.length?t[r]=e:t[r]})));return s.target=t,a||(s.smooth="smooth"===Ce.getProperty(t,"scrollBehavior")),s}function L(e,t,o){function Cd(e,t){var r=ze();t||n<r-s?(a=i,i=e,l=s,s=r):o?i+=e:i=a+(e-a)/(r-l)*(s-l)}var i=e,a=e,s=ze(),l=s,n=t||50,c=Math.max(500,3*n);return{update:Cd,reset:function reset(){a=i=o?0:i,l=s=0},getVelocity:function getVelocity(e){var t=l,r=a,n=ze();return!e&&0!==e||e===i||Cd(e),s===l||c<n-l?0:(i+(o?r:-r))/((o?n:s)-t)*1e3}}}function M(e,t){return t&&!e._gsapAllow&&e.preventDefault(),e.changedTouches?e.changedTouches[0]:e}function N(e){var t=Math.max.apply(Math,e),r=Math.min.apply(Math,e);return Math.abs(t)>=Math.abs(r)?t:r}function O(){(Ae=Ce.core.globals().ScrollTrigger)&&Ae.core&&function _integrate(){var e=Ae.core,r=e.bridge||{},t=e._scrollers,n=e._proxies;t.push.apply(t,Ie),n.push.apply(n,Le),Ie=t,Le=n,i=function _bridge(e,t){return r[e](t)}}()}function P(e){return Ce=e||r(),!Te&&Ce&&"undefined"!=typeof document&&document.body&&(Se=window,Pe=(ke=
vendor: 40,872 bytes, lines 21-31
21document).documentElement,Me=ke.body,t=[Se,ke,Pe,Me],Ce.utils.clamp,Be=Ce.core.context||function(){},Oe="onpointerenter"in Me?"pointer":"mouse",Ee=k.isTouch=Se.matchMedia&&Se.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in Se||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints?2:0,Re=k.eventTypes=("ontouchstart"in Pe?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in Pe?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout(function(){return o=0},500),O(),Te=1),Te}var Ce,Te,Se,ke,Pe,Me,Ee,Oe,Ae,t,De,Re,Be,o=1,qe=[],Ie=[],Le=[],ze=Date.now,i=function _bridge(e,t){return t},n="scrollLeft",a="scrollTop",Ye={s:n,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:G(function(e){return arguments.length?Se.scrollTo(e,Fe.sc()):Se.pageXOffset||ke[n]||Pe[n]||Me[n]||0})},Fe={s:a,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:Ye,sc:G(function(e){return arguments.length?Se.scrollTo(Ye.sc(),e):Se.pageYOffset||ke[a]||Pe[a]||Me[a]||0})};Ye.op=Fe,Ie.cache=0;var k=(Observer.prototype.init=function init(e){Te||P(Ce)||console.warn("Please gsap.registerPlugin(Observer)"),Ae||O();var o=e.tolerance,a=e.dragMinimum,t=e.type,i=e.target,r=e.lineHeight,n=e.debounce,s=e.preventDefault,l=e.onStop,c=e.onStopDelay,u=e.ignore,f=e.wheelSpeed,d=e.event,p=e.onDragStart,g=e.onDragEnd,h=e.onDrag,v=e.onPress,b=e.onRelease,m=e.onRight,y=e.onLeft,x=e.onUp,w=e.onDown,_=e.onChangeX,T=e.onChangeY,S=e.onChange,k=e.onToggleX,E=e.onToggleY,D=e.onHover,R=e.onHoverEnd,q=e.onMove,I=e.ignoreCheck,z=e.isNormalizer,Y=e.onGestureStart,H=e.onGestureEnd,X=e.onWheel,W=e.onEnable,V=e.onDisable,U=e.onClick,j=e.scrollSpeed,G=e.capture,Q=e.allowClicks,Z=e.lockAxis,$=e.onLockAxis;function cf(){return xe=ze()}function df(e,t){return(se.event=e)&&u&&~u.indexOf(e.target)||t&&he&&"touch"!==e.pointerType||I&&I(e,t)}function ff(){var e=se.deltaX=N(me),t=se.deltaY=N(ye),r=Math.abs(e)>=o,n=Math.abs(t)>=o;S&&(r||n)&&S(se,e,t,me,ye),r&&(m&&0<se.deltaX&&m(se),y&&se.deltaX<0&&y(se),_&&_(se),k&&se.deltaX<0!=le<0&&k(se),le=se.deltaX,me[0]=me[1]=me[2]=0),n&&(w&&0<se.deltaY&&w(se),x&&se.deltaY<0&&x(se),T&&T(se),E&&se.deltaY<0!=ce<0&&E(se),ce=se.deltaY,ye[0]=ye[1]=ye[2]=0),(ne||re)&&(q&&q(se),re&&(h(se),re=!1),ne=!1),ie&&!(ie=!1)&&$&&$(se),oe&&(X(se),oe=!1),ee=0}function gf(e,t,r){me[r]+=e,ye[r]+=t,se._vx.update(e),se._vy.update(t),n?ee=ee||requestAnimationFrame(ff):ff()}function hf(e,t){Z&&!ae&&(se.axis=ae=Math.abs(e)>Math.abs(t)?"x":"y",ie=!0),"y"!==ae&&(me[2]+=e,se._vx.update(e,!0)),"x"!==ae&&(ye[2]+=t,se._vy.update(t,!0)),n?ee=ee||requestAnimationFrame(ff):ff()}function jf(e){if(!df(e,1)){var t=(e=M(e,s)).clientX,r=e.clientY,n=t-se.x,o=r-se.y,i=se.isDragging;se.x=t,se.y=r,(i||Math.abs(se.startX-t)>=a||Math.abs(se.startY-r)>=a)&&(h&&(re=!0),i||(se.isDragging=!0),hf(n,o),i||p&&p(se))}}function mf(e){return e.touches&&1<e.touches.length&&(se.isGesturing=!0)&&Y(e,se.isDragging)}function nf(){return(se.isGesturing=!1)||H(se)}function of(e){if(!df(e)){var t=fe(),r=de();gf((t-pe)*j,(r-ge)*j,1),pe=t,ge=r,l&&te.restart(!0)}}function pf(e){if(!df(e)){e=M(e,s),X&&(oe=!0);var t=(1===e.deltaMode?r:2===e.deltaMode?Se.innerHeight:1)*f;gf(e.deltaX*t,e.deltaY*t,0),l&&!z&&te.restart(!0)}}function qf(e){if(!df(e)){var t=e.clientX,r=e.clientY,n=t-se.x,o=r-se.y;se.x=t,se.y=r,ne=!0,l&&te.restart(!0),(n||o)&&hf(n,o)}}function rf(e){se.event=e,D(se)}function sf(e){se.event=e,R(se)}function tf(e){return df(e)||M(e,s)&&U(se)}this.target=i=J(i)||Pe,this.vars=e,u=u&&Ce.utils.toArray(u),o=o||1e-9,a=a||0,f=f||1,j=j||1,t=t||"wheel,touch,pointer",n=!1!==n,r=r||parseFloat(Se.getComputedStyle(Me).lineHeight)||22;var ee,te,re,ne,oe,ie,ae,se=this,le=0,ce=0,ue=e.passive||!s,fe=K(i,Ye),de=K(i,Fe),pe=fe(),ge=de(),he=~t.indexOf("touch")&&!~t.indexOf("pointer")&&"pointerdown"===Re[0],ve=A(i),be=i.ownerDocument||ke,me=[0,0,0],ye=[0,0,0],xe=0,we=se.onPress=function(e){df(e,1)||e&&e.button||(se.axis=ae=null,te.pause(),se.isPressed=!0,e=M(e),le=ce=0,se.startX=se.x=e.clientX,se.startY=se.y=e.clientY,se._vx.reset(),se._vy.reset(),B(z?i:be,Re[1],jf,ue,!0),se.deltaX=se.deltaY=0,v&&v(se))},_e=se.onRelease=function(t){if(!df(t,1)){C(z?i:be,Re[1],jf,!0);var e=!isNaN(se.y-se.startY),r=se.isDragging,n=r&&(3<Math.abs(se.x-se.startX)||3<Math.abs(se.y-se.startY)),o=M(t);!n&&e&&(se._vx.reset(),se._vy.reset(),s&&Q&&Ce.delayedCall(.08,function(){if(300<ze()-xe&&!t.defaultPrevented)if(t.target.click)t.target.click();else if(be.createEvent){var e=be.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,Se,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(e)}})),se.isDragging=se.isGesturing=se.isPressed=!1,l&&r&&!z&&te.restart(!0),g&&r&&g(se),b&&b(se,n)}};te=se._dc=Ce.delayedCall(c||.25,function onStopFunc(){se._vx.reset(),se._vy.reset(),te.pause(),l&&l(se)}).pause(),se.deltaX=se.deltaY=0,se._vx=L(0,50,!0),se._vy=L(0,50,!0),se.scrollX=fe,se.scrollY=de,se.isDragging=se.isGesturing=se.isPressed=!1,Be(this),se.enable=function(e){return se.isEnabled||(B(ve?be:i,"scroll",F),0<=t.indexOf("scroll")&&B(ve?be:i,"scroll",of,ue,G),0<=t.indexOf("wheel")&&B(i,"wheel",pf,ue,G),(0<=t.indexOf("touch")&&Ee||0<=t.indexOf("pointer"))&&(B(i,Re[0],we,ue,G),B(be,Re[2],_e),B(be,Re[3],_e),Q&&B(i,"click",cf,!0,!0),U&&B(i,"click",tf),Y&&B(be,"gesturestart",mf),H&&B(be,"gestureend",nf),D&&B(i,Oe+"enter",rf),R&&B(i,Oe+"leave",sf),q&&B(i,Oe+"move",qf)),se.isEnabled=!0,e&&e.type&&we(e),W&&W(se)),se},se.disable=function(){se.isEnabled&&(qe.filter(function(e){return e!==se&&A(e.target)}).length||C(ve?be:i,"scroll",F),se.isPressed&&(se._vx.reset(),se._vy.reset(),C(z?i:be,Re[1],jf,!0)),C(ve?be:i,"scroll",of,G),C(i,"wheel",pf,G),C(i,Re[0],we,G),C(be,Re[2],_e),C(be,Re[3],_e),C(i,"click",cf,!0),C(i,"click",tf),C(be,"gesturestart",mf),C(be,"gestureend",nf),C(i,Oe+"enter",rf),C(i,Oe+"leave",sf),C(i,Oe+"move",qf),se.isEnabled=se.isPressed=se.isDragging=!1,V&&V(se))},se.kill=se.revert=function(){se.disable();var e=qe.indexOf(se);0<=e&&qe.splice(e,1),De===se&&(De=0)},qe.push(se),z&&A(i)&&(De=se),se.enable(d)},function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}(Observer,[{key:"velocityX",get:function get(){return this._vx.getVelocity()}},{key:"velocityY",get:function get(){return this._vy.getVelocity()}}]),Observer);function Observer(e){this.init(e)}k.version="3.12.5",k.create=function(e){return new k(e)},k.register=P,k.getAll=function(){return qe.slice()},k.getById=function(t){return qe.filter(function(e){return e.vars.id===t})[0]},r()&&Ce.registerPlugin(k);function Ca(e,t,r){var n=ct(e)&&("clamp("===e.substr(0,6)||-1<e.indexOf("max"));return(r["_"+t+"Clamp"]=n)?e.substr(6,e.length-7):e}function Da(e,t){return!t||ct(e)&&"clamp("===e.substr(0,6)?e:"clamp("+e+")"}function Fa(){return Ge=1}function Ga(){return Ge=0}function Ha(e){return e}function Ia(e){return Math.round(1e5*e)/1e5||0}function Ja(){return"undefined"!=typeof window}function Ka(){return He||Ja()&&(He=window.gsap)&&He.registerPlugin&&He}function La(e){return!!~l.indexOf(e)}function Ma(e){return("Height"===e?T:Ne["inner"+e])||Je["client"+e]||We["client"+e]}function Na(e){return z(e,"getBoundingClientRect")||(La(e)?function(){return Ot.width=Ne.innerWidth,Ot.height=T,Ot}:function(){return wt(e)})}function Qa(e,t){var r=t.s,n=t.d2,o=t.d,i=t.a;return Math.max(0,(r="scroll"+n)&&(i=z(e,r))?i()-Na(e)()[o]:La(e)?(Je[r]||We[r])-Ma(n):e[r]-e["offset"+n])}function Ra(e,t){for(var r=0;r<g.length;r+=3)t&&!~t.indexOf(g[r+1])||e(g[r],g[r+1],g[r+2])}function Ta(e){return"function"==typeof e}function Ua(e){return"number"==typeof e}function Va(e){return"object"==typeof e}function Wa(e,t,r){return e&&e.progress(t?0:1)&&r&&e.pause()}function Xa(e,t){if(e.enabled){var r=e._ctx?e._ctx.add(function(){return t(e)}):t(e);r&&r.totalTime&&(e.callbackAnimation=r)}}function mb(e){return Ne.getComputedStyle(e)}function ob(e,t){for(var r in t)r in e||(e[r]=t[r]);return e}function qb(e,t){var r=t.d2;return e["offset"+r]||e["client"+r]||0}function rb(e){var t,r=[],n=e.labels,o=e.duration();for(t in n)r.push(n[t]/o);return r}function tb(o){var i=He.utils.snap(o),a=Array.isArray(o)&&o.slice(0).sort(function(e,t){return e-t});return a?function(e,t,r){var n;if(void 0===r&&(r=.001),!t)return i(e);if(0<t){for(e-=r,n=0;n<a.length;n++)if(a[n]>=e)return a[n];return a[n-1]}for(n=a.length,e+=r;n--;)if(a[n]<=e)return a[n];return a[0]}:function(e,t,r){void 0===r&&(r=.001);var n=i(e);return!t||Math.abs(n-e)<r||n-e<0==t<0?n:i(t<0?e-o:e+o)}}function vb(t,r,e,n){return e.split(",").forEach(function(e){return t(r,e,n)})}function wb(e,t,r,n,o){return e.addEventListener(t,r,{passive:!n,capture:!!o})}function xb(e,t,r,n){return e.removeEventListener(t,r,!!n)}function yb(e,t,r){(r=r&&r.wheelHandler)&&(e(t,"wheel",r),e(t,"touchmove",r))}function Cb(e,t){if(ct(e)){var r=e.indexOf("="),n=~r?(e.charAt(r-1)+1)*parseFloat(e.substr(r+1)):0;~r&&(e.indexOf("%")>r&&(n*=t/100),e=e.substr(0,r-1)),e=n+(e in H?H[e]*t:~e.indexOf("%")?parseFloat(e)*t/100:parseFloat(e)||0)}return e}function Db(e,t,r,n,o,i,a,s){var l=o.startColor,c=o.endColor,u=o.fontSize,f=o.indent,d=o.fontWeight,p=Xe.createElement("div"),g=La(r)||"fixed"===z(r,"pinType"),h=-1!==e.indexOf("scroller"),v=g?We:r,b=-1!==e.indexOf("start"),m=b?l:c,y="border-color:"+m+";font-size:"+u+";color:"+m+";font-weight:"+d+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return y+="position:"+((h||s)&&g?"fixed;":"absolute;"),!h&&!s&&g||(y+=(n===Fe?q:I)+":"+(i+parseFloat(f))+"px;"),a&&(y+="box-sizing:border-box;text-align:left;width:"+a.offsetWidth+"px;"),p._isStart=b,p.setAttribute("class","gsap-marker-"+e+(t?" marker-"+t:"")),p.style.cssText=y,p.innerText=t||0===t?e+"-"+t:e,v.children[0]?v.insertBefore(p,v.children[0]):v.appendChild(p),p._offset=p["offset"+n.op.d2],X(p,0,n,b),p}function Ib(){return 34<at()-st&&(D=D||requestAnimationFrame(Z))}function Jb(){v&&v.isPressed&&!(v.startX>We.clientWidth)||(Ie.cache++,v?D=D||requestAnimationFrame(Z):Z(),st||U("scrollStart"),st=at())}function Kb(){y=Ne.innerWidth,m=Ne.innerHeight}function Lb(){Ie.cache++,je||h||Xe.fullscreenElement||Xe.webkitFullscreenElement||b&&y===Ne.innerWidth&&!(Math.abs(Ne.innerHeight-m)>.25*Ne.innerHeight)||c.restart(!0)}function Ob(){return xb(ne,"scrollEnd",Ob)||Pt(!0)}function Rb(e){for(var t=0;t<j.length;t+=5)(!e||j[t+4]&&j[t+4].query===e)&&(j[t].style.cssText=j[t+1],j[t].getBBox&&j[t].setAttribute("transform",j[t+2]||""),j[t+3].uncache=1)}function Sb(e,t){var r;for(Qe=0;Qe<Tt.length;Qe++)!(r=Tt[Qe])||t&&r._ctx!==t||(e?r.kill(1):r.revert(!0,!0));S=!0,t&&Rb(t),t||U("revert")}function Tb(e,t){Ie.cache++,!t&&rt||Ie.forEach(function(e){return Ta(e)&&e.cacheID++&&(e.rec=0)}),ct(e)&&(Ne.history.scrollRestoration=w=e)}function Yb(){We.appendChild(_),T=!v&&_.offsetHeight||Ne.innerHeight,We.removeChild(_)}function Zb(t){return Ve(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function(e){return e.style.display=t?"none":"block"})}function gc(e,t,r,n){if(!e._gsap.swappedIn){for(var o,i=$.length,a=t.style,s=e.style;i--;)a[o=$[i]]=r[o];a.position="absolute"===r.position?"absolute":"relative","inline"===r.display&&(a.display="inline-block"),s[I]=s[q]="auto",a.flexBasis=r.flexBasis||"auto",a.overflow="visible",a.boxSizing="border-box",a[ft]=qb(e,Ye)+xt,a[dt]=qb(e,Fe)+xt,a[bt]=s[mt]=s.top=s.left="0",Et(n),s[ft]=s.maxWidth=r[ft],s[dt]=s.maxHeight=r[dt],s[bt]=r[bt],e.parentNode!==t&&(e.parentNode.insertBefore(t,e),t.appendChild(e)),e._gsap.swappedIn=!0}}function jc(e){for(var t=ee.length,r=e.style,n=[],o=0;o<t;o++)n.push(ee[o],r[ee[o]]);return n.t=e,n}function mc(e,t,r,n,o,i,a,s,l,c,u,f,d,p){Ta(e)&&(e=e(s)),ct(e)&&"max"===e.substr(0,3)&&(e=f+("="===e.charAt(4)?Cb("0"+e.substr(3),r):0));var g,h,v,b=d?d.time():0;if(d&&d.seek(0),isNaN(e)||(e=+e),Ua(e))d&&(e=He.utils.mapRange(d.scrollTrigger.start,d.scrollTrigger.end,0,f,e)),a&&X(a,r,n,!0);else{Ta(t)&&(t=t(s));var m,y,x,w,_=(e||"0").split(" ");v=J(t,s)||We,(m=wt(v)||{})&&(m.left||m.top)||"none"!==mb(v).display||(w=v.style.display,v.style.display="block",m=wt(v),w?v.style.display=w:v.style.removeProperty("display")),y=Cb(_[0],m[n.d]),x=Cb(_[1]||"0",r),e=m[n.p]-l[n.p]-c+y+o-x,a&&X(a,x,n,r-x<20||a._isStart&&20<x),r-=r-x}if(p&&(s[p]=e||-.001,e<0&&(e=0)),i){var C=e+r,T=i._isStart;g="scroll"+n.d2,X(i,C,n,T&&20<C||!T&&(u?Math.max(We[g],Je[g]):i.parentNode[g])<=C+1),u&&(l=wt(a),u&&(i.style[n.op.p]=l[n.op.p]-n.op.m-i._offset+xt))}return d&&v&&(g=wt(v),d.seek(f),h=wt(v),d._caScrollDist=g[n.p]-h[n.p],e=e/d._caScrollDist*f),d&&d.seek(b),d?e:Math.round(e)}function oc(e,t,r,n){if(e.parentNode!==t){var o,i,a=e.style;if(t===We){for(o in e._stOrig=a.cssText,i=mb(e))+o||re.test(o)||!i[o]||"string"!=typeof a[o]||"0"===o||(a[o]=i[o]);a.top=r,a.left=n}else a.cssText=e._stOrig;He.core.getCache(e).uncache=1,t.appendChild(e)}}function pc(r,e,n){var o=e,i=o;return function(e){var t=Math.round(r());return t!==o&&t!==i&&3<Math.abs(t-o)&&3<Math.abs(t-i)&&(e=t,n&&n()),i=o,o=e}}function qc(e,t,r){var n={};n[t.p]="+="+r,He.set(e,n)}function rc(c,e){function Ck(e,t,r,n,o){var i=Ck.tween,a=t.onComplete,s={};r=r||u();var l=pc(u,r,function(){i.kill(),Ck.tween=0});return o=n&&o||0,n=n||e-r,i&&i.kill(),t[f]=e,t.inherit=!1,(t.modifiers=s)[f]=function(){return l(r+n*i.ratio+o*i.ratio*i.ratio)},t.onUpdate=function(){Ie.cache++,Ck.tween&&Z()},t.onComplete=function(){Ck.tween=0,a&&a.call(i)},i=Ck.tween=He.to(c,t)}var u=K(c,e),f="_scroll"+e.p2;return(c[f]=u).wheelHandler=function(){return Ck.tween&&Ck.tween.kill()&&(Ck.tween=0)},wb(c,"wheel",u.wheelHandler),ne.isTouch&&wb(c,"touchmove",u.wheelHandler),Ck}var He,s,Ne,Xe,Je,We,l,c,Ve,Ue,Ke,u,je,Ge,f,Qe,d,p,g,Ze,$e,h,v,b,m,y,E,x,w,_,T,S,et,tt,D,rt,nt,ot,it=1,at=Date.now,R=at(),st=0,lt=0,ct=function _isString(e){return"string"==typeof e},ut=Math.abs,q="right",I="bottom",ft="width",dt="height",pt="Right",gt="Left",ht="Top",vt="Bottom",bt="padding",mt="margin",yt="Width",Y="Height",xt="px",wt=function _getBounds(e,t){var r=t&&"matrix(1, 0, 0, 1, 0, 0)"!==mb(e)[f]&&He.to(e,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),n=e.getBoundingClientRect();return r&&r.progress(0).kill(),n},_t={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},Ct={toggleActions:"play",anticipatePin:0},H={top:0,left:0,center:.5,bottom:1,right:1},X=function _positionMarker(e,t,r,n){var o={display:"block"},i=r[n?"os2":"p2"],a=r[n?"p2":"os2"];e._isFlipped=n,o[r.a+"Percent"]=n?-100:0,o[r.a]=n?"1px":0,o["border"+i+yt]=1,o["border"+a+yt]=0,o[r.p]=t+"px",He.set(e,o)},Tt=[],St={},W={},V=[],U=function _dispatch(e){return W[e]&&W[e].map(function(e){return e()})||V},j=[],kt=0,Pt=function _refreshAll(e,t){if(!st||e||S){Yb(),rt=ne.isRefreshing=!0,Ie.forEach(function(e){return Ta(e)&&++e.cacheID&&(e.rec=e())});var r=U("refreshInit");Ze&&ne.sort(),t||Sb(),Ie.forEach(function(e){Ta(e)&&(e.smooth&&(e.target.style.scrollBehavior="auto"),e(0))}),Tt.slice(0).forEach(function(e){return e.refresh()}),S=!1,Tt.forEach(function(e){if(e._subPinOffset&&e.pin){var t=e.vars.horizontal?"offsetWidth":"offsetHeight",r=e.pin[t];e.revert(!0,1),e.adjustPinSpacing(e.pin[t]-r),e.refresh()}}),et=1,Zb(!0),Tt.forEach(function(e){var t=Qa(e.scroller,e._dir),r="max"===e.vars.end||e._endClamp&&e.end>t,n=e._startClamp&&e.start>=t;(r||n)&&e.setPositions(n?t-1:e.start,r?Math.max(n?t:e.start+1,t):e.end,!0)}),Zb(!1),et=0,r.forEach(function(e){return e&&e.render&&e.render(-1)}),Ie.forEach(function(e){Ta(e)&&(e.smooth&&requestAnimationFrame(function(){return e.target.style.scrollBehavior="smooth"}),e.rec&&e(e.rec))}),Tb(w,1),c.pause(),kt++,Z(rt=2),Tt.forEach(function(e){return Ta(e.vars.onRefresh)&&e.vars.onRefresh(e)}),rt=ne.isRefreshing=!1,U("refresh")}else wb(ne,"scrollEnd",Ob)},Q=0,Mt=1,Z=function _updateAll(e){if(2===e||!rt&&!S){ne.isUpdating=!0,ot&&ot.update(0);var t=Tt.length,r=at(),n=50<=r-R,o=t&&Tt[0].scroll();if(Mt=o<Q?-1:1,rt||(Q=o),n&&(st&&!Ge&&200<r-st&&(st=0,U("scrollEnd")),Ke=R,R=r),Mt<0){for(Qe=t;0<Qe--;)Tt[Qe]&&Tt[Qe].update(0,n);Mt=1}else for(Qe=0;Qe<t;Qe++)Tt[Qe]&&Tt[Qe].update(0,n);ne.isUpdating=!1}D=0},$=["left","top",I,q,mt+vt,mt+pt,mt+ht,mt+gt,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],ee=$.concat([ft,dt,"boxSizing","max"+yt,"max"+Y,"position",mt,bt,bt+ht,bt+pt,bt+vt,bt+gt]),te=/([A-Z])/g,Et=function _setState(e){if(e){var t,r,n=e.t.style,o=e.length,i=0;for((e.t._gsap||He.core.getCache(e.t)).uncache=1;i<o;i+=2)r=e[i+1],t=e[i],r?n[t]=r:n[t]&&n.removeProperty(t.replace(te,"-$1").toLowerCase())}},Ot={left:0,top:0},re=/(webkit|moz|length|cssText|inset)/i,ne=(ScrollTrigger.prototype.init=function init(E,O){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),lt){var A,n,p,D,R,B,q,I,L,Y,F,e,H,N,X,W,V,U,t,j,b,G,Q,m,Z,y,$,x,r,w,_,ee,o,g,te,re,ne,C,i,T=(E=ob(ct(E)||Ua(E)||E.nodeType?{trigger:E}:E,Ct)).onUpdate,S=E.toggleClass,a=E.id,k=E.onToggle,oe=E.onRefresh,P=E.scrub,ie=E.trigger,ae=E.pin,se=E.pinSpacing,le=E.invalidateOnRefresh,M=E.anticipatePin,s=E.onScrubComplete,h=E.onSnapComplete,ce=E.once,ue=E.snap,fe=E.pinReparent,l=E.pinSpacer,de=E.containerAnimation,pe=E.fastScrollEnd,ge=E.preventOverlaps,he=E.horizontal||E.containerAnimation&&!1!==E.horizontal?Ye:Fe,ve=!P&&0!==P,be=J(E.scroller||Ne),c=He.core.getCache(be),me=La(be),ye="fixed"===("pinType"in E?E.pinType:z(be,"pinType")||me&&"fixed"),xe=[E.onEnter,E.onLeave,E.onEnterBack,E.onLeaveBack],we=ve&&E.toggleActions.split(" "),_e="markers"in E?E.markers:Ct.markers,Ce=me?0:parseFloat(mb(be)["border"+he.p2+yt])||0,Te=this,Se=E.onRefreshInit&&function(){return E.onRefreshInit(Te)},ke=function _getSizeFunc(e,t,r){var n=r.d,o=r.d2,i=r.a;return(i=z(e,"getBoundingClientRect"))?function(){return i()[n]}:function(){return(t?Ma(o):e["client"+o])||0}}(be,me,he),Pe=function _getOffsetsFunc(e,t){return!t||~Le.indexOf(e)?Na(e):function(){return Ot}}(be,me),Me=0,Ee=0,Oe=0,Ae=K(be,he);if(Te._startClamp=Te._endClamp=!1,Te._dir=he,M*=45,Te.scroller=be,Te.scroll=de?de.time.bind(de):Ae,D=Ae(),Te.vars=E,O=O||E.animation,"refreshPriority"in E&&(Ze=1,-9999===E.refreshPriority&&(ot=Te)),c.tweenScroll=c.tweenScroll||{top:rc(be,Fe),left:rc(be,Ye)},Te.tweenTo=A=c.tweenScroll[he.p],Te.scrubDuration=function(e){(o=Ua(e)&&e)?ee?ee.duration(e):ee=He.to(O,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:o,paused:!0,onComplete:function onComplete(){return s&&s(Te)}}):(ee&&ee.progress(1).kill(),ee=0)},O&&(O.vars.lazy=!1,O._initted&&!Te.isReverted||!1!==O.vars.immediateRender&&!1!==E.immediateRender&&O.duration()&&O.render(0,!0,!0),Te.animation=O.pause(),(O.scrollTrigger=Te).scrubDuration(P),w=0,a=a||O.vars.id),ue&&(Va(ue)&&!ue.push||(ue={snapTo:ue}),"scrollBehavior"in We.style&&He.set(me?[We,Je]:be,{scrollBehavior:"auto"}),Ie.forEach(function(e){return Ta(e)&&e.target===(me?Xe.scrollingElement||Je:be)&&(e.smooth=!1)}),p=Ta(ue.snapTo)?ue.snapTo:"labels"===ue.snapTo?function _getClosestLabel(t){return function(e){return He.utils.snap(rb(t),e)}}(O):"labelsDirectional"===ue.snapTo?function _getLabelAtDirection(r){return function(e,t){return tb(rb(r))(e,t.direction)}}(O):!1!==ue.directional?function(e,t){return tb(ue.snapTo)(e,at()-Ee<500?0:t.direction)}:He.utils.snap(ue.snapTo),g=ue.duration||{min:.1,max:2},g=Va(g)?Ue(g.min,g.max):Ue(g,g),te=He.delayedCall(ue.delay||o/2||.1,function(){var e=Ae(),t=at()-Ee<500,r=A.tween;if(!(t||Math.abs(Te.getVelocity())<10)||r||Ge||Me===e)Te.isActive&&Me!==e&&te.restart(!0);else{var n,o,i=(e-B)/N,a=O&&!ve?O.totalProgress():i,s=t?0:(a-_)/(at()-Ke)*1e3||0,l=He.utils.clamp(-i,1-i,ut(s/2)*s/.185),c=i+(!1===ue.inertia?0:l),u=ue.onStart,f=ue.onInterrupt,d=ue.onComplete;if(n=p(c,Te),Ua(n)||(n=c),o=Math.round(B+n*N),e<=q&&B<=e&&o!==e){if(r&&!r._initted&&r.data<=ut(o-e))return;!1===ue.inertia&&(l=n-i),A(o,{duration:g(ut(.185*Math.max(ut(c-a),ut(n-a))/s/.05||0)),ease:ue.ease||"power3",data:ut(o-e),onInterrupt:function onInterrupt(){return te.restart(!0)&&f&&f(Te)},onComplete:function onComplete(){Te.update(),Me=Ae(),O&&(ee?ee.resetTo("totalProgress",n,O._tTime/O._tDur):O.progress(n)),w=_=O&&!ve?O.totalProgress():Te.progress,h&&h(Te),d&&d(Te)}},e,l*N,o-e-l*N),u&&u(Te,A.tween)}}}).pause()),a&&(St[a]=Te),i=(i=(ie=Te.trigger=J(ie||!0!==ae&&ae))&&ie._gsap&&ie._gsap.stRevert)&&i(Te),ae=!0===ae?ie:J(ae),ct(S)&&(S={targets:ie,className:S}),ae&&(!1===se||se===mt||(se=!(!se&&ae.parentNode&&ae.parentNode.style&&"flex"===mb(ae.parentNode).display)&&bt),Te.pin=ae,(n=He.core.getCache(ae)).spacer?X=n.pinState:(l&&((l=J(l))&&!l.nodeType&&(l=l.current||l.nativeElement),n.spacerIsNative=!!l,l&&(n.spacerState=jc(l))),n.spacer=U=l||Xe.createElement("div"),U.classList.add("pin-spacer"),a&&U.classList.add("pin-spacer-"+a),n.pinState=X=jc(ae)),!1!==E.force3D&&He.set(ae,{force3D:!0}),Te.spacer=U=n.spacer,r=mb(ae),m=r[se+he.os2],j=He.getProperty(ae),b=He.quickSetter(ae,he.a,xt),gc(ae,U,r),V=jc(ae)),_e){e=Va(_e)?ob(_e,_t):_t,Y=Db("scroller-start",a,be,he,e,0),F=Db("scroller-end",a,be,he,e,0,Y),t=Y["offset"+he.op.d2];var u=J(z(be,"content")||be);I=this.markerStart=Db("start",a,u,he,e,t,0,de),L=this.markerEnd=Db("end",a,u,he,e,t,0,de),de&&(C=He.quickSetter([I,L],he.a,xt)),ye||Le.length&&!0===z(be,"fixedMarkers")||(function _makePositionable(e){var t=mb(e).position;e.style.position="absolute"===t||"fixed"===t?t:"relative"}(me?We:be),He.set([Y,F],{force3D:!0}),y=He.quickSetter(Y,he.a,xt),x=He.quickSetter(F,he.a,xt))}if(de){var f=de.vars.onUpdate,d=de.vars.onUpdateParams;de.eventCallback("onUpdate",function(){Te.update(0,0,1),f&&f.apply(de,d||[])})}if(Te.previous=function(){return Tt[Tt.indexOf(Te)-1]},Te.next=function(){return Tt[Tt.indexOf(Te)+1]},Te.revert=function(e,t){if(!t)return Te.kill(!0);var r=!1!==e||!Te.enabled,n=je;r!==Te.isReverted&&(r&&(re=Math.max(Ae(),Te.scroll.rec||0),Oe=Te.progress,ne=O&&O.progress()),I&&[I,L,Y,F].forEach(function(e){return e.style.display=r?"none":"block"}),r&&(je=Te).update(r),!ae||fe&&Te.isActive||(r?function _swapPinOut(e,t,r){Et(r);var n=e._gsap;if(n.spacerIsNative)Et(n.spacerState);else if(e._gsap.swappedIn){var o=t.parentNode;o&&(o.insertBefore(e,t),o.removeChild(t))}e._gsap.swappedIn=!1}(ae,U,X):gc(ae,U,mb(ae),Z)),r||Te.update(r),je=n,Te.isReverted=r)},Te.refresh=function(e,t,r,n){if(!je&&Te.enabled||t)if(ae&&e&&st)wb(ScrollTrigger,"scrollEnd",Ob);else{!rt&&Se&&Se(Te),je=Te,A.tween&&!r&&(A.tween.kill(),A.tween=0),ee&&ee.pause(),le&&O&&O.revert({kill:!1}).invalidate(),Te.isReverted||Te.revert(!0,!0),Te._subPinOffset=!1;var o,i,a,s,l,c,u,f,d,p,g,h,v,b=ke(),m=Pe(),y=de?de.duration():Qa(be,he),x=N<=.01,w=0,_=n||0,C=Va(r)?r.end:E.end,T=E.endTrigger||ie,S=Va(r)?r.start:E.start||(0!==E.start&&ie?ae?"0 0":"0 100%":0),k=Te.pinnedContainer=E.pinnedContainer&&J(E.pinnedContainer,Te),P=ie&&Math.max(0,Tt.indexOf(Te))||0,M=P;for(_e&&Va(r)&&(h=He.getProperty(Y,he.p),v=He.getProperty(F,he.p));M--;)(c=Tt[M]).end||c.refresh(0,1)||(je=Te),!(u=c.pin)||u!==ie&&u!==ae&&u!==k||c.isReverted||((p=p||[]).unshift(c),c.revert(!0,!0)),c!==Tt[M]&&(P--,M--);for(Ta(S)&&(S=S(Te)),S=Ca(S,"start",Te),B=mc(S,ie,b,he,Ae(),I,Y,Te,m,Ce,ye,y,de,Te._startClamp&&"_startClamp")||(ae?-.001:0),Ta(C)&&(C=C(Te)),ct(C)&&!C.indexOf("+=")&&(~C.indexOf(" ")?C=(ct(S)?S.split(" ")[0]:"")+C:(w=Cb(C.substr(2),b),C=ct(S)?S:(de?He.utils.mapRange(0,de.duration(),de.scrollTrigger.start,de.scrollTrigger.end,B):B)+w,T=ie)),C=Ca(C,"end",Te),q=Math.max(B,mc(C||(T?"100% 0":y),T,b,he,Ae()+w,L,F,Te,m,Ce,ye,y,de,Te._endClamp&&"_endClamp"))||-.001,w=0,M=P;M--;)(u=(c=Tt[M]).pin)&&c.start-c._pinPush<=B&&!de&&0<c.end&&(o=c.end-(Te._startClamp?Math.max(0,c.start):c.start),(u===ie&&c.start-c._pinPush<B||u===k)&&isNaN(S)&&(w+=o*(1-c.progress)),u===ae&&(_+=o));if(B+=w,q+=w,Te._startClamp&&(Te._startClamp+=w),Te._endClamp&&!rt&&(Te._endClamp=q||-.001,q=Math.min(q,Qa(be,he))),N=q-B||(B-=.01)&&.001,x&&(Oe=He.utils.clamp(0,1,He.utils.normalize(B,q,re))),Te._pinPush=_,I&&w&&((o={})[he.a]="+="+w,k&&(o[he.p]="-="+Ae()),He.set([I,L],o)),!ae||et&&Te.end>=Qa(be,he)){if(ie&&Ae()&&!de)for(i=ie.parentNode;i&&i!==We;)i._pinOffset&&(B-=i._pinOffset,q-=i._pinOffset),i=i.parentNode}else o=mb(ae),s=he===Fe,a=Ae(),G=parseFloat(j(he.a))+_,!y&&1<q&&(g={style:g=(me?Xe.scrollingElement||Je:be).style,value:g["overflow"+he.a.toUpperCase()]},me&&"scroll"!==mb(We)["overflow"+he.a.toUpperCase()]&&(g.style["overflow"+he.a.toUpperCase()]="scroll")),gc(ae,U,o),V=jc(ae),i=wt(ae,!0),f=ye&&K(be,s?Ye:Fe)(),se?((Z=[se+he.os2,N+_+xt]).t=U,(M=se===bt?qb(ae,he)+N+_:0)&&(Z.push(he.d,M+xt),"auto"!==U.style.flexBasis&&(U.style.flexBasis=M+xt)),Et(Z),k&&Tt.forEach(function(e){e.pin===k&&!1!==e.vars.pinSpacing&&(e._subPinOffset=!0)}),ye&&Ae(re)):(M=qb(ae,he))&&"auto"!==U.style.flexBasis&&(U.style.flexBasis=M+xt),ye&&((l={top:i.top+(s?a-B:f)+xt,left:i.left+(s?f:a-B)+xt,boxSizing:"border-box",position:"fixed"})[ft]=l.maxWidth=Math.ceil(i.width)+xt,l[dt]=l.maxHeight=Math.ceil(i.height)+xt,l[mt]=l[mt+ht]=l[mt+pt]=l[mt+vt]=l[mt+gt]="0",l[bt]=o[bt],l[bt+ht]=o[bt+ht],l[bt+pt]=o[bt+pt],l[bt+vt]=o[bt+vt],l[bt+gt]=o[bt+gt],W=function _copyState(e,t,r){for(var n,o=[],i=e.length,a=r?8:0;a<i;a+=2)n=e[a],o.push(n,n in t?t[n]:e[a+1]);return o.t=e.t,o}(X,l,fe),rt&&Ae(0)),O?(d=O._initted,$e(1),O.render(O.duration(),!0,!0),Q=j(he.a)-G+N+_,$=1<Math.abs(N-Q),ye&&$&&W.splice(W.length-2,2),O.render(0,!0,!0),d||O.invalidate(!0),O.parent||O.totalTime(O.totalTime()),$e(0)):Q=N,g&&(g.value?g.style["overflow"+he.a.toUpperCase()]=g.value:g.style.removeProperty("overflow-"+he.a));p&&p.forEach(function(e){return e.revert(!1,!0)}),Te.start=B,Te.end=q,D=R=rt?re:Ae(),de||rt||(D<re&&Ae(re),Te.scroll.rec=0),Te.revert(!1,!0),Ee=at(),te&&(Me=-1,te.restart(!0)),je=0,O&&ve&&(O._initted||ne)&&O.progress()!==ne&&O.progress(ne||0,!0).render(O.time(),!0,!0),(x||Oe!==Te.progress||de||le)&&(O&&!ve&&O.totalProgress(de&&B<-.001&&!Oe?He.utils.normalize(B,q,0):Oe,!0),Te.progress=x||(D-B)/N===Oe?0:Oe),ae&&se&&(U._pinOffset=Math.round(Te.progress*Q)),ee&&ee.invalidate(),isNaN(h)||(h-=He.getProperty(Y,he.p),v-=He.getProperty(F,he.p),qc(Y,he,h),qc(I,he,h-(n||0)),qc(F,he,v),qc(L,he,v-(n||0))),x&&!rt&&Te.update(),!oe||rt||H||(H=!0,oe(Te),H=!1)}},Te.getVelocity=function(){return(Ae()-R)/(at()-Ke)*1e3||0},Te.endAnimation=function(){Wa(Te.callbackAnimation),O&&(ee?ee.progress(1):O.paused()?ve||Wa(O,Te.direction<0,1):Wa(O,O.reversed()))},Te.labelToScroll=function(e){return O&&O.labels&&(B||Te.refresh()||B)+O.labels[e]/O.duration()*N||0},Te.getTrailing=function(t){var e=Tt.indexOf(Te),r=0<Te.direction?Tt.slice(0,e).reverse():Tt.slice(e+1);return(ct(t)?r.filter(function(e){return e.vars.preventOverlaps===t}):r).filter(function(e){return 0<Te.direction?e.end<=B:e.start>=q})},Te.update=function(e,t,r){if(!de||r||e){var n,o,i,a,s,l,c,u=!0===rt?re:Te.scroll(),f=e?0:(u-B)/N,d=f<0?0:1<f?1:f||0,p=Te.progress;if(t&&(R=D,D=de?Ae():u,ue&&(_=w,w=O&&!ve?O.totalProgress():d)),M&&ae&&!je&&!it&&st&&(!d&&B<u+(u-R)/(at()-Ke)*M?d=1e-4:1===d&&q>u+(u-R)/(at()-Ke)*M&&(d=.9999)),d!==p&&Te.enabled){if(a=(s=(n=Te.isActive=!!d&&d<1)!=(!!p&&p<1))||!!d!=!!p,Te.direction=p<d?1:-1,Te.progress=d,a&&!je&&(o=d&&!p?0:1===d?1:1===p?2:3,ve&&(i=!s&&"none"!==we[o+1]&&we[o+1]||we[o],c=O&&("complete"===i||"reset"===i||i in O))),ge&&(s||c)&&(c||P||!O)&&(Ta(ge)?ge(Te):Te.getTrailing(ge).forEach(function(e){return e.endAnimation()})),ve||(!ee||je||it?O&&O.totalProgress(d,!(!je||!Ee&&!e)):(ee._dp._time-ee._start!==ee._time&&ee.render(ee._dp._time-ee._start),ee.resetTo?ee.resetTo("totalProgress",d,O._tTime/O._tDur):(ee.vars.totalProgress=d,ee.invalidate().restart()))),ae)if(e&&se&&(U.style[se+he.os2]=m),ye){if(a){if(l=!e&&p<d&&u<q+1&&u+1>=Qa(be,he),fe)if(e||!n&&!l)oc(ae,U);else{var g=wt(ae,!0),h=u-B;oc(ae,We,g.top+(he===Fe?h:0)+xt,g.left+(he===Fe?0:h)+xt)}Et(n||l?W:V),$&&d<1&&n||b(G+(1!==d||l?0:Q))}}else b(Ia(G+Q*d));!ue||A.tween||je||it||te.restart(!0),S&&(s||ce&&d&&(d<1||!tt))&&Ve(S.targets).forEach(function(e){return e.classList[n||ce?"add":"remove"](S.className)}),!T||ve||e||T(Te),a&&!je?(ve&&(c&&("complete"===i?O.pause().totalProgress(1):"reset"===i?O.restart(!0).pause():"restart"===i?O.restart(!0):O[i]()),T&&T(Te)),!s&&tt||(k&&s&&Xa(Te,k),xe[o]&&Xa(Te,xe[o]),ce&&(1===d?Te.kill(!1,1):xe[o]=0),s||xe[o=1===d?1:3]&&Xa(Te,xe[o])),pe&&!n&&Math.abs(Te.getVelocity())>(Ua(pe)?pe:2500)&&(Wa(Te.callbackAnimation),ee?ee.progress(1):Wa(O,"reverse"===i?1:!d,1))):ve&&T&&!je&&T(Te)}if(x){var v=de?u/de.duration()*(de._caScrollDist||0):u;y(v+(Y._isFlipped?1:0)),x(v)}C&&C(-u/de.duration()*(de._caScrollDist||0))}},Te.enable=function(e,t){Te.enabled||(Te.enabled=!0,wb(be,"resize",Lb),me||wb(be,"scroll",Jb),Se&&wb(ScrollTrigger,"refreshInit",Se),!1!==e&&(Te.progress=Oe=0,D=R=Me=Ae()),!1!==t&&Te.refresh())},Te.getTween=function(e){return e&&A?A.tween:ee},Te.setPositions=function(e,t,r,n){if(de){var o=de.scrollTrigger,i=de.duration(),a=o.end-o.start;e=o.start+a*e/i,t=o.start+a*t/i}Te.refresh(!1,!1,{start:Da(e,r&&!!Te._startClamp),end:Da(t,r&&!!Te._endClamp)},n),Te.update()},Te.adjustPinSpacing=function(e){if(Z&&e){var t=Z.indexOf(he.d)+1;Z[t]=parseFloat(Z[t])+e+xt,Z[1]=parseFloat(Z[1])+e+xt,Et(Z)}},Te.disable=function(e,t){if(Te.enabled&&(!1!==e&&Te.revert(!0,!0),Te.enabled=Te.isActive=!1,t||ee&&ee.pause(),re=0,n&&(n.uncache=1),Se&&xb(ScrollTrigger,"refreshInit",Se),te&&(te.pause(),A.tween&&A.tween.kill()&&(A.tween=0)),!me)){for(var r=Tt.length;r--;)if(Tt[r].scroller===be&&Tt[r]!==Te)return;xb(be,"resize",Lb),me||xb(be,"scroll",Jb)}},Te.kill=function(e,t){Te.disable(e,t),ee&&!t&&ee.kill(),a&&delete St[a];var r=Tt.indexOf(Te);0<=r&&Tt.splice(r,1),r===Qe&&0<Mt&&Qe--,r=0,Tt.forEach(function(e){return e.scroller===Te.scroller&&(r=1)}),r||rt||(Te.scroll.rec=0),O&&(O.scrollTrigger=null,e&&O.revert({kill:!1}),t||O.kill()),I&&[I,L,Y,F].forEach(function(e){return e.parentNode&&e.parentNode.removeChild(e)}),ot===Te&&(ot=0),ae&&(n&&(n.uncache=1),r=0,Tt.forEach(function(e){return e.pin===ae&&r++}),r||(n.spacer=0)),E.onKill&&E.onKill(Te)},Tt.push(Te),Te.enable(!1,!1),i&&i(Te),O&&O.add&&!N){var v=Te.update;Te.update=function(){Te.update=v,B||q||Te.refresh()},He.delayedCall(.01,Te.update),N=.01,B=q=0}else Te.refresh();ae&&function _queueRefreshAll(){if(nt!==kt){var e=nt=kt;requestAnimationFrame(function(){return e===kt&&Pt(!0)})}}()}else this.update=this.refresh=this.kill=Ha},ScrollTrigger.register=function register(e){return s||(He=e||Ka(),Ja()&&window.document&&ScrollTrigger.enable(),s=lt),s},ScrollTrigger.defaults=function defaults(e){if(e)for(var t in e)Ct[t]=e[t];return Ct},ScrollTrigger.disable=function disable(t,r){lt=0,Tt.forEach(function(e){return e[r?"kill":"disable"](t)}),xb(Ne,"wheel",Jb),xb(Xe,"scroll",Jb),clearInterval(u),xb(Xe,"touchcancel",Ha),xb(We,"touchstart",Ha),vb(xb,Xe,"pointerdown,touchstart,mousedown",Fa),vb(xb,Xe,"pointerup,touchend,mouseup",Ga),c.kill(),Ra(xb);for(var e=0;e<Ie.length;e+=3)yb(xb,Ie[e],Ie[e+1]),yb(xb,Ie[e],Ie[e+2])},ScrollTrigger.enable=function enable(){if(Ne=window,Xe=document,Je=Xe.documentElement,We=Xe.body,He&&(Ve=He.utils.toArray,Ue=He.utils.clamp,x=He.core.context||Ha,$e=He.core.suppressOverwrites||Ha,w=Ne.history.scrollRestoration||"auto",Q=Ne.pageYOffset,He.core.globals("ScrollTrigger",ScrollTrigger),We)){lt=1,(_=document.createElement("div")).style.height="100vh",_.style.position="absolute",Yb(),function _rafBugFix(){return lt&&requestAnimationFrame(_rafBugFix)}(),k.register(He),ScrollTrigger.isTouch=k.isTouch,E=k.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),b=1===k.isTouch,wb(Ne,"wheel",Jb),l=[Ne,Xe,Je,We],He.matchMedia?(ScrollTrigger.matchMedia=function(e){var t,r=He.matchMedia();for(t in e)r.add(t,e[t]);return r},He.addEventListener("matchMediaInit",function(){return Sb()}),He.addEventListener("matchMediaRevert",function(){return Rb()}),He.addEventListener("matchMedia",function(){Pt(0,1),U("matchMedia")}),He.matchMedia("(orientation: portrait)",function(){return Kb(),Kb})):console.warn("Requires GSAP 3.11.0 or later"),Kb(),wb(Xe,"scroll",Jb);var e,t,r=We.style,n=r.borderTopStyle,o=He.core.Animation.prototype;for(o.revert||Object.defineProperty(o,"revert",{value:function value(){return this.time(-.01,!0)}}),r.borderTopStyle="solid",e=wt(We),Fe.m=Math.round(e.top+Fe.sc())||0,Ye.m=Math.round(e.left+Ye.sc())||0,n?r.borderTopStyle=n:r.removeProperty("border-top-style"),u=setInterval(Ib,250),He.delayedCall(.5,function(){return it=0}),wb(Xe,"touchcancel",Ha),wb(We,"touchstart",Ha),vb(wb,Xe,"pointerdown,touchstart,mousedown",Fa),vb(wb,Xe,"pointerup,touchend,mouseup",Ga),f=He.utils.checkPrefix("transform"),ee.push(f),s=at(),c=He.delayedCall(.2,Pt).pause(),g=[Xe,"visibilitychange",function(){var e=Ne.innerWidth,t=Ne.innerHeight;Xe.hidden?(d=e,p=t):d===e&&p===t||Lb()},Xe,"DOMContentLoaded",Pt,Ne,"load",Pt,Ne,"resize",Lb],Ra(wb),Tt.forEach(function(e){return e.enable(0,1)}),t=0;t<Ie.length;t+=3)yb(xb,Ie[t],Ie[t+1]),yb(xb,Ie[t],Ie[t+2])}},ScrollTrigger.config=function config(e){"limitCallbacks"in e&&(tt=!!e.limitCallbacks);var t=e.syncInterval;t&&clearInterval(u)||(u=t)&&setInterval(Ib,t),"ignoreMobileResize"in e&&(b=1===ScrollTrigger.isTouch&&e.ignoreMobileResize),"autoRefreshEvents"in e&&(Ra(xb)||Ra(wb,e.autoRefreshEvents||"none"),h=-1===(e.autoRefreshEvents+"").indexOf("resize"))},ScrollTrigger.scrollerProxy=function scrollerProxy(e,t){var r=J(e),n=Ie.indexOf(r),o=La(r);~n&&Ie.splice(n,o?6:2),t&&(o?Le.unshift(Ne,t,We,t,Je,t):Le.unshift(r,t))},ScrollTrigger.clearMatchMedia=function clearMatchMedia(t){Tt.forEach(function(e){return e._ctx&&e._ctx.query===t&&e._ctx.kill(!0,!0)})},ScrollTrigger.isInViewport=function isInViewport(e,t,r){var n=(ct(e)?J(e):e).getBoundingClientRect(),o=n[r?ft:dt]*t||0;return r?0<n.right-o&&n.left+o<Ne.innerWidth:0<n.bottom-o&&n.top+o<Ne.innerHeight},ScrollTrigger.positionInViewport=function positionInViewport(e,t,r){ct(e)&&(e=J(e));var n=e.getBoundingClientRect(),o=n[r?ft:dt],i=null==t?o/2:t in H?H[t]*o:~t.indexOf("%")?parseFloat(t)*o/100:parseFloat(t)||0;return r?(n.left+i)/Ne.innerWidth:(n.top+i)/Ne.innerHeight},ScrollTrigger.killAll=function killAll(e){if(Tt.slice(0).forEach(function(e){return"ScrollSmoother"!==e.vars.id&&e.kill()}),!0!==e){var t=W.killAll||[];W={},t.forEach(function(e){return e()})}},ScrollTrigger);function ScrollTrigger(e,t){s||ScrollTrigger.register(He)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),x(this),this.init(e,t)}ne.version="3.12.5",ne.saveStyles=function(e){return e?Ve(e).forEach(function(e){if(e&&e.style){var t=j.indexOf(e);0<=t&&j.splice(t,5),j.push(e,e.style.cssText,e.getBBox&&e.getAttribute("transform"),He.core.getCache(e),x())}}):j},ne.revert=function(e,t){return Sb(!e,t)},ne.create=function(e,t){return new ne(e,t)},ne.refresh=function(e){return e?Lb():(s||ne.register())&&Pt(!0)},ne.update=function(e){return++Ie.cache&&Z(!0===e?2:0)},ne.clearScrollMemory=Tb,ne.maxScroll=function(e,t){return Qa(e,t?Ye:Fe)},ne.getScrollFunc=function(e,t){return K(J(e),t?Ye:Fe)},ne.getById=function(e){return St[e]},ne.getAll=function(){return Tt.filter(function(e){return"ScrollSmoother"!==e.vars.id})},ne.isScrolling=function(){return!!st},ne.snapDirectional=tb,ne.addEventListener=function(e,t){var r=W[e]||(W[e]=[]);~r.indexOf(t)||r.push(t)},ne.removeEventListener=function(e,t){var r=W[e],n=r&&r.indexOf(t);0<=n&&r.splice(n,1)},ne.batch=function(e,t){function Cp(e,t){var r=[],n=[],o=He.delayedCall(i,function(){t(r,n),r=[],n=[]}).pause();return function(e){r.length||o.restart(!0),r.push(e.trigger),n.push(e),a<=r.length&&o.progress(1)}}var r,n=[],o={},i=t.interval||.016,a=t.batchMax||1e9;for(r in t)o[r]="on"===r.substr(0,2)&&Ta(t[r])&&"onRefreshInit"!==r?Cp(0,t[r]):t[r];return Ta(a)&&(a=a(),wb(ne,"refresh",function(){return a=t.batchMax()})),Ve(e).forEach(function(e){var t={};for(r in o)t[r]=o[r];t.trigger=e,n.push(ne.create(t))}),n};function tc(e,t,r,n){return n<t?e(n):t<0&&e(0),n<r?(n-t)/(r-t):r<0?t/(t-r):1}function uc(e,t){!0===t?e.style.removeProperty("touch-action"):e.style.touchAction=!0===t?"auto":t?"pan-"+t+(k.isTouch?" pinch-zoom":""):"none",e===Je&&uc(We,t)}function wc(e){var t,r=e.event,n=e.target,o=e.axis,i=(r.changedTouches?r.changedTouches[0]:r).target,a=i._gsap||He.core.getCache(i),s=at();if(!a._isScrollT||2e3<s-a._isScrollT){for(;i&&i!==We&&(i.scrollHeight<=i.clientHeight&&i.scrollWidth<=i.clientWidth||!ie[(t=mb(i)).overflowY]&&!ie[t.overflowX]);)i=i.parentNode;a._isScroll=i&&i!==n&&!La(i)&&(ie[(t=mb(i)).overflowY]||ie[t.overflowX]),a._isScrollT=s}!a._isScroll&&"x"!==o||(r.stopPropagation(),r._gsapAllow=!0)}function xc(e,t,r,n){return k.create({target:e,capture:!0,debounce:!1,lockAxis:!0,type:t,onWheel:n=n&&wc,onPress:n,onDrag:n,onScroll:n,onEnable:function onEnable(){return r&&wb(Xe,k.eventTypes[0],se,!1,!0)},onDisable:function onDisable(){return xb(Xe,k.eventTypes[0],se,!0)}})}function Bc(e){function zq(){return o=!1}function Cq(){i=Qa(p,Fe),S=Ue(E?1:0,i),f&&(T=Ue(0,Qa(p,Ye))),l=kt}function Dq(){v._gsap.y=Ia(parseFloat(v._gsap.y)+b.offset)+"px",v.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(v._gsap.y)+", 0, 1)",b.offset=b.cacheID=0}function Jq(){Cq(),a.isActive()&&a.vars.scrollY>i&&(b()>i?a.progress(1)&&b(i):a.resetTo("scrollY",i))}Va(e)||(e={}),e.preventDefault=e.isNormalizer=e.allowClicks=!0,e.type||(e.type="wheel,touch"),e.debounce=!!e.debounce,e.id=e.id||"normalizer";var n,i,l,o,a,c,u,s,f=e.normalizeScrollX,t=e.momentum,r=e.allowNestedScroll,d=e.onRelease,p=J(e.target)||Je,g=He.core.globals().ScrollSmoother,h=g&&g.get(),v=E&&(e.content&&J(e.content)||h&&!1!==e.content&&!h.smooth()&&h.content()),b=K(p,Fe),m=K(p,Ye),y=1,x=(k.isTouch&&Ne.visualViewport?Ne.visualViewport.scale*Ne.visualViewport.width:Ne.outerWidth)/Ne.innerWidth,w=0,_=Ta(t)?function(){return t(n)}:function(){return t||2.8},C=xc(p,e.type,!0,r),T=Ha,S=Ha;return v&&He.set(v,{y:"+=0"}),e.ignoreCheck=function(e){return E&&"touchmove"===e.type&&function ignoreDrag(){if(o){requestAnimationFrame(zq);var e=Ia(n.deltaY/2),t=S(b.v-e);if(v&&t!==b.v+b.offset){b.offset=t-b.v;var r=Ia((parseFloat(v&&v._gsap.y)||0)-b.offset);v.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+r+", 0, 1)",v._gsap.y=r+"px",b.cacheID=Ie.cache,Z()}return!0}b.offset&&Dq(),o=!0}()||1.05<y&&"touchstart"!==e.type||n.isGesturing||e.touches&&1<e.touches.length},e.onPress=function(){o=!1;var e=y;y=Ia((Ne.visualViewport&&Ne.visualViewport.scale||1)/x),a.pause(),e!==y&&uc(p,1.01<y||!f&&"x"),c=m(),u=b(),Cq(),l=kt},e.onRelease=e.onGestureStart=function(e,t){if(b.offset&&Dq(),t){Ie.cache++;var r,n,o=_();f&&(n=(r=m())+.05*o*-e.velocityX/.227,o*=tc(m,r,n,Qa(p,Ye)),a.vars.scrollX=T(n)),n=(r=b())+.05*o*-e.velocityY/.227,o*=tc(b,r,n,Qa(p,Fe)),a.vars.scrollY=S(n),a.invalidate().duration(o).play(.01),(E&&a.vars.scrollY>=i||i-1<=r)&&He.to({},{onUpdate:Jq,duration:o})}else s.restart(!0);d&&d(e)},e.onWheel=function(){a._ts&&a.pause(),1e3<at()-w&&(l=0,w=at())},e.onChange=function(e,t,r,n,o){if(kt!==l&&Cq(),t&&f&&m(T(n[2]===t?c+(e.startX-e.x):m()+t-n[1])),r){b.offset&&Dq();var i=o[2]===r,a=i?u+e.startY-e.y:b()+r-o[1],s=S(a);i&&a!==s&&(u+=s-a),b(s)}(r||t)&&Z()},e.onEnable=function(){uc(p,!f&&"x"),ne.addEventListener("refresh",Jq),wb(Ne,"resize",Jq),b.smooth&&(b.target.style.scrollBehavior="auto",b.smooth=m.smooth=!1),C.enable()},e.onDisable=function(){uc(p,!0),xb(Ne,"resize",Jq),ne.removeEventListener("refresh",Jq),C.kill()},e.lockAxis=!1!==e.lockAxis,((n=new k(e)).iOS=E)&&!b()&&b(1),E&&He.ticker.add(Ha),s=n._dc,a=He.to(n,{ease:"power4",paused:!0,inherit:!1,scrollX:f?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:pc(b,b(),function(){return a.pause()})},onUpdate:Z,onComplete:s.vars.onComplete}),n}var oe,ie={auto:1,scroll:1},ae=/(input|label|select|textarea)/i,se=function _captureInputs(e){var t=ae.test(e.target.tagName);(t||oe)&&(e._gsapAllow=!0,oe=t)};ne.sort=function(e){return Tt.sort(e||function(e,t){return-1e6*(e.vars.refreshPriority||0)+e.start-(t.start+-1e6*(t.vars.refreshPriority||0))})},ne.observe=function(e){return new k(e)},ne.normalizeScroll=function(e){if(void 0===e)return v;if(!0===e&&v)return v.enable();if(!1===e)return v&&v.kill(),void(v=e);var t=e instanceof k?e:Bc(e);return v&&v.target===t.target&&v.kill(),La(t.target)&&(v=t),t},ne.core={_getVelocityProp:L,_inputObserver:xc,_scrollers:Ie,_proxies:Le,bridge:{ss:function ss(){st||U("scrollStart"),st=at()},ref:function ref(){return je}}},Ka()&&He.registerPlugin(ne),e.ScrollTrigger=ne,e.default=ne;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}});
22
23/*!
24 * Flickity PACKAGED v2.2.2
25 * Touch, responsive, flickable carousels
26 *
27 * Licensed GPLv3 for open source use
28 * or Flickity Commercial License for commercial use
29 *
30 * https://flickity.metafizzy.co
31 * Copyright 2015-2021 Metafizzy
vendor: 19,108 bytes, lines 31-795
31
32 */
33
34/**
35 * Bridget makes jQuery widgets
36 * v2.0.1
37 * MIT license
38 */
39
40/* jshint browser: true, strict: true, undef: true, unused: true */
41
42( function( window, factory ) {
43  // universal module definition
44  /*jshint strict: false */ /* globals define, module, require */
45  if ( typeof define == 'function' && define.amd ) {
46    // AMD
47    define( 'jquery-bridget/jquery-bridget',[ 'jquery' ], function( jQuery ) {
48      return factory( window, jQuery );
49    });
50  } else if ( typeof module == 'object' && module.exports ) {
51    // CommonJS
52    module.exports = factory(
53      window,
54      require('jquery')
55    );
56  } else {
57    // browser global
58    window.jQueryBridget = factory(
59      window,
60      window.jQuery
61    );
62  }
63
64}( window, function factory( window, jQuery ) {
65'use strict';
66
67// ----- utils ----- //
68
69var arraySlice = Array.prototype.slice;
70
71// helper function for logging errors
72// $.error breaks jQuery chaining
73var console = window.console;
74var logError = typeof console == 'undefined' ? function() {} :
75  function( message ) {
76    console.error( message );
77  };
78
79// ----- jQueryBridget ----- //
80
81function jQueryBridget( namespace, PluginClass, $ ) {
82  $ = $ || jQuery || window.jQuery;
83  if ( !$ ) {
84    return;
85  }
86
87  // add option method -> $().plugin('option', {...})
88  if ( !PluginClass.prototype.option ) {
89    // option setter
90    PluginClass.prototype.option = function( opts ) {
91      // bail out if not an object
92      if ( !$.isPlainObject( opts ) ){
93        return;
94      }
95      this.options = $.extend( true, this.options, opts );
96    };
97  }
98
99  // make jQuery plugin
100  $.fn[ namespace ] = function( arg0 /*, arg1 */ ) {
101    if ( typeof arg0 == 'string' ) {
102      // method call $().plugin( 'methodName', { options } )
103      // shift arguments by 1
104      var args = arraySlice.call( arguments, 1 );
105      return methodCall( this, arg0, args );
106    }
107    // just $().plugin({ options })
108    plainCall( this, arg0 );
109    return this;
110  };
111
112  // $().plugin('methodName')
113  function methodCall( $elems, methodName, args ) {
114    var returnValue;
115    var pluginMethodStr = '$().' + namespace + '("' + methodName + '")';
116
117    $elems.each( function( i, elem ) {
118      // get instance
119      var instance = $.data( elem, namespace );
120      if ( !instance ) {
121        logError( namespace + ' not initialized. Cannot call methods, i.e. ' +
122          pluginMethodStr );
123        return;
124      }
125
126      var method = instance[ methodName ];
127      if ( !method || methodName.charAt(0) == '_' ) {
128        logError( pluginMethodStr + ' is not a valid method' );
129        return;
130      }
131
132      // apply method, get return value
133      var value = method.apply( instance, args );
134      // set return value if value is returned, use only first value
135      returnValue = returnValue === undefined ? value : returnValue;
136    });
137
138    return returnValue !== undefined ? returnValue : $elems;
139  }
140
141  function plainCall( $elems, options ) {
142    $elems.each( function( i, elem ) {
143      var instance = $.data( elem, namespace );
144      if ( instance ) {
145        // set options & init
146        instance.option( options );
147        instance._init();
148      } else {
149        // initialize new instance
150        instance = new PluginClass( elem, options );
151        $.data( elem, namespace, instance );
152      }
153    });
154  }
155
156  updateJQuery( $ );
157
158}
159
160// ----- updateJQuery ----- //
161
162// set $.bridget for v1 backwards compatibility
163function updateJQuery( $ ) {
164  if ( !$ || ( $ && $.bridget ) ) {
165    return;
166  }
167  $.bridget = jQueryBridget;
168}
169
170updateJQuery( jQuery || window.jQuery );
171
172// -----  ----- //
173
174return jQueryBridget;
175
176}));
177
178/**
179 * EvEmitter v1.1.0
180 * Lil' event emitter
181 * MIT License
182 */
183
184/* jshint unused: true, undef: true, strict: true */
185
186( function( global, factory ) {
187  // universal module definition
188  /* jshint strict: false */ /* globals define, module, window */
189  if ( typeof define == 'function' && define.amd ) {
190    // AMD - RequireJS
191    define( 'ev-emitter/ev-emitter',factory );
192  } else if ( typeof module == 'object' && module.exports ) {
193    // CommonJS - Browserify, Webpack
194    module.exports = factory();
195  } else {
196    // Browser globals
197    global.EvEmitter = factory();
198  }
199
200}( typeof window != 'undefined' ? window : this, function() {
201
202
203
204function EvEmitter() {}
205
206var proto = EvEmitter.prototype;
207
208proto.on = function( eventName, listener ) {
209  if ( !eventName || !listener ) {
210    return;
211  }
212  // set events hash
213  var events = this._events = this._events || {};
214  // set listeners array
215  var listeners = events[ eventName ] = events[ eventName ] || [];
216  // only add once
217  if ( listeners.indexOf( listener ) == -1 ) {
218    listeners.push( listener );
219  }
220
221  return this;
222};
223
224proto.once = function( eventName, listener ) {
225  if ( !eventName || !listener ) {
226    return;
227  }
228  // add event
229  this.on( eventName, listener );
230  // set once flag
231  // set onceEvents hash
232  var onceEvents = this._onceEvents = this._onceEvents || {};
233  // set onceListeners object
234  var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};
235  // set flag
236  onceListeners[ listener ] = true;
237
238  return this;
239};
240
241proto.off = function( eventName, listener ) {
242  var listeners = this._events && this._events[ eventName ];
243  if ( !listeners || !listeners.length ) {
244    return;
245  }
246  var index = listeners.indexOf( listener );
247  if ( index != -1 ) {
248    listeners.splice( index, 1 );
249  }
250
251  return this;
252};
253
254proto.emitEvent = function( eventName, args ) {
255  var listeners = this._events && this._events[ eventName ];
256  if ( !listeners || !listeners.length ) {
257    return;
258  }
259  // copy over to avoid interference if .off() in listener
260  listeners = listeners.slice(0);
261  args = args || [];
262  // once stuff
263  var onceListeners = this._onceEvents && this._onceEvents[ eventName ];
264
265  for ( var i=0; i < listeners.length; i++ ) {
266    var listener = listeners[i]
267    var isOnce = onceListeners && onceListeners[ listener ];
268    if ( isOnce ) {
269      // remove listener
270      // remove before trigger to prevent recursion
271      this.off( eventName, listener );
272      // unset once flag
273      delete onceListeners[ listener ];
274    }
275    // trigger listener
276    listener.apply( this, args );
277  }
278
279  return this;
280};
281
282proto.allOff = function() {
283  delete this._events;
284  delete this._onceEvents;
285};
286
287return EvEmitter;
288
289}));
290
291/*!
292 * getSize v2.0.3
293 * measure size of elements
294 * MIT license
295 */
296
297/* jshint browser: true, strict: true, undef: true, unused: true */
298/* globals console: false */
299
300( function( window, factory ) {
301  /* jshint strict: false */ /* globals define, module */
302  if ( typeof define == 'function' && define.amd ) {
303    // AMD
304    define( 'get-size/get-size',factory );
305  } else if ( typeof module == 'object' && module.exports ) {
306    // CommonJS
307    module.exports = factory();
308  } else {
309    // browser global
310    window.getSize = factory();
311  }
312
313})( window, function factory() {
314'use strict';
315
316// -------------------------- helpers -------------------------- //
317
318// get a number from a string, not a percentage
319function getStyleSize( value ) {
320  var num = parseFloat( value );
321  // not a percent like '100%', and a number
322  var isValid = value.indexOf('%') == -1 && !isNaN( num );
323  return isValid && num;
324}
325
326function noop() {}
327
328var logError = typeof console == 'undefined' ? noop :
329  function( message ) {
330    console.error( message );
331  };
332
333// -------------------------- measurements -------------------------- //
334
335var measurements = [
336  'paddingLeft',
337  'paddingRight',
338  'paddingTop',
339  'paddingBottom',
340  'marginLeft',
341  'marginRight',
342  'marginTop',
343  'marginBottom',
344  'borderLeftWidth',
345  'borderRightWidth',
346  'borderTopWidth',
347  'borderBottomWidth'
348];
349
350var measurementsLength = measurements.length;
351
352function getZeroSize() {
353  var size = {
354    width: 0,
355    height: 0,
356    innerWidth: 0,
357    innerHeight: 0,
358    outerWidth: 0,
359    outerHeight: 0
360  };
361  for ( var i=0; i < measurementsLength; i++ ) {
362    var measurement = measurements[i];
363    size[ measurement ] = 0;
364  }
365  return size;
366}
367
368// -------------------------- getStyle -------------------------- //
369
370/**
371 * getStyle, get style of element, check for Firefox bug
372 * https://bugzilla.mozilla.org/show_bug.cgi?id=548397
373 */
374function getStyle( elem ) {
375  var style = getComputedStyle( elem );
376  if ( !style ) {
377    logError( 'Style returned ' + style +
378      '. Are you running this code in a hidden iframe on Firefox? ' +
379      'See https://bit.ly/getsizebug1' );
380  }
381  return style;
382}
383
384// -------------------------- setup -------------------------- //
385
386var isSetup = false;
387
388var isBoxSizeOuter;
389
390/**
391 * setup
392 * check isBoxSizerOuter
393 * do on first getSize() rather than on page load for Firefox bug
394 */
395function setup() {
396  // setup once
397  if ( isSetup ) {
398    return;
399  }
400  isSetup = true;
401
402  // -------------------------- box sizing -------------------------- //
403
404  /**
405   * Chrome & Safari measure the outer-width on style.width on border-box elems
406   * IE11 & Firefox<29 measures the inner-width
407   */
408  var div = document.createElement('div');
409  div.style.width = '200px';
410  div.style.padding = '1px 2px 3px 4px';
411  div.style.borderStyle = 'solid';
412  div.style.borderWidth = '1px 2px 3px 4px';
413  div.style.boxSizing = 'border-box';
414
415  var body = document.body || document.documentElement;
416  body.appendChild( div );
417  var style = getStyle( div );
418  // round value for browser zoom. desandro/masonry#928
419  isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;
420  getSize.isBoxSizeOuter = isBoxSizeOuter;
421
422  body.removeChild( div );
423}
424
425// -------------------------- getSize -------------------------- //
426
427function getSize( elem ) {
428  setup();
429
430  // use querySeletor if elem is string
431  if ( typeof elem == 'string' ) {
432    elem = document.querySelector( elem );
433  }
434
435  // do not proceed on non-objects
436  if ( !elem || typeof elem != 'object' || !elem.nodeType ) {
437    return;
438  }
439
440  var style = getStyle( elem );
441
442  // if hidden, everything is 0
443  if ( style.display == 'none' ) {
444    return getZeroSize();
445  }
446
447  var size = {};
448  size.width = elem.offsetWidth;
449  size.height = elem.offsetHeight;
450
451  var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box';
452
453  // get all measurements
454  for ( var i=0; i < measurementsLength; i++ ) {
455    var measurement = measurements[i];
456    var value = style[ measurement ];
457    var num = parseFloat( value );
458    // any 'auto', 'medium' value will be 0
459    size[ measurement ] = !isNaN( num ) ? num : 0;
460  }
461
462  var paddingWidth = size.paddingLeft + size.paddingRight;
463  var paddingHeight = size.paddingTop + size.paddingBottom;
464  var marginWidth = size.marginLeft + size.marginRight;
465  var marginHeight = size.marginTop + size.marginBottom;
466  var borderWidth = size.borderLeftWidth + size.borderRightWidth;
467  var borderHeight = size.borderTopWidth + size.borderBottomWidth;
468
469  var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter;
470
471  // overwrite width and height if we can get it from style
472  var styleWidth = getStyleSize( style.width );
473  if ( styleWidth !== false ) {
474    size.width = styleWidth +
475      // add padding and border unless it's already including it
476      ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth );
477  }
478
479  var styleHeight = getStyleSize( style.height );
480  if ( styleHeight !== false ) {
481    size.height = styleHeight +
482      // add padding and border unless it's already including it
483      ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight );
484  }
485
486  size.innerWidth = size.width - ( paddingWidth + borderWidth );
487  size.innerHeight = size.height - ( paddingHeight + borderHeight );
488
489  size.outerWidth = size.width + marginWidth;
490  size.outerHeight = size.height + marginHeight;
491
492  return size;
493}
494
495return getSize;
496
497});
498
499/**
500 * matchesSelector v2.0.2
501 * matchesSelector( element, '.selector' )
502 * MIT license
503 */
504
505/*jshint browser: true, strict: true, undef: true, unused: true */
506
507( function( window, factory ) {
508  /*global define: false, module: false */
509  'use strict';
510  // universal module definition
511  if ( typeof define == 'function' && define.amd ) {
512    // AMD
513    define( 'desandro-matches-selector/matches-selector',factory );
514  } else if ( typeof module == 'object' && module.exports ) {
515    // CommonJS
516    module.exports = factory();
517  } else {
518    // browser global
519    window.matchesSelector = factory();
520  }
521
522}( window, function factory() {
523  'use strict';
524
525  var matchesMethod = ( function() {
526    var ElemProto = window.Element.prototype;
527    // check for the standard method name first
528    if ( ElemProto.matches ) {
529      return 'matches';
530    }
531    // check un-prefixed
532    if ( ElemProto.matchesSelector ) {
533      return 'matchesSelector';
534    }
535    // check vendor prefixes
536    var prefixes = [ 'webkit', 'moz', 'ms', 'o' ];
537
538    for ( var i=0; i < prefixes.length; i++ ) {
539      var prefix = prefixes[i];
540      var method = prefix + 'MatchesSelector';
541      if ( ElemProto[ method ] ) {
542        return method;
543      }
544    }
545  })();
546
547  return function matchesSelector( elem, selector ) {
548    return elem[ matchesMethod ]( selector );
549  };
550
551}));
552
553/**
554 * Fizzy UI utils v2.0.7
555 * MIT license
556 */
557
558/*jshint browser: true, undef: true, unused: true, strict: true */
559
560( function( window, factory ) {
561  // universal module definition
562  /*jshint strict: false */ /*globals define, module, require */
563
564  if ( typeof define == 'function' && define.amd ) {
565    // AMD
566    define( 'fizzy-ui-utils/utils',[
567      'desandro-matches-selector/matches-selector'
568    ], function( matchesSelector ) {
569      return factory( window, matchesSelector );
570    });
571  } else if ( typeof module == 'object' && module.exports ) {
572    // CommonJS
573    module.exports = factory(
574      window,
575      require('desandro-matches-selector')
576    );
577  } else {
578    // browser global
579    window.fizzyUIUtils = factory(
580      window,
581      window.matchesSelector
582    );
583  }
584
585}( window, function factory( window, matchesSelector ) {
586
587
588
589var utils = {};
590
591// ----- extend ----- //
592
593// extends objects
594utils.extend = function( a, b ) {
595  for ( var prop in b ) {
596    a[ prop ] = b[ prop ];
597  }
598  return a;
599};
600
601// ----- modulo ----- //
602
603utils.modulo = function( num, div ) {
604  return ( ( num % div ) + div ) % div;
605};
606
607// ----- makeArray ----- //
608
609var arraySlice = Array.prototype.slice;
610
611// turn element or nodeList into an array
612utils.makeArray = function( obj ) {
613  if ( Array.isArray( obj ) ) {
614    // use object if already an array
615    return obj;
616  }
617  // return empty array if undefined or null. #6
618  if ( obj === null || obj === undefined ) {
619    return [];
620  }
621
622  var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';
623  if ( isArrayLike ) {
624    // convert nodeList to array
625    return arraySlice.call( obj );
626  }
627
628  // array of single index
629  return [ obj ];
630};
631
632// ----- removeFrom ----- //
633
634utils.removeFrom = function( ary, obj ) {
635  var index = ary.indexOf( obj );
636  if ( index != -1 ) {
637    ary.splice( index, 1 );
638  }
639};
640
641// ----- getParent ----- //
642
643utils.getParent = function( elem, selector ) {
644  while ( elem.parentNode && elem != document.body ) {
645    elem = elem.parentNode;
646    if ( matchesSelector( elem, selector ) ) {
647      return elem;
648    }
649  }
650};
651
652// ----- getQueryElement ----- //
653
654// use element as selector string
655utils.getQueryElement = function( elem ) {
656  if ( typeof elem == 'string' ) {
657    return document.querySelector( elem );
658  }
659  return elem;
660};
661
662// ----- handleEvent ----- //
663
664// enable .ontype to trigger from .addEventListener( elem, 'type' )
665utils.handleEvent = function( event ) {
666  var method = 'on' + event.type;
667  if ( this[ method ] ) {
668    this[ method ]( event );
669  }
670};
671
672// ----- filterFindElements ----- //
673
674utils.filterFindElements = function( elems, selector ) {
675  // make array of elems
676  elems = utils.makeArray( elems );
677  var ffElems = [];
678
679  elems.forEach( function( elem ) {
680    // check that elem is an actual element
681    if ( !( elem instanceof HTMLElement ) ) {
682      return;
683    }
684    // add elem if no selector
685    if ( !selector ) {
686      ffElems.push( elem );
687      return;
688    }
689    // filter & find items if we have a selector
690    // filter
691    if ( matchesSelector( elem, selector ) ) {
692      ffElems.push( elem );
693    }
694    // find children
695    var childElems = elem.querySelectorAll( selector );
696    // concat childElems to filterFound array
697    for ( var i=0; i < childElems.length; i++ ) {
698      ffElems.push( childElems[i] );
699    }
700  });
701
702  return ffElems;
703};
704
705// ----- debounceMethod ----- //
706
707utils.debounceMethod = function( _class, methodName, threshold ) {
708  threshold = threshold || 100;
709  // original method
710  var method = _class.prototype[ methodName ];
711  var timeoutName = methodName + 'Timeout';
712
713  _class.prototype[ methodName ] = function() {
714    var timeout = this[ timeoutName ];
715    clearTimeout( timeout );
716
717    var args = arguments;
718    var _this = this;
719    this[ timeoutName ] = setTimeout( function() {
720      method.apply( _this, args );
721      delete _this[ timeoutName ];
722    }, threshold );
723  };
724};
725
726// ----- docReady ----- //
727
728utils.docReady = function( callback ) {
729  var readyState = document.readyState;
730  if ( readyState == 'complete' || readyState == 'interactive' ) {
731    // do async to allow for other scripts to run. metafizzy/flickity#441
732    setTimeout( callback );
733  } else {
734    document.addEventListener( 'DOMContentLoaded', callback );
735  }
736};
737
738// ----- htmlInit ----- //
739
740// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/
741utils.toDashed = function( str ) {
742  return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) {
743    return $1 + '-' + $2;
744  }).toLowerCase();
745};
746
747var console = window.console;
748/**
749 * allow user to initialize classes via [data-namespace] or .js-namespace class
750 * htmlInit( Widget, 'widgetName' )
751 * options are parsed from data-namespace-options
752 */
753utils.htmlInit = function( WidgetClass, namespace ) {
754  utils.docReady( function() {
755    var dashedNamespace = utils.toDashed( namespace );
756    var dataAttr = 'data-' + dashedNamespace;
757    var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' );
758    var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace );
759    var elems = utils.makeArray( dataAttrElems )
760      .concat( utils.makeArray( jsDashElems ) );
761    var dataOptionsAttr = dataAttr + '-options';
762    var jQuery = window.jQuery;
763
764    elems.forEach( function( elem ) {
765      var attr = elem.getAttribute( dataAttr ) ||
766        elem.getAttribute( dataOptionsAttr );
767      var options;
768      try {
769        options = attr && JSON.parse( attr );
770      } catch ( error ) {
771        // log error, do not initialize
772        if ( console ) {
773          console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className +
774          ': ' + error );
775        }
776        return;
777      }
778      // initialize
779      var instance = new WidgetClass( elem, options );
780      // make available via $().data('namespace')
781      if ( jQuery ) {
782        jQuery.data( elem, namespace, instance );
783      }
784    });
785
786  });
787};
788
789// -----  ----- //
790
791return utils;
792
793}));
794
795/
795/ Flickity.Cell
796( function( window, factory ) {
797  // universal module definition
798  if ( typeof define == 'function' && define.amd ) {
799    // AMD
800    define( 'flickity/js/cell',[
801      'get-size/get-size',
802    ], function( getSize ) {
803      return factory( window, getSize );
804    } );
805  } else if ( typeof module == 'object' && module.exports ) {
806    // CommonJS
807    module.exports = factory(
808        window,
809        require('get-size')
810    );
811  } else {
812    // browser global
813    window.Flickity = window.Flickity || {};
814    window.Flickity.Cell = factory(
815        window,
816        window.getSize
817    );
818  }
819
820}( window, function factory( window, getSize ) {
821
822
823
824function Cell( elem, parent ) {
825  this.element = elem;
826  this.parent = parent;
827
828  this.create();
829}
830
831var proto = Cell.prototype;
832
833proto.create = function() {
834  this.element.style.position = 'absolute';
835  this.element.setAttribute( 'aria-hidden', 'true' );
836  this.x = 0;
837  this.shift = 0;
838};
839
840proto.destroy = function() {
841  // reset style
842  this.unselect();
843  this.element.style.position = '';
844  var side = this.parent.originSide;
845  this.element.style[ side ] = '';
846  this.element.removeAttribute('aria-hidden');
847};
848
849proto.getSize = function() {
850  this.size = getSize( this.element );
851};
852
853proto.setPosition = function( x ) {
854  this.x = x;
855  this.updateTarget();
856  this.renderPosition( x );
857};
858
859// setDefaultTarget v1 method, backwards compatibility, remove in v3
860proto.updateTarget = proto.setDefaultTarget = function() {
861  var marginProperty = this.parent.originSide == 'left' ? 'marginLeft' : 'marginRight';
862  this.target = this.x + this.size[ marginProperty ] +
863    this.size.width * this.parent.cellAlign;
864};
865
866proto.renderPosition = function( x ) {
867  // render position of cell with in slider
868  var side = this.parent.originSide;
869  this.element.style[ side ] = this.parent.getPositionValue( x );
870};
871
872proto.select = function() {
873  this.element.classList.add('is-selected');
874  this.element.removeAttribute('aria-hidden');
875};
876
877proto.unselect = function() {
878  this.element.classList.remove('is-selected');
879  this.element.setAttribute( 'aria-hidden', 'true' );
880};
881
882/**
883 * @param {Integer} shift - 0, 1, or -1
884 */
885proto.wrapShift = function( shift ) {
886  this.shift = shift;
887  this.renderPosition( this.x + this.parent.slideableWidth * shift );
888};
889
890proto.remove = function() {
891  this.element.parentNode.removeChild( this.element );
892};
893
894return Cell;
895
896} ) );
897
898// slide
899( function( window, factory ) {
900  // universal module definition
901  if ( typeof define == 'function' && define.amd ) {
902    // AMD
903    define( 'flickity/js/slide',factory );
904  } else if ( typeof module == 'object' && module.exports ) {
905    // CommonJS
906    module.exports = factory();
907  } else {
908    // browser global
909    window.Flickity = window.Flickity || {};
910    window.Flickity.Slide = factory();
911  }
912
913}( window, function factory() {
914'use strict';
915
916function Slide( parent ) {
917  this.parent = parent;
918  this.isOriginLeft = parent.originSide == 'left';
919  this.cells = [];
920  this.outerWidth = 0;
921  this.height = 0;
922}
923
924var proto = Slide.prototype;
925
926proto.addCell = function( cell ) {
927  this.cells.push( cell );
928  this.outerWidth += cell.size.outerWidth;
929  this.height = Math.max( cell.size.outerHeight, this.height );
930  // first cell stuff
931  if ( this.cells.length == 1 ) {
932    this.x = cell.x; // x comes from first cell
933    var beginMargin = this.isOriginLeft ? 'marginLeft' : 'marginRight';
934    this.firstMargin = cell.size[ beginMargin ];
935  }
936};
937
938proto.updateTarget = function() {
939  var endMargin = this.isOriginLeft ? 'marginRight' : 'marginLeft';
940  var lastCell = this.getLastCell();
941  var lastMargin = lastCell ? lastCell.size[ endMargin ] : 0;
942  var slideWidth = this.outerWidth - ( this.firstMargin + lastMargin );
943  this.target = this.x + this.firstMargin + slideWidth * this.parent.cellAlign;
944};
945
946proto.getLastCell = function() {
947  return this.cells[ this.cells.length - 1 ];
948};
949
950proto.select = function() {
951  this.cells.forEach( function( cell ) {
952    cell.select();
953  } );
954};
955
956proto.unselect = function() {
957  this.cells.forEach( function( cell ) {
958    cell.unselect();
959  } );
960};
961
962proto.getCellElements = function() {
963  return this.cells.map( function( cell ) {
964    return cell.element;
965  } );
966};
967
968return Slide;
969
970} ) );
971
972// animate
973( function( window, factory ) {
974  // universal module definition
975  if ( typeof define == 'function' && define.amd ) {
976    // AMD
977    define( 'flickity/js/animate',[
978      'fizzy-ui-utils/utils',
979    ], function( utils ) {
980      return factory( window, utils );
981    } );
982  } else if ( typeof module == 'object' && module.exports ) {
983    // CommonJS
984    module.exports = factory(
985        window,
986        require('fizzy-ui-utils')
987    );
988  } else {
989    // browser global
990    window.Flickity = window.Flickity || {};
991    window.Flickity.animatePrototype = factory(
992        window,
993        window.fizzyUIUtils
994    );
995  }
996
997}( window, function factory( window, utils ) {
998
999
1000
1001// -------------------------- animate -------------------------- //
1002
1003var proto = {};
1004
1005proto.startAnimation = function() {
1006  if ( this.isAnimating ) {
1007    return;
1008  }
1009
1010  this.isAnimating = true;
1011  this.restingFrames = 0;
1012  this.animate();
1013};
1014
1015proto.animate = function() {
1016  this.applyDragForce();
1017  this.applySelectedAttraction();
1018
1019  var previousX = this.x;
1020
1021  this.integratePhysics();
1022  this.positionSlider();
1023  this.settle( previousX );
1024  // animate next frame
1025  if ( this.isAnimating ) {
1026    var _this = this;
1027    requestAnimationFrame( function animateFrame() {
1028      _this.animate();
1029    } );
1030  }
1031};
1032
1033proto.positionSlider = function() {
1034  var x = this.x;
1035  // wrap position around
1036  if ( this.options.wrapAround && this.cells.length > 1 ) {
1037    x = utils.modulo( x, this.slideableWidth );
1038    x -= this.slideableWidth;
1039    this.shiftWrapCells( x );
1040  }
1041
1042  this.setTranslateX( x, this.isAnimating );
1043  this.dispatchScrollEvent();
1044};
1045
1046proto.setTranslateX = function( x, is3d ) {
1047  x += this.cursorPosition;
1048  // reverse if right-to-left and using transform
1049  x = this.options.rightToLeft ? -x : x;
1050  var translateX = this.getPositionValue( x );
1051  // use 3D transforms for hardware acceleration on iOS
1052  // but use 2D when settled, for better font-rendering
1053  this.slider.style.transform = is3d ?
1054    'translate3d(' + translateX + ',0,0)' : 'translateX(' + translateX + ')';
1055};
1056
1057proto.dispatchScrollEvent = function() {
1058  var firstSlide = this.slides[0];
1059  if ( !firstSlide ) {
1060    return;
1061  }
1062  var positionX = -this.x - firstSlide.target;
1063  var progress = positionX / this.slidesWidth;
1064  this.dispatchEvent( 'scroll', null, [ progress, positionX ] );
1065};
1066
1067proto.positionSliderAtSelected = function() {
1068  if ( !this.cells.length ) {
1069    return;
1070  }
1071  this.x = -this.selectedSlide.target;
1072  this.velocity = 0; // stop wobble
1073  this.positionSlider();
1074};
1075
1076proto.getPositionValue = function( position ) {
1077  if ( this.options.percentPosition ) {
1078    // percent position, round to 2 digits, like 12.34%
1079    return ( Math.round( ( position / this.size.innerWidth ) * 10000 ) * 0.01 ) + '%';
1080  } else {
1081    // pixel positioning
1082    return Math.round( position ) + 'px';
1083  }
1084};
1085
1086proto.settle = function( previousX ) {
1087  // keep track of frames where x hasn't moved
1088  var isResting = !this.isPointerDown &&
1089      Math.round( this.x * 100 ) == Math.round( previousX * 100 );
1090  if ( isResting ) {
1091    this.restingFrames++;
1092  }
1093  // stop animating if resting for 3 or more frames
1094  if ( this.restingFrames > 2 ) {
1095    this.isAnimating = false;
1096    delete this.isFreeScrolling;
1097    // render position with translateX when settled
1098    this.positionSlider();
1099    this.dispatchEvent( 'settle', null, [ this.selectedIndex ] );
1100  }
1101};
1102
1103proto.shiftWrapCells = function( x ) {
1104  // shift before cells
1105  var beforeGap = this.cursorPosition + x;
1106  this._shiftCells( this.beforeShiftCells, beforeGap, -1 );
1107  // shift after cells
1108  var afterGap = this.size.innerWidth - ( x + this.slideableWidth + this.cursorPosition );
1109  this._shiftCells( this.afterShiftCells, afterGap, 1 );
1110};
1111
1112proto._shiftCells = function( cells, gap, shift ) {
1113  for ( var i = 0; i < cells.length; i++ ) {
1114    var cell = cells[i];
1115    var cellShift = gap > 0 ? shift : 0;
1116    cell.wrapShift( cellShift );
1117    gap -= cell.size.outerWidth;
1118  }
1119};
1120
1121proto._unshiftCells = function( cells ) {
1122  if ( !cells || !cells.length ) {
1123    return;
1124  }
1125  for ( var i = 0; i < cells.length; i++ ) {
1126    cells[i].wrapShift( 0 );
1127  }
1128};
1129
1130// -------------------------- physics -------------------------- //
1131
1132proto.integratePhysics = function() {
1133  this.x += this.velocity;
1134  this.velocity *= this.getFrictionFactor();
1135};
1136
1137proto.applyForce = function( force ) {
1138  this.velocity += force;
1139};
1140
1141proto.getFrictionFactor = function() {
1142  return 1 - this.options[ this.isFreeScrolling ? 'freeScrollFriction' : 'friction' ];
1143};
1144
1145proto.getRestingPosition = function() {
1146  // my thanks to Steven Wittens, who simplified this math greatly
1147  return this.x + this.velocity / ( 1 - this.getFrictionFactor() );
1148};
1149
1150proto.applyDragForce = function() {
1151  if ( !this.isDraggable || !this.isPointerDown ) {
1152    return;
1153  }
1154  // change the position to drag position by applying force
1155  var dragVelocity = this.dragX - this.x;
1156  var dragForce = dragVelocity - this.velocity;
1157  this.applyForce( dragForce );
1158};
1159
1160proto.applySelectedAttraction = function() {
1161  // do not attract if pointer down or no slides
1162  var dragDown = this.isDraggable && this.isPointerDown;
1163  if ( dragDown || this.isFreeScrolling || !this.slides.length ) {
1164    return;
1165  }
1166  var distance = this.selectedSlide.target * -1 - this.x;
1167  var force = distance * this.options.selectedAttraction;
1168  this.applyForce( force );
1169};
1170
1171return proto;
1172
1173} ) );
1174
1175// Flickity main
1176/* eslint-disable max-params */
1177( function( window, factory ) {
1178  // universal module definition
1179  if ( typeof define == 'function' && define.amd ) {
1180    // AMD
1181    define( 'flickity/js/flickity',[
1182      'ev-emitter/ev-emitter',
1183      'get-size/get-size',
1184      'fizzy-ui-utils/utils',
1185      './cell',
1186      './slide',
1187      './animate',
1188    ], function( EvEmitter, getSize, utils, Cell, Slide, animatePrototype ) {
1189      return factory( window, EvEmitter, getSize, utils, Cell, Slide, animatePrototype );
1190    } );
1191  } else if ( typeof module == 'object' && module.exports ) {
1192    // CommonJS
1193    module.exports = factory(
1194        window,
1195        require('ev-emitter'),
1196        require('get-size'),
1197        require('fizzy-ui-utils'),
1198        require('./cell'),
1199        require('./slide'),
1200        require('./animate')
1201    );
1202  } else {
1203    // browser global
1204    var _Flickity = window.Flickity;
1205
1206    window.Flickity = factory(
1207        window,
1208        window.EvEmitter,
1209        window.getSize,
1210        window.fizzyUIUtils,
1211        _Flickity.Cell,
1212        _Flickity.Slide,
1213        _Flickity.animatePrototype
1214    );
1215  }
1216
1217}( window, function factory( window, EvEmitter, getSize,
1218    utils, Cell, Slide, animatePrototype ) {
1219
1220/* eslint-enable max-params */
1221
1222
1223// vars
1224var jQuery = window.jQuery;
1225var getComputedStyle = window.getComputedStyle;
1226var console = window.console;
1227
1228function moveElements( elems, toElem ) {
1229  elems = utils.makeArray( elems );
1230  while ( elems.length ) {
1231    toElem.appendChild( elems.shift() );
1232  }
1233}
1234
1235// -------------------------- Flickity -------------------------- //
1236
1237// globally unique identifiers
1238var GUID = 0;
1239// internal store of all Flickity intances
1240var instances = {};
1241
1242function Flickity( element, options ) {
1243  var queryElement = utils.getQueryElement( element );
1244  if ( !queryElement ) {
1245    if ( console ) {
1246      console.error( 'Bad element for Flickity: ' + ( queryElement || element ) );
1247    }
1248    return;
1249  }
1250  this.element = queryElement;
1251  // do not initialize twice on same element
1252  if ( this.element.flickityGUID ) {
1253    var instance = instances[ this.element.flickityGUID ];
1254    if ( instance ) instance.option( options );
1255    return instance;
1256  }
1257
1258  // add jQuery
1259  if ( jQuery ) {
1260    this.$element = jQuery( this.element );
1261  }
1262  // options
1263  this.options = utils.extend( {}, this.constructor.defaults );
1264  this.option( options );
1265
1266  // kick things off
1267  this._create();
1268}
1269
1270Flickity.defaults = {
1271  accessibility: true,
1272  // adaptiveHeight: false,
1273  cellAlign: 'center',
1274  // cellSelector: undefined,
1275  // contain: false,
1276  freeScrollFriction: 0.075, // friction when free-scrolling
1277  friction: 0.28, // friction when selecting
1278  namespaceJQueryEvents: true,
1279  // initialIndex: 0,
1280  percentPosition: true,
1281  resize: true,
1282  selectedAttraction: 0.025,
1283  setGallerySize: true,
1284  // watchCSS: false,
1285  // wrapAround: false
1286};
1287
1288// hash of methods triggered on _create()
1289Flickity.createMethods = [];
1290
1291var proto = Flickity.prototype;
1292// inherit EventEmitter
1293utils.extend( proto, EvEmitter.prototype );
1294
1295proto._create = function() {
1296  // add id for Flickity.data
1297  var id = this.guid = ++GUID;
1298  this.element.flickityGUID = id; // expando
1299  instances[ id ] = this; // associate via id
1300  // initial properties
1301  this.selectedIndex = 0;
1302  // how many frames slider has been in same position
1303  this.restingFrames = 0;
1304  // initial physics properties
1305  this.x = 0;
1306  this.velocity = 0;
1307  this.originSide = this.options.rightToLeft ? 'right' : 'left';
1308  // create viewport & slider
1309  this.viewport = document.createElement('div');
1310  this.viewport.className = 'flickity-viewport';
1311  this._createSlider();
1312
1313  if ( this.options.resize || this.options.watchCSS ) {
1314    window.addEventListener( 'resize', this );
1315  }
1316
1317  // add listeners from on option
1318  for ( var eventName in this.options.on ) {
1319    var listener = this.options.on[ eventName ];
1320    this.on( eventName, listener );
1321  }
1322
1323  Flickity.createMethods.forEach( function( method ) {
1324    this[ method ]();
1325  }, this );
1326
1327  if ( this.options.watchCSS ) {
1328    this.watchCSS();
1329  } else {
1330    this.activate();
1331  }
1332
1333};
1334
1335/**
1336 * set options
1337 * @param {Object} opts - options to extend
1338 */
1339proto.option = function( opts ) {
1340  utils.extend( this.options, opts );
1341};
1342
1343proto.activate = function() {
1344  if ( this.isActive ) {
1345    return;
1346  }
1347  this.isActive = true;
1348  this.element.classList.add('flickity-enabled');
1349  if ( this.options.rightToLeft ) {
1350    this.element.classList.add('flickity-rtl');
1351  }
1352
1353  this.getSize();
1354  // move initial cell elements so they can be loaded as cells
1355  var cellElems = this._filterFindCellElements( this.element.children );
1356  moveElements( cellElems, this.slider );
1357  this.viewport.appendChild( this.slider );
1358  this.element.appendChild( this.viewport );
1359  // get cells from children
1360  this.reloadCells();
1361
1362  if ( this.options.accessibility ) {
1363    // allow element to focusable
1364    this.element.tabIndex = 0;
1365    // listen for key presses
1366    this.element.addEventListener( 'keydown', this );
1367  }
1368
1369  this.emitEvent('activate');
1370  this.selectInitialIndex();
1371  // flag for initial activation, for using initialIndex
1372  this.isInitActivated = true;
1373  // ready event. #493
1374  this.dispatchEvent('ready');
1375};
1376
1377// slider positions the cells
1378proto._createSlider = function() {
1379  // slider element does all the positioning
1380  var slider = document.createElement('div');
1381  slider.className = 'flickity-slider';
1382  slider.style[ this.originSide ] = 0;
1383  this.slider = slider;
1384};
1385
1386proto._filterFindCellElements = function( elems ) {
1387  return utils.filterFindElements( elems, this.options.cellSelector );
1388};
1389
1390// goes through all children
1391proto.reloadCells = function() {
1392  // collection of item elements
1393  this.cells = this._makeCells( this.slider.children );
1394  this.positionCells();
1395  this._getWrapShiftCells();
1396  this.setGallerySize();
1397};
1398
1399/**
1400 * turn elements into Flickity.Cells
1401 * @param {[Array, NodeList, HTMLElement]} elems - elements to make into cells
1402 * @returns {Array} items - collection of new Flickity Cells
1403 */
1404proto._makeCells = function( elems ) {
1405  var cellElems = this._filterFindCellElements( elems );
1406
1407  // create new Flickity for collection
1408  var cells = cellElems.map( function( cellElem ) {
1409    return new Cell( cellElem, this );
1410  }, this );
1411
1412  return cells;
1413};
1414
1415proto.getLastCell = function() {
1416  return this.cells[ this.cells.length - 1 ];
1417};
1418
1419proto.getLastSlide = function() {
1420  return this.slides[ this.slides.length - 1 ];
1421};
1422
1423// positions all cells
1424proto.positionCells = function() {
1425  // size all cells
1426  this._sizeCells( this.cells );
1427  // position all cells
1428  this._positionCells( 0 );
1429};
1430
1431/**
1432 * position certain cells
1433 * @param {Integer} index - which cell to start with
1434 */
1435proto._positionCells = function( index ) {
1436  index = index || 0;
1437  // also measure maxCellHeight
1438  // start 0 if positioning all cells
1439  this.maxCellHeight = index ? this.maxCellHeight || 0 : 0;
1440  var cellX = 0;
1441  // get cellX
1442  if ( index > 0 ) {
1443    var startCell = this.cells[ index - 1 ];
1444    cellX = startCell.x + startCell.size.outerWidth;
1445  }
1446  var len = this.cells.length;
1447  for ( var i = index; i < len; i++ ) {
1448    var cell = this.cells[i];
1449    cell.setPosition( cellX );
1450    cellX += cell.size.outerWidth;
1451    this.maxCellHeight = Math.max( cell.size.outerHeight, this.maxCellHeight );
1452  }
1453  // keep track of cellX for wrap-around
1454  this.slideableWidth = cellX;
1455  // slides
1456  this.updateSlides();
1457  // contain slides target
1458  this._containSlides();
1459  // update slidesWidth
1460  this.slidesWidth = len ? this.getLastSlide().target - this.slides[0].target : 0;
1461};
1462
1463/**
1464 * cell.getSize() on multiple cells
1465 * @param {Array} cells - cells to size
1466 */
1467proto._sizeCells = function( cells ) {
1468  cells.forEach( function( cell ) {
1469    cell.getSize();
1470  } );
1471};
1472
1473// --------------------------  -------------------------- //
1474
1475proto.updateSlides = function() {
1476  this.slides = [];
1477  if ( !this.cells.length ) {
1478    return;
1479  }
1480
1481  var slide = new Slide( this );
1482  this.slides.push( slide );
1483  var isOriginLeft = this.originSide == 'left';
1484  var nextMargin = isOriginLeft ? 'marginRight' : 'marginLeft';
1485
1486  var canCellFit = this._getCanCellFit();
1487
1488  this.cells.forEach( function( cell, i ) {
1489    // just add cell if first cell in slide
1490    if ( !slide.cells.length ) {
1491      slide.addCell( cell );
1492      return;
1493    }
1494
1495    var slideWidth = ( slide.outerWidth - slide.firstMargin ) +
1496      ( cell.size.outerWidth - cell.size[ nextMargin ] );
1497
1498    if ( canCellFit.call( this, i, slideWidth ) ) {
1499      slide.addCell( cell );
1500    } else {
1501      // doesn't fit, new slide
1502      slide.updateTarget();
1503
1504      slide = new Slide( this );
1505      this.slides.push( slide );
1506      slide.addCell( cell );
1507    }
1508  }, this );
1509  // last slide
1510  slide.updateTarget();
1511  // update .selectedSlide
1512  this.updateSelectedSlide();
1513};
1514
1515proto._getCanCellFit = function() {
1516  var groupCells = this.options.groupCells;
1517  if ( !groupCells ) {
1518    return function() {
1519      return false;
1520    };
1521  } else if ( typeof groupCells == 'number' ) {
1522    // group by number. 3 -> [0,1,2], [3,4,5], ...
1523    var number = parseInt( groupCells, 10 );
1524    return function( i ) {
1525      return ( i % number ) !== 0;
1526    };
1527  }
1528  // default, group by width of slide
1529  // parse '75%
1530  var percentMatch = typeof groupCells == 'string' &&
1531    groupCells.match( /^(\d+)%$/ );
1532  var percent = percentMatch ? parseInt( percentMatch[1], 10 ) / 100 : 1;
1533  return function( i, slideWidth ) {
1534    /* eslint-disable-next-line no-invalid-this */
1535    return slideWidth <= ( this.size.innerWidth + 1 ) * percent;
1536  };
1537};
1538
1539// alias _init for jQuery plugin .flickity()
1540proto._init =
1541proto.reposition = function() {
1542  this.positionCells();
1543  this.positionSliderAtSelected();
1544};
1545
1546proto.getSize = function() {
1547  this.size = getSize( this.element );
1548  this.setCellAlign();
1549  this.cursorPosition = this.size.innerWidth * this.cellAlign;
1550};
1551
1552var cellAlignShorthands = {
1553  // cell align, then based on origin side
1554  center: {
1555    left: 0.5,
1556    right: 0.5,
1557  },
1558  left: {
1559    left: 0,
1560    right: 1,
1561  },
1562  right: {
1563    right: 0,
1564    left: 1,
1565  },
1566};
1567
1568proto.setCellAlign = function() {
1569  var shorthand = cellAlignShorthands[ this.options.cellAlign ];
1570  this.cellAlign = shorthand ? shorthand[ this.originSide ] : this.options.cellAlign;
1571};
1572
1573proto.setGallerySize = function() {
1574  if ( this.options.setGallerySize ) {
1575    var height = this.options.adaptiveHeight && this.selectedSlide ?
1576      this.selectedSlide.height : this.maxCellHeight;
1577    this.viewport.style.height = height + 'px';
1578  }
1579};
1580
1581proto._getWrapShiftCells = function() {
1582  // only for wrap-around
1583  if ( !this.options.wrapAround ) {
1584    return;
1585  }
1586  // unshift previous cells
1587  this._unshiftCells( this.beforeShiftCells );
1588  this._unshiftCells( this.afterShiftCells );
1589  // get before cells
1590  // initial gap
1591  var gapX = this.cursorPosition;
1592  var cellIndex = this.cells.length - 1;
1593  this.beforeShiftCells = this._getGapCells( gapX, cellIndex, -1 );
1594  // get after cells
1595  // ending gap between last cell and end of gallery viewport
1596  gapX = this.size.innerWidth - this.cursorPosition;
1597  // start cloning at first cell, working forwards
1598  this.afterShiftCells = this._getGapCells( gapX, 0, 1 );
1599};
1600
1601proto._getGapCells = function( gapX, cellIndex, increment ) {
1602  // keep adding cells until the cover the initial gap
1603  var cells = [];
1604  while ( gapX > 0 ) {
1605    var cell = this.cells[ cellIndex ];
1606    if ( !cell ) {
1607      break;
1608    }
1609    cells.push( cell );
1610    cellIndex += increment;
1611    gapX -= cell.size.outerWidth;
1612  }
1613  return cells;
1614};
1615
1616// ----- contain ----- //
1617
1618// contain cell targets so no excess sliding
1619proto._containSlides = function() {
1620  if ( !this.options.contain || this.options.wrapAround || !this.cells.length ) {
1621    return;
1622  }
1623  var isRightToLeft = this.options.rightToLeft;
1624  var beginMargin = isRightToLeft ? 'marginRight' : 'marginLeft';
1625  var endMargin = isRightToLeft ? 'marginLeft' : 'marginRight';
1626  var contentWidth = this.slideableWidth - this.getLastCell().size[ endMargin ];
1627  // content is less than gallery size
1628  var isContentSmaller = contentWidth < this.size.innerWidth;
1629  // bounds
1630  var beginBound = this.cursorPosition + this.cells[0].size[ beginMargin ];
1631  var endBound = contentWidth - this.size.innerWidth * ( 1 - this.cellAlign );
1632  // contain each cell target
1633  this.slides.forEach( function( slide ) {
1634    if ( isContentSmaller ) {
1635      // all cells fit inside gallery
1636      slide.target = contentWidth * this.cellAlign;
1637    } else {
1638      // contain to bounds
1639      slide.target = Math.max( slide.target, beginBound );
1640      slide.target = Math.min( slide.target, endBound );
1641    }
1642  }, this );
1643};
1644
1645// -----  ----- //
1646
1647/**
1648 * emits events via eventEmitter and jQuery events
1649 * @param {String} type - name of event
1650 * @param {Event} event - original event
1651 * @param {Array} args - extra arguments
1652 */
1653proto.dispatchEvent = function( type, event, args ) {
1654  var emitArgs = event ? [ event ].concat( args ) : args;
1655  this.emitEvent( type, emitArgs );
1656
1657  if ( jQuery && this.$element ) {
1658    // default trigger with type if no event
1659    type += this.options.namespaceJQueryEvents ? '.flickity' : '';
1660    var $event = type;
1661    if ( event ) {
1662      // create jQuery event
1663      var jQEvent = new jQuery.Event( event );
1664      jQEvent.type = type;
1665      $event = jQEvent;
1666    }
1667    this.$element.trigger( $event, args );
1668  }
1669};
1670
1671// -------------------------- select -------------------------- //
1672
1673/**
1674 * @param {Integer} index - index of the slide
1675 * @param {Boolean} isWrap - will wrap-around to last/first if at the end
1676 * @param {Boolean} isInstant - will immediately set position at selected cell
1677 */
1678proto.select = function( index, isWrap, isInstant ) {
1679  if ( !this.isActive ) {
1680    return;
1681  }
1682  index = parseInt( index, 10 );
1683  this._wrapSelect( index );
1684
1685  if ( this.options.wrapAround || isWrap ) {
1686    index = utils.modulo( index, this.slides.length );
1687  }
1688  // bail if invalid index
1689  if ( !this.slides[ index ] ) {
1690    return;
1691  }
1692  var prevIndex = this.selectedIndex;
1693  this.selectedIndex = index;
1694  this.updateSelectedSlide();
1695  if ( isInstant ) {
1696    this.positionSliderAtSelected();
1697  } else {
1698    this.startAnimation();
1699  }
1700  if ( this.options.adaptiveHeight ) {
1701    this.setGallerySize();
1702  }
1703  // events
1704  this.dispatchEvent( 'select', null, [ index ] );
1705  // change event if new index
1706  if ( index != prevIndex ) {
1707    this.dispatchEvent( 'change', null, [ index ] );
1708  }
1709  // old v1 event name, remove in v3
1710  this.dispatchEvent('cellSelect');
1711};
1712
1713// wraps position for wrapAround, to move to closest slide. #113
1714proto._wrapSelect = function( index ) {
1715  var len = this.slides.length;
1716  var isWrapping = this.options.wrapAround && len > 1;
1717  if ( !isWrapping ) {
1718    return index;
1719  }
1720  var wrapIndex = utils.modulo( index, len );
1721  // go to shortest
1722  var delta = Math.abs( wrapIndex - this.selectedIndex );
1723  var backWrapDelta = Math.abs( ( wrapIndex + len ) - this.selectedIndex );
1724  var forewardWrapDelta = Math.abs( ( wrapIndex - len ) - this.selectedIndex );
1725  if ( !this.isDragSelect && backWrapDelta < delta ) {
1726    index += len;
1727  } else if ( !this.isDragSelect && forewardWrapDelta < delta ) {
1728    index -= len;
1729  }
1730  // wrap position so slider is within normal area
1731  if ( index < 0 ) {
1732    this.x -= this.slideableWidth;
1733  } else if ( index >= len ) {
1734    this.x += this.slideableWidth;
1735  }
1736};
1737
1738proto.previous = function( isWrap, isInstant ) {
1739  this.select( this.selectedIndex - 1, isWrap, isInstant );
1740};
1741
1742proto.next = function( isWrap, isInstant ) {
1743  this.select( this.selectedIndex + 1, isWrap, isInstant );
1744};
1745
1746proto.updateSelectedSlide = function() {
1747  var slide = this.slides[ this.selectedIndex ];
1748  // selectedIndex could be outside of slides, if triggered before resize()
1749  if ( !slide ) {
1750    return;
1751  }
1752  // unselect previous selected slide
1753  this.unselectSelectedSlide();
1754  // update new selected slide
1755  this.selectedSlide = slide;
1756  slide.select();
1757  this.selectedCells = slide.cells;
1758  this.selectedElements = slide.getCellElements();
1759  // HACK: selectedCell & selectedElement is first cell in slide, backwards compatibility
1760  // Remove in v3?
1761  this.selectedCell = slide.cells[0];
1762  this.selectedElement = this.selectedElements[0];
1763};
1764
1765proto.unselectSelectedSlide = function() {
1766  if ( this.selectedSlide ) {
1767    this.selectedSlide.unselect();
1768  }
1769};
1770
1771proto.selectInitialIndex = function() {
1772  var initialIndex = this.options.initialIndex;
1773  // already activated, select previous selectedIndex
1774  if ( this.isInitActivated ) {
1775    this.select( this.selectedIndex, false, true );
1776    return;
1777  }
1778  // select with selector string
1779  if ( initialIndex && typeof initialIndex == 'string' ) {
1780    var cell = this.queryCell( initialIndex );
1781    if ( cell ) {
1782      this.selectCell( initialIndex, false, true );
1783      return;
1784    }
1785  }
1786
1787  var index = 0;
1788  // select with number
1789  if ( initialIndex && this.slides[ initialIndex ] ) {
1790    index = initialIndex;
1791  }
1792  // select instantly
1793  this.select( index, false, true );
1794};
1795
1796/**
1797 * select slide from number or cell element
1798 * @param {[Element, Number]} value - zero-based index or element to select
1799 * @param {Boolean} isWrap - enables wrapping around for extra index
1800 * @param {Boolean} isInstant - disables slide animation
1801 */
1802proto.selectCell = function( value, isWrap, isInstant ) {
1803  // get cell
1804  var cell = this.queryCell( value );
1805  if ( !cell ) {
1806    return;
1807  }
1808
1809  var index = this.getCellSlideIndex( cell );
1810  this.select( index, isWrap, isInstant );
1811};
1812
1813proto.getCellSlideIndex = function( cell ) {
1814  // get index of slides that has cell
1815  for ( var i = 0; i < this.slides.length; i++ ) {
1816    var slide = this.slides[i];
1817    var index = slide.cells.indexOf( cell );
1818    if ( index != -1 ) {
1819      return i;
1820    }
1821  }
1822};
1823
1824// -------------------------- get cells -------------------------- //
1825
1826/**
1827 * get Flickity.Cell, given an Element
1828 * @param {Element} elem - matching cell element
1829 * @returns {Flickity.Cell} cell - matching cell
1830 */
1831proto.getCell = function( elem ) {
1832  // loop through cells to get the one that matches
1833  for ( var i = 0; i < this.cells.length; i++ ) {
1834    var cell = this.cells[i];
1835    if ( cell.element == elem ) {
1836      return cell;
1837    }
1838  }
1839};
1840
1841/**
1842 * get collection of Flickity.Cells, given Elements
1843 * @param {[Element, Array, NodeList]} elems - multiple elements
1844 * @returns {Array} cells - Flickity.Cells
1845 */
1846proto.getCells = function( elems ) {
1847  elems = utils.makeArray( elems );
1848  var cells = [];
vendor: 5,319 bytes, lines 1849-2048
1849  elems.forEach( function( elem ) {
1850    var cell = this.getCell( elem );
1851    if ( cell ) {
1852      cells.push( cell );
1853    }
1854  }, this );
1855  return cells;
1856};
1857
1858/**
1859 * get cell elements
1860 * @returns {Array} cellElems
1861 */
1862proto.getCellElements = function() {
1863  return this.cells.map( function( cell ) {
1864    return cell.element;
1865  } );
1866};
1867
1868/**
1869 * get parent cell from an element
1870 * @param {Element} elem - child element
1871 * @returns {Flickit.Cell} cell - parent cell
1872 */
1873proto.getParentCell = function( elem ) {
1874  // first check if elem is cell
1875  var cell = this.getCell( elem );
1876  if ( cell ) {
1877    return cell;
1878  }
1879  // try to get parent cell elem
1880  elem = utils.getParent( elem, '.flickity-slider > *' );
1881  return this.getCell( elem );
1882};
1883
1884/**
1885 * get cells adjacent to a slide
1886 * @param {Integer} adjCount - number of adjacent slides
1887 * @param {Integer} index - index of slide to start
1888 * @returns {Array} cells - array of Flickity.Cells
1889 */
1890proto.getAdjacentCellElements = function( adjCount, index ) {
1891  if ( !adjCount ) {
1892    return this.selectedSlide.getCellElements();
1893  }
1894  index = index === undefined ? this.selectedIndex : index;
1895
1896  var len = this.slides.length;
1897  if ( 1 + ( adjCount * 2 ) >= len ) {
1898    return this.getCellElements();
1899  }
1900
1901  var cellElems = [];
1902  for ( var i = index - adjCount; i <= index + adjCount; i++ ) {
1903    var slideIndex = this.options.wrapAround ? utils.modulo( i, len ) : i;
1904    var slide = this.slides[ slideIndex ];
1905    if ( slide ) {
1906      cellElems = cellElems.concat( slide.getCellElements() );
1907    }
1908  }
1909  return cellElems;
1910};
1911
1912/**
1913 * select slide from number or cell element
1914 * @param {[Element, String, Number]} selector - element, selector string, or index
1915 * @returns {Flickity.Cell} - matching cell
1916 */
1917proto.queryCell = function( selector ) {
1918  if ( typeof selector == 'number' ) {
1919    // use number as index
1920    return this.cells[ selector ];
1921  }
1922  if ( typeof selector == 'string' ) {
1923    // do not select invalid selectors from hash: #123, #/. #791
1924    if ( selector.match( /^[#.]?[\d/]/ ) ) {
1925      return;
1926    }
1927    // use string as selector, get element
1928    selector = this.element.querySelector( selector );
1929  }
1930  // get cell from element
1931  return this.getCell( selector );
1932};
1933
1934// -------------------------- events -------------------------- //
1935
1936proto.uiChange = function() {
1937  this.emitEvent('uiChange');
1938};
1939
1940// keep focus on element when child UI elements are clicked
1941proto.childUIPointerDown = function( event ) {
1942  // HACK iOS does not allow touch events to bubble up?!
1943  if ( event.type != 'touchstart' ) {
1944    event.preventDefault();
1945  }
1946  this.focus();
1947};
1948
1949// ----- resize ----- //
1950
1951proto.onresize = function() {
1952  this.watchCSS();
1953  this.resize();
1954};
1955
1956utils.debounceMethod( Flickity, 'onresize', 150 );
1957
1958proto.resize = function() {
1959  if ( !this.isActive ) {
1960    return;
1961  }
1962  this.getSize();
1963  // wrap values
1964  if ( this.options.wrapAround ) {
1965    this.x = utils.modulo( this.x, this.slideableWidth );
1966  }
1967  this.positionCells();
1968  this._getWrapShiftCells();
1969  this.setGallerySize();
1970  this.emitEvent('resize');
1971  // update selected index for group slides, instant
1972  // TODO: position can be lost between groups of various numbers
1973  var selectedElement = this.selectedElements && this.selectedElements[0];
1974  this.selectCell( selectedElement, false, true );
1975};
1976
1977// watches the :after property, activates/deactivates
1978proto.watchCSS = function() {
1979  var watchOption = this.options.watchCSS;
1980  if ( !watchOption ) {
1981    return;
1982  }
1983
1984  var afterContent = getComputedStyle( this.element, ':after' ).content;
1985  // activate if :after { content: 'flickity' }
1986  if ( afterContent.indexOf('flickity') != -1 ) {
1987    this.activate();
1988  } else {
1989    this.deactivate();
1990  }
1991};
1992
1993// ----- keydown ----- //
1994
1995// go previous/next if left/right keys pressed
1996proto.onkeydown = function( event ) {
1997  // only work if element is in focus
1998  var isNotFocused = document.activeElement && document.activeElement != this.element;
1999  if ( !this.options.accessibility || isNotFocused ) {
2000    return;
2001  }
2002
2003  var handler = Flickity.keyboardHandlers[ event.keyCode ];
2004  if ( handler ) {
2005    handler.call( this );
2006  }
2007};
2008
2009Flickity.keyboardHandlers = {
2010  // left arrow
2011  37: function() {
2012    var leftMethod = this.options.rightToLeft ? 'next' : 'previous';
2013    this.uiChange();
2014    this[ leftMethod ]();
2015  },
2016  // right arrow
2017  39: function() {
2018    var rightMethod = this.options.rightToLeft ? 'previous' : 'next';
2019    this.uiChange();
2020    this[ rightMethod ]();
2021  },
2022};
2023
2024// ----- focus ----- //
2025
2026proto.focus = function() {
2027  // TODO remove scrollTo once focus options gets more support
2028  // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus ...
2029  //    #Browser_compatibility
2030  var prevScrollY = window.pageYOffset;
2031  this.element.focus({ preventScroll: true });
2032  // hack to fix scroll jump after focus, #76
2033  if ( window.pageYOffset != prevScrollY ) {
2034    window.scrollTo( window.pageXOffset, prevScrollY );
2035  }
2036};
2037
2038// -------------------------- destroy -------------------------- //
2039
2040// deactivate all Flickity functionality, but keep stuff available
2041proto.deactivate = function() {
2042  if ( !this.isActive ) {
2043    return;
2044  }
2045  this.element.classList.remove('flickity-enabled');
2046  this.element.classList.remove('flickity-rtl');
2047  this.unselectSelectedSlide();
2048  // destroy cells
vendor: 10,349 bytes, lines 2049-2487
2049  this.cells.forEach( function( cell ) {
2050    cell.destroy();
2051  } );
2052  this.element.removeChild( this.viewport );
2053  // move child elements back into element
2054  moveElements( this.slider.children, this.element );
2055  if ( this.options.accessibility ) {
2056    this.element.removeAttribute('tabIndex');
2057    this.element.removeEventListener( 'keydown', this );
2058  }
2059  // set flags
2060  this.isActive = false;
2061  this.emitEvent('deactivate');
2062};
2063
2064proto.destroy = function() {
2065  this.deactivate();
2066  window.removeEventListener( 'resize', this );
2067  this.allOff();
2068  this.emitEvent('destroy');
2069  if ( jQuery && this.$element ) {
2070    jQuery.removeData( this.element, 'flickity' );
2071  }
2072  delete this.element.flickityGUID;
2073  delete instances[ this.guid ];
2074};
2075
2076// -------------------------- prototype -------------------------- //
2077
2078utils.extend( proto, animatePrototype );
2079
2080// -------------------------- extras -------------------------- //
2081
2082/**
2083 * get Flickity instance from element
2084 * @param {[Element, String]} elem - element or selector string
2085 * @returns {Flickity} - Flickity instance
2086 */
2087Flickity.data = function( elem ) {
2088  elem = utils.getQueryElement( elem );
2089  var id = elem && elem.flickityGUID;
2090  return id && instances[ id ];
2091};
2092
2093utils.htmlInit( Flickity, 'flickity' );
2094
2095if ( jQuery && jQuery.bridget ) {
2096  jQuery.bridget( 'flickity', Flickity );
2097}
2098
2099// set internal jQuery, for Webpack + jQuery v3, #478
2100Flickity.setJQuery = function( jq ) {
2101  jQuery = jq;
2102};
2103
2104Flickity.Cell = Cell;
2105Flickity.Slide = Slide;
2106
2107return Flickity;
2108
2109} ) );
2110
2111/*!
2112 * Unipointer v2.3.0
2113 * base class for doing one thing with pointer event
2114 * MIT license
2115 */
2116
2117/*jshint browser: true, undef: true, unused: true, strict: true */
2118
2119( function( window, factory ) {
2120  // universal module definition
2121  /* jshint strict: false */ /*global define, module, require */
2122  if ( typeof define == 'function' && define.amd ) {
2123    // AMD
2124    define( 'unipointer/unipointer',[
2125      'ev-emitter/ev-emitter'
2126    ], function( EvEmitter ) {
2127      return factory( window, EvEmitter );
2128    });
2129  } else if ( typeof module == 'object' && module.exports ) {
2130    // CommonJS
2131    module.exports = factory(
2132      window,
2133      require('ev-emitter')
2134    );
2135  } else {
2136    // browser global
2137    window.Unipointer = factory(
2138      window,
2139      window.EvEmitter
2140    );
2141  }
2142
2143}( window, function factory( window, EvEmitter ) {
2144
2145
2146
2147function noop() {}
2148
2149function Unipointer() {}
2150
2151// inherit EvEmitter
2152var proto = Unipointer.prototype = Object.create( EvEmitter.prototype );
2153
2154proto.bindStartEvent = function( elem ) {
2155  this._bindStartEvent( elem, true );
2156};
2157
2158proto.unbindStartEvent = function( elem ) {
2159  this._bindStartEvent( elem, false );
2160};
2161
2162/**
2163 * Add or remove start event
2164 * @param {Boolean} isAdd - remove if falsey
2165 */
2166proto._bindStartEvent = function( elem, isAdd ) {
2167  // munge isAdd, default to true
2168  isAdd = isAdd === undefined ? true : isAdd;
2169  var bindMethod = isAdd ? 'addEventListener' : 'removeEventListener';
2170
2171  // default to mouse events
2172  var startEvent = 'mousedown';
2173  if ( window.PointerEvent ) {
2174    // Pointer Events
2175    startEvent = 'pointerdown';
2176  } else if ( 'ontouchstart' in window ) {
2177    // Touch Events. iOS Safari
2178    startEvent = 'touchstart';
2179  }
2180  elem[ bindMethod ]( startEvent, this );
2181};
2182
2183// trigger handler methods for events
2184proto.handleEvent = function( event ) {
2185  var method = 'on' + event.type;
2186  if ( this[ method ] ) {
2187    this[ method ]( event );
2188  }
2189};
2190
2191// returns the touch that we're keeping track of
2192proto.getTouch = function( touches ) {
2193  for ( var i=0; i < touches.length; i++ ) {
2194    var touch = touches[i];
2195    if ( touch.identifier == this.pointerIdentifier ) {
2196      return touch;
2197    }
2198  }
2199};
2200
2201// ----- start event ----- //
2202
2203proto.onmousedown = function( event ) {
2204  // dismiss clicks from right or middle buttons
2205  var button = event.button;
2206  if ( button && ( button !== 0 && button !== 1 ) ) {
2207    return;
2208  }
2209  this._pointerDown( event, event );
2210};
2211
2212proto.ontouchstart = function( event ) {
2213  this._pointerDown( event, event.changedTouches[0] );
2214};
2215
2216proto.onpointerdown = function( event ) {
2217  this._pointerDown( event, event );
2218};
2219
2220/**
2221 * pointer start
2222 * @param {Event} event
2223 * @param {Event or Touch} pointer
2224 */
2225proto._pointerDown = function( event, pointer ) {
2226  // dismiss right click and other pointers
2227  // button = 0 is okay, 1-4 not
2228  if ( event.button || this.isPointerDown ) {
2229    return;
2230  }
2231
2232  this.isPointerDown = true;
2233  // save pointer identifier to match up touch events
2234  this.pointerIdentifier = pointer.pointerId !== undefined ?
2235    // pointerId for pointer events, touch.indentifier for touch events
2236    pointer.pointerId : pointer.identifier;
2237
2238  this.pointerDown( event, pointer );
2239};
2240
2241proto.pointerDown = function( event, pointer ) {
2242  this._bindPostStartEvents( event );
2243  this.emitEvent( 'pointerDown', [ event, pointer ] );
2244};
2245
2246// hash of events to be bound after start event
2247var postStartEvents = {
2248  mousedown: [ 'mousemove', 'mouseup' ],
2249  touchstart: [ 'touchmove', 'touchend', 'touchcancel' ],
2250  pointerdown: [ 'pointermove', 'pointerup', 'pointercancel' ],
2251};
2252
2253proto._bindPostStartEvents = function( event ) {
2254  if ( !event ) {
2255    return;
2256  }
2257  // get proper events to match start event
2258  var events = postStartEvents[ event.type ];
2259  // bind events to node
2260  events.forEach( function( eventName ) {
2261    window.addEventListener( eventName, this );
2262  }, this );
2263  // save these arguments
2264  this._boundPointerEvents = events;
2265};
2266
2267proto._unbindPostStartEvents = function() {
2268  // check for _boundEvents, in case dragEnd triggered twice (old IE8 bug)
2269  if ( !this._boundPointerEvents ) {
2270    return;
2271  }
2272  this._boundPointerEvents.forEach( function( eventName ) {
2273    window.removeEventListener( eventName, this );
2274  }, this );
2275
2276  delete this._boundPointerEvents;
2277};
2278
2279// ----- move event ----- //
2280
2281proto.onmousemove = function( event ) {
2282  this._pointerMove( event, event );
2283};
2284
2285proto.onpointermove = function( event ) {
2286  if ( event.pointerId == this.pointerIdentifier ) {
2287    this._pointerMove( event, event );
2288  }
2289};
2290
2291proto.ontouchmove = function( event ) {
2292  var touch = this.getTouch( event.changedTouches );
2293  if ( touch ) {
2294    this._pointerMove( event, touch );
2295  }
2296};
2297
2298/**
2299 * pointer move
2300 * @param {Event} event
2301 * @param {Event or Touch} pointer
2302 * @private
2303 */
2304proto._pointerMove = function( event, pointer ) {
2305  this.pointerMove( event, pointer );
2306};
2307
2308// public
2309proto.pointerMove = function( event, pointer ) {
2310  this.emitEvent( 'pointerMove', [ event, pointer ] );
2311};
2312
2313// ----- end event ----- //
2314
2315
2316proto.onmouseup = function( event ) {
2317  this._pointerUp( event, event );
2318};
2319
2320proto.onpointerup = function( event ) {
2321  if ( event.pointerId == this.pointerIdentifier ) {
2322    this._pointerUp( event, event );
2323  }
2324};
2325
2326proto.ontouchend = function( event ) {
2327  var touch = this.getTouch( event.changedTouches );
2328  if ( touch ) {
2329    this._pointerUp( event, touch );
2330  }
2331};
2332
2333/**
2334 * pointer up
2335 * @param {Event} event
2336 * @param {Event or Touch} pointer
2337 * @private
2338 */
2339proto._pointerUp = function( event, pointer ) {
2340  this._pointerDone();
2341  this.pointerUp( event, pointer );
2342};
2343
2344// public
2345proto.pointerUp = function( event, pointer ) {
2346  this.emitEvent( 'pointerUp', [ event, pointer ] );
2347};
2348
2349// ----- pointer done ----- //
2350
2351// triggered on pointer up & pointer cancel
2352proto._pointerDone = function() {
2353  this._pointerReset();
2354  this._unbindPostStartEvents();
2355  this.pointerDone();
2356};
2357
2358proto._pointerReset = function() {
2359  // reset properties
2360  this.isPointerDown = false;
2361  delete this.pointerIdentifier;
2362};
2363
2364proto.pointerDone = noop;
2365
2366// ----- pointer cancel ----- //
2367
2368proto.onpointercancel = function( event ) {
2369  if ( event.pointerId == this.pointerIdentifier ) {
2370    this._pointerCancel( event, event );
2371  }
2372};
2373
2374proto.ontouchcancel = function( event ) {
2375  var touch = this.getTouch( event.changedTouches );
2376  if ( touch ) {
2377    this._pointerCancel( event, touch );
2378  }
2379};
2380
2381/**
2382 * pointer cancel
2383 * @param {Event} event
2384 * @param {Event or Touch} pointer
2385 * @private
2386 */
2387proto._pointerCancel = function( event, pointer ) {
2388  this._pointerDone();
2389  this.pointerCancel( event, pointer );
2390};
2391
2392// public
2393proto.pointerCancel = function( event, pointer ) {
2394  this.emitEvent( 'pointerCancel', [ event, pointer ] );
2395};
2396
2397// -----  ----- //
2398
2399// utility function for getting x/y coords from event
2400Unipointer.getPointerPoint = function( pointer ) {
2401  return {
2402    x: pointer.pageX,
2403    y: pointer.pageY
2404  };
2405};
2406
2407// -----  ----- //
2408
2409return Unipointer;
2410
2411}));
2412
2413/*!
2414 * Unidragger v2.3.1
2415 * Draggable base class
2416 * MIT license
2417 */
2418
2419/*jshint browser: true, unused: true, undef: true, strict: true */
2420
2421( function( window, factory ) {
2422  // universal module definition
2423  /*jshint strict: false */ /*globals define, module, require */
2424
2425  if ( typeof define == 'function' && define.amd ) {
2426    // AMD
2427    define( 'unidragger/unidragger',[
2428      'unipointer/unipointer'
2429    ], function( Unipointer ) {
2430      return factory( window, Unipointer );
2431    });
2432  } else if ( typeof module == 'object' && module.exports ) {
2433    // CommonJS
2434    module.exports = factory(
2435      window,
2436      require('unipointer')
2437    );
2438  } else {
2439    // browser global
2440    window.Unidragger = factory(
2441      window,
2442      window.Unipointer
2443    );
2444  }
2445
2446}( window, function factory( window, Unipointer ) {
2447
2448
2449
2450// -------------------------- Unidragger -------------------------- //
2451
2452function Unidragger() {}
2453
2454// inherit Unipointer & EvEmitter
2455var proto = Unidragger.prototype = Object.create( Unipointer.prototype );
2456
2457// ----- bind start ----- //
2458
2459proto.bindHandles = function() {
2460  this._bindHandles( true );
2461};
2462
2463proto.unbindHandles = function() {
2464  this._bindHandles( false );
2465};
2466
2467/**
2468 * Add or remove start event
2469 * @param {Boolean} isAdd
2470 */
2471proto._bindHandles = function( isAdd ) {
2472  // munge isAdd, default to true
2473  isAdd = isAdd === undefined ? true : isAdd;
2474  // bind each handle
2475  var bindMethod = isAdd ? 'addEventListener' : 'removeEventListener';
2476  var touchAction = isAdd ? this._touchActionValue : '';
2477  for ( var i=0; i < this.handles.length; i++ ) {
2478    var handle = this.handles[i];
2479    this._bindStartEvent( handle, isAdd );
2480    handle[ bindMethod ]( 'click', this );
2481    // touch-action: none to override browser touch gestures. metafizzy/flickity#540
2482    if ( window.PointerEvent ) {
2483      handle.style.touchAction = touchAction;
2484    }
2485  }
2486};
2487
vendor: 3,209 bytes, lines 2488-2613
2488// prototype so it can be overwriteable by Flickity
2489proto._touchActionValue = 'none';
2490
2491// ----- start event ----- //
2492
2493/**
2494 * pointer start
2495 * @param {Event} event
2496 * @param {Event or Touch} pointer
2497 */
2498proto.pointerDown = function( event, pointer ) {
2499  var isOkay = this.okayPointerDown( event );
2500  if ( !isOkay ) {
2501    return;
2502  }
2503  // track start event position
2504  // Safari 9 overrides pageX and pageY. These values needs to be copied. flickity#842
2505  this.pointerDownPointer = {
2506    pageX: pointer.pageX,
2507    pageY: pointer.pageY,
2508  };
2509
2510  event.preventDefault();
2511  this.pointerDownBlur();
2512  // bind move and end events
2513  this._bindPostStartEvents( event );
2514  this.emitEvent( 'pointerDown', [ event, pointer ] );
2515};
2516
2517// nodes that have text fields
2518var cursorNodes = {
2519  TEXTAREA: true,
2520  INPUT: true,
2521  SELECT: true,
2522  OPTION: true,
2523};
2524
2525// input types that do not have text fields
2526var clickTypes = {
2527  radio: true,
2528  checkbox: true,
2529  button: true,
2530  submit: true,
2531  image: true,
2532  file: true,
2533};
2534
2535// dismiss inputs with text fields. flickity#403, flickity#404
2536proto.okayPointerDown = function( event ) {
2537  var isCursorNode = cursorNodes[ event.target.nodeName ];
2538  var isClickType = clickTypes[ event.target.type ];
2539  var isOkay = !isCursorNode || isClickType;
2540  if ( !isOkay ) {
2541    this._pointerReset();
2542  }
2543  return isOkay;
2544};
2545
2546// kludge to blur previously focused input
2547proto.pointerDownBlur = function() {
2548  var focused = document.activeElement;
2549  // do not blur body for IE10, metafizzy/flickity#117
2550  var canBlur = focused && focused.blur && focused != document.body;
2551  if ( canBlur ) {
2552    focused.blur();
2553  }
2554};
2555
2556// ----- move event ----- //
2557
2558/**
2559 * drag move
2560 * @param {Event} event
2561 * @param {Event or Touch} pointer
2562 */
2563proto.pointerMove = function( event, pointer ) {
2564  var moveVector = this._dragPointerMove( event, pointer );
2565  this.emitEvent( 'pointerMove', [ event, pointer, moveVector ] );
2566  this._dragMove( event, pointer, moveVector );
2567};
2568
2569// base pointer move logic
2570proto._dragPointerMove = function( event, pointer ) {
2571  var moveVector = {
2572    x: pointer.pageX - this.pointerDownPointer.pageX,
2573    y: pointer.pageY - this.pointerDownPointer.pageY
2574  };
2575  // start drag if pointer has moved far enough to start drag
2576  if ( !this.isDragging && this.hasDragStarted( moveVector ) ) {
2577    this._dragStart( event, pointer );
2578  }
2579  return moveVector;
2580};
2581
2582// condition if pointer has moved far enough to start drag
2583proto.hasDragStarted = function( moveVector ) {
2584  return Math.abs( moveVector.x ) > 3 || Math.abs( moveVector.y ) > 3;
2585};
2586
2587// ----- end event ----- //
2588
2589/**
2590 * pointer up
2591 * @param {Event} event
2592 * @param {Event or Touch} pointer
2593 */
2594proto.pointerUp = function( event, pointer ) {
2595  this.emitEvent( 'pointerUp', [ event, pointer ] );
2596  this._dragPointerUp( event, pointer );
2597};
2598
2599proto._dragPointerUp = function( event, pointer ) {
2600  if ( this.isDragging ) {
2601    this._dragEnd( event, pointer );
2602  } else {
2603    // pointer didn't move enough for drag to start
2604    this._staticClick( event, pointer );
2605  }
2606};
2607
2608// -------------------------- drag -------------------------- //
2609
2610// dragStart
2611proto._dragStart = function( event, pointer ) {
2612  this.isDragging = true;
2613  // prevent clicks
2614  this.isPreventingClicks = true;
2615  this.dragStart( event, pointer );
2616};
2617
2618proto.dragStart = function( event, pointer ) {
2619  this.emitEvent( 'dragStart', [ event, pointer ] );
2620};
2621
2622// dragMove
2623proto._dragMove = function( event, pointer, moveVector ) {
2624  // do not drag if not dragging yet
2625  if ( !this.isDragging ) {
2626    return;
2627  }
2628
2629  this.dragMove( event, pointer, moveVector );
2630};
2631
2632proto.dragMove = function( event, pointer, moveVector ) {
2633  event.preventDefault();
2634  this.emitEvent( 'dragMove', [ event, pointer, moveVector ] );
2635};
2636
2637// dragEnd
2638proto._dragEnd = function( event, pointer ) {
2639  // set flags
2640  this.isDragging = false;
2641  // re-enable clicking async
2642  setTimeout( function() {
2643    delete this.isPreventingClicks;
2644  }.bind( this ) );
2645
2646  this.dragEnd( event, pointer );
2647};
2648
2649proto.dragEnd = function( event, pointer ) {
2650  this.emitEvent( 'dragEnd', [ event, pointer ] );
2651};
2652
2653// ----- onclick ----- //
2654
2655// handle all clicks and prevent clicks when dragging
2656proto.onclick = function( event ) {
2657  if ( this.isPreventingClicks ) {
2658    event.preventDefault();
2659  }
2660};
2661
2662// ----- staticClick ----- //
2663
2664// triggered after pointer down & up with no/tiny movement
2665proto._staticClick = function( event, pointer ) {
2666  // ignore emulated mouse up clicks
2667  if ( this.isIgnoringMouseUp && event.type == 'mouseup' ) {
2668    return;
2669  }
2670
2671  this.staticClick( event, pointer );
2672
2673  // set flag for emulated clicks 300ms after touchend
2674  if ( event.type != 'mouseup' ) {
2675    this.isIgnoringMouseUp = true;
2676    // reset flag after 300ms
2677    setTimeout( function() {
2678      delete this.isIgnoringMouseUp;
2679    }.bind( this ), 400 );
2680  }
2681};
2682
2683proto.staticClick = function( event, pointer ) {
2684  this.emitEvent( 'staticClick', [ event, pointer ] );
2685};
2686
2687// ----- utils ----- //
2688
2689Unidragger.getPointerPoint = Unipointer.getPointerPoint;
2690
2691// -----  ----- //
2692
2693return Unidragger;
2694
2695}));
2696
2697// drag
2698( function( window, factory ) {
2699  // universal module definition
2700  if ( typeof define == 'function' && define.amd ) {
2701    // AMD
2702    define( 'flickity/js/drag',[
2703      './flickity',
2704      'unidragger/unidragger',
2705      'fizzy-ui-utils/utils',
2706    ], function( Flickity, Unidragger, utils ) {
2707      return factory( window, Flickity, Unidragger, utils );
2708    } );
2709  } else if ( typeof module == 'object' && module.exports ) {
2710    // CommonJS
2711    module.exports = factory(
2712        window,
2713        require('./flickity'),
2714        require('unidragger'),
2715        require('fizzy-ui-utils')
2716    );
2717  } else {
2718    // browser global
2719    window.Flickity = factory(
2720        window,
2721        window.Flickity,
2722        window.Unidragger,
2723        window.fizzyUIUtils
2724    );
2725  }
2726
2727}( window, function factory( window, Flickity, Unidragger, utils ) {
2728
2729
2730
2731// ----- defaults ----- //
2732
2733utils.extend( Flickity.defaults, {
2734  draggable: '>1',
2735  dragThreshold: 3,
2736} );
2737
2738// ----- create ----- //
2739
2740Flickity.createMethods.push('_createDrag');
2741
2742// -------------------------- drag prototype -------------------------- //
2743
2744var proto = Flickity.prototype;
2745utils.extend( proto, Unidragger.prototype );
2746proto._touchActionValue = 'pan-y';
2747
2748// --------------------------  -------------------------- //
2749
2750var isTouch = 'createTouch' in document;
2751var isTouchmoveScrollCanceled = false;
2752
2753proto._createDrag = function() {
2754  this.on( 'activate', this.onActivateDrag );
2755  this.on( 'uiChange', this._uiChangeDrag );
2756  this.on( 'deactivate', this.onDeactivateDrag );
2757  this.on( 'cellChange', this.updateDraggable );
2758  // TODO updateDraggable on resize? if groupCells & slides change
2759  // HACK - add seemingly innocuous handler to fix iOS 10 scroll behavior
2760  // #457, RubaXa/Sortable#973
2761  if ( isTouch && !isTouchmoveScrollCanceled ) {
2762    window.addEventListener( 'touchmove', function() {} );
2763    isTouchmoveScrollCanceled = true;
2764  }
2765};
2766
2767proto.onActivateDrag = function() {
2768  this.handles = [ this.viewport ];
2769  this.bindHandles();
2770  this.updateDraggable();
2771};
2772
2773proto.onDeactivateDrag = function() {
2774  this.unbindHandles();
2775  this.element.classList.remove('is-draggable');
2776};
2777
2778proto.updateDraggable = function() {
2779  // disable dragging if less than 2 slides. #278
2780  if ( this.options.draggable == '>1' ) {
2781    this.isDraggable = this.slides.length > 1;
2782  } else {
2783    this.isDraggable = this.options.draggable;
2784  }
2785  if ( this.isDraggable ) {
2786    this.element.classList.add('is-draggable');
2787  } else {
2788    this.element.classList.remove('is-draggable');
2789  }
2790};
2791
2792// backwards compatibility
2793proto.bindDrag = function() {
2794  this.options.draggable = true;
2795  this.updateDraggable();
2796};
2797
2798proto.unbindDrag = function() {
2799  this.options.draggable = false;
vendor: 5,130 bytes, lines 2800-2972
2800  this.updateDraggable();
2801};
2802
2803proto._uiChangeDrag = function() {
2804  delete this.isFreeScrolling;
2805};
2806
2807// -------------------------- pointer events -------------------------- //
2808
2809proto.pointerDown = function( event, pointer ) {
2810  if ( !this.isDraggable ) {
2811    this._pointerDownDefault( event, pointer );
2812    return;
2813  }
2814  var isOkay = this.okayPointerDown( event );
2815  if ( !isOkay ) {
2816    return;
2817  }
2818
2819  this._pointerDownPreventDefault( event );
2820  this.pointerDownFocus( event );
2821  // blur
2822  if ( document.activeElement != this.element ) {
2823    // do not blur if already focused
2824    this.pointerDownBlur();
2825  }
2826
2827  // stop if it was moving
2828  this.dragX = this.x;
2829  this.viewport.classList.add('is-pointer-down');
2830  // track scrolling
2831  this.pointerDownScroll = getScrollPosition();
2832  window.addEventListener( 'scroll', this );
2833
2834  this._pointerDownDefault( event, pointer );
2835};
2836
2837// default pointerDown logic, used for staticClick
2838proto._pointerDownDefault = function( event, pointer ) {
2839  // track start event position
2840  // Safari 9 overrides pageX and pageY. These values needs to be copied. #779
2841  this.pointerDownPointer = {
2842    pageX: pointer.pageX,
2843    pageY: pointer.pageY,
2844  };
2845  // bind move and end events
2846  this._bindPostStartEvents( event );
2847  this.dispatchEvent( 'pointerDown', event, [ pointer ] );
2848};
2849
2850var focusNodes = {
2851  INPUT: true,
2852  TEXTAREA: true,
2853  SELECT: true,
2854};
2855
2856proto.pointerDownFocus = function( event ) {
2857  var isFocusNode = focusNodes[ event.target.nodeName ];
2858  if ( !isFocusNode ) {
2859    this.focus();
2860  }
2861};
2862
2863proto._pointerDownPreventDefault = function( event ) {
2864  var isTouchStart = event.type == 'touchstart';
2865  var isTouchPointer = event.pointerType == 'touch';
2866  var isFocusNode = focusNodes[ event.target.nodeName ];
2867  if ( !isTouchStart && !isTouchPointer && !isFocusNode ) {
2868    event.preventDefault();
2869  }
2870};
2871
2872// ----- move ----- //
2873
2874proto.hasDragStarted = function( moveVector ) {
2875  return Math.abs( moveVector.x ) > this.options.dragThreshold;
2876};
2877
2878// ----- up ----- //
2879
2880proto.pointerUp = function( event, pointer ) {
2881  delete this.isTouchScrolling;
2882  this.viewport.classList.remove('is-pointer-down');
2883  this.dispatchEvent( 'pointerUp', event, [ pointer ] );
2884  this._dragPointerUp( event, pointer );
2885};
2886
2887proto.pointerDone = function() {
2888  window.removeEventListener( 'scroll', this );
2889  delete this.pointerDownScroll;
2890};
2891
2892// -------------------------- dragging -------------------------- //
2893
2894proto.dragStart = function( event, pointer ) {
2895  if ( !this.isDraggable ) {
2896    return;
2897  }
2898  this.dragStartPosition = this.x;
2899  this.startAnimation();
2900  window.removeEventListener( 'scroll', this );
2901  this.dispatchEvent( 'dragStart', event, [ pointer ] );
2902};
2903
2904proto.pointerMove = function( event, pointer ) {
2905  var moveVector = this._dragPointerMove( event, pointer );
2906  this.dispatchEvent( 'pointerMove', event, [ pointer, moveVector ] );
2907  this._dragMove( event, pointer, moveVector );
2908};
2909
2910proto.dragMove = function( event, pointer, moveVector ) {
2911  if ( !this.isDraggable ) {
2912    return;
2913  }
2914  event.preventDefault();
2915
2916  this.previousDragX = this.dragX;
2917  // reverse if right-to-left
2918  var direction = this.options.rightToLeft ? -1 : 1;
2919  if ( this.options.wrapAround ) {
2920    // wrap around move. #589
2921    moveVector.x %= this.slideableWidth;
2922  }
2923  var dragX = this.dragStartPosition + moveVector.x * direction;
2924
2925  if ( !this.options.wrapAround && this.slides.length ) {
2926    // slow drag
2927    var originBound = Math.max( -this.slides[0].target, this.dragStartPosition );
2928    dragX = dragX > originBound ? ( dragX + originBound ) * 0.5 : dragX;
2929    var endBound = Math.min( -this.getLastSlide().target, this.dragStartPosition );
2930    dragX = dragX < endBound ? ( dragX + endBound ) * 0.5 : dragX;
2931  }
2932
2933  this.dragX = dragX;
2934
2935  this.dragMoveTime = new Date();
2936  this.dispatchEvent( 'dragMove', event, [ pointer, moveVector ] );
2937};
2938
2939proto.dragEnd = function( event, pointer ) {
2940  if ( !this.isDraggable ) {
2941    return;
2942  }
2943  if ( this.options.freeScroll ) {
2944    this.isFreeScrolling = true;
2945  }
2946  // set selectedIndex based on where flick will end up
2947  var index = this.dragEndRestingSelect();
2948
2949  if ( this.options.freeScroll && !this.options.wrapAround ) {
2950    // if free-scroll & not wrap around
2951    // do not free-scroll if going outside of bounding slides
2952    // so bounding slides can attract slider, and keep it in bounds
2953    var restingX = this.getRestingPosition();
2954    this.isFreeScrolling = -restingX > this.slides[0].target &&
2955      -restingX < this.getLastSlide().target;
2956  } else if ( !this.options.freeScroll && index == this.selectedIndex ) {
2957    // boost selection if selected index has not changed
2958    index += this.dragEndBoostSelect();
2959  }
2960  delete this.previousDragX;
2961  // apply selection
2962  // TODO refactor this, selecting here feels weird
2963  // HACK, set flag so dragging stays in correct direction
2964  this.isDragSelect = this.options.wrapAround;
2965  this.select( index );
2966  delete this.isDragSelect;
2967  this.dispatchEvent( 'dragEnd', event, [ pointer ] );
2968};
2969
2970proto.dragEndRestingSelect = function() {
2971  var restingX = this.getRestingPosition();
2972  // how far away from selected slide
2973  var distance = Math.abs( this.getSlideDistance( -restingX, this.selectedIndex ) );
2974  // get closet resting going up and going down
2975  var positiveResting = this._getClosestResting( restingX, distance, 1 );
2976  var negativeResting = this._getClosestResting( restingX, distance, -1 );
2977  // use closer resting for wrap-around
2978  var index = positiveResting.distance < negativeResting.distance ?
2979    positiveResting.index : negativeResting.index;
2980  return index;
2981};
2982
2983/**
2984 * given resting X and distance to selected cell
2985 * get the distance and index of the closest cell
2986 * @param {Number} restingX - estimated post-flick resting position
2987 * @param {Number} distance - distance to selected cell
2988 * @param {Integer} increment - +1 or -1, going up or down
2989 * @returns {Object} - { distance: {Number}, index: {Integer} }
2990 */
2991proto._getClosestResting = function( restingX, distance, increment ) {
2992  var index = this.selectedIndex;
2993  var minDistance = Infinity;
2994  var condition = this.options.contain && !this.options.wrapAround ?
2995    // if contain, keep going if distance is equal to minDistance
2996    function( dist, minDist ) {
2997      return dist <= minDist;
2998    } : function( dist, minDist ) {
2999      return dist < minDist;
3000    };
3001  while ( condition( distance, minDistance ) ) {
3002    // measure distance to next cell
3003    index += increment;
3004    minDistance = distance;
3005    distance = this.getSlideDistance( -restingX, index );
3006    if ( distance === null ) {
3007      break;
3008    }
3009    distance = Math.abs( distance );
3010  }
3011  return {
3012    distance: minDistance,
3013    // selected was previous index
3014    index: index - increment,
3015  };
3016};
3017
3018/**
3019 * measure distance between x and a slide target
3020 * @param {Number} x - horizontal position
3021 * @param {Integer} index - slide index
3022 * @returns {Number} - slide distance
3023 */
3024proto.getSlideDistance = function( x, index ) {
3025  var len = this.slides.length;
3026  // wrap around if at least 2 slides
3027  var isWrapAround = this.options.wrapAround && len > 1;
3028  var slideIndex = isWrapAround ? utils.modulo( index, len ) : index;
3029  var slide = this.slides[ slideIndex ];
3030  if ( !slide ) {
3031    return null;
3032  }
3033  // add distance for wrap-around slides
3034  var wrap = isWrapAround ? this.slideableWidth * Math.floor( index/len ) : 0;
3035  return x - ( slide.target + wrap );
3036};
3037
3038proto.dragEndBoostSelect = function() {
3039  // do not boost if no previousDragX or dragMoveTime
3040  if ( this.previousDragX === undefined || !this.dragMoveTime ||
3041    // or if drag was held for 100 ms
3042    new Date() - this.dragMoveTime > 100 ) {
3043    return 0;
3044  }
3045
3046  var distance = this.getSlideDistance( -this.dragX, this.selectedIndex );
3047  var delta = this.previousDragX - this.dragX;
3048  if ( distance > 0 && delta > 0 ) {
3049    // boost to next if moving towards the right, and positive velocity
3050    return 1;
3051  } else if ( distance < 0 && delta < 0 ) {
3052    // boost to previous if moving towards the left, and negative velocity
3053    return -1;
3054  }
3055  return 0;
3056};
3057
3058// ----- staticClick ----- //
3059
3060proto.staticClick = function( event, pointer ) {
3061  // get clickedCell, if cell was clicked
3062  var clickedCell = this.getParentCell( event.target );
3063  var cellElem = clickedCell && clickedCell.element;
3064  var cellIndex = clickedCell && this.cells.indexOf( clickedCell );
3065  this.dispatchEvent( 'staticClick', event, [ pointer, cellElem, cellIndex ] );
3066};
3067
3068// ----- scroll ----- //
3069
3070proto.onscroll = function() {
3071  var scroll = getScrollPosition();
3072  var scrollMoveX = this.pointerDownScroll.x - scroll.x;
3073  var scrollMoveY = this.pointerDownScroll.y - scroll.y;
3074  // cancel click/tap if scroll is too much
3075  if ( Math.abs( scrollMoveX ) > 3 || Math.abs( scrollMoveY ) > 3 ) {
3076    this._pointerDone();
3077  }
3078};
3079
3080// ----- utils ----- //
3081
3082function getScrollPosition() {
3083  return {
3084    x: window.pageXOffset,
3085    y: window.pageYOffset,
3086  };
3087}
3088
3089// -----  ----- //
3090
3091return Flickity;
3092
3093} ) );
3094
3095// prev/next buttons
3096( function( window, factory ) {
3097  // universal module definition
3098  if ( typeof define == 'function' && define.amd ) {
3099    // AMD
3100    define( 'flickity/js/prev-next-button',[
3101      './flickity',
3102      'unipointer/unipointer',
3103      'fizzy-ui-utils/utils',
3104    ], function( Flickity, Unipointer, utils ) {
3105      return factory( window, Flickity, Unipointer, utils );
3106    } );
3107  } else if ( typeof module == 'object' && module.exports ) {
3108    // CommonJS
3109    module.exports = factory(
3110        window,
3111        require('./flickity'),
3112        require('unipointer'),
3113        require('fizzy-ui-utils')
3114    );
3115  } else {
3116    // browser global
3117    factory(
3118        window,
3119        window.Flickity,
3120        window.Unipointer,
3121        window.fizzyUIUtils
3122    );
3123  }
3124
3125}( window, function factory( window, Flickity, Unipointer, utils ) {
3126'use strict';
3127
3128var svgURI = 'http://www.w3.org/2000/svg';
3129
3130// -------------------------- PrevNextButton -------------------------- //
3131
3132function PrevNextButton( direction, parent ) {
3133  this.direction = direction;
3134  this.parent = parent;
3135  this._create();
3136}
3137
3138PrevNextButton.prototype = Object.create( Unipointer.prototype );
3139
3140PrevNextButton.prototype._create = function() {
3141  // properties
3142  this.isEnabled = true;
3143  this.isPrevious = this.direction == -1;
3144  var leftDirection = this.parent.options.rightToLeft ? 1 : -1;
3145  this.isLeft = this.direction == leftDirection;
3146
3147  var element = this.element = document.createElement('button');
3148  element.className = 'flickity-button flickity-prev-next-button';
3149  element.className += this.isPrevious ? ' previous' : ' next';
3150  // prevent button from submitting form http://stackoverflow.com/a/10836076/182183
3151  element.setAttribute( 'type', 'button' );
3152  // init as disabled
3153  this.disable();
3154
3155  element.setAttribute( 'aria-label', this.isPrevious ? 'Previous' : 'Next' );
3156
3157  // create arrow
3158  var svg = this.createSVG();
3159  element.appendChild( svg );
3160  // events
3161  this.parent.on( 'select', this.update.bind( this ) );
3162  this.on( 'pointerDown', this.parent.childUIPointerDown.bind( this.parent ) );
3163};
3164
3165PrevNextButton.prototype.activate = function() {
3166  this.bindStartEvent( this.element );
3167  this.element.addEventListener( 'click', this );
3168  // add to DOM
3169  this.parent.element.appendChild( this.element );
3170};
3171
3172PrevNextButton.prototype.deactivate = function() {
3173  // remove from DOM
3174  this.parent.element.removeChild( this.element );
3175  // click events
3176  this.unbindStartEvent( this.element );
3177  this.element.removeEventListener( 'click', this );
3178};
3179
3180PrevNextButton.prototype.createSVG = function() {
3181  var svg = document.createElementNS( svgURI, 'svg' );
3182  svg.setAttribute( 'class', 'flickity-button-icon' );
3183  svg.setAttribute( 'viewBox', '0 0 100 100' );
3184  var path = document.createElementNS( svgURI, 'path' );
3185  var pathMovements = getArrowMovements( this.parent.options.arrowShape );
3186  path.setAttribute( 'd', pathMovements );
3187  path.setAttribute( 'class', 'arrow' );
3188  // rotate arrow
3189  if ( !this.isLeft ) {
3190    path.setAttribute( 'transform', 'translate(100, 100) rotate(180) ' );
3191  }
3192  svg.appendChild( path );
3193  return svg;
3194};
3195
3196// get SVG path movmement
3197function getArrowMovements( shape ) {
3198  // use shape as movement if string
3199  if ( typeof shape == 'string' ) {
3200    return shape;
3201  }
3202  // create movement string
3203  return 'M ' + shape.x0 + ',50' +
3204    ' L ' + shape.x1 + ',' + ( shape.y1 + 50 ) +
3205    ' L ' + shape.x2 + ',' + ( shape.y2 + 50 ) +
3206    ' L ' + shape.x3 + ',50 ' +
3207    ' L ' + shape.x2 + ',' + ( 50 - shape.y2 ) +
3208    ' L ' + shape.x1 + ',' + ( 50 - shape.y1 ) +
3209    ' Z';
3210}
3211
3212PrevNextButton.prototype.handleEvent = utils.handleEvent;
3213
3214PrevNextButton.prototype.onclick = function() {
3215  if ( !this.isEnabled ) {
3216    return;
3217  }
3218  this.parent.uiChange();
3219  var method = this.isPrevious ? 'previous' : 'next';
3220  this.parent[ method ]();
3221};
3222
3223// -----  ----- //
3224
3225PrevNextButton.prototype.enable = function() {
3226  if ( this.isEnabled ) {
3227    return;
3228  }
3229  this.element.disabled = false;
3230  this.isEnabled = true;
3231};
3232
3233PrevNextButton.prototype.disable = function() {
3234  if ( !this.isEnabled ) {
3235    return;
3236  }
3237  this.element.disabled = true;
3238  this.isEnabled = false;
3239};
3240
3241PrevNextButton.prototype.update = function() {
3242  // index of first or last slide, if previous or next
3243  var slides = this.parent.slides;
3244  // enable is wrapAround and at least 2 slides
3245  if ( this.parent.options.wrapAround && slides.length > 1 ) {
3246    this.enable();
3247    return;
3248  }
3249  var lastIndex = slides.length ? slides.length - 1 : 0;
3250  var boundIndex = this.isPrevious ? 0 : lastIndex;
3251  var method = this.parent.selectedIndex == boundIndex ? 'disable' : 'enable';
3252  this[ method ]();
3253};
3254
3255PrevNextButton.prototype.destroy = function() {
3256  this.deactivate();
3257  this.allOff();
3258};
3259
3260// -------------------------- Flickity prototype -------------------------- //
3261
3262utils.extend( Flickity.defaults, {
3263  prevNextButtons: true,
3264  arrowShape: {
3265    x0: 10,
3266    x1: 60, y1: 50,
3267    x2: 70, y2: 40,
3268    x3: 30,
3269  },
3270} );
3271
3272Flickity.createMethods.push('_createPrevNextButtons');
3273var proto = Flickity.prototype;
3274
3275proto._createPrevNextButtons = function() {
3276  if ( !this.options.prevNextButtons ) {
3277    return;
3278  }
3279
3280  this.prevButton = new PrevNextButton( -1, this );
3281  this.nextButton = new PrevNextButton( 1, this );
3282
3283  this.on( 'activate', this.activatePrevNextButtons );
3284};
3285
3286proto.activatePrevNextButtons = function() {
3287  this.prevButton.activate();
3288  this.nextButton.activate();
3289  this.on( 'deactivate', this.deactivatePrevNextButtons );
3290};
3291
3292proto.deactivatePrevNextButtons = function() {
3293  this.prevButton.deactivate();
3294  this.nextButton.deactivate();
3295  this.off( 'deactivate', this.deactivatePrevNextButtons );
3296};
3297
3298// --------------------------  -------------------------- //
3299
3300Flickity.PrevNextButton = PrevNextButton;
3301
3302return Flickity;
3303
3304} ) );
3305
3306// page dots
3307( function( window, factory ) {
3308  // universal module definition
3309  if ( typeof define == 'function' && define.amd ) {
3310    // AMD
3311    define( 'flickity/js/page-dots',[
3312      './flickity',
3313      'unipointer/unipointer',
3314      'fizzy-ui-utils/utils',
3315    ], function( Flickity, Unipointer, utils ) {
3316      return factory( window, Flickity, Unipointer, utils );
3317    } );
3318  } else if ( typeof module == 'object' && module.exports ) {
3319    // CommonJS
3320    module.exports = factory(
3321        window,
3322        require('./flickity'),
3323        require('unipointer'),
3324        require('fizzy-ui-utils')
3325    );
3326  } else {
3327    // browser global
3328    factory(
3329        window,
3330        window.Flickity,
3331        window.Unipointer,
3332        window.fizzyUIUtils
3333    );
3334  }
3335
3336}( window, function factory( window, Flickity, Unipointer, utils ) {
3337
3338// -------------------------- PageDots -------------------------- //
3339
3340
3341
3342function PageDots( parent ) {
3343  this.parent = parent;
3344  this._create();
3345}
3346
3347PageDots.prototype = Object.create( Unipointer.prototype );
3348
3349PageDots.prototype._create = function() {
3350  // create holder element
3351  this.holder = document.createElement('ol');
3352  this.holder.className = 'flickity-page-dots';
3353  // create dots, array of elements
3354  this.dots = [];
3355  // events
3356  this.handleClick = this.onClick.bind( this );
3357  this.on( 'pointerDown', this.parent.childUIPointerDown.bind( this.parent ) );
3358};
3359
3360PageDots.prototype.activate = function() {
3361  this.setDots();
3362  this.holder.addEventListener( 'click', this.handleClick );
3363  this.bindStartEvent( this.holder );
3364  // add to DOM
3365  this.parent.element.appendChild( this.holder );
3366};
3367
3368PageDots.prototype.deactivate = function() {
3369  this.holder.removeEventListener( 'click', this.handleClick );
3370  this.unbindStartEvent( this.holder );
3371  // remove from DOM
3372  this.parent.element.removeChild( this.holder );
3373};
3374
3375PageDots.prototype.setDots = function() {
3376  // get difference between number of slides and number of dots
3377  var delta = this.parent.slides.length - this.dots.length;
3378  if ( delta > 0 ) {
3379    this.addDots( delta );
3380  } else if ( delta < 0 ) {
3381    this.removeDots( -delta );
3382  }
3383};
3384
3385PageDots.prototype.addDots = function( count ) {
3386  var fragment = document.createDocumentFragment();
3387  var newDots = [];
3388  var length = this.dots.length;
3389  var max = length + count;
3390
3391  for ( var i = length; i < max; i++ ) {
3392    var dot = document.createElement('li');
3393    dot.className = 'dot';
3394    dot.setAttribute( 'aria-label', 'Page dot ' + ( i + 1 ) );
3395    fragment.appendChild( dot );
3396    newDots.push( dot );
3397  }
3398
3399  this.holder.appendChild( fragment );
3400  this.dots = this.dots.concat( newDots );
3401};
3402
3403PageDots.prototype.removeDots = function( count ) {
3404  // remove from this.dots collection
3405  var removeDots = this.dots.splice( this.dots.length - count, count );
3406  // remove from DOM
3407  removeDots.forEach( function( dot ) {
3408    this.holder.removeChild( dot );
3409  }, this );
3410};
3411
3412PageDots.prototype.updateSelected = function() {
3413  // remove selected class on previous
3414  if ( this.selectedDot ) {
3415    this.selectedDot.className = 'dot';
3416    this.selectedDot.removeAttribute('aria-current');
3417  }
3418  // don't proceed if no dots
3419  if ( !this.dots.length ) {
3420    return;
3421  }
3422  this.selectedDot = this.dots[ this.parent.selectedIndex ];
3423  this.selectedDot.className = 'dot is-selected';
3424  this.selectedDot.setAttribute( 'aria-current', 'step' );
3425};
3426
3427PageDots.prototype.onTap = // old method name, backwards-compatible
3428PageDots.prototype.onClick = function( event ) {
3429  var target = event.target;
3430  // only care about dot clicks
3431  if ( target.nodeName != 'LI' ) {
3432    return;
3433  }
3434
3435  this.parent.uiChange();
3436  var index = this.dots.indexOf( target );
3437  this.parent.select( index );
3438};
3439
3440PageDots.prototype.destroy = function() {
3441  this.deactivate();
3442  this.allOff();
3443};
3444
3445Flickity.PageDots = PageDots;
3446
3447// -------------------------- Flickity -------------------------- //
3448
3449utils.extend( Flickity.defaults, {
3450  pageDots: true,
3451} );
3452
3453Flickity.createMethods.push('_createPageDots');
3454
3455var proto = Flickity.prototype;
3456
3457proto._createPageDots = function() {
3458  if ( !this.options.pageDots ) {
3459    return;
3460  }
3461  this.pageDots = new PageDots( this );
3462  // events
3463  this.on( 'activate', this.activatePageDots );
3464  this.on( 'select', this.updateSelectedPageDots );
3465  this.on( 'cellChange', this.updatePageDots );
3466  this.on( 'resize', this.updatePageDots );
3467  this.on( 'deactivate', this.deactivatePageDots );
3468};
3469
3470proto.activatePageDots = function() {
3471  this.pageDots.activate();
3472};
3473
3474proto.updateSelectedPageDots = function() {
3475  this.pageDots.updateSelected();
3476};
3477
3478proto.updatePageDots = function() {
3479  this.pageDots.setDots();
3480};
3481
3482proto.deactivatePageDots = function() {
3483  this.pageDots.deactivate();
3484};
3485
3486// -----  ----- //
3487
3488Flickity.PageDots = PageDots;
3489
3490return Flickity;
3491
3492} ) );
3493
3494// player & autoPlay
3495( function( window, factory ) {
3496  // universal module definition
3497  if ( typeof define == 'function' && define.amd ) {
3498    // AMD
3499    define( 'flickity/js/player',[
3500      'ev-emitter/ev-emitter',
3501      'fizzy-ui-utils/utils',
3502      './flickity',
3503    ], function( EvEmitter, utils, Flickity ) {
3504      return factory( EvEmitter, utils, Flickity );
3505    } );
3506  } else if ( typeof module == 'object' && module.exports ) {
3507    // CommonJS
3508    module.exports = factory(
3509        require('ev-emitter'),
3510        require('fizzy-ui-utils'),
3511        require('./flickity')
3512    );
3513  } else {
3514    // browser global
3515    factory(
3516        window.EvEmitter,
3517        window.fizzyUIUtils,
3518        window.Flickity
3519    );
3520  }
3521
3522}( window, function factory( EvEmitter, utils, Flickity ) {
3523
3524
3525
3526// -------------------------- Player -------------------------- //
3527
3528function Player( parent ) {
3529  this.parent = parent;
3530  this.state = 'stopped';
3531  // visibility change event handler
3532  this.onVisibilityChange = this.visibilityChange.bind( this );
3533  this.onVisibilityPlay = this.visibilityPlay.bind( this );
3534}
3535
3536Player.prototype = Object.create( EvEmitter.prototype );
3537
3538// start play
3539Player.prototype.play = function() {
3540  if ( this.state == 'playing' ) {
3541    return;
3542  }
3543  // do not play if page is hidden, start playing when page is visible
3544  var isPageHidden = document.hidden;
3545  if ( isPageHidden ) {
3546    document.addEventListener( 'visibilitychange', this.onVisibilityPlay );
3547    return;
3548  }
3549
3550  this.state = 'playing';
3551  // listen to visibility change
3552  document.addEventListener( 'visibilitychange', this.onVisibilityChange );
3553  // start ticking
3554  this.tick();
3555};
3556
3557Player.prototype.tick = function() {
3558  // do not tick if not playing
3559  if ( this.state != 'playing' ) {
3560    return;
3561  }
3562
3563  var time = this.parent.options.autoPlay;
3564  // default to 3 seconds
3565  time = typeof time == 'number' ? time : 3000;
3566  var _this = this;
3567  // HACK: reset ticks if stopped and started within interval
3568  this.clear();
3569  this.timeout = setTimeout( function() {
3570    _this.parent.next( true );
3571    _this.tick();
3572  }, time );
3573};
3574
3575Player.prototype.stop = function() {
3576  this.state = 'stopped';
3577  this.clear();
3578  // remove visibility change event
3579  document.removeEventListener( 'visibilitychange', this.onVisibilityChange );
3580};
3581
3582Player.prototype.clear = function() {
3583  clearTimeout( this.timeout );
3584};
3585
3586Player.prototype.pause = function() {
3587  if ( this.state == 'playing' ) {
3588    this.state = 'paused';
3589    this.clear();
3590  }
3591};
3592
3593Player.prototype.unpause = function() {
3594  // re-start play if paused
3595  if ( this.state == 'paused' ) {
3596    this.play();
3597  }
3598};
3599
3600// pause if page visibility is hidden, unpause if visible
3601Player.prototype.visibilityChange = function() {
3602  var isPageHidden = document.hidden;
3603  this[ isPageHidden ? 'pause' : 'unpause' ]();
3604};
3605
3606Player.prototype.visibilityPlay = function() {
3607  this.play();
3608  document.removeEventListener( 'visibilitychange', this.onVisibilityPlay );
3609};
3610
3611// -------------------------- Flickity -------------------------- //
3612
3613utils.extend( Flickity.defaults, {
3614  pauseAutoPlayOnHover: true,
3615} );
3616
3617Flickity.createMethods.push('_createPlayer');
3618var proto = Flickity.prototype;
3619
3620proto._createPlayer = function() {
3621  this.player = new Player( this );
3622
3623  this.on( 'activate', this.activatePlayer );
3624  this.on( 'uiChange', this.stopPlayer );
3625  this.on( 'pointerDown', this.stopPlayer );
3626  this.on( 'deactivate', this.deactivatePlayer );
3627};
3628
3629proto.activatePlayer = function() {
3630  if ( !this.options.autoPlay ) {
3631    return;
3632  }
3633  this.player.play();
3634  this.element.addEventListener( 'mouseenter', this );
3635};
3636
3637// Player API, don't hate the ... thanks I know where the door is
3638
3639proto.playPlayer = function() {
3640  this.player.play();
3641};
3642
3643proto.stopPlayer = function() {
3644  this.player.stop();
3645};
3646
3647proto.pausePlayer = function() {
3648  this.player.pause();
3649};
3650
3651proto.unpausePlayer = function() {
3652  this.player.unpause();
3653};
3654
3655proto.deactivatePlayer = function() {
3656  this.player.stop();
3657  this.element.removeEventListener( 'mouseenter', this );
3658};
3659
3660// ----- mouseenter/leave ----- //
3661
3662// pause auto-play on hover
3663proto.onmouseenter = function() {
3664  if ( !this.options.pauseAutoPlayOnHover ) {
3665    return;
3666  }
3667  this.player.pause();
3668  this.element.addEventListener( 'mouseleave', this );
3669};
3670
3671// resume auto-play on hover off
3672proto.onmouseleave = function() {
3673  this.player.unpause();
3674  this.element.removeEventListener( 'mouseleave', this );
3675};
3676
3677// -----  ----- //
3678
3679Flickity.Player = Player;
3680
3681return Flickity;
3682
3683} ) );
3684
3685// add, remove cell
3686( function( window, factory ) {
3687  // universal module definition
3688  if ( typeof define == 'function' && define.amd ) {
3689    // AMD
3690    define( 'flickity/js/add-remove-cell',[
3691      './flickity',
3692      'fizzy-ui-utils/utils',
3693    ], function( Flickity, utils ) {
3694      return factory( window, Flickity, utils );
3695    } );
3696  } else if ( typeof module == 'object' && module.exports ) {
3697    // CommonJS
3698    module.exports = factory(
3699        window,
3700        require('./flickity'),
3701        require('fizzy-ui-utils')
3702    );
3703  } else {
3704    // browser global
3705    factory(
3706        window,
3707        window.Flickity,
3708        window.fizzyUIUtils
3709    );
3710  }
3711
3712}( window, function factory( window, Flickity, utils ) {
3713
3714
3715
3716// append cells to a document fragment
3717function getCellsFragment( cells ) {
3718  var fragment = document.createDocumentFragment();
3719  cells.forEach( function( cell ) {
3720    fragment.appendChild( cell.element );
3721  } );
3722  return fragment;
3723}
3724
3725// -------------------------- add/remove cell prototype -------------------------- //
3726
3727var proto = Flickity.prototype;
3728
3729/**
3730 * Insert, prepend, or append cells
3731 * @param {[Element, Array, NodeList]} elems - Elements to insert
3732 * @param {Integer} index - Zero-based number to insert
3733 */
3734proto.insert = function( elems, index ) {
3735  var cells = this._makeCells( elems );
3736  if ( !cells || !cells.length ) {
3737    return;
3738  }
3739  var len = this.cells.length;
3740  // default to append
3741  index = index === undefined ? len : index;
3742  // add cells with document fragment
3743  var fragment = getCellsFragment( cells );
3744  // append to slider
3745  var isAppend = index == len;
3746  if ( isAppend ) {
3747    this.slider.appendChild( fragment );
3748  } else {
3749    var insertCellElement = this.cells[ index ].element;
3750    this.slider.insertBefore( fragment, insertCellElement );
3751  }
3752  // add to this.cells
3753  if ( index === 0 ) {
3754    // prepend, add to start
3755    this.cells = cells.concat( this.cells );
3756  } else if ( isAppend ) {
3757    // append, add to end
3758    this.cells = this.cells.concat( cells );
3759  } else {
3760    // insert in this.cells
3761    var endCells = this.cells.splice( index, len - index );
3762    this.cells = this.cells.concat( cells ).concat( endCells );
3763  }
3764
3765  this._sizeCells( cells );
3766  this.cellChange( index, true );
3767};
3768
3769proto.append = function( elems ) {
3770  this.insert( elems, this.cells.length );
3771};
3772
3773proto.prepend = function( elems ) {
3774  this.insert( elems, 0 );
3775};
3776
3777/**
3778 * Remove cells
3779 * @param {[Element, Array, NodeList]} elems - ELements to remove
3780 */
3781proto.remove = function( elems ) {
3782  var cells = this.getCells( elems );
3783  if ( !cells || !cells.length ) {
3784    return;
3785  }
3786
3787  var minCellIndex = this.cells.length - 1;
3788  // remove cells from collection & DOM
3789  cells.forEach( function( cell ) {
3790    cell.remove();
3791    var index = this.cells.indexOf( cell );
3792    minCellIndex = Math.min( index, minCellIndex );
3793    utils.removeFrom( this.cells, cell );
3794  }, this );
3795
3796  this.cellChange( minCellIndex, true );
3797};
3798
3799/**
3800 * logic to be run after a cell's size changes
3801 * @param {Element} elem - cell's element
3802 */
3803proto.cellSizeChange = function( elem ) {
3804  var cell = this.getCell( elem );
3805  if ( !cell ) {
3806    return;
3807  }
3808  cell.getSize();
3809
3810  var index = this.cells.indexOf( cell );
3811  this.cellChange( index );
3812};
3813
3814/**
3815 * logic any time a cell is changed: added, removed, or size changed
3816 * @param {Integer} changedCellIndex - index of the changed cell, optional
3817 * @param {Boolean} isPositioningSlider - Positions slider after selection
3818 */
3819proto.cellChange = function( changedCellIndex, isPositioningSlider ) {
3820  var prevSelectedElem = this.selectedElement;
3821  this._positionCells( changedCellIndex );
3822  this._getWrapShiftCells();
3823  this.setGallerySize();
3824  // update selectedIndex
3825  // try to maintain position & select previous selected element
3826  var cell = this.getCell( prevSelectedElem );
3827  if ( cell ) {
3828    this.selectedIndex = this.getCellSlideIndex( cell );
3829  }
3830  this.selectedIndex = Math.min( this.slides.length - 1, this.selectedIndex );
3831
3832  this.emitEvent( 'cellChange', [ changedCellIndex ] );
3833  // position slider
3834  this.select( this.selectedIndex );
3835  // do not position slider after lazy load
3836  if ( isPositioningSlider ) {
3837    this.positionSliderAtSelected();
3838  }
3839};
3840
3841// -----  ----- //
3842
3843return Flickity;
3844
3845} ) );
3846
3847// lazyload
3848( function( window, factory ) {
3849  // universal module definition
3850  if ( typeof define == 'function' && define.amd ) {
3851    // AMD
3852    define( 'flickity/js/lazyload',[
3853      './flickity',
3854      'fizzy-ui-utils/utils',
3855    ], function( Flickity, utils ) {
3856      return factory( window, Flickity, utils );
3857    } );
3858  } else if ( typeof module == 'object' && module.exports ) {
3859    // CommonJS
3860    module.exports = factory(
3861        window,
3862        require('./flickity'),
3863        require('fizzy-ui-utils')
3864    );
3865  } else {
3866    // browser global
3867    factory(
3868        window,
3869        window.Flickity,
3870        window.fizzyUIUtils
3871    );
3872  }
3873
3874}( window, function factory( window, Flickity, utils ) {
3875'use strict';
3876
3877Flickity.createMethods.push('_createLazyload');
3878var proto = Flickity.prototype;
3879
3880proto._createLazyload = function() {
3881  this.on( 'select', this.lazyLoad );
3882};
3883
3884proto.lazyLoad = function() {
3885  var lazyLoad = this.options.lazyLoad;
3886  if ( !lazyLoad ) {
3887    return;
3888  }
3889  // get adjacent cells, use lazyLoad option for adjacent count
3890  var adjCount = typeof lazyLoad == 'number' ? lazyLoad : 0;
3891  var cellElems = this.getAdjacentCellElements( adjCount );
3892  // get lazy images in those cells
3893  var lazyImages = [];
3894  cellElems.forEach( function( cellElem ) {
3895    var lazyCellImages = getCellLazyImages( cellElem );
3896    lazyImages = lazyImages.concat( lazyCellImages );
3897  } );
3898  // load lazy images
3899  lazyImages.forEach( function( img ) {
3900    new LazyLoader( img, this );
3901  }, this );
3902};
3903
3904function getCellLazyImages( cellElem ) {
3905  // check if cell element is lazy image
3906  if ( cellElem.nodeName == 'IMG' ) {
3907    var lazyloadAttr = cellElem.getAttribute('data-flickity-lazyload');
3908    var srcAttr = cellElem.getAttribute('data-flickity-lazyload-src');
3909    var srcsetAttr = cellElem.getAttribute('data-flickity-lazyload-srcset');
3910    if ( lazyloadAttr || srcAttr || srcsetAttr ) {
3911      return [ cellElem ];
3912    }
3913  }
3914  // select lazy images in cell
3915  var lazySelector = 'img[data-flickity-lazyload], ' +
3916    'img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]';
3917  var imgs = cellElem.querySelectorAll( lazySelector );
3918  return utils.makeArray( imgs );
3919}
3920
3921// -------------------------- LazyLoader -------------------------- //
3922
3923/**
3924 * class to handle loading images
3925 * @param {Image} img - Image element
3926 * @param {Flickity} flickity - Flickity instance
3927 */
3928function LazyLoader( img, flickity ) {
3929  this.img = img;
3930  this.flickity = flickity;
3931  this.load();
3932}
3933
3934LazyLoader.prototype.handleEvent = utils.handleEvent;
3935
3936LazyLoader.prototype.load = function() {
3937  this.img.addEventListener( 'load', this );
3938  this.img.addEventListener( 'error', this );
3939  // get src & srcset
3940  var src = this.img.getAttribute('data-flickity-lazyload') ||
3941    this.img.getAttribute('data-flickity-lazyload-src');
3942  var srcset = this.img.getAttribute('data-flickity-lazyload-srcset');
3943  // set src & serset
3944  this.img.src = src;
3945  if ( srcset ) {
3946    this.img.setAttribute( 'srcset', srcset );
3947  }
3948  // remove attr
3949  this.img.removeAttribute('data-flickity-lazyload');
3950  this.img.removeAttribute('data-flickity-lazyload-src');
3951  this.img.removeAttribute('data-flickity-lazyload-srcset');
3952};
3953
3954LazyLoader.prototype.onload = function( event ) {
3955  this.complete( event, 'flickity-lazyloaded' );
3956};
3957
3958LazyLoader.prototype.onerror = function( event ) {
3959  this.complete( event, 'flickity-lazyerror' );
3960};
3961
3962LazyLoader.prototype.complete = function( event, className ) {
3963  // unbind events
3964  this.img.removeEventListener( 'load', this );
3965  this.img.removeEventListener( 'error', this );
3966
3967  var cell = this.flickity.getParentCell( this.img );
3968  var cellElem = cell && cell.element;
3969  this.flickity.cellSizeChange( cellElem );
3970
3971  this.img.classList.add( className );
3972  this.flickity.dispatchEvent( 'lazyLoad', event, cellElem );
3973};
3974
3975// -----  ----- //
3976
3977Flickity.LazyLoader = LazyLoader;
3978
3979return Flickity;
3980
3981} ) );
3982
3983/*!
3984 * Flickity v2.2.2
3985 * Touch, responsive, flickable carousels
3986 *
3987 * Licensed GPLv3 for open source use
3988 * or Flickity Commercial License for commercial use
3989 *
3990 * https://flickity.metafizzy.co
3991 * Copyright 2015-2021 Metafizzy
3992 */
3993
3994( function( window, factory ) {
3995  // universal module definition
3996  if ( typeof define == 'function' && define.amd ) {
3997    // AMD
3998    define( 'flickity/js/index',[
3999      './flickity',
4000      './drag',
4001      './prev-next-button',
4002      './page-dots',
4003      './player',
4004      './add-remove-cell',
4005      './lazyload',
4006    ], factory );
4007  } else if ( typeof module == 'object' && module.exports ) {
4008    // CommonJS
4009    module.exports = factory(
4010        require('./flickity'),
4011        require('./drag'),
4012        require('./prev-next-button'),
4013        require('./page-dots'),
4014        require('./player'),
4015        require('./add-remove-cell'),
4016        require('./lazyload')
4017    );
4018  }
4019
4020} )( window, function factory( Flickity ) {
4021  return Flickity;
4022} );
4023
4024/*!
4025 * Flickity asNavFor v2.0.2
4026 * enable asNavFor for Flickity
4027 */
4028
4029/*jshint browser: true, undef: true, unused: true, strict: true*/
4030
4031( function( window, factory ) {
4032  // universal module definition
4033  /*jshint strict: false */ /*globals define, module, require */
4034  if ( typeof define == 'function' && define.amd ) {
4035    // AMD
4036    define( 'flickity-as-nav-for/as-nav-for',[
4037      'flickity/js/index',
4038      'fizzy-ui-utils/utils'
4039    ], factory );
4040  } else if ( typeof module == 'object' && module.exports ) {
4041    // CommonJS
4042    module.exports = factory(
4043      require('flickity'),
4044      require('fizzy-ui-utils')
4045    );
4046  } else {
4047    // browser global
4048    window.Flickity = factory(
4049      window.Flickity,
4050      window.fizzyUIUtils
4051    );
4052  }
4053
4054}( window, function factory( Flickity, utils ) {
4055
4056
4057
4058// -------------------------- asNavFor prototype -------------------------- //
4059
4060// Flickity.defaults.asNavFor = null;
4061
4062Flickity.createMethods.push('_createAsNavFor');
4063
4064var proto = Flickity.prototype;
4065
4066proto._createAsNavFor = function() {
4067  this.on( 'activate', this.activateAsNavFor );
4068  this.on( 'deactivate', this.deactivateAsNavFor );
4069  this.on( 'destroy', this.destroyAsNavFor );
4070
4071  var asNavForOption = this.options.asNavFor;
4072  if ( !asNavForOption ) {
4073    return;
4074  }
4075  // HACK do async, give time for other flickity to be initalized
4076  var _this = this;
4077  setTimeout( function initNavCompanion() {
4078    _this.setNavCompanion( asNavForOption );
4079  });
4080};
4081
4082proto.setNavCompanion = function( elem ) {
4083  elem = utils.getQueryElement( elem );
4084  var companion = Flickity.data( elem );
4085  // stop if no companion or companion is self
4086  if ( !companion || companion == this ) {
4087    return;
4088  }
4089
4090  this.navCompanion = companion;
4091  // companion select
4092  var _this = this;
4093  this.onNavCompanionSelect = function() {
4094    _this.navCompanionSelect();
4095  };
4096  companion.on( 'select', this.onNavCompanionSelect );
4097  // click
4098  this.on( 'staticClick', this.onNavStaticClick );
4099
4100  this.navCompanionSelect( true );
4101};
4102
4103proto.navCompanionSelect = function( isInstant ) {
4104  // wait for companion & selectedCells first. #8
4105  var companionCells = this.navCompanion && this.navCompanion.selectedCells;
4106  if ( !companionCells ) {
4107    return;
4108  }
4109  // select slide that matches first cell of slide
4110  var selectedCell = companionCells[0];
4111  var firstIndex = this.navCompanion.cells.indexOf( selectedCell );
4112  var lastIndex = firstIndex + companionCells.length - 1;
4113  var selectIndex = Math.floor( lerp( firstIndex, lastIndex,
4114    this.navCompanion.cellAlign ) );
4115  this.selectCell( selectIndex, false, isInstant );
4116  // set nav selected class
4117  this.removeNavSelectedElements();
vendor: 4,404 bytes, lines 4118-4303
4118  // stop if companion has more cells than this one
4119  if ( selectIndex >= this.cells.length ) {
4120    return;
4121  }
4122
4123  var selectedCells = this.cells.slice( firstIndex, lastIndex + 1 );
4124  this.navSelectedElements = selectedCells.map( function( cell ) {
4125    return cell.element;
4126  });
4127  this.changeNavSelectedClass('add');
4128};
4129
4130function lerp( a, b, t ) {
4131  return ( b - a ) * t + a;
4132}
4133
4134proto.changeNavSelectedClass = function( method ) {
4135  this.navSelectedElements.forEach( function( navElem ) {
4136    navElem.classList[ method ]('is-nav-selected');
4137  });
4138};
4139
4140proto.activateAsNavFor = function() {
4141  this.navCompanionSelect( true );
4142};
4143
4144proto.removeNavSelectedElements = function() {
4145  if ( !this.navSelectedElements ) {
4146    return;
4147  }
4148  this.changeNavSelectedClass('remove');
4149  delete this.navSelectedElements;
4150};
4151
4152proto.onNavStaticClick = function( event, pointer, cellElement, cellIndex ) {
4153  if ( typeof cellIndex == 'number' ) {
4154    this.navCompanion.selectCell( cellIndex );
4155  }
4156};
4157
4158proto.deactivateAsNavFor = function() {
4159  this.removeNavSelectedElements();
4160};
4161
4162proto.destroyAsNavFor = function() {
4163  if ( !this.navCompanion ) {
4164    return;
4165  }
4166  this.navCompanion.off( 'select', this.onNavCompanionSelect );
4167  this.off( 'staticClick', this.onNavStaticClick );
4168  delete this.navCompanion;
4169};
4170
4171// -----  ----- //
4172
4173return Flickity;
4174
4175}));
4176
4177/*!
4178 * imagesLoaded v4.1.4
4179 * JavaScript is all like "You images are done yet or what?"
4180 * MIT License
4181 */
4182
4183( function( window, factory ) { 'use strict';
4184  // universal module definition
4185
4186  /*global define: false, module: false, require: false */
4187
4188  if ( typeof define == 'function' && define.amd ) {
4189    // AMD
4190    define( 'imagesloaded/imagesloaded',[
4191      'ev-emitter/ev-emitter'
4192    ], function( EvEmitter ) {
4193      return factory( window, EvEmitter );
4194    });
4195  } else if ( typeof module == 'object' && module.exports ) {
4196    // CommonJS
4197    module.exports = factory(
4198      window,
4199      require('ev-emitter')
4200    );
4201  } else {
4202    // browser global
4203    window.imagesLoaded = factory(
4204      window,
4205      window.EvEmitter
4206    );
4207  }
4208
4209})( typeof window !== 'undefined' ? window : this,
4210
4211// --------------------------  factory -------------------------- //
4212
4213function factory( window, EvEmitter ) {
4214
4215
4216
4217var $ = window.jQuery;
4218var console = window.console;
4219
4220// -------------------------- helpers -------------------------- //
4221
4222// extend objects
4223function extend( a, b ) {
4224  for ( var prop in b ) {
4225    a[ prop ] = b[ prop ];
4226  }
4227  return a;
4228}
4229
4230var arraySlice = Array.prototype.slice;
4231
4232// turn element or nodeList into an array
4233function makeArray( obj ) {
4234  if ( Array.isArray( obj ) ) {
4235    // use object if already an array
4236    return obj;
4237  }
4238
4239  var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';
4240  if ( isArrayLike ) {
4241    // convert nodeList to array
4242    return arraySlice.call( obj );
4243  }
4244
4245  // array of single index
4246  return [ obj ];
4247}
4248
4249// -------------------------- imagesLoaded -------------------------- //
4250
4251/**
4252 * @param {Array, Element, NodeList, String} elem
4253 * @param {Object or Function} options - if function, use as callback
4254 * @param {Function} onAlways - callback function
4255 */
4256function ImagesLoaded( elem, options, onAlways ) {
4257  // coerce ImagesLoaded() without new, to be new ImagesLoaded()
4258  if ( !( this instanceof ImagesLoaded ) ) {
4259    return new ImagesLoaded( elem, options, onAlways );
4260  }
4261  // use elem as selector string
4262  var queryElem = elem;
4263  if ( typeof elem == 'string' ) {
4264    queryElem = document.querySelectorAll( elem );
4265  }
4266  // bail if bad element
4267  if ( !queryElem ) {
4268    console.error( 'Bad element for imagesLoaded ' + ( queryElem || elem ) );
4269    return;
4270  }
4271
4272  this.elements = makeArray( queryElem );
4273  this.options = extend( {}, this.options );
4274  // shift arguments if no options set
4275  if ( typeof options == 'function' ) {
4276    onAlways = options;
4277  } else {
4278    extend( this.options, options );
4279  }
4280
4281  if ( onAlways ) {
4282    this.on( 'always', onAlways );
4283  }
4284
4285  this.getImages();
4286
4287  if ( $ ) {
4288    // add jQuery Deferred object
4289    this.jqDeferred = new $.Deferred();
4290  }
4291
4292  // HACK check async to allow time to bind listeners
4293  setTimeout( this.check.bind( this ) );
4294}
4295
4296ImagesLoaded.prototype = Object.create( EvEmitter.prototype );
4297
4298ImagesLoaded.prototype.options = {};
4299
4300ImagesLoaded.prototype.getImages = function() {
4301  this.images = [];
4302
4303  // filter & find items if we have an item selector
vendor: 4,347 bytes, lines 4304-4460
4304  this.elements.forEach( this.addElementImages, this );
4305};
4306
4307/**
4308 * @param {Node} element
4309 */
4310ImagesLoaded.prototype.addElementImages = function( elem ) {
4311  // filter siblings
4312  if ( elem.nodeName == 'IMG' ) {
4313    this.addImage( elem );
4314  }
4315  // get background image on element
4316  if ( this.options.background === true ) {
4317    this.addElementBackgroundImages( elem );
4318  }
4319
4320  // find children
4321  // no non-element nodes, #143
4322  var nodeType = elem.nodeType;
4323  if ( !nodeType || !elementNodeTypes[ nodeType ] ) {
4324    return;
4325  }
4326  var childImgs = elem.querySelectorAll('img');
4327  // concat childElems to filterFound array
4328  for ( var i=0; i < childImgs.length; i++ ) {
4329    var img = childImgs[i];
4330    this.addImage( img );
4331  }
4332
4333  // get child background images
4334  if ( typeof this.options.background == 'string' ) {
4335    var children = elem.querySelectorAll( this.options.background );
4336    for ( i=0; i < children.length; i++ ) {
4337      var child = children[i];
4338      this.addElementBackgroundImages( child );
4339    }
4340  }
4341};
4342
4343var elementNodeTypes = {
4344  1: true,
4345  9: true,
4346  11: true
4347};
4348
4349ImagesLoaded.prototype.addElementBackgroundImages = function( elem ) {
4350  var style = getComputedStyle( elem );
4351  if ( !style ) {
4352    // Firefox returns null if in a hidden iframe https://bugzil.la/548397
4353    return;
4354  }
4355  // get url inside url("...")
4356  var reURL = /url\((['"])?(.*?)\1\)/gi;
4357  var matches = reURL.exec( style.backgroundImage );
4358  while ( matches !== null ) {
4359    var url = matches && matches[2];
4360    if ( url ) {
4361      this.addBackground( url, elem );
4362    }
4363    matches = reURL.exec( style.backgroundImage );
4364  }
4365};
4366
4367/**
4368 * @param {Image} img
4369 */
4370ImagesLoaded.prototype.addImage = function( img ) {
4371  var loadingImage = new LoadingImage( img );
4372  this.images.push( loadingImage );
4373};
4374
4375ImagesLoaded.prototype.addBackground = function( url, elem ) {
4376  var background = new Background( url, elem );
4377  this.images.push( background );
4378};
4379
4380ImagesLoaded.prototype.check = function() {
4381  var _this = this;
4382  this.progressedCount = 0;
4383  this.hasAnyBroken = false;
4384  // complete if no images
4385  if ( !this.images.length ) {
4386    this.complete();
4387    return;
4388  }
4389
4390  function onProgress( image, elem, message ) {
4391    // HACK - Chrome triggers event before object properties have changed. #83
4392    setTimeout( function() {
4393      _this.progress( image, elem, message );
4394    });
4395  }
4396
4397  this.images.forEach( function( loadingImage ) {
4398    loadingImage.once( 'progress', onProgress );
4399    loadingImage.check();
4400  });
4401};
4402
4403ImagesLoaded.prototype.progress = function( image, elem, message ) {
4404  this.progressedCount++;
4405  this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;
4406  // progress event
4407  this.emitEvent( 'progress', [ this, image, elem ] );
4408  if ( this.jqDeferred && this.jqDeferred.notify ) {
4409    this.jqDeferred.notify( this, image );
4410  }
4411  // check if completed
4412  if ( this.progressedCount == this.images.length ) {
4413    this.complete();
4414  }
4415
4416  if ( this.options.debug && console ) {
4417    console.log( 'progress: ' + message, image, elem );
4418  }
4419};
4420
4421ImagesLoaded.prototype.complete = function() {
4422  var eventName = this.hasAnyBroken ? 'fail' : 'done';
4423  this.isComplete = true;
4424  this.emitEvent( eventName, [ this ] );
4425  this.emitEvent( 'always', [ this ] );
4426  if ( this.jqDeferred ) {
4427    var jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';
4428    this.jqDeferred[ jqMethod ]( this );
4429  }
4430};
4431
4432// --------------------------  -------------------------- //
4433
4434function LoadingImage( img ) {
4435  this.img = img;
4436}
4437
4438LoadingImage.prototype = Object.create( EvEmitter.prototype );
4439
4440LoadingImage.prototype.check = function() {
4441  // If complete is true and browser supports natural sizes,
4442  // try to check for image status manually.
4443  var isComplete = this.getIsImageComplete();
4444  if ( isComplete ) {
4445    // report based on naturalWidth
4446    this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
4447    return;
4448  }
4449
4450  // If none of the checks above matched, simulate loading on detached element.
4451  this.proxyImage = new Image();
4452  this.proxyImage.addEventListener( 'load', this );
4453  this.proxyImage.addEventListener( 'error', this );
4454  // bind to image as well for Firefox. #191
4455  this.img.addEventListener( 'load', this );
4456  this.img.addEventListener( 'error', this );
4457  this.proxyImage.src = this.img.src;
4458};
4459
4460LoadingImage.prototype.getIsImageComplete = function() {
vendor: 4,192 bytes, lines 4461-4623
4461  // check for non-zero, non-undefined naturalWidth
4462  // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671
4463  return this.img.complete && this.img.naturalWidth;
4464};
4465
4466LoadingImage.prototype.confirm = function( isLoaded, message ) {
4467  this.isLoaded = isLoaded;
4468  this.emitEvent( 'progress', [ this, this.img, message ] );
4469};
4470
4471// ----- events ----- //
4472
4473// trigger specified handler for event type
4474LoadingImage.prototype.handleEvent = function( event ) {
4475  var method = 'on' + event.type;
4476  if ( this[ method ] ) {
4477    this[ method ]( event );
4478  }
4479};
4480
4481LoadingImage.prototype.onload = function() {
4482  this.confirm( true, 'onload' );
4483  this.unbindEvents();
4484};
4485
4486LoadingImage.prototype.onerror = function() {
4487  this.confirm( false, 'onerror' );
4488  this.unbindEvents();
4489};
4490
4491LoadingImage.prototype.unbindEvents = function() {
4492  this.proxyImage.removeEventListener( 'load', this );
4493  this.proxyImage.removeEventListener( 'error', this );
4494  this.img.removeEventListener( 'load', this );
4495  this.img.removeEventListener( 'error', this );
4496};
4497
4498// -------------------------- Background -------------------------- //
4499
4500function Background( url, element ) {
4501  this.url = url;
4502  this.element = element;
4503  this.img = new Image();
4504}
4505
4506// inherit LoadingImage prototype
4507Background.prototype = Object.create( LoadingImage.prototype );
4508
4509Background.prototype.check = function() {
4510  this.img.addEventListener( 'load', this );
4511  this.img.addEventListener( 'error', this );
4512  this.img.src = this.url;
4513  // check if image is already complete
4514  var isComplete = this.getIsImageComplete();
4515  if ( isComplete ) {
4516    this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
4517    this.unbindEvents();
4518  }
4519};
4520
4521Background.prototype.unbindEvents = function() {
4522  this.img.removeEventListener( 'load', this );
4523  this.img.removeEventListener( 'error', this );
4524};
4525
4526Background.prototype.confirm = function( isLoaded, message ) {
4527  this.isLoaded = isLoaded;
4528  this.emitEvent( 'progress', [ this, this.element, message ] );
4529};
4530
4531// -------------------------- jQuery -------------------------- //
4532
4533ImagesLoaded.makeJQueryPlugin = function( jQuery ) {
4534  jQuery = jQuery || window.jQuery;
4535  if ( !jQuery ) {
4536    return;
4537  }
4538  // set local variable
4539  $ = jQuery;
4540  // $().imagesLoaded()
4541  $.fn.imagesLoaded = function( options, callback ) {
4542    var instance = new ImagesLoaded( this, options, callback );
4543    return instance.jqDeferred.promise( $(this) );
4544  };
4545};
4546// try making plugin
4547ImagesLoaded.makeJQueryPlugin();
4548
4549// --------------------------  -------------------------- //
4550
4551return ImagesLoaded;
4552
4553});
4554
4555/*!
4556 * Flickity imagesLoaded v2.0.0
4557 * enables imagesLoaded option for Flickity
4558 */
4559
4560/*jshint browser: true, strict: true, undef: true, unused: true */
4561
4562( function( window, factory ) {
4563  // universal module definition
4564  /*jshint strict: false */ /*globals define, module, require */
4565  if ( typeof define == 'function' && define.amd ) {
4566    // AMD
4567    define( [
4568      'flickity/js/index',
4569      'imagesloaded/imagesloaded'
4570    ], function( Flickity, imagesLoaded ) {
4571      return factory( window, Flickity, imagesLoaded );
4572    });
4573  } else if ( typeof module == 'object' && module.exports ) {
4574    // CommonJS
4575    module.exports = factory(
4576      window,
4577      require('flickity'),
4578      require('imagesloaded')
4579    );
4580  } else {
4581    // browser global
4582    window.Flickity = factory(
4583      window,
4584      window.Flickity,
4585      window.imagesLoaded
4586    );
4587  }
4588
4589}( window, function factory( window, Flickity, imagesLoaded ) {
4590'use strict';
4591
4592Flickity.createMethods.push('_createImagesLoaded');
4593
4594var proto = Flickity.prototype;
4595
4596proto._createImagesLoaded = function() {
4597  this.on( 'activate', this.imagesLoaded );
4598};
4599
4600proto.imagesLoaded = function() {
4601  if ( !this.options.imagesLoaded ) {
4602    return;
4603  }
4604  var _this = this;
4605  function onImagesLoadedProgress( instance, image ) {
4606    var cell = _this.getParentCell( image.img );
4607    _this.cellSizeChange( cell && cell.element );
4608    if ( !_this.options.freeScroll ) {
4609      _this.positionSliderAtSelected();
4610    }
4611  }
4612  imagesLoaded( this.slider ).on( 'progress', onImagesLoadedProgress );
4613};
4614
4615return Flickity;
4616
4617}));
4618
4619/**
4620 * Flickity fade v1.0.0
4621 * Fade between Flickity slides
4622 */
4623
4624/* jshint browser: true, undef: true, unused: true */
4625
4626( function( window, factory ) {
4627  // universal module definition
4628  /*globals define, module, require */
4629  if ( typeof define == 'function' && define.amd ) {
4630    // AMD
4631    define( [
4632      'flickity/js/index',
4633      'fizzy-ui-utils/utils',
4634    ], factory );
4635  } else if ( typeof module == 'object' && module.exports ) {
4636    // CommonJS
4637    module.exports = factory(
4638      require('flickity'),
4639      require('fizzy-ui-utils')
4640    );
4641  } else {
4642    // browser global
4643    factory(
4644      window.Flickity,
4645      window.fizzyUIUtils
4646    );
4647  }
4648
4649}( this, function factory( Flickity, utils ) {
4650
4651// ---- Slide ---- //
4652
4653var Slide = Flickity.Slide;
4654
4655var slideUpdateTarget = Slide.prototype.updateTarget;
4656Slide.prototype.updateTarget = function() {
4657  slideUpdateTarget.apply( this, arguments );
4658  if ( !this.parent.options.fade ) {
4659    return;
4660  }
4661  // position cells at selected target
4662  var slideTargetX = this.target - this.x;
4663  var firstCellX = this.cells[0].x;
4664  this.cells.forEach( function( cell ) {
4665    var targetX = cell.x - firstCellX - slideTargetX;
4666    cell.renderPosition( targetX );
4667  });
4668};
4669
4670Slide.prototype.setOpacity = function( alpha ) {
4671  this.cells.forEach( function( cell ) {
4672    cell.element.style.opacity = alpha;
4673  });
4674};
4675
4676// ---- Flickity ---- //
4677
4678var proto = Flickity.prototype;
4679
4680Flickity.createMethods.push('_createFade');
4681
4682proto._createFade = function() {
4683  this.fadeIndex = this.selectedIndex;
4684  this.prevSelectedIndex = this.selectedIndex;
4685  this.on( 'select', this.onSelectFade );
4686  this.on( 'dragEnd', this.onDragEndFade );
4687  this.on( 'settle', this.onSettleFade );
4688  this.on( 'activate', this.onActivateFade );
4689  this.on( 'deactivate', this.onDeactivateFade );
4690};
4691
4692var updateSlides = proto.updateSlides;
4693proto.updateSlides = function() {
4694  updateSlides.apply( this, arguments );
4695  if ( !this.options.fade ) {
4696    return;
4697  }
4698  // set initial opacity
4699  this.slides.forEach( function( slide, i ) {
4700    var alpha = i == this.selectedIndex ? 1 : 0;
4701    slide.setOpacity( alpha );
4702  }, this );
4703};
4704
4705/* ---- events ---- */
4706
4707proto.onSelectFade = function() {
4708  // in case of resize, keep fadeIndex within current count
4709  this.fadeIndex = Math.min( this.prevSelectedIndex, this.slides.length - 1 );
4710  this.prevSelectedIndex = this.selectedIndex;
4711};
4712
4713proto.onSettleFade = function() {
4714  delete this.didDragEnd;
4715  if ( !this.options.fade ) {
4716    return;
4717  }
4718  // set full and 0 opacity on selected & faded slides
4719  this.selectedSlide.setOpacity( 1 );
4720  var fadedSlide = this.slides[ this.fadeIndex ];
4721  if ( fadedSlide && this.fadeIndex != this.selectedIndex ) {
4722    this.slides[ this.fadeIndex ].setOpacity( 0 );
4723  }
4724};
4725
4726proto.onDragEndFade = function() {
4727  // set flag
4728  this.didDragEnd = true;
4729};
4730
4731proto.onActivateFade = function() {
4732  if ( this.options.fade ) {
4733    this.element.classList.add('is-fade');
4734  }
4735};
4736
4737proto.onDeactivateFade = function() {
4738  if ( !this.options.fade ) {
4739    return;
4740  }
4741  this.element.classList.remove('is-fade');
4742  // reset opacity
4743  this.slides.forEach( function( slide ) {
4744    slide.setOpacity('');
4745  });
4746};
4747
4748/* ---- position & fading ---- */
4749
4750var positionSlider = proto.positionSlider;
4751proto.positionSlider = function() {
4752  if ( !this.options.fade ) {
4753    positionSlider.apply( this, arguments );
4754    return;
4755  }
4756
4757  this.fadeSlides();
4758  this.dispatchScrollEvent();
4759};
4760
4761var positionSliderAtSelected = proto.positionSliderAtSelected;
4762proto.positionSliderAtSelected = function() {
4763  if ( this.options.fade ) {
4764    // position fade slider at origin
4765    this.setTranslateX( 0 );
4766  }
4767  positionSliderAtSelected.apply( this, arguments );
4768};
4769
4770proto.fadeSlides = function() {
4771  if ( this.slides.length < 2 ) {
4772    return;
4773  }
4774  // get slides to fade-in & fade-out
4775  var indexes = this.getFadeIndexes();
4776  var fadeSlideA = this.slides[ indexes.a ];
4777  var fadeSlideB = this.slides[ indexes.b ];
4778  var distance = this.wrapDifference( fadeSlideA.target, fadeSlideB.target );
4779  var progress = this.wrapDifference( fadeSlideA.target, -this.x );
4780  progress = progress / distance;
4781
4782  fadeSlideA.setOpacity( 1 - progress );
4783  fadeSlideB.setOpacity( progress );
4784
4785  // hide previous slide
4786  var fadeHideIndex = indexes.a;
4787  if ( this.isDragging ) {
4788    fadeHideIndex = progress > 0.5 ? indexes.a : indexes.b;
4789  }
4790  var isNewHideIndex = this.fadeHideIndex != undefined &&
4791    this.fadeHideIndex != fadeHideIndex &&
4792    this.fadeHideIndex != indexes.a &&
4793    this.fadeHideIndex != indexes.b;
4794  if ( isNewHideIndex ) {
4795    // new fadeHideSlide set, hide previous
4796    this.slides[ this.fadeHideIndex ].setOpacity( 0 );
4797  }
4798  this.fadeHideIndex = fadeHideIndex;
4799};
4800
4801proto.getFadeIndexes = function() {
4802  if ( !this.isDragging && !this.didDragEnd ) {
4803    return {
4804      a: this.fadeIndex,
4805      b: this.selectedIndex,
4806    };
4807  }
4808  if ( this.options.wrapAround ) {
4809    return this.getFadeDragWrapIndexes();
4810  } else {
4811    return this.getFadeDragLimitIndexes();
4812  }
4813};
4814
4815proto.getFadeDragWrapIndexes = function() {
4816  var distances = this.slides.map( function( slide, i ) {
4817    return this.getSlideDistance( -this.x, i );
4818  }, this );
4819  var absDistances = distances.map( function( distance ) {
4820    return Math.abs( distance );
4821  });
4822  var minDistance = Math.min.apply( Math, absDistances );
4823  var closestIndex = absDistances.indexOf( minDistance );
4824  var distance = distances[ closestIndex ];
4825  var len = this.slides.length;
4826
4827  var delta = distance >= 0 ? 1 : -1;
4828  return {
4829    a: closestIndex,
4830    b: utils.modulo( closestIndex + delta, len ),
4831  };
4832};
4833
4834proto.getFadeDragLimitIndexes = function() {
4835  // calculate closest previous slide
4836  var dragIndex = 0;
4837  for ( var i=0; i < this.slides.length - 1; i++ ) {
4838    var slide = this.slides[i];
4839    if ( -this.x < slide.target ) {
4840      break;
4841    }
4842    dragIndex = i;
4843  }
4844  return {
4845    a: dragIndex,
4846    b: dragIndex + 1,
4847  };
4848};
4849
4850proto.wrapDifference = function( a, b ) {
4851  var diff = b - a;
4852
4853  if ( !this.options.wrapAround ) {
4854    return diff;
4855  }
4856
4857  var diffPlus = diff + this.slideableWidth;
4858  var diffMinus = diff - this.slideableWidth;
4859  if ( Math.abs( diffPlus ) < Math.abs( diff ) ) {
4860    diff = diffPlus;
4861  }
4862  if ( Math.abs( diffMinus ) < Math.abs( diff ) ) {
4863    diff = diffMinus;
4864  }
4865  return diff;
4866};
4867
4868// ---- wrapAround ---- //
4869
4870var _getWrapShiftCells = proto._getWrapShiftCells;
4871proto._getWrapShiftCells = function() {
4872  if ( !this.options.fade ) {
4873    _getWrapShiftCells.apply( this, arguments );
4874  }
4875};
4876
4877var shiftWrapCells = proto.shiftWrapCells;
4878proto.shiftWrapCells = function() {
4879  if ( !this.options.fade ) {
4880    shiftWrapCells.apply( this, arguments );
4881  }
4882};
4883
4884return Flickity;
4885
4886}));

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.