!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))&&Ce}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 jt(t[r],e)))||t.splice(r,1);return t}function fa(t){return t._gsap||ea(Ot(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=ct.length,i=ct.slice(0);for(dt={},t=ct.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){ct.length&&!B&&ma(),t.render(e,r,i||B&&e<0&&(t._initted||t._startAt)),ct.length&&!B&&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||L,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])}}($(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),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&&(B?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||V)||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._initted&&!e._dur)&&(r=Ga(t.rawTime(),e),(!e._dur||kt(0,e.totalDuration(),r)-e._tTime>V)&&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=-V}}function Ka(e,r,i,n){return r.parent&&za(r),r._start=ja((t(i)?i:i||e!==L?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 Ht(t,e,n),t._initted?!r&&t._pt&&!B&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&f!==Et.frame?(ct.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 Ut?Aa(t):Ra(t,t._dur)}function 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 Gt(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=Ot(r)[0]||R("Invalid scope")||{},function(t){var e=r.current||r.nativeElement||r;return Ot(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},_=Yt(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,c=(r||p).length,d=y[c];if(!d){if(!(f="auto"===p.grid?0:(p.grid||[1,U])[1])){for(h=-U;h<(h=r[f++].getBoundingClientRect().left)&&f<c;);f--}for(d=y[c]=[],i=T?Math.min(f,c)*w-.5:m%f,n=f===U?0:T?c*x/f-.5:m/f|0,l=U,u=h=0;u<c;u++)a=u%f-i,s=n-(u/f|0),d[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(d),d.max=h-l,d.min=l,d.v=c=(parseFloat(p.amount)||parseFloat(p.each)*(c<f?c-1:b?"y"===b?c/f:f:Math.max(f,c/f))||0)*("edges"===m?-1:1),d.b=c<0?g-c:g,d.u=Ya(p.amount||p.each)||0,_=_&&c<0?Lt(_):_}return c=(d[t]-d.min)/d.max||0,ja(d.b+(_?_(c):c)*d.v)+d.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=$(h);return!r&&v(h)&&(l=r=h.radius||U,h.values?(h=Ot(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($(t)?!e:!0===r?!!(r=0):!i,function(){return $(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(!!B),t.progress()<1&&Ct(t,"onInterrupt"),t}function yb(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)*At+.5|0}function zb(e,r,i){var n,a,s,o,u,h,l,f,c,d,p=e?t(e)?[e>>16,e>>8&At,e&At]:0:St.black;if(!p){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),St[e])p=St[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&At,p&At,parseInt(e.substr(7),16)/255];p=[(e=parseInt(e.substr(1),16))>>16,e>>8&At,e&At]}else if("hsl"===e.substr(0,3))if(p=d=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]=yb(o+1/3,n,a),p[1]=yb(o,n,a),p[2]=yb(o-1/3,n,a);else p=e.match(tt)||St.transparent;p=p.map(Number)}return r&&!d&&(n=p[0]/At,a=p[1]/At,s=p[2]/At,h=((l=Math.max(n,a,s))+(f=Math.min(n,a,s)))/2,l===f?o=u=0:(c=l-f,u=.5<h?c/(2-l-f):c/(l+f),o=l===n?(a-s)/c+(a<s?6:0):l===a?(s-n)/c+2:(n-a)/c+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 Ab(t){var r=[],i=[],n=-1;return t.split(Rt).forEach(function(t){var e=t.match(rt)||[];r.push.apply(r,e),i.push(n+=e.length+1)}),r.c=i,r}function Bb(t,e,r){var i,n,a,s,o="",u=(t+o).match(Rt),h=e?"hsla(":"rgba(",l=0;if(!u)return t;if(u=u.map(function(t){return(t=zb(t,e,1))&&h+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"}),r&&(a=Ab(t),(i=r.c).join(o)!==a.c.join(o)))for(s=(n=t.replace(Rt,"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(Rt)).length-1;l<s;l++)o+=n[l]+u[l];return o+n[s]}function Eb(t){var e,r=t.join(" ");if(Rt.lastIndex=0,Rt.test(r))return e=Dt.test(r),t[1]=Bb(t[1],e),t[0]=Bb(t[0],e,Ab(t[1])),!0}function Nb(t){var e=(t+"").split("("),r=Ft[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)):Ft._CE&&It.test(t)?Ft._CE("",t):r}function Pb(t,e){for(var r,i=t._first;i;)i instanceof Ut?Pb(i,e):!i.vars.yoyoEase||i._yoyo&&i._repeat||i._yoyo===e||(i.timeline?Pb(i.timeline,e):(r=i._ease,i._ease=i._yEase,i._yEase=r,i._yoyo=e)),i=i._next}function Rb(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 Ft[t]=ot[t]=a,Ft[n=t.toLowerCase()]=r,a)Ft[n+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Ft[t+"."+e]=a[e]}),a}function Sb(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}}function Tb(r,t,e){function Hm(t){return 1===t?1:i*Math.pow(2,-10*t)*G((t-a)*n)+1}var i=1<=t?t:1,n=(e||(r?.3:.45))/(t<1?t:1),a=n/W*(Math.asin(1/i)||0),s="out"===r?Hm:"in"===r?function(t){return 1-Hm(1-t)}:Sb(Hm);return n=W/n,s.config=function(t,e){return Tb(r,t,e)},s}function Ub(e,r){function Pm(t){return t?--t*t*((r+1)*t+r)+1:0}void 0===r&&(r=1.70158);var t="out"===e?Pm:"in"===e?function(t){return 1-Pm(1-t)}:Sb(Pm);return t.config=function(t){return Ub(e,t)},t}var I,B,l,L,h,n,a,i,o,f,c,d,p,_,m,g,b,k,M,O,C,A,D,E,z,F,Y,N,j={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},q={duration:.5,overwrite:!1,delay:0},U=1e8,V=1/U,W=2*Math.PI,X=W/4,H=0,K=Math.sqrt,Z=Math.cos,G=Math.sin,J="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},$=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={},ct=[],dt={},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*($(i)?i[0]:i).totalDuration()),1<n?_parsePosition(t,e.substr(0,n-1),i)+a:h+a)):null==e?h:+e},kt=function _clamp(t,e,r){return r<t?t:e<r?e:r},Mt=[].slice,Ot=function toArray(t,e,i){return l&&!e&&l.selector?l.selector(t):!r(t)||i||!n&&zt()?$(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,Ot(t)):i.push(t)})||i}(t,i):_a(t)?Mt.call(t,0):t?[t]:[]:Mt.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&&ct.length&&ma(),h&&(l=h),a=i?o.apply(n,i):o.call(n),l=u,a},At=255,St={aqua:[0,At,At],lime:[0,At,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,At],navy:[0,0,128],white:[At,At,At],olive:[128,128,0],yellow:[At,At,0],orange:[At,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[At,0,0],pink:[At,192,203],cyan:[0,At,At],transparent:[At,At,At,0]},Rt=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in St)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),Dt=/hsl[a]?\(/,Et=(M=Date.now,O=500,C=33,A=M(),D=A,z=E=1e3/240,g={time:0,frame:0,tick:function tick(){wl(!0)},deltaRatio:function deltaRatio(t){return b/(1e3/(t||60))},wake:function wake(){o&&(!n&&x()&&(h=n=window,a=h.document||{},ot.gsap=Ce,(h.gsapVersions||(h.gsapVersions=[])).push(Ce.version),P(i||h.GreenSockGlobals||!h.gsap&&h||{}),m=h.requestAnimationFrame),p&&g.sleep(),_=m||function(t){return setTimeout(t,z-1e3*g.time+1|0)},d=1,wl(2))},sleep:function sleep(){(m?h.cancelAnimationFrame:clearTimeout)(p),d=0,_=T},lagSmoothing:function lagSmoothing(t,e){O=t||1/0,C=Math.min(e||33,O)},fps:function fps(t){E=1e3/(t||240),z=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),F[e?"unshift":"push"](a),zt(),a},remove:function remove(t,e){~(e=F.indexOf(t))&&F.splice(e,1)&&e<=k&&k--},_listeners:F=[]}),zt=function _wake(){return!d&&Et.wake()},Ft={},It=/^[\d.\-M][\d.\-,\s]/,Bt=/["']/g,Lt=function _invertEase(e){return function(t){return 1-e(1-t)}},Yt=function _parseEase(t,e){return t&&(s(t)?t:Ft[t]||Nb(t))||e};function wl(t){var e,r,i,n,a=M()-D,s=!0===t;if(O<a&&(A+=a-C),(0<(e=(i=(D+=a)-A)-z)||s)&&(n=++g.frame,b=i-1e3*g.time,g.time=i/=1e3,z+=e+(E<=e?4:E-e),r=1),s||(p=_(wl)),r)for(k=0;k<F.length;k++)F[k](i,b,n,t)}function en(t){return t<N?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;Rb(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})}),Ft.Linear.easeNone=Ft.none=Ft.Linear.easeIn,Rb("Elastic",Tb("in"),Tb("out"),Tb()),Y=7.5625,N=1/2.75,Rb("Bounce",function(t){return 1-en(1-t)},en),Rb("Expo",function(t){return t?Math.pow(2,10*(t-1)):0}),Rb("Circ",function(t){return-(K(1-t*t)-1)}),Rb("Sine",function(t){return 1===t?1:1-Z(t*X)}),Rb("Back",Ub("in"),Ub("out"),Ub()),Ft.SteppedEase=Ft.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*kt(0,.99999999,t)|0)+n)*r}}},q.ease=Ft["quad.out"],ha("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return vt+=t+","+t+"Params,"});var Nt,jt=function GSCache(t,e){this.id=H++,(t._gsap=this).target=t,this.harness=e,this.get=e?e.get:ga,this.set=e?e.getSetter:re},qt=((Nt=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},Nt.duration=function duration(t){return arguments.length?this.totalDuration(0<this._repeat?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},Nt.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},Nt.totalTime=function totalTime(t,e){if(zt(),!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)===V||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),na(this,t,e)),this},Nt.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},Nt.totalProgress=function totalProgress(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.ratio},Nt.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):this.ratio},Nt.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},Nt.timeScale=function timeScale(t){if(!arguments.length)return this._rts===-V?0:this._rts;if(this._rts===t)return this;var e=this.parent&&this._ts?Ga(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||t===-V?0:this._rts,this.totalTime(kt(-this._delay,this._tDur,e),!0),Ha(this),function _recacheAncestors(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},Nt.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):(zt(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==V&&(this._tTime-=V)))),this):this._ps},Nt.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},Nt.endTime=function endTime(t){return this._start+(w(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},Nt.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},Nt.revert=function revert(t){void 0===t&&(t=lt);var e=B;return B=t,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),B=e,this},Nt.globalTime=function globalTime(t){for(var e=this,r=arguments.length?t:e.rawTime();e;)r=e._start+r/(e._ts||1),e=e._dp;return!this.parent&&this._sat?this._sat.vars.immediateRender?-1:this._sat.globalTime(t):r},Nt.repeat=function repeat(t){return arguments.length?(this._repeat=t===1/0?-2:t,Sa(this)):-2===this._repeat?1/0:this._repeat},Nt.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},Nt.yoyo=function yoyo(t){return arguments.length?(this._yoyo=t,this):this._yoyo},Nt.seek=function seek(t,e){return this.totalTime(xt(this,t),w(e))},Nt.restart=function restart(t,e){return this.play().totalTime(t?-this._delay:0,w(e))},Nt.play=function play(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},Nt.reverse=function reverse(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},Nt.pause=function pause(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},Nt.resume=function resume(){return this.paused(!1)},Nt.reversed=function reversed(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-V:0)),this):this._rts<0},Nt.invalidate=function invalidate(){return this._initted=this._act=0,this._zTime=-V,this},Nt.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)-V))},Nt.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]},Nt.then=function then(t){var i=this;return new Promise(function(e){function zo(){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?zo():i._prom=zo})},Nt.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),d||Et.wake()}qa(qt.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:-V,_prom:0,_ps:!1,_rts:1});var Ut=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),L&&Ka(t.parent||L,_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 Gt(t,e,xt(this,r),1),this},e.call=function call(t,e,r){return Ka(this,Gt.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 Gt(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,c,d,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!==L&&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(d=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)),c=Tt(this._tTime,o),!_&&this._tTime&&c!==s&&(c=s),d&&1&s&&(i=g-i,p=1),s!==c&&!this._lock){var T=d&&1&c,b=T===(d&&1&s);if(s<c&&(T=!T),_=T?0:g,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;Pb(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&&(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=-V);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||B&&(n._initted||n._startAt)),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=w?-V:V);break}}n=a}}if(h&&!e&&(this.pause(),h.render(_<=i?0:-V)._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 qt)){if($(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=Gt.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 Gt?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(Et.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=Gt.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--;)Vt!==i[n]&&i[n].kill(t,e);return this},e.getTweensOf=function getTweensOf(e,r){for(var i,n=[],a=Ot(e),s=this._first,o=t(r);s;)s instanceof Gt?la(s._targets,a)&&(o?(!Vt||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=Gt.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())||V,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+V)},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===L&&a._time>n?a._time:n,1,1),a._dirty=0}return a._tDur},Timeline.updateRoot=function updateRoot(t){if(L._ts&&(na(L,Ga(t,L)),f=Et.frame),Et.frame>=mt){mt+=j.autoSleep||120;var e=L._first;if((!e||!e._ts)&&j.autoSleep&&Et._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Et.sleep()}}},Timeline}(qt);qa(Ut.prototype,{_lock:0,_hasPause:0,_forcing:0});function _b(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=Qt(t,a,e,i,n)),!v(t)||t.style&&t.nodeType||$(t)||J(t))return r(t)?Qt(t,a,e,i,n):t;var o,u={};for(o in t)u[o]=Qt(t[o],a,e,i,n);return u}(e[t],n,a,o,i),i,n,o)&&(i._pt=h=new pe(i._pt,a,t,0,1,u.render,u,0,u.priority),i!==c))for(l=i._ptLookup[i._targets.indexOf(a)],f=u._props.length;f--;)l[u._props[f]]=h;return u}function fc(t,r,e,i){var n,a,s=r.ease||i||"power1.inOut";if($(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 Vt,Wt,Xt=function _addPropTween(t,e,i,n,a,o,u,h,l,f){s(n)&&(n=n(a||0,t,o));var c,d=t[e],p="get"!==i?i:s(d)?l?t[e.indexOf("set")||!s(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():d,_=s(d)?l?ee:$t:Jt;if(r(n)&&(~n.indexOf("random(")&&(n=ob(n)),"="===n.charAt(1)&&(!(c=ka(p,n)+(Ya(p)||0))&&0!==c||(n=c))),!f||p!==n||Wt)return isNaN(p*n)||""===n?(d||e in t||Q(e,n),function _addComplexStringPropTween(t,e,r,i,n,a,s){var o,u,h,l,f,c,d,p,_=new pe(this._pt,t,e,0,1,se,null,n),m=0,g=0;for(_.b=r,_.e=i,r+="",(d=~(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++]&&(c=parseFloat(u[g-1])||0,_._pt={_next:_._pt,p:f||1===g?f:",",s:c,c:"="===l.charAt(1)?ka(c,l)-c:parseFloat(l)-c,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)||d)&&(_.e=0),this._pt=_}.call(this,t,e,p,n,_,h||j.stringFilter,l)):(c=new pe(this._pt,t,e,+p||0,n-(p||0),"boolean"==typeof d?ae:ne,0,_),l&&(c.fp=l),u&&c.modifier(u,this,t),this._pt=c)},Ht=function _initTween(t,e,r){var i,n,a,s,o,u,h,l,f,c,d,p,_,m=t.vars,g=m.ease,v=m.startAt,y=m.immediateRender,T=m.lazy,b=m.onUpdate,x=m.onUpdateParams,k=m.callbackScope,M=m.runBackwards,O=m.yoyoEase,P=m.keyframes,C=m.autoRevert,A=t._dur,S=t._startAt,R=t._targets,D=t.parent,E=D&&"nested"===D.data?D.vars.targets:R,z="auto"===t._overwrite&&!I,F=t.timeline;if(!F||P&&g||(g="none"),t._ease=Yt(g,q.ease),t._yEase=O?Lt(Yt(!0===O?g:O,q.ease)):0,O&&t._yoyo&&!t._repeat&&(O=t._yEase,t._yEase=t._ease,t._ease=O),t._from=!F&&!!m.runBackwards,!F||P&&!m.stagger){if(p=(l=R[0]?fa(R[0]).harness:0)&&m[l.prop],i=ua(m,ft),S&&(S._zTime<0&&S.progress(1),e<0&&M&&y&&!C?S.render(-1,!0):S.revert(M&&A?ht:ut),S._lazy=0),v){if(za(t._startAt=Gt.set(R,qa({data:"isStart",overwrite:!1,parent:D,immediateRender:!0,lazy:!S&&w(T),startAt:null,delay:0,onUpdate:b,onUpdateParams:x,callbackScope:k,stagger:0},v))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(B||!y&&!C)&&t._startAt.revert(ht),y&&A&&e<=0&&r<=0)return void(e&&(t._zTime=e))}else if(M&&A&&!S)if(e&&(y=!1),a=qa({overwrite:!1,data:"isFromStart",lazy:y&&!S&&w(T),immediateRender:y,stagger:0,parent:D},i),p&&(a[l.prop]=p),za(t._startAt=Gt.set(R,a)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(B?t._startAt.revert(ht):t._startAt.render(-1,!0)),t._zTime=e,y){if(!e)return}else _initTween(t._startAt,V,V);for(t._pt=t._ptCache=0,T=A&&w(T)||T&&!A,n=0;n<R.length;n++){if(h=(o=R[n])._gsap||ea(R)[n]._gsap,t._ptLookup[n]=c={},dt[h.id]&&ct.length&&ma(),d=E===R?n:E.indexOf(o),l&&!1!==(f=new l).init(o,p||i,t,d,E)&&(t._pt=s=new pe(t._pt,o,f.name,0,1,f.render,f,0,f.priority),f._props.forEach(function(t){c[t]=s}),f.priority&&(u=1)),!l||p)for(a in i)pt[a]&&(f=_b(a,i,t,d,o,E))?f.priority&&(u=1):c[a]=s=Xt.call(t,o,a,"get",i[a],d,E,0,m.stringFilter);t._op&&t._op[n]&&t.kill(o,t._op[n]),z&&t._pt&&(Vt=t,L.killTweensOf(o,c,t.globalTime(e)),_=!t.parent,Vt=0),t._pt&&T&&(dt[h.id]=1)}u&&de(t),t._onInit&&t._onInit(t)}t._onUpdate=b,t._initted=(!t._op||t._pt)&&!_,P&&e<=0&&F.render(U,!0,!0)},Qt=function _parseFuncOrString(t,e,i,n,a){return s(t)?t.call(e,i,n,a):r(t)&&~t.indexOf("random(")?ob(t):t},Kt=vt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",Zt={};ha(Kt+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return Zt[t]=1});var Gt=function(z){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,c,d,p=(a=z.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,k=p.defaults,M=p.scrollTrigger,O=p.yoyoEase,P=r.parent||L,C=($(e)||J(e)?t(e[0]):"length"in r)?[e]:Ot(e);if(a._targets=C.length?ea(C):R("GSAP target "+e+" not found. https://greensock.com",!j.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=b,x||T||y(_)||y(m)){if(r=a.vars,(s=a.timeline=new Ut({data:"nested",defaults:k||{},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,c=T&&eb(T),v(T))for(l in T)~Kt.indexOf(l)&&((d=d||{})[l]=T[l]);for(o=0;o<h;o++)(u=ua(r,Zt)).stagger=0,O&&(u.yoyoEase=O),d&&yt(u,d),f=C[o],u.duration=+Qt(_,_assertThisInitialized(a),o,f,C),u.delay=(+Qt(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,c?c(o,f,C):0),s._ease=Ft.none;s.duration()?_=m=0:a.timeline=0}else if(x){va(qa(s.vars.defaults,{ease:"none"})),s._ease=Yt(x.ease||r.ease||"none");var A,S,D,E=0;if($(x))x.forEach(function(t){return s.to(C,t,">")}),s.duration();else{for(l in u={},x)"ease"===l||"easeEach"===l||fc(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++)(D={ease:(S=A[o]).e,duration:(S.t-(o?A[o-1].t:0))/100*_})[l]=S.v,s.to(C,D,E),E+=D.duration;s.duration()<_&&s.to({},{duration:_-s.duration()})}}_||a.duration(_=s.duration())}else a.timeline=0;return!0!==b||I||(Vt=_assertThisInitialized(a),L.killTweensOf(C),Vt=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=-V,a.render(Math.max(0,-m)||0)),M&&La(_assertThisInitialized(a),M),a}_inheritsLoose(Tween,z);var e=Tween.prototype;return e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f,c=this._time,d=this._tDur,p=this._dur,_=t<0,m=d-V<t&&!_?d:t<V?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===d?(a=this._repeat,i=p):((a=~~(m/s))&&a===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===c&&!r&&this._initted)return this._tTime=m,this;a!==o&&(l&&this._yEase&&Pb(l,u),!this.vars.repeatRefresh||u||this._lock||(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(c!==this._time)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&&!c&&!e&&(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:!i&&u?-V: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||_&&!c||!(m||c||u)||(Ct(this,m===d?"onComplete":"onReverseComplete",!0),!this._prom||m<d&&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=kt(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||B||i||t._zTime===V||!e&&t._zTime){if(!t._initted&&Ma(t,e,i,r,l))return;for(s=t._zTime,t._zTime=e||(r?V: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||B||(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),z.prototype.invalidate.call(this,t)},e.resetTo=function resetTo(t,e,r,i){d||Et.wake(),this._ts||this.play();var n,a=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Ht(this,a),n=this._ease(a/this._dur),function _updatePropTweens(t,e,r,i,n,a,s){var o,u,h,l,f=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!f)for(f=t._ptCache[e]=[],h=t._ptLookup,l=t._targets.length;l--;){if((o=h[l][e])&&o.d&&o.d._pt)for(o=o.d._pt;o&&o.p!==e&&o.fp!==e;)o=o._next;if(!o)return Wt=1,t.vars[e]="+=0",Ht(t,s),Wt=0,1;f.push(o)}for(l=f.length;l--;)(o=(u=f[l])._pt||u).s=!i&&0!==i||n?o.s+(i||0)+a*o.c:i,o.c=r-o.s,u.e&&(u.e=ia(r)+Ya(u.e)),u.b&&(u.b=o.s+Ya(u.b))}(this,t,e,r,i,n,a)?this.resetTo(t,e,r,i):(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,Vt&&!0!==Vt.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,c=t?Ot(t):f,d=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,c))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(~c.indexOf(f[l]))for(u in a=d[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 L.killTweensOf(t,e,r)},Tween}(qt);qa(Gt.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ha("staggerTo,staggerFrom,staggerFromTo",function(r){Gt[r]=function(){var t=new Ut,e=Mt.call(arguments,0);return e.splice("staggerFromTo"===r?5:4,0,0),t[r].apply(t,e)}});function nc(t,e,r){return t.setAttribute(e,r)}function vc(t,e,r,i){i.mSet(t,e,i.m.call(i.tween,r,i.mt),i)}var Jt=function _setterPlain(t,e,r){return t[e]=r},$t=function _setterFunc(t,e,r){return t[e](r)},ee=function _setterFuncWithParam(t,e,r,i){return t[e](i.fp,r)},re=function _getSetter(t,e){return s(t[e])?$t:u(t[e])&&t.setAttribute?nc:Jt},ne=function _renderPlain(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},ae=function _renderBoolean(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},se=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)},oe=function _renderPropTweens(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},le=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},fe=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},de=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},pe=(PropTween.prototype.modifier=function modifier(t,e,r){this.mSet=this.mSet||this.set,this.set=vc,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||ne,this.d=s||this,this.set=o||Jt,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=Gt,ot.TimelineLite=ot.TimelineMax=Ut,L=new Ut({sortChildren:!1,defaults:q,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),j.stringFilter=Eb;function Cc(t){return(Te[t]||we).map(function(t){return t()})}function Dc(){var t=Date.now(),o=[];2<t-xe&&(Cc("matchMediaInit"),ye.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))}),Cc("matchMediaRevert"),o.forEach(function(t){return t.onMatch(t)}),xe=t,Cc("matchMedia"))}var _e,ye=[],Te={},we=[],xe=0,ke=((_e=Context.prototype).add=function add(t,i,n){function Cw(){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=Cw,t===s?Cw(a):t?a[t]=Cw:Cw},_e.ignore=function ignore(t){var e=l;l=null,t(this),l=e},_e.getTweens=function getTweens(){var e=[];return this.data.forEach(function(t){return t instanceof Context?e.push.apply(e,t.getTweens()):t instanceof Gt&&!(t.parent&&"nested"===t.parent.data)&&e.push(t)}),e},_e.clear=function clear(){this._r.length=this.data.length=0},_e.kill=function kill(e,t){var r=this;if(e){var i=this.getTweens();this.data.forEach(function(t){"isFlip"===t.data&&(t.revert(),t.getChildren(!0,!0,!1).forEach(function(t){return i.splice(i.indexOf(t),1)}))}),i.map(function(t){return{g:t.globalTime(0),t:t}}).sort(function(t,e){return e.g-t.g||-1}).forEach(function(t){return t.t.revert(e)}),this.data.forEach(function(t){return!(t instanceof qt)&&t.revert&&t.revert(e)}),this._r.forEach(function(t){return t(e,r)}),this.isReverted=!0}else this.data.forEach(function(t){return t.kill&&t.kill()});if(this.clear(),t){var n=ye.indexOf(this);~n&&ye.splice(n,1)}},_e.revert=function revert(t){this.kill(t||{})},Context);function Context(t,e){this.selector=e&&cb(e),this.data=[],this._r=[],this.isReverted=!1,t&&this.add(t)}var Me,Oe=((Me=MatchMedia.prototype).add=function add(t,e,r){v(t)||(t={matches:t});var i,n,a,s=new ke(0,r||this.scope),o=s.conditions={};for(n in this.contexts.push(s),e=s.add("onMatch",e),s.queries=t)"all"===n?a=1:(i=h.matchMedia(t[n]))&&(ye.indexOf(s)<0&&ye.push(s),(o[n]=i.matches)&&(a=1),i.addListener?i.addListener(Dc):i.addEventListener("change",Dc));return a&&e(s),this},Me.revert=function revert(t){this.kill(t||{})},Me.kill=function kill(e){this.contexts.forEach(function(t){return t.kill(e,!0)})},MatchMedia);function MatchMedia(t){this.contexts=[],this.scope=t}var Pe={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 function _createPlugin(t){var e=(t=!t.name&&t.default||t).name,r=s(t),i=e&&!r&&t.init?function(){this._props=[]}:t,n={init:T,render:oe,add:Xt,kill:fe,modifier:le,rawVars:0},a={targetTest:0,get:0,getSetter:re,aliases:{},register:0};if(zt(),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(Ce,i,pe)}(t)})},timeline:function timeline(t){return new Ut(t)},getTweensOf:function getTweensOf(t,e){return L.getTweensOf(t,e)},getProperty:function getProperty(i,t,e,n){r(i)&&(i=Ot(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=Ot(r)).length){var n=r.map(function(t){return Ce.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;c._pt=0,e.init(r,i?t+i:t,c,0,[r]),e.render(1,e),c._pt&&oe(1,c)}: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 Ux(t,e,r){return n.resetTo(i,t,e,r)}var r,n=Ce.to(t,yt(((r={})[i]="+=0.1",r.paused=!0,r),e||{}));return Ux.tween=n,Ux},isTweening:function isTweening(t){return 0<L.getTweensOf(t,!0).length},defaults:function defaults(t){return t&&t.ease&&(t.ease=Yt(t.ease,q.ease)),ta(q,t||{})},config:function config(t){return ta(j,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(Ot(t),qa(e||{},a),r)},r&&(Ut.prototype[i]=function(t,e,r){return this.add(_t[i](t,v(e)?e:(r=e)&&{},this),r)})},registerEase:function registerEase(t,e){Ft[t]=Yt(e)},parseEase:function parseEase(t,e){return arguments.length?Yt(t,e):Ft},getById:function getById(t){return L.getById(t)},exportRoot:function exportRoot(t,e){void 0===t&&(t={});var r,i,n=new Ut(t);for(n.smoothChildTiming=w(t.smoothChildTiming),L.remove(n),n._dp=0,n._time=n._tTime=L._time,r=L._first;r;)i=r._next,!e&&!r._dur&&r instanceof Gt&&r.vars.onComplete===r._targets[0]||Ka(n,r,r._start-r._delay),r=i;return Ka(L,n,0),n},context:function context(t,e){return t?new ke(t,e):l},matchMedia:function matchMedia(t){return new Oe(t)},matchMediaRefresh:function matchMediaRefresh(){return ye.forEach(function(t){var e,r,i=t.conditions;for(r in i)i[r]&&(i[r]=!1,e=1);e&&t.revert()})||Dc()},addEventListener:function addEventListener(t,e){var r=Te[t]||(Te[t]=[]);~r.indexOf(e)||r.push(e)},removeEventListener:function removeEventListener(t,e){var r=Te[t],i=r&&r.indexOf(e);0<=i&&r.splice(i,1)},utils:{wrap:function wrap(e,t,r){var i=t-e;return $(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 $(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 kt(e,r,t)})},splitColor:zb,toArray:Ot,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),c={};if(!0===t&&(n=1)&&(t=null),f)e={p:e},i={p:i};else if($(e)&&!$(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($(e)?[]:{},e));if(!u){for(s in i)Xt.call(c,e,s,"get",i[s]);a=function func(t){return oe(t,c)||(f?e.p:e)}}}return Wa(t,a)},shuffle:db},install:P,effects:_t,ticker:Et,updateRoot:Ut.updateRoot,plugins:pt,globalTimeline:L,core:{PropTween:pe,globals:S,Tween:Gt,Timeline:Ut,Animation:qt,getCache:fa,_removeLinkedListItem:ya,reverting:function reverting(){return B},context:function context(t){return t&&l&&(l.data.push(t),t._ctx=l),l},suppressOverwrites:function suppressOverwrites(t){return I=t}}};ha("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Pe[t]=Gt[t]}),Et.add(Ut.updateRoot),c=Pe.to({},{duration:0});function Hc(t,e){for(var r=t._pt;r&&r.p!==e&&r.op!==e&&r.fp!==e;)r=r._next;return r}function Jc(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=Hc(n,r)),n&&n.modifier&&n.modifier(e[r],t,a[i],r))}(t,n)}}}}var Ce=Pe.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;)B?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)}},Jc("roundProps",fb),Jc("modifiers"),Jc("snap",gb))||Pe;Gt.version=Ut.version=Ce.version="3.11.4",o=1,x()&&zt();function td(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function ud(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 vd(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 wd(t,e){var r=e.s+e.c*t;e.set(e.t,e.p,~~(r+(r<0?-.5:.5))+e.u,e)}function xd(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)}function yd(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)}function zd(t,e,r){return t.style[e]=r}function Ad(t,e,r){return t.style.setProperty(e,r)}function Bd(t,e,r){return t._gsap[e]=r}function Cd(t,e,r){return t._gsap.scaleX=t._gsap.scaleY=r}function Dd(t,e,r,i,n){var a=t._gsap;a.scaleX=a.scaleY=r,a.renderTransform(n,a)}function Ed(t,e,r,i,n){var a=t._gsap;a[e]=r,a.renderTransform(n,a)}function Hd(t,e){var r=this,i=this.target,n=i.style;if(t in rr){if(this.tfm=this.tfm||{},"transform"!==t&&(~(t=hr[t]||t).indexOf(",")?t.split(",").forEach(function(t){return r.tfm[t]=mr(i,t)}):this.tfm[t]=i._gsap.x?i._gsap[t]:mr(i,t)),0<=this.props.indexOf(lr))return;i._gsap.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(fr,e,"")),t=lr}(n||e)&&this.props.push(t,e,n[t])}function Id(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))}function Jd(){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].replace(sr,"-$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=Fe())||t.isStart||n[lr]||(Id(n),a.uncache=1)}}function Kd(t,e){var r={target:t,props:[],revert:Jd,save:Hd};return e&&e.split(",").forEach(function(t){return r.save(t)}),r}function Md(t,e){var r=Se.createElementNS?Se.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Se.createElement(t);return r.style?r:Se.createElement(t)}function Nd(t,e,r){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(sr,"-$1").toLowerCase())||i.getPropertyValue(e)||!r&&Nd(t,dr(e)||e,1)||""}function Qd(){(function _windowExists(){return"undefined"!=typeof window})()&&window.document&&(Ae=window,Se=Ae.document,Re=Se.documentElement,Ee=Md("div")||{style:{}},Md("div"),lr=dr(lr),fr=lr+"Origin",Ee.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Ie=!!dr("perspective"),Fe=Ce.core.reverting,De=1)}function Rd(t){var e,r=Md("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=Rd}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 Sd(t,e){for(var r=e.length;r--;)if(t.hasAttribute(e[r]))return t.getAttribute(e[r])}function Td(e){var r;try{r=e.getBBox()}catch(t){r=Rd.call(e,!0)}return r&&(r.width||r.height)||e.getBBox===Rd||(r=Rd.call(e,!0)),!r||r.width||r.x||r.y?r:{x:+Sd(e,["x","cx","x1"])||0,y:+Sd(e,["y","cy","y1"])||0,width:0,height:0}}function Ud(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!Td(t))}function Vd(t,e){if(e){var r=t.style;e in rr&&e!==fr&&(e=lr),r.removeProperty?("ms"!==e.substr(0,2)&&"webkit"!==e.substr(0,6)||(e="-"+e),r.removeProperty(e.replace(sr,"-$1").toLowerCase())):r.removeAttribute(e)}}function Wd(t,e,r,i,n,a){var s=new pe(t._pt,e,r,0,1,a?yd:xd);return(t._pt=s).b=i,s.e=n,t._props.push(r),s}function Zd(t,e,r,i){var n,a,s,o,u=parseFloat(r)||0,h=(r+"").trim().substr((u+"").length)||"px",l=Ee.style,f=or.test(e),c="svg"===t.tagName.toLowerCase(),d=(c?"client":"offset")+(f?"Width":"Height"),p="px"===i,_="%"===i;return i===h||!u||pr[i]||pr[h]?u:("px"===h||p||(u=Zd(t,e,r,"px")),o=t.getCTM&&Ud(t),!_&&"%"!==h||!rr[e]&&!~e.indexOf("adius")?(l[f?"width":"height"]=100+(p?h:i),a=~e.indexOf("adius")||"em"===i&&t.appendChild&&!c?t:t.parentNode,o&&(a=(t.ownerSVGElement||{}).parentNode),a&&a!==Se&&a.appendChild||(a=Se.body),(s=a._gsap)&&_&&s.width&&f&&s.time===Et.time&&!s.uncache?ia(u/s.width*100):(!_&&"%"!==h||_r[Nd(a,"display")]||(l.position=Nd(t,"position")),a===t&&(l.position="static"),a.appendChild(Ee),n=Ee[d],a.removeChild(Ee),l.position="absolute",f&&_&&((s=fa(a)).time=Et.time,s.width=a[d]),ia(p?n*u/100:n&&u?100/n*u:0))):(n=o?t.getBBox()[f?"width":"height"]:t[d],ia(_?u/n*100:u/100*n)))}function _d(t,e,r,i){if(!r||"none"===r){var n=dr(e,t,1),a=n&&Nd(t,n,1);a&&a!==r?(e=n,r=a):"borderColor"===e&&(r=Nd(t,"borderTopColor"))}var s,o,u,h,l,f,c,d,p,_,m,g=new pe(this._pt,t.style,e,0,1,se),v=0,y=0;if(g.b=r,g.e=i,r+="","auto"===(i+="")&&(t.style[e]=i,i=Nd(t,e)||i,t.style[e]=r),Eb(s=[r,i]),i=s[1],u=(r=s[0]).match(rt)||[],(i.match(rt)||[]).length){for(;o=rt.exec(i);)c=o[0],p=i.substring(v,o.index),l?l=(l+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(l=1),c!==(f=u[y++]||"")&&(h=parseFloat(f)||0,m=f.substr((h+"").length),"="===c.charAt(1)&&(c=ka(h,c)+m),d=parseFloat(c),_=c.substr((d+"").length),v=rt.lastIndex-_.length,_||(_=_||j.units[e]||m,v===i.length&&(i+=_,g.e+=_)),m!==_&&(h=Zd(t,e,f,_)||0),g._pt={_next:g._pt,p:p||1===y?p:",",s:h,c:d-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?yd:xd;return nt.test(i)&&(g.e=0),this._pt=g}function be(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]=gr[r]||r,e[1]=gr[i]||i,e.join(" ")}function ce(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],rr[r]&&(i=1,r="transformOrigin"===r?fr:lr),Vd(a,r);i&&(Vd(a,lr),u&&(u.svg&&a.removeAttribute("transform"),br(a,1),u.uncache=1,Id(s)))}}function ge(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t}function he(t){var e=Nd(t,lr);return ge(e)?yr:e.substr(7).match(et).map(ia)}function ie(t,e){var r,i,n,a,s=t._gsap||fa(t),o=t.style,u=he(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(",")?yr:u:(u!==yr||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=he(t),n?o.display=n:Vd(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 je(t,e,r,i,n,a){var s,o,u,h=t._gsap,l=n||ie(t,!0),f=h.xOrigin||0,c=h.yOrigin||0,d=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!==yr&&(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=Td(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-c,h.xOffset=d+(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[fr]="0px 0px",a&&(Wd(a,h,"xOrigin",f,w),Wd(a,h,"yOrigin",c,x),Wd(a,h,"xOffset",d,h.xOffset),Wd(a,h,"yOffset",p,h.yOffset)),t.setAttribute("data-svg-origin",w+" "+x)}function me(t,e,r){var i=Ya(e);return ia(parseFloat(e)+parseFloat(Zd(t,"x",r+"px",i)))+i}function te(t,e,i,n,a){var s,o,u=360,h=r(a),l=parseFloat(a)*(h&&~a.indexOf("rad")?ir: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 pe(t._pt,e,i,n,l,ud),o.e=f,o.u="deg",t._props.push(i),o}function ue(t,e){for(var r in e)t[r]=e[r];return t}function ve(t,e,r){var i,n,a,s,o,u,h,l=ue({},r._gsap),f=r.style;for(n in l.svg?(a=r.getAttribute("transform"),r.setAttribute("transform",""),f[lr]=e,i=br(r,1),Vd(r,lr),r.setAttribute("transform",a)):(a=getComputedStyle(r)[lr],f[lr]=e,i=br(r,1),f[lr]=a),rr)(a=l[n])!==(s=i[n])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(n)<0&&(o=Ya(a)!==(h=Ya(s))?Zd(r,n,a,h):parseFloat(a),u=parseFloat(s),t._pt=new pe(t._pt,i,n,o,u-o,td),t._pt.u=h||0,t._props.push(n));ue(i,l)}var Ae,Se,Re,De,Ee,ze,Fe,Ie,Be=Ft.Power0,Le=Ft.Power1,Ye=Ft.Power2,Ne=Ft.Power3,qe=Ft.Power4,Ue=Ft.Linear,Ve=Ft.Quad,We=Ft.Cubic,Xe=Ft.Quart,He=Ft.Quint,Qe=Ft.Strong,Ke=Ft.Elastic,Ze=Ft.Back,Ge=Ft.SteppedEase,Je=Ft.Bounce,$e=Ft.Sine,tr=Ft.Expo,er=Ft.Circ,rr={},ir=180/Math.PI,nr=Math.PI/180,ar=Math.atan2,sr=/([A-Z])/g,or=/(left|right|width|margin|padding|x)/i,ur=/[\s,\(]\S/,hr={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},lr="transform",fr=lr+"Origin",cr="O,Moz,ms,Ms,Webkit".split(","),dr=function _checkPropPrefix(t,e,r){var i=(e||Ee).style,n=5;if(t in i&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);n--&&!(cr[n]+t in i););return n<0?null:(3===n?"ms":0<=n?cr[n]:"")+t},pr={deg:1,rad:1,turn:1},_r={grid:1,flex:1},mr=function _get(t,e,r,i){var n;return De||Qd(),e in hr&&"transform"!==e&&~(e=hr[e]).indexOf(",")&&(e=e.split(",")[0]),rr[e]&&"transform"!==e?(n=br(t,i),n="transformOrigin"!==e?n[e]:n.svg?n.origin:wr(Nd(t,fr))+" "+n.zOrigin+"px"):(n=t.style[e])&&"auto"!==n&&!i&&!~(n+"").indexOf("calc(")||(n=vr[e]&&vr[e](t,e,r)||Nd(t,e)||ga(t,e)||("opacity"===e?1:0)),r&&!~(n+"").trim().indexOf(" ")?Zd(t,e,n,r)+r:n},gr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},vr={clearProps:function clearProps(t,e,r,i,n){if("isFromStart"!==n.data){var a=t._pt=new pe(t._pt,e,r,0,0,ce);return a.u=i,a.pr=-10,a.tween=n,t._props.push(r),1}}},yr=[1,0,0,1,0,0],Tr={},br=function _parseTransform(t,e){var r=t._gsap||new jt(t);if("x"in r&&!e&&!r.uncache)return r;var i,n,a,s,o,u,h,l,f,c,d,p,_,m,g,v,y,T,b,w,x,k,M,O,P,C,A,S,R,D,E,z,F=t.style,I=r.scaleX<0,B="deg",L=getComputedStyle(t),Y=Nd(t,fr)||"0";return i=n=a=u=h=l=f=c=d=0,s=o=1,r.svg=!(!t.getCTM||!Ud(t)),L.translate&&("none"===L.translate&&"none"===L.scale&&"none"===L.rotate||(F[lr]=("none"!==L.translate?"translate3d("+(L.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==L.rotate?"rotate("+L.rotate+") ":"")+("none"!==L.scale?"scale("+L.scale.split(" ").join(",")+") ":"")+("none"!==L[lr]?L[lr]:"")),F.scale=F.rotate=F.translate="none"),m=ie(t,r.svg),r.svg&&(O=r.uncache?(P=t.getBBox(),Y=r.xOrigin-P.x+"px "+(r.yOrigin-P.y)+"px",""):!e&&t.getAttribute("data-svg-origin"),je(t,O||Y,!!O||r.originIsAbsolute,!1!==r.smooth,m)),p=r.xOrigin||0,_=r.yOrigin||0,m!==yr&&(T=m[0],b=m[1],w=m[2],x=m[3],i=k=m[4],n=M=m[5],6===m.length?(s=Math.sqrt(T*T+b*b),o=Math.sqrt(x*x+w*w),u=T||b?ar(b,T)*ir:0,(f=w||x?ar(w,x)*ir+u:0)&&(o*=Math.abs(Math.cos(f*nr))),r.svg&&(i-=p-(p*T+_*w),n-=_-(p*b+_*x))):(z=m[6],D=m[7],A=m[8],S=m[9],R=m[10],E=m[11],i=m[12],n=m[13],a=m[14],h=(g=ar(z,R))*ir,g&&(O=k*(v=Math.cos(-g))+A*(y=Math.sin(-g)),P=M*v+S*y,C=z*v+R*y,A=k*-y+A*v,S=M*-y+S*v,R=z*-y+R*v,E=D*-y+E*v,k=O,M=P,z=C),l=(g=ar(-w,R))*ir,g&&(v=Math.cos(-g),E=x*(y=Math.sin(-g))+E*v,T=O=T*v-A*y,b=P=b*v-S*y,w=C=w*v-R*y),u=(g=ar(b,T))*ir,g&&(O=T*(v=Math.cos(g))+b*(y=Math.sin(g)),P=k*v+M*y,b=b*v-T*y,M=M*v-k*y,T=O,k=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(M*M+z*z)),g=ar(k,M),f=2e-4<Math.abs(g)?g*ir:0,d=E?1/(E<0?-E:E):0),r.svg&&(O=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!ge(Nd(t,lr)),O&&t.setAttribute("transform",O))),90<Math.abs(f)&&Math.abs(f)<270&&(I?(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)+B,r.rotationX=ia(h)+B,r.rotationY=ia(l)+B,r.skewX=f+B,r.skewY=c+B,r.transformPerspective=d+"px",(r.zOrigin=parseFloat(Y.split(" ")[2])||0)&&(F[fr]=wr(Y)),r.xOffset=r.yOffset=0,r.force3D=j.force3D,r.renderTransform=r.svg?Cr:Ie?Pr:xr,r.uncache=0,r},wr=function _firstTwoOnly(t){return(t=t.split(" "))[0]+" "+t[1]},xr=function _renderNon3DTransforms(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Pr(t,e)},kr="0deg",Mr="0px",Or=") ",Pr=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,c=r.skewY,d=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!==kr||h!==kr)){var b,w=parseFloat(h)*nr,x=Math.sin(w),k=Math.cos(w);w=parseFloat(l)*nr,b=Math.cos(w),a=me(g,a,x*b*-v),s=me(g,s,-Math.sin(w)*-v),o=me(g,o,k*b*-v+v)}_!==Mr&&(y+="perspective("+_+Or),(i||n)&&(y+="translate("+i+"%, "+n+"%) "),!T&&a===Mr&&s===Mr&&o===Mr||(y+=o!==Mr||T?"translate3d("+a+", "+s+", "+o+") ":"translate("+a+", "+s+Or),u!==kr&&(y+="rotate("+u+Or),h!==kr&&(y+="rotateY("+h+Or),l!==kr&&(y+="rotateX("+l+Or),f===kr&&c===kr||(y+="skew("+f+", "+c+Or),1===d&&1===p||(y+="scale("+d+", "+p+Or),g.style[lr]=y||"translate(0, 0)"},Cr=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,c=o.rotation,d=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),k=parseFloat(f);c=parseFloat(c),d=parseFloat(d),(p=parseFloat(p))&&(d+=p=parseFloat(p),c+=p),c||d?(c*=nr,d*=nr,r=Math.cos(c)*_,i=Math.sin(c)*_,n=Math.sin(c-d)*-m,a=Math.cos(c-d)*m,d&&(p*=nr,s=Math.tan(d-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")||k&&!~(f+"").indexOf("px"))&&(x=Zd(g,"x",l,"px"),k=Zd(g,"y",f,"px")),(v||y||T||b)&&(x=ia(x+v-(v*r+y*n)+T),k=ia(k+y-(v*i+y*a)+b)),(u||h)&&(s=g.getBBox(),x=ia(x+u/100*s.width),k=ia(k+h/100*s.height)),s="matrix("+r+","+i+","+n+","+a+","+x+","+k+")",g.setAttribute("transform",s),w&&(g.style[lr]=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});vr[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 mr(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 Ar,Sr,Rr,Dr={name:"css",register:Qd,targetTest:function targetTest(t){return t.style&&t.nodeType},init:function init(t,e,i,n,a){var s,o,u,h,l,f,c,d,p,_,m,g,v,y,T,b,w=this._props,x=t.style,k=i.vars.startAt;for(c in De||Qd(),this.styles=this.styles||Kd(t),b=this.styles.props,this.tween=i,e)if("autoRound"!==c&&(o=e[c],!pt[c]||!_b(c,e,i,n,t,a)))if(l=typeof o,f=vr[c],"function"===l&&(l=typeof(o=o.call(i,n,t,a))),"string"===l&&~o.indexOf("random(")&&(o=ob(o)),f)f(this,t,c,o,i)&&(T=1);else if("--"===c.substr(0,2))s=(getComputedStyle(t).getPropertyValue(c)+"").trim(),o+="",Rt.lastIndex=0,Rt.test(s)||(d=Ya(s),p=Ya(o)),p?d!==p&&(s=Zd(t,c,s,p)+p):d&&(o+=d),this.add(x,"setProperty",s,o,n,a,0,0,c),w.push(c),b.push(c,0,x[c]);else if("undefined"!==l){if(k&&c in k?(s="function"==typeof k[c]?k[c].call(i,n,t,a):k[c],r(s)&&~s.indexOf("random(")&&(s=ob(s)),Ya(s+"")||(s+=j.units[c]||Ya(mr(t,c))||""),"="===(s+"").charAt(1)&&(s=mr(t,c))):s=mr(t,c),h=parseFloat(s),(_="string"===l&&"="===o.charAt(1)&&o.substr(0,2))&&(o=o.substr(2)),u=parseFloat(o),c in hr&&("autoAlpha"===c&&(1===h&&"hidden"===mr(t,"visibility")&&u&&(h=0),b.push("visibility",0,x.visibility),Wd(this,x,"visibility",h?"inherit":"hidden",u?"inherit":"hidden",!u)),"scale"!==c&&"transform"!==c&&~(c=hr[c]).indexOf(",")&&(c=c.split(",")[0])),m=c in rr)if(this.styles.save(c),g||((v=t._gsap).renderTransform&&!e.parseTransform||br(t,e.parseTransform),y=!1!==e.smoothOrigin&&v.smooth,(g=this._pt=new pe(this._pt,x,lr,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===c)this._pt=new pe(this._pt,v,"scaleY",v.scaleY,(_?ka(v.scaleY,_+u):u)-v.scaleY||0,td),this._pt.u=0,w.push("scaleY",c),c+="X";else{if("transformOrigin"===c){b.push(fr,0,x[fr]),o=be(o),v.svg?je(t,o,0,y,0,this):((p=parseFloat(o.split(" ")[2])||0)!==v.zOrigin&&Wd(this,v,"zOrigin",v.zOrigin,p),Wd(this,x,c,wr(s),wr(o)));continue}if("svgOrigin"===c){je(t,o,1,y,0,this);continue}if(c in Tr){te(this,v,c,h,_?ka(h,_+o):o);continue}if("smoothOrigin"===c){Wd(this,v,"smooth",v.smooth,o);continue}if("force3D"===c){v[c]=o;continue}if("transform"===c){ve(this,o,t);continue}}else c in x||(c=dr(c)||c);if(m||(u||0===u)&&(h||0===h)&&!ur.test(o)&&c in x)u=u||0,(d=(s+"").substr((h+"").length))!==(p=Ya(o)||(c in j.units?j.units[c]:d))&&(h=Zd(t,c,s,p)),this._pt=new pe(this._pt,m?v:x,c,h,(_?ka(h,_+u):u)-h,m||"px"!==p&&"zIndex"!==c||!1===e.autoRound?td:wd),this._pt.u=p||0,d!==p&&"%"!==p&&(this._pt.b=s,this._pt.r=vd);else if(c in x)_d.call(this,t,c,s,_?_+o:o);else if(c in t)this.add(t,c,s||t[c],_?_+o:o,n,a);else if("parseTransform"!==c){Q(c,o);continue}m||(c in x?b.push(c,0,x[c]):b.push(c,1,s||t[c])),w.push(c)}T&&de(this)},render:function render(t,e){if(e.tween._time||!Fe())for(var r=e._pt;r;)r.r(t,r.d),r=r._next;else e.styles.revert()},get:mr,aliases:hr,getSetter:function getSetter(t,e,r){var i=hr[e];return i&&i.indexOf(",")<0&&(e=i),e in rr&&e!==fr&&(t._gsap.x||mr(t,"x"))?r&&ze===r?"scale"===e?Cd:Bd:(ze=r||{})&&("scale"===e?Dd:Ed):t.style&&!u(t.style[e])?zd:~e.indexOf("-")?Ad:re(t,e)},core:{_removeProperty:Vd,_getMatrix:ie}};Ce.utils.checkPrefix=dr,Ce.core.getStyleSaver=Kd,Rr=ha((Ar="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(Sr="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",function(t){rr[t]=1}),ha(Sr,function(t){j.units[t]="deg",Tr[t]=1}),hr[Rr[13]]=Ar+","+Sr,ha("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",function(t){var e=t.split(":");hr[e[1]]=Rr[e[0]]}),ha("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){j.units[t]="px"}),Ce.registerPlugin(Dr);var Er=Ce.registerPlugin(Dr)||Ce,zr=Er.core.Tween;e.Back=Ze,e.Bounce=Je,e.CSSPlugin=Dr,e.Circ=er,e.Cubic=We,e.Elastic=Ke,e.Expo=tr,e.Linear=Ue,e.Power0=Be,e.Power1=Le,e.Power2=Ye,e.Power3=Ne,e.Power4=qe,e.Quad=Ve,e.Quart=Xe,e.Quint=He,e.Sine=$e,e.SteppedEase=Ge,e.Strong=Qe,e.TimelineLite=Ut,e.TimelineMax=Ut,e.TweenLite=Gt,e.TweenMax=zr,e.default=Er,e.gsap=Er;if(typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})}else{delete e.default}});
!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 we||"undefined"!=typeof window&&(we=window.gsap)&&we.registerPlugin&&we}function z(e,t){return~Fe.indexOf(e)&&Fe[Fe.indexOf(e)+1][t]}function A(e){return!!~t.indexOf(e)}function B(e,t,r,n,o){return e.addEventListener(t,r,{passive:!n,capture:!!o})}function C(e,t,r,n){return e.removeEventListener(t,r,!!n)}function F(){return Be&&Be.isPressed||ze.cache++}function G(r,n){function Tc(e){if(e||0===e){o&&(Ce.history.scrollRestoration="manual");var t=Be&&Be.isPressed;e=Tc.v=Math.round(e)||(Be&&Be.iOS?1:0),r(e),Tc.cacheID=ze.cache,t&&i("ss",e)}else(n||ze.cache!==Tc.cacheID||i("ref"))&&(Tc.cacheID=ze.cache,Tc.v=r());return Tc.v+Tc.offset}return Tc.offset=0,r&&Tc}function J(e){return we.utils.toArray(e)[0]||("string"==typeof e&&!1!==we.config().nullTargetWarn?console.warn("Element not found:",e):null)}function K(t,e){var r=e.s,n=e.sc;A(t)&&(t=Ee.scrollingElement||ke);var o=ze.indexOf(t),i=n===Ke.sc?1:2;~o||(o=ze.push(t)-1),ze[o+i]||t.addEventListener("scroll",F);var a=ze[o+i],s=a||(ze[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"===we.getProperty(t,"scrollBehavior")),s}function L(e,t,o){function pd(e,t){var r=Ne();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=Ne(),l=s,n=t||50,c=Math.max(500,3*n);return{update:pd,reset:function reset(){a=i=o?0:i,l=s=0},getVelocity:function getVelocity(e){var t=l,r=a,n=Ne();return!e&&0!==e||e===i||pd(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=we.core.globals().ScrollTrigger)&&Ae.core&&function _integrate(){var e=Ae.core,r=e.bridge||{},t=e._scrollers,n=e._proxies;t.push.apply(t,ze),n.push.apply(n,Fe),ze=t,Fe=n,i=function _bridge(e,t){return r[e](t)}}()}function P(e){return(we=e||r())&&"undefined"!=typeof document&&document.body&&(Ce=window,ke=(Ee=document).documentElement,Me=Ee.body,t=[Ce,Ee,ke,Me],we.utils.clamp,Ie=we.core.context||function(){},Oe="onpointerenter"in Me?"pointer":"mouse",Pe=E.isTouch=Ce.matchMedia&&Ce.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in Ce||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints?2:0,De=E.eventTypes=("ontouchstart"in ke?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in ke?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout(function(){return o=0},500),O(),Se=1),Se}var we,Se,Ce,Ee,ke,Me,Pe,Oe,Ae,t,Be,De,Ie,o=1,Le=[],ze=[],Fe=[],Ne=Date.now,i=function _bridge(e,t){return t},n="scrollLeft",a="scrollTop",Xe={s:n,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:G(function(e){return arguments.length?Ce.scrollTo(e,Ke.sc()):Ce.pageXOffset||Ee[n]||ke[n]||Me[n]||0})},Ke={s:a,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:Xe,sc:G(function(e){return arguments.length?Ce.scrollTo(Xe.sc(),e):Ce.pageYOffset||Ee[a]||ke[a]||Me[a]||0})};Xe.op=Ke,ze.cache=0;var E=(Observer.prototype.init=function init(e){Se||P(we)||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,p=e.event,d=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,E=e.onToggleX,k=e.onToggleY,D=e.onHover,I=e.onHoverEnd,R=e.onMove,Y=e.ignoreCheck,z=e.isNormalizer,X=e.onGestureStart,W=e.onGestureEnd,H=e.onWheel,U=e.onEnable,j=e.onDisable,q=e.onClick,V=e.scrollSpeed,G=e.capture,Z=e.allowClicks,$=e.lockAxis,Q=e.onLockAxis;function Qe(){return ye=Ne()}function Re(e,t){return(se.event=e)&&u&&~u.indexOf(e.target)||t&&ge&&"touch"!==e.pointerType||Y&&Y(e,t)}function Te(){var e=se.deltaX=N(be),t=se.deltaY=N(me),r=Math.abs(e)>=o,n=Math.abs(t)>=o;S&&(r||n)&&S(se,e,t,be,me),r&&(m&&0<se.deltaX&&m(se),y&&se.deltaX<0&&y(se),_&&_(se),E&&se.deltaX<0!=le<0&&E(se),le=se.deltaX,be[0]=be[1]=be[2]=0),n&&(w&&0<se.deltaY&&w(se),x&&se.deltaY<0&&x(se),T&&T(se),k&&se.deltaY<0!=ce<0&&k(se),ce=se.deltaY,me[0]=me[1]=me[2]=0),(ne||re)&&(R&&R(se),re&&(h(se),re=!1),ne=!1),ie&&!(ie=!1)&&Q&&Q(se),oe&&(H(se),oe=!1),ee=0}function Ue(e,t,r){be[r]+=e,me[r]+=t,se._vx.update(e),se._vy.update(t),n?ee=ee||requestAnimationFrame(Te):Te()}function Ve(e,t){$&&!ae&&(se.axis=ae=Math.abs(e)>Math.abs(t)?"x":"y",ie=!0),"y"!==ae&&(be[2]+=e,se._vx.update(e,!0)),"x"!==ae&&(me[2]+=t,se._vy.update(t,!0)),n?ee=ee||requestAnimationFrame(Te):Te()}function We(e){if(!Re(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),Ve(n,o),i||d&&d(se))}}function Ye(t){if(!Re(t,1)){C(z?i:ve,De[1],We,!0);var e=!isNaN(se.y-se.startY),r=se.isDragging&&(3<Math.abs(se.x-se.startX)||3<Math.abs(se.y-se.startY)),n=M(t);!r&&e&&(se._vx.reset(),se._vy.reset(),s&&Z&&we.delayedCall(.08,function(){if(300<Ne()-ye&&!t.defaultPrevented)if(t.target.click)t.target.click();else if(ve.createEvent){var e=ve.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,Ce,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(e)}})),se.isDragging=se.isGesturing=se.isPressed=!1,l&&!z&&te.restart(!0),g&&r&&g(se),b&&b(se,r)}}function Ze(e){return e.touches&&1<e.touches.length&&(se.isGesturing=!0)&&X(e,se.isDragging)}function $e(){return(se.isGesturing=!1)||W(se)}function _e(e){if(!Re(e)){var t=ue(),r=fe();Ue((t-pe)*V,(r-de)*V,1),pe=t,de=r,l&&te.restart(!0)}}function af(e){if(!Re(e)){e=M(e,s),H&&(oe=!0);var t=(1===e.deltaMode?r:2===e.deltaMode?Ce.innerHeight:1)*f;Ue(e.deltaX*t,e.deltaY*t,0),l&&!z&&te.restart(!0)}}function bf(e){if(!Re(e)){var t=e.clientX,r=e.clientY,n=t-se.x,o=r-se.y;se.x=t,se.y=r,ne=!0,(n||o)&&Ve(n,o)}}function cf(e){se.event=e,D(se)}function df(e){se.event=e,I(se)}function ef(e){return Re(e)||M(e,s)&&q(se)}this.target=i=J(i)||ke,this.vars=e,u=u&&we.utils.toArray(u),o=o||1e-9,a=a||0,f=f||1,V=V||1,t=t||"wheel,touch,pointer",n=!1!==n,r=r||parseFloat(Ce.getComputedStyle(Me).lineHeight)||22;var ee,te,re,ne,oe,ie,ae,se=this,le=0,ce=0,ue=K(i,Xe),fe=K(i,Ke),pe=ue(),de=fe(),ge=~t.indexOf("touch")&&!~t.indexOf("pointer")&&"pointerdown"===De[0],he=A(i),ve=i.ownerDocument||Ee,be=[0,0,0],me=[0,0,0],ye=0,xe=se.onPress=function(e){Re(e,1)||(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:ve,De[1],We,s,!0),se.deltaX=se.deltaY=0,v&&v(se))};te=se._dc=we.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=ue,se.scrollY=fe,se.isDragging=se.isGesturing=se.isPressed=!1,Ie(this),se.enable=function(e){return se.isEnabled||(B(he?ve:i,"scroll",F),0<=t.indexOf("scroll")&&B(he?ve:i,"scroll",_e,s,G),0<=t.indexOf("wheel")&&B(i,"wheel",af,s,G),(0<=t.indexOf("touch")&&Pe||0<=t.indexOf("pointer"))&&(B(i,De[0],xe,s,G),B(ve,De[2],Ye),B(ve,De[3],Ye),Z&&B(i,"click",Qe,!1,!0),q&&B(i,"click",ef),X&&B(ve,"gesturestart",Ze),W&&B(ve,"gestureend",$e),D&&B(i,Oe+"enter",cf),I&&B(i,Oe+"leave",df),R&&B(i,Oe+"move",bf)),se.isEnabled=!0,e&&e.type&&xe(e),U&&U(se)),se},se.disable=function(){se.isEnabled&&(Le.filter(function(e){return e!==se&&A(e.target)}).length||C(he?ve:i,"scroll",F),se.isPressed&&(se._vx.reset(),se._vy.reset(),C(z?i:ve,De[1],We,!0)),C(he?ve:i,"scroll",_e,G),C(i,"wheel",af,G),C(i,De[0],xe,G),C(ve,De[2],Ye),C(ve,De[3],Ye),C(i,"click",Qe,!0),C(i,"click",ef),C(ve,"gesturestart",Ze),C(ve,"gestureend",$e),C(i,Oe+"enter",cf),C(i,Oe+"leave",df),C(i,Oe+"move",bf),se.isEnabled=se.isPressed=se.isDragging=!1,j&&j(se))},se.kill=se.revert=function(){se.disable();var e=Le.indexOf(se);0<=e&&Le.splice(e,1),Be===se&&(Be=0)},Le.push(se),z&&A(i)&&(Be=se),se.enable(p)},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)}E.version="3.11.4",E.create=function(e){return new E(e)},E.register=P,E.getAll=function(){return Le.slice()},E.getById=function(t){return Le.filter(function(e){return e.vars.id===t})[0]},r()&&we.registerPlugin(E);function ya(){return ot=1}function za(){return ot=0}function Aa(e){return e}function Ba(e){return Math.round(1e5*e)/1e5||0}function Ca(){return"undefined"!=typeof window}function Da(){return He||Ca()&&(He=window.gsap)&&He.registerPlugin&&He}function Ea(e){return!!~l.indexOf(e)}function Fa(e){return z(e,"getBoundingClientRect")||(Ea(e)?function(){return Yt.width=Je.innerWidth,Yt.height=Je.innerHeight,Yt}:function(){return Mt(e)})}function Ia(e,t){var r=t.s,n=t.d2,o=t.d,i=t.a;return(r="scroll"+n)&&(i=z(e,r))?i()-Fa(e)()[o]:Ea(e)?(qe[r]||Ge[r])-(Je["inner"+n]||qe["client"+n]||Ge["client"+n]):e[r]-e["offset"+n]}function Ja(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 Ka(e){return"string"==typeof e}function La(e){return"function"==typeof e}function Ma(e){return"number"==typeof e}function Na(e){return"object"==typeof e}function Oa(e,t,r){return e&&e.progress(t?0:1)&&r&&e.pause()}function Pa(e,t){if(e.enabled){var r=t(e);r&&r.totalTime&&(e.callbackAnimation=r)}}function eb(e){return Je.getComputedStyle(e)}function gb(e,t){for(var r in t)r in e||(e[r]=t[r]);return e}function ib(e,t){var r=t.d2;return e["offset"+r]||e["client"+r]||0}function jb(e){var t,r=[],n=e.labels,o=e.duration();for(t in n)r.push(n[t]/o);return r}function lb(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 nb(t,r,e,n){return e.split(",").forEach(function(e){return t(r,e,n)})}function ob(e,t,r,n,o){return e.addEventListener(t,r,{passive:!n,capture:!!o})}function pb(e,t,r,n){return e.removeEventListener(t,r,!!n)}function qb(e,t,r){return r&&r.wheelHandler&&e(t,"wheel",r)}function ub(e,t){if(Ka(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 I?I[e]*t:~e.indexOf("%")?parseFloat(e)*t/100:parseFloat(e)||0)}return e}function vb(e,t,r,n,o,i,a,s){var l=o.startColor,c=o.endColor,u=o.fontSize,f=o.indent,p=o.fontWeight,d=je.createElement("div"),g=Ea(r)||"fixed"===z(r,"pinType"),h=-1!==e.indexOf("scroller"),v=g?Ge:r,b=-1!==e.indexOf("start"),m=b?l:c,y="border-color:"+m+";font-size:"+u+";color:"+m+";font-weight:"+p+";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===Ke?T:S)+":"+(i+parseFloat(f))+"px;"),a&&(y+="box-sizing:border-box;text-align:left;width:"+a.offsetWidth+"px;"),d._isStart=b,d.setAttribute("class","gsap-marker-"+e+(t?" marker-"+t:"")),d.style.cssText=y,d.innerText=t||0===t?e+"-"+t:e,v.children[0]?v.insertBefore(d,v.children[0]):v.appendChild(d),d._offset=d["offset"+n.op.d2],R(d,0,n,b),d}function Ab(){return 34<gt()-ht&&(w=w||requestAnimationFrame(j))}function Bb(){v&&v.isPressed&&!(v.startX>Ge.clientWidth)||(ze.cache++,v?w=w||requestAnimationFrame(j):j(),ht||W("scrollStart"),ht=gt())}function Cb(){y=Je.innerWidth,m=Je.innerHeight}function Db(){ze.cache++,nt||h||je.fullscreenElement||je.webkitFullscreenElement||b&&y===Je.innerWidth&&!(Math.abs(Je.innerHeight-m)>.25*Je.innerHeight)||c.restart(!0)}function Gb(){return pb(Q,"scrollEnd",Gb)||It(!0)}function Jb(e){for(var t=0;t<H.length;t+=5)(!e||H[t+4]&&H[t+4].query===e)&&(H[t].style.cssText=H[t+1],H[t].getBBox&&H[t].setAttribute("transform",H[t+2]||""),H[t+3].uncache=1)}function Kb(e,t){var r;for(it=0;it<At.length;it++)!(r=At[it])||t&&r._ctx!==t||(e?r.kill(1):r.revert(!0,!0));t&&Jb(t),t||W("revert")}function Lb(e,t){ze.cache++,!t&&ut||ze.forEach(function(e){return La(e)&&e.cacheID++&&(e.rec=0)}),Ka(e)&&(Je.history.scrollRestoration=x=e)}function Yb(e,t,r,n){if(!e._gsap.swappedIn){for(var o,i=q.length,a=t.style,s=e.style;i--;)a[o=q[i]]=r[o];a.position="absolute"===r.position?"absolute":"relative","inline"===r.display&&(a.display="inline-block"),s[S]=s[T]="auto",a.flexBasis=r.flexBasis||"auto",a.overflow="visible",a.boxSizing="border-box",a[mt]=ib(e,Xe)+kt,a[yt]=ib(e,Ke)+kt,a[St]=s[Ct]=s.top=s.left="0",Rt(n),s[mt]=s.maxWidth=r[mt],s[yt]=s.maxHeight=r[yt],s[St]=r[St],e.parentNode!==t&&(e.parentNode.insertBefore(t,e),t.appendChild(e)),e._gsap.swappedIn=!0}}function _b(e){for(var t=V.length,r=e.style,n=[],o=0;o<t;o++)n.push(V[o],r[V[o]]);return n.t=e,n}function cc(e,t,r,n,o,i,a,s,l,c,u,f,p){La(e)&&(e=e(s)),Ka(e)&&"max"===e.substr(0,3)&&(e=f+("="===e.charAt(4)?ub("0"+e.substr(3),r):0));var d,g,h,v=p?p.time():0;if(p&&p.seek(0),Ma(e))a&&R(a,r,n,!0);else{La(t)&&(t=t(s));var b,m,y,x,w=(e||"0").split(" ");h=J(t)||Ge,(b=Mt(h)||{})&&(b.left||b.top)||"none"!==eb(h).display||(x=h.style.display,h.style.display="block",b=Mt(h),x?h.style.display=x:h.style.removeProperty("display")),m=ub(w[0],b[n.d]),y=ub(w[1]||"0",r),e=b[n.p]-l[n.p]-c+m+o-y,a&&R(a,y,n,r-y<20||a._isStart&&20<y),r-=r-y}if(i){var _=e+r,T=i._isStart;d="scroll"+n.d2,R(i,_,n,T&&20<_||!T&&(u?Math.max(Ge[d],qe[d]):i.parentNode[d])<=_+1),u&&(l=Mt(a),u&&(i.style[n.op.p]=l[n.op.p]-n.op.m-i._offset+kt))}return p&&h&&(d=Mt(h),p.seek(f),g=Mt(h),p._caScrollDist=d[n.p]-g[n.p],e=e/p._caScrollDist*f),p&&p.seek(v),p?e:Math.round(e)}function ec(e,t,r,n){if(e.parentNode!==t){var o,i,a=e.style;if(t===Ge){for(o in e._stOrig=a.cssText,i=eb(e))+o||$.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 fc(l,e){function Uj(e,t,r,n,o){var i=Uj.tween,a=t.onComplete,s={};return r=r||f(),o=n&&o||0,n=n||e-r,i&&i.kill(),c=Math.round(r),t[p]=e,(t.modifiers=s)[p]=function(e){return(e=Math.round(f()))!==c&&e!==u&&3<Math.abs(e-c)&&3<Math.abs(e-u)?(i.kill(),Uj.tween=0):e=r+n*i.ratio+o*i.ratio*i.ratio,u=c,c=Math.round(e)},t.onUpdate=function(){ze.cache++,j()},t.onComplete=function(){Uj.tween=0,a&&a.call(i)},i=Uj.tween=He.to(l,t)}var c,u,f=K(l,e),p="_scroll"+e.p2;return(l[p]=f).wheelHandler=function(){return Uj.tween&&Uj.tween.kill()&&(Uj.tween=0)},ob(l,"wheel",f.wheelHandler),Uj}var He,s,Je,je,qe,Ge,l,c,et,tt,rt,u,nt,ot,f,it,p,d,g,at,st,h,v,b,m,y,k,lt,x,ct,w,ut,ft,pt,dt=1,gt=Date.now,_=gt(),ht=0,vt=0,bt=Math.abs,T="right",S="bottom",mt="width",yt="height",xt="Right",wt="Left",_t="Top",Tt="Bottom",St="padding",Ct="margin",Et="Width",D="Height",kt="px",Mt=function _getBounds(e,t){var r=t&&"matrix(1, 0, 0, 1, 0, 0)"!==eb(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},Pt={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},Ot={toggleActions:"play",anticipatePin:0},I={top:0,left:0,center:.5,bottom:1,right:1},R=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+Et]=1,o["border"+a+Et]=0,o[r.p]=t+"px",He.set(e,o)},At=[],Bt={},Y={},X=[],W=function _dispatch(e){return Y[e]&&Y[e].map(function(e){return e()})||X},H=[],Dt=0,It=function _refreshAll(e,t){if(!ht||e){ut=Q.isRefreshing=!0,ze.forEach(function(e){return La(e)&&e.cacheID++&&(e.rec=e())});var r=W("refreshInit");at&&Q.sort(),t||Kb(),ze.forEach(function(e){La(e)&&(e.smooth&&(e.target.style.scrollBehavior="auto"),e(0))}),At.slice(0).forEach(function(e){return e.refresh()}),At.forEach(function(e,t){if(e._subPinOffset&&e.pin){var r=e.vars.horizontal?"offsetWidth":"offsetHeight",n=e.pin[r];e.revert(!0,1),e.adjustPinSpacing(e.pin[r]-n),e.revert(!1,1)}}),At.forEach(function(e){return"max"===e.vars.end&&e.setPositions(e.start,Math.max(e.start+1,Ia(e.scroller,e._dir)))}),r.forEach(function(e){return e&&e.render&&e.render(-1)}),ze.forEach(function(e){La(e)&&(e.smooth&&requestAnimationFrame(function(){return e.target.style.scrollBehavior="smooth"}),e.rec&&e(e.rec))}),Lb(x,1),c.pause(),Dt++,j(2),At.forEach(function(e){return La(e.vars.onRefresh)&&e.vars.onRefresh(e)}),ut=Q.isRefreshing=!1,W("refresh")}else ob(Q,"scrollEnd",Gb)},U=0,Lt=1,j=function _updateAll(e){if(!ut||2===e){Q.isUpdating=!0,pt&&pt.update(0);var t=At.length,r=gt(),n=50<=r-_,o=t&&At[0].scroll();if(Lt=o<U?-1:1,U=o,n&&(ht&&!ot&&200<r-ht&&(ht=0,W("scrollEnd")),rt=_,_=r),Lt<0){for(it=t;0<it--;)At[it]&&At[it].update(0,n);Lt=1}else for(it=0;it<t;it++)At[it]&&At[it].update(0,n);Q.isUpdating=!1}w=0},q=["left","top",S,T,Ct+Tt,Ct+xt,Ct+_t,Ct+wt,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],V=q.concat([mt,yt,"boxSizing","max"+Et,"max"+D,"position",Ct,St,St+_t,St+xt,St+Tt,St+wt]),Z=/([A-Z])/g,Rt=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(Z,"-$1").toLowerCase())}},Yt={left:0,top:0},$=/(webkit|moz|length|cssText|inset)/i,Q=(ScrollTrigger.prototype.init=function init(S,C){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),vt){var E,n,d,k,M,P,O,A,B,D,I,e,L,R,Y,F,N,t,X,b,W,H,m,U,y,j,x,r,w,_,q,o,g,V,G,Z,$,T,i,Q=(S=gb(Ka(S)||Ma(S)||S.nodeType?{trigger:S}:S,Ot)).onUpdate,ee=S.toggleClass,a=S.id,te=S.onToggle,re=S.onRefresh,ne=S.scrub,oe=S.trigger,ie=S.pin,ae=S.pinSpacing,se=S.invalidateOnRefresh,le=S.anticipatePin,s=S.onScrubComplete,h=S.onSnapComplete,ce=S.once,ue=S.snap,fe=S.pinReparent,l=S.pinSpacer,pe=S.containerAnimation,de=S.fastScrollEnd,ge=S.preventOverlaps,he=S.horizontal||S.containerAnimation&&!1!==S.horizontal?Xe:Ke,ve=!ne&&0!==ne,be=J(S.scroller||Je),c=He.core.getCache(be),me=Ea(be),ye="fixed"===("pinType"in S?S.pinType:z(be,"pinType")||me&&"fixed"),xe=[S.onEnter,S.onLeave,S.onEnterBack,S.onLeaveBack],we=ve&&S.toggleActions.split(" "),u="markers"in S?S.markers:Ot.markers,_e=me?0:parseFloat(eb(be)["border"+he.p2+Et])||0,Te=this,Se=S.onRefreshInit&&function(){return S.onRefreshInit(Te)},Ce=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?Je["inner"+o]:e["client"+o])||0}}(be,me,he),Ee=function _getOffsetsFunc(e,t){return!t||~Fe.indexOf(e)?Fa(e):function(){return Yt}}(be,me),ke=0,Me=0,Pe=K(be,he);if(lt(Te),Te._dir=he,le*=45,Te.scroller=be,Te.scroll=pe?pe.time.bind(pe):Pe,k=Pe(),Te.vars=S,C=C||S.animation,"refreshPriority"in S&&(at=1,-9999===S.refreshPriority&&(pt=Te)),c.tweenScroll=c.tweenScroll||{top:fc(be,Ke),left:fc(be,Xe)},Te.tweenTo=E=c.tweenScroll[he.p],Te.scrubDuration=function(e){(o=Ma(e)&&e)?q?q.duration(e):q=He.to(C,{ease:"expo",totalProgress:"+=0.001",duration:o,paused:!0,onComplete:function onComplete(){return s&&s(Te)}}):(q&&q.progress(1).kill(),q=0)},C&&(C.vars.lazy=!1,C._initted||!1!==C.vars.immediateRender&&!1!==S.immediateRender&&C.duration()&&C.render(0,!0,!0),Te.animation=C.pause(),(C.scrollTrigger=Te).scrubDuration(ne),w=0,a=a||C.vars.id),At.push(Te),ue&&(Na(ue)&&!ue.push||(ue={snapTo:ue}),"scrollBehavior"in Ge.style&&He.set(me?[Ge,qe]:be,{scrollBehavior:"auto"}),ze.forEach(function(e){return La(e)&&e.target===(me?je.scrollingElement||qe:be)&&(e.smooth=!1)}),d=La(ue.snapTo)?ue.snapTo:"labels"===ue.snapTo?function _getClosestLabel(t){return function(e){return He.utils.snap(jb(t),e)}}(C):"labelsDirectional"===ue.snapTo?function _getLabelAtDirection(r){return function(e,t){return lb(jb(r))(e,t.direction)}}(C):!1!==ue.directional?function(e,t){return lb(ue.snapTo)(e,gt()-Me<500?0:t.direction)}:He.utils.snap(ue.snapTo),g=ue.duration||{min:.1,max:2},g=Na(g)?tt(g.min,g.max):tt(g,g),V=He.delayedCall(ue.delay||o/2||.1,function(){var e=Pe(),t=gt()-Me<500,r=E.tween;if(!(t||Math.abs(Te.getVelocity())<10)||r||ot||ke===e)Te.isActive&&ke!==e&&V.restart(!0);else{var n=(e-P)/L,o=C&&!ve?C.totalProgress():n,i=t?0:(o-_)/(gt()-rt)*1e3||0,a=He.utils.clamp(-n,1-n,bt(i/2)*i/.185),s=n+(!1===ue.inertia?0:a),l=tt(0,1,d(s,Te)),c=Math.round(P+l*L),u=ue.onStart,f=ue.onInterrupt,p=ue.onComplete;if(e<=O&&P<=e&&c!==e){if(r&&!r._initted&&r.data<=bt(c-e))return;!1===ue.inertia&&(a=l-n),E(c,{duration:g(bt(.185*Math.max(bt(s-o),bt(l-o))/i/.05||0)),ease:ue.ease||"power3",data:bt(c-e),onInterrupt:function onInterrupt(){return V.restart(!0)&&f&&f(Te)},onComplete:function onComplete(){Te.update(),ke=Pe(),w=_=C&&!ve?C.totalProgress():Te.progress,h&&h(Te),p&&p(Te)}},e,a*L,c-e-a*L),u&&u(Te,E.tween)}}}).pause()),a&&(Bt[a]=Te),i=(i=(oe=Te.trigger=J(oe||ie))&&oe._gsap&&oe._gsap.stRevert)&&i(Te),ie=!0===ie?oe:J(ie),Ka(ee)&&(ee={targets:oe,className:ee}),ie&&(!1===ae||ae===Ct||(ae=!(!ae&&ie.parentNode&&ie.parentNode.style&&"flex"===eb(ie.parentNode).display)&&St),Te.pin=ie,(n=He.core.getCache(ie)).spacer?R=n.pinState:(l&&((l=J(l))&&!l.nodeType&&(l=l.current||l.nativeElement),n.spacerIsNative=!!l,l&&(n.spacerState=_b(l))),n.spacer=N=l||je.createElement("div"),N.classList.add("pin-spacer"),a&&N.classList.add("pin-spacer-"+a),n.pinState=R=_b(ie)),!1!==S.force3D&&He.set(ie,{force3D:!0}),Te.spacer=N=n.spacer,r=eb(ie),m=r[ae+he.os2],X=He.getProperty(ie),b=He.quickSetter(ie,he.a,kt),Yb(ie,N,r),F=_b(ie)),u){e=Na(u)?gb(u,Pt):Pt,D=vb("scroller-start",a,be,he,e,0),I=vb("scroller-end",a,be,he,e,0,D),t=D["offset"+he.op.d2];var f=J(z(be,"content")||be);A=this.markerStart=vb("start",a,f,he,e,t,0,pe),B=this.markerEnd=vb("end",a,f,he,e,t,0,pe),pe&&(T=He.quickSetter([A,B],he.a,kt)),ye||Fe.length&&!0===z(be,"fixedMarkers")||(function _makePositionable(e){var t=eb(e).position;e.style.position="absolute"===t||"fixed"===t?t:"relative"}(me?Ge:be),He.set([D,I],{force3D:!0}),y=He.quickSetter(D,he.a,kt),x=He.quickSetter(I,he.a,kt))}if(pe){var p=pe.vars.onUpdate,v=pe.vars.onUpdateParams;pe.eventCallback("onUpdate",function(){Te.update(0,0,1),p&&p.apply(v||[])})}Te.previous=function(){return At[At.indexOf(Te)-1]},Te.next=function(){return At[At.indexOf(Te)+1]},Te.revert=function(e,t){if(!t)return Te.kill(!0);var r=!1!==e||!Te.enabled,n=nt;r!==Te.isReverted&&(r&&(Z=Math.max(Pe(),Te.scroll.rec||0),G=Te.progress,$=C&&C.progress()),A&&[A,B,D,I].forEach(function(e){return e.style.display=r?"none":"block"}),r&&(nt=1,Te.update(r)),!ie||fe&&Te.isActive||(r?function _swapPinOut(e,t,r){Rt(r);var n=e._gsap;if(n.spacerIsNative)Rt(n.spacerState);else if(e._gsap.swappedIn){var o=t.parentNode;o&&(o.insertBefore(e,t),o.removeChild(t))}e._gsap.swappedIn=!1}(ie,N,R):Yb(ie,N,eb(ie),U)),r||Te.update(r),nt=n,Te.isReverted=r)},Te.refresh=function(e,t){if(!nt&&Te.enabled||t)if(ie&&e&&ht)ob(ScrollTrigger,"scrollEnd",Gb);else{!ut&&Se&&Se(Te),nt=1,Me=gt(),E.tween&&(E.tween.kill(),E.tween=0),q&&q.pause(),se&&C&&C.revert({kill:!1}).invalidate(),Te.isReverted||Te.revert(!0,!0),Te._subPinOffset=!1;for(var r,n,o,i,a,s,l,c,u,f,p,d=Ce(),g=Ee(),h=pe?pe.duration():Ia(be,he),v=0,b=0,m=S.end,y=S.endTrigger||oe,x=S.start||(0!==S.start&&oe?ie?"0 0":"0 100%":0),w=Te.pinnedContainer=S.pinnedContainer&&J(S.pinnedContainer),_=oe&&Math.max(0,At.indexOf(Te))||0,T=_;T--;)(s=At[T]).end||s.refresh(0,1)||(nt=1),!(l=s.pin)||l!==oe&&l!==ie||s.isReverted||((f=f||[]).unshift(s),s.revert(!0,!0)),s!==At[T]&&(_--,T--);for(La(x)&&(x=x(Te)),P=cc(x,oe,d,he,Pe(),A,D,Te,g,_e,ye,h,pe)||(ie?-.001:0),La(m)&&(m=m(Te)),Ka(m)&&!m.indexOf("+=")&&(~m.indexOf(" ")?m=(Ka(x)?x.split(" ")[0]:"")+m:(v=ub(m.substr(2),d),m=Ka(x)?x:P+v,y=oe)),O=Math.max(P,cc(m||(y?"100% 0":h),y,d,he,Pe()+v,B,I,Te,g,_e,ye,h,pe))||-.001,L=O-P||(P-=.01)&&.001,v=0,T=_;T--;)(l=(s=At[T]).pin)&&s.start-s._pinPush<=P&&!pe&&0<s.end&&(r=s.end-s.start,(l===oe&&s.start-s._pinPush<P||l===w)&&!Ma(x)&&(v+=r*(1-s.progress)),l===ie&&(b+=r));if(P+=v,O+=v,Te._pinPush=b,A&&v&&((r={})[he.a]="+="+v,w&&(r[he.p]="-="+Pe()),He.set([A,B],r)),ie)r=eb(ie),i=he===Ke,o=Pe(),W=parseFloat(X(he.a))+b,!h&&1<O&&((p={style:p=(me?je.scrollingElement||qe:be).style,value:p["overflow"+he.a.toUpperCase()]})["overflow"+he.a.toUpperCase()]="scroll"),Yb(ie,N,r),F=_b(ie),n=Mt(ie,!0),c=ye&&K(be,i?Xe:Ke)(),ae&&((U=[ae+he.os2,L+b+kt]).t=N,(T=ae===St?ib(ie,he)+L+b:0)&&U.push(he.d,T+kt),Rt(U),w&&At.forEach(function(e){e.pin===w&&!1!==e.vars.pinSpacing&&(e._subPinOffset=!0)}),ye&&Pe(Z)),ye&&((a={top:n.top+(i?o-P:c)+kt,left:n.left+(i?c:o-P)+kt,boxSizing:"border-box",position:"fixed"})[mt]=a.maxWidth=Math.ceil(n.width)+kt,a[yt]=a.maxHeight=Math.ceil(n.height)+kt,a[Ct]=a[Ct+_t]=a[Ct+xt]=a[Ct+Tt]=a[Ct+wt]="0",a[St]=r[St],a[St+_t]=r[St+_t],a[St+xt]=r[St+xt],a[St+Tt]=r[St+Tt],a[St+wt]=r[St+wt],Y=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}(R,a,fe),ut&&Pe(0)),C?(u=C._initted,st(1),C.render(C.duration(),!0,!0),H=X(he.a)-W+L+b,j=1<Math.abs(L-H),ye&&j&&Y.splice(Y.length-2,2),C.render(0,!0,!0),u||C.invalidate(!0),C.parent||C.totalTime(C.totalTime()),st(0)):H=L,p&&(p.value?p.style["overflow"+he.a.toUpperCase()]=p.value:p.style.removeProperty("overflow-"+he.a));else if(oe&&Pe()&&!pe)for(n=oe.parentNode;n&&n!==Ge;)n._pinOffset&&(P-=n._pinOffset,O-=n._pinOffset),n=n.parentNode;f&&f.forEach(function(e){return e.revert(!1,!0)}),Te.start=P,Te.end=O,k=M=ut?Z:Pe(),pe||ut||(k<Z&&Pe(Z),Te.scroll.rec=0),Te.revert(!1,!0),V&&(ke=-1,Te.isActive&&Pe(P+L*G),V.restart(!0)),nt=0,C&&ve&&(C._initted||$)&&C.progress()!==$&&C.progress($,!0).render(C.time(),!0,!0),G===Te.progress&&!pe||(C&&!ve&&C.totalProgress(G,!0),Te.progress=(k-P)/L===G?0:G),ie&&ae&&(N._pinOffset=Math.round(Te.progress*H)),re&&!ut&&re(Te)}},Te.getVelocity=function(){return(Pe()-M)/(gt()-rt)*1e3||0},Te.endAnimation=function(){Oa(Te.callbackAnimation),C&&(q?q.progress(1):C.paused()?ve||Oa(C,Te.direction<0,1):Oa(C,C.reversed()))},Te.labelToScroll=function(e){return C&&C.labels&&(P||Te.refresh()||P)+C.labels[e]/C.duration()*L||0},Te.getTrailing=function(t){var e=At.indexOf(Te),r=0<Te.direction?At.slice(0,e).reverse():At.slice(e+1);return(Ka(t)?r.filter(function(e){return e.vars.preventOverlaps===t}):r).filter(function(e){return 0<Te.direction?e.end<=P:e.start>=O})},Te.update=function(e,t,r){if(!pe||r||e){var n,o,i,a,s,l,c,u=ut?Z:Te.scroll(),f=e?0:(u-P)/L,p=f<0?0:1<f?1:f||0,d=Te.progress;if(t&&(M=k,k=pe?Pe():u,ue&&(_=w,w=C&&!ve?C.totalProgress():p)),le&&!p&&ie&&!nt&&!dt&&ht&&P<u+(u-M)/(gt()-rt)*le&&(p=1e-4),p!==d&&Te.enabled){if(a=(s=(n=Te.isActive=!!p&&p<1)!=(!!d&&d<1))||!!p!=!!d,Te.direction=d<p?1:-1,Te.progress=p,a&&!nt&&(o=p&&!d?0:1===p?1:1===d?2:3,ve&&(i=!s&&"none"!==we[o+1]&&we[o+1]||we[o],c=C&&("complete"===i||"reset"===i||i in C))),ge&&(s||c)&&(c||ne||!C)&&(La(ge)?ge(Te):Te.getTrailing(ge).forEach(function(e){return e.endAnimation()})),ve||(!q||nt||dt?C&&C.totalProgress(p,!!nt):(q._dp._time-q._start!==q._time&&q.render(q._dp._time-q._start),q.resetTo?q.resetTo("totalProgress",p,C._tTime/C._tDur):(q.vars.totalProgress=p,q.invalidate().restart()))),ie)if(e&&ae&&(N.style[ae+he.os2]=m),ye){if(a){if(l=!e&&d<p&&u<O+1&&u+1>=Ia(be,he),fe)if(e||!n&&!l)ec(ie,N);else{var g=Mt(ie,!0),h=u-P;ec(ie,Ge,g.top+(he===Ke?h:0)+kt,g.left+(he===Ke?0:h)+kt)}Rt(n||l?Y:F),j&&p<1&&n||b(W+(1!==p||l?0:H))}}else b(Ba(W+H*p));!ue||E.tween||nt||dt||V.restart(!0),ee&&(s||ce&&p&&(p<1||!ct))&&et(ee.targets).forEach(function(e){return e.classList[n||ce?"add":"remove"](ee.className)}),!Q||ve||e||Q(Te),a&&!nt?(ve&&(c&&("complete"===i?C.pause().totalProgress(1):"reset"===i?C.restart(!0).pause():"restart"===i?C.restart(!0):C[i]()),Q&&Q(Te)),!s&&ct||(te&&s&&Pa(Te,te),xe[o]&&Pa(Te,xe[o]),ce&&(1===p?Te.kill(!1,1):xe[o]=0),s||xe[o=1===p?1:3]&&Pa(Te,xe[o])),de&&!n&&Math.abs(Te.getVelocity())>(Ma(de)?de:2500)&&(Oa(Te.callbackAnimation),q?q.progress(1):Oa(C,"reverse"===i?1:!p,1))):ve&&Q&&!nt&&Q(Te)}if(x){var v=pe?u/pe.duration()*(pe._caScrollDist||0):u;y(v+(D._isFlipped?1:0)),x(v)}T&&T(-u/pe.duration()*(pe._caScrollDist||0))}},Te.enable=function(e,t){Te.enabled||(Te.enabled=!0,ob(be,"resize",Db),ob(me?je:be,"scroll",Bb),Se&&ob(ScrollTrigger,"refreshInit",Se),!1!==e&&(Te.progress=G=0,k=M=ke=Pe()),!1!==t&&Te.refresh())},Te.getTween=function(e){return e&&E?E.tween:q},Te.setPositions=function(e,t){ie&&(W+=e-P,H+=t-e-L,ae===St&&Te.adjustPinSpacing(t-e-L)),Te.start=P=e,Te.end=O=t,L=t-e,Te.update()},Te.adjustPinSpacing=function(e){if(U){var t=U.indexOf(he.d)+1;U[t]=parseFloat(U[t])+e+kt,U[1]=parseFloat(U[1])+e+kt,Rt(U)}},Te.disable=function(e,t){if(Te.enabled&&(!1!==e&&Te.revert(!0,!0),Te.enabled=Te.isActive=!1,t||q&&q.pause(),Z=0,n&&(n.uncache=1),Se&&pb(ScrollTrigger,"refreshInit",Se),V&&(V.pause(),E.tween&&E.tween.kill()&&(E.tween=0)),!me)){for(var r=At.length;r--;)if(At[r].scroller===be&&At[r]!==Te)return;pb(be,"resize",Db),pb(be,"scroll",Bb)}},Te.kill=function(e,t){Te.disable(e,t),q&&!t&&q.kill(),a&&delete Bt[a];var r=At.indexOf(Te);0<=r&&At.splice(r,1),r===it&&0<Lt&&it--,r=0,At.forEach(function(e){return e.scroller===Te.scroller&&(r=1)}),r||ut||(Te.scroll.rec=0),C&&(C.scrollTrigger=null,e&&C.revert({kill:!1}),t||C.kill()),A&&[A,B,D,I].forEach(function(e){return e.parentNode&&e.parentNode.removeChild(e)}),pt===Te&&(pt=0),ie&&(n&&(n.uncache=1),r=0,At.forEach(function(e){return e.pin===ie&&r++}),r||(n.spacer=0)),S.onKill&&S.onKill(Te)},Te.enable(!1,!1),i&&i(Te),C&&C.add&&!L?He.delayedCall(.01,function(){return P||O||Te.refresh()})&&(L=.01)&&(P=O=0):Te.refresh(),ie&&function _queueRefreshAll(){if(ft!==Dt){var e=ft=Dt;requestAnimationFrame(function(){return e===Dt&&It(!0)})}}()}else this.update=this.refresh=this.kill=Aa},ScrollTrigger.register=function register(e){return s||(He=e||Da(),Ca()&&window.document&&ScrollTrigger.enable(),s=vt),s},ScrollTrigger.defaults=function defaults(e){if(e)for(var t in e)Ot[t]=e[t];return Ot},ScrollTrigger.disable=function disable(t,r){vt=0,At.forEach(function(e){return e[r?"kill":"disable"](t)}),pb(Je,"wheel",Bb),pb(je,"scroll",Bb),clearInterval(u),pb(je,"touchcancel",Aa),pb(Ge,"touchstart",Aa),nb(pb,je,"pointerdown,touchstart,mousedown",ya),nb(pb,je,"pointerup,touchend,mouseup",za),c.kill(),Ja(pb);for(var e=0;e<ze.length;e+=3)qb(pb,ze[e],ze[e+1]),qb(pb,ze[e],ze[e+2])},ScrollTrigger.enable=function enable(){if(Je=window,je=document,qe=je.documentElement,Ge=je.body,He&&(et=He.utils.toArray,tt=He.utils.clamp,lt=He.core.context||Aa,st=He.core.suppressOverwrites||Aa,x=Je.history.scrollRestoration||"auto",He.core.globals("ScrollTrigger",ScrollTrigger),Ge)){vt=1,E.register(He),ScrollTrigger.isTouch=E.isTouch,k=E.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),ob(Je,"wheel",Bb),l=[Je,je,qe,Ge],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 Kb()}),He.addEventListener("matchMediaRevert",function(){return Jb()}),He.addEventListener("matchMedia",function(){It(0,1),W("matchMedia")}),He.matchMedia("(orientation: portrait)",function(){return Cb(),Cb})):console.warn("Requires GSAP 3.11.0 or later"),Cb(),ob(je,"scroll",Bb);var e,t,r=Ge.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=Mt(Ge),Ke.m=Math.round(e.top+Ke.sc())||0,Xe.m=Math.round(e.left+Xe.sc())||0,n?r.borderTopStyle=n:r.removeProperty("border-top-style"),u=setInterval(Ab,250),He.delayedCall(.5,function(){return dt=0}),ob(je,"touchcancel",Aa),ob(Ge,"touchstart",Aa),nb(ob,je,"pointerdown,touchstart,mousedown",ya),nb(ob,je,"pointerup,touchend,mouseup",za),f=He.utils.checkPrefix("transform"),V.push(f),s=gt(),c=He.delayedCall(.2,It).pause(),g=[je,"visibilitychange",function(){var e=Je.innerWidth,t=Je.innerHeight;je.hidden?(p=e,d=t):p===e&&d===t||Db()},je,"DOMContentLoaded",It,Je,"load",It,Je,"resize",Db],Ja(ob),At.forEach(function(e){return e.enable(0,1)}),t=0;t<ze.length;t+=3)qb(pb,ze[t],ze[t+1]),qb(pb,ze[t],ze[t+2])}},ScrollTrigger.config=function config(e){"limitCallbacks"in e&&(ct=!!e.limitCallbacks);var t=e.syncInterval;t&&clearInterval(u)||(u=t)&&setInterval(Ab,t),"ignoreMobileResize"in e&&(b=1===ScrollTrigger.isTouch&&e.ignoreMobileResize),"autoRefreshEvents"in e&&(Ja(pb)||Ja(ob,e.autoRefreshEvents||"none"),h=-1===(e.autoRefreshEvents+"").indexOf("resize"))},ScrollTrigger.scrollerProxy=function scrollerProxy(e,t){var r=J(e),n=ze.indexOf(r),o=Ea(r);~n&&ze.splice(n,o?6:2),t&&(o?Fe.unshift(Je,t,Ge,t,qe,t):Fe.unshift(r,t))},ScrollTrigger.clearMatchMedia=function clearMatchMedia(t){At.forEach(function(e){return e._ctx&&e._ctx.query===t&&e._ctx.kill(!0,!0)})},ScrollTrigger.isInViewport=function isInViewport(e,t,r){var n=(Ka(e)?J(e):e).getBoundingClientRect(),o=n[r?mt:yt]*t||0;return r?0<n.right-o&&n.left+o<Je.innerWidth:0<n.bottom-o&&n.top+o<Je.innerHeight},ScrollTrigger.positionInViewport=function positionInViewport(e,t,r){Ka(e)&&(e=J(e));var n=e.getBoundingClientRect(),o=n[r?mt:yt],i=null==t?o/2:t in I?I[t]*o:~t.indexOf("%")?parseFloat(t)*o/100:parseFloat(t)||0;return r?(n.left+i)/Je.innerWidth:(n.top+i)/Je.innerHeight},ScrollTrigger.killAll=function killAll(e){if(At.slice(0).forEach(function(e){return"ScrollSmoother"!==e.vars.id&&e.kill()}),!0!==e){var t=Y.killAll||[];Y={},t.forEach(function(e){return e()})}},ScrollTrigger);function ScrollTrigger(e,t){s||ScrollTrigger.register(He)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),this.init(e,t)}Q.version="3.11.4",Q.saveStyles=function(e){return e?et(e).forEach(function(e){if(e&&e.style){var t=H.indexOf(e);0<=t&&H.splice(t,5),H.push(e,e.style.cssText,e.getBBox&&e.getAttribute("transform"),He.core.getCache(e),lt())}}):H},Q.revert=function(e,t){return Kb(!e,t)},Q.create=function(e,t){return new Q(e,t)},Q.refresh=function(e){return e?Db():(s||Q.register())&&It(!0)},Q.update=function(e){return++ze.cache&&j(!0===e?2:0)},Q.clearScrollMemory=Lb,Q.maxScroll=function(e,t){return Ia(e,t?Xe:Ke)},Q.getScrollFunc=function(e,t){return K(J(e),t?Xe:Ke)},Q.getById=function(e){return Bt[e]},Q.getAll=function(){return At.filter(function(e){return"ScrollSmoother"!==e.vars.id})},Q.isScrolling=function(){return!!ht},Q.snapDirectional=lb,Q.addEventListener=function(e,t){var r=Y[e]||(Y[e]=[]);~r.indexOf(t)||r.push(t)},Q.removeEventListener=function(e,t){var r=Y[e],n=r&&r.indexOf(t);0<=n&&r.splice(n,1)},Q.batch=function(e,t){function Io(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)&&La(t[r])&&"onRefreshInit"!==r?Io(0,t[r]):t[r];return La(a)&&(a=a(),ob(Q,"refresh",function(){return a=t.batchMax()})),et(e).forEach(function(e){var t={};for(r in o)t[r]=o[r];t.trigger=e,n.push(Q.create(t))}),n};function hc(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 ic(e,t){!0===t?e.style.removeProperty("touch-action"):e.style.touchAction=!0===t?"auto":t?"pan-"+t+(E.isTouch?" pinch-zoom":""):"none",e===qe&&ic(Ge,t)}function kc(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=gt();if(!a._isScrollT||2e3<s-a._isScrollT){for(;i&&i!==Ge&&(i.scrollHeight<=i.clientHeight&&i.scrollWidth<=i.clientWidth||!te[(t=eb(i)).overflowY]&&!te[t.overflowX]);)i=i.parentNode;a._isScroll=i&&i!==n&&!Ea(i)&&(te[(t=eb(i)).overflowY]||te[t.overflowX]),a._isScrollT=s}!a._isScroll&&"x"!==o||(r.stopPropagation(),r._gsapAllow=!0)}function lc(e,t,r,n){return E.create({target:e,capture:!0,debounce:!1,lockAxis:!0,type:t,onWheel:n=n&&kc,onPress:n,onDrag:n,onScroll:n,onEnable:function onEnable(){return r&&ob(je,E.eventTypes[0],ne,!1,!0)},onDisable:function onDisable(){return pb(je,E.eventTypes[0],ne,!0)}})}function pc(e){function Ep(){return o=!1}function Hp(){i=Ia(p,Ke),S=tt(k?1:0,i),f&&(T=tt(0,Ia(p,Xe))),l=Dt}function Ip(){h._gsap.y=Ba(parseFloat(h._gsap.y)+v.offset)+"px",h.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(h._gsap.y)+", 0, 1)",v.offset=v.cacheID=0}function Op(){Hp(),a.isActive()&&a.vars.scrollY>i&&(v()>i?a.progress(1)&&v(i):a.resetTo("scrollY",i))}Na(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,p=J(e.target)||qe,d=He.core.globals().ScrollSmoother,g=d&&d.get(),h=k&&(e.content&&J(e.content)||g&&!1!==e.content&&!g.smooth()&&g.content()),v=K(p,Ke),b=K(p,Xe),m=1,y=(E.isTouch&&Je.visualViewport?Je.visualViewport.scale*Je.visualViewport.width:Je.outerWidth)/Je.innerWidth,x=0,w=La(t)?function(){return t(n)}:function(){return t||2.8},_=lc(p,e.type,!0,r),T=Aa,S=Aa;return h&&He.set(h,{y:"+=0"}),e.ignoreCheck=function(e){return k&&"touchmove"===e.type&&function ignoreDrag(){if(o){requestAnimationFrame(Ep);var e=Ba(n.deltaY/2),t=S(v.v-e);if(h&&t!==v.v+v.offset){v.offset=t-v.v;var r=Ba((parseFloat(h&&h._gsap.y)||0)-v.offset);h.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+r+", 0, 1)",h._gsap.y=r+"px",v.cacheID=ze.cache,j()}return!0}v.offset&&Ip(),o=!0}()||1.05<m&&"touchstart"!==e.type||n.isGesturing||e.touches&&1<e.touches.length},e.onPress=function(){var e=m;m=Ba((Je.visualViewport&&Je.visualViewport.scale||1)/y),a.pause(),e!==m&&ic(p,1.01<m||!f&&"x"),c=b(),u=v(),Hp(),l=Dt},e.onRelease=e.onGestureStart=function(e,t){if(v.offset&&Ip(),t){ze.cache++;var r,n,o=w();f&&(n=(r=b())+.05*o*-e.velocityX/.227,o*=hc(b,r,n,Ia(p,Xe)),a.vars.scrollX=T(n)),n=(r=v())+.05*o*-e.velocityY/.227,o*=hc(v,r,n,Ia(p,Ke)),a.vars.scrollY=S(n),a.invalidate().duration(o).play(.01),(k&&a.vars.scrollY>=i||i-1<=r)&&He.to({},{onUpdate:Op,duration:o})}else s.restart(!0)},e.onWheel=function(){a._ts&&a.pause(),1e3<gt()-x&&(l=0,x=gt())},e.onChange=function(e,t,r,n,o){if(Dt!==l&&Hp(),t&&f&&b(T(n[2]===t?c+(e.startX-e.x):b()+t-n[1])),r){v.offset&&Ip();var i=o[2]===r,a=i?u+e.startY-e.y:v()+r-o[1],s=S(a);i&&a!==s&&(u+=s-a),v(s)}(r||t)&&j()},e.onEnable=function(){ic(p,!f&&"x"),Q.addEventListener("refresh",Op),ob(Je,"resize",Op),v.smooth&&(v.target.style.scrollBehavior="auto",v.smooth=b.smooth=!1),_.enable()},e.onDisable=function(){ic(p,!0),pb(Je,"resize",Op),Q.removeEventListener("refresh",Op),_.kill()},e.lockAxis=!1!==e.lockAxis,((n=new E(e)).iOS=k)&&!v()&&v(1),k&&He.ticker.add(Aa),s=n._dc,a=He.to(n,{ease:"power4",paused:!0,scrollX:f?"+=0.1":"+=0",scrollY:"+=0.1",onComplete:s.vars.onComplete}),n}var ee,te={auto:1,scroll:1},re=/(input|label|select|textarea)/i,ne=function _captureInputs(e){var t=re.test(e.target.tagName);(t||ee)&&(e._gsapAllow=!0,ee=t)};Q.sort=function(e){return At.sort(e||function(e,t){return-1e6*(e.vars.refreshPriority||0)+e.start-(t.start+-1e6*(t.vars.refreshPriority||0))})},Q.observe=function(e){return new E(e)},Q.normalizeScroll=function(e){if(void 0===e)return v;if(!0===e&&v)return v.enable();if(!1===e)return v&&v.kill();var t=e instanceof E?e:pc(e);return v&&v.target===t.target&&v.kill(),Ea(t.target)&&(v=t),t},Q.core={_getVelocityProp:L,_inputObserver:lc,_scrollers:ze,_proxies:Fe,bridge:{ss:function ss(){ht||W("scrollStart"),ht=gt()},ref:function ref(){return nt}}},Da()&&He.registerPlugin(Q),e.ScrollTrigger=Q,e.default=Q;if(typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})}else{delete e.default}});
!function(D,u){"object"==typeof exports&&"undefined"!=typeof module?u(exports):"function"==typeof define&&define.amd?define(["exports"],u):u((D=D||self).window=D.window||{})}(this,function(D){"use strict";var _=/([\uD800-\uDBFF][\uDC00-\uDFFF](?:[\u200D\uFE0F][\uD800-\uDBFF][\uDC00-\uDFFF]){2,}|\uD83D\uDC69(?:\u200D(?:(?:\uD83D\uDC69\u200D)?\uD83D\uDC67|(?:\uD83D\uDC69\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]\uFE0F|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC6F\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3C-\uDD3E\uDDD6-\uDDDF])\u200D[\u2640\u2642]\uFE0F|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F\u200D[\u2640\u2642]|(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642])\uFE0F|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC69\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708]))\uFE0F|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83D\uDC69\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]))|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\u200D(?:(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDD1-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])?|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])\uFE0F)/;function k(D){return e.getComputedStyle(D)}function n(D,u){var e;return i(D)?D:"string"==(e=typeof D)&&!u&&D?E.call(X.querySelectorAll(D),0):D&&"object"==e&&"length"in D?E.call(D,0):D?[D]:[]}function o(D){return"absolute"===D.position||!0===D.absolute}function p(D,u){for(var e,t=u.length;-1<--t;)if(e=u[t],D.substr(0,e.length)===e)return e.length}function r(D,u){void 0===D&&(D="");var e=~D.indexOf("++"),t=1;return e&&(D=D.split("++").join("")),function(){return"<"+u+" style='position:relative;display:inline-block;'"+(D?" class='"+D+(e?t++:"")+"'>":">")}}function s(D,u,e){var t=D.nodeType;if(1===t||9===t||11===t)for(D=D.firstChild;D;D=D.nextSibling)s(D,u,e);else 3!==t&&4!==t||(D.nodeValue=D.nodeValue.split(u).join(e))}function t(D,u){for(var e=u.length;-1<--e;)D.push(u[e])}function u(D,u,e){for(var t;D&&D!==u;){if(t=D._next||D.nextSibling)return t.textContent.charAt(0)===e;D=D.parentNode||D._parent}}function v(D){var u,e,t=n(D.childNodes),F=t.length;for(u=0;u<F;u++)(e=t[u])._isSplit?v(e):u&&e.previousSibling&&3===e.previousSibling.nodeType?(e.previousSibling.nodeValue+=3===e.nodeType?e.nodeValue:e.firstChild.nodeValue,D.removeChild(e)):3!==e.nodeType&&(D.insertBefore(e.firstChild,e),D.removeChild(e))}function w(D,u){return parseFloat(u[D])||0}function x(D,e,F,C,i,n,E){var r,l,p,d,a,h,B,f,A,c,x,g,y=k(D),_=w("paddingLeft",y),b=-999,S=w("borderBottomWidth",y)+w("borderTopWidth",y),T=w("borderLeftWidth",y)+w("borderRightWidth",y),m=w("paddingTop",y)+w("paddingBottom",y),N=w("paddingLeft",y)+w("paddingRight",y),L=w("fontSize",y)*(e.lineThreshold||.2),W=y.textAlign,H=[],O=[],V=[],j=e.wordDelimiter||" ",M=e.tag?e.tag:e.span?"span":"div",R=e.type||e.split||"chars,words,lines",z=i&&~R.indexOf("lines")?[]:null,P=~R.indexOf("words"),q=~R.indexOf("chars"),G=o(e),I=e.linesClass,J=~(I||"").indexOf("++"),K=[],Q="flex"===y.display,U=D.style.display;for(J&&(I=I.split("++").join("")),Q&&(D.style.display="block"),p=(l=D.getElementsByTagName("*")).length,a=[],r=0;r<p;r++)a[r]=l[r];if(z||G)for(r=0;r<p;r++)((h=(d=a[r]).parentNode===D)||G||q&&!P)&&(g=d.offsetTop,z&&h&&Math.abs(g-b)>L&&("BR"!==d.nodeName||0===r)&&(B=[],z.push(B),b=g),G&&(d._x=d.offsetLeft,d._y=g,d._w=d.offsetWidth,d._h=d.offsetHeight),z&&((d._isSplit&&h||!q&&h||P&&h||!P&&d.parentNode.parentNode===D&&!d.parentNode._isSplit)&&(B.push(d),d._x-=_,u(d,D,j)&&(d._wordEnd=!0)),"BR"===d.nodeName&&(d.nextSibling&&"BR"===d.nextSibling.nodeName||0===r)&&z.push([])));for(r=0;r<p;r++)if(h=(d=a[r]).parentNode===D,"BR"!==d.nodeName)if(G&&(A=d.style,P||h||(d._x+=d.parentNode._x,d._y+=d.parentNode._y),A.left=d._x+"px",A.top=d._y+"px",A.position="absolute",A.display="block",A.width=d._w+1+"px",A.height=d._h+"px"),!P&&q)if(d._isSplit)for(d._next=l=d.nextSibling,d.parentNode.appendChild(d);l&&3===l.nodeType&&" "===l.textContent;)d._next=l.nextSibling,d.parentNode.appendChild(l),l=l.nextSibling;else d.parentNode._isSplit?(d._parent=d.parentNode,!d.previousSibling&&d.firstChild&&(d.firstChild._isFirst=!0),d.nextSibling&&" "===d.nextSibling.textContent&&!d.nextSibling.nextSibling&&K.push(d.nextSibling),d._next=d.nextSibling&&d.nextSibling._isFirst?null:d.nextSibling,d.parentNode.removeChild(d),a.splice(r--,1),p--):h||(g=!d.nextSibling&&u(d.parentNode,D,j),d.parentNode._parent&&d.parentNode._parent.appendChild(d),g&&d.parentNode.appendChild(X.createTextNode(" ")),"span"===M&&(d.style.display="inline"),H.push(d));else d.parentNode._isSplit&&!d._isSplit&&""!==d.innerHTML?O.push(d):q&&!d._isSplit&&("span"===M&&(d.style.display="inline"),H.push(d));else z||G?(d.parentNode&&d.parentNode.removeChild(d),a.splice(r--,1),p--):P||D.appendChild(d);for(r=K.length;-1<--r;)K[r].parentNode.removeChild(K[r]);if(z){for(G&&(c=X.createElement(M),D.appendChild(c),x=c.offsetWidth+"px",g=c.offsetParent===D?0:D.offsetLeft,D.removeChild(c)),A=D.style.cssText,D.style.cssText="display:none;";D.firstChild;)D.removeChild(D.firstChild);for(f=" "===j&&(!G||!P&&!q),r=0;r<z.length;r++){for(B=z[r],(c=X.createElement(M)).style.cssText="display:block;text-align:"+W+";position:"+(G?"absolute;":"relative;"),I&&(c.className=I+(J?r+1:"")),V.push(c),p=B.length,l=0;l<p;l++)"BR"!==B[l].nodeName&&(d=B[l],c.appendChild(d),f&&d._wordEnd&&c.appendChild(X.createTextNode(" ")),G&&(0===l&&(c.style.top=d._y+"px",c.style.left=_+g+"px"),d.style.top="0px",g&&(d.style.left=d._x-g+"px")));0===p?c.innerHTML="&nbsp;":P||q||(v(c),s(c,String.fromCharCode(160)," ")),G&&(c.style.width=x,c.style.height=d._h+"px"),D.appendChild(c)}D.style.cssText=A}G&&(E>D.clientHeight&&(D.style.height=E-m+"px",D.clientHeight<E&&(D.style.height=E+S+"px")),n>D.clientWidth&&(D.style.width=n-N+"px",D.clientWidth<n&&(D.style.width=n+T+"px"))),Q&&(U?D.style.display=U:D.style.removeProperty("display")),t(F,H),P&&t(C,O),t(i,V)}function y(D,u,e,t){var F,C,i,n,E,r,l,d,a=u.tag?u.tag:u.span?"span":"div",h=~(u.type||u.split||"chars,words,lines").indexOf("chars"),B=o(u),f=u.wordDelimiter||" ",A=" "!==f?"":B?"&#173; ":" ",c="</"+a+">",x=1,g=u.specialChars?"function"==typeof u.specialChars?u.specialChars:p:null,y=X.createElement("div"),v=D.parentNode;for(v.insertBefore(y,D),y.textContent=D.nodeValue,v.removeChild(D),l=-1!==(F=function getText(D){var u=D.nodeType,e="";if(1===u||9===u||11===u){if("string"==typeof D.textContent)return D.textContent;for(D=D.firstChild;D;D=D.nextSibling)e+=getText(D)}else if(3===u||4===u)return D.nodeValue;return e}(D=y)).indexOf("<"),!1!==u.reduceWhiteSpace&&(F=F.replace(S," ").replace(b,"")),l&&(F=F.split("<").join("{{LT}}")),E=F.length,C=(" "===F.charAt(0)?A:"")+e(),i=0;i<E;i++)if(r=F.charAt(i),g&&(d=g(F.substr(i),u.specialChars)))r=F.substr(i,d||1),C+=h&&" "!==r?t()+r+"</"+a+">":r,i+=d-1;else if(r===f&&F.charAt(i-1)!==f&&i){for(C+=x?c:"",x=0;F.charAt(i+1)===f;)C+=A,i++;i===E-1?C+=A:")"!==F.charAt(i+1)&&(C+=A+e(),x=1)}else"{"===r&&"{{LT}}"===F.substr(i,6)?(C+=h?t()+"{{LT}}</"+a+">":"{{LT}}",i+=5):55296<=r.charCodeAt(0)&&r.charCodeAt(0)<=56319||65024<=F.charCodeAt(i+1)&&F.charCodeAt(i+1)<=65039?(n=((F.substr(i,12).split(_)||[])[1]||"").length||2,C+=h&&" "!==r?t()+F.substr(i,n)+"</"+a+">":F.substr(i,n),i+=n-1):C+=h&&" "!==r?t()+r+"</"+a+">":r;D.outerHTML=C+(x?c:""),l&&s(v,"{{LT}}","<")}function z(D,u,e,t){var F,C,i=n(D.childNodes),E=i.length,s=o(u);if(3!==D.nodeType||1<E){for(u.absolute=!1,F=0;F<E;F++)(C=i[F])._next=C._isFirst=C._parent=C._wordEnd=null,3===C.nodeType&&!/\S+/.test(C.nodeValue)||(s&&3!==C.nodeType&&"inline"===k(C).display&&(C.style.display="inline-block",C.style.position="relative"),C._isSplit=!0,z(C,u,e,t));return u.absolute=s,void(D._isSplit=!0)}y(D,u,e,t)}var X,e,F,C,b=/(?:\r|\n|\t\t)/g,S=/(?:\s\s+)/g,i=Array.isArray,E=[].slice,l=((C=SplitText.prototype).split=function split(D){this.isSplit&&this.revert(),this.vars=D=D||this.vars,this._originals.length=this.chars.length=this.words.length=this.lines.length=0;for(var u,e,t,F=this.elements.length,C=D.tag?D.tag:D.span?"span":"div",i=r(D.wordsClass,C),n=r(D.charsClass,C);-1<--F;)t=this.elements[F],this._originals[F]=t.innerHTML,u=t.clientHeight,e=t.clientWidth,z(t,D,i,n),x(t,D,this.chars,this.words,this.lines,e,u);return this.chars.reverse(),this.words.reverse(),this.lines.reverse(),this.isSplit=!0,this},C.revert=function revert(){var e=this._originals;if(!e)throw"revert() call wasn't scoped properly.";return this.elements.forEach(function(D,u){return D.innerHTML=e[u]}),this.chars=[],this.words=[],this.lines=[],this.isSplit=!1,this},SplitText.create=function create(D,u){return new SplitText(D,u)},SplitText);function SplitText(D,u){F||function _initCore(){X=document,e=window,F=1}(),this.elements=n(D),this.chars=[],this.words=[],this.lines=[],this._originals=[],this.vars=u||{},this.split(u)}l.version="3.6.1",D.SplitText=l,D.default=l;if(typeof(window)==="undefined"||window!==D){Object.defineProperty(D,"__esModule",{value:!0})}else{delete D.default}});;
(function($){
var PXLTypewriteHandler=function($scope, $){
var highlight_on=$scope.find(".typewrite");
if(highlight_on.length==0){
return false;
}
var TxtType=function(el, toRotate, period){
this.toRotate=toRotate;
this.el=el;
this.loopNum=0;
this.period=parseInt(period, 10)||1000;
this.txt='';
this.tick();
this.isDeleting=false;
};
TxtType.prototype.tick=function(){
var i=this.loopNum % this.toRotate.length;
var fullTxt=this.toRotate[i];
if(this.isDeleting){
this.txt=fullTxt.substring(0, this.txt.length - 1);
}else{
this.txt=fullTxt.substring(0, this.txt.length + 1);
}
this.el.innerHTML='<span class="wrap">'+this.txt+'</span>';
var that=this;
var delta=200 - Math.random() * 100;
if(this.isDeleting){ delta /=2; }
if(!this.isDeleting&&this.txt===fullTxt){
delta=this.period;
this.isDeleting=true;
}else if(this.isDeleting&&this.txt===''){
this.isDeleting=false;
this.loopNum++;
delta=200;
}
setTimeout(function(){
that.tick();
}, delta);
};
var elements=document.getElementsByClassName('typewrite');
for (var i=0; i<elements.length; i++){
var toRotate=elements[i].getAttribute('data-type');
var period=elements[i].getAttribute('data-period');
if(toRotate){
new TxtType(elements[i], JSON.parse(toRotate), period);
}}
};
$(window).on('elementor/frontend/init', function(){
elementorFrontend.hooks.addAction('frontend/element_ready/pxl_heading.default', PXLTypewriteHandler);
});
})(jQuery);
(function(modules){
var installedModules={};
function __webpack_require__(moduleId){
if(installedModules[moduleId]){
return installedModules[moduleId].exports;
}
var module=installedModules[moduleId]={
i: moduleId,
l: false,
exports: {}
};
modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
module.l=true;
return module.exports;
}
__webpack_require__.m=modules;
__webpack_require__.c=installedModules;
__webpack_require__.d=function(exports, name, getter){
if(!__webpack_require__.o(exports, name)){
Object.defineProperty(exports, name, {
configurable: false,
enumerable: true,
get: getter
});
}
};
__webpack_require__.n=function(module){
var getter=module&&module.__esModule ?
function getDefault(){ return module['default']; } :
function getModuleExports(){ return module; };
__webpack_require__.d(getter, 'a', getter);
return getter;
};
__webpack_require__.o=function(object, property){ return Object.prototype.hasOwnProperty.call(object, property); };
__webpack_require__.p="";
return __webpack_require__(__webpack_require__.s=0);
})
([
(function(module, exports, __webpack_require__){
"use strict";
var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol" ? function (obj){ return typeof obj; }:function (obj){ return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype ? "symbol":typeof obj; };
var _createClass=function (){ function defineProperties(target, props){ for (var i=0; i < props.length; i++){ var descriptor=props[i]; descriptor.enumerable=descriptor.enumerable||false; descriptor.configurable=true; if("value" in descriptor) descriptor.writable=true; Object.defineProperty(target, descriptor.key, descriptor); }} return function (Constructor, protoProps, staticProps){ if(protoProps) defineProperties(Constructor.prototype, protoProps); if(staticProps) defineProperties(Constructor, staticProps); return Constructor; };}();
function _classCallCheck(instance, Constructor){ if(!(instance instanceof Constructor)){ throw new TypeError("Cannot call a class as a function"); }}
(function ($){
var ParallaxBackground=function (){
function ParallaxBackground(element, options){
_classCallCheck(this, ParallaxBackground);
var self=this;
self.settings=$.extend(true, {
event: 'scroll',
animation_type: 'shift',
zoom: 20,
rotate_perspective: 1400,
animate_duration: 1,
ignore_z_index: false,
gyroscope_event: true
}, options);
self.$element=$(element);
self.$element_inner=self.$element.find('.parallax-inner');
self.data_options=self.$element.data('parallax-background');
self.settings=$.extend(true, self.settings, self.data_options);
self.inner_size=self.settings.zoom + 100;
self.coef=self.inner_size / 100;
self.shift=self.settings.zoom / 2 / self.coef;
self.device_orientation='';
self.viewport_top=0;
self.viewport_bottom=0;
self.init();
}
_createClass(ParallaxBackground, [{
key: 'init',
value: function init(){
if(typeof TweenLite==='undefined'){
console.warn('TweenMax or TweenLite library is required... https://greensock.com/tweenlite');
return;
}
if(typeof CSSPlugin==='undefined'){
console.warn('CSSPlugin in required... https://greensock.com/CSSPlugin');
return;
}
var self=this;
self.set_elements_styles();
self.update_window_size();
self.update_orientation();
$(window).on('resize', function (){
self.update_window_size();
self.update_orientation();
});
if(self.settings.event=='scroll'){
self.update_viewports();
$(window).on('scroll', function (){
self.update_viewports();
});
}
if(self.settings.event=='scroll'){
self.subscribe_scroll_event();
}else if(self.settings.event=='mouse_move'){
self.subscribe_mouse_move_event();
}
if(self.settings.gyroscope_event){
self.subscribe_gyro_event();
}}
}, {
key: 'update_window_size',
value: function update_window_size(){
var self=this;
self.ww=window.innerWidth;
self.wh=window.innerHeight;
}}, {
key: 'update_viewports',
value: function update_viewports(){
var self=this;
self.viewport_top=$(window).scrollTop();
self.viewport_bottom=self.viewport_top + self.wh;
}}, {
key: 'set_elements_styles',
value: function set_elements_styles(){
var self=this;
self.$element.css({
'overflow': 'hidden'
});
self.$element_inner.css({
'top': -self.settings.zoom / 2 + '%',
'left': -self.settings.zoom / 2 + '%',
'height': self.inner_size + '%',
'width': self.inner_size + '%',
'position': 'absolute'
});
if(self.settings.animation_type=='rotate'){
TweenLite.set(self.$element, { perspective: self.settings.rotate_perspective });
TweenLite.set(self.$element_inner, { transformStyle: "preserve-3d" });
}}
}, {
key: 'update_orientation',
value: function update_orientation(){
var self=this;
if(self.ww > self.wh){
self.device_orientation='landscape';
}else{
self.device_orientation='portrait';
}}
}, {
key: 'subscribe_gyro_event',
value: function subscribe_gyro_event(){
var self=this;
var lastGamma=0,
lastBeta=0,
rangeGamma=0,
rangeBeta=0;
window.addEventListener("deviceorientation", function (e){
var roundedGamma=Math.round(e.gamma),
roundedBeta=Math.round(e.beta),
x=0,
y=0;
if(roundedGamma > lastGamma&&rangeGamma < 15){
rangeGamma++;
}else if(roundedGamma < lastGamma&&rangeGamma > -15){
rangeGamma--;
}
if(roundedBeta > lastBeta&&rangeBeta < 15){
rangeBeta++;
}else if(roundedBeta < lastBeta&&rangeBeta > -15){
rangeBeta--;
}
lastGamma=roundedGamma;
lastBeta=roundedBeta;
var gamaInPercent=100 / 15 * rangeGamma,
betaInPercent=100 / 15 * rangeBeta;
if(self.device_orientation=='landscape'){
x=self.shift / self.coef / 100 * betaInPercent;
y=self.shift / self.coef / 100 * gamaInPercent;
}else{
x=self.shift / self.coef / 100 * gamaInPercent;
y=self.shift / self.coef / 100 * betaInPercent * -1;
}
if(self.settings.animation_type=='shift'){
TweenLite.to(self.$element_inner, self.settings.animate_duration, { x: y + '%', y: x + '%' });
}else if(self.settings.animation_type=='rotate'){
TweenLite.to(self.$element_inner, self.settings.animate_duration, {
rotationX: -y + '%',
rotationY: -x + '%'
});
}}, true);
}}, {
key: 'get_cursor_shift_by_element',
value: function get_cursor_shift_by_element($element, cursor_x, cursor_y){
var self=this;
var offset=$element.offset(),
sectionWidth=$element.outerWidth(),
sectionHeight=$element.outerHeight(),
pageX=cursor_x - offset.left - $element.width() * 0.5,
pageY=cursor_y - offset.top - $element.height() * 0.5,
cursorPercentPositionX=pageX / sectionWidth * 2,
cursorPercentPositionY=pageY / sectionHeight * 2,
x=self.shift * cursorPercentPositionX,
y=self.shift * cursorPercentPositionY;
return { x: x, y: y };}}, {
key: 'is_cursor_on_element',
value: function is_cursor_on_element($element, cursor_x, cursor_y){
var offset=$element.offset();
var top=offset.top;
var left=offset.left;
var right=left + $element.outerWidth();
var bottom=top + $element.outerHeight();
return cursor_x > left&&cursor_x < right&&cursor_y > top&&cursor_y < bottom;
}}, {
key: 'subscribe_mouse_move_event',
value: function subscribe_mouse_move_event(){
var self=this;
if(self.settings.ignore_z_index){
var is_cursor_on_element=false;
$(document).on("mousemove", function (e){
if(self.is_cursor_on_element(self.$element, e.pageX, e.pageY)){
var cursor_shift=self.get_cursor_shift_by_element(self.$element, e.pageX, e.pageY, true);
animate_on_mousemove(cursor_shift.x, cursor_shift.y);
is_cursor_on_element=true;
}else{
if(is_cursor_on_element){
animate_on_mouseleave();
is_cursor_on_element=false;
}}
});
}else{
self.$element.on("mousemove", function (e){
var cursor_shift=self.get_cursor_shift_by_element(self.$element, e.pageX, e.pageY, true);
animate_on_mousemove(cursor_shift.x, cursor_shift.y);
});
self.$element.mouseleave(function (){
animate_on_mouseleave();
});
}
function animate_on_mouseleave(){
if(self.settings.animation_type=='shift'){
TweenLite.to(self.$element_inner, self.settings.animate_duration, { x: '0%', y: '0%' });
}else if(self.settings.animation_type=='rotate'){
TweenLite.to(self.$element_inner, self.settings.animate_duration, { rotationX: 0, rotationY: 0 });
}}
function animate_on_mousemove(x, y){
if(self.settings.animation_type=='shift'){
TweenLite.to(self.$element_inner, self.settings.animate_duration, { x: x + '%', y: y + '%' });
}else if(self.settings.animation_type=='rotate'){
TweenLite.to(self.$element_inner, self.settings.animate_duration, {
rotationX: y + '%',
rotationY: -x + '%'
});
}}
}}, {
key: 'subscribe_scroll_event',
value: function subscribe_scroll_event(){
var self=this;
var section_offset_top=0,
section_offset_bottom=0,
animation_progress_px=0,
animation_progress_percent=0,
section_height=0,
animation_length=0;
on_resize();
on_resize_scroll();
$(window).on('resize', function (){
on_resize();
});
$(window).on('scroll resize', function (){
on_resize_scroll();
});
function on_resize(){
section_height=self.$element.outerHeight();
section_offset_top=self.$element.offset().top;
section_offset_bottom=section_offset_top + section_height;
animation_length=section_height + self.wh;
}
function on_resize_scroll(){
if(self.viewport_bottom > section_offset_top&&self.viewport_top < section_offset_bottom){
self.$element.addClass('active');
animation_progress_px=self.viewport_bottom - section_offset_top - animation_length / 2;
animation_progress_percent=animation_progress_px / (animation_length / 2);
if(self.settings.animation_type=='shift'){
TweenLite.to(self.$element_inner, self.settings.animate_duration, { y: self.shift * animation_progress_percent + '%' });
}else if(self.settings.animation_type=='rotate'){
TweenLite.to(self.$element_inner, self.settings.animate_duration, { rotationX: self.shift * animation_progress_percent + '%' });
}}else{
self.$element.removeClass('active');
}}
}}]);
return ParallaxBackground;
}();
$.fn.parallaxBackground=function (){
var $this=this,
opt=arguments[0],
args=Array.prototype.slice.call(arguments, 1),
length=$this.length,
i=void 0,
ret=void 0;
for (i=0; i < length; i++){
if((typeof opt==='undefined' ? 'undefined':_typeof(opt))=='object'||typeof opt=='undefined') $this[i].parallax_background=new ParallaxBackground($this[i], opt);else ret=$this[i].parallax_background[opt].apply($this[i].parallax_background, args);
if(typeof ret!='undefined') return ret;
}
return $this;
};})(jQuery);
})
]);
(function($){
$(document).ready(function(){
var ParallaxScroll={
showLogs: false,
round: 1000,
init: function(){
this._log("init");
if(this._inited){
this._log("Already Inited");
this._inited=true;
return;
}
this._requestAnimationFrame=(function(){
return  window.requestAnimationFrame       ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame    ||
window.oRequestAnimationFrame      ||
window.msRequestAnimationFrame     ||
function( callback,  element){
window.setTimeout(callback, 1000 / 60);
};})();
this._onScroll(true);
},
_inited: false,
_properties: ['x', 'y', 'z', 'rotateX', 'rotateY', 'rotateZ', 'scaleX', 'scaleY', 'scaleZ', 'scale'],
_requestAnimationFrame:null,
_log: function(message){
if(this.showLogs) console.log("Parallax Scroll / " + message);
},
_onScroll: function(noSmooth){
var scroll=$(document).scrollTop();
var windowHeight=$(window).height();
this._log("onScroll " + scroll);
$("[data-parallax]").each($.proxy(function(index, el){
var $el=$(el);
var properties=[];
var applyProperties=false;
var style=$el.data("style");
if(style==undefined){
style=$el.attr("style")||"";
$el.data("style", style);
}
var datas=[$el.data("parallax")];
var iData;
for(iData=2; ; iData++){
if($el.data("parallax"+iData)){
datas.push($el.data("parallax-"+iData));
}else{
break;
}}
var datasLength=datas.length;
for(iData=0; iData < datasLength; iData ++){
var data=datas[iData];
var scrollFrom=data["from-scroll"];
var scrollFromCustom=data["from-scroll-custom"];
if(scrollFrom==undefined){
if(scrollFromCustom!=undefined)
scrollFrom=Math.max(0, $(el).offset().top - scrollFromCustom);
else
scrollFrom=Math.max(0, $(el).offset().top - windowHeight);
}
scrollFrom=scrollFrom | 0;
var scrollDistance=data["distance"];
var scrollTo=data["to-scroll"];
if(scrollDistance==undefined&&scrollTo==undefined) scrollDistance=windowHeight;
scrollDistance=Math.max(scrollDistance | 0, 1);
var easing=data["easing"];
var easingReturn=data["easing-return"];
if(easing==undefined||!$.easing||!$.easing[easing]) easing=null;
if(easingReturn==undefined||!$.easing||!$.easing[easingReturn]) easingReturn=easing;
if(easing){
var totalTime=data["duration"];
if(totalTime==undefined) totalTime=scrollDistance;
totalTime=Math.max(totalTime | 0, 1);
var totalTimeReturn=data["duration-return"];
if(totalTimeReturn==undefined) totalTimeReturn=totalTime;
scrollDistance=1;
var currentTime=$el.data("current-time");
if(currentTime==undefined) currentTime=0;
}
if(scrollTo==undefined) scrollTo=scrollFrom + scrollDistance;
scrollTo=scrollTo | 0;
var smoothness=data["smoothness"];
if(smoothness==undefined) smoothness=35;
smoothness=smoothness | 0;
if(noSmooth||smoothness==0) smoothness=1;
smoothness=smoothness | 0;
var scrollCurrent=scroll;
scrollCurrent=Math.max(scrollCurrent, scrollFrom);
scrollCurrent=Math.min(scrollCurrent, scrollTo);
if(easing){
if($el.data("sens")==undefined) $el.data("sens", "back");
if(scrollCurrent>scrollFrom){
if($el.data("sens")=="back"){
currentTime=1;
$el.data("sens", "go");
}else{
currentTime++;
}}
if(scrollCurrent<scrollTo){
if($el.data("sens")=="go"){
currentTime=1;
$el.data("sens", "back");
}else{
currentTime++;
}}
if(noSmooth) currentTime=totalTime;
$el.data("current-time", currentTime);
}
this._properties.map($.proxy(function(prop){
var defaultProp=0;
var to=data[prop];
if(to==undefined) return;
if(prop=="scale"||prop=="scaleX"||prop=="scaleY"||prop=="scaleZ"){
defaultProp=1;
}else{
to=to | 0;
}
var prev=$el.data("_" + prop);
if(prev==undefined) prev=defaultProp;
var next=((to-defaultProp) * ((scrollCurrent - scrollFrom) / (scrollTo - scrollFrom))) + defaultProp;
var val=prev + (next - prev) / smoothness;
if(easing&&currentTime>0&&currentTime<=totalTime){
var from=defaultProp;
if($el.data("sens")=="back"){
from=to;
to=-to;
easing=easingReturn;
totalTime=totalTimeReturn;
}
val=$.easing[easing](null, currentTime, from, to, totalTime);
}
val=Math.ceil(val * this.round) / this.round;
if(val==prev&&next==to) val=to;
if(!properties[prop]) properties[prop]=0;
properties[prop] +=val;
if(prev!=properties[prop]){
$el.data("_" + prop, properties[prop]);
applyProperties=true;
}}, this));
}
if(applyProperties){
if(properties["z"]!=undefined){
var perspective=data["perspective"];
if(perspective==undefined) perspective=800;
var $parent=$el.parent();
if(!$parent.data("style")) $parent.data("style", $parent.attr("style")||"");
$parent.attr("style", "perspective:" + perspective + "px; -webkit-perspective:" + perspective + "px; "+ $parent.data("style"));
}
if(properties["scaleX"]==undefined) properties["scaleX"]=1;
if(properties["scaleY"]==undefined) properties["scaleY"]=1;
if(properties["scaleZ"]==undefined) properties["scaleZ"]=1;
if(properties["scale"]!=undefined){
properties["scaleX"] *=properties["scale"];
properties["scaleY"] *=properties["scale"];
properties["scaleZ"] *=properties["scale"];
}
var translate3d="translate3d(" + (properties["x"] ? properties["x"]:0) + "px, " + (properties["y"] ? properties["y"]:0) + "px, " + (properties["z"] ? properties["z"]:0) + "px)";
var rotate3d="rotateX(" + (properties["rotateX"] ? properties["rotateX"]:0) + "deg) rotateY(" + (properties["rotateY"] ? properties["rotateY"]:0) + "deg) rotateZ(" + (properties["rotateZ"] ? properties["rotateZ"]:0) + "deg)";
var scale3d="scaleX(" + properties["scaleX"] + ") scaleY(" + properties["scaleY"] + ") scaleZ(" + properties["scaleZ"] + ")";
var cssTransform=translate3d + " " + rotate3d + " " + scale3d + ";";
this._log(cssTransform);
$el.attr("style", "transform:" + cssTransform + " -webkit-transform:" + cssTransform + " " + style);
}}, this));
if(window.requestAnimationFrame){
window.requestAnimationFrame($.proxy(this._onScroll, this, false));
}else{
this._requestAnimationFrame($.proxy(this._onScroll, this, false));
}}
};
if($(window).innerWidth() >=1201){
ParallaxScroll.init();
}});
})(jQuery);
(function($){
var pxl_widget_elementor_handler=function($scope, $){
};
$(window).on('elementor/frontend/init', function(){
elementorFrontend.hooks.addAction('frontend/element_ready/global', pxl_widget_elementor_handler);
});
})(jQuery);
(function($){
const progressBar=document.querySelector('.swiper-hero-progress');
const fraction1=document.getElementById("style-fraction");
const slides1=document.querySelectorAll(".pxl-slider-item");
const slideCount1=slides1.length;
if(fraction1){
const fraction_span1=document.createElement("span");
fraction_span1.classList.add('slidenumber');
fraction_span1.textContent=`1 `;
fraction1.appendChild(fraction_span1);
const fraction_span2=document.createElement("span");
fraction_span2.classList.add('totalslides');
fraction_span2.textContent=`/ ${slideCount1}`;
fraction1.appendChild(fraction_span2);
}
const fraction1_span=document.querySelector(".slidenumber");
const pxl_slider_handler=function($scope, $){
var breakpoints=elementorFrontend.config.breakpoints,
carousel=$scope.find(".pxl-slider-container");
if(carousel.length==0){
return false;
}
var data=carousel.data(),
settings=data.settings,
custom_dots=data.customdot,
carousel_settings={
direction: settings['slide_direction'],
effect: settings['slide_mode'],
wrapperClass:'pxl-slider-wrapper',
speed: 500,
slideClass: 'pxl-slider-item',
slidesPerView: 1,
slidesPerGroup: 1,
slidesPerColumn: 1,
spaceBetween: 30,
navigation: {
nextEl: $scope.find(".pxl-slider-arrow-next"),
prevEl: $scope.find(".pxl-slider-arrow-prev"),
},
pagination:{
type: settings['dots_style'],
el: $scope.find('.pxl-slider-dots'),
clickable:true,
modifierClass: 'pxl-slider-pagination-',
bulletClass:'pxl-slider-pagination-bullet',
formatFractionCurrent: function (number){
return ('0' + number).slice(-2);
},
formatFractionTotal: function (number){
return ('0' + number).slice(-2);
},
renderFraction: function (currentClass, totalClass){
return '<span class="' + currentClass + '"></span>' +
'<span class="divider">/</span>' +
'<span class="' + totalClass + '"></span>';
},
renderCustom: function (swiper, element, current, total){
return current + ' of ' + total;
}},
speed: settings['speed'],
watchSlidesProgress: true,
watchSlidesVisibility: true,
autoplay: {
delay:settings['delay'],
disableOnInteraction:settings['pause_on_interaction']
},
on: {
setTransition: function(speed){
var swiper=this;
for (var i=0; i < swiper.slides.length; i++){
swiper.slides[i].querySelector(".pxl-slide-bg").style.transform=swiper.activeIndex===i ? "scale(1)":"scale(0.9)";
swiper.slides[i].style.transition=swiper.params.speed + "ms";
}},
init:function (swiper){
elementorFrontend.waypoint($scope.find('.pxl-animate'), function (){
var $this=$(this),
data=$this.data('settings');
if(typeof data['animation']!='undefined'){
setTimeout(function (){
$this.removeClass('pxl-invisible').addClass('wow animated ' + data['animation']);
}, data['animation_delay']);
}});
pxl_ken_burns(this);
},
slideChangeTransitionStart:function (swiper){
var activeIndex=this.activeIndex;
var current=this.slides.eq(activeIndex);
$scope.find('.pxl-elementor-animate').each(function(){
var data=$(this).data('settings');
if(typeof data['_animation']!='undefined')
$(this).removeClass('wow animated '+data['_animation']).addClass('elementor-invisible');
});
current.find('.pxl-elementor-animate').each(function(){
var  $item=$(this),
data=$item.data('settings');
if(typeof data['_animation']!='undefined'){
setTimeout(function (){
$item.removeClass('elementor-invisible').addClass('wow animated ' + data['_animation']);
}, data['_animation_delay']);
}});
$scope.find('.swiper-slide .pxl-animate').each(function(){
var data=$(this).data('settings');
$(this).removeClass('wow animated '+data['animation']).addClass('pxl-invisible');
});
current.find('.pxl-animate').each(function(){
var  $item=$(this),
data=$item.data('settings');
setTimeout(function (){
$item.removeClass('pxl-invisible').addClass('wow animated ' + data['animation']);
}, data['animation_delay']);
});
pxl_ken_burns(this);
},
slideChange: function (swiper){
var activeIndex=this.activeIndex;
var current=this.slides.eq(activeIndex);
if(fraction1_span){
fraction1_span.textContent=`${this.realIndex + 1} `;
}
progressBar.style.animation="none";
progressBar.offsetWidth;
progressBar.style.animation=null;
$scope.find('.pxl-elementor-animate').each(function(){
var data=$(this).data('settings');
if(typeof data['_animation']!='undefined')
$(this).removeClass('wow animated '+data['_animation']).addClass('elementor-invisible');
});
current.find('.pxl-elementor-animate').each(function(){
var  $item=$(this),
data=$item.data('settings');
if(typeof data['_animation']!='undefined'){
setTimeout(function (){
$item.removeClass('elementor-invisible').addClass('wow animated ' + data['_animation']);
}, data['_animation_delay']);
}});
$scope.find('.swiper-slide .pxl-animate').each(function(){
var data=$(this).data('settings');
$(this).removeClass('wow animated '+data['animation']).addClass('pxl-invisible');
});
current.find('.pxl-animate').each(function(){
var  $item=$(this),
data=$item.data('settings');
setTimeout(function (){
$item.removeClass('pxl-invisible').addClass('wow animated ' + data['animation']);
}, data['animation_delay']);
});
pxl_ken_burns(this);
},
},
autoHeight: true
};
if(settings['center_mode']=='true')
carousel_settings['centeredSlides']=true;
if(settings['loop']==='true'){
carousel_settings['loop']=true;
}
if(settings['autoplay']==='true'){
carousel_settings['autoplay']={
delay:settings['delay'],
disableOnInteraction:settings['pause_on_interaction']
};}else{
carousel_settings['autoplay']=false;
}
if(settings['slide_mode']==='cube'){
carousel_settings['cubeEffect']={
shadow: false,
slideShadows: false,
shadowOffset: 0,
shadowScale: 0,
};}
if(settings['slide_mode']==='coverflow'){
carousel_settings['centeredSlides']=true;
carousel_settings['coverflowEffect']={
rotate: 50,
stretch: 0,
depth: 100,
modifier: 1,
slideShadows: false,
};}
carousel.each(function(index, element){
if($(this).closest('.pxl-sliders-wrap').find('.pxl-sliders-thumbs').length > 0){
var slide_thumbs=new Swiper($(this).closest('.pxl-sliders-wrap').find('.pxl-sliders-thumbs'), {
spaceBetween: 0,
slidesPerView: 3,
});
carousel_settings['thumbs']={ swiper: slide_thumbs };}
var swiper=new Swiper(carousel, carousel_settings);
if(settings['autoplay']==='true'&&settings['pause_on_hover']==='true'){
$(this).on({
mouseenter: function mouseenter(){
this.swiper.autoplay.stop();
},
mouseleave: function mouseleave(){
this.swiper.autoplay.start();
}});
}
$("#play-slider").click(function(){
swiper.autoplay.start();
});
$("#pause-slider").click(function(){
swiper.autoplay.stop();
});
});
function pxl_ken_burns(item){
var activeIndex=item.activeIndex;
var current=item.slides.eq(activeIndex);
if(current.find('.pxl-ken-burns').length > 0){
$('.pxl-slide-bg').removeClass('pxl-ken-burns--active');
current.find('.pxl-slide-bg').addClass('pxl-ken-burns--active');
}}
};
$(window).on('elementor/frontend/init', function(){
elementorFrontend.hooks.addAction('frontend/element_ready/pxl_slider.default', pxl_slider_handler);
});
})(jQuery);
!function(a){var b,c,d="0.4.2",e="hasOwnProperty",f=/[\.\/]/,g=/\s*,\s*/,h="*",i=function(a,b){return a-b},j={n:{}},k=function(){for(var a=0,b=this.length;b>a;a++)if("undefined"!=typeof this[a])return this[a]},l=function(){for(var a=this.length;--a;)if("undefined"!=typeof this[a])return this[a]},m=function(a,d){a=String(a);var e,f=c,g=Array.prototype.slice.call(arguments,2),h=m.listeners(a),j=0,n=[],o={},p=[],q=b;p.firstDefined=k,p.lastDefined=l,b=a,c=0;for(var r=0,s=h.length;s>r;r++)"zIndex"in h[r]&&(n.push(h[r].zIndex),h[r].zIndex<0&&(o[h[r].zIndex]=h[r]));for(n.sort(i);n[j]<0;)if(e=o[n[j++]],p.push(e.apply(d,g)),c)return c=f,p;for(r=0;s>r;r++)if(e=h[r],"zIndex"in e)if(e.zIndex==n[j]){if(p.push(e.apply(d,g)),c)break;do if(j++,e=o[n[j]],e&&p.push(e.apply(d,g)),c)break;while(e)}else o[e.zIndex]=e;else if(p.push(e.apply(d,g)),c)break;return c=f,b=q,p};m._events=j,m.listeners=function(a){var b,c,d,e,g,i,k,l,m=a.split(f),n=j,o=[n],p=[];for(e=0,g=m.length;g>e;e++){for(l=[],i=0,k=o.length;k>i;i++)for(n=o[i].n,c=[n[m[e]],n[h]],d=2;d--;)b=c[d],b&&(l.push(b),p=p.concat(b.f||[]));o=l}return p},m.on=function(a,b){if(a=String(a),"function"!=typeof b)return function(){};for(var c=a.split(g),d=0,e=c.length;e>d;d++)!function(a){for(var c,d=a.split(f),e=j,g=0,h=d.length;h>g;g++)e=e.n,e=e.hasOwnProperty(d[g])&&e[d[g]]||(e[d[g]]={n:{}});for(e.f=e.f||[],g=0,h=e.f.length;h>g;g++)if(e.f[g]==b){c=!0;break}!c&&e.f.push(b)}(c[d]);return function(a){+a==+a&&(b.zIndex=+a)}},m.f=function(a){var b=[].slice.call(arguments,1);return function(){m.apply(null,[a,null].concat(b).concat([].slice.call(arguments,0)))}},m.stop=function(){c=1},m.nt=function(a){return a?new RegExp("(?:\\.|\\/|^)"+a+"(?:\\.|\\/|$)").test(b):b},m.nts=function(){return b.split(f)},m.off=m.unbind=function(a,b){if(!a)return void(m._events=j={n:{}});var c=a.split(g);if(c.length>1)for(var d=0,i=c.length;i>d;d++)m.off(c[d],b);else{c=a.split(f);var k,l,n,d,i,o,p,q=[j];for(d=0,i=c.length;i>d;d++)for(o=0;o<q.length;o+=n.length-2){if(n=[o,1],k=q[o].n,c[d]!=h)k[c[d]]&&n.push(k[c[d]]);else for(l in k)k[e](l)&&n.push(k[l]);q.splice.apply(q,n)}for(d=0,i=q.length;i>d;d++)for(k=q[d];k.n;){if(b){if(k.f){for(o=0,p=k.f.length;p>o;o++)if(k.f[o]==b){k.f.splice(o,1);break}!k.f.length&&delete k.f}for(l in k.n)if(k.n[e](l)&&k.n[l].f){var r=k.n[l].f;for(o=0,p=r.length;p>o;o++)if(r[o]==b){r.splice(o,1);break}!r.length&&delete k.n[l].f}}else{delete k.f;for(l in k.n)k.n[e](l)&&k.n[l].f&&delete k.n[l].f}k=k.n}}},m.once=function(a,b){var c=function(){return m.unbind(a,c),b.apply(this,arguments)};return m.on(a,c)},m.version=d,m.toString=function(){return"You are running Eve "+d},"undefined"!=typeof module&&module.exports?module.exports=m:"function"==typeof define&&define.amd?define("eve",[],function(){return m}):a.eve=m}(this),function(a,b){if("function"==typeof define&&define.amd)define(["eve"],function(c){return b(a,c)});else if("undefined"!=typeof exports){var c=require("eve");module.exports=b(a,c)}else b(a,a.eve)}(window||this,function(a,b){var c=function(b){var c={},d=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame||a.msRequestAnimationFrame||function(a){setTimeout(a,16)},e=Array.isArray||function(a){return a instanceof Array||"[object Array]"==Object.prototype.toString.call(a)},f=0,g="M"+(+new Date).toString(36),h=function(){return g+(f++).toString(36)},i=Date.now||function(){return+new Date},j=function(a){var b=this;if(null==a)return b.s;var c=b.s-a;b.b+=b.dur*c,b.B+=b.dur*c,b.s=a},k=function(a){var b=this;return null==a?b.spd:void(b.spd=a)},l=function(a){var b=this;return null==a?b.dur:(b.s=b.s*a/b.dur,void(b.dur=a))},m=function(){var a=this;delete c[a.id],a.update(),b("mina.stop."+a.id,a)},n=function(){var a=this;a.pdif||(delete c[a.id],a.update(),a.pdif=a.get()-a.b)},o=function(){var a=this;a.pdif&&(a.b=a.get()-a.pdif,delete a.pdif,c[a.id]=a)},p=function(){var a,b=this;if(e(b.start)){a=[];for(var c=0,d=b.start.length;d>c;c++)a[c]=+b.start[c]+(b.end[c]-b.start[c])*b.easing(b.s)}else a=+b.start+(b.end-b.start)*b.easing(b.s);b.set(a)},q=function(){var a=0;for(var e in c)if(c.hasOwnProperty(e)){var f=c[e],g=f.get();a++,f.s=(g-f.b)/(f.dur/f.spd),f.s>=1&&(delete c[e],f.s=1,a--,function(a){setTimeout(function(){b("mina.finish."+a.id,a)})}(f)),f.update()}a&&d(q)},r=function(a,b,e,f,g,i,s){var t={id:h(),start:a,end:b,b:e,s:0,dur:f-e,spd:1,get:g,set:i,easing:s||r.linear,status:j,speed:k,duration:l,stop:m,pause:n,resume:o,update:p};c[t.id]=t;var u,v=0;for(u in c)if(c.hasOwnProperty(u)&&(v++,2==v))break;return 1==v&&d(q),t};return r.time=i,r.getById=function(a){return c[a]||null},r.linear=function(a){return a},r.easeout=function(a){return Math.pow(a,1.7)},r.easein=function(a){return Math.pow(a,.48)},r.easeinout=function(a){if(1==a)return 1;if(0==a)return 0;var b=.48-a/1.04,c=Math.sqrt(.1734+b*b),d=c-b,e=Math.pow(Math.abs(d),1/3)*(0>d?-1:1),f=-c-b,g=Math.pow(Math.abs(f),1/3)*(0>f?-1:1),h=e+g+.5;return 3*(1-h)*h*h+h*h*h},r.backin=function(a){if(1==a)return 1;var b=1.70158;return a*a*((b+1)*a-b)},r.backout=function(a){if(0==a)return 0;a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},r.elastic=function(a){return a==!!a?a:Math.pow(2,-10*a)*Math.sin(2*(a-.075)*Math.PI/.3)+1},r.bounce=function(a){var b,c=7.5625,d=2.75;return 1/d>a?b=c*a*a:2/d>a?(a-=1.5/d,b=c*a*a+.75):2.5/d>a?(a-=2.25/d,b=c*a*a+.9375):(a-=2.625/d,b=c*a*a+.984375),b},a.mina=r,r}("undefined"==typeof b?function(){}:b),d=function(a){function c(a,b){if(a){if(a.nodeType)return w(a);if(e(a,"array")&&c.set)return c.set.apply(c,a);if(a instanceof s)return a;if(null==b)return a=y.doc.querySelector(String(a)),w(a)}return a=null==a?"100%":a,b=null==b?"100%":b,new v(a,b)}function d(a,b){if(b){if("#text"==a&&(a=y.doc.createTextNode(b.text||b["#text"]||"")),"#comment"==a&&(a=y.doc.createComment(b.text||b["#text"]||"")),"string"==typeof a&&(a=d(a)),"string"==typeof b)return 1==a.nodeType?"xlink:"==b.substring(0,6)?a.getAttributeNS(T,b.substring(6)):"xml:"==b.substring(0,4)?a.getAttributeNS(U,b.substring(4)):a.getAttribute(b):"text"==b?a.nodeValue:null;if(1==a.nodeType){for(var c in b)if(b[z](c)){var e=A(b[c]);e?"xlink:"==c.substring(0,6)?a.setAttributeNS(T,c.substring(6),e):"xml:"==c.substring(0,4)?a.setAttributeNS(U,c.substring(4),e):a.setAttribute(c,e):a.removeAttribute(c)}}else"text"in b&&(a.nodeValue=b.text)}else a=y.doc.createElementNS(U,a);return a}function e(a,b){return b=A.prototype.toLowerCase.call(b),"finite"==b?isFinite(a):"array"==b&&(a instanceof Array||Array.isArray&&Array.isArray(a))?!0:"null"==b&&null===a||b==typeof a&&null!==a||"object"==b&&a===Object(a)||J.call(a).slice(8,-1).toLowerCase()==b}function f(a){if("function"==typeof a||Object(a)!==a)return a;var b=new a.constructor;for(var c in a)a[z](c)&&(b[c]=f(a[c]));return b}function h(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return a.push(a.splice(c,1)[0])}function i(a,b,c){function d(){var e=Array.prototype.slice.call(arguments,0),f=e.join("␀"),g=d.cache=d.cache||{},i=d.count=d.count||[];return g[z](f)?(h(i,f),c?c(g[f]):g[f]):(i.length>=1e3&&delete g[i.shift()],i.push(f),g[f]=a.apply(b,e),c?c(g[f]):g[f])}return d}function j(a,b,c,d,e,f){if(null==e){var g=a-c,h=b-d;return g||h?(180+180*D.atan2(-h,-g)/H+360)%360:0}return j(a,b,e,f)-j(c,d,e,f)}function k(a){return a%360*H/180}function l(a){return 180*a/H%360}function m(a){var b=[];return a=a.replace(/(?:^|\s)(\w+)\(([^)]+)\)/g,function(a,c,d){return d=d.split(/\s*,\s*|\s+/),"rotate"==c&&1==d.length&&d.push(0,0),"scale"==c&&(d.length>2?d=d.slice(0,2):2==d.length&&d.push(0,0),1==d.length&&d.push(d[0],0,0)),b.push("skewX"==c?["m",1,0,D.tan(k(d[0])),1,0,0]:"skewY"==c?["m",1,D.tan(k(d[0])),0,1,0,0]:[c.charAt(0)].concat(d)),a}),b}function n(a,b){var d=ab(a),e=new c.Matrix;if(d)for(var f=0,g=d.length;g>f;f++){var h,i,j,k,l,m=d[f],n=m.length,o=A(m[0]).toLowerCase(),p=m[0]!=o,q=p?e.invert():0;"t"==o&&2==n?e.translate(m[1],0):"t"==o&&3==n?p?(h=q.x(0,0),i=q.y(0,0),j=q.x(m[1],m[2]),k=q.y(m[1],m[2]),e.translate(j-h,k-i)):e.translate(m[1],m[2]):"r"==o?2==n?(l=l||b,e.rotate(m[1],l.x+l.width/2,l.y+l.height/2)):4==n&&(p?(j=q.x(m[2],m[3]),k=q.y(m[2],m[3]),e.rotate(m[1],j,k)):e.rotate(m[1],m[2],m[3])):"s"==o?2==n||3==n?(l=l||b,e.scale(m[1],m[n-1],l.x+l.width/2,l.y+l.height/2)):4==n?p?(j=q.x(m[2],m[3]),k=q.y(m[2],m[3]),e.scale(m[1],m[1],j,k)):e.scale(m[1],m[1],m[2],m[3]):5==n&&(p?(j=q.x(m[3],m[4]),k=q.y(m[3],m[4]),e.scale(m[1],m[2],j,k)):e.scale(m[1],m[2],m[3],m[4])):"m"==o&&7==n&&e.add(m[1],m[2],m[3],m[4],m[5],m[6])}return e}function o(a){var b=a.node.ownerSVGElement&&w(a.node.ownerSVGElement)||a.node.parentNode&&w(a.node.parentNode)||c.select("svg")||c(0,0),d=b.select("defs"),e=null==d?!1:d.node;return e||(e=u("defs",b.node).node),e}function p(a){return a.node.ownerSVGElement&&w(a.node.ownerSVGElement)||c.select("svg")}function q(a,b,c){function e(a){if(null==a)return I;if(a==+a)return a;d(j,{width:a});try{return j.getBBox().width}catch(b){return 0}}function f(a){if(null==a)return I;if(a==+a)return a;d(j,{height:a});try{return j.getBBox().height}catch(b){return 0}}function g(d,e){null==b?i[d]=e(a.attr(d)||0):d==b&&(i=e(null==c?a.attr(d)||0:c))}var h=p(a).node,i={},j=h.querySelector(".svg---mgr");switch(j||(j=d("rect"),d(j,{x:-9e9,y:-9e9,width:10,height:10,"class":"svg---mgr",fill:"none"}),h.appendChild(j)),a.type){case"rect":g("rx",e),g("ry",f);case"image":g("width",e),g("height",f);case"text":g("x",e),g("y",f);break;case"circle":g("cx",e),g("cy",f),g("r",e);break;case"ellipse":g("cx",e),g("cy",f),g("rx",e),g("ry",f);break;case"line":g("x1",e),g("x2",e),g("y1",f),g("y2",f);break;case"marker":g("refX",e),g("markerWidth",e),g("refY",f),g("markerHeight",f);break;case"radialGradient":g("fx",e),g("fy",f);break;case"tspan":g("dx",e),g("dy",f);break;default:g(b,e)}return h.removeChild(j),i}function r(a){e(a,"array")||(a=Array.prototype.slice.call(arguments,0));for(var b=0,c=0,d=this.node;this[b];)delete this[b++];for(b=0;b<a.length;b++)"set"==a[b].type?a[b].forEach(function(a){d.appendChild(a.node)}):d.appendChild(a[b].node);var f=d.childNodes;for(b=0;b<f.length;b++)this[c++]=w(f[b]);return this}function s(a){if(a.snap in V)return V[a.snap];var b;try{b=a.ownerSVGElement}catch(c){}this.node=a,b&&(this.paper=new v(b)),this.type=a.tagName||a.nodeName;var d=this.id=S(this);if(this.anims={},this._={transform:[]},a.snap=d,V[d]=this,"g"==this.type&&(this.add=r),this.type in{g:1,mask:1,pattern:1,symbol:1})for(var e in v.prototype)v.prototype[z](e)&&(this[e]=v.prototype[e])}function t(a){this.node=a}function u(a,b){var c=d(a);b.appendChild(c);var e=w(c);return e}function v(a,b){var c,e,f,g=v.prototype;if(a&&"svg"==a.tagName){if(a.snap in V)return V[a.snap];var h=a.ownerDocument;c=new s(a),e=a.getElementsByTagName("desc")[0],f=a.getElementsByTagName("defs")[0],e||(e=d("desc"),e.appendChild(h.createTextNode("Created with Snap")),c.node.appendChild(e)),f||(f=d("defs"),c.node.appendChild(f)),c.defs=f;for(var i in g)g[z](i)&&(c[i]=g[i]);c.paper=c.root=c}else c=u("svg",y.doc.body),d(c.node,{height:b,version:1.1,width:a,xmlns:U});return c}function w(a){return a?a instanceof s||a instanceof t?a:a.tagName&&"svg"==a.tagName.toLowerCase()?new v(a):a.tagName&&"object"==a.tagName.toLowerCase()&&"image/svg+xml"==a.type?new v(a.contentDocument.getElementsByTagName("svg")[0]):new s(a):a}function x(a,b){for(var c=0,d=a.length;d>c;c++){var e={type:a[c].type,attr:a[c].attr()},f=a[c].children();b.push(e),f.length&&x(f,e.childNodes=[])}}c.version="0.4.0",c.toString=function(){return"Snap v"+this.version},c._={};var y={win:a.window,doc:a.window.document};c._.glob=y;{var z="hasOwnProperty",A=String,B=parseFloat,C=parseInt,D=Math,E=D.max,F=D.min,G=D.abs,H=(D.pow,D.PI),I=(D.round,""),J=Object.prototype.toString,K=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?%?)\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?%?)\s*\))\s*$/i,L=(c._.separator=/[,\s]+/,/[\s]*,[\s]*/),M={hs:1,rg:1},N=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\s]*,?[\s]*)+)/gi,O=/([rstm])[\s,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\s]*,?[\s]*)+)/gi,P=/(-?\d*\.?\d*(?:e[\-+]?\\d+)?)[\s]*,?[\s]*/gi,Q=0,R="S"+(+new Date).toString(36),S=function(a){return(a&&a.type?a.type:I)+R+(Q++).toString(36)},T="http://www.w3.org/1999/xlink",U="http://www.w3.org/2000/svg",V={};c.url=function(a){return"url('#"+a+"')"}}c._.$=d,c._.id=S,c.format=function(){var a=/\{([^\}]+)\}/g,b=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,c=function(a,c,d){var e=d;return c.replace(b,function(a,b,c,d,f){b=b||d,e&&(b in e&&(e=e[b]),"function"==typeof e&&f&&(e=e()))}),e=(null==e||e==d?a:e)+""};return function(b,d){return A(b).replace(a,function(a,b){return c(a,b,d)})}}(),c._.clone=f,c._.cacher=i,c.rad=k,c.deg=l,c.sin=function(a){return D.sin(c.rad(a))},c.tan=function(a){return D.tan(c.rad(a))},c.cos=function(a){return D.cos(c.rad(a))},c.asin=function(a){return c.deg(D.asin(a))},c.acos=function(a){return c.deg(D.acos(a))},c.atan=function(a){return c.deg(D.atan(a))},c.atan2=function(a){return c.deg(D.atan2(a))},c.angle=j,c.len=function(a,b,d,e){return Math.sqrt(c.len2(a,b,d,e))},c.len2=function(a,b,c,d){return(a-c)*(a-c)+(b-d)*(b-d)},c.closestPoint=function(a,b,c){function d(a){var d=a.x-b,e=a.y-c;return d*d+e*e}for(var e,f,g,h,i=a.node,j=i.getTotalLength(),k=j/i.pathSegList.numberOfItems*.125,l=1/0,m=0;j>=m;m+=k)(h=d(g=i.getPointAtLength(m)))<l&&(e=g,f=m,l=h);for(k*=.5;k>.5;){var n,o,p,q,r,s;(p=f-k)>=0&&(r=d(n=i.getPointAtLength(p)))<l?(e=n,f=p,l=r):(q=f+k)<=j&&(s=d(o=i.getPointAtLength(q)))<l?(e=o,f=q,l=s):k*=.5}return e={x:e.x,y:e.y,length:f,distance:Math.sqrt(l)}},c.is=e,c.snapTo=function(a,b,c){if(c=e(c,"finite")?c:10,e(a,"array")){for(var d=a.length;d--;)if(G(a[d]-b)<=c)return a[d]}else{a=+a;var f=b%a;if(c>f)return b-f;if(f>a-c)return b-f+a}return b},c.getRGB=i(function(a){if(!a||(a=A(a)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Z};if("none"==a)return{r:-1,g:-1,b:-1,hex:"none",toString:Z};if(!(M[z](a.toLowerCase().substring(0,2))||"#"==a.charAt())&&(a=W(a)),!a)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Z};var b,d,f,g,h,i,j=a.match(K);return j?(j[2]&&(f=C(j[2].substring(5),16),d=C(j[2].substring(3,5),16),b=C(j[2].substring(1,3),16)),j[3]&&(f=C((h=j[3].charAt(3))+h,16),d=C((h=j[3].charAt(2))+h,16),b=C((h=j[3].charAt(1))+h,16)),j[4]&&(i=j[4].split(L),b=B(i[0]),"%"==i[0].slice(-1)&&(b*=2.55),d=B(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),f=B(i[2]),"%"==i[2].slice(-1)&&(f*=2.55),"rgba"==j[1].toLowerCase().slice(0,4)&&(g=B(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100)),j[5]?(i=j[5].split(L),b=B(i[0]),"%"==i[0].slice(-1)&&(b/=100),d=B(i[1]),"%"==i[1].slice(-1)&&(d/=100),f=B(i[2]),"%"==i[2].slice(-1)&&(f/=100),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(b/=360),"hsba"==j[1].toLowerCase().slice(0,4)&&(g=B(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100),c.hsb2rgb(b,d,f,g)):j[6]?(i=j[6].split(L),b=B(i[0]),"%"==i[0].slice(-1)&&(b/=100),d=B(i[1]),"%"==i[1].slice(-1)&&(d/=100),f=B(i[2]),"%"==i[2].slice(-1)&&(f/=100),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(b/=360),"hsla"==j[1].toLowerCase().slice(0,4)&&(g=B(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100),c.hsl2rgb(b,d,f,g)):(b=F(D.round(b),255),d=F(D.round(d),255),f=F(D.round(f),255),g=F(E(g,0),1),j={r:b,g:d,b:f,toString:Z},j.hex="#"+(16777216|f|d<<8|b<<16).toString(16).slice(1),j.opacity=e(g,"finite")?g:1,j)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Z}},c),c.hsb=i(function(a,b,d){return c.hsb2rgb(a,b,d).hex}),c.hsl=i(function(a,b,d){return c.hsl2rgb(a,b,d).hex}),c.rgb=i(function(a,b,c,d){if(e(d,"finite")){var f=D.round;return"rgba("+[f(a),f(b),f(c),+d.toFixed(2)]+")"}return"#"+(16777216|c|b<<8|a<<16).toString(16).slice(1)});var W=function(a){var b=y.doc.getElementsByTagName("head")[0]||y.doc.getElementsByTagName("svg")[0],c="rgb(255, 0, 0)";return(W=i(function(a){if("red"==a.toLowerCase())return c;b.style.color=c,b.style.color=a;var d=y.doc.defaultView.getComputedStyle(b,I).getPropertyValue("color");return d==c?null:d}))(a)},X=function(){return"hsb("+[this.h,this.s,this.b]+")"},Y=function(){return"hsl("+[this.h,this.s,this.l]+")"},Z=function(){return 1==this.opacity||null==this.opacity?this.hex:"rgba("+[this.r,this.g,this.b,this.opacity]+")"},$=function(a,b,d){if(null==b&&e(a,"object")&&"r"in a&&"g"in a&&"b"in a&&(d=a.b,b=a.g,a=a.r),null==b&&e(a,string)){var f=c.getRGB(a);a=f.r,b=f.g,d=f.b}return(a>1||b>1||d>1)&&(a/=255,b/=255,d/=255),[a,b,d]},_=function(a,b,d,f){a=D.round(255*a),b=D.round(255*b),d=D.round(255*d);var g={r:a,g:b,b:d,opacity:e(f,"finite")?f:1,hex:c.rgb(a,b,d),toString:Z};return e(f,"finite")&&(g.opacity=f),g};c.color=function(a){var b;return e(a,"object")&&"h"in a&&"s"in a&&"b"in a?(b=c.hsb2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.opacity=1,a.hex=b.hex):e(a,"object")&&"h"in a&&"s"in a&&"l"in a?(b=c.hsl2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.opacity=1,a.hex=b.hex):(e(a,"string")&&(a=c.getRGB(a)),e(a,"object")&&"r"in a&&"g"in a&&"b"in a&&!("error"in a)?(b=c.rgb2hsl(a),a.h=b.h,a.s=b.s,a.l=b.l,b=c.rgb2hsb(a),a.v=b.b):(a={hex:"none"},a.r=a.g=a.b=a.h=a.s=a.v=a.l=-1,a.error=1)),a.toString=Z,a},c.hsb2rgb=function(a,b,c,d){e(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,d=a.o,a=a.h),a*=360;var f,g,h,i,j;return a=a%360/60,j=c*b,i=j*(1-G(a%2-1)),f=g=h=c-j,a=~~a,f+=[j,i,0,0,i,j][a],g+=[i,j,j,i,0,0][a],h+=[0,0,i,j,j,i][a],_(f,g,h,d)},c.hsl2rgb=function(a,b,c,d){e(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h),(a>1||b>1||c>1)&&(a/=360,b/=100,c/=100),a*=360;var f,g,h,i,j;return a=a%360/60,j=2*b*(.5>c?c:1-c),i=j*(1-G(a%2-1)),f=g=h=c-j/2,a=~~a,f+=[j,i,0,0,i,j][a],g+=[i,j,j,i,0,0][a],h+=[0,0,i,j,j,i][a],_(f,g,h,d)},c.rgb2hsb=function(a,b,c){c=$(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;return f=E(a,b,c),g=f-F(a,b,c),d=0==g?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=0==g?0:g/f,{h:d,s:e,b:f,toString:X}},c.rgb2hsl=function(a,b,c){c=$(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;return g=E(a,b,c),h=F(a,b,c),i=g-h,d=0==i?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=0==i?0:.5>f?i/(2*f):i/(2-2*f),{h:d,s:e,l:f,toString:Y}},c.parsePathString=function(a){if(!a)return null;var b=c.path(a);if(b.arr)return c.path.clone(b.arr);var d={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},f=[];return e(a,"array")&&e(a[0],"array")&&(f=c.path.clone(a)),f.length||A(a).replace(N,function(a,b,c){var e=[],g=b.toLowerCase();if(c.replace(P,function(a,b){b&&e.push(+b)}),"m"==g&&e.length>2&&(f.push([b].concat(e.splice(0,2))),g="l",b="m"==b?"l":"L"),"o"==g&&1==e.length&&f.push([b,e[0]]),"r"==g)f.push([b].concat(e));else for(;e.length>=d[g]&&(f.push([b].concat(e.splice(0,d[g]))),d[g]););}),f.toString=c.path.toString,b.arr=c.path.clone(f),f};var ab=c.parseTransformString=function(a){if(!a)return null;var b=[];return e(a,"array")&&e(a[0],"array")&&(b=c.path.clone(a)),b.length||A(a).replace(O,function(a,c,d){{var e=[];c.toLowerCase()}d.replace(P,function(a,b){b&&e.push(+b)}),b.push([c].concat(e))}),b.toString=c.path.toString,b};c._.svgTransform2string=m,c._.rgTransform=/^[a-z][\s]*-?\.?\d/i,c._.transform2matrix=n,c._unit2px=q;y.doc.contains||y.doc.compareDocumentPosition?function(a,b){var c=9==a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a==d||!(!d||1!=d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b;)if(b=b.parentNode,b==a)return!0;return!1};c._.getSomeDefs=o,c._.getSomeSVG=p,c.select=function(a){return a=A(a).replace(/([^\\]):/g,"$1\\:"),w(y.doc.querySelector(a))},c.selectAll=function(a){for(var b=y.doc.querySelectorAll(a),d=(c.set||Array)(),e=0;e<b.length;e++)d.push(w(b[e]));return d},setInterval(function(){for(var a in V)if(V[z](a)){var b=V[a],c=b.node;("svg"!=b.type&&!c.ownerSVGElement||"svg"==b.type&&(!c.parentNode||"ownerSVGElement"in c.parentNode&&!c.ownerSVGElement))&&delete V[a]}},1e4),s.prototype.attr=function(a,c){var d=this,f=d.node;if(!a){if(1!=f.nodeType)return{text:f.nodeValue};for(var g=f.attributes,h={},i=0,j=g.length;j>i;i++)h[g[i].nodeName]=g[i].nodeValue;return h}if(e(a,"string")){if(!(arguments.length>1))return b("snap.util.getattr."+a,d).firstDefined();var k={};k[a]=c,a=k}for(var l in a)a[z](l)&&b("snap.util.attr."+l,d,a[l]);return d},c.parse=function(a){var b=y.doc.createDocumentFragment(),c=!0,d=y.doc.createElement("div");if(a=A(a),a.match(/^\s*<\s*svg(?:\s|>)/)||(a="<svg>"+a+"</svg>",c=!1),d.innerHTML=a,a=d.getElementsByTagName("svg")[0])if(c)b=a;else for(;a.firstChild;)b.appendChild(a.firstChild);return new t(b)},c.fragment=function(){for(var a=Array.prototype.slice.call(arguments,0),b=y.doc.createDocumentFragment(),d=0,e=a.length;e>d;d++){var f=a[d];f.node&&f.node.nodeType&&b.appendChild(f.node),f.nodeType&&b.appendChild(f),"string"==typeof f&&b.appendChild(c.parse(f).node)}return new t(b)},c._.make=u,c._.wrap=w,v.prototype.el=function(a,b){var c=u(a,this.node);return b&&c.attr(b),c},s.prototype.children=function(){for(var a=[],b=this.node.childNodes,d=0,e=b.length;e>d;d++)a[d]=c(b[d]);return a},s.prototype.toJSON=function(){var a=[];return x([this],a),a[0]},b.on("snap.util.getattr",function(){var a=b.nt();a=a.substring(a.lastIndexOf(".")+1);var c=a.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()});return bb[z](c)?this.node.ownerDocument.defaultView.getComputedStyle(this.node,null).getPropertyValue(c):d(this.node,a)});var bb={"alignment-baseline":0,"baseline-shift":0,clip:0,"clip-path":0,"clip-rule":0,color:0,"color-interpolation":0,"color-interpolation-filters":0,"color-profile":0,"color-rendering":0,cursor:0,direction:0,display:0,"dominant-baseline":0,"enable-background":0,fill:0,"fill-opacity":0,"fill-rule":0,filter:0,"flood-color":0,"flood-opacity":0,font:0,"font-family":0,"font-size":0,"font-size-adjust":0,"font-stretch":0,"font-style":0,"font-variant":0,"font-weight":0,"glyph-orientation-horizontal":0,"glyph-orientation-vertical":0,"image-rendering":0,kerning:0,"letter-spacing":0,"lighting-color":0,marker:0,"marker-end":0,"marker-mid":0,"marker-start":0,mask:0,opacity:0,overflow:0,"pointer-events":0,"shape-rendering":0,"stop-color":0,"stop-opacity":0,stroke:0,"stroke-dasharray":0,"stroke-dashoffset":0,"stroke-linecap":0,"stroke-linejoin":0,"stroke-miterlimit":0,"stroke-opacity":0,"stroke-width":0,"text-anchor":0,"text-decoration":0,"text-rendering":0,"unicode-bidi":0,visibility:0,"word-spacing":0,"writing-mode":0};b.on("snap.util.attr",function(a){var c=b.nt(),e={};c=c.substring(c.lastIndexOf(".")+1),e[c]=a;var f=c.replace(/-(\w)/gi,function(a,b){return b.toUpperCase()}),g=c.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()});bb[z](g)?this.node.style[f]=null==a?I:a:d(this.node,e)}),function(){}(v.prototype),c.ajax=function(a,c,d,f){var g=new XMLHttpRequest,h=S();if(g){if(e(c,"function"))f=d,d=c,c=null;else if(e(c,"object")){var i=[];for(var j in c)c.hasOwnProperty(j)&&i.push(encodeURIComponent(j)+"="+encodeURIComponent(c[j]));c=i.join("&")}return g.open(c?"POST":"GET",a,!0),c&&(g.setRequestHeader("X-Requested-With","XMLHttpRequest"),g.setRequestHeader("Content-type","application/x-www-form-urlencoded")),d&&(b.once("snap.ajax."+h+".0",d),b.once("snap.ajax."+h+".200",d),b.once("snap.ajax."+h+".304",d)),g.onreadystatechange=function(){4==g.readyState&&b("snap.ajax."+h+"."+g.status,f,g)},4==g.readyState?g:(g.send(c),g)}},c.load=function(a,b,d){c.ajax(a,function(a){var e=c.parse(a.responseText);d?b.call(d,e):b(e)})};var cb=function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.body,e=c.documentElement,f=e.clientTop||d.clientTop||0,h=e.clientLeft||d.clientLeft||0,i=b.top+(g.win.pageYOffset||e.scrollTop||d.scrollTop)-f,j=b.left+(g.win.pageXOffset||e.scrollLeft||d.scrollLeft)-h;return{y:i,x:j}};return c.getElementByPoint=function(a,b){var c=this,d=(c.canvas,y.doc.elementFromPoint(a,b));if(y.win.opera&&"svg"==d.tagName){var e=cb(d),f=d.createSVGRect();f.x=a-e.x,f.y=b-e.y,f.width=f.height=1;var g=d.getIntersectionList(f,null);g.length&&(d=g[g.length-1])}return d?w(d):null},c.plugin=function(a){a(c,s,v,y,t)},y.win.Snap=c,c}(a||this);return d.plugin(function(d,e,f,g,h){function i(a,b){if(null==b){var c=!0;if(b=a.node.getAttribute("linearGradient"==a.type||"radialGradient"==a.type?"gradientTransform":"pattern"==a.type?"patternTransform":"transform"),!b)return new d.Matrix;b=d._.svgTransform2string(b)}else b=d._.rgTransform.test(b)?o(b).replace(/\.{3}|\u2026/g,a._.transform||""):d._.svgTransform2string(b),n(b,"array")&&(b=d.path?d.path.toString.call(b):o(b)),a._.transform=b;var e=d._.transform2matrix(b,a.getBBox(1));return c?e:void(a.matrix=e)}function j(a){function b(a,b){var c=q(a.node,b);c=c&&c.match(f),c=c&&c[2],c&&"#"==c.charAt()&&(c=c.substring(1),c&&(h[c]=(h[c]||[]).concat(function(c){var d={};d[b]=URL(c),q(a.node,d)})))}function c(a){var b=q(a.node,"xlink:href");b&&"#"==b.charAt()&&(b=b.substring(1),b&&(h[b]=(h[b]||[]).concat(function(b){a.attr("xlink:href","#"+b)})))}for(var d,e=a.selectAll("*"),f=/^\s*url\(("|'|)(.*)\1\)\s*$/,g=[],h={},i=0,j=e.length;j>i;i++){d=e[i],b(d,"fill"),b(d,"stroke"),b(d,"filter"),b(d,"mask"),b(d,"clip-path"),c(d);var k=q(d.node,"id");k&&(q(d.node,{id:d.id}),g.push({old:k,id:d.id}))}for(i=0,j=g.length;j>i;i++){var l=h[g[i].old];if(l)for(var m=0,n=l.length;n>m;m++)l[m](g[i].id)}}function k(a,b,c){return function(d){var e=d.slice(a,b);return 1==e.length&&(e=e[0]),c?c(e):e}}function l(a){return function(){var b=a?"<"+this.type:"",c=this.node.attributes,d=this.node.childNodes;if(a)for(var e=0,f=c.length;f>e;e++)b+=" "+c[e].name+'="'+c[e].value.replace(/"/g,'\\"')+'"';if(d.length){for(a&&(b+=">"),e=0,f=d.length;f>e;e++)3==d[e].nodeType?b+=d[e].nodeValue:1==d[e].nodeType&&(b+=u(d[e]).toString());a&&(b+="</"+this.type+">")}else a&&(b+="/>");return b}}var m=e.prototype,n=d.is,o=String,p=d._unit2px,q=d._.$,r=d._.make,s=d._.getSomeDefs,t="hasOwnProperty",u=d._.wrap;m.getBBox=function(a){if(!d.Matrix||!d.path)return this.node.getBBox();var b=this,c=new d.Matrix;if(b.removed)return d._.box();for(;"use"==b.type;)if(a||(c=c.add(b.transform().localMatrix.translate(b.attr("x")||0,b.attr("y")||0))),b.original)b=b.original;else{var e=b.attr("xlink:href");b=b.original=b.node.ownerDocument.getElementById(e.substring(e.indexOf("#")+1))}var f=b._,g=d.path.get[b.type]||d.path.get.deflt;try{return a?(f.bboxwt=g?d.path.getBBox(b.realPath=g(b)):d._.box(b.node.getBBox()),d._.box(f.bboxwt)):(b.realPath=g(b),b.matrix=b.transform().localMatrix,f.bbox=d.path.getBBox(d.path.map(b.realPath,c.add(b.matrix))),d._.box(f.bbox))}catch(h){return d._.box()}};var v=function(){return this.string};m.transform=function(a){var b=this._;if(null==a){for(var c,e=this,f=new d.Matrix(this.node.getCTM()),g=i(this),h=[g],j=new d.Matrix,k=g.toTransformString(),l=o(g)==o(this.matrix)?o(b.transform):k;"svg"!=e.type&&(e=e.parent());)h.push(i(e));for(c=h.length;c--;)j.add(h[c]);return{string:l,globalMatrix:f,totalMatrix:j,localMatrix:g,diffMatrix:f.clone().add(g.invert()),global:f.toTransformString(),total:j.toTransformString(),local:k,toString:v}}return a instanceof d.Matrix?(this.matrix=a,this._.transform=a.toTransformString()):i(this,a),this.node&&("linearGradient"==this.type||"radialGradient"==this.type?q(this.node,{gradientTransform:this.matrix}):"pattern"==this.type?q(this.node,{patternTransform:this.matrix}):q(this.node,{transform:this.matrix})),this},m.parent=function(){return u(this.node.parentNode)},m.append=m.add=function(a){if(a){if("set"==a.type){var b=this;return a.forEach(function(a){b.add(a)}),this}a=u(a),this.node.appendChild(a.node),a.paper=this.paper}return this},m.appendTo=function(a){return a&&(a=u(a),a.append(this)),this},m.prepend=function(a){if(a){if("set"==a.type){var b,c=this;return a.forEach(function(a){b?b.after(a):c.prepend(a),b=a}),this}a=u(a);var d=a.parent();this.node.insertBefore(a.node,this.node.firstChild),this.add&&this.add(),a.paper=this.paper,this.parent()&&this.parent().add(),d&&d.add()}return this},m.prependTo=function(a){return a=u(a),a.prepend(this),this},m.before=function(a){if("set"==a.type){var b=this;return a.forEach(function(a){var c=a.parent();b.node.parentNode.insertBefore(a.node,b.node),c&&c.add()}),this.parent().add(),this}a=u(a);var c=a.parent();return this.node.parentNode.insertBefore(a.node,this.node),this.parent()&&this.parent().add(),c&&c.add(),a.paper=this.paper,this},m.after=function(a){a=u(a);var b=a.parent();return this.node.nextSibling?this.node.parentNode.insertBefore(a.node,this.node.nextSibling):this.node.parentNode.appendChild(a.node),this.parent()&&this.parent().add(),b&&b.add(),a.paper=this.paper,this},m.insertBefore=function(a){a=u(a);var b=this.parent();return a.node.parentNode.insertBefore(this.node,a.node),this.paper=a.paper,b&&b.add(),a.parent()&&a.parent().add(),this},m.insertAfter=function(a){a=u(a);var b=this.parent();return a.node.parentNode.insertBefore(this.node,a.node.nextSibling),this.paper=a.paper,b&&b.add(),a.parent()&&a.parent().add(),this},m.remove=function(){var a=this.parent();return this.node.parentNode&&this.node.parentNode.removeChild(this.node),delete this.paper,this.removed=!0,a&&a.add(),this},m.select=function(a){return u(this.node.querySelector(a))},m.selectAll=function(a){for(var b=this.node.querySelectorAll(a),c=(d.set||Array)(),e=0;e<b.length;e++)c.push(u(b[e]));return c},m.asPX=function(a,b){return null==b&&(b=this.attr(a)),+p(this,a,b)},m.use=function(){var a,b=this.node.id;return b||(b=this.id,q(this.node,{id:b})),a="linearGradient"==this.type||"radialGradient"==this.type||"pattern"==this.type?r(this.type,this.node.parentNode):r("use",this.node.parentNode),q(a.node,{"xlink:href":"#"+b}),a.original=this,a},m.clone=function(){var a=u(this.node.cloneNode(!0));return q(a.node,"id")&&q(a.node,{id:a.id}),j(a),a.insertAfter(this),a},m.toDefs=function(){var a=s(this);return a.appendChild(this.node),this},m.pattern=m.toPattern=function(a,b,c,d){var e=r("pattern",s(this));return null==a&&(a=this.getBBox()),n(a,"object")&&"x"in a&&(b=a.y,c=a.width,d=a.height,a=a.x),q(e.node,{x:a,y:b,width:c,height:d,patternUnits:"userSpaceOnUse",id:e.id,viewBox:[a,b,c,d].join(" ")}),e.node.appendChild(this.node),e},m.marker=function(a,b,c,d,e,f){var g=r("marker",s(this));return null==a&&(a=this.getBBox()),n(a,"object")&&"x"in a&&(b=a.y,c=a.width,d=a.height,e=a.refX||a.cx,f=a.refY||a.cy,a=a.x),q(g.node,{viewBox:[a,b,c,d].join(" "),markerWidth:c,markerHeight:d,orient:"auto",refX:e||0,refY:f||0,id:g.id}),g.node.appendChild(this.node),g};var w=function(a,b,d,e){"function"!=typeof d||d.length||(e=d,d=c.linear),this.attr=a,this.dur=b,d&&(this.easing=d),e&&(this.callback=e)};d._.Animation=w,d.animation=function(a,b,c,d){return new w(a,b,c,d)},m.inAnim=function(){var a=this,b=[];for(var c in a.anims)a.anims[t](c)&&!function(a){b.push({anim:new w(a._attrs,a.dur,a.easing,a._callback),mina:a,curStatus:a.status(),status:function(b){return a.status(b)},stop:function(){a.stop()}})}(a.anims[c]);return b},d.animate=function(a,d,e,f,g,h){"function"!=typeof g||g.length||(h=g,g=c.linear);var i=c.time(),j=c(a,d,i,i+f,c.time,e,g);return h&&b.once("mina.finish."+j.id,h),j},m.stop=function(){for(var a=this.inAnim(),b=0,c=a.length;c>b;b++)a[b].stop();return this},m.animate=function(a,d,e,f){"function"!=typeof e||e.length||(f=e,e=c.linear),a instanceof w&&(f=a.callback,e=a.easing,d=a.dur,a=a.attr);var g,h,i,j,l=[],m=[],p={},q=this;for(var r in a)if(a[t](r)){q.equal?(j=q.equal(r,o(a[r])),g=j.from,h=j.to,i=j.f):(g=+q.attr(r),h=+a[r]);var s=n(g,"array")?g.length:1;p[r]=k(l.length,l.length+s,i),l=l.concat(g),m=m.concat(h)}var u=c.time(),v=c(l,m,u,u+d,c.time,function(a){var b={};for(var c in p)p[t](c)&&(b[c]=p[c](a));q.attr(b)},e);return q.anims[v.id]=v,v._attrs=a,v._callback=f,b("snap.animcreated."+q.id,v),b.once("mina.finish."+v.id,function(){delete q.anims[v.id],f&&f.call(q)}),b.once("mina.stop."+v.id,function(){delete q.anims[v.id]}),q};var x={};m.data=function(a,c){var e=x[this.id]=x[this.id]||{};if(0==arguments.length)return b("snap.data.get."+this.id,this,e,null),e;
if(1==arguments.length){if(d.is(a,"object")){for(var f in a)a[t](f)&&this.data(f,a[f]);return this}return b("snap.data.get."+this.id,this,e[a],a),e[a]}return e[a]=c,b("snap.data.set."+this.id,this,c,a),this},m.removeData=function(a){return null==a?x[this.id]={}:x[this.id]&&delete x[this.id][a],this},m.outerSVG=m.toString=l(1),m.innerSVG=l(),m.toDataURL=function(){if(a&&a.btoa){var b=this.getBBox(),c=d.format('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="{width}" height="{height}" viewBox="{x} {y} {width} {height}">{contents}</svg>',{x:+b.x.toFixed(3),y:+b.y.toFixed(3),width:+b.width.toFixed(3),height:+b.height.toFixed(3),contents:this.outerSVG()});return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(c)))}},h.prototype.select=m.select,h.prototype.selectAll=m.selectAll}),d.plugin(function(a){function b(a,b,d,e,f,g){return null==b&&"[object SVGMatrix]"==c.call(a)?(this.a=a.a,this.b=a.b,this.c=a.c,this.d=a.d,this.e=a.e,void(this.f=a.f)):void(null!=a?(this.a=+a,this.b=+b,this.c=+d,this.d=+e,this.e=+f,this.f=+g):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0))}var c=Object.prototype.toString,d=String,e=Math,f="";!function(c){function g(a){return a[0]*a[0]+a[1]*a[1]}function h(a){var b=e.sqrt(g(a));a[0]&&(a[0]/=b),a[1]&&(a[1]/=b)}c.add=function(a,c,d,e,f,g){var h,i,j,k,l=[[],[],[]],m=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],n=[[a,d,f],[c,e,g],[0,0,1]];for(a&&a instanceof b&&(n=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]),h=0;3>h;h++)for(i=0;3>i;i++){for(k=0,j=0;3>j;j++)k+=m[h][j]*n[j][i];l[h][i]=k}return this.a=l[0][0],this.b=l[1][0],this.c=l[0][1],this.d=l[1][1],this.e=l[0][2],this.f=l[1][2],this},c.invert=function(){var a=this,c=a.a*a.d-a.b*a.c;return new b(a.d/c,-a.b/c,-a.c/c,a.a/c,(a.c*a.f-a.d*a.e)/c,(a.b*a.e-a.a*a.f)/c)},c.clone=function(){return new b(this.a,this.b,this.c,this.d,this.e,this.f)},c.translate=function(a,b){return this.add(1,0,0,1,a,b)},c.scale=function(a,b,c,d){return null==b&&(b=a),(c||d)&&this.add(1,0,0,1,c,d),this.add(a,0,0,b,0,0),(c||d)&&this.add(1,0,0,1,-c,-d),this},c.rotate=function(b,c,d){b=a.rad(b),c=c||0,d=d||0;var f=+e.cos(b).toFixed(9),g=+e.sin(b).toFixed(9);return this.add(f,g,-g,f,c,d),this.add(1,0,0,1,-c,-d)},c.x=function(a,b){return a*this.a+b*this.c+this.e},c.y=function(a,b){return a*this.b+b*this.d+this.f},c.get=function(a){return+this[d.fromCharCode(97+a)].toFixed(4)},c.toString=function(){return"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")"},c.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},c.determinant=function(){return this.a*this.d-this.b*this.c},c.split=function(){var b={};b.dx=this.e,b.dy=this.f;var c=[[this.a,this.c],[this.b,this.d]];b.scalex=e.sqrt(g(c[0])),h(c[0]),b.shear=c[0][0]*c[1][0]+c[0][1]*c[1][1],c[1]=[c[1][0]-c[0][0]*b.shear,c[1][1]-c[0][1]*b.shear],b.scaley=e.sqrt(g(c[1])),h(c[1]),b.shear/=b.scaley,this.determinant()<0&&(b.scalex=-b.scalex);var d=-c[0][1],f=c[1][1];return 0>f?(b.rotate=a.deg(e.acos(f)),0>d&&(b.rotate=360-b.rotate)):b.rotate=a.deg(e.asin(d)),b.isSimple=!(+b.shear.toFixed(9)||b.scalex.toFixed(9)!=b.scaley.toFixed(9)&&b.rotate),b.isSuperSimple=!+b.shear.toFixed(9)&&b.scalex.toFixed(9)==b.scaley.toFixed(9)&&!b.rotate,b.noRotation=!+b.shear.toFixed(9)&&!b.rotate,b},c.toTransformString=function(a){var b=a||this.split();return+b.shear.toFixed(9)?"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]:(b.scalex=+b.scalex.toFixed(4),b.scaley=+b.scaley.toFixed(4),b.rotate=+b.rotate.toFixed(4),(b.dx||b.dy?"t"+[+b.dx.toFixed(4),+b.dy.toFixed(4)]:f)+(1!=b.scalex||1!=b.scaley?"s"+[b.scalex,b.scaley,0,0]:f)+(b.rotate?"r"+[+b.rotate.toFixed(4),0,0]:f))}}(b.prototype),a.Matrix=b,a.matrix=function(a,c,d,e,f,g){return new b(a,c,d,e,f,g)}}),d.plugin(function(a,c,d,e,f){function g(d){return function(e){if(b.stop(),e instanceof f&&1==e.node.childNodes.length&&("radialGradient"==e.node.firstChild.tagName||"linearGradient"==e.node.firstChild.tagName||"pattern"==e.node.firstChild.tagName)&&(e=e.node.firstChild,n(this).appendChild(e),e=l(e)),e instanceof c)if("radialGradient"==e.type||"linearGradient"==e.type||"pattern"==e.type){e.node.id||p(e.node,{id:e.id});var g=q(e.node.id)}else g=e.attr(d);else if(g=a.color(e),g.error){var h=a(n(this).ownerSVGElement).gradient(e);h?(h.node.id||p(h.node,{id:h.id}),g=q(h.node.id)):g=e}else g=r(g);var i={};i[d]=g,p(this.node,i),this.node.style[d]=t}}function h(a){b.stop(),a==+a&&(a+="px"),this.node.style.fontSize=a}function i(a){for(var b=[],c=a.childNodes,d=0,e=c.length;e>d;d++){var f=c[d];3==f.nodeType&&b.push(f.nodeValue),"tspan"==f.tagName&&b.push(1==f.childNodes.length&&3==f.firstChild.nodeType?f.firstChild.nodeValue:i(f))}return b}function j(){return b.stop(),this.node.style.fontSize}var k=a._.make,l=a._.wrap,m=a.is,n=a._.getSomeDefs,o=/^url\(#?([^)]+)\)$/,p=a._.$,q=a.url,r=String,s=a._.separator,t="";b.on("snap.util.attr.mask",function(a){if(a instanceof c||a instanceof f){if(b.stop(),a instanceof f&&1==a.node.childNodes.length&&(a=a.node.firstChild,n(this).appendChild(a),a=l(a)),"mask"==a.type)var d=a;else d=k("mask",n(this)),d.node.appendChild(a.node);!d.node.id&&p(d.node,{id:d.id}),p(this.node,{mask:q(d.id)})}}),function(a){b.on("snap.util.attr.clip",a),b.on("snap.util.attr.clip-path",a),b.on("snap.util.attr.clipPath",a)}(function(a){if(a instanceof c||a instanceof f){if(b.stop(),"clipPath"==a.type)var d=a;else d=k("clipPath",n(this)),d.node.appendChild(a.node),!d.node.id&&p(d.node,{id:d.id});p(this.node,{"clip-path":q(d.node.id||d.id)})}}),b.on("snap.util.attr.fill",g("fill")),b.on("snap.util.attr.stroke",g("stroke"));var u=/^([lr])(?:\(([^)]*)\))?(.*)$/i;b.on("snap.util.grad.parse",function(a){a=r(a);var b=a.match(u);if(!b)return null;var c=b[1],d=b[2],e=b[3];return d=d.split(/\s*,\s*/).map(function(a){return+a==a?+a:a}),1==d.length&&0==d[0]&&(d=[]),e=e.split("-"),e=e.map(function(a){a=a.split(":");var b={color:a[0]};return a[1]&&(b.offset=parseFloat(a[1])),b}),{type:c,params:d,stops:e}}),b.on("snap.util.attr.d",function(c){b.stop(),m(c,"array")&&m(c[0],"array")&&(c=a.path.toString.call(c)),c=r(c),c.match(/[ruo]/i)&&(c=a.path.toAbsolute(c)),p(this.node,{d:c})})(-1),b.on("snap.util.attr.#text",function(a){b.stop(),a=r(a);for(var c=e.doc.createTextNode(a);this.node.firstChild;)this.node.removeChild(this.node.firstChild);this.node.appendChild(c)})(-1),b.on("snap.util.attr.path",function(a){b.stop(),this.attr({d:a})})(-1),b.on("snap.util.attr.class",function(a){b.stop(),this.node.className.baseVal=a})(-1),b.on("snap.util.attr.viewBox",function(a){var c;c=m(a,"object")&&"x"in a?[a.x,a.y,a.width,a.height].join(" "):m(a,"array")?a.join(" "):a,p(this.node,{viewBox:c}),b.stop()})(-1),b.on("snap.util.attr.transform",function(a){this.transform(a),b.stop()})(-1),b.on("snap.util.attr.r",function(a){"rect"==this.type&&(b.stop(),p(this.node,{rx:a,ry:a}))})(-1),b.on("snap.util.attr.textpath",function(a){if(b.stop(),"text"==this.type){var d,e,f;if(!a&&this.textPath){for(e=this.textPath;e.node.firstChild;)this.node.appendChild(e.node.firstChild);return e.remove(),void delete this.textPath}if(m(a,"string")){var g=n(this),h=l(g.parentNode).path(a);g.appendChild(h.node),d=h.id,h.attr({id:d})}else a=l(a),a instanceof c&&(d=a.attr("id"),d||(d=a.id,a.attr({id:d})));if(d)if(e=this.textPath,f=this.node,e)e.attr({"xlink:href":"#"+d});else{for(e=p("textPath",{"xlink:href":"#"+d});f.firstChild;)e.appendChild(f.firstChild);f.appendChild(e),this.textPath=l(e)}}})(-1),b.on("snap.util.attr.text",function(a){if("text"==this.type){for(var c=this.node,d=function(a){var b=p("tspan");if(m(a,"array"))for(var c=0;c<a.length;c++)b.appendChild(d(a[c]));else b.appendChild(e.doc.createTextNode(a));return b.normalize&&b.normalize(),b};c.firstChild;)c.removeChild(c.firstChild);for(var f=d(a);f.firstChild;)c.appendChild(f.firstChild)}b.stop()})(-1),b.on("snap.util.attr.fontSize",h)(-1),b.on("snap.util.attr.font-size",h)(-1),b.on("snap.util.getattr.transform",function(){return b.stop(),this.transform()})(-1),b.on("snap.util.getattr.textpath",function(){return b.stop(),this.textPath})(-1),function(){function c(c){return function(){b.stop();var d=e.doc.defaultView.getComputedStyle(this.node,null).getPropertyValue("marker-"+c);return"none"==d?d:a(e.doc.getElementById(d.match(o)[1]))}}function d(a){return function(c){b.stop();var d="marker"+a.charAt(0).toUpperCase()+a.substring(1);if(""==c||!c)return void(this.node.style[d]="none");if("marker"==c.type){var e=c.node.id;return e||p(c.node,{id:c.id}),void(this.node.style[d]=q(e))}}}b.on("snap.util.getattr.marker-end",c("end"))(-1),b.on("snap.util.getattr.markerEnd",c("end"))(-1),b.on("snap.util.getattr.marker-start",c("start"))(-1),b.on("snap.util.getattr.markerStart",c("start"))(-1),b.on("snap.util.getattr.marker-mid",c("mid"))(-1),b.on("snap.util.getattr.markerMid",c("mid"))(-1),b.on("snap.util.attr.marker-end",d("end"))(-1),b.on("snap.util.attr.markerEnd",d("end"))(-1),b.on("snap.util.attr.marker-start",d("start"))(-1),b.on("snap.util.attr.markerStart",d("start"))(-1),b.on("snap.util.attr.marker-mid",d("mid"))(-1),b.on("snap.util.attr.markerMid",d("mid"))(-1)}(),b.on("snap.util.getattr.r",function(){return"rect"==this.type&&p(this.node,"rx")==p(this.node,"ry")?(b.stop(),p(this.node,"rx")):void 0})(-1),b.on("snap.util.getattr.text",function(){if("text"==this.type||"tspan"==this.type){b.stop();var a=i(this.node);return 1==a.length?a[0]:a}})(-1),b.on("snap.util.getattr.#text",function(){return this.node.textContent})(-1),b.on("snap.util.getattr.viewBox",function(){b.stop();var c=p(this.node,"viewBox");return c?(c=c.split(s),a._.box(+c[0],+c[1],+c[2],+c[3])):void 0})(-1),b.on("snap.util.getattr.points",function(){var a=p(this.node,"points");return b.stop(),a?a.split(s):void 0})(-1),b.on("snap.util.getattr.path",function(){var a=p(this.node,"d");return b.stop(),a})(-1),b.on("snap.util.getattr.class",function(){return this.node.className.baseVal})(-1),b.on("snap.util.getattr.fontSize",j)(-1),b.on("snap.util.getattr.font-size",j)(-1)}),d.plugin(function(a,b){var c=/\S+/g,d=String,e=b.prototype;e.addClass=function(a){var b,e,f,g,h=d(a||"").match(c)||[],i=this.node,j=i.className.baseVal,k=j.match(c)||[];if(h.length){for(b=0;f=h[b++];)e=k.indexOf(f),~e||k.push(f);g=k.join(" "),j!=g&&(i.className.baseVal=g)}return this},e.removeClass=function(a){var b,e,f,g,h=d(a||"").match(c)||[],i=this.node,j=i.className.baseVal,k=j.match(c)||[];if(k.length){for(b=0;f=h[b++];)e=k.indexOf(f),~e&&k.splice(e,1);g=k.join(" "),j!=g&&(i.className.baseVal=g)}return this},e.hasClass=function(a){var b=this.node,d=b.className.baseVal,e=d.match(c)||[];return!!~e.indexOf(a)},e.toggleClass=function(a,b){if(null!=b)return b?this.addClass(a):this.removeClass(a);var d,e,f,g,h=(a||"").match(c)||[],i=this.node,j=i.className.baseVal,k=j.match(c)||[];for(d=0;f=h[d++];)e=k.indexOf(f),~e?k.splice(e,1):k.push(f);return g=k.join(" "),j!=g&&(i.className.baseVal=g),this}}),d.plugin(function(){function a(a){return a}function c(a){return function(b){return+b.toFixed(3)+a}}var d={"+":function(a,b){return a+b},"-":function(a,b){return a-b},"/":function(a,b){return a/b},"*":function(a,b){return a*b}},e=String,f=/[a-z]+$/i,g=/^\s*([+\-\/*])\s*=\s*([\d.eE+\-]+)\s*([^\d\s]+)?\s*$/;b.on("snap.util.attr",function(a){var c=e(a).match(g);if(c){var h=b.nt(),i=h.substring(h.lastIndexOf(".")+1),j=this.attr(i),k={};b.stop();var l=c[3]||"",m=j.match(f),n=d[c[1]];if(m&&m==l?a=n(parseFloat(j),+c[2]):(j=this.asPX(i),a=n(this.asPX(i),this.asPX(i,c[2]+l))),isNaN(j)||isNaN(a))return;k[i]=a,this.attr(k)}})(-10),b.on("snap.util.equal",function(h,i){var j=e(this.attr(h)||""),k=e(i).match(g);if(k){b.stop();var l=k[3]||"",m=j.match(f),n=d[k[1]];return m&&m==l?{from:parseFloat(j),to:n(parseFloat(j),+k[2]),f:c(m)}:(j=this.asPX(h),{from:j,to:n(j,this.asPX(h,k[2]+l)),f:a})}})(-10)}),d.plugin(function(c,d,e,f){var g=e.prototype,h=c.is;g.rect=function(a,b,c,d,e,f){var g;return null==f&&(f=e),h(a,"object")&&"[object Object]"==a?g=a:null!=a&&(g={x:a,y:b,width:c,height:d},null!=e&&(g.rx=e,g.ry=f)),this.el("rect",g)},g.circle=function(a,b,c){var d;return h(a,"object")&&"[object Object]"==a?d=a:null!=a&&(d={cx:a,cy:b,r:c}),this.el("circle",d)};var i=function(){function a(){this.parentNode.removeChild(this)}return function(b,c){var d=f.doc.createElement("img"),e=f.doc.body;d.style.cssText="position:absolute;left:-9999em;top:-9999em",d.onload=function(){c.call(d),d.onload=d.onerror=null,e.removeChild(d)},d.onerror=a,e.appendChild(d),d.src=b}}();g.image=function(a,b,d,e,f){var g=this.el("image");if(h(a,"object")&&"src"in a)g.attr(a);else if(null!=a){var j={"xlink:href":a,preserveAspectRatio:"none"};null!=b&&null!=d&&(j.x=b,j.y=d),null!=e&&null!=f?(j.width=e,j.height=f):i(a,function(){c._.$(g.node,{width:this.offsetWidth,height:this.offsetHeight})}),c._.$(g.node,j)}return g},g.ellipse=function(a,b,c,d){var e;return h(a,"object")&&"[object Object]"==a?e=a:null!=a&&(e={cx:a,cy:b,rx:c,ry:d}),this.el("ellipse",e)},g.path=function(a){var b;return h(a,"object")&&!h(a,"array")?b=a:a&&(b={d:a}),this.el("path",b)},g.group=g.g=function(a){var b=this.el("g");return 1==arguments.length&&a&&!a.type?b.attr(a):arguments.length&&b.add(Array.prototype.slice.call(arguments,0)),b},g.svg=function(a,b,c,d,e,f,g,i){var j={};return h(a,"object")&&null==b?j=a:(null!=a&&(j.x=a),null!=b&&(j.y=b),null!=c&&(j.width=c),null!=d&&(j.height=d),null!=e&&null!=f&&null!=g&&null!=i&&(j.viewBox=[e,f,g,i])),this.el("svg",j)},g.mask=function(a){var b=this.el("mask");return 1==arguments.length&&a&&!a.type?b.attr(a):arguments.length&&b.add(Array.prototype.slice.call(arguments,0)),b},g.ptrn=function(a,b,c,d,e,f,g,i){if(h(a,"object"))var j=a;else j={patternUnits:"userSpaceOnUse"},a&&(j.x=a),b&&(j.y=b),null!=c&&(j.width=c),null!=d&&(j.height=d),j.viewBox=null!=e&&null!=f&&null!=g&&null!=i?[e,f,g,i]:[a||0,b||0,c||0,d||0];return this.el("pattern",j)},g.use=function(a){return null!=a?(a instanceof d&&(a.attr("id")||a.attr({id:c._.id(a)}),a=a.attr("id")),"#"==String(a).charAt()&&(a=a.substring(1)),this.el("use",{"xlink:href":"#"+a})):d.prototype.use.call(this)},g.symbol=function(a,b,c,d){var e={};return null!=a&&null!=b&&null!=c&&null!=d&&(e.viewBox=[a,b,c,d]),this.el("symbol",e)},g.text=function(a,b,c){var d={};return h(a,"object")?d=a:null!=a&&(d={x:a,y:b,text:c||""}),this.el("text",d)},g.line=function(a,b,c,d){var e={};return h(a,"object")?e=a:null!=a&&(e={x1:a,x2:c,y1:b,y2:d}),this.el("line",e)},g.polyline=function(a){arguments.length>1&&(a=Array.prototype.slice.call(arguments,0));var b={};return h(a,"object")&&!h(a,"array")?b=a:null!=a&&(b={points:a}),this.el("polyline",b)},g.polygon=function(a){arguments.length>1&&(a=Array.prototype.slice.call(arguments,0));var b={};return h(a,"object")&&!h(a,"array")?b=a:null!=a&&(b={points:a}),this.el("polygon",b)},function(){function d(){return this.selectAll("stop")}function e(a,b){var d=k("stop"),e={offset:+b+"%"};return a=c.color(a),e["stop-color"]=a.hex,a.opacity<1&&(e["stop-opacity"]=a.opacity),k(d,e),this.node.appendChild(d),this}function f(){if("linearGradient"==this.type){var a=k(this.node,"x1")||0,b=k(this.node,"x2")||1,d=k(this.node,"y1")||0,e=k(this.node,"y2")||0;return c._.box(a,d,math.abs(b-a),math.abs(e-d))}var f=this.node.cx||.5,g=this.node.cy||.5,h=this.node.r||0;return c._.box(f-h,g-h,2*h,2*h)}function h(a,c){function d(a,b){for(var c=(b-l)/(a-m),d=m;a>d;d++)g[d].offset=+(+l+c*(d-m)).toFixed(2);m=a,l=b}var e,f=b("snap.util.grad.parse",null,c).firstDefined();if(!f)return null;f.params.unshift(a),e="l"==f.type.toLowerCase()?i.apply(0,f.params):j.apply(0,f.params),f.type!=f.type.toLowerCase()&&k(e.node,{gradientUnits:"userSpaceOnUse"});var g=f.stops,h=g.length,l=0,m=0;h--;for(var n=0;h>n;n++)"offset"in g[n]&&d(n,g[n].offset);for(g[h].offset=g[h].offset||100,d(h,g[h].offset),n=0;h>=n;n++){var o=g[n];e.addStop(o.color,o.offset)}return e}function i(a,b,g,h,i){var j=c._.make("linearGradient",a);return j.stops=d,j.addStop=e,j.getBBox=f,null!=b&&k(j.node,{x1:b,y1:g,x2:h,y2:i}),j}function j(a,b,g,h,i,j){var l=c._.make("radialGradient",a);return l.stops=d,l.addStop=e,l.getBBox=f,null!=b&&k(l.node,{cx:b,cy:g,r:h}),null!=i&&null!=j&&k(l.node,{fx:i,fy:j}),l}var k=c._.$;g.gradient=function(a){return h(this.defs,a)},g.gradientLinear=function(a,b,c,d){return i(this.defs,a,b,c,d)},g.gradientRadial=function(a,b,c,d,e){return j(this.defs,a,b,c,d,e)},g.toString=function(){var a,b=this.node.ownerDocument,d=b.createDocumentFragment(),e=b.createElement("div"),f=this.node.cloneNode(!0);return d.appendChild(e),e.appendChild(f),c._.$(f,{xmlns:"http://www.w3.org/2000/svg"}),a=e.innerHTML,d.removeChild(d.firstChild),a},g.toDataURL=function(){return a&&a.btoa?"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(this))):void 0},g.clear=function(){for(var a,b=this.node.firstChild;b;)a=b.nextSibling,"defs"!=b.tagName?b.parentNode.removeChild(b):g.clear.call({node:b}),b=a}}()}),d.plugin(function(a,b){function c(a){var b=c.ps=c.ps||{};return b[a]?b[a].sleep=100:b[a]={sleep:100},setTimeout(function(){for(var c in b)b[K](c)&&c!=a&&(b[c].sleep--,!b[c].sleep&&delete b[c])}),b[a]}function d(a,b,c,d){return null==a&&(a=b=c=d=0),null==b&&(b=a.y,c=a.width,d=a.height,a=a.x),{x:a,y:b,width:c,w:c,height:d,h:d,x2:a+c,y2:b+d,cx:a+c/2,cy:b+d/2,r1:N.min(c,d)/2,r2:N.max(c,d)/2,r0:N.sqrt(c*c+d*d)/2,path:w(a,b,c,d),vb:[a,b,c,d].join(" ")}}function e(){return this.join(",").replace(L,"$1")}function f(a){var b=J(a);return b.toString=e,b}function g(a,b,c,d,e,f,g,h,j){return null==j?n(a,b,c,d,e,f,g,h):i(a,b,c,d,e,f,g,h,o(a,b,c,d,e,f,g,h,j))}function h(c,d){function e(a){return+(+a).toFixed(3)}return a._.cacher(function(a,f,h){a instanceof b&&(a=a.attr("d")),a=E(a);for(var j,k,l,m,n,o="",p={},q=0,r=0,s=a.length;s>r;r++){if(l=a[r],"M"==l[0])j=+l[1],k=+l[2];else{if(m=g(j,k,l[1],l[2],l[3],l[4],l[5],l[6]),q+m>f){if(d&&!p.start){if(n=g(j,k,l[1],l[2],l[3],l[4],l[5],l[6],f-q),o+=["C"+e(n.start.x),e(n.start.y),e(n.m.x),e(n.m.y),e(n.x),e(n.y)],h)return o;p.start=o,o=["M"+e(n.x),e(n.y)+"C"+e(n.n.x),e(n.n.y),e(n.end.x),e(n.end.y),e(l[5]),e(l[6])].join(),q+=m,j=+l[5],k=+l[6];continue}if(!c&&!d)return n=g(j,k,l[1],l[2],l[3],l[4],l[5],l[6],f-q)}q+=m,j=+l[5],k=+l[6]}o+=l.shift()+l}return p.end=o,n=c?q:d?p:i(j,k,l[0],l[1],l[2],l[3],l[4],l[5],1)},null,a._.clone)}function i(a,b,c,d,e,f,g,h,i){var j=1-i,k=R(j,3),l=R(j,2),m=i*i,n=m*i,o=k*a+3*l*i*c+3*j*i*i*e+n*g,p=k*b+3*l*i*d+3*j*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,w=j*e+i*g,x=j*f+i*h,y=90-180*N.atan2(q-s,r-t)/O;return{x:o,y:p,m:{x:q,y:r},n:{x:s,y:t},start:{x:u,y:v},end:{x:w,y:x},alpha:y}}function j(b,c,e,f,g,h,i,j){a.is(b,"array")||(b=[b,c,e,f,g,h,i,j]);var k=D.apply(null,b);return d(k.min.x,k.min.y,k.max.x-k.min.x,k.max.y-k.min.y)}function k(a,b,c){return b>=a.x&&b<=a.x+a.width&&c>=a.y&&c<=a.y+a.height}function l(a,b){return a=d(a),b=d(b),k(b,a.x,a.y)||k(b,a.x2,a.y)||k(b,a.x,a.y2)||k(b,a.x2,a.y2)||k(a,b.x,b.y)||k(a,b.x2,b.y)||k(a,b.x,b.y2)||k(a,b.x2,b.y2)||(a.x<b.x2&&a.x>b.x||b.x<a.x2&&b.x>a.x)&&(a.y<b.y2&&a.y>b.y||b.y<a.y2&&b.y>a.y)}function m(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function n(a,b,c,d,e,f,g,h,i){null==i&&(i=1),i=i>1?1:0>i?0:i;for(var j=i/2,k=12,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],n=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],o=0,p=0;k>p;p++){var q=j*l[p]+j,r=m(q,a,c,e,g),s=m(q,b,d,f,h),t=r*r+s*s;o+=n[p]*N.sqrt(t)}return j*o}function o(a,b,c,d,e,f,g,h,i){if(!(0>i||n(a,b,c,d,e,f,g,h)<i)){var j,k=1,l=k/2,m=k-l,o=.01;for(j=n(a,b,c,d,e,f,g,h,m);S(j-i)>o;)l/=2,m+=(i>j?1:-1)*l,j=n(a,b,c,d,e,f,g,h,m);return m}}function p(a,b,c,d,e,f,g,h){if(!(Q(a,c)<P(e,g)||P(a,c)>Q(e,g)||Q(b,d)<P(f,h)||P(b,d)>Q(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(k){var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(!(n<+P(a,c).toFixed(2)||n>+Q(a,c).toFixed(2)||n<+P(e,g).toFixed(2)||n>+Q(e,g).toFixed(2)||o<+P(b,d).toFixed(2)||o>+Q(b,d).toFixed(2)||o<+P(f,h).toFixed(2)||o>+Q(f,h).toFixed(2)))return{x:l,y:m}}}}function q(a,b,c){var d=j(a),e=j(b);if(!l(d,e))return c?0:[];for(var f=n.apply(0,a),g=n.apply(0,b),h=~~(f/8),k=~~(g/8),m=[],o=[],q={},r=c?0:[],s=0;h+1>s;s++){var t=i.apply(0,a.concat(s/h));m.push({x:t.x,y:t.y,t:s/h})}for(s=0;k+1>s;s++)t=i.apply(0,b.concat(s/k)),o.push({x:t.x,y:t.y,t:s/k});for(s=0;h>s;s++)for(var u=0;k>u;u++){var v=m[s],w=m[s+1],x=o[u],y=o[u+1],z=S(w.x-v.x)<.001?"y":"x",A=S(y.x-x.x)<.001?"y":"x",B=p(v.x,v.y,w.x,w.y,x.x,x.y,y.x,y.y);if(B){if(q[B.x.toFixed(4)]==B.y.toFixed(4))continue;q[B.x.toFixed(4)]=B.y.toFixed(4);var C=v.t+S((B[z]-v[z])/(w[z]-v[z]))*(w.t-v.t),D=x.t+S((B[A]-x[A])/(y[A]-x[A]))*(y.t-x.t);C>=0&&1>=C&&D>=0&&1>=D&&(c?r++:r.push({x:B.x,y:B.y,t1:C,t2:D}))}}return r}function r(a,b){return t(a,b)}function s(a,b){return t(a,b,1)}function t(a,b,c){a=E(a),b=E(b);for(var d,e,f,g,h,i,j,k,l,m,n=c?0:[],o=0,p=a.length;p>o;o++){var r=a[o];if("M"==r[0])d=h=r[1],e=i=r[2];else{"C"==r[0]?(l=[d,e].concat(r.slice(1)),d=l[6],e=l[7]):(l=[d,e,d,e,h,i,h,i],d=h,e=i);for(var s=0,t=b.length;t>s;s++){var u=b[s];if("M"==u[0])f=j=u[1],g=k=u[2];else{"C"==u[0]?(m=[f,g].concat(u.slice(1)),f=m[6],g=m[7]):(m=[f,g,f,g,j,k,j,k],f=j,g=k);var v=q(l,m,c);if(c)n+=v;else{for(var w=0,x=v.length;x>w;w++)v[w].segment1=o,v[w].segment2=s,v[w].bez1=l,v[w].bez2=m;n=n.concat(v)}}}}}return n}function u(a,b,c){var d=v(a);return k(d,b,c)&&t(a,[["M",b,c],["H",d.x2+10]],1)%2==1}function v(a){var b=c(a);if(b.bbox)return J(b.bbox);if(!a)return d();a=E(a);for(var e,f=0,g=0,h=[],i=[],j=0,k=a.length;k>j;j++)if(e=a[j],"M"==e[0])f=e[1],g=e[2],h.push(f),i.push(g);else{var l=D(f,g,e[1],e[2],e[3],e[4],e[5],e[6]);h=h.concat(l.min.x,l.max.x),i=i.concat(l.min.y,l.max.y),f=e[5],g=e[6]}var m=P.apply(0,h),n=P.apply(0,i),o=Q.apply(0,h),p=Q.apply(0,i),q=d(m,n,o-m,p-n);return b.bbox=J(q),q}function w(a,b,c,d,f){if(f)return[["M",+a+ +f,b],["l",c-2*f,0],["a",f,f,0,0,1,f,f],["l",0,d-2*f],["a",f,f,0,0,1,-f,f],["l",2*f-c,0],["a",f,f,0,0,1,-f,-f],["l",0,2*f-d],["a",f,f,0,0,1,f,-f],["z"]];var g=[["M",a,b],["l",c,0],["l",0,d],["l",-c,0],["z"]];return g.toString=e,g}function x(a,b,c,d,f){if(null==f&&null==d&&(d=c),a=+a,b=+b,c=+c,d=+d,null!=f)var g=Math.PI/180,h=a+c*Math.cos(-d*g),i=a+c*Math.cos(-f*g),j=b+c*Math.sin(-d*g),k=b+c*Math.sin(-f*g),l=[["M",h,j],["A",c,c,0,+(f-d>180),0,i,k]];else l=[["M",a,b],["m",0,-d],["a",c,d,0,1,1,0,2*d],["a",c,d,0,1,1,0,-2*d],["z"]];return l.toString=e,l}function y(b){var d=c(b),g=String.prototype.toLowerCase;if(d.rel)return f(d.rel);a.is(b,"array")&&a.is(b&&b[0],"array")||(b=a.parsePathString(b));var h=[],i=0,j=0,k=0,l=0,m=0;"M"==b[0][0]&&(i=b[0][1],j=b[0][2],k=i,l=j,m++,h.push(["M",i,j]));for(var n=m,o=b.length;o>n;n++){var p=h[n]=[],q=b[n];if(q[0]!=g.call(q[0]))switch(p[0]=g.call(q[0]),p[0]){case"a":p[1]=q[1],p[2]=q[2],p[3]=q[3],p[4]=q[4],p[5]=q[5],p[6]=+(q[6]-i).toFixed(3),p[7]=+(q[7]-j).toFixed(3);break;case"v":p[1]=+(q[1]-j).toFixed(3);break;case"m":k=q[1],l=q[2];default:for(var r=1,s=q.length;s>r;r++)p[r]=+(q[r]-(r%2?i:j)).toFixed(3)}else{p=h[n]=[],"m"==q[0]&&(k=q[1]+i,l=q[2]+j);for(var t=0,u=q.length;u>t;t++)h[n][t]=q[t]}var v=h[n].length;switch(h[n][0]){case"z":i=k,j=l;break;case"h":i+=+h[n][v-1];break;case"v":j+=+h[n][v-1];break;default:i+=+h[n][v-2],j+=+h[n][v-1]}}return h.toString=e,d.rel=f(h),h}function z(b){var d=c(b);if(d.abs)return f(d.abs);if(I(b,"array")&&I(b&&b[0],"array")||(b=a.parsePathString(b)),!b||!b.length)return[["M",0,0]];var g,h=[],i=0,j=0,k=0,l=0,m=0;"M"==b[0][0]&&(i=+b[0][1],j=+b[0][2],k=i,l=j,m++,h[0]=["M",i,j]);for(var n,o,p=3==b.length&&"M"==b[0][0]&&"R"==b[1][0].toUpperCase()&&"Z"==b[2][0].toUpperCase(),q=m,r=b.length;r>q;q++){if(h.push(n=[]),o=b[q],g=o[0],g!=g.toUpperCase())switch(n[0]=g.toUpperCase(),n[0]){case"A":n[1]=o[1],n[2]=o[2],n[3]=o[3],n[4]=o[4],n[5]=o[5],n[6]=+o[6]+i,n[7]=+o[7]+j;break;case"V":n[1]=+o[1]+j;break;case"H":n[1]=+o[1]+i;break;case"R":for(var s=[i,j].concat(o.slice(1)),t=2,u=s.length;u>t;t++)s[t]=+s[t]+i,s[++t]=+s[t]+j;h.pop(),h=h.concat(G(s,p));break;case"O":h.pop(),s=x(i,j,o[1],o[2]),s.push(s[0]),h=h.concat(s);break;case"U":h.pop(),h=h.concat(x(i,j,o[1],o[2],o[3])),n=["U"].concat(h[h.length-1].slice(-2));break;case"M":k=+o[1]+i,l=+o[2]+j;default:for(t=1,u=o.length;u>t;t++)n[t]=+o[t]+(t%2?i:j)}else if("R"==g)s=[i,j].concat(o.slice(1)),h.pop(),h=h.concat(G(s,p)),n=["R"].concat(o.slice(-2));else if("O"==g)h.pop(),s=x(i,j,o[1],o[2]),s.push(s[0]),h=h.concat(s);else if("U"==g)h.pop(),h=h.concat(x(i,j,o[1],o[2],o[3])),n=["U"].concat(h[h.length-1].slice(-2));else for(var v=0,w=o.length;w>v;v++)n[v]=o[v];if(g=g.toUpperCase(),"O"!=g)switch(n[0]){case"Z":i=+k,j=+l;break;case"H":i=n[1];break;case"V":j=n[1];break;case"M":k=n[n.length-2],l=n[n.length-1];default:i=n[n.length-2],j=n[n.length-1]}}return h.toString=e,d.abs=f(h),h}function A(a,b,c,d){return[a,b,c,d,c,d]}function B(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]}function C(b,c,d,e,f,g,h,i,j,k){var l,m=120*O/180,n=O/180*(+f||0),o=[],p=a._.cacher(function(a,b,c){var d=a*N.cos(c)-b*N.sin(c),e=a*N.sin(c)+b*N.cos(c);return{x:d,y:e}});if(k)y=k[0],z=k[1],w=k[2],x=k[3];else{l=p(b,c,-n),b=l.x,c=l.y,l=p(i,j,-n),i=l.x,j=l.y;var q=(N.cos(O/180*f),N.sin(O/180*f),(b-i)/2),r=(c-j)/2,s=q*q/(d*d)+r*r/(e*e);s>1&&(s=N.sqrt(s),d=s*d,e=s*e);var t=d*d,u=e*e,v=(g==h?-1:1)*N.sqrt(S((t*u-t*r*r-u*q*q)/(t*r*r+u*q*q))),w=v*d*r/e+(b+i)/2,x=v*-e*q/d+(c+j)/2,y=N.asin(((c-x)/e).toFixed(9)),z=N.asin(((j-x)/e).toFixed(9));y=w>b?O-y:y,z=w>i?O-z:z,0>y&&(y=2*O+y),0>z&&(z=2*O+z),h&&y>z&&(y-=2*O),!h&&z>y&&(z-=2*O)}var A=z-y;if(S(A)>m){var B=z,D=i,E=j;z=y+m*(h&&z>y?1:-1),i=w+d*N.cos(z),j=x+e*N.sin(z),o=C(i,j,d,e,f,0,h,D,E,[z,B,w,x])}A=z-y;var F=N.cos(y),G=N.sin(y),H=N.cos(z),I=N.sin(z),J=N.tan(A/4),K=4/3*d*J,L=4/3*e*J,M=[b,c],P=[b+K*G,c-L*F],Q=[i+K*I,j-L*H],R=[i,j];if(P[0]=2*M[0]-P[0],P[1]=2*M[1]-P[1],k)return[P,Q,R].concat(o);o=[P,Q,R].concat(o).join().split(",");for(var T=[],U=0,V=o.length;V>U;U++)T[U]=U%2?p(o[U-1],o[U],n).y:p(o[U],o[U+1],n).x;return T}function D(a,b,c,d,e,f,g,h){for(var i,j,k,l,m,n,o,p,q=[],r=[[],[]],s=0;2>s;++s)if(0==s?(j=6*a-12*c+6*e,i=-3*a+9*c-9*e+3*g,k=3*c-3*a):(j=6*b-12*d+6*f,i=-3*b+9*d-9*f+3*h,k=3*d-3*b),S(i)<1e-12){if(S(j)<1e-12)continue;l=-k/j,l>0&&1>l&&q.push(l)}else o=j*j-4*k*i,p=N.sqrt(o),0>o||(m=(-j+p)/(2*i),m>0&&1>m&&q.push(m),n=(-j-p)/(2*i),n>0&&1>n&&q.push(n));for(var t,u=q.length,v=u;u--;)l=q[u],t=1-l,r[0][u]=t*t*t*a+3*t*t*l*c+3*t*l*l*e+l*l*l*g,r[1][u]=t*t*t*b+3*t*t*l*d+3*t*l*l*f+l*l*l*h;return r[0][v]=a,r[1][v]=b,r[0][v+1]=g,r[1][v+1]=h,r[0].length=r[1].length=v+2,{min:{x:P.apply(0,r[0]),y:P.apply(0,r[1])},max:{x:Q.apply(0,r[0]),y:Q.apply(0,r[1])}}}function E(a,b){var d=!b&&c(a);if(!b&&d.curve)return f(d.curve);for(var e=z(a),g=b&&z(b),h={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},j=(function(a,b,c){var d,e;if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];switch(!(a[0]in{T:1,Q:1})&&(b.qx=b.qy=null),a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"].concat(C.apply(0,[b.x,b.y].concat(a.slice(1))));break;case"S":"C"==c||"S"==c?(d=2*b.x-b.bx,e=2*b.y-b.by):(d=b.x,e=b.y),a=["C",d,e].concat(a.slice(1));break;case"T":"Q"==c||"T"==c?(b.qx=2*b.x-b.qx,b.qy=2*b.y-b.qy):(b.qx=b.x,b.qy=b.y),a=["C"].concat(B(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"].concat(B(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"].concat(A(b.x,b.y,a[1],a[2]));break;case"H":a=["C"].concat(A(b.x,b.y,a[1],b.y));break;case"V":a=["C"].concat(A(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"].concat(A(b.x,b.y,b.X,b.Y))}return a}),k=function(a,b){if(a[b].length>7){a[b].shift();for(var c=a[b];c.length;)m[b]="A",g&&(n[b]="A"),a.splice(b++,0,["C"].concat(c.splice(0,6)));a.splice(b,1),r=Q(e.length,g&&g.length||0)}},l=function(a,b,c,d,f){a&&b&&"M"==a[f][0]&&"M"!=b[f][0]&&(b.splice(f,0,["M",d.x,d.y]),c.bx=0,c.by=0,c.x=a[f][1],c.y=a[f][2],r=Q(e.length,g&&g.length||0))},m=[],n=[],o="",p="",q=0,r=Q(e.length,g&&g.length||0);r>q;q++){e[q]&&(o=e[q][0]),"C"!=o&&(m[q]=o,q&&(p=m[q-1])),e[q]=j(e[q],h,p),"A"!=m[q]&&"C"==o&&(m[q]="C"),k(e,q),g&&(g[q]&&(o=g[q][0]),"C"!=o&&(n[q]=o,q&&(p=n[q-1])),g[q]=j(g[q],i,p),"A"!=n[q]&&"C"==o&&(n[q]="C"),k(g,q)),l(e,g,h,i,q),l(g,e,i,h,q);var s=e[q],t=g&&g[q],u=s.length,v=g&&t.length;h.x=s[u-2],h.y=s[u-1],h.bx=M(s[u-4])||h.x,h.by=M(s[u-3])||h.y,i.bx=g&&(M(t[v-4])||i.x),i.by=g&&(M(t[v-3])||i.y),i.x=g&&t[v-2],i.y=g&&t[v-1]}return g||(d.curve=f(e)),g?[e,g]:e}function F(a,b){if(!b)return a;var c,d,e,f,g,h,i;for(a=E(a),e=0,g=a.length;g>e;e++)for(i=a[e],f=1,h=i.length;h>f;f+=2)c=b.x(i[f],i[f+1]),d=b.y(i[f],i[f+1]),i[f]=c,i[f+1]=d;return a}function G(a,b){for(var c=[],d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[d-2],y:+a[d-1]},{x:+a[d],y:+a[d+1]},{x:+a[d+2],y:+a[d+3]},{x:+a[d+4],y:+a[d+5]}];b?d?e-4==d?f[3]={x:+a[0],y:+a[1]}:e-2==d&&(f[2]={x:+a[0],y:+a[1]},f[3]={x:+a[2],y:+a[3]}):f[0]={x:+a[e-2],y:+a[e-1]}:e-4==d?f[3]=f[2]:d||(f[0]={x:+a[d],y:+a[d+1]}),c.push(["C",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}var H=b.prototype,I=a.is,J=a._.clone,K="hasOwnProperty",L=/,?([a-z]),?/gi,M=parseFloat,N=Math,O=N.PI,P=N.min,Q=N.max,R=N.pow,S=N.abs,T=h(1),U=h(),V=h(0,1),W=a._unit2px,X={path:function(a){return a.attr("path")},circle:function(a){var b=W(a);return x(b.cx,b.cy,b.r)},ellipse:function(a){var b=W(a);return x(b.cx||0,b.cy||0,b.rx,b.ry)},rect:function(a){var b=W(a);return w(b.x||0,b.y||0,b.width,b.height,b.rx,b.ry)},image:function(a){var b=W(a);return w(b.x||0,b.y||0,b.width,b.height)},line:function(a){return"M"+[a.attr("x1")||0,a.attr("y1")||0,a.attr("x2"),a.attr("y2")]},polyline:function(a){return"M"+a.attr("points")},polygon:function(a){return"M"+a.attr("points")+"z"},deflt:function(a){var b=a.node.getBBox();return w(b.x,b.y,b.width,b.height)}};a.path=c,a.path.getTotalLength=T,a.path.getPointAtLength=U,a.path.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return V(a,b).end;var d=V(a,c,1);return b?V(d,b).end:d},H.getTotalLength=function(){return this.node.getTotalLength?this.node.getTotalLength():void 0},H.getPointAtLength=function(a){return U(this.attr("d"),a)},H.getSubpath=function(b,c){return a.path.getSubpath(this.attr("d"),b,c)},a._.box=d,a.path.findDotsAtSegment=i,a.path.bezierBBox=j,a.path.isPointInsideBBox=k,a.closest=function(b,c,e,f){for(var g=100,h=d(b-g/2,c-g/2,g,g),i=[],j=e[0].hasOwnProperty("x")?function(a){return{x:e[a].x,y:e[a].y}}:function(a){return{x:e[a],y:f[a]}},l=0;1e6>=g&&!l;){for(var m=0,n=e.length;n>m;m++){var o=j(m);if(k(h,o.x,o.y)){l++,i.push(o);break}}l||(g*=2,h=d(b-g/2,c-g/2,g,g))}if(1e6!=g){var p,q=1/0;for(m=0,n=i.length;n>m;m++){var r=a.len(b,c,i[m].x,i[m].y);q>r&&(q=r,i[m].len=r,p=i[m])}return p}},a.path.isBBoxIntersect=l,a.path.intersection=r,a.path.intersectionNumber=s,a.path.isPointInside=u,a.path.getBBox=v,a.path.get=X,a.path.toRelative=y,a.path.toAbsolute=z,a.path.toCubic=E,a.path.map=F,a.path.toString=e,a.path.clone=f}),d.plugin(function(a){var d=Math.max,e=Math.min,f=function(a){if(this.items=[],this.bindings={},this.length=0,this.type="set",a)for(var b=0,c=a.length;c>b;b++)a[b]&&(this[this.items.length]=this.items[this.items.length]=a[b],this.length++)},g=f.prototype;g.push=function(){for(var a,b,c=0,d=arguments.length;d>c;c++)a=arguments[c],a&&(b=this.items.length,this[b]=this.items[b]=a,this.length++);return this},g.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},g.forEach=function(a,b){for(var c=0,d=this.items.length;d>c;c++)if(a.call(b,this.items[c],c)===!1)return this;return this},g.animate=function(d,e,f,g){"function"!=typeof f||f.length||(g=f,f=c.linear),d instanceof a._.Animation&&(g=d.callback,f=d.easing,e=f.dur,d=d.attr);var h=arguments;if(a.is(d,"array")&&a.is(h[h.length-1],"array"))var i=!0;var j,k=function(){j?this.b=j:j=this.b},l=0,m=this,n=g&&function(){++l==m.length&&g.call(this)
};return this.forEach(function(a,c){b.once("snap.animcreated."+a.id,k),i?h[c]&&a.animate.apply(a,h[c]):a.animate(d,e,f,n)})},g.remove=function(){for(;this.length;)this.pop().remove();return this},g.bind=function(a,b,c){var d={};if("function"==typeof b)this.bindings[a]=b;else{var e=c||a;this.bindings[a]=function(a){d[e]=a,b.attr(d)}}return this},g.attr=function(a){var b={};for(var c in a)this.bindings[c]?this.bindings[c](a[c]):b[c]=a[c];for(var d=0,e=this.items.length;e>d;d++)this.items[d].attr(b);return this},g.clear=function(){for(;this.length;)this.pop()},g.splice=function(a,b){a=0>a?d(this.length+a,0):a,b=d(0,e(this.length-a,b));var c,g=[],h=[],i=[];for(c=2;c<arguments.length;c++)i.push(arguments[c]);for(c=0;b>c;c++)h.push(this[a+c]);for(;c<this.length-a;c++)g.push(this[a+c]);var j=i.length;for(c=0;c<j+g.length;c++)this.items[a+c]=this[a+c]=j>c?i[c]:g[c-j];for(c=this.items.length=this.length-=b-j;this[c];)delete this[c++];return new f(h)},g.exclude=function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]==a)return this.splice(b,1),!0;return!1},g.insertAfter=function(a){for(var b=this.items.length;b--;)this.items[b].insertAfter(a);return this},g.getBBox=function(){for(var a=[],b=[],c=[],f=[],g=this.items.length;g--;)if(!this.items[g].removed){var h=this.items[g].getBBox();a.push(h.x),b.push(h.y),c.push(h.x+h.width),f.push(h.y+h.height)}return a=e.apply(0,a),b=e.apply(0,b),c=d.apply(0,c),f=d.apply(0,f),{x:a,y:b,x2:c,y2:f,width:c-a,height:f-b,cx:a+(c-a)/2,cy:b+(f-b)/2}},g.clone=function(a){a=new f;for(var b=0,c=this.items.length;c>b;b++)a.push(this.items[b].clone());return a},g.toString=function(){return"Snap‘s set"},g.type="set",a.Set=f,a.set=function(){var a=new f;return arguments.length&&a.push.apply(a,Array.prototype.slice.call(arguments,0)),a}}),d.plugin(function(a,c){function d(a){var b=a[0];switch(b.toLowerCase()){case"t":return[b,0,0];case"m":return[b,1,0,0,1,0,0];case"r":return 4==a.length?[b,0,a[2],a[3]]:[b,0];case"s":return 5==a.length?[b,1,1,a[3],a[4]]:3==a.length?[b,1,1]:[b,1]}}function e(b,c,e){c=p(c).replace(/\.{3}|\u2026/g,b),b=a.parseTransformString(b)||[],c=a.parseTransformString(c)||[];for(var f,g,h,i,l=Math.max(b.length,c.length),m=[],n=[],o=0;l>o;o++){if(h=b[o]||d(c[o]),i=c[o]||d(h),h[0]!=i[0]||"r"==h[0].toLowerCase()&&(h[2]!=i[2]||h[3]!=i[3])||"s"==h[0].toLowerCase()&&(h[3]!=i[3]||h[4]!=i[4])){b=a._.transform2matrix(b,e()),c=a._.transform2matrix(c,e()),m=[["m",b.a,b.b,b.c,b.d,b.e,b.f]],n=[["m",c.a,c.b,c.c,c.d,c.e,c.f]];break}for(m[o]=[],n[o]=[],f=0,g=Math.max(h.length,i.length);g>f;f++)f in h&&(m[o][f]=h[f]),f in i&&(n[o][f]=i[f])}return{from:k(m),to:k(n),f:j(m)}}function f(a){return a}function g(a){return function(b){return+b.toFixed(3)+a}}function h(a){return a.join(" ")}function i(b){return a.rgb(b[0],b[1],b[2])}function j(a){var b,c,d,e,f,g,h=0,i=[];for(b=0,c=a.length;c>b;b++){for(f="[",g=['"'+a[b][0]+'"'],d=1,e=a[b].length;e>d;d++)g[d]="val["+h++ +"]";f+=g+"]",i[b]=f}return Function("val","return Snap.path.toString.call(["+i+"])")}function k(a){for(var b=[],c=0,d=a.length;d>c;c++)for(var e=1,f=a[c].length;f>e;e++)b.push(a[c][e]);return b}function l(a){return isFinite(parseFloat(a))}function m(b,c){return a.is(b,"array")&&a.is(c,"array")?b.toString()==c.toString():!1}var n={},o=/[a-z]+$/i,p=String;n.stroke=n.fill="colour",c.prototype.equal=function(a,c){return b("snap.util.equal",this,a,c).firstDefined()},b.on("snap.util.equal",function(b,c){var d,q,r=p(this.attr(b)||""),s=this;if(l(r)&&l(c))return{from:parseFloat(r),to:parseFloat(c),f:f};if("colour"==n[b])return d=a.color(r),q=a.color(c),{from:[d.r,d.g,d.b,d.opacity],to:[q.r,q.g,q.b,q.opacity],f:i};if("viewBox"==b)return d=this.attr(b).vb.split(" ").map(Number),q=c.split(" ").map(Number),{from:d,to:q,f:h};if("transform"==b||"gradientTransform"==b||"patternTransform"==b)return c instanceof a.Matrix&&(c=c.toTransformString()),a._.rgTransform.test(c)||(c=a._.svgTransform2string(c)),e(r,c,function(){return s.getBBox(1)});if("d"==b||"path"==b)return d=a.path.toCubic(r,c),{from:k(d[0]),to:k(d[1]),f:j(d[0])};if("points"==b)return d=p(r).split(a._.separator),q=p(c).split(a._.separator),{from:d,to:q,f:function(a){return a}};var t=r.match(o),u=p(c).match(o);return t&&m(t,u)?{from:parseFloat(r),to:parseFloat(c),f:g(t)}:{from:this.asPX(b),to:this.asPX(b,c),f:f}})}),d.plugin(function(a,c,d,e){for(var f=c.prototype,g="hasOwnProperty",h=("createTouch"in e.doc),i=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","touchstart","touchmove","touchend","touchcancel"],j={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},k=(function(a,b){var c="y"==a?"scrollTop":"scrollLeft",d=b&&b.node?b.node.ownerDocument:e.doc;return d[c in d.documentElement?"documentElement":"body"][c]}),l=function(){return this.originalEvent.preventDefault()},m=function(){return this.originalEvent.stopPropagation()},n=function(a,b,c,d){var e=h&&j[b]?j[b]:b,f=function(e){var f=k("y",d),i=k("x",d);if(h&&j[g](b))for(var n=0,o=e.targetTouches&&e.targetTouches.length;o>n;n++)if(e.targetTouches[n].target==a||a.contains(e.targetTouches[n].target)){var p=e;e=e.targetTouches[n],e.originalEvent=p,e.preventDefault=l,e.stopPropagation=m;break}var q=e.clientX+i,r=e.clientY+f;return c.call(d,e,q,r)};return b!==e&&a.addEventListener(b,f,!1),a.addEventListener(e,f,!1),function(){return b!==e&&a.removeEventListener(b,f,!1),a.removeEventListener(e,f,!1),!0}},o=[],p=function(a){for(var c,d=a.clientX,e=a.clientY,f=k("y"),g=k("x"),i=o.length;i--;){if(c=o[i],h){for(var j,l=a.touches&&a.touches.length;l--;)if(j=a.touches[l],j.identifier==c.el._drag.id||c.el.node.contains(j.target)){d=j.clientX,e=j.clientY,(a.originalEvent?a.originalEvent:a).preventDefault();break}}else a.preventDefault();{var m=c.el.node;m.nextSibling,m.parentNode,m.style.display}d+=g,e+=f,b("snap.drag.move."+c.el.id,c.move_scope||c.el,d-c.el._drag.x,e-c.el._drag.y,d,e,a)}},q=function(c){a.unmousemove(p).unmouseup(q);for(var d,e=o.length;e--;)d=o[e],d.el._drag={},b("snap.drag.end."+d.el.id,d.end_scope||d.start_scope||d.move_scope||d.el,c),b.off("snap.drag.*."+d.el.id);o=[]},r=i.length;r--;)!function(b){a[b]=f[b]=function(c,d){if(a.is(c,"function"))this.events=this.events||[],this.events.push({name:b,f:c,unbind:n(this.node||document,b,c,d||this)});else for(var e=0,f=this.events.length;f>e;e++)if(this.events[e].name==b)try{this.events[e].f.call(this)}catch(g){}return this},a["un"+b]=f["un"+b]=function(a){for(var c=this.events||[],d=c.length;d--;)if(c[d].name==b&&(c[d].f==a||!a))return c[d].unbind(),c.splice(d,1),!c.length&&delete this.events,this;return this}}(i[r]);f.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},f.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)};var s=[];f.drag=function(c,d,e,f,g,h){function i(i,j,l){(i.originalEvent||i).preventDefault(),k._drag.x=j,k._drag.y=l,k._drag.id=i.identifier,!o.length&&a.mousemove(p).mouseup(q),o.push({el:k,move_scope:f,start_scope:g,end_scope:h}),d&&b.on("snap.drag.start."+k.id,d),c&&b.on("snap.drag.move."+k.id,c),e&&b.on("snap.drag.end."+k.id,e),b("snap.drag.start."+k.id,g||f||k,j,l,i)}function j(a,c,d){b("snap.draginit."+k.id,k,a,c,d)}var k=this;if(!arguments.length){var l;return k.drag(function(a,b){this.attr({transform:l+(l?"T":"t")+[a,b]})},function(){l=this.transform().local})}return b.on("snap.draginit."+k.id,i),k._drag={},s.push({el:k,start:i,init:j}),k.mousedown(j),k},f.undrag=function(){for(var c=s.length;c--;)s[c].el==this&&(this.unmousedown(s[c].init),s.splice(c,1),b.unbind("snap.drag.*."+this.id),b.unbind("snap.draginit."+this.id));return!s.length&&a.unmousemove(p).unmouseup(q),this}}),d.plugin(function(a,c,d){var e=(c.prototype,d.prototype),f=/^\s*url\((.+)\)/,g=String,h=a._.$;a.filter={},e.filter=function(b){var d=this;"svg"!=d.type&&(d=d.paper);var e=a.parse(g(b)),f=a._.id(),i=(d.node.offsetWidth,d.node.offsetHeight,h("filter"));return h(i,{id:f,filterUnits:"userSpaceOnUse"}),i.appendChild(e.node),d.defs.appendChild(i),new c(i)},b.on("snap.util.getattr.filter",function(){b.stop();var c=h(this.node,"filter");if(c){var d=g(c).match(f);return d&&a.select(d[1])}}),b.on("snap.util.attr.filter",function(d){if(d instanceof c&&"filter"==d.type){b.stop();var e=d.node.id;e||(h(d.node,{id:d.id}),e=d.id),h(this.node,{filter:a.url(e)})}d&&"none"!=d||(b.stop(),this.node.removeAttribute("filter"))}),a.filter.blur=function(b,c){null==b&&(b=2);var d=null==c?b:[b,c];return a.format('<feGaussianBlur stdDeviation="{def}"/>',{def:d})},a.filter.blur.toString=function(){return this()},a.filter.shadow=function(b,c,d,e,f){return"string"==typeof d&&(e=d,f=e,d=4),"string"!=typeof e&&(f=e,e="#000"),e=e||"#000",null==d&&(d=4),null==f&&(f=1),null==b&&(b=0,c=2),null==c&&(c=b),e=a.color(e),a.format('<feGaussianBlur in="SourceAlpha" stdDeviation="{blur}"/><feOffset dx="{dx}" dy="{dy}" result="offsetblur"/><feFlood flood-color="{color}"/><feComposite in2="offsetblur" operator="in"/><feComponentTransfer><feFuncA type="linear" slope="{opacity}"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge>',{color:e,dx:b,dy:c,blur:d,opacity:f})},a.filter.shadow.toString=function(){return this()},a.filter.grayscale=function(b){return null==b&&(b=1),a.format('<feColorMatrix type="matrix" values="{a} {b} {c} 0 0 {d} {e} {f} 0 0 {g} {b} {h} 0 0 0 0 0 1 0"/>',{a:.2126+.7874*(1-b),b:.7152-.7152*(1-b),c:.0722-.0722*(1-b),d:.2126-.2126*(1-b),e:.7152+.2848*(1-b),f:.0722-.0722*(1-b),g:.2126-.2126*(1-b),h:.0722+.9278*(1-b)})},a.filter.grayscale.toString=function(){return this()},a.filter.sepia=function(b){return null==b&&(b=1),a.format('<feColorMatrix type="matrix" values="{a} {b} {c} 0 0 {d} {e} {f} 0 0 {g} {h} {i} 0 0 0 0 0 1 0"/>',{a:.393+.607*(1-b),b:.769-.769*(1-b),c:.189-.189*(1-b),d:.349-.349*(1-b),e:.686+.314*(1-b),f:.168-.168*(1-b),g:.272-.272*(1-b),h:.534-.534*(1-b),i:.131+.869*(1-b)})},a.filter.sepia.toString=function(){return this()},a.filter.saturate=function(b){return null==b&&(b=1),a.format('<feColorMatrix type="saturate" values="{amount}"/>',{amount:1-b})},a.filter.saturate.toString=function(){return this()},a.filter.hueRotate=function(b){return b=b||0,a.format('<feColorMatrix type="hueRotate" values="{angle}"/>',{angle:b})},a.filter.hueRotate.toString=function(){return this()},a.filter.invert=function(b){return null==b&&(b=1),a.format('<feComponentTransfer><feFuncR type="table" tableValues="{amount} {amount2}"/><feFuncG type="table" tableValues="{amount} {amount2}"/><feFuncB type="table" tableValues="{amount} {amount2}"/></feComponentTransfer>',{amount:b,amount2:1-b})},a.filter.invert.toString=function(){return this()},a.filter.brightness=function(b){return null==b&&(b=1),a.format('<feComponentTransfer><feFuncR type="linear" slope="{amount}"/><feFuncG type="linear" slope="{amount}"/><feFuncB type="linear" slope="{amount}"/></feComponentTransfer>',{amount:b})},a.filter.brightness.toString=function(){return this()},a.filter.contrast=function(b){return null==b&&(b=1),a.format('<feComponentTransfer><feFuncR type="linear" slope="{amount}" intercept="{amount2}"/><feFuncG type="linear" slope="{amount}" intercept="{amount2}"/><feFuncB type="linear" slope="{amount}" intercept="{amount2}"/></feComponentTransfer>',{amount:b,amount2:.5-b/2})},a.filter.contrast.toString=function(){return this()}}),d.plugin(function(a,b){var c=a._.box,d=a.is,e=/^[^a-z]*([tbmlrc])/i,f=function(){return"T"+this.dx+","+this.dy};b.prototype.getAlign=function(a,b){null==b&&d(a,"string")&&(b=a,a=null),a=a||this.paper;var g=a.getBBox?a.getBBox():c(a),h=this.getBBox(),i={};switch(b=b&&b.match(e),b=b?b[1].toLowerCase():"c"){case"t":i.dx=0,i.dy=g.y-h.y;break;case"b":i.dx=0,i.dy=g.y2-h.y2;break;case"m":i.dx=0,i.dy=g.cy-h.cy;break;case"l":i.dx=g.x-h.x,i.dy=0;break;case"r":i.dx=g.x2-h.x2,i.dy=0;break;default:i.dx=g.cx-h.cx,i.dy=0}return i.toString=f,i},b.prototype.align=function(a,b){return this.transform("..."+this.getAlign(a,b))}}),d});
(function($){
function digicove_section_start_render(){
var _elementor=typeof elementor!='undefined' ? elementor:elementorFrontend;
_elementor.hooks.addFilter('pxl_section_start_render', function(html, settings, el){
if(typeof settings.pxl_mask_bg_img!='undefined'&&settings.pxl_mask_bg_img.url!=''){
html +='<div class="pxl-mask-bg-parallax"></div>';
}
return html;
});
}
function digicove_section_before_render(){
var _elementor=typeof elementor!='undefined' ? elementor:elementorFrontend;
_elementor.hooks.addFilter('pxl-custom-section/before-render', function(html, settings, el){
return html;
});
}
function digicove_custom_section_classes(){
var _elementor=typeof elementor!='undefined' ? elementor:elementorFrontend;
_elementor.hooks.addFilter('pxl-custom-section-classes', function(settings){
let custom_classes=[];
if(typeof settings.custom_style!='undefined'&&settings.custom_style!=''){
custom_classes.push('style-' + settings.custom_style);
}
return custom_classes;
});
}
function digicove_column_before_render(){
var _elementor=typeof elementor!='undefined' ? elementor:elementorFrontend;
_elementor.hooks.addFilter('pxl-custom-column/before-render', function(html, settings, el){
if(typeof settings.pxl_parallax_col_bg_img!='undefined'&&settings.pxl_parallax_col_bg_img.url!=''){
html +='<div class="pxl-column-bg-parallax"></div>';
}
return html;
});
}
function digicove_custom_column_classes(){
var _elementor=typeof elementor!='undefined' ? elementor:elementorFrontend;
_elementor.hooks.addFilter('pxl-custom-column-classes', function(settings){
let custom_classes=[];
if(typeof settings.custom_style!='undefined'&&settings.custom_style!=''){
custom_classes.push('style-' + settings.custom_style);
}
return custom_classes;
});
}
$(window).on('elementor/frontend/init', function(){
digicove_section_start_render();
digicove_section_before_render();
digicove_custom_section_classes();
digicove_column_before_render();
digicove_custom_column_classes();
});
})(jQuery);
(function($){
function digicove_animation_handler($scope){
elementorFrontend.waypoint($scope.find('.pxl-animate'), function (){
var $animate_el=$(this),
data=$animate_el.data('settings');
if(typeof data!='undefined'&&typeof data['animation']!='undefined'){
setTimeout(function (){
$animate_el.removeClass('pxl-invisible').addClass('animated ' + data['animation']);
}, data['animation_delay']);
}else{
setTimeout(function (){
$animate_el.removeClass('pxl-invisible').addClass('animated fadeInUp');
}, 300);
}});
elementorFrontend.waypoint($scope.find('.pxl-divider.animated'), function (){
$(this).addClass('pxl-animated');
});
elementorFrontend.waypoint($scope.find('.pxl-bd-anm'), function (){
$(this).addClass('pxl-animated');
});
elementorFrontend.waypoint($scope.find('.pxl-hd-bd-left'), function (){
$(this).addClass('pxl-animated');
});
elementorFrontend.waypoint($scope.find('.pxl-hd-bd-right'), function (){
$(this).addClass('pxl-animated');
});
elementorFrontend.waypoint($scope.find('.pxl-section-line-item'), function (){
$(this).addClass('pxl-animated');
});
elementorFrontend.waypoint($scope.find('.pxl-image-wg.move-from-left'), function (){
$(this).addClass('pxl-animated');
});
elementorFrontend.waypoint($scope.find('.pxl-image-wg.move-from-right'), function (){
$(this).addClass('pxl-animated');
});
elementorFrontend.waypoint($scope.find('.pxl-image-wg.skew-in'), function (){
$(this).addClass('pxl-animated');
});
elementorFrontend.waypoint($scope.find('.pxl-wg-move-from-left>.elementor-widget-container'), function (){
$(this).addClass('pxl-animated');
});
elementorFrontend.waypoint($scope.find('.pxl-wg-move-from-right>.elementor-widget-container'), function (){
$(this).addClass('pxl-animated');
});
$(document).ajaxComplete(function(event, xhr, settings){
"use strict";
elementorFrontend.waypoint($scope.find('.pxl-bd-anm'), function (){
$(this).addClass('pxl-animated');
});
elementorFrontend.waypoint($scope.find('.layout-portfolio-list-1 .grid-item .item-title'), function (){
$(this).addClass('pxl-animated');
});
});
}
function digicove_gsap_scroll_trigger($scope){
gsap.registerPlugin(ScrollTrigger);
const images=gsap.utils.toArray('img');
const showDemo=()=> {
document.body.style.overflow='auto';
gsap.utils.toArray($scope.find('.pxl-horizontal-scroll .scroll-trigger')).forEach((section, index)=> {
const w=section;
var x=w.scrollWidth * -1;
var xEnd=0;
if($(section).closest('.pxl-horizontal-scroll').hasClass('revesal')){
x='100%';
xEnd=(w.scrollWidth - section.offsetWidth) * -1;
}
gsap.fromTo(w, { x }, {
x: xEnd,
scrollTrigger: {
trigger: section,
scrub: 0.5 
}});
});
}
showDemo();
}
function digicove_achor(){
$('.pxl-menu-primary2 li.menu-item-has-children').append('<span class="pxl-menu-toggle style2">+</span>');
$('.pxl-menu-primary2 li.menu-item-has-children .sub-menu').css('display','none');
$('.pxl-menu-toggle.style2').on('click', function (){
if($(this).hasClass('active')){
$(this).text('+');
$(this).closest('ul').find('.pxl-menu-toggle.style2.active').toggleClass('active');
$(this).closest('ul').find('.sub-menu.active').toggleClass('active').slideToggle();
const toggleHeight=$(this).siblings('a').outerHeight();
$(this).css('height', toggleHeight + 'px');
}else{
$(this).closest('ul').find('.pxl-menu-toggle.style2.active').toggleClass('active');
$(this).closest('ul').find('.sub-menu.active').toggleClass('active').slideToggle();
$(this).toggleClass('active');
$(this).parent().find('> .sub-menu').toggleClass('active');
$(this).parent().find('> .sub-menu').slideToggle();
$(this).text('-');
const toggleHeight=$(this).siblings('a').outerHeight();
$(this).css('height', toggleHeight + 'px');
}});
}
function digicove_text_hover_image($scope){
if($scope.find('.pxl-text-img-wrap').length <=0) return;
var mouseX=0,
mouseY=0;
$scope.find('.pxl-text-img-wrap .content-inner').mousemove(function(e){
var offset=$(this).offset();
mouseX=(e.pageX - offset.left);
mouseY=(e.pageY - offset.top);
});
$scope.find('.pxl-text-img-wrap ul>li').on("mouseenter", function(){
$(this).removeClass('deactive').addClass('active');
var target=$(this).attr('data-target');
$(this).closest('.content-inner').find(target).removeClass('deactive').addClass('active');
});
$scope.find('.pxl-text-img-wrap ul>li').on("mouseleave", function(){
$(this).addClass('deactive').removeClass('active');
var target=$(this).attr('data-target');
$(this).closest('.content-inner').find(target).addClass('deactive').removeClass('active');
});
const s={
x: window.innerWidth / 2,
y: window.innerHeight / 2
},
t=gsap.quickSetter($scope.find('.pxl-text-img-wrap .content-inner'), "css"),
e=gsap.quickSetter($scope.find('.pxl-text-img-wrap .content-inner'), "css");
gsap.ticker.add((()=> {
const o=.15,
i=1 - Math.pow(.85, gsap.ticker.deltaRatio());
s.x +=(mouseX - s.x) * i,
s.y +=(mouseY - s.y) * i,
t({
"--pxl-mouse-x": `${s.x}px`
}), e({
"--pxl-mouse-y": `${s.y}px`
})
}))
}
function digicove_progressbar_handler($scope){
elementorFrontend.waypoint($scope.find('.pxl-progress-bar'), function (){
$(this).progressbar();
});
elementorFrontend.waypoint($scope.find('.pxl-progressbar.circle'), function (){
var $progressbarElem=$scope.find(".pxl-progressbar-container"),
$progressbarElemInner=$scope.find(".pxl-progressbar-inner"),
settings=$progressbarElem.data("settings"),
length=settings.circle_percent,
number=settings.circle_number,
prefix=settings.prefix,
suffix=settings.suffix,
speed=settings.speed;
if(length > 100)
length=100;
$progressbarElem.prop({
'percent': 0
}).animate({
percent: number
}, {
duration: speed,
easing: 'linear',
step: function (percent){
var rotate=(100 - percent);
var rotate1=(percent + 8);
$progressbarElem.find(".js-progress-bar").css('stroke-dashoffset', rotate);
$progressbarElem.find(".js-progress-bar1").css('stroke-dashoffset', rotate1);
}});
$progressbarElemInner.prop({
'counter': 0,
}).animate({
counter: number,
}, {
duration: speed,
easing: 'linear',
step: function (counter){
$progressbarElem.find(".progress-percentage").text(prefix + Math.ceil(counter) + suffix);
}});
});
}
function digicove_split_text($scope){
var st=$scope.find(".pxl-split-text");
if(st.length==0) return;
gsap.registerPlugin(SplitText);
st.each(function(index, el){
el.split=new SplitText(el, {
type: "lines,words,chars",
linesClass: "split-line"
});
gsap.set(el, { perspective: 400 });
if($(el).hasClass('split-in-fade')){
gsap.set(el.split.chars, {
opacity: 0,
ease: "Back.easeOut",
});
}
if($(el).hasClass('split-in-right')){
gsap.set(el.split.chars, {
opacity: 0,
x: "50",
ease: "Back.easeOut",
});
}
if($(el).hasClass('split-in-left')){
gsap.set(el.split.chars, {
opacity: 0,
x: "-50",
ease: "circ.out",
});
}
if($(el).hasClass('split-in-up')){
gsap.set(el.split.chars, {
opacity: 0,
y: "80",
ease: "circ.out",
});
}
if($(el).hasClass('split-in-down')){
gsap.set(el.split.chars, {
opacity: 0,
y: "-80",
ease: "circ.out",
});
}
if($(el).hasClass('split-in-rotate')){
gsap.set(el.split.chars, {
opacity: 0,
rotateX: "50deg",
ease: "circ.out",
});
}
if($(el).hasClass('split-in-scale')){
gsap.set(el.split.chars, {
opacity: 0,
scale: "0.5",
ease: "circ.out",
});
}
el.anim=gsap.to(el.split.chars, {
scrollTrigger: {
trigger: el,
toggleActions: "restart pause resume reverse",
start: "top 90%",
},
x: "0",
y: "0",
rotateX: "0",
scale: 1,
opacity: 1,
duration: 0.8,
stagger: 0.02,
});
});
}
function digicove_background_color (){
$(document).ready(function(){
const elements=document.querySelectorAll('.pxl-mask-bg-parallax');
elements.forEach(element=> {
const dataColor=element.getAttribute('data-color');
if(dataColor){
const { x, y, z }=JSON.parse(dataColor);
const gradient=`linear-gradient(${z}deg, ${x}, ${y})`;
element.style.background=gradient;
}});
});
}
function digicove_webgl_effects(){
class WebglHover {
constructor(set){
this.canvas=set.canvas
this.webGLCurtain=new Curtains({
container: this.canvas,
watchScroll: false,
pixelRatio: Math.min(1.5, window.devicePixelRatio)
})
this.planeElement=set.planeElement
this.mouse={
x: 0,
y: 0
}
this.params={
vertexShader: document.getElementById("vs").textContent,
fragmentShader: document.getElementById("fs").textContent,
widthSegments: 40,
heightSegments: 40,
uniforms: {
time: {
name: "uTime",
type: "1f",
value: 0
},
mousepos: {
name: "uMouse",
type: "2f",
value: [0, 0]
},
resolution: {
name: "uReso",
type: "2f",
value: [innerWidth, innerHeight]
},
progress: {
name: "uProgress",
type: "1f",
value: 0
}}
}
this.initPlane()
}
initPlane(){
this.plane=new Plane(this.webGLCurtain, this.planeElement, this.params)
if(this.plane){
this.plane.onReady(()=> {
this.update()
this.initEvent()
})
}}
update(){
this.plane.onRender(()=> {
this.plane.uniforms.time.value +=0.01
this.plane.uniforms.resolution.value=[innerWidth, innerHeight]
})
}
initEvent(){
this.planeElement.addEventListener("mouseenter", ()=> {
gsap.to(this.plane.uniforms.progress, .8, {
value: 1
})
})
this.planeElement.addEventListener("mouseout", ()=> {
gsap.to(this.plane.uniforms.progress, .8, {
value: 0
})
})
}}
$('.pxl-case-grid.layout3 .pxl-grid-item').each(function(){
const $this=$(this);
const item_image_height=$this.find('.image-front').height();
$this.find('.canvas canvas').css('height', item_image_height + 'px');
const initialized=$this.data('initialized');
if(!initialized){
$this.data('initialized', true);
const canvas=$this.find('.canvas')[0];
const planeElement=$this.find('.item--image')[0];
new WebglHover({
canvas: canvas,
planeElement: planeElement
});
}});
}
function digicove_map_var_css(){
var posX=0,
posY=0;
var mouseX=0,
mouseY=0;
var offset_left=0;
var offset_right=0;
var offset_top=0;
var offset_bottom=0;
$(document).on("mousemove", function(e){
offset_left=e.clientX;
offset_right=$(window).width() - offset_left;
offset_top=e.clientY;
offset_bottom=$(window).height() - offset_top;
});
$('.cursor-map-target').mousemove(function(e){
var offset=$(this).offset();
mouseX=(e.pageX - offset.left);
mouseY=(e.pageY - offset.top);
});
var map_content_width=$('.pxl-map-wrap').width();
var map_content_height=$('.pxl-map-wrap').height();
TweenMax.to({}, 0.01, {
repeat: -1,
onRepeat: function(){
posX +=(mouseX - posX);
posY +=(mouseY - posY);
if($('.pxl-map-wrap').length > 0){
var base_left=posX - (map_content_width / 2) - map_content_width;
if(offset_left < (base_left*-1) + mouseX){
base_left=posX + (map_content_width / 2);
}
var top_pos=posY - (map_content_width / 2);
if($(window).innerWidth() <=767){
base_left=(offset_left * -1) + mouseX + 15;
top_pos=(map_content_height * -1) + mouseY - 15;
}
TweenMax.set($('.pxl-map-wrap:not(.clicked)'), {
css: {
left: base_left,
top: top_pos
}});
}}
});
$('.cursor-map-target').on("mouseenter", function(){
$(this).find(".pxl-map-wrap").removeClass("deactive").addClass("active");
});
$('.cursor-map-target').on("mouseleave", function(){
$(this).find(".pxl-map-wrap").removeClass("active").addClass("deactive");
});
$(document).on('mousedown','.cursor-map-target.show-popup',function(){
$(this).find(".pxl-map-wrap").addClass("clicked");
var p_left=0;
var p_top=0;
var zoom_w=($(window).width() / 2);
var zoom_h=($(window).height() / 1.8);
if(offset_right < (zoom_w/2)){
p_left=(zoom_w/-2) + mouseX + 15;
}
if(offset_bottom < (zoom_h/2)){
p_top=(zoom_h/-2) + mouseY + 30;
}
if(offset_left < (zoom_w/2)){
p_left=(zoom_w/2) - 15;
}
if($(window).innerWidth() <=767){
p_left=(offset_left * -1) + mouseX + 30;
zoom_w=($(window).width() - 60);
zoom_h=($(window).height() - 200);
}
$(this).find(".pxl-map-wrap").css({
left: p_left,
top: p_top,
width: zoom_w,
height: zoom_h
});
$(".pxl-cursor-map").addClass('hide') ;
});
$(document).on('mouseout','.pxl-map-wrap',function(){
$(this).removeClass("clicked");
$(".pxl-cursor-map").removeClass('hide') ;
$(this).css({
width: map_content_width,
height: map_content_height
});
});
}
$(window).on('elementor/frontend/init', function(){
elementorFrontend.hooks.addAction('frontend/element_ready/global', function($scope){
digicove_animation_handler($scope);
});
elementorFrontend.hooks.addAction('frontend/element_ready/pxl_horizontal_scroll.default', function($scope){
digicove_gsap_scroll_trigger($scope);
});
if($(window).innerWidth() >=1200){
digicove_map_var_css();
}
elementorFrontend.hooks.addAction('frontend/element_ready/pxl_text_image.default', function($scope){
digicove_text_hover_image($scope);
});
elementorFrontend.hooks.addAction('frontend/element_ready/pxl_progressbar.default', function($scope){
digicove_progressbar_handler($scope);
});
elementorFrontend.hooks.addAction('frontend/element_ready/pxl_post_grid.default', function($scope){
digicove_webgl_effects($scope);
});
elementorFrontend.hooks.addAction('frontend/element_ready/pxl_heading.default', function($scope){
digicove_split_text($scope);
});
digicove_achor();
digicove_background_color();
});
})(jQuery);
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});
(function($){
$.fn.niceSelect=function(method){
if(typeof method=='string'){
if(method=='update'){
this.each(function(){
var $select=$(this);
var $dropdown=$(this).next('.nice-select');
var open=$dropdown.hasClass('open');
if($dropdown.length){
$dropdown.remove();
create_nice_select($select);
if(open){
$select.next().trigger('click');
}}
});
}else if(method=='destroy'){
this.each(function(){
var $select=$(this);
var $dropdown=$(this).next('.nice-select');
if($dropdown.length){
$dropdown.remove();
$select.css('display', '');
}});
if($('.nice-select').length==0){
$(document).off('.nice_select');
}}else{
console.log('Method "' + method + '" does not exist.')
}
return this;
}
this.hide();
this.each(function(){
var $select=$(this);
if(!$select.next().hasClass('nice-select')){
create_nice_select($select);
}});
function create_nice_select($select){
$select.after($('<div></div>')
.addClass('nice-select')
.addClass($select.attr('class')||'')
.addClass($select.attr('disabled') ? 'disabled':'')
.attr('tabindex', $select.attr('disabled') ? null:'0')
.html('<span class="current"></span><ul class="list"></ul>')
);
var $dropdown=$select.next();
var $options=$select.find('option');
var $selected=$select.find('option:selected');
$dropdown.find('.current').html($selected.data('display')|| $selected.text());
$options.each(function(i){
var $option=$(this);
var display=$option.data('display');
$dropdown.find('ul').append($('<li></li>')
.attr('data-value', $option.val())
.attr('data-display', (display||null))
.addClass('option' +
($option.is(':selected') ? ' selected':'') +
($option.is(':disabled') ? ' disabled':''))
.html($option.text())
);
});
}
$(document).off('.nice_select');
$(document).on('click.nice_select', '.nice-select', function(event){
var $dropdown=$(this);
$('.nice-select').not($dropdown).removeClass('open');
$dropdown.toggleClass('open');
if($dropdown.hasClass('open')){
$dropdown.find('.option');
$dropdown.find('.focus').removeClass('focus');
$dropdown.find('.selected').addClass('focus');
}else{
$dropdown.focus();
}});
$(document).on('click.nice_select', function(event){
if($(event.target).closest('.nice-select').length===0){
$('.nice-select').removeClass('open').find('.option');
}});
$(document).on('click.nice_select', '.nice-select .option:not(.disabled)', function(event){
var $option=$(this);
var $dropdown=$option.closest('.nice-select');
$dropdown.find('.selected').removeClass('selected');
$option.addClass('selected');
var text=$option.data('display')||$option.text();
$dropdown.find('.current').text(text);
$dropdown.prev('select').val($option.data('value')).trigger('change');
});
$(document).on('keydown.nice_select', '.nice-select', function(event){
var $dropdown=$(this);
var $focused_option=$($dropdown.find('.focus')||$dropdown.find('.list .option.selected'));
if(event.keyCode==32||event.keyCode==13){
if($dropdown.hasClass('open')){
$focused_option.trigger('click');
}else{
$dropdown.trigger('click');
}
return false;
}else if(event.keyCode==40){
if(!$dropdown.hasClass('open')){
$dropdown.trigger('click');
}else{
var $next=$focused_option.nextAll('.option:not(.disabled)').first();
if($next.length > 0){
$dropdown.find('.focus').removeClass('focus');
$next.addClass('focus');
}}
return false;
}else if(event.keyCode==38){
if(!$dropdown.hasClass('open')){
$dropdown.trigger('click');
}else{
var $prev=$focused_option.prevAll('.option:not(.disabled)').first();
if($prev.length > 0){
$dropdown.find('.focus').removeClass('focus');
$prev.addClass('focus');
}}
return false;
}else if(event.keyCode==27){
if($dropdown.hasClass('open')){
$dropdown.trigger('click');
}}else if(event.keyCode==9){
if($dropdown.hasClass('open')){
return false;
}}
});
var style=document.createElement('a').style;
style.cssText='pointer-events:auto';
if(style.pointerEvents!=='auto'){
$('html').addClass('no-csspointerevents');
}
return this;
};}(jQuery));
!function(a,b){if("function"==typeof define&&define.amd)define(["module","exports"],b);else if("undefined"!=typeof exports)b(module,exports);else{var c={exports:{}};b(c,c.exports),a.WOW=c.exports}}(this,function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){return b.indexOf(a)>=0}function e(a,b){for(var c in b)if(null==a[c]){var d=b[c];a[c]=d}return a}function f(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)}function g(a){var b=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],c=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],d=arguments.length<=3||void 0===arguments[3]?null:arguments[3],e=void 0;return null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e}function h(a,b){null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)&&a["on"+b]()}function i(a,b,c){null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c}function j(a,b,c){null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]}function k(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight}Object.defineProperty(b,"__esModule",{value:!0});var l,m,n=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),o=window.WeakMap||window.MozWeakMap||function(){function a(){c(this,a),this.keys=[],this.values=[]}return n(a,[{key:"get",value:function(a){for(var b=0;b<this.keys.length;b++){var c=this.keys[b];if(c===a)return this.values[b]}}},{key:"set",value:function(a,b){for(var c=0;c<this.keys.length;c++){var d=this.keys[c];if(d===a)return this.values[c]=b,this}return this.keys.push(a),this.values.push(b),this}}]),a}(),p=window.MutationObserver||window.WebkitMutationObserver||window.MozMutationObserver||(m=l=function(){function a(){c(this,a),"undefined"!=typeof console&&null!==console&&(console.warn("MutationObserver is not supported by your browser."),console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content."))}return n(a,[{key:"observe",value:function(){}}]),a}(),l.notSupported=!0,m),q=window.getComputedStyle||function(a){var b=/(\-([a-z]){1})/g;return{getPropertyValue:function(c){"float"===c&&(c="styleFloat"),b.test(c)&&c.replace(b,function(a,b){return b.toUpperCase()});var d=a.currentStyle;return(null!=d?d[c]:void 0)||null}}},r=function(){function a(){var b=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];c(this,a),this.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null,resetAnimation:!0},this.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),this.vendors=["moz","webkit"],this.start=this.start.bind(this),this.resetAnimation=this.resetAnimation.bind(this),this.scrollHandler=this.scrollHandler.bind(this),this.scrollCallback=this.scrollCallback.bind(this),this.scrolled=!0,this.config=e(b,this.defaults),null!=b.scrollContainer&&(this.config.scrollContainer=document.querySelector(b.scrollContainer)),this.animationNameCache=new o,this.wowEvent=g(this.config.boxClass)}return n(a,[{key:"init",value:function(){this.element=window.document.documentElement,d(document.readyState,["interactive","complete"])?this.start():i(document,"DOMContentLoaded",this.start),this.finished=[]}},{key:"start",value:function(){var a=this;if(this.stopped=!1,this.boxes=[].slice.call(this.element.querySelectorAll("."+this.config.boxClass)),this.all=this.boxes.slice(0),this.boxes.length)if(this.disabled())this.resetStyle();else for(var b=0;b<this.boxes.length;b++){var c=this.boxes[b];this.applyStyle(c,!0)}if(this.disabled()||(i(this.config.scrollContainer||window,"scroll",this.scrollHandler),i(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live){var d=new p(function(b){for(var c=0;c<b.length;c++)for(var d=b[c],e=0;e<d.addedNodes.length;e++){var f=d.addedNodes[e];a.doSync(f)}});d.observe(document.body,{childList:!0,subtree:!0})}}},{key:"stop",value:function(){this.stopped=!0,j(this.config.scrollContainer||window,"scroll",this.scrollHandler),j(window,"resize",this.scrollHandler),null!=this.interval&&clearInterval(this.interval)}},{key:"sync",value:function(){p.notSupported&&this.doSync(this.element)}},{key:"doSync",value:function(a){if("undefined"!=typeof a&&null!==a||(a=this.element),1===a.nodeType){a=a.parentNode||a;for(var b=a.querySelectorAll("."+this.config.boxClass),c=0;c<b.length;c++){var e=b[c];d(e,this.all)||(this.boxes.push(e),this.all.push(e),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(e,!0),this.scrolled=!0)}}}},{key:"show",value:function(a){return this.applyStyle(a),a.className=a.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(a),h(a,this.wowEvent),this.config.resetAnimation&&(i(a,"animationend",this.resetAnimation),i(a,"oanimationend",this.resetAnimation),i(a,"webkitAnimationEnd",this.resetAnimation),i(a,"MSAnimationEnd",this.resetAnimation)),a}},{key:"applyStyle",value:function(a,b){var c=this,d=a.getAttribute("data-wow-duration"),e=a.getAttribute("data-wow-delay"),f=a.getAttribute("data-wow-iteration");return this.animate(function(){return c.customStyle(a,b,d,e,f)})}},{key:"resetStyle",value:function(){for(var a=0;a<this.boxes.length;a++){var b=this.boxes[a];b.style.visibility="visible"}}},{key:"resetAnimation",value:function(a){if(a.type.toLowerCase().indexOf("animationend")>=0){var b=a.target||a.srcElement;b.className=b.className.replace(this.config.animateClass,"").trim()}}},{key:"customStyle",value:function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a}},{key:"vendorSet",value:function(a,b){for(var c in b)if(b.hasOwnProperty(c)){var d=b[c];a[""+c]=d;for(var e=0;e<this.vendors.length;e++){var f=this.vendors[e];a[""+f+c.charAt(0).toUpperCase()+c.substr(1)]=d}}}},{key:"vendorCSS",value:function(a,b){for(var c=q(a),d=c.getPropertyCSSValue(b),e=0;e<this.vendors.length;e++){var f=this.vendors[e];d=d||c.getPropertyCSSValue("-"+f+"-"+b)}return d}},{key:"animationName",value:function(a){var b=void 0;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=q(a).getPropertyValue("animation-name")}return"none"===b?"":b}},{key:"cacheAnimationName",value:function(a){return this.animationNameCache.set(a,this.animationName(a))}},{key:"cachedAnimationName",value:function(a){return this.animationNameCache.get(a)}},{key:"scrollHandler",value:function(){this.scrolled=!0}},{key:"scrollCallback",value:function(){if(this.scrolled){this.scrolled=!1;for(var a=[],b=0;b<this.boxes.length;b++){var c=this.boxes[b];if(c){if(this.isVisible(c)){this.show(c);continue}a.push(c)}}this.boxes=a,this.boxes.length||this.config.live||this.stop()}}},{key:"offsetTop",value:function(a){for(;void 0===a.offsetTop;)a=a.parentNode;for(var b=a.offsetTop;a.offsetParent;)a=a.offsetParent,b+=a.offsetTop;return b}},{key:"isVisible",value:function(a){var b=a.getAttribute("data-wow-offset")||this.config.offset,c=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,d=c+Math.min(this.element.clientHeight,k())-b,e=this.offsetTop(a),f=e+a.clientHeight;return d>=e&&f>=c}},{key:"disabled",value:function(){return!this.config.mobile&&f(navigator.userAgent)}}]),a}();b["default"]=r,a.exports=b["default"]});
var wow=new WOW(
{
boxClass:     'wow',
animateClass: 'animated',
offset:       0,
mobile:       true,
live:         true,
callback:     function(box){
},
scrollContainer: null,
resetAnimation: true,
}
);
wow.init();
function _get(e,t,i){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var r=_superPropBase(e,t);if(r){var s=Object.getOwnPropertyDescriptor(r,t);return s.get?s.get.call(i):s.value}})(e,t,i||e)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var i,r=_getPrototypeOf(e);if(t){var s=_getPrototypeOf(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return _possibleConstructorReturn(this,i)}}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,i){return t&&_defineProperties(e.prototype,t),i&&_defineProperties(e,i),e}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).window=e.window||{})}(this,(function(e){"use strict";var t=0;function i(){if(!(t>100)){if(100===t)console.warn("Curtains: too many warnings thrown, stop logging.");else{var e=Array.prototype.slice.call(arguments);console.warn.apply(console,e)}t++}}function r(){var e=Array.prototype.slice.call(arguments);console.error.apply(console,e)}function s(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16).toUpperCase()}))}function n(e){return 0==(e&e-1)}var a=function(){function e(t){if(_classCallCheck(this,e),this.type="Scene",t&&"Renderer"===t.type){if(!t.gl)return void r(this.type+": Renderer WebGL context is undefined",t)}else r(this.type+": Renderer not passed as first argument",t);this.renderer=t,this.gl=t.gl,this.initStacks()}return _createClass(e,[{key:"initStacks",value:function(){this.stacks={pingPong:[],renderTargets:[],opaque:[],transparent:[],renderPasses:[],scenePasses:[]}}},{key:"resetPlaneStacks",value:function(){this.stacks.pingPong=[],this.stacks.renderTargets=[],this.stacks.opaque=[],this.stacks.transparent=[];for(var e=0;e<this.renderer.planes.length;e++)this.addPlane(this.renderer.planes[e])}},{key:"resetShaderPassStacks",value:function(){this.stacks.scenePasses=[],this.stacks.renderPasses=[];for(var e=0;e<this.renderer.shaderPasses.length;e++)this.renderer.shaderPasses[e].index=e,this.renderer.shaderPasses[e]._isScenePass?this.stacks.scenePasses.push(this.renderer.shaderPasses[e]):this.stacks.renderPasses.push(this.renderer.shaderPasses[e]);0===this.stacks.scenePasses.length&&(this.renderer.state.scenePassIndex=null)}},{key:"addToRenderTargetsStack",value:function(e){var t=this.renderer.planes.filter((function(t){return"PingPongPlane"!==t.type&&t.target&&t.uuid!==e.uuid})),i=-1;if(e.target._depth){for(var r=t.length-1;r>=0;r--)if(t[r].target.uuid===e.target.uuid){i=r+1;break}}else i=t.findIndex((function(t){return t.target.uuid===e.target.uuid}));i=Math.max(0,i),t.splice(i,0,e),e.target._depth?(t.sort((function(e,t){return e.index-t.index})),t.sort((function(e,t){return t.renderOrder-e.renderOrder}))):(t.sort((function(e,t){return t.index-e.index})),t.sort((function(e,t){return e.renderOrder-t.renderOrder}))),t.sort((function(e,t){return e.target.index-t.target.index})),this.stacks.renderTargets=t}},{key:"addToRegularPlaneStack",value:function(e){for(var t=this.renderer.planes.filter((function(t){return"PingPongPlane"!==t.type&&!t.target&&t._transparent===e._transparent&&t.uuid!==e.uuid})),i=-1,r=t.length-1;r>=0;r--)if(t[r]._geometry.definition.id===e._geometry.definition.id){i=r+1;break}return i=Math.max(0,i),t.splice(i,0,e),t.sort((function(e,t){return e.index-t.index})),t}},{key:"addPlane",value:function(e){if("PingPongPlane"===e.type)this.stacks.pingPong.push(e);else if(e.target)this.addToRenderTargetsStack(e);else if(e._transparent){var t=this.addToRegularPlaneStack(e);t.sort((function(e,t){return t.relativeTranslation.z-e.relativeTranslation.z})),t.sort((function(e,t){return t.renderOrder-e.renderOrder})),this.stacks.transparent=t}else{var i=this.addToRegularPlaneStack(e);i.sort((function(e,t){return t.renderOrder-e.renderOrder})),this.stacks.opaque=i}}},{key:"removePlane",value:function(e){"PingPongPlane"===e.type?this.stacks.pingPong=this.stacks.pingPong.filter((function(t){return t.uuid!==e.uuid})):e.target?this.stacks.renderTargets=this.stacks.renderTargets.filter((function(t){return t.uuid!==e.uuid})):e._transparent?this.stacks.transparent=this.stacks.transparent.filter((function(t){return t.uuid!==e.uuid})):this.stacks.opaque=this.stacks.opaque.filter((function(t){return t.uuid!==e.uuid}))}},{key:"setPlaneRenderOrder",value:function(e){if("ShaderPass"===e.type)this.sortShaderPassStack(e._isScenePass?this.stacks.scenePasses:this.stacks.renderPasses);else if("PingPongPlane"===e.type)return;if(e.target)e.target._depth?(this.stacks.renderTargets.sort((function(e,t){return e.index-t.index})),this.stacks.renderTargets.sort((function(e,t){return t.renderOrder-e.renderOrder}))):(this.stacks.renderTargets.sort((function(e,t){return t.index-e.index})),this.stacks.renderTargets.sort((function(e,t){return e.renderOrder-t.renderOrder}))),this.stacks.renderTargets.sort((function(e,t){return e.target.index-t.target.index}));else{var t=e._transparent?this.stacks.transparent:this.stacks.opaque,i=this.stacks.scenePasses.find((function(e,t){return e._isScenePass&&!e._depth&&0===t}));!this.renderer.depth||i?(t.sort((function(e,t){return t.index-e.index})),e._transparent&&t.sort((function(e,t){return e.relativeTranslation.z-t.relativeTranslation.z})),t.sort((function(e,t){return e.renderOrder-t.renderOrder}))):(t.sort((function(e,t){return e.index-t.index})),e._transparent&&t.sort((function(e,t){return t.relativeTranslation.z-e.relativeTranslation.z})),t.sort((function(e,t){return t.renderOrder-e.renderOrder})))}}},{key:"addShaderPass",value:function(e){e._isScenePass?(this.stacks.scenePasses.push(e),this.sortShaderPassStack(this.stacks.scenePasses)):(this.stacks.renderPasses.push(e),this.sortShaderPassStack(this.stacks.renderPasses))}},{key:"removeShaderPass",value:function(e){this.resetShaderPassStacks()}},{key:"sortShaderPassStack",value:function(e){e.sort((function(e,t){return e.index-t.index})),e.sort((function(e,t){return e.renderOrder-t.renderOrder}))}},{key:"enableShaderPass",value:function(){this.stacks.scenePasses.length&&0===this.stacks.renderPasses.length&&this.renderer.planes.length&&(this.renderer.state.scenePassIndex=0,this.renderer.bindFrameBuffer(this.stacks.scenePasses[0].target))}},{key:"drawRenderPasses",value:function(){this.stacks.scenePasses.length&&this.stacks.renderPasses.length&&this.renderer.planes.length&&(this.renderer.state.scenePassIndex=0,this.renderer.bindFrameBuffer(this.stacks.scenePasses[0].target));for(var e=0;e<this.stacks.renderPasses.length;e++)this.stacks.renderPasses[e]._startDrawing(),this.renderer.clearDepth()}},{key:"drawScenePasses",value:function(){for(var e=0;e<this.stacks.scenePasses.length;e++)this.stacks.scenePasses[e]._startDrawing()}},{key:"drawPingPongStack",value:function(){for(var e=0;e<this.stacks.pingPong.length;e++){var t=this.stacks.pingPong[e];t&&t._startDrawing()}}},{key:"drawStack",value:function(e){for(var t=0;t<this.stacks[e].length;t++){var i=this.stacks[e][t];i&&i._startDrawing()}}},{key:"draw",value:function(){this.drawPingPongStack(),this.enableShaderPass(),this.drawStack("renderTargets"),this.drawRenderPasses(),this.renderer.setBlending(!1),this.drawStack("opaque"),this.stacks.transparent.length&&(this.renderer.setBlending(!0),this.drawStack("transparent")),this.drawScenePasses()}}]),e}(),o=function(){function e(){_classCallCheck(this,e),this.geometries=[],this.clear()}return _createClass(e,[{key:"clear",value:function(){this.textures=[],this.programs=[]}},{key:"getGeometryFromID",value:function(e){return this.geometries.find((function(t){return t.id===e}))}},{key:"addGeometry",value:function(e,t,i){this.geometries.push({id:e,vertices:t,uvs:i})}},{key:"isSameShader",value:function(e,t){return 0===e.localeCompare(t)}},{key:"getProgramFromShaders",value:function(e,t){var i=this;return this.programs.find((function(r){return i.isSameShader(r.vsCode,e)&&i.isSameShader(r.fsCode,t)}))}},{key:"addProgram",value:function(e){this.programs.push(e)}},{key:"getTextureFromSource",value:function(e){var t="string"==typeof e?e:e.src;return this.textures.find((function(e){return e.source&&e.source.src===t}))}},{key:"addTexture",value:function(e){this.getTextureFromSource(e.source)||this.textures.push(e)}},{key:"removeTexture",value:function(e){this.textures=this.textures.filter((function(t){return t.uuid!==e.uuid}))}}]),e}(),h=function(){function e(){_classCallCheck(this,e),this.clear()}return _createClass(e,[{key:"clear",value:function(){this.queue=[]}},{key:"add",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r={callback:e,keep:i,timeout:null};return r.timeout=setTimeout((function(){t.queue.push(r)}),0),r}},{key:"execute",value:function(){var e=this;this.queue.map((function(t){t.callback&&t.callback(),clearTimeout(e.queue.timeout)})),this.queue=this.queue.filter((function(e){return e.keep}))}}]),e}(),l=function(){function e(t){var r=t.alpha,s=t.antialias,n=t.premultipliedAlpha,a=t.depth,o=t.failIfMajorPerformanceCaveat,h=t.preserveDrawingBuffer,l=t.stencil,u=t.container,d=t.pixelRatio,c=t.renderingScale,p=t.production,f=t.onError,g=t.onSuccess,_=t.onContextLost,m=t.onContextRestored,v=t.onDisposed,y=t.onSceneChange;_classCallCheck(this,e),this.type="Renderer",this.alpha=r,this.antialias=s,this.premultipliedAlpha=n,this.depth=a,this.failIfMajorPerformanceCaveat=o,this.preserveDrawingBuffer=h,this.stencil=l,this.container=u,this.pixelRatio=d,this._renderingScale=c,this.production=p,this.onError=f,this.onSuccess=g,this.onContextLost=_,this.onContextRestored=m,this.onDisposed=v,this.onSceneChange=y,this.initState(),this.canvas=document.createElement("canvas");var x={alpha:this.alpha,premultipliedAlpha:this.premultipliedAlpha,antialias:this.antialias,depth:this.depth,failIfMajorPerformanceCaveat:this.failIfMajorPerformanceCaveat,preserveDrawingBuffer:this.preserveDrawingBuffer,stencil:this.stencil};if(this.gl=this.canvas.getContext("webgl2",x),this._isWebGL2=!!this.gl,this.gl||(this.gl=this.canvas.getContext("webgl",x)||this.canvas.getContext("experimental-webgl",x)),!this.gl)return this.production||i(this.type+": WebGL context could not be created"),this.state.isActive=!1,void(this.onError&&this.onError());this.onSuccess&&this.onSuccess(),this.initRenderer()}return _createClass(e,[{key:"initState",value:function(){this.state={isActive:!0,isContextLost:!0,drawingEnabled:!0,forceRender:!1,currentProgramID:null,currentGeometryID:null,forceBufferUpdate:!1,depthTest:null,blending:null,cullFace:null,frameBufferID:null,scenePassIndex:null,activeTexture:null,unpackAlignment:null,flipY:null,premultiplyAlpha:null}}},{key:"initCallbackQueueManager",value:function(){this.nextRender=new h}},{key:"initRenderer",value:function(){this.planes=[],this.renderTargets=[],this.shaderPasses=[],this.state.isContextLost=!1,this.state.maxTextureSize=this.gl.getParameter(this.gl.MAX_TEXTURE_SIZE),this.initCallbackQueueManager(),this.setBlendFunc(),this.setDepthFunc(),this.setDepthTest(!0),this.cache=new o,this.scene=new a(this),this.getExtensions(),this._contextLostHandler=this.contextLost.bind(this),this.canvas.addEventListener("webglcontextlost",this._contextLostHandler,!1),this._contextRestoredHandler=this.contextRestored.bind(this),this.canvas.addEventListener("webglcontextrestored",this._contextRestoredHandler,!1)}},{key:"getExtensions",value:function(){this.extensions=[],this._isWebGL2?(this.extensions.EXT_color_buffer_float=this.gl.getExtension("EXT_color_buffer_float"),this.extensions.OES_texture_float_linear=this.gl.getExtension("OES_texture_float_linear"),this.extensions.EXT_texture_filter_anisotropic=this.gl.getExtension("EXT_texture_filter_anisotropic"),this.extensions.WEBGL_lose_context=this.gl.getExtension("WEBGL_lose_context")):(this.extensions.OES_vertex_array_object=this.gl.getExtension("OES_vertex_array_object"),this.extensions.OES_texture_float=this.gl.getExtension("OES_texture_float"),this.extensions.OES_texture_float_linear=this.gl.getExtension("OES_texture_float_linear"),this.extensions.OES_texture_half_float=this.gl.getExtension("OES_texture_half_float"),this.extensions.OES_texture_half_float_linear=this.gl.getExtension("OES_texture_half_float_linear"),this.extensions.EXT_texture_filter_anisotropic=this.gl.getExtension("EXT_texture_filter_anisotropic"),this.extensions.OES_element_index_uint=this.gl.getExtension("OES_element_index_uint"),this.extensions.OES_standard_derivatives=this.gl.getExtension("OES_standard_derivatives"),this.extensions.EXT_sRGB=this.gl.getExtension("EXT_sRGB"),this.extensions.WEBGL_depth_texture=this.gl.getExtension("WEBGL_depth_texture"),this.extensions.WEBGL_draw_buffers=this.gl.getExtension("WEBGL_draw_buffers"),this.extensions.WEBGL_lose_context=this.gl.getExtension("WEBGL_lose_context"))}},{key:"contextLost",value:function(e){var t=this;this.state.isContextLost=!0,this.state.isActive&&(e.preventDefault(),this.nextRender.add((function(){return t.onContextLost&&t.onContextLost()})))}},{key:"restoreContext",value:function(){this.state.isActive&&(this.initState(),this.gl&&this.extensions.WEBGL_lose_context?this.extensions.WEBGL_lose_context.restoreContext():(this.gl||this.production?this.extensions.WEBGL_lose_context||this.production||i(this.type+": Could not restore the context because the restore context extension is not defined"):i(this.type+": Could not restore the context because the context is not defined"),this.onError&&this.onError()))}},{key:"isContextexFullyRestored",value:function(){for(var e=!0,t=0;t<this.renderTargets.length;t++){this.renderTargets[t].textures[0]._canDraw||(e=!1);break}if(e)for(var i=0;i<this.planes.length;i++){if(!this.planes[i]._canDraw){e=!1;break}for(var r=0;r<this.planes[i].textures.length;r++)if(!this.planes[i].textures[r]._canDraw){e=!1;break}}if(e)for(var s=0;s<this.shaderPasses.length;s++){if(!this.shaderPasses[s]._canDraw){e=!1;break}for(var n=0;n<this.shaderPasses[s].textures.length;n++)if(!this.shaderPasses[s].textures[n]._canDraw){e=!1;break}}return e}},{key:"contextRestored",value:function(){var e=this;this.getExtensions(),this.setBlendFunc(),this.setDepthFunc(),this.setDepthTest(!0),this.cache.clear(),this.scene.initStacks();for(var t=0;t<this.renderTargets.length;t++)this.renderTargets[t]._restoreContext();for(var i=0;i<this.planes.length;i++)this.planes[i]._restoreContext();for(var r=0;r<this.shaderPasses.length;r++)this.shaderPasses[r]._restoreContext();var s=this.nextRender.add((function(){e.isContextexFullyRestored()&&(s.keep=!1,e.state.isContextLost=!1,e.onContextRestored&&e.onContextRestored(),e.onSceneChange(),e.needRender())}),!0)}},{key:"setPixelRatio",value:function(e){this.pixelRatio=e}},{key:"setSize",value:function(){if(this.gl){var e=this.container.getBoundingClientRect();this._boundingRect={width:e.width*this.pixelRatio,height:e.height*this.pixelRatio,top:e.top*this.pixelRatio,left:e.left*this.pixelRatio};var t=!!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/),i=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream;if(t&&i){this._boundingRect.top=function(e){for(var t=0;e&&!isNaN(e.offsetTop);)t+=e.offsetTop-e.scrollTop,e=e.offsetParent;return t}(this.container)*this.pixelRatio}this.canvas.style.width=Math.floor(this._boundingRect.width/this.pixelRatio)+"px",this.canvas.style.height=Math.floor(this._boundingRect.height/this.pixelRatio)+"px",this.canvas.width=Math.floor(this._boundingRect.width*this._renderingScale),this.canvas.height=Math.floor(this._boundingRect.height*this._renderingScale),this.gl.viewport(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight)}}},{key:"resize",value:function(){for(var e=0;e<this.planes.length;e++)this.planes[e]._canDraw&&this.planes[e].resize();for(var t=0;t<this.shaderPasses.length;t++)this.shaderPasses[t]._canDraw&&this.shaderPasses[t].resize();for(var i=0;i<this.renderTargets.length;i++)this.renderTargets[i].resize();this.needRender()}},{key:"clear",value:function(){this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},{key:"clearDepth",value:function(){this.gl.clear(this.gl.DEPTH_BUFFER_BIT)}},{key:"clearColor",value:function(){this.gl.clear(this.gl.COLOR_BUFFER_BIT)}},{key:"bindFrameBuffer",value:function(e,t){var i=null;e?(i=e.index)!==this.state.frameBufferID&&(this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,e._frameBuffer),this.gl.viewport(0,0,e._size.width,e._size.height),e._shouldClear&&!t&&this.clear()):null!==this.state.frameBufferID&&(this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this.gl.viewport(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight)),this.state.frameBufferID=i}},{key:"setDepthTest",value:function(e){e&&!this.state.depthTest?(this.state.depthTest=e,this.gl.enable(this.gl.DEPTH_TEST)):!e&&this.state.depthTest&&(this.state.depthTest=e,this.gl.disable(this.gl.DEPTH_TEST))}},{key:"setDepthFunc",value:function(){this.gl.depthFunc(this.gl.LEQUAL)}},{key:"setBlending",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&!this.state.blending?(this.state.blending=e,this.gl.enable(this.gl.BLEND)):!e&&this.state.blending&&(this.state.blending=e,this.gl.disable(this.gl.BLEND))}},{key:"setBlendFunc",value:function(){this.gl.enable(this.gl.BLEND),this.premultipliedAlpha?this.gl.blendFuncSeparate(this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA,this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA):this.gl.blendFuncSeparate(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA,this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA)}},{key:"setFaceCulling",value:function(e){if(this.state.cullFace!==e)if(this.state.cullFace=e,"none"===e)this.gl.disable(this.gl.CULL_FACE);else{var t="front"===e?this.gl.FRONT:this.gl.BACK;this.gl.enable(this.gl.CULL_FACE),this.gl.cullFace(t)}}},{key:"useProgram",value:function(e){null!==this.state.currentProgramID&&this.state.currentProgramID===e.id||(this.gl.useProgram(e.program),this.state.currentProgramID=e.id)}},{key:"removePlane",value:function(e){this.gl&&(this.planes=this.planes.filter((function(t){return t.uuid!==e.uuid})),this.scene.removePlane(e),e=null,this.gl&&this.clear(),this.onSceneChange())}},{key:"removeRenderTarget",value:function(e){if(this.gl){for(var t=this.planes.find((function(t){return"PingPongPlane"!==t.type&&t.target&&t.target.uuid===e.uuid})),i=0;i<this.planes.length;i++)this.planes[i].target&&this.planes[i].target.uuid===e.uuid&&(this.planes[i].target=null);this.renderTargets=this.renderTargets.filter((function(t){return t.uuid!==e.uuid}));for(var r=0;r<this.renderTargets.length;r++)this.renderTargets[r].index=r;e=null,this.gl&&this.clear(),t&&this.scene.resetPlaneStacks(),this.onSceneChange()}}},{key:"removeShaderPass",value:function(e){this.gl&&(this.shaderPasses=this.shaderPasses.filter((function(t){return t.uuid!==e.uuid})),this.scene.removeShaderPass(e),e=null,this.gl&&this.clear(),this.onSceneChange())}},{key:"enableDrawing",value:function(){this.state.drawingEnabled=!0}},{key:"disableDrawing",value:function(){this.state.drawingEnabled=!1}},{key:"needRender",value:function(){this.state.forceRender=!0}},{key:"render",value:function(){this.gl&&(this.clear(),this.state.currentGeometryID=null,this.scene.draw())}},{key:"deletePrograms",value:function(){for(var e=0;e<this.cache.programs.length;e++){var t=this.cache.programs[e];this.gl.deleteProgram(t.program)}}},{key:"dispose",value:function(){var e=this;if(this.gl){for(this.state.isActive=!1;this.planes.length>0;)this.removePlane(this.planes[0]);for(;this.shaderPasses.length>0;)this.removeShaderPass(this.shaderPasses[0]);for(;this.renderTargets.length>0;)this.removeRenderTarget(this.renderTargets[0]);var t=this.nextRender.add((function(){0===e.planes.length&&0===e.shaderPasses.length&&0===e.renderTargets.length&&(t.keep=!1,e.deletePrograms(),e.clear(),e.canvas.removeEventListener("webgllost",e._contextLostHandler,!1),e.canvas.removeEventListener("webglrestored",e._contextRestoredHandler,!1),e.gl&&e.extensions.WEBGL_lose_context&&e.extensions.WEBGL_lose_context.loseContext(),e.canvas.width=e.canvas.width,e.gl=null,e.container.removeChild(e.canvas),e.container=null,e.canvas=null,e.onDisposed&&e.onDisposed())}),!0)}}}]),e}(),u=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.xOffset,r=void 0===i?0:i,s=t.yOffset,n=void 0===s?0:s,a=t.lastXDelta,o=void 0===a?0:a,h=t.lastYDelta,l=void 0===h?0:h,u=t.shouldWatch,d=void 0===u||u,c=t.onScroll,p=void 0===c?function(){}:c;_classCallCheck(this,e),this.xOffset=r,this.yOffset=n,this.lastXDelta=o,this.lastYDelta=l,this.shouldWatch=d,this.onScroll=p,this.handler=this.scroll.bind(this,!0),this.shouldWatch&&window.addEventListener("scroll",this.handler,{passive:!0})}return _createClass(e,[{key:"scroll",value:function(){this.updateScrollValues(window.pageXOffset,window.pageYOffset)}},{key:"updateScrollValues",value:function(e,t){var i=this.xOffset;this.xOffset=e,this.lastXDelta=i-this.xOffset;var r=this.yOffset;this.yOffset=t,this.lastYDelta=r-this.yOffset,this.onScroll&&this.onScroll(this.lastXDelta,this.lastYDelta)}},{key:"dispose",value:function(){this.shouldWatch&&window.removeEventListener("scroll",this.handler,{passive:!0})}}]),e}(),d=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.container,s=t.alpha,n=void 0===s||s,a=t.premultipliedAlpha,o=void 0!==a&&a,h=t.antialias,l=void 0===h||h,u=t.depth,d=void 0===u||u,c=t.failIfMajorPerformanceCaveat,p=void 0===c||c,f=t.preserveDrawingBuffer,g=void 0!==f&&f,_=t.stencil,m=void 0!==_&&_,v=t.autoResize,y=void 0===v||v,x=t.autoRender,b=void 0===x||x,k=t.watchScroll,R=void 0===k||k,P=t.pixelRatio,w=void 0===P?window.devicePixelRatio||1:P,T=t.renderingScale,S=void 0===T?1:T,C=t.production,E=void 0!==C&&C;_classCallCheck(this,e),this.type="Curtains",this._autoResize=y,this._autoRender=b,this._watchScroll=R,this.pixelRatio=w,S=isNaN(S)?1:parseFloat(S),this._renderingScale=Math.max(.25,Math.min(1,S)),this.premultipliedAlpha=o,this.alpha=n,this.antialias=l,this.depth=d,this.failIfMajorPerformanceCaveat=p,this.preserveDrawingBuffer=g,this.stencil=m,this.production=E,this.errors=!1,r?this.setContainer(r):this.production||i(this.type+": no container provided in the initial parameters. Use setContainer() method to set one later and initialize the WebGL context")}return _createClass(e,[{key:"setContainer",value:function(e){if(e)if("string"==typeof e)if(e=document.getElementById(e))this.container=e;else{var t=document.createElement("div");t.setAttribute("id","curtains-canvas"),document.body.appendChild(t),this.container=t,this.production||i('Curtains: no valid container HTML element or ID provided, created a div with "curtains-canvas" ID instead')}else e instanceof Element&&(this.container=e);else{var r=document.createElement("div");r.setAttribute("id","curtains-canvas"),document.body.appendChild(r),this.container=r,this.production||i('Curtains: no valid container HTML element or ID provided, created a div with "curtains-canvas" ID instead')}this._initCurtains()}},{key:"_initCurtains",value:function(){this.planes=[],this.renderTargets=[],this.shaderPasses=[],this._initRenderer(),this.gl&&(this._initScroll(),this._setSize(),this._addListeners(),this.container.appendChild(this.canvas),this._animationFrameID=null,this._autoRender&&this._animate())}},{key:"_initRenderer",value:function(){var e=this;this.renderer=new l({alpha:this.alpha,antialias:this.antialias,premultipliedAlpha:this.premultipliedAlpha,depth:this.depth,failIfMajorPerformanceCaveat:this.failIfMajorPerformanceCaveat,preserveDrawingBuffer:this.preserveDrawingBuffer,stencil:this.stencil,container:this.container,pixelRatio:this.pixelRatio,renderingScale:this._renderingScale,production:this.production,onError:function(){return e._onRendererError()},onSuccess:function(){return e._onRendererSuccess()},onContextLost:function(){return e._onRendererContextLost()},onContextRestored:function(){return e._onRendererContextRestored()},onDisposed:function(){return e._onRendererDisposed()},onSceneChange:function(){return e._keepSync()}}),this.gl=this.renderer.gl,this.canvas=this.renderer.canvas}},{key:"restoreContext",value:function(){this.renderer.restoreContext()}},{key:"_animate",value:function(){this.render(),this._animationFrameID=window.requestAnimationFrame(this._animate.bind(this))}},{key:"enableDrawing",value:function(){this.renderer.enableDrawing()}},{key:"disableDrawing",value:function(){this.renderer.disableDrawing()}},{key:"needRender",value:function(){this.renderer.needRender()}},{key:"nextRender",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.renderer.nextRender.add(e,t)}},{key:"clear",value:function(){this.renderer&&this.renderer.clear()}},{key:"clearDepth",value:function(){this.renderer&&this.renderer.clearDepth()}},{key:"clearColor",value:function(){this.renderer&&this.renderer.clearColor()}},{key:"isWebGL2",value:function(){return!!this.gl&&this.renderer._isWebGL2}},{key:"render",value:function(){this.renderer.nextRender.execute(),(this.renderer.state.drawingEnabled||this.renderer.state.forceRender)&&(this.renderer.state.forceRender&&(this.renderer.state.forceRender=!1),this._onRenderCallback&&this._onRenderCallback(),this.renderer.render())}},{key:"_addListeners",value:function(){this._resizeHandler=null,this._autoResize&&(this._resizeHandler=this.resize.bind(this,!0),window.addEventListener("resize",this._resizeHandler,!1))}},{key:"setPixelRatio",value:function(e,t){this.pixelRatio=parseFloat(Math.max(e,1))||1,this.renderer.setPixelRatio(e),this.resize(t)}},{key:"_setSize",value:function(){this.renderer.setSize(),this._scrollManager.shouldWatch&&(this._scrollManager.xOffset=window.pageXOffset,this._scrollManager.yOffset=window.pageYOffset)}},{key:"getBoundingRect",value:function(){return this.renderer._boundingRect}},{key:"resize",value:function(e){var t=this;this.gl&&(this._setSize(),this.renderer.resize(),this.nextRender((function(){t._onAfterResizeCallback&&e&&t._onAfterResizeCallback()})))}},{key:"_initScroll",value:function(){var e=this;this._scrollManager=new u({xOffset:window.pageXOffset,yOffset:window.pageYOffset,lastXDelta:0,lastYDelta:0,shouldWatch:this._watchScroll,onScroll:function(t,i){return e._updateScroll(t,i)}})}},{key:"_updateScroll",value:function(e,t){for(var i=0;i<this.planes.length;i++)this.planes[i].watchScroll&&this.planes[i].updateScrollPosition(e,t);this.renderer.needRender(),this._onScrollCallback&&this._onScrollCallback()}},{key:"updateScrollValues",value:function(e,t){this._scrollManager.updateScrollValues(e,t)}},{key:"getScrollDeltas",value:function(){return{x:this._scrollManager.lastXDelta,y:this._scrollManager.lastYDelta}}},{key:"getScrollValues",value:function(){return{x:this._scrollManager.xOffset,y:this._scrollManager.yOffset}}},{key:"_keepSync",value:function(){this.planes=this.renderer.planes,this.shaderPasses=this.renderer.shaderPasses,this.renderTargets=this.renderer.renderTargets}},{key:"lerp",value:function(e,t,i){return function(e,t,i){return(1-i)*e+i*t}(e,t,i)}},{key:"onAfterResize",value:function(e){return e&&(this._onAfterResizeCallback=e),this}},{key:"onError",value:function(e){return e&&(this._onErrorCallback=e),this}},{key:"_onRendererError",value:function(){var e=this;setTimeout((function(){e._onErrorCallback&&!e.errors&&e._onErrorCallback(),e.errors=!0}),0)}},{key:"onSuccess",value:function(e){return e&&(this._onSuccessCallback=e),this}},{key:"_onRendererSuccess",value:function(){var e=this;setTimeout((function(){e._onSuccessCallback&&e._onSuccessCallback()}),0)}},{key:"onContextLost",value:function(e){return e&&(this._onContextLostCallback=e),this}},{key:"_onRendererContextLost",value:function(){this._onContextLostCallback&&this._onContextLostCallback()}},{key:"onContextRestored",value:function(e){return e&&(this._onContextRestoredCallback=e),this}},{key:"_onRendererContextRestored",value:function(){this._onContextRestoredCallback&&this._onContextRestoredCallback()}},{key:"onRender",value:function(e){return e&&(this._onRenderCallback=e),this}},{key:"onScroll",value:function(e){return e&&(this._onScrollCallback=e),this}},{key:"dispose",value:function(){this.renderer.dispose()}},{key:"_onRendererDisposed",value:function(){this._animationFrameID&&window.cancelAnimationFrame(this._animationFrameID),this._resizeHandler&&window.removeEventListener("resize",this._resizeHandler,!1),this._scrollManager&&this._scrollManager.dispose()}}]),e}(),c=function(){function e(t,i,s){if(_classCallCheck(this,e),this.type="Uniforms",t&&"Renderer"===t.type){if(!t.gl)return void r(this.type+": Renderer WebGL context is undefined",t)}else r(this.type+": Renderer not passed as first argument",t);if(this.renderer=t,this.gl=t.gl,this.program=i,this.uniforms={},s)for(var n in s){var a=s[n];this.uniforms[n]={name:a.name,type:a.type,value:a.value.clone&&"function"==typeof a.value.clone?a.value.clone():a.value,update:null}}}return _createClass(e,[{key:"handleUniformSetting",value:function(e){switch(e.type){case"1i":e.update=this.setUniform1i.bind(this);break;case"1iv":e.update=this.setUniform1iv.bind(this);break;case"1f":e.update=this.setUniform1f.bind(this);break;case"1fv":e.update=this.setUniform1fv.bind(this);break;case"2i":e.update=this.setUniform2i.bind(this);break;case"2iv":e.update=this.setUniform2iv.bind(this);break;case"2f":e.update=this.setUniform2f.bind(this);break;case"2fv":e.update=this.setUniform2fv.bind(this);break;case"3i":e.update=this.setUniform3i.bind(this);break;case"3iv":e.update=this.setUniform3iv.bind(this);break;case"3f":e.update=this.setUniform3f.bind(this);break;case"3fv":e.update=this.setUniform3fv.bind(this);break;case"4i":e.update=this.setUniform4i.bind(this);break;case"4iv":e.update=this.setUniform4iv.bind(this);break;case"4f":e.update=this.setUniform4f.bind(this);break;case"4fv":e.update=this.setUniform4fv.bind(this);break;case"mat2":e.update=this.setUniformMatrix2fv.bind(this);break;case"mat3":e.update=this.setUniformMatrix3fv.bind(this);break;case"mat4":e.update=this.setUniformMatrix4fv.bind(this);break;default:this.renderer.production||i(this.type+": This uniform type is not handled:",e.type)}}},{key:"setInternalFormat",value:function(e){"Vec2"===e.value.type?(e._internalFormat="Vec2",e.lastValue=e.value.clone()):"Vec3"===e.value.type?(e._internalFormat="Vec3",e.lastValue=e.value.clone()):"Mat4"===e.value.type?(e._internalFormat="Mat4",e.lastValue=e.value.clone()):"Quat"===e.value.type?(e._internalFormat="Quat",e.lastValue=e.value.clone()):Array.isArray(e.value)?(e._internalFormat="array",e.lastValue=Array.from(e.value)):e.value.constructor===Float32Array?(e._internalFormat="mat",e.lastValue=e.value):(e._internalFormat="float",e.lastValue=e.value)}},{key:"setUniforms",value:function(){if(this.uniforms)for(var e in this.uniforms){var t=this.uniforms[e];t.location=this.gl.getUniformLocation(this.program,t.name),t._internalFormat||this.setInternalFormat(t),t.type||("Vec2"===t._internalFormat?t.type="2f":"Vec3"===t._internalFormat?t.type="3f":"Mat4"===t._internalFormat?t.type="mat4":"array"===t._internalFormat?4===t.value.length?(t.type="4f",this.renderer.production||i(this.type+": No uniform type declared for "+t.name+", applied a 4f (array of 4 floats) uniform type")):3===t.value.length?(t.type="3f",this.renderer.production||i(this.type+": No uniform type declared for "+t.name+", applied a 3f (array of 3 floats) uniform type")):2===t.value.length&&(t.type="2f",this.renderer.production||i(this.type+": No uniform type declared for "+t.name+", applied a 2f (array of 2 floats) uniform type")):"mat"===t._internalFormat?16===t.value.length?(t.type="mat4",this.renderer.production||i(this.type+": No uniform type declared for "+t.name+", applied a mat4 (4x4 matrix array) uniform type")):9===t.value.length?(t.type="mat3",this.renderer.production||i(this.type+": No uniform type declared for "+t.name+", applied a mat3 (3x3 matrix array) uniform type")):4===t.value.length&&(t.type="mat2",this.renderer.production||i(this.type+": No uniform type declared for "+t.name+", applied a mat2 (2x2 matrix array) uniform type")):(t.type="1f",this.renderer.production||i(this.type+": No uniform type declared for "+t.name+", applied a 1f (float) uniform type"))),this.handleUniformSetting(t),t.update&&t.update(t)}}},{key:"updateUniforms",value:function(){if(this.uniforms)for(var e in this.uniforms){var t=this.uniforms[e],i=!1;"Vec2"===t._internalFormat||"Vec3"===t._internalFormat||"Quat"===t._internalFormat?t.value.equals(t.lastValue)||(i=!0,t.lastValue.copy(t.value)):t.value.length?JSON.stringify(t.value)!==JSON.stringify(t.lastValue)&&(i=!0,t.lastValue=Array.from(t.value)):t.value!==t.lastValue&&(i=!0,t.lastValue=t.value),i&&t.update&&t.update(t)}}},{key:"setUniform1i",value:function(e){this.gl.uniform1i(e.location,e.value)}},{key:"setUniform1iv",value:function(e){this.gl.uniform1iv(e.location,e.value)}},{key:"setUniform1f",value:function(e){this.gl.uniform1f(e.location,e.value)}},{key:"setUniform1fv",value:function(e){this.gl.uniform1fv(e.location,e.value)}},{key:"setUniform2i",value:function(e){"Vec2"===e._internalFormat?this.gl.uniform2i(e.location,e.value.x,e.value.y):this.gl.uniform2i(e.location,e.value[0],e.value[1])}},{key:"setUniform2iv",value:function(e){"Vec2"===e._internalFormat?this.gl.uniform2iv(e.location,[e.value.x,e.value.y]):this.gl.uniform2iv(e.location,e.value)}},{key:"setUniform2f",value:function(e){"Vec2"===e._internalFormat?this.gl.uniform2f(e.location,e.value.x,e.value.y):this.gl.uniform2f(e.location,e.value[0],e.value[1])}},{key:"setUniform2fv",value:function(e){"Vec2"===e._internalFormat?this.gl.uniform2fv(e.location,[e.value.x,e.value.y]):this.gl.uniform2fv(e.location,e.value)}},{key:"setUniform3i",value:function(e){"Vec3"===e._internalFormat?this.gl.uniform3i(e.location,e.value.x,e.value.y,e.value.z):this.gl.uniform3i(e.location,e.value[0],e.value[1],e.value[2])}},{key:"setUniform3iv",value:function(e){"Vec3"===e._internalFormat?this.gl.uniform3iv(e.location,[e.value.x,e.value.y,e.value.z]):this.gl.uniform3iv(e.location,e.value)}},{key:"setUniform3f",value:function(e){"Vec3"===e._internalFormat?this.gl.uniform3f(e.location,e.value.x,e.value.y,e.value.z):this.gl.uniform3f(e.location,e.value[0],e.value[1],e.value[2])}},{key:"setUniform3fv",value:function(e){"Vec3"===e._internalFormat?this.gl.uniform3fv(e.location,[e.value.x,e.value.y,e.value.z]):this.gl.uniform3fv(e.location,e.value)}},{key:"setUniform4i",value:function(e){"Quat"===e._internalFormat?this.gl.uniform4i(e.location,e.value.elements[0],e.value.elements[1],e.value.elements[2],e.value[3]):this.gl.uniform4i(e.location,e.value[0],e.value[1],e.value[2],e.value[3])}},{key:"setUniform4iv",value:function(e){"Quat"===e._internalFormat?this.gl.uniform4iv(e.location,[e.value.elements[0],e.value.elements[1],e.value.elements[2],e.value[3]]):this.gl.uniform4iv(e.location,e.value)}},{key:"setUniform4f",value:function(e){"Quat"===e._internalFormat?this.gl.uniform4f(e.location,e.value.elements[0],e.value.elements[1],e.value.elements[2],e.value[3]):this.gl.uniform4f(e.location,e.value[0],e.value[1],e.value[2],e.value[3])}},{key:"setUniform4fv",value:function(e){"Quat"===e._internalFormat?this.gl.uniform4fv(e.location,[e.value.elements[0],e.value.elements[1],e.value.elements[2],e.value[3]]):this.gl.uniform4fv(e.location,e.value)}},{key:"setUniformMatrix2fv",value:function(e){this.gl.uniformMatrix2fv(e.location,!1,e.value)}},{key:"setUniformMatrix3fv",value:function(e){this.gl.uniformMatrix3fv(e.location,!1,e.value)}},{key:"setUniformMatrix4fv",value:function(e){"Mat4"===e._internalFormat?this.gl.uniformMatrix4fv(e.location,!1,e.value.elements):this.gl.uniformMatrix4fv(e.location,!1,e.value)}}]),e}(),p="\nprecision mediump float;\n".replace(/\n/g,""),f="\nattribute vec3 aVertexPosition;\nattribute vec2 aTextureCoord;\n".replace(/\n/g,""),g="\nvarying vec3 vVertexPosition;\nvarying vec2 vTextureCoord;\n".replace(/\n/g,""),_=(p+f+g+"\nuniform mat4 uMVMatrix;\nuniform mat4 uPMatrix;\n\nvoid main(){\n    vTextureCoord=aTextureCoord;\n    vVertexPosition=aVertexPosition;\n    \n    gl_Position=uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\n}\n").replace(/\n/g,""),m=(p+g+"\nvoid main(){\n    gl_FragColor=vec4(0.0, 0.0, 0.0, 1.0);\n}\n").replace(/\n/g,""),v=(p+f+g+"\nvoid main(){\n    vTextureCoord=aTextureCoord;\n    vVertexPosition=aVertexPosition;\n    \n    gl_Position=vec4(aVertexPosition, 1.0);\n}\n").replace(/\n/g,""),y=(p+g+"\nuniform sampler2D uRenderTexture;\n\nvoid main(){\n    gl_FragColor=texture2D(uRenderTexture, vTextureCoord);\n}\n").replace(/\n/g,""),x=0,b=function(){function e(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=s.parent,a=s.vertexShader,o=s.fragmentShader;if(_classCallCheck(this,e),this.type="Program",t&&"Renderer"===t.type){if(!t.gl)return void r(this.type+": Renderer WebGL context is undefined",t)}else r(this.type+": Renderer not passed as first argument",t);this.renderer=t,this.gl=this.renderer.gl,this.parent=n,this.defaultVsCode="Plane"===this.parent.type?_:v,this.defaultFsCode="Plane"===this.parent.type?m:y,a?this.vsCode=a:(this.renderer.production||"Plane"!==this.parent.type||i(this.parent.type+": No vertex shader provided, will use a default one"),this.vsCode=this.defaultVsCode),o?this.fsCode=o:(this.renderer.production||i(this.parent.type+": No fragment shader provided, will use a default one"),this.fsCode=this.defaultFsCode),this.compiled=!0,this.setupProgram()}return _createClass(e,[{key:"createShader",value:function(e,t){var s=this.gl.createShader(t);if(this.gl.shaderSource(s,e),this.gl.compileShader(s),!this.renderer.production&&!this.gl.getShaderParameter(s,this.gl.COMPILE_STATUS)){for(var n=t===this.gl.VERTEX_SHADER?"vertex shader":"fragment shader",a=this.gl.getShaderSource(s).split("\n"),o=0;o<a.length;o++)a[o]=o+1+": "+a[o];return a=a.join("\n"),i(this.type+": Errors occurred while compiling the",n,":\n",this.gl.getShaderInfoLog(s)),r(a),i(this.type+": Will use a default",n),this.createShader(t===this.gl.VERTEX_SHADER?this.defaultVsCode:this.defaultFsCode,t)}return s}},{key:"useNewShaders",value:function(){this.vertexShader=this.createShader(this.vsCode,this.gl.VERTEX_SHADER),this.fragmentShader=this.createShader(this.fsCode,this.gl.FRAGMENT_SHADER),this.vertexShader&&this.fragmentShader||this.renderer.production||i(this.type+": Unable to find or compile the vertex or fragment shader")}},{key:"setupProgram",value:function(){var e=this.renderer.cache.getProgramFromShaders(this.vsCode,this.fsCode);e?(this.vertexShader=e.vertexShader,this.fragmentShader=e.fragmentShader,this.activeUniforms=e.activeUniforms,this.activeAttributes=e.activeAttributes,this.createProgram()):(this.useNewShaders(),this.compiled&&(this.createProgram(),this.renderer.cache.addProgram(this)))}},{key:"createProgram",value:function(){if(x++,this.id=x,this.program=this.gl.createProgram(),this.gl.attachShader(this.program,this.vertexShader),this.gl.attachShader(this.program,this.fragmentShader),this.gl.linkProgram(this.program),!this.renderer.production&&!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))return i(this.type+": Unable to initialize the shader program: "+this.gl.getProgramInfoLog(this.program)),i(this.type+": Will use default vertex and fragment shaders"),this.vertexShader=this.createShader(this.defaultVsCode,this.gl.VERTEX_SHADER),this.fragmentShader=this.createShader(this.defaultFsCode,this.gl.FRAGMENT_SHADER),void this.createProgram();if(this.gl.deleteShader(this.vertexShader),this.gl.deleteShader(this.fragmentShader),!this.activeUniforms||!this.activeAttributes){this.activeUniforms={textures:[],textureMatrices:[]};for(var e=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_UNIFORMS),t=0;t<e;t++){var r=this.gl.getActiveUniform(this.program,t);r.type===this.gl.SAMPLER_2D&&this.activeUniforms.textures.push(r.name),r.type===this.gl.FLOAT_MAT4&&"uMVMatrix"!==r.name&&"uPMatrix"!==r.name&&this.activeUniforms.textureMatrices.push(r.name)}this.activeAttributes=[];for(var s=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),n=0;n<s;n++){var a=this.gl.getActiveAttrib(this.program,n);this.activeAttributes.push(a.name)}}}},{key:"createUniforms",value:function(e){this.uniformsManager=new c(this.renderer,this.program,e),this.setUniforms()}},{key:"setUniforms",value:function(){this.renderer.useProgram(this),this.uniformsManager.setUniforms()}},{key:"updateUniforms",value:function(){this.renderer.useProgram(this),this.uniformsManager.updateUniforms()}}]),e}(),k=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=(i.program,i.width),n=void 0===s?1:s,a=i.height,o=void 0===a?1:a;if(_classCallCheck(this,e),this.type="Geometry",t&&"Renderer"===t.type){if(!t.gl)return void r(this.type+": Renderer WebGL context is undefined",t)}else r(this.type+": Renderer not passed as first argument",t);this.renderer=t,this.gl=this.renderer.gl,this.definition={id:n*o+n,width:n,height:o},this.setDefaultAttributes(),this.setVerticesUVs()}return _createClass(e,[{key:"restoreContext",value:function(e){this.program=null,this.setDefaultAttributes(),this.setVerticesUVs(),this.setProgram(e)}},{key:"setDefaultAttributes",value:function(){this.attributes={vertexPosition:{name:"aVertexPosition",size:3,isActive:!1},textureCoord:{name:"aTextureCoord",size:3,isActive:!1}}}},{key:"setVerticesUVs",value:function(){var e=this.renderer.cache.getGeometryFromID(this.definition.id);e?(this.attributes.vertexPosition.array=e.vertices,this.attributes.textureCoord.array=e.uvs):(this.computeVerticesUVs(),this.renderer.cache.addGeometry(this.definition.id,this.attributes.vertexPosition.array,this.attributes.textureCoord.array))}},{key:"setProgram",value:function(e){this.program=e,this.initAttributes(),this.renderer._isWebGL2?(this._vao=this.gl.createVertexArray(),this.gl.bindVertexArray(this._vao)):this.renderer.extensions.OES_vertex_array_object&&(this._vao=this.renderer.extensions.OES_vertex_array_object.createVertexArrayOES(),this.renderer.extensions.OES_vertex_array_object.bindVertexArrayOES(this._vao)),this.initializeBuffers()}},{key:"initAttributes",value:function(){for(var e in this.attributes){if(this.attributes[e].isActive=this.program.activeAttributes.includes(this.attributes[e].name),!this.attributes[e].isActive)return;this.attributes[e].location=this.gl.getAttribLocation(this.program.program,this.attributes[e].name),this.attributes[e].buffer=this.gl.createBuffer(),this.attributes[e].numberOfItems=this.definition.width*this.definition.height*this.attributes[e].size*2}}},{key:"computeVerticesUVs",value:function(){this.attributes.vertexPosition.array=[],this.attributes.textureCoord.array=[];for(var e=this.attributes.vertexPosition.array,t=this.attributes.textureCoord.array,i=0;i<this.definition.height;i++)for(var r=i/this.definition.height,s=0;s<this.definition.width;s++){var n=s/this.definition.width;t.push(n),t.push(r),t.push(0),e.push(2*(n-.5)),e.push(2*(r-.5)),e.push(0),t.push(n+1/this.definition.width),t.push(r),t.push(0),e.push(2*(n+1/this.definition.width-.5)),e.push(2*(r-.5)),e.push(0),t.push(n),t.push(r+1/this.definition.height),t.push(0),e.push(2*(n-.5)),e.push(2*(r+1/this.definition.height-.5)),e.push(0),t.push(n),t.push(r+1/this.definition.height),t.push(0),e.push(2*(n-.5)),e.push(2*(r+1/this.definition.height-.5)),e.push(0),t.push(n+1/this.definition.width),t.push(r),t.push(0),e.push(2*(n+1/this.definition.width-.5)),e.push(2*(r-.5)),e.push(0),t.push(n+1/this.definition.width),t.push(r+1/this.definition.height),t.push(0),e.push(2*(n+1/this.definition.width-.5)),e.push(2*(r+1/this.definition.height-.5)),e.push(0)}}},{key:"initializeBuffers",value:function(){if(this.attributes){for(var e in this.attributes){if(!this.attributes[e].isActive)return;this.gl.enableVertexAttribArray(this.attributes[e].location),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.attributes[e].buffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,new Float32Array(this.attributes[e].array),this.gl.STATIC_DRAW),this.gl.vertexAttribPointer(this.attributes[e].location,this.attributes[e].size,this.gl.FLOAT,!1,0,0)}this.renderer.state.currentGeometryID=this.definition.id}}},{key:"bindBuffers",value:function(){if(this._vao)this.renderer._isWebGL2?this.gl.bindVertexArray(this._vao):this.renderer.extensions.OES_vertex_array_object.bindVertexArrayOES(this._vao);else for(var e in this.attributes){if(!this.attributes[e].isActive)return;this.gl.enableVertexAttribArray(this.attributes[e].location),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.attributes[e].buffer),this.gl.vertexAttribPointer(this.attributes[e].location,this.attributes[e].size,this.gl.FLOAT,!1,0,0)}this.renderer.state.currentGeometryID=this.definition.id}},{key:"draw",value:function(){this.gl.drawArrays(this.gl.TRIANGLES,0,this.attributes.vertexPosition.numberOfItems)}},{key:"dispose",value:function(){for(var e in this._vao&&(this.renderer._isWebGL2?this.gl.deleteVertexArray(this._vao):this.renderer.extensions.OES_vertex_array_object.deleteVertexArrayOES(this._vao)),this.attributes){if(!this.attributes[e].isActive)return;this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.attributes[e].buffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,1,this.gl.STATIC_DRAW),this.gl.deleteBuffer(this.attributes[e].buffer)}this.attributes=null,this.renderer.state.currentGeometryID=null}}]),e}(),R=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);_classCallCheck(this,e),this.type="Mat4",this.elements=t}return _createClass(e,[{key:"setFromArray",value:function(e){for(var t=0;t<this.elements.length;t++)this.elements[t]=e[t];return this}},{key:"copy",value:function(e){var t=e.elements;return this.elements[0]=t[0],this.elements[1]=t[1],this.elements[2]=t[2],this.elements[3]=t[3],this.elements[4]=t[4],this.elements[5]=t[5],this.elements[6]=t[6],this.elements[7]=t[7],this.elements[8]=t[8],this.elements[9]=t[9],this.elements[10]=t[10],this.elements[11]=t[11],this.elements[12]=t[12],this.elements[13]=t[13],this.elements[14]=t[14],this.elements[15]=t[15],this}},{key:"clone",value:function(){return(new e).copy(this)}},{key:"multiply",value:function(t){var i=this.elements,r=t.elements,s=new e;return s.elements[0]=r[0]*i[0]+r[1]*i[4]+r[2]*i[8]+r[3]*i[12],s.elements[1]=r[0]*i[1]+r[1]*i[5]+r[2]*i[9]+r[3]*i[13],s.elements[2]=r[0]*i[2]+r[1]*i[6]+r[2]*i[10]+r[3]*i[14],s.elements[3]=r[0]*i[3]+r[1]*i[7]+r[2]*i[11]+r[3]*i[15],s.elements[4]=r[4]*i[0]+r[5]*i[4]+r[6]*i[8]+r[7]*i[12],s.elements[5]=r[4]*i[1]+r[5]*i[5]+r[6]*i[9]+r[7]*i[13],s.elements[6]=r[4]*i[2]+r[5]*i[6]+r[6]*i[10]+r[7]*i[14],s.elements[7]=r[4]*i[3]+r[5]*i[7]+r[6]*i[11]+r[7]*i[15],s.elements[8]=r[8]*i[0]+r[9]*i[4]+r[10]*i[8]+r[11]*i[12],s.elements[9]=r[8]*i[1]+r[9]*i[5]+r[10]*i[9]+r[11]*i[13],s.elements[10]=r[8]*i[2]+r[9]*i[6]+r[10]*i[10]+r[11]*i[14],s.elements[11]=r[8]*i[3]+r[9]*i[7]+r[10]*i[11]+r[11]*i[15],s.elements[12]=r[12]*i[0]+r[13]*i[4]+r[14]*i[8]+r[15]*i[12],s.elements[13]=r[12]*i[1]+r[13]*i[5]+r[14]*i[9]+r[15]*i[13],s.elements[14]=r[12]*i[2]+r[13]*i[6]+r[14]*i[10]+r[15]*i[14],s.elements[15]=r[12]*i[3]+r[13]*i[7]+r[14]*i[11]+r[15]*i[15],s}},{key:"getInverse",value:function(){var t=this.elements,i=new e,r=i.elements,s=t[0],n=t[1],a=t[2],o=t[3],h=t[4],l=t[5],u=t[6],d=t[7],c=t[8],p=t[9],f=t[10],g=t[11],_=t[12],m=t[13],v=t[14],y=t[15],x=s*l-n*h,b=s*u-a*h,k=s*d-o*h,R=n*u-a*l,P=n*d-o*l,w=a*d-o*u,T=c*m-p*_,S=c*v-f*_,C=c*y-g*_,E=p*v-f*m,M=p*y-g*m,A=f*y-g*v,F=x*A-b*M+k*E+R*C-P*S+w*T;return F?(F=1/F,r[0]=(l*A-u*M+d*E)*F,r[1]=(a*M-n*A-o*E)*F,r[2]=(m*w-v*P+y*R)*F,r[3]=(f*P-p*w-g*R)*F,r[4]=(u*C-h*A-d*S)*F,r[5]=(s*A-a*C+o*S)*F,r[6]=(v*k-_*w-y*b)*F,r[7]=(c*w-f*k+g*b)*F,r[8]=(h*M-l*C+d*T)*F,r[9]=(n*C-s*M-o*T)*F,r[10]=(_*P-m*k+y*x)*F,r[11]=(p*k-c*P-g*x)*F,r[12]=(l*S-h*E-u*T)*F,r[13]=(s*E-n*S+a*T)*F,r[14]=(m*b-_*R-v*x)*F,r[15]=(c*R-p*b+f*x)*F,i):null}},{key:"scale",value:function(e){var t=this.elements;return t[0]*=e.x,t[1]*=e.x,t[2]*=e.x,t[3]*=e.x,t[4]*=e.y,t[5]*=e.y,t[6]*=e.y,t[7]*=e.y,t[8]*=e.z,t[9]*=e.z,t[10]*=e.z,t[11]*=e.z,this}},{key:"compose",value:function(e,t,i){var r=this.elements,s=t.elements[0],n=t.elements[1],a=t.elements[2],o=t.elements[3],h=s+s,l=n+n,u=a+a,d=s*h,c=s*l,p=s*u,f=n*l,g=n*u,_=a*u,m=o*h,v=o*l,y=o*u,x=i.x,b=i.y,k=i.z;return r[0]=(1-(f+_))*x,r[1]=(c+y)*x,r[2]=(p-v)*x,r[3]=0,r[4]=(c-y)*b,r[5]=(1-(d+_))*b,r[6]=(g+m)*b,r[7]=0,r[8]=(p+v)*k,r[9]=(g-m)*k,r[10]=(1-(d+f))*k,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}},{key:"composeFromOrigin",value:function(e,t,i,r){var s=this.elements,n=t.elements[0],a=t.elements[1],o=t.elements[2],h=t.elements[3],l=n+n,u=a+a,d=o+o,c=n*l,p=n*u,f=n*d,g=a*u,_=a*d,m=o*d,v=h*l,y=h*u,x=h*d,b=i.x,k=i.y,R=i.z,P=r.x,w=r.y,T=r.z,S=(1-(g+m))*b,C=(p+x)*b,E=(f-y)*b,M=(p-x)*k,A=(1-(c+m))*k,F=(_+v)*k,O=(f+y)*R,D=(_-v)*R,z=(1-(c+g))*R;return s[0]=S,s[1]=C,s[2]=E,s[3]=0,s[4]=M,s[5]=A,s[6]=F,s[7]=0,s[8]=O,s[9]=D,s[10]=z,s[11]=0,s[12]=e.x+P-(S*P+M*w+O*T),s[13]=e.y+w-(C*P+A*w+D*T),s[14]=e.z+T-(E*P+F*w+z*T),s[15]=1,this}}]),e}(),P=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;_classCallCheck(this,e),this.type="Vec2",this._x=t,this._y=i}return _createClass(e,[{key:"x",get:function(){return this._x},set:function(e){var t=e!==this._x;this._x=e,t&&this._onChangeCallback&&this._onChangeCallback()}},{key:"y",get:function(){return this._y},set:function(e){var t=e!==this._y;this._y=e,t&&this._onChangeCallback&&this._onChangeCallback()}},{key:"onChange",value:function(e){return e&&(this._onChangeCallback=e),this}},{key:"set",value:function(e,t){return this._x=e,this._y=t,this}},{key:"add",value:function(e){return this._x+=e.x,this._y+=e.y,this}},{key:"addScalar",value:function(e){return this._x+=e,this._y+=e,this}},{key:"sub",value:function(e){return this._x-=e.x,this._y-=e.y,this}},{key:"subScalar",value:function(e){return this._x-=e,this._y-=e,this}},{key:"multiply",value:function(e){return this._x*=e.x,this._y*=e.y,this}},{key:"multiplyScalar",value:function(e){return this._x*=e,this._y*=e,this}},{key:"copy",value:function(e){return this._x=e.x,this._y=e.y,this}},{key:"clone",value:function(){return new e(this._x,this._y)}},{key:"sanitizeNaNValuesWith",value:function(e){return this._x=isNaN(this._x)?e.x:parseFloat(this._x),this._y=isNaN(this._y)?e.y:parseFloat(this._y),this}},{key:"max",value:function(e){return this._x=Math.max(this._x,e.x),this._y=Math.max(this._y,e.y),this}},{key:"min",value:function(e){return this._x=Math.min(this._x,e.x),this._y=Math.min(this._y,e.y),this}},{key:"equals",value:function(e){return this._x===e.x&&this._y===e.y}},{key:"normalize",value:function(){var e=this._x*this._x+this._y*this._y;return e>0&&(e=1/Math.sqrt(e)),this._x*=e,this._y*=e,this}},{key:"dot",value:function(e){return this._x*e.x+this._y*e.y}}]),e}(),w=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;_classCallCheck(this,e),this.type="Vec3",this._x=t,this._y=i,this._z=r}return _createClass(e,[{key:"x",get:function(){return this._x},set:function(e){var t=e!==this._x;this._x=e,t&&this._onChangeCallback&&this._onChangeCallback()}},{key:"y",get:function(){return this._y},set:function(e){var t=e!==this._y;this._y=e,t&&this._onChangeCallback&&this._onChangeCallback()}},{key:"z",get:function(){return this._z},set:function(e){var t=e!==this._z;this._z=e,t&&this._onChangeCallback&&this._onChangeCallback()}},{key:"onChange",value:function(e){return e&&(this._onChangeCallback=e),this}},{key:"set",value:function(e,t,i){return this._x=e,this._y=t,this._z=i,this}},{key:"add",value:function(e){return this._x+=e.x,this._y+=e.y,this._z+=e.z,this}},{key:"addScalar",value:function(e){return this._x+=e,this._y+=e,this._z+=e,this}},{key:"sub",value:function(e){return this._x-=e.x,this._y-=e.y,this._z-=e.z,this}},{key:"subScalar",value:function(e){return this._x-=e,this._y-=e,this._z-=e,this}},{key:"multiply",value:function(e){return this._x*=e.x,this._y*=e.y,this._z*=e.z,this}},{key:"multiplyScalar",value:function(e){return this._x*=e,this._y*=e,this._z*=e,this}},{key:"copy",value:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this}},{key:"clone",value:function(){return new e(this._x,this._y,this._z)}},{key:"sanitizeNaNValuesWith",value:function(e){return this._x=isNaN(this._x)?e.x:parseFloat(this._x),this._y=isNaN(this._y)?e.y:parseFloat(this._y),this._z=isNaN(this._z)?e.z:parseFloat(this._z),this}},{key:"max",value:function(e){return this._x=Math.max(this._x,e.x),this._y=Math.max(this._y,e.y),this._z=Math.max(this._z,e.z),this}},{key:"min",value:function(e){return this._x=Math.min(this._x,e.x),this._y=Math.min(this._y,e.y),this._z=Math.min(this._z,e.z),this}},{key:"equals",value:function(e){return this._x===e.x&&this._y===e.y&&this._z===e.z}},{key:"normalize",value:function(){var e=this._x*this._x+this._y*this._y+this._z*this._z;return e>0&&(e=1/Math.sqrt(e)),this._x*=e,this._y*=e,this._z*=e,this}},{key:"dot",value:function(e){return this._x*e.x+this._y*e.y+this._z*e.z}},{key:"applyMat4",value:function(e){var t=this._x,i=this._y,r=this._z,s=e.elements,n=s[3]*t+s[7]*i+s[11]*r+s[15];return n=n||1,this._x=(s[0]*t+s[4]*i+s[8]*r+s[12])/n,this._y=(s[1]*t+s[5]*i+s[9]*r+s[13])/n,this._z=(s[2]*t+s[6]*i+s[10]*r+s[14])/n,this}},{key:"applyQuat",value:function(e){var t=this._x,i=this._y,r=this._z,s=e.elements[0],n=e.elements[1],a=e.elements[2],o=e.elements[3],h=o*t+n*r-a*i,l=o*i+a*t-s*r,u=o*r+s*i-n*t,d=-s*t-n*i-a*r;return this._x=h*o+d*-s+l*-a-u*-n,this._y=l*o+d*-n+u*-s-h*-a,this._z=u*o+d*-a+h*-n-l*-s,this}},{key:"project",value:function(e){return this.applyMat4(e.viewMatrix).applyMat4(e.projectionMatrix),this}},{key:"unproject",value:function(e){return this.applyMat4(e.projectionMatrix.getInverse()).applyMat4(e.worldMatrix),this}}]),e}(),T=new P,S=new w,C=new R,E=function(){function e(t){var i=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.isFBOTexture,o=void 0!==a&&a,h=n.fromTexture,l=void 0!==h&&h,u=n.loader,d=n.sampler,c=n.floatingPoint,p=void 0===c?"none":c,f=n.premultiplyAlpha,g=void 0!==f&&f,_=n.anisotropy,m=void 0===_?1:_,v=n.generateMipmap,y=void 0===v?null:v,x=n.wrapS,b=n.wrapT,k=n.minFilter,w=n.magFilter;if(_classCallCheck(this,e),this.type="Texture",(t=t&&t.renderer||t)&&"Renderer"===t.type){if(!t.gl)return void(t.production||r(this.type+": Unable to create a "+this.type+" because the Renderer WebGL context is not defined"))}else r(this.type+": Renderer not passed as first argument",t);if(this.renderer=t,this.gl=this.renderer.gl,this.uuid=s(),this._globalParameters={unpackAlignment:4,flipY:!o,premultiplyAlpha:!1,shouldPremultiplyAlpha:g,floatingPoint:p,type:this.gl.UNSIGNED_BYTE,internalFormat:this.gl.RGBA,format:this.gl.RGBA},this.parameters={anisotropy:m,generateMipmap:y,wrapS:x||this.gl.CLAMP_TO_EDGE,wrapT:b||this.gl.CLAMP_TO_EDGE,minFilter:k||this.gl.LINEAR,magFilter:w||this.gl.LINEAR,_shouldUpdate:!0},this._initState(),this.sourceType=o?"fbo":"empty",this._useCache=!0,this._samplerName=d,this._sampler={isActive:!1,isTextureBound:!1,texture:this.gl.createTexture()},this._textureMatrix={matrix:new R,isActive:!1},this._size={width:1,height:1},this.scale=new P(1),this.scale.onChange((function(){return i.resize()})),this.offset=new P,this.offset.onChange((function(){return i.resize()})),this._loader=u,this._sourceLoaded=!1,this._uploaded=!1,this._willUpdate=!1,this.shouldUpdate=!1,this._forceUpdate=!1,this.userData={},this._canDraw=!1,l)return this._copyOnInit=!0,void(this._copiedFrom=l);this._copyOnInit=!1,this._initTexture()}return _createClass(e,[{key:"_initState",value:function(){this._state={anisotropy:1,generateMipmap:!1,wrapS:null,wrapT:null,minFilter:null,magFilter:this.gl.LINEAR}}},{key:"_initTexture",value:function(){this.gl.bindTexture(this.gl.TEXTURE_2D,this._sampler.texture),"empty"===this.sourceType&&(this._globalParameters.flipY=!1,this._updateGlobalTexParameters(),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,1,1,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,new Uint8Array([0,0,0,255])),this._canDraw=!0)}},{key:"_restoreFromTexture",value:function(){this._copyOnInit||this._initTexture(),this._parent&&(this._setTextureUniforms(),this._setSize()),this.copy(this._copiedFrom),this._canDraw=!0}},{key:"_restoreContext",value:function(){var e=this;if(this._canDraw=!1,this._sampler.texture=this.gl.createTexture(),this._sampler.isActive=!1,this._sampler.isTextureBound=!1,this._textureMatrix.isActive=!1,this._initState(),this._state.generateMipmap=!1,this.parameters._shouldUpdate=!0,this._copiedFrom)var t=this.renderer.nextRender.add((function(){e._copiedFrom._canDraw&&(e._restoreFromTexture(),t.keep=!1)}),!0);else this._initTexture(),this._parent&&this._setParent(),this.source&&(this.setSource(this.source),"image"===this.sourceType?this.renderer.cache.addTexture(this):this.needUpdate()),this._canDraw=!0}},{key:"addParent",value:function(e){!e||"Plane"!==e.type&&"PingPongPlane"!==e.type&&"ShaderPass"!==e.type&&"RenderTarget"!==e.type?this.renderer.production||i(this.type+": cannot add texture as a child of ",e," because it is not a valid parent"):(this._parent=e,this.index=this._parent.textures.length,this._parent.textures.push(this),this._setParent())}},{key:"_setParent",value:function(){var e=this;if(this._sampler.name=this._samplerName||"uSampler"+this.index,this._textureMatrix.name=this._samplerName?this._samplerName+"Matrix":"uTextureMatrix"+this.index,this._parent._program){if(!this._parent._program.compiled)return void(this.renderer.production||i(this.type+": Unable to create the texture because the program is not valid"));if(this._setTextureUniforms(),this._copyOnInit){var t=this.renderer.nextRender.add((function(){e._copiedFrom._canDraw&&e._copiedFrom._uploaded&&(e.copy(e._copiedFrom),t.keep=!1)}),!0);return}this.source?this._parent.loader&&this._parent.loader._addSourceToParent(this.source,this.sourceType):this._size={width:this._parent._boundingRect.document.width,height:this._parent._boundingRect.document.height},this._setSize()}else"RenderTarget"===this._parent.type&&(this._size={width:this._parent._size&&this._parent._size.width||this.renderer._boundingRect.width,height:this._parent._size&&this._parent._size.height||this.renderer._boundingRect.height},this._upload(),this._updateTexParameters(),this._canDraw=!0)}},{key:"hasParent",value:function(){return!!this._parent}},{key:"_setTextureUniforms",value:function(){for(var e=this,t=this._parent._program.activeUniforms,i=0;i<t.textures.length;i++){if(t.textures[i]===this._sampler.name)this._sampler.isActive=!0,this.renderer.useProgram(this._parent._program),this._sampler.location=this.gl.getUniformLocation(this._parent._program.program,this._sampler.name),t.textureMatrices.find((function(t){return t===e._textureMatrix.name}))&&(this._textureMatrix.isActive=!0,this._textureMatrix.location=this.gl.getUniformLocation(this._parent._program.program,this._textureMatrix.name)),this.gl.uniform1i(this._sampler.location,this.index)}}},{key:"copy",value:function(e){e&&"Texture"===e.type?(this._globalParameters=Object.assign({},e._globalParameters),this._state=Object.assign({},e._state),this.parameters.generateMipmap=e.parameters.generateMipmap,this._state.generateMipmap=null,this._size=e._size,!this._sourceLoaded&&e._sourceLoaded&&this._onSourceLoadedCallback&&this._onSourceLoadedCallback(),this._sourceLoaded=e._sourceLoaded,!this._uploaded&&e._uploaded&&this._onSourceUploadedCallback&&this._onSourceUploadedCallback(),this._uploaded=e._uploaded,this.sourceType=e.sourceType,this.source=e.source,this._videoFrameCallbackID=e._videoFrameCallbackID,this._sampler.texture=e._sampler.texture,this._copiedFrom=e,!this._parent||!this._parent._program||this._canDraw&&this._textureMatrix.matrix||(this._setSize(),this._canDraw=!0),this._updateTexParameters(),this.renderer.needRender()):this.renderer.production||i(this.type+": Unable to set the texture from texture:",e)}},{key:"setSource",value:function(e){var t=this;this._sourceLoaded||this.renderer.nextRender.add((function(){return t._onSourceLoadedCallback&&t._onSourceLoadedCallback()}));var r="IMG"===e.tagName.toUpperCase()?"image":e.tagName.toLowerCase();if("video"!==r&&"canvas"!==r||(this._useCache=!1),this._useCache){var s=this.renderer.cache.getTextureFromSource(e);if(s&&s.uuid!==this.uuid)return this._uploaded||(this.renderer.nextRender.add((function(){return t._onSourceUploadedCallback&&t._onSourceUploadedCallback()})),this._uploaded=!0),this.copy(s),void this.resize()}if("empty"===this.sourceType||this.sourceType!==r)if("video"===r)this._willUpdate=!1,this.shouldUpdate=!0;else if("canvas"===r)this._willUpdate=!0,this.shouldUpdate=!0;else{if("image"!==r)return void(this.renderer.production||i(this.type+": this HTML tag could not be converted into a texture:",e.tagName));this._willUpdate=!1,this.shouldUpdate=!1}this.source=e,this.sourceType=r,this._size={width:this.source.naturalWidth||this.source.width||this.source.videoWidth,height:this.source.naturalHeight||this.source.height||this.source.videoHeight},this._sourceLoaded=!0,this.gl.bindTexture(this.gl.TEXTURE_2D,this._sampler.texture),this.resize(),this._globalParameters.flipY=!0,this._globalParameters.premultiplyAlpha=this._globalParameters.shouldPremultiplyAlpha,"image"===this.sourceType&&(this.parameters.generateMipmap=this.parameters.generateMipmap||null===this.parameters.generateMipmap,this.parameters._shouldUpdate=this.parameters.generateMipmap,this._state.generateMipmap=!1,this._upload()),this.renderer.needRender()}},{key:"_updateGlobalTexParameters",value:function(){this.renderer.state.unpackAlignment!==this._globalParameters.unpackAlignment&&(this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,this._globalParameters.unpackAlignment),this.renderer.state.unpackAlignment=this._globalParameters.unpackAlignment),this.renderer.state.flipY!==this._globalParameters.flipY&&(this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,this._globalParameters.flipY),this.renderer.state.flipY=this._globalParameters.flipY),this.renderer.state.premultiplyAlpha!==this._globalParameters.premultiplyAlpha&&(this.gl.pixelStorei(this.gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this._globalParameters.premultiplyAlpha),this.renderer.state.premultiplyAlpha=this._globalParameters.premultiplyAlpha),"half-float"===this._globalParameters.floatingPoint?this.renderer._isWebGL2&&this.renderer.extensions.EXT_color_buffer_float?(this._globalParameters.internalFormat=this.gl.RGBA16F,this._globalParameters.type=this.gl.HALF_FLOAT):this.renderer.extensions.OES_texture_half_float?this._globalParameters.type=this.renderer.extensions.OES_texture_half_float.HALF_FLOAT_OES:this.renderer.production||i(this.type+": could not use half-float textures because the extension is not available"):"float"===this._globalParameters.floatingPoint&&(this.renderer._isWebGL2&&this.renderer.extensions.EXT_color_buffer_float?(this._globalParameters.internalFormat=this.gl.RGBA16F,this._globalParameters.type=this.gl.FLOAT):this.renderer.extensions.OES_texture_float?this._globalParameters.type=this.renderer.extensions.OES_texture_half_float.FLOAT:this.renderer.production||i(this.type+": could not use float textures because the extension is not available"))}},{key:"_updateTexParameters",value:function(){this.index&&this.renderer.state.activeTexture!==this.index&&this._bindTexture(),this.parameters.wrapS!==this._state.wrapS&&(this.renderer._isWebGL2||n(this._size.width)&&n(this._size.height)||(this.parameters.wrapS=this.gl.CLAMP_TO_EDGE),this.parameters.wrapS!==this.gl.REPEAT&&this.parameters.wrapS!==this.gl.CLAMP_TO_EDGE&&this.parameters.wrapS!==this.gl.MIRRORED_REPEAT&&(this.renderer.production||i(this.type+": Wrong wrapS value",this.parameters.wrapS,"for this texture:",this,"\ngl.CLAMP_TO_EDGE wrapping will be used instead"),this.parameters.wrapS=this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.parameters.wrapS),this._state.wrapS=this.parameters.wrapS),this.parameters.wrapT!==this._state.wrapT&&(this.renderer._isWebGL2||n(this._size.width)&&n(this._size.height)||(this.parameters.wrapT=this.gl.CLAMP_TO_EDGE),this.parameters.wrapT!==this.gl.REPEAT&&this.parameters.wrapT!==this.gl.CLAMP_TO_EDGE&&this.parameters.wrapT!==this.gl.MIRRORED_REPEAT&&(this.renderer.production||i(this.type+": Wrong wrapT value",this.parameters.wrapT,"for this texture:",this,"\ngl.CLAMP_TO_EDGE wrapping will be used instead"),this.parameters.wrapT=this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.parameters.wrapT),this._state.wrapT=this.parameters.wrapT),this.parameters.generateMipmap&&!this._state.generateMipmap&&this.source&&(this.renderer._isWebGL2||n(this._size.width)&&n(this._size.height)?this.gl.generateMipmap(this.gl.TEXTURE_2D):this.parameters.generateMipmap=!1,this._state.generateMipmap=this.parameters.generateMipmap),this.parameters.minFilter!==this._state.minFilter&&(this.renderer._isWebGL2||n(this._size.width)&&n(this._size.height)||(this.parameters.minFilter=this.gl.LINEAR),this.parameters.generateMipmap||null===this.parameters.generateMipmap||(this.parameters.minFilter=this.gl.LINEAR),this.parameters.minFilter!==this.gl.LINEAR&&this.parameters.minFilter!==this.gl.NEAREST&&this.parameters.minFilter!==this.gl.NEAREST_MIPMAP_NEAREST&&this.parameters.minFilter!==this.gl.LINEAR_MIPMAP_NEAREST&&this.parameters.minFilter!==this.gl.NEAREST_MIPMAP_LINEAR&&this.parameters.minFilter!==this.gl.LINEAR_MIPMAP_LINEAR&&(this.renderer.production||i(this.type+": Wrong minFilter value",this.parameters.minFilter,"for this texture:",this,"\ngl.LINEAR filtering will be used instead"),this.parameters.minFilter=this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.parameters.minFilter),this._state.minFilter=this.parameters.minFilter),this.parameters.magFilter!==this._state.magFilter&&(this.renderer._isWebGL2||n(this._size.width)&&n(this._size.height)||(this.parameters.magFilter=this.gl.LINEAR),this.parameters.magFilter!==this.gl.LINEAR&&this.parameters.magFilter!==this.gl.NEAREST&&(this.renderer.production||i(this.type+": Wrong magFilter value",this.parameters.magFilter,"for this texture:",this,"\ngl.LINEAR filtering will be used instead"),this.parameters.magFilter=this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.parameters.magFilter),this._state.magFilter=this.parameters.magFilter);var e=this.renderer.extensions.EXT_texture_filter_anisotropic;if(e&&this.parameters.anisotropy!==this._state.anisotropy){var t=this.gl.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT);this.parameters.anisotropy=Math.max(1,Math.min(this.parameters.anisotropy,t)),this.gl.texParameterf(this.gl.TEXTURE_2D,e.TEXTURE_MAX_ANISOTROPY_EXT,this.parameters.anisotropy),this._state.anisotropy=this.parameters.anisotropy}}},{key:"setWrapS",value:function(e){this.parameters.wrapS!==e&&(this.parameters.wrapS=e,this.parameters._shouldUpdate=!0)}},{key:"setWrapT",value:function(e){this.parameters.wrapT!==e&&(this.parameters.wrapT=e,this.parameters._shouldUpdate=!0)}},{key:"setMinFilter",value:function(e){this.parameters.minFilter!==e&&(this.parameters.minFilter=e,this.parameters._shouldUpdate=!0)}},{key:"setMagFilter",value:function(e){this.parameters.magFilter!==e&&(this.parameters.magFilter=e,this.parameters._shouldUpdate=!0)}},{key:"setAnisotropy",value:function(e){e=isNaN(e)?this.parameters.anisotropy:e,this.parameters.anisotropy!==e&&(this.parameters.anisotropy=e,this.parameters._shouldUpdate=!0)}},{key:"needUpdate",value:function(){this._forceUpdate=!0}},{key:"_videoFrameCallback",value:function(){var e=this;this._willUpdate=!0,this.source.requestVideoFrameCallback((function(){return e._videoFrameCallback()}))}},{key:"_upload",value:function(){var e=this;this._updateGlobalTexParameters(),this.source?this.gl.texImage2D(this.gl.TEXTURE_2D,0,this._globalParameters.internalFormat,this._globalParameters.format,this._globalParameters.type,this.source):"fbo"===this.sourceType&&this.gl.texImage2D(this.gl.TEXTURE_2D,0,this._globalParameters.internalFormat,this._size.width,this._size.height,0,this._globalParameters.format,this._globalParameters.type,this.source||null),this._uploaded||(this.renderer.nextRender.add((function(){return e._onSourceUploadedCallback&&e._onSourceUploadedCallback()})),this._uploaded=!0)}},{key:"_getSizes",value:function(){if("fbo"===this.sourceType)return{parentWidth:this._parent._boundingRect.document.width,parentHeight:this._parent._boundingRect.document.height,sourceWidth:this._parent._boundingRect.document.width,sourceHeight:this._parent._boundingRect.document.height,xOffset:0,yOffset:0};var e=this._parent.scale?T.set(this._parent.scale.x,this._parent.scale.y):T.set(1,1),t=this._parent._boundingRect.document.width*e.x,i=this._parent._boundingRect.document.height*e.y,r=this._size.width,s=this._size.height,n=r/s,a=t/i,o=0,h=0;return a>n?h=Math.min(0,i-t*(1/n)):a<n&&(o=Math.min(0,t-i*n)),{parentWidth:t,parentHeight:i,sourceWidth:r,sourceHeight:s,xOffset:o,yOffset:h}}},{key:"setScale",value:function(e){e.type&&"Vec2"===e.type?(e.sanitizeNaNValuesWith(this.scale).max(T.set(.001,.001)),e.equals(this.scale)||(this.scale.copy(e),this.resize())):this.renderer.production||i(this.type+": Cannot set scale because the parameter passed is not of Vec2 type:",e)}},{key:"setOffset",value:function(e){e.type&&"Vec2"===e.type?(e.sanitizeNaNValuesWith(this.offset),e.equals(this.offset)||(this.offset.copy(e),this.resize())):this.renderer.production||i(this.type+": Cannot set offset because the parameter passed is not of Vec2 type:",scale)}},{key:"_setSize",value:function(){if(this._parent&&this._parent._program){var e=this._getSizes();this._updateTextureMatrix(e)}}},{key:"resize",value:function(){"fbo"===this.sourceType?(this._size={width:this._parent._size&&this._parent._size.width||this._parent._boundingRect.document.width,height:this._parent._size&&this._parent._size.height||this._parent._boundingRect.document.height},this._copiedFrom||(this.gl.bindTexture(this.gl.TEXTURE_2D,this._sampler.texture),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this._globalParameters.internalFormat,this._size.width,this._size.height,0,this._globalParameters.format,this._globalParameters.type,null))):this.source&&(this._size={width:this.source.naturalWidth||this.source.width||this.source.videoWidth,height:this.source.naturalHeight||this.source.height||this.source.videoHeight}),this._setSize()}},{key:"_updateTextureMatrix",value:function(e){var t=S.set(e.parentWidth/(e.parentWidth-e.xOffset),e.parentHeight/(e.parentHeight-e.yOffset),1);t.x/=this.scale.x,t.y/=this.scale.y,this._textureMatrix.matrix=C.setFromArray([t.x,0,0,0,0,t.y,0,0,0,0,1,0,(1-t.x)/2+this.offset.x,(1-t.y)/2+this.offset.y,0,1]),this._updateMatrixUniform()}},{key:"_updateMatrixUniform",value:function(){this._textureMatrix.isActive&&(this.renderer.useProgram(this._parent._program),this.gl.uniformMatrix4fv(this._textureMatrix.location,!1,this._textureMatrix.matrix.elements))}},{key:"_onSourceLoaded",value:function(e){this.setSource(e),"image"===this.sourceType&&this.renderer.cache.addTexture(this)}},{key:"_bindTexture",value:function(){this._canDraw&&(this.renderer.state.activeTexture!==this.index&&(this.gl.activeTexture(this.gl.TEXTURE0+this.index),this.renderer.state.activeTexture=this.index),this.gl.bindTexture(this.gl.TEXTURE_2D,this._sampler.texture),this._sampler.isTextureBound||(this._sampler.isTextureBound=!!this.gl.getParameter(this.gl.TEXTURE_BINDING_2D),this._sampler.isTextureBound&&this.renderer.needRender()))}},{key:"_draw",value:function(){this._sampler.isActive&&(this._bindTexture(),"video"===this.sourceType&&this.source&&!this._videoFrameCallbackID&&this.source.readyState>=this.source.HAVE_CURRENT_DATA&&!this.source.paused&&(this._willUpdate=!0),(this._forceUpdate||this._willUpdate&&this.shouldUpdate)&&(this._state.generateMipmap=!1,this._upload()),"video"===this.sourceType&&(this._willUpdate=!1),this._forceUpdate=!1),this.parameters._shouldUpdate&&(this._updateTexParameters(),this.parameters._shouldUpdate=!1)}},{key:"onSourceLoaded",value:function(e){return e&&(this._onSourceLoadedCallback=e),this}},{key:"onSourceUploaded",value:function(e){return e&&(this._onSourceUploadedCallback=e),this}},{key:"_dispose",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];"video"===this.sourceType||"image"===this.sourceType&&!this.renderer.state.isActive?(this._loader&&this._loader._removeSource(this),this.source=null):"canvas"===this.sourceType&&(this.source.width=this.source.width,this.source=null),this._parent=null;var t=this.gl&&!this._copiedFrom&&(e||"image"!==this.sourceType||!this.renderer.state.isActive);t&&(this._canDraw=!1,this.renderer.cache.removeTexture(this),this.gl.activeTexture(this.gl.TEXTURE0+this.index),this.gl.bindTexture(this.gl.TEXTURE_2D,null),this.gl.deleteTexture(this._sampler.texture))}}]),e}(),M=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"anonymous";if(_classCallCheck(this,e),this.type="TextureLoader",(t=t&&t.renderer||t)&&"Renderer"===t.type){if(!t.gl)return void r(this.type+": Renderer WebGL context is undefined",t)}else r(this.type+": Renderer not passed as first argument",t);this.renderer=t,this.gl=this.renderer.gl,this.crossOrigin=i,this.elements=[]}return _createClass(e,[{key:"_addElement",value:function(e,t,i,r){var s={source:e,texture:t,load:this._sourceLoaded.bind(this,e,t,i),error:this._sourceLoadError.bind(this,e,r)};return this.elements.push(s),s}},{key:"_sourceLoadError",value:function(e,t,i){t&&t(e,i)}},{key:"_sourceLoaded",value:function(e,t,i){var r=this;t._sourceLoaded||(t._onSourceLoaded(e),this._parent&&(this._increment&&this._increment(),this.renderer.nextRender.add((function(){return r._parent._onLoadingCallback&&r._parent._onLoadingCallback(t)}))),i&&i(t))}},{key:"_getSourceType",value:function(e){var t;return"string"==typeof e?null!==e.match(/\.(jpeg|jpg|jfif|pjpeg|pjp|gif|bmp|png|webp|svg|avif|apng)$/)?t="image":null!==e.match(/\.(webm|mp4|mpg|mpeg|avi|ogg|ogm|ogv|mov|av1)$/)&&(t="video"):"IMG"===e.tagName.toUpperCase()?t="image":"VIDEO"===e.tagName.toUpperCase()?t="video":"CANVAS"===e.tagName.toUpperCase()&&(t="canvas"),t}},{key:"_createImage",value:function(e){if("string"!=typeof e&&e.hasAttribute("crossOrigin"))return e;var t=new Image;return t.crossOrigin=this.crossOrigin,"string"==typeof e?t.src=e:(t.src=e.src,e.hasAttribute("data-sampler")&&t.setAttribute("data-sampler",e.getAttribute("data-sampler"))),t}},{key:"_createVideo",value:function(e){if("string"==typeof e||null===e.getAttribute("crossOrigin")){var t=document.createElement("video");return t.crossOrigin=this.crossOrigin,"string"==typeof e?t.src=e:(t.src=e.src,e.hasAttribute("data-sampler")&&t.setAttribute("data-sampler",e.getAttribute("data-sampler"))),t}return e}},{key:"loadSource",value:function(e,t,i,r){switch(this._getSourceType(e)){case"image":this.loadImage(e,t,i,r);break;case"video":this.loadVideo(e,t,i,r);break;case"canvas":this.loadCanvas(e,t,i);break;default:this._sourceLoadError(e,r,"this source could not be converted into a texture: "+e)}}},{key:"loadSources",value:function(e,t,i,r){for(var s=0;s<e.length;s++)this.loadSource(e[s],t,i,r)}},{key:"loadImage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,s=this.renderer.cache.getTextureFromSource(e),n=Object.assign({},t);if(this._parent&&(n=Object.assign(n,this._parent._texturesOptions)),n.loader=this,s){n.sampler="string"!=typeof e&&e.hasAttribute("data-sampler")?e.getAttribute("data-sampler"):n.sampler,n.fromTexture=s;var a=new E(this.renderer,n);return this._sourceLoaded(s.source,a,i),void(this._parent&&this._addToParent(a,s.source,"image"))}var o=this._createImage(e);n.sampler=o.hasAttribute("data-sampler")?o.getAttribute("data-sampler"):n.sampler;var h=new E(this.renderer,n),l=this._addElement(o,h,i,r);o.complete?this._sourceLoaded(o,h,i):o.decode?o.decode().then(this._sourceLoaded.bind(this,o,h,i)).catch((function(){o.addEventListener("load",l.load,!1),o.addEventListener("error",l.error,!1)})):(o.addEventListener("load",l.load,!1),o.addEventListener("error",l.error,!1)),this._parent&&this._addToParent(h,o,"image")}},{key:"loadImages",value:function(e,t,i,r){for(var s=0;s<e.length;s++)this.loadImage(e[s],t,i,r)}},{key:"loadVideo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,s=this._createVideo(e);s.preload=!0,s.muted=!0,s.loop=!0,s.setAttribute("playsinline",""),s.crossOrigin=this.crossOrigin;var n=Object.assign({},t);this._parent&&(n=Object.assign(t,this._parent._texturesOptions)),n.loader=this,n.sampler=s.hasAttribute("data-sampler")?s.getAttribute("data-sampler"):n.sampler;var a=new E(this.renderer,n),o=this._addElement(s,a,i,r);s.addEventListener("canplaythrough",o.load,!1),s.addEventListener("error",o.error,!1),s.readyState>=s.HAVE_FUTURE_DATA&&i&&this._sourceLoaded(s,a,i),s.load(),this._addToParent&&this._addToParent(a,s,"video"),"requestVideoFrameCallback"in HTMLVideoElement.prototype&&(o.videoFrameCallback=a._videoFrameCallback.bind(a),a._videoFrameCallbackID=s.requestVideoFrameCallback(o.videoFrameCallback))}},{key:"loadVideos",value:function(e,t,i,r){for(var s=0;s<e.length;s++)this.loadVideo(e[s],t,i,r)}},{key:"loadCanvas",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,r=Object.assign({},t);this._parent&&(r=Object.assign(t,this._parent._texturesOptions)),r.loader=this,r.sampler=e.hasAttribute("data-sampler")?e.getAttribute("data-sampler"):r.sampler;var s=new E(this.renderer,r);this._addElement(e,s,i,null),this._sourceLoaded(e,s,i),this._parent&&this._addToParent(s,e,"canvas")}},{key:"loadCanvases",value:function(e,t,i){for(var r=0;r<e.length;r++)this.loadCanvas(e[r],t,i)}},{key:"_removeSource",value:function(e){var t=this.elements.find((function(t){return t.texture.uuid===e.uuid}));t&&("image"===e.sourceType?t.source.removeEventListener("load",t.load,!1):"video"===e.sourceType&&(t.videoFrameCallback&&e._videoFrameCallbackID&&t.source.cancelVideoFrameCallback(e._videoFrameCallbackID),t.source.removeEventListener("canplaythrough",t.load,!1),t.source.pause(),t.source.removeAttribute("src"),t.source.load()),t.source.removeEventListener("error",t.error,!1))}}]),e}(),A=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,s){var n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=a.sourcesLoaded,h=void 0===o?0:o,l=a.sourcesToLoad,u=void 0===l?0:l,d=a.complete,c=void 0!==d&&d,p=a.onComplete,f=void 0===p?function(){}:p;return _classCallCheck(this,r),(n=t.call(this,e,s.crossOrigin)).type="PlaneTextureLoader",n._parent=s,"Plane"!==n._parent.type&&"PingPongPlane"!==n._parent.type&&"ShaderPass"!==n._parent.type&&(i(n.type+": Wrong parent type assigned to this loader"),n._parent=null),n.sourcesLoaded=h,n.sourcesToLoad=u,n.complete=c,n.onComplete=f,n}return _createClass(r,[{key:"_setLoaderSize",value:function(e){var t=this;this.sourcesToLoad=e,0===this.sourcesToLoad&&(this.complete=!0,this.renderer.nextRender.add((function(){return t.onComplete&&t.onComplete()})))}},{key:"_increment",value:function(){var e=this;this.sourcesLoaded++,this.sourcesLoaded>=this.sourcesToLoad&&!this.complete&&(this.complete=!0,this.renderer.nextRender.add((function(){return e.onComplete&&e.onComplete()})))}},{key:"_addSourceToParent",value:function(e,t){if("image"===t){var i=this._parent.images;!i.find((function(t){return t.src===e.src}))&&i.push(e)}else if("video"===t){var r=this._parent.videos;!r.find((function(t){return t.src===e.src}))&&r.push(e)}else if("canvas"===t){var s=this._parent.canvases;!s.find((function(t){return t.isSameNode(e)}))&&s.push(e)}}},{key:"_addToParent",value:function(e,t,i){this._addSourceToParent(t,i),this._parent&&e.addParent(this._parent)}}]),r}(M),F=function(){function e(t){var i=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Mesh",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=n.vertexShaderID,o=n.fragmentShaderID,h=n.vertexShader,l=n.fragmentShader,u=n.uniforms,d=void 0===u?{}:u,c=n.widthSegments,p=void 0===c?1:c,f=n.heightSegments,g=void 0===f?1:f,_=n.renderOrder,m=void 0===_?0:_,v=n.depthTest,y=void 0===v||v,x=n.cullFace,R=void 0===x?"back":x,P=n.texturesOptions,w=void 0===P?{}:P,T=n.crossOrigin,S=void 0===T?"anonymous":T;if(_classCallCheck(this,e),this.type=s,(t=t&&t.renderer||t)&&"Renderer"===t.type||(r(this.type+": Curtains not passed as first argument or Curtains Renderer is missing",t),setTimeout((function(){i._onErrorCallback&&i._onErrorCallback()}),0)),this.renderer=t,this.gl=this.renderer.gl,!this.gl)return this.renderer.production||r(this.type+": Unable to create a "+this.type+" because the Renderer WebGL context is not defined"),void setTimeout((function(){i._onErrorCallback&&i._onErrorCallback()}),0);this._canDraw=!1,this.renderOrder=m,this._depthTest=y,this.cullFace=R,"back"!==this.cullFace&&"front"!==this.cullFace&&"none"!==this.cullFace&&(this.cullFace="back"),this.textures=[],this._texturesOptions=Object.assign({premultiplyAlpha:!1,anisotropy:1,floatingPoint:"none",wrapS:this.gl.CLAMP_TO_EDGE,wrapT:this.gl.CLAMP_TO_EDGE,minFilter:this.gl.LINEAR,magFilter:this.gl.LINEAR},w),this.crossOrigin=S,!h&&a&&document.getElementById(a)&&(h=document.getElementById(a).innerHTML),!l&&o&&document.getElementById(o)&&(l=document.getElementById(o).innerHTML),this._initMesh(),p=parseInt(p),g=parseInt(g),this._geometry=new k(this.renderer,{width:p,height:g}),this._program=new b(this.renderer,{parent:this,vertexShader:h,fragmentShader:l}),this._program.compiled?(this._program.createUniforms(d),this.uniforms=this._program.uniformsManager.uniforms,this._geometry.setProgram(this._program),this.renderer.onSceneChange()):this.renderer.nextRender.add((function(){return i._onErrorCallback&&i._onErrorCallback()}))}return _createClass(e,[{key:"_initMesh",value:function(){var e=this;this.uuid=s(),this.loader=new A(this.renderer,this,{sourcesLoaded:0,initSourcesToLoad:0,complete:!1,onComplete:function(){e._onReadyCallback&&e._onReadyCallback(),e.renderer.needRender()}}),this.images=[],this.videos=[],this.canvases=[],this.userData={},this._canDraw=!0}},{key:"_restoreContext",value:function(){this._canDraw=!1,this._matrices&&(this._matrices=null),this._program=new b(this.renderer,{parent:this,vertexShader:this._program.vsCode,fragmentShader:this._program.fsCode}),this._program.compiled&&(this._geometry.restoreContext(this._program),this._program.createUniforms(this.uniforms),this.uniforms=this._program.uniformsManager.uniforms,this._programRestored())}},{key:"setRenderTarget",value:function(e){e&&"RenderTarget"===e.type?("Plane"===this.type&&this.renderer.scene.removePlane(this),this.target=e,"Plane"===this.type&&this.renderer.scene.addPlane(this)):this.renderer.production||i(this.type+": Could not set the render target because the argument passed is not a RenderTarget class object",e)}},{key:"setRenderOrder",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;(e=isNaN(e)?this.renderOrder:parseInt(e))!==this.renderOrder&&(this.renderOrder=e,this.renderer.scene.setPlaneRenderOrder(this))}},{key:"createTexture",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new E(this.renderer,Object.assign(e,this._texturesOptions));return t.addParent(this),t}},{key:"addTexture",value:function(e){e&&"Texture"===e.type?e.addParent(this):this.renderer.production||i(this.type+": cannot add ",e," to this "+this.type+" because it is not a valid texture")}},{key:"loadSources",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,s=0;s<e.length;s++)this.loadSource(e[s],t,i,r)}},{key:"loadSource",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;this.loader.loadSource(e,Object.assign(r,this._texturesOptions),(function(e){s&&s(e)}),(function(e,r){t.renderer.production||i(t.type+": this HTML tag could not be converted into a texture:",e.tagName),n&&n(e,r)}))}},{key:"loadImage",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;this.loader.loadImage(e,Object.assign(r,this._texturesOptions),(function(e){s&&s(e)}),(function(e,r){t.renderer.production||i(t.type+": There has been an error:\n",r,"\nwhile loading this image:\n",e),n&&n(e,r)}))}},{key:"loadVideo",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;this.loader.loadVideo(e,Object.assign(r,this._texturesOptions),(function(e){s&&s(e)}),(function(e,r){t.renderer.production||i(t.type+": There has been an error:\n",r,"\nwhile loading this video:\n",e),n&&n(e,r)}))}},{key:"loadCanvas",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;this.loader.loadCanvas(e,Object.assign(t,this._texturesOptions),(function(e){i&&i(e)}))}},{key:"loadImages",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,s=0;s<e.length;s++)this.loadImage(e[s],t,i,r)}},{key:"loadVideos",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,s=0;s<e.length;s++)this.loadVideo(e[s],t,i,r)}},{key:"loadCanvases",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,r=0;r<e.length;r++)this.loadCanvas(e[r],t,i)}},{key:"playVideos",value:function(){for(var e=this,t=0;t<this.textures.length;t++){var r=this.textures[t];if("video"===r.sourceType){var s=r.source.play();void 0!==s&&s.catch((function(t){e.renderer.production||i(e.type+": Could not play the video:",t)}))}}}},{key:"_draw",value:function(){this.renderer.setDepthTest(this._depthTest),this.renderer.setFaceCulling(this.cullFace),this._program.updateUniforms(),this._geometry.bindBuffers(),this.renderer.state.forceBufferUpdate=!1;for(var e=0;e<this.textures.length;e++)if(this.textures[e]._draw(),this.textures[e]._sampler.isActive&&!this.textures[e]._sampler.isTextureBound)return;this._geometry.draw(),this.renderer.state.activeTexture=null,this._onAfterRenderCallback&&this._onAfterRenderCallback()}},{key:"onError",value:function(e){return e&&(this._onErrorCallback=e),this}},{key:"onLoading",value:function(e){return e&&(this._onLoadingCallback=e),this}},{key:"onReady",value:function(e){return e&&(this._onReadyCallback=e),this}},{key:"onRender",value:function(e){return e&&(this._onRenderCallback=e),this}},{key:"onAfterRender",value:function(e){return e&&(this._onAfterRenderCallback=e),this}},{key:"remove",value:function(){this._canDraw=!1,this.target&&this.renderer.bindFrameBuffer(null),this._dispose(),"Plane"===this.type?this.renderer.removePlane(this):"ShaderPass"===this.type&&(this.target&&(this.target._shaderPass=null,this.target.remove(),this.target=null),this.renderer.removeShaderPass(this))}},{key:"_dispose",value:function(){if(this.gl){this._geometry&&this._geometry.dispose(),this.target&&"ShaderPass"===this.type&&(this.renderer.removeRenderTarget(this.target),this.textures.shift());for(var e=0;e<this.textures.length;e++)this.textures[e]._dispose();this.textures=[]}}}]),e}(),O=new P,D=new P,z=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,s){var n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"DOMMesh",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},h=o.widthSegments,l=o.heightSegments,u=o.renderOrder,d=o.depthTest,c=o.cullFace,p=o.uniforms,f=o.vertexShaderID,g=o.fragmentShaderID,_=o.vertexShader,m=o.fragmentShader,v=o.texturesOptions,y=o.crossOrigin;return _classCallCheck(this,r),f=f||s&&s.getAttribute("data-vs-id"),g=g||s&&s.getAttribute("data-fs-id"),(n=t.call(this,e,a,{widthSegments:h,heightSegments:l,renderOrder:u,depthTest:d,cullFace:c,uniforms:p,vertexShaderID:f,fragmentShaderID:g,vertexShader:_,fragmentShader:m,texturesOptions:v,crossOrigin:y})).gl?(n.htmlElement=s,n.htmlElement&&0!==n.htmlElement.length||n.renderer.production||i(n.type+": The HTML element you specified does not currently exists in the DOM"),n._setDocumentSizes(),n):_possibleConstructorReturn(n)}return _createClass(r,[{key:"_setDocumentSizes",value:function(){var e=this.htmlElement.getBoundingClientRect();this._boundingRect||(this._boundingRect={}),this._boundingRect.document={width:e.width*this.renderer.pixelRatio,height:e.height*this.renderer.pixelRatio,top:e.top*this.renderer.pixelRatio,left:e.left*this.renderer.pixelRatio}}},{key:"getBoundingRect",value:function(){return{width:this._boundingRect.document.width,height:this._boundingRect.document.height,top:this._boundingRect.document.top,left:this._boundingRect.document.left,right:this._boundingRect.document.left+this._boundingRect.document.width,bottom:this._boundingRect.document.top+this._boundingRect.document.height}}},{key:"resize",value:function(){var e=this;this._setDocumentSizes(),"Plane"===this.type&&(this.setPerspective(this.camera.fov,this.camera.near,this.camera.far),this._setWorldSizes(),this._applyWorldPositions());for(var t=0;t<this.textures.length;t++)this.textures[t].resize();this.renderer.nextRender.add((function(){return e._onAfterResizeCallback&&e._onAfterResizeCallback()}))}},{key:"mouseToPlaneCoords",value:function(e){var t=this.scale?this.scale:D.set(1,1),i=O.set((this._boundingRect.document.width-this._boundingRect.document.width*t.x)/2,(this._boundingRect.document.height-this._boundingRect.document.height*t.y)/2),r=this._boundingRect.document.width*t.x/this.renderer.pixelRatio,s=this._boundingRect.document.height*t.y/this.renderer.pixelRatio,n=(this._boundingRect.document.top+i.y)/this.renderer.pixelRatio,a=(this._boundingRect.document.left+i.x)/this.renderer.pixelRatio;return O.set((e.x-a)/r*2-1,1-(e.y-n)/s*2)}},{key:"onAfterResize",value:function(e){return e&&(this._onAfterResizeCallback=e),this}}]),r}(F),L=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.fov,r=void 0===i?50:i,s=t.near,n=void 0===s?.1:s,a=t.far,o=void 0===a?150:a,h=t.width,l=t.height,u=t.pixelRatio,d=void 0===u?1:u;_classCallCheck(this,e),this.position=new w,this.projectionMatrix=new R,this.worldMatrix=new R,this.viewMatrix=new R,this._shouldUpdate=!1,this.setSize(),this.setPerspective(r,n,o,h,l,d)}return _createClass(e,[{key:"setFov",value:function(e){e=isNaN(e)?this.fov:parseFloat(e),(e=Math.max(1,Math.min(e,179)))!==this.fov&&(this.fov=e,this.setPosition(),this._shouldUpdate=!0),this.setCSSPerspective()}},{key:"setNear",value:function(e){e=isNaN(e)?this.near:parseFloat(e),(e=Math.max(e,.01))!==this.near&&(this.near=e,this._shouldUpdate=!0)}},{key:"setFar",value:function(e){e=isNaN(e)?this.far:parseFloat(e),(e=Math.max(e,50))!==this.far&&(this.far=e,this._shouldUpdate=!0)}},{key:"setPixelRatio",value:function(e){e!==this.pixelRatio&&(this._shouldUpdate=!0),this.pixelRatio=e}},{key:"setSize",value:function(e,t){e===this.width&&t===this.height||(this._shouldUpdate=!0),this.width=e,this.height=t}},{key:"setPerspective",value:function(e,t,i,r,s,n){this.setPixelRatio(n),this.setSize(r,s),this.setFov(e),this.setNear(t),this.setFar(i),this._shouldUpdate&&this.updateProjectionMatrix()}},{key:"setPosition",value:function(){this.position.set(0,0,1),this.worldMatrix.setFromArray([1,0,0,0,0,1,0,0,0,0,1,0,this.position.x,this.position.y,this.position.z,1]),this.viewMatrix=this.viewMatrix.copy(this.worldMatrix).getInverse()}},{key:"setCSSPerspective",value:function(){this.CSSPerspective=Math.pow(Math.pow(this.width/(2*this.pixelRatio),2)+Math.pow(this.height/(2*this.pixelRatio),2),.5)/Math.tan(.5*this.fov*Math.PI/180)}},{key:"getScreenRatiosFromFov",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.position.z;e<t?e-=t:e+=t;var i=this.fov*Math.PI/180,r=2*Math.tan(i/2)*Math.abs(e);return{width:r*this.width/this.height,height:r}}},{key:"updateProjectionMatrix",value:function(){var e=this.width/this.height,t=this.near*Math.tan(Math.PI/180*.5*this.fov),i=2*t,r=e*i,s=-.5*r,n=s+r,a=t-i,o=2*this.near/(n-s),h=2*this.near/(t-a),l=(n+s)/(n-s),u=(t+a)/(t-a),d=-(this.far+this.near)/(this.far-this.near),c=-2*this.far*this.near/(this.far-this.near);this.projectionMatrix.setFromArray([o,0,0,0,0,h,0,0,l,u,d,-1,0,0,c,0])}},{key:"forceUpdate",value:function(){this._shouldUpdate=!0}},{key:"cancelUpdate",value:function(){this._shouldUpdate=!1}}]),e}(),U=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Float32Array([0,0,0,1]),i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"XYZ";_classCallCheck(this,e),this.type="Quat",this.elements=t,this.axisOrder=i}return _createClass(e,[{key:"setFromArray",value:function(e){return this.elements[0]=e[0],this.elements[1]=e[1],this.elements[2]=e[2],this.elements[3]=e[3],this}},{key:"setAxisOrder",value:function(e){switch(e=e.toUpperCase()){case"XYZ":case"YXZ":case"ZXY":case"ZYX":case"YZX":case"XZY":this.axisOrder=e;break;default:this.axisOrder="XYZ"}return this}},{key:"copy",value:function(e){return this.elements=e.elements,this.axisOrder=e.axisOrder,this}},{key:"clone",value:function(){return(new e).copy(this)}},{key:"equals",value:function(e){return this.elements[0]===e.elements[0]&&this.elements[1]===e.elements[1]&&this.elements[2]===e.elements[2]&&this.elements[3]===e.elements[3]&&this.axisOrder===e.axisOrder}},{key:"setFromVec3",value:function(e){var t=.5*e.x,i=.5*e.y,r=.5*e.z,s=Math.cos(t),n=Math.cos(i),a=Math.cos(r),o=Math.sin(t),h=Math.sin(i),l=Math.sin(r);return"XYZ"===this.axisOrder?(this.elements[0]=o*n*a+s*h*l,this.elements[1]=s*h*a-o*n*l,this.elements[2]=s*n*l+o*h*a,this.elements[3]=s*n*a-o*h*l):"YXZ"===this.axisOrder?(this.elements[0]=o*n*a+s*h*l,this.elements[1]=s*h*a-o*n*l,this.elements[2]=s*n*l-o*h*a,this.elements[3]=s*n*a+o*h*l):"ZXY"===this.axisOrder?(this.elements[0]=o*n*a-s*h*l,this.elements[1]=s*h*a+o*n*l,this.elements[2]=s*n*l+o*h*a,this.elements[3]=s*n*a-o*h*l):"ZYX"===this.axisOrder?(this.elements[0]=o*n*a-s*h*l,this.elements[1]=s*h*a+o*n*l,this.elements[2]=s*n*l-o*h*a,this.elements[3]=s*n*a+o*h*l):"YZX"===this.axisOrder?(this.elements[0]=o*n*a+s*h*l,this.elements[1]=s*h*a+o*n*l,this.elements[2]=s*n*l-o*h*a,this.elements[3]=s*n*a-o*h*l):"XZY"===this.axisOrder&&(this.elements[0]=o*n*a-s*h*l,this.elements[1]=s*h*a-o*n*l,this.elements[2]=s*n*l+o*h*a,this.elements[3]=s*n*a+o*h*l),this}}]),e}(),I=new P,N=new w,V=new w,B=new w,W=new w,G=new w,X=new w,j=new w,H=new w,Y=new U,q=new w(.5,.5,0),Q=new w,Z=new w,K=new w,J=new w,$=new P,ee=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,i){var s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=n.widthSegments,o=n.heightSegments,h=n.renderOrder,l=n.depthTest,u=n.cullFace,d=n.uniforms,c=n.vertexShaderID,p=n.fragmentShaderID,f=n.vertexShader,g=n.fragmentShader,_=n.texturesOptions,m=n.crossOrigin,v=n.alwaysDraw,y=void 0!==v&&v,x=n.visible,b=void 0===x||x,k=n.transparent,R=void 0!==k&&k,P=n.drawCheckMargins,w=void 0===P?{top:0,right:0,bottom:0,left:0}:P,T=n.autoloadSources,S=void 0===T||T,C=n.watchScroll,E=void 0===C||C,M=n.fov,A=void 0===M?50:M;return _classCallCheck(this,r),(s=t.call(this,e,i,"Plane",{widthSegments:a,heightSegments:o,renderOrder:h,depthTest:l,cullFace:u,uniforms:d,vertexShaderID:c,fragmentShaderID:p,vertexShader:f,fragmentShader:g,texturesOptions:_,crossOrigin:m})).gl?(s.index=s.renderer.planes.length,s.target=null,s.alwaysDraw=y,s._shouldDraw=!0,s.visible=b,s._transparent=R,s.drawCheckMargins=w,s.autoloadSources=S,s.watchScroll=E,s._updateMVMatrix=!1,s.camera=new L({fov:A,width:s.renderer._boundingRect.width,height:s.renderer._boundingRect.height,pixelRatio:s.renderer.pixelRatio}),s._program.compiled&&(s._initPlane(),s.renderer.scene.addPlane(_assertThisInitialized(s)),s.renderer.planes.push(_assertThisInitialized(s))),s):_possibleConstructorReturn(s)}return _createClass(r,[{key:"_programRestored",value:function(){this.target&&this.setRenderTarget(this.renderer.renderTargets[this.target.index]),this._initMatrices(),this.setPerspective(this.camera.fov,this.camera.near,this.camera.far),this._setWorldSizes(),this._applyWorldPositions(),this.renderer.scene.addPlane(this);for(var e=0;e<this.textures.length;e++)this.textures[e]._parent=this,this.textures[e]._restoreContext();this._canDraw=!0}},{key:"_initPlane",value:function(){this._initTransformValues(),this._initPositions(),this.setPerspective(this.camera.fov,this.camera.near,this.camera.far),this._initSources()}},{key:"_initTransformValues",value:function(){var e=this;this.rotation=new w,this.rotation.onChange((function(){return e._applyRotation()})),this.quaternion=new U,this.relativeTranslation=new w,this.relativeTranslation.onChange((function(){return e._setTranslation()})),this._translation=new w,this.scale=new w(1),this.scale.onChange((function(){e.scale.z=1,e._applyScale()})),this.transformOrigin=new w(.5,.5,0),this.transformOrigin.onChange((function(){e._setWorldTransformOrigin(),e._updateMVMatrix=!0}))}},{key:"resetPlane",value:function(e){this._initTransformValues(),this._setWorldTransformOrigin(),null!==e&&e?(this.htmlElement=e,this.resize()):e||this.renderer.production||i(this.type+": You are trying to reset a plane with a HTML element that does not exist. The old HTML element will be kept instead.")}},{key:"removeRenderTarget",value:function(){this.target&&(this.renderer.scene.removePlane(this),this.target=null,this.renderer.scene.addPlane(this))}},{key:"_initPositions",value:function(){this._initMatrices(),this._setWorldSizes(),this._applyWorldPositions()}},{key:"_initMatrices",value:function(){var e=new R;this._matrices={world:{matrix:e},modelView:{name:"uMVMatrix",matrix:e,location:this.gl.getUniformLocation(this._program.program,"uMVMatrix")},projection:{name:"uPMatrix",matrix:e,location:this.gl.getUniformLocation(this._program.program,"uPMatrix")},modelViewProjection:{matrix:e}}}},{key:"_setPerspectiveMatrix",value:function(){this.camera._shouldUpdate&&(this.renderer.useProgram(this._program),this.gl.uniformMatrix4fv(this._matrices.projection.location,!1,this._matrices.projection.matrix.elements)),this.camera.cancelUpdate()}},{key:"setPerspective",value:function(e,t,i){this.camera.setPerspective(e,t,i,this.renderer._boundingRect.width,this.renderer._boundingRect.height,this.renderer.pixelRatio),this.renderer.state.isContextLost&&this.camera.forceUpdate(),this._matrices.projection.matrix=this.camera.projectionMatrix,this.camera._shouldUpdate&&(this._setWorldSizes(),this._applyWorldPositions(),this._translation.z=this.relativeTranslation.z/this.camera.CSSPerspective),this._updateMVMatrix=this.camera._shouldUpdate}},{key:"_setMVMatrix",value:function(){this._updateMVMatrix&&(this._matrices.world.matrix=this._matrices.world.matrix.composeFromOrigin(this._translation,this.quaternion,this.scale,this._boundingRect.world.transformOrigin),this._matrices.world.matrix.scale({x:this._boundingRect.world.width,y:this._boundingRect.world.height,z:1}),this._matrices.modelView.matrix.copy(this._matrices.world.matrix),this._matrices.modelView.matrix.elements[14]-=this.camera.position.z,this._matrices.modelViewProjection.matrix=this._matrices.projection.matrix.multiply(this._matrices.modelView.matrix),this.alwaysDraw||this._shouldDrawCheck(),this.renderer.useProgram(this._program),this.gl.uniformMatrix4fv(this._matrices.modelView.location,!1,this._matrices.modelView.matrix.elements)),this._updateMVMatrix=!1}},{key:"_setWorldTransformOrigin",value:function(){this._boundingRect.world.transformOrigin=new w((2*this.transformOrigin.x-1)*this._boundingRect.world.width,-(2*this.transformOrigin.y-1)*this._boundingRect.world.height,this.transformOrigin.z)}},{key:"_documentToWorldSpace",value:function(e){return V.set(e.x*this.renderer.pixelRatio/this.renderer._boundingRect.width*this._boundingRect.world.ratios.width,-e.y*this.renderer.pixelRatio/this.renderer._boundingRect.height*this._boundingRect.world.ratios.height,e.z)}},{key:"_setWorldSizes",value:function(){var e=this.camera.getScreenRatiosFromFov();this._boundingRect.world={width:this._boundingRect.document.width/this.renderer._boundingRect.width*e.width/2,height:this._boundingRect.document.height/this.renderer._boundingRect.height*e.height/2,ratios:e},this._setWorldTransformOrigin()}},{key:"_setWorldPosition",value:function(){var e=this._boundingRect.document.width/2+this._boundingRect.document.left,t=this._boundingRect.document.height/2+this._boundingRect.document.top,i=this.renderer._boundingRect.width/2+this.renderer._boundingRect.left,r=this.renderer._boundingRect.height/2+this.renderer._boundingRect.top;this._boundingRect.world.top=(r-t)/this.renderer._boundingRect.height*this._boundingRect.world.ratios.height,this._boundingRect.world.left=(e-i)/this.renderer._boundingRect.width*this._boundingRect.world.ratios.width}},{key:"setScale",value:function(e){e.type&&"Vec2"===e.type?(e.sanitizeNaNValuesWith(this.scale).max(I.set(.001,.001)),e.x===this.scale.x&&e.y===this.scale.y||(this.scale.set(e.x,e.y,1),this._applyScale())):this.renderer.production||i(this.type+": Cannot set scale because the parameter passed is not of Vec2 type:",e)}},{key:"_applyScale",value:function(){for(var e=0;e<this.textures.length;e++)this.textures[e].resize();this._updateMVMatrix=!0}},{key:"setRotation",value:function(e){e.type&&"Vec3"===e.type?(e.sanitizeNaNValuesWith(this.rotation),e.equals(this.rotation)||(this.rotation.copy(e),this._applyRotation())):this.renderer.production||i(this.type+": Cannot set rotation because the parameter passed is not of Vec3 type:",e)}},{key:"_applyRotation",value:function(){this.quaternion.setFromVec3(this.rotation),this._updateMVMatrix=!0}},{key:"setTransformOrigin",value:function(e){e.type&&"Vec3"===e.type?(e.sanitizeNaNValuesWith(this.transformOrigin),e.equals(this.transformOrigin)||(this.transformOrigin.copy(e),this._setWorldTransformOrigin(),this._updateMVMatrix=!0)):this.renderer.production||i(this.type+": Cannot set transform origin because the parameter passed is not of Vec3 type:",e)}},{key:"_setTranslation",value:function(){var e=N.set(0,0,0);this.relativeTranslation.equals(e)||(e=this._documentToWorldSpace(this.relativeTranslation)),this._translation.set(this._boundingRect.world.left+e.x,this._boundingRect.world.top+e.y,this.relativeTranslation.z/this.camera.CSSPerspective),this._updateMVMatrix=!0}},{key:"setRelativeTranslation",value:function(e){e.type&&"Vec3"===e.type?(e.sanitizeNaNValuesWith(this.relativeTranslation),e.equals(this.relativeTranslation)||(this.relativeTranslation.copy(e),this._setTranslation())):this.renderer.production||i(this.type+": Cannot set translation because the parameter passed is not of Vec3 type:",e)}},{key:"_applyWorldPositions",value:function(){this._setWorldPosition(),this._setTranslation()}},{key:"updatePosition",value:function(){this._setDocumentSizes(),this._applyWorldPositions()}},{key:"updateScrollPosition",value:function(e,t){(e||t)&&(this._boundingRect.document.top+=t*this.renderer.pixelRatio,this._boundingRect.document.left+=e*this.renderer.pixelRatio,this._applyWorldPositions())}},{key:"_getIntersection",value:function(e,t){for(var i=t.clone().sub(e),r=e.clone();r.z>-1;)r.add(i);return r}},{key:"_getNearPlaneIntersections",value:function(e,t,i){var r=this._matrices.modelViewProjection.matrix;if(1===i.length)0===i[0]?(t[0]=this._getIntersection(t[1],j.set(.95,1,0).applyMat4(r)),t.push(this._getIntersection(t[3],H.set(-1,-.95,0).applyMat4(r)))):1===i[0]?(t[1]=this._getIntersection(t[0],j.set(-.95,1,0).applyMat4(r)),t.push(this._getIntersection(t[2],H.set(1,-.95,0).applyMat4(r)))):2===i[0]?(t[2]=this._getIntersection(t[3],j.set(-.95,-1,0).applyMat4(r)),t.push(this._getIntersection(t[1],H.set(1,.95,0).applyMat4(r)))):3===i[0]&&(t[3]=this._getIntersection(t[2],j.set(.95,-1,0).applyMat4(r)),t.push(this._getIntersection(t[0],H.set(-1,.95,0).applyMat4(r))));else if(2===i.length)0===i[0]&&1===i[1]?(t[0]=this._getIntersection(t[3],j.set(-1,-.95,0).applyMat4(r)),t[1]=this._getIntersection(t[2],H.set(1,-.95,0).applyMat4(r))):1===i[0]&&2===i[1]?(t[1]=this._getIntersection(t[0],j.set(-.95,1,0).applyMat4(r)),t[2]=this._getIntersection(t[3],H.set(-.95,-1,0).applyMat4(r))):2===i[0]&&3===i[1]?(t[2]=this._getIntersection(t[1],j.set(1,.95,0).applyMat4(r)),t[3]=this._getIntersection(t[0],H.set(-1,.95,0).applyMat4(r))):0===i[0]&&3===i[1]&&(t[0]=this._getIntersection(t[1],j.set(.95,1,0).applyMat4(r)),t[3]=this._getIntersection(t[2],H.set(.95,-1,0).applyMat4(r)));else if(3===i.length){for(var s=0,n=0;n<e.length;n++)i.includes(n)||(s=n);t=[t[s]],0===s?(t.push(this._getIntersection(t[0],j.set(-.95,1,0).applyMat4(r))),t.push(this._getIntersection(t[0],H.set(-1,.95,0).applyMat4(r)))):1===s?(t.push(this._getIntersection(t[0],j.set(.95,1,0).applyMat4(r))),t.push(this._getIntersection(t[0],H.set(1,.95,0).applyMat4(r)))):2===s?(t.push(this._getIntersection(t[0],j.set(.95,-1,0).applyMat4(r))),t.push(this._getIntersection(t[0],H.set(1,-.95,0).applyMat4(r)))):3===s&&(t.push(this._getIntersection(t[0],j.set(-.95,-1,0).applyMat4(r))),t.push(this._getIntersection(t[0],H.set(-1.95,0).applyMat4(r))))}else for(var a=0;a<e.length;a++)t[a][0]=1e4,t[a][1]=1e4;return t}},{key:"_getWorldCoords",value:function(){for(var e=[B.set(-1,1,0),W.set(1,1,0),G.set(1,-1,0),X.set(-1,-1,0)],t=[],i=[],r=0;r<e.length;r++){var s=e[r].applyMat4(this._matrices.modelViewProjection.matrix);t.push(s),Math.abs(s.z)>1&&i.push(r)}i.length&&(t=this._getNearPlaneIntersections(e,t,i));for(var n=1/0,a=-1/0,o=1/0,h=-1/0,l=0;l<t.length;l++){var u=t[l];u.x<n&&(n=u.x),u.x>a&&(a=u.x),u.y<o&&(o=u.y),u.y>h&&(h=u.y)}return{top:h,right:a,bottom:o,left:n}}},{key:"_computeWebGLBoundingRect",value:function(){var e=this._getWorldCoords(),t={top:1-(e.top+1)/2,right:(e.right+1)/2,bottom:1-(e.bottom+1)/2,left:(e.left+1)/2};t.width=t.right-t.left,t.height=t.bottom-t.top,this._boundingRect.worldToDocument={width:t.width*this.renderer._boundingRect.width,height:t.height*this.renderer._boundingRect.height,top:t.top*this.renderer._boundingRect.height+this.renderer._boundingRect.top,left:t.left*this.renderer._boundingRect.width+this.renderer._boundingRect.left,right:t.left*this.renderer._boundingRect.width+this.renderer._boundingRect.left+t.width*this.renderer._boundingRect.width,bottom:t.top*this.renderer._boundingRect.height+this.renderer._boundingRect.top+t.height*this.renderer._boundingRect.height}}},{key:"getWebGLBoundingRect",value:function(){return this._matrices.modelViewProjection?(this._boundingRect.worldToDocument&&!this.alwaysDraw||this._computeWebGLBoundingRect(),this._boundingRect.worldToDocument):this._boundingRect.document}},{key:"_getWebGLDrawRect",value:function(){return this._computeWebGLBoundingRect(),{top:this._boundingRect.worldToDocument.top-this.drawCheckMargins.top,right:this._boundingRect.worldToDocument.right+this.drawCheckMargins.right,bottom:this._boundingRect.worldToDocument.bottom+this.drawCheckMargins.bottom,left:this._boundingRect.worldToDocument.left-this.drawCheckMargins.left}}},{key:"_shouldDrawCheck",value:function(){var e=this,t=this._getWebGLDrawRect();Math.round(t.right)<=this.renderer._boundingRect.left||Math.round(t.left)>=this.renderer._boundingRect.left+this.renderer._boundingRect.width||Math.round(t.bottom)<=this.renderer._boundingRect.top||Math.round(t.top)>=this.renderer._boundingRect.top+this.renderer._boundingRect.height?this._shouldDraw&&(this._shouldDraw=!1,this.renderer.nextRender.add((function(){return e._onLeaveViewCallback&&e._onLeaveViewCallback()}))):(this._shouldDraw||this.renderer.nextRender.add((function(){return e._onReEnterViewCallback&&e._onReEnterViewCallback()})),this._shouldDraw=!0)}},{key:"isDrawn",value:function(){return this._canDraw&&this.visible&&(this._shouldDraw||this.alwaysDraw)}},{key:"enableDepthTest",value:function(e){this._depthTest=e}},{key:"_initSources",value:function(){var e=0;if(this.autoloadSources){var t=this.htmlElement.getElementsByTagName("img"),i=this.htmlElement.getElementsByTagName("video"),r=this.htmlElement.getElementsByTagName("canvas");t.length&&this.loadImages(t),i.length&&this.loadVideos(i),r.length&&this.loadCanvases(r),e=t.length+i.length+r.length}this.loader._setLoaderSize(e),this._canDraw=!0}},{key:"_startDrawing",value:function(){this._canDraw&&(this._onRenderCallback&&this._onRenderCallback(),this.target?this.renderer.bindFrameBuffer(this.target):null===this.renderer.state.scenePassIndex&&this.renderer.bindFrameBuffer(null),this._setPerspectiveMatrix(),this._setMVMatrix(),(this.alwaysDraw||this._shouldDraw)&&this.visible&&this._draw())}},{key:"mouseToPlaneCoords",value:function(e){if(Y.setAxisOrder(this.quaternion.axisOrder),Y.equals(this.quaternion)&&q.equals(this.transformOrigin))return _get(_getPrototypeOf(r.prototype),"mouseToPlaneCoords",this).call(this,e);var t={x:e.x/(this.renderer._boundingRect.width/this.renderer.pixelRatio)*2-1,y:2*(1-e.y/(this.renderer._boundingRect.height/this.renderer.pixelRatio))-1},i=this.camera.position.clone(),s=Q.set(t.x,t.y,-.5);s.unproject(this.camera),s.sub(i).normalize();var n=Z.set(0,0,-1);n.applyQuat(this.quaternion).normalize();var a=J.set(0,0,0),o=n.dot(s);if(Math.abs(o)>=1e-4){var h=this._matrices.world.matrix.getInverse().multiply(this.camera.viewMatrix),l=this._boundingRect.world.transformOrigin.clone().add(this._translation),u=K.set(this._translation.x-l.x,this._translation.y-l.y,this._translation.z-l.z);u.applyQuat(this.quaternion),l.add(u);var d=n.dot(l.clone().sub(i))/o;a.copy(i.add(s.multiplyScalar(d))),a.applyMat4(h)}else a.set(1/0,1/0,1/0);return $.set(a.x,a.y)}},{key:"onReEnterView",value:function(e){return e&&(this._onReEnterViewCallback=e),this}},{key:"onLeaveView",value:function(e){return e&&(this._onLeaveViewCallback=e),this}}]),r}(z),te=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.shaderPass,a=i.depth,o=void 0!==a&&a,h=i.clear,l=void 0===h||h,u=i.maxWidth,d=i.maxHeight,c=i.minWidth,p=void 0===c?1024:c,f=i.minHeight,g=void 0===f?1024:f,_=i.texturesOptions,m=void 0===_?{}:_;if(_classCallCheck(this,e),this.type="RenderTarget",(t=t&&t.renderer||t)&&"Renderer"===t.type){if(!t.gl)return void(t.production||r(this.type+": Unable to create a "+this.type+" because the Renderer WebGL context is not defined"))}else r(this.type+": Renderer not passed as first argument",t);this.renderer=t,this.gl=this.renderer.gl,this.index=this.renderer.renderTargets.length,this._shaderPass=n,this._depth=o,this._shouldClear=l,this._maxSize={width:u?Math.min(this.renderer.state.maxTextureSize/4,u):this.renderer.state.maxTextureSize/4,height:d?Math.min(this.renderer.state.maxTextureSize/4,d):this.renderer.state.maxTextureSize/4},this._minSize={width:p*this.renderer.pixelRatio,height:g*this.renderer.pixelRatio},m=Object.assign({sampler:"uRenderTexture",isFBOTexture:!0,premultiplyAlpha:!1,anisotropy:1,generateMipmap:!1,floatingPoint:"none",wrapS:this.gl.CLAMP_TO_EDGE,wrapT:this.gl.CLAMP_TO_EDGE,minFilter:this.gl.LINEAR,magFilter:this.gl.LINEAR},m),this._texturesOptions=m,this.userData={},this.uuid=s(),this.renderer.renderTargets.push(this),this.renderer.onSceneChange(),this._initRenderTarget()}return _createClass(e,[{key:"_initRenderTarget",value:function(){this._setSize(),this.textures=[],this._createFrameBuffer()}},{key:"_restoreContext",value:function(){this._setSize(),this._createFrameBuffer()}},{key:"_setSize",value:function(){this._shaderPass&&this._shaderPass._isScenePass?this._size={width:this.renderer._boundingRect.width,height:this.renderer._boundingRect.height}:this._size={width:Math.min(this._maxSize.width,Math.max(this._minSize.width,this.renderer._boundingRect.width)),height:Math.min(this._maxSize.height,Math.max(this._minSize.height,this.renderer._boundingRect.height))}}},{key:"resize",value:function(){this._shaderPass&&(this._setSize(),this.textures[0].resize(),this.renderer.bindFrameBuffer(this,!0),this._depth&&this._bindDepthBuffer(),this.renderer.bindFrameBuffer(null))}},{key:"_bindDepthBuffer",value:function(){this._depthBuffer&&(this.gl.bindRenderbuffer(this.gl.RENDERBUFFER,this._depthBuffer),this.gl.renderbufferStorage(this.gl.RENDERBUFFER,this.gl.DEPTH_COMPONENT16,this._size.width,this._size.height),this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER,this.gl.DEPTH_ATTACHMENT,this.gl.RENDERBUFFER,this._depthBuffer))}},{key:"_createFrameBuffer",value:function(){(this._frameBuffer=this.gl.createFramebuffer(),this.renderer.bindFrameBuffer(this,!0),this.textures.length)?(this.textures[0]._parent=this,this.textures[0]._restoreContext()):new E(this.renderer,this._texturesOptions).addParent(this);this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,this.gl.TEXTURE_2D,this.textures[0]._sampler.texture,0),this._depth&&(this._depthBuffer=this.gl.createRenderbuffer(),this._bindDepthBuffer()),this.renderer.bindFrameBuffer(null)}},{key:"getTexture",value:function(){return this.textures[0]}},{key:"remove",value:function(){this._shaderPass?this.renderer.production||i(this.type+": You're trying to remove a RenderTarget attached to a ShaderPass. You should remove that ShaderPass instead:",this._shaderPass):(this._dispose(),this.renderer.removeRenderTarget(this))}},{key:"_dispose",value:function(){this._frameBuffer&&(this.gl.deleteFramebuffer(this._frameBuffer),this._frameBuffer=null),this._depthBuffer&&(this.gl.deleteRenderbuffer(this._depthBuffer),this._depthBuffer=null),this.textures[0]._dispose(),this.textures=[]}}]),e}(),ie=function(e){_inherits(i,e);var t=_createSuper(i);function i(e){var r,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=s.widthSegments,a=s.heightSegments,o=s.renderOrder,h=s.depthTest,l=s.cullFace,u=s.uniforms,d=s.vertexShaderID,c=s.fragmentShaderID,p=s.vertexShader,f=s.fragmentShader,g=s.texturesOptions,_=s.crossOrigin,m=s.depth,v=void 0!==m&&m,y=s.clear,x=void 0===y||y,b=s.renderTarget;return _classCallCheck(this,i),n=1,a=1,l="back",(r=t.call(this,e,e.container,"ShaderPass",{widthSegments:n,heightSegments:a,renderOrder:o,depthTest:h,cullFace:l,uniforms:u,vertexShaderID:d,fragmentShaderID:c,vertexShader:p,fragmentShader:f,texturesOptions:g,crossOrigin:_})).gl?(r._isScenePass=!0,r.index=r.renderer.shaderPasses.length,r._depth=v,r._shouldClear=x,r.target=b,r.target&&(r._isScenePass=!1,r._shouldClear=r.target._shouldClear),r._program.compiled&&(r._initShaderPass(),r.renderer.shaderPasses.push(_assertThisInitialized(r)),r.renderer.nextRender.add((function(){r.renderer.scene.addShaderPass(_assertThisInitialized(r))}))),r):_possibleConstructorReturn(r)}return _createClass(i,[{key:"_programRestored",value:function(){this.renderer.scene.addShaderPass(this);for(var e=0;e<this.textures.length;e++)this.textures[e]._parent=this,this.textures[e]._restoreContext();this._canDraw=!0}},{key:"_initShaderPass",value:function(){this.target?(this.setRenderTarget(this.target),this.target._shaderPass=this):this._createFrameBuffer(),new E(this.renderer,{sampler:"uRenderTexture",isFBOTexture:!0,fromTexture:this.target.getTexture()}).addParent(this),this.loader._setLoaderSize(0),this._canDraw=!0,this.renderer.needRender()}},{key:"_createFrameBuffer",value:function(){var e=new te(this.renderer,{shaderPass:this,clear:this._shouldClear,depth:this._depth,texturesOptions:this._texturesOptions});this.setRenderTarget(e)}},{key:"_startDrawing",value:function(){this._canDraw&&(this._onRenderCallback&&this._onRenderCallback(),this._isScenePass?this.renderer.state.scenePassIndex+1<this.renderer.scene.stacks.scenePasses.length?(this.renderer.bindFrameBuffer(this.renderer.scene.stacks.scenePasses[this.renderer.state.scenePassIndex+1].target),this.renderer.state.scenePassIndex++):this.renderer.bindFrameBuffer(null):null===this.renderer.state.scenePassIndex&&this.renderer.bindFrameBuffer(null),this.renderer.state.forceBufferUpdate=!0,this._draw())}}]),i}(z),re=function(e){_inherits(i,e);var t=_createSuper(i);function i(e,r){var s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=n.sampler,o=void 0===a?"uPingPongTexture":a,h=n.widthSegments,l=n.heightSegments,u=n.renderOrder,d=n.depthTest,c=n.cullFace,p=n.uniforms,f=n.vertexShaderID,g=n.fragmentShaderID,_=n.vertexShader,m=n.fragmentShader,v=n.texturesOptions,y=n.crossOrigin,x=n.alwaysDraw,b=n.visible,k=n.transparent,R=n.drawCheckMargins,P=n.autoloadSources,w=n.watchScroll,T=n.fov;if(_classCallCheck(this,i),d=!1,P=!1,!(s=t.call(this,e,r,{widthSegments:h,heightSegments:l,renderOrder:u,depthTest:d,cullFace:c,uniforms:p,vertexShaderID:f,fragmentShaderID:g,vertexShader:_,fragmentShader:m,texturesOptions:v,crossOrigin:y,alwaysDraw:x,visible:b,transparent:k,drawCheckMargins:R,autoloadSources:P,watchScroll:w,fov:T})).gl)return _possibleConstructorReturn(s);s.renderer.scene.removePlane(_assertThisInitialized(s)),s.type="PingPongPlane",s.renderer.scene.addPlane(_assertThisInitialized(s)),s.readPass=new te(e,{depth:!1,clear:!1,texturesOptions:v}),s.writePass=new te(e,{depth:!1,clear:!1,texturesOptions:v}),s.createTexture({sampler:o});var S=0;return s.readPass.getTexture().onSourceUploaded((function(){S++,s._checkIfReady(S)})),s.writePass.getTexture().onSourceUploaded((function(){S++,s._checkIfReady(S)})),s.setRenderTarget(s.readPass),s._onRenderCallback=function(){s.readPass&&s.writePass&&s.textures[0]&&s.textures[0]._uploaded&&s.setRenderTarget(s.writePass),s._onPingPongRenderCallback&&s._onPingPongRenderCallback()},s._onAfterRenderCallback=function(){s.readPass&&s.writePass&&s.textures[0]&&s.textures[0]._uploaded&&s._swapPasses(),s._onPingPongAfterRenderCallback&&s._onPingPongAfterRenderCallback()},s}return _createClass(i,[{key:"_checkIfReady",value:function(e){var t=this;2===e&&this.renderer.nextRender.add((function(){t.textures[0].copy(t.target.getTexture())}))}},{key:"_swapPasses",value:function(){var e=this.readPass;this.readPass=this.writePass,this.writePass=e,this.textures[0].copy(this.readPass.getTexture())}},{key:"getTexture",value:function(){return this.textures[0]}},{key:"onRender",value:function(e){return e&&(this._onPingPongRenderCallback=e),this}},{key:"onAfterRender",value:function(e){return e&&(this._onPingPongAfterRenderCallback=e),this}},{key:"remove",value:function(){this.target=null,this.renderer.bindFrameBuffer(null),this.writePass&&(this.writePass.remove(),this.writePass=null),this.readPass&&(this.readPass.remove(),this.readPass=null),_get(_getPrototypeOf(i.prototype),"remove",this).call(this)}}]),i}(ee),se=function(e){_inherits(i,e);var t=_createSuper(i);function i(e){var r,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=s.renderOrder,a=s.depthTest,o=s.texturesOptions,h=s.crossOrigin,l=s.depth,u=s.clear,d=s.renderTarget;_classCallCheck(this,i);var c="\n            precision mediump float;\n            \n            varying vec3 vVertexPosition;\n            varying vec2 vTextureCoord;\n        \n            uniform sampler2D uRenderTexture;\n            \n            uniform vec2 uResolution;\n            \n            #define FXAA_REDUCE_MIN   (1.0/128.0)\n            #define FXAA_REDUCE_MUL   (1.0/8.0)\n            #define FXAA_SPAN_MAX     8.0\n            \n            void main(){\n                vec2 res=1.0 / uResolution;\n            \n                vec3 rgbNW=texture2D(uRenderTexture, (vTextureCoord.xy + vec2(-1.0, -1.0) * res)).xyz;\n                vec3 rgbNE=texture2D(uRenderTexture, (vTextureCoord.xy + vec2(1.0, -1.0) * res)).xyz;\n                vec3 rgbSW=texture2D(uRenderTexture, (vTextureCoord.xy + vec2(-1.0, 1.0) * res)).xyz;\n                vec3 rgbSE=texture2D(uRenderTexture, (vTextureCoord.xy + vec2(1.0, 1.0) * res)).xyz;\n                vec4 rgbaM=texture2D(uRenderTexture, vTextureCoord.xy * res);\n                vec3 rgbM=rgbaM.xyz;\n                vec3 luma=vec3(0.299, 0.587, 0.114);\n            \n                float lumaNW=dot(rgbNW, luma);\n                float lumaNE=dot(rgbNE, luma);\n                float lumaSW=dot(rgbSW, luma);\n                float lumaSE=dot(rgbSE, luma);\n                float lumaM=dot(rgbM,  luma);\n                float lumaMin=min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n                float lumaMax=max(lumaM, max(max(lumaNW, lumaNE) , max(lumaSW, lumaSE)));\n            \n                vec2 dir;\n                dir.x=-((lumaNW + lumaNE) - (lumaSW + lumaSE));\n                dir.y=((lumaNW + lumaSW) - (lumaNE + lumaSE));\n            \n                float dirReduce=max((lumaNW + lumaNE + lumaSW + lumaSE) * (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n            \n                float rcpDirMin=1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n                dir=min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n                      max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n                            dir * rcpDirMin)) * res;\n                vec4 rgbA=(1.0/2.0) * (\n                texture2D(uRenderTexture, vTextureCoord.xy + dir * (1.0/3.0 - 0.5)) +\n                texture2D(uRenderTexture, vTextureCoord.xy + dir * (2.0/3.0 - 0.5)));\n                vec4 rgbB=rgbA * (1.0/2.0) + (1.0/4.0) * (\n                texture2D(uRenderTexture, vTextureCoord.xy + dir * (0.0/3.0 - 0.5)) +\n                texture2D(uRenderTexture, vTextureCoord.xy + dir * (3.0/3.0 - 0.5)));\n                float lumaB=dot(rgbB, vec4(luma, 0.0));\n            \n                if((lumaB < lumaMin)||(lumaB > lumaMax)){\n                    gl_FragColor=rgbA;\n                }else{\n                    gl_FragColor=rgbB;\n                }\n            }\n        ",p={resolution:{name:"uResolution",type:"2f",value:[0,0]}};return(r=t.call(this,e,{fragmentShader:c,uniforms:p,renderOrder:n,depthTest:a,texturesOptions:o,crossOrigin:h,depth:l,clear:u,renderTarget:d})).gl?(r.uniforms.resolution.value=[r.renderer._boundingRect.width,r.renderer._boundingRect.height],r._onAfterResizeCallback=function(){r.uniforms.resolution.value=[r.renderer._boundingRect.width,r.renderer._boundingRect.height],r._onFXAAPassAfterResizeCallback&&r._onFXAAPassAfterResizeCallback()},r):_possibleConstructorReturn(r)}return _createClass(i,[{key:"onAfterResize",value:function(e){return e&&(this._onFXAAPassAfterResizeCallback=e),this}}]),i}(ie);e.Curtains=d,e.FXAAPass=se,e.Mat4=R,e.PingPongPlane=re,e.Plane=ee,e.Quat=U,e.RenderTarget=te,e.ShaderPass=ie,e.Texture=E,e.TextureLoader=M,e.Vec2=P,e.Vec3=w,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../ie","../version","../widget"],e):e(jQuery)}(function(o){"use strict";var n=!1;return o(document).on("mouseup",function(){n=!1}),o.widget("ui.mouse",{version:"1.13.3",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).on("click."+this.widgetName,function(e){if(!0===o.data(e.target,t.widgetName+".preventClickEvent"))return o.removeData(e.target,t.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){var t,i,s;if(!n)return this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),i=1===(this._mouseDownEvent=e).which,s=!("string"!=typeof(t=this).options.cancel||!e.target.nodeName)&&o(e.target).closest(this.options.cancel).length,i&&!s&&this._mouseCapture(e)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){t.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?e.preventDefault():(!0===o.data(e.target,this.widgetName+".preventClickEvent")&&o.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return t._mouseMove(e)},this._mouseUpDelegate=function(e){return t._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0)),!0},_mouseMove:function(e){if(this._mouseMoved){if(o.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&o.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})});
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","../keycode","../version","../widget"],e):e(jQuery)}(function(o){"use strict";return o.widget("ui.slider",o.ui.mouse,{version:"1.13.3",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,t=this.options,i=this.element.find(".ui-slider-handle"),s=[],a=t.values&&t.values.length||1;for(i.length>a&&(i.slice(a).remove(),i=i.slice(0,a)),e=i.length;e<a;e++)s.push("<span tabindex='0'></span>");this.handles=i.add(o(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){o(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:Array.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=o("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==e.range&&"max"!==e.range||this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,a,n,t,h,l=this,u=this.options;return!u.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var t=Math.abs(i-l.values(e));(t<s||s===t&&(e===l._lastChangedValue||l.values(e)===u.min))&&(s=t,a=o(this),n=e)}),!1!==this._start(e,n))&&(this._mouseSliding=!0,this._handleIndex=n,this._addClass(a,null,"ui-state-active"),a.trigger("focus"),t=a.offset(),h=!o(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-t.left-a.width()/2,top:e.pageY-t.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,n,i),this._animateOff=!0)},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},t=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,t),!1},_mouseStop:function(e){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,e="horizontal"===this.orientation?(t=this.elementSize.width,e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),e=e/t;return(e=1<e?1:e)<0&&(e=0),"vertical"===this.orientation&&(e=1-e),t=this._valueMax()-this._valueMin(),e=this._valueMin()+e*t,this._trimAlignValue(e)},_uiHash:function(e,t,i){var s={handle:this.handles[e],handleIndex:e,value:void 0!==t?t:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==t?t:this.values(e),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(e,t){return this._trigger("start",e,this._uiHash(t))},_slide:function(e,t,i){var s,a=this.value(),n=this.values();this._hasMultipleValues()&&(s=this.values(t?0:1),a=this.values(t),2===this.options.values.length&&!0===this.options.range&&(i=0===t?Math.min(s,i):Math.max(s,i)),n[t]=i),i!==a&&!1!==this._trigger("slide",e,this._uiHash(t,i,n))&&(this._hasMultipleValues()?this.values(t,i):this.value(i))},_stop:function(e,t){this._trigger("stop",e,this._uiHash(t))},_change:function(e,t){this._keySliding||this._mouseSliding||(this._lastChangedValue=t,this._trigger("change",e,this._uiHash(t)))},value:function(e){if(!arguments.length)return this._value();this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0)},values:function(e,t){var i,s,a;if(1<arguments.length)this.options.values[e]=this._trimAlignValue(t),this._refreshValue(),this._change(null,e);else{if(!arguments.length)return this._values();if(!Array.isArray(e))return this._hasMultipleValues()?this._values(e):this.value();for(i=this.options.values,s=e,a=0;a<i.length;a+=1)i[a]=this._trimAlignValue(s[a]),this._change(null,a);this._refreshValue()}},_setOption:function(e,t){var i,s=0;switch("range"===e&&!0===this.options.range&&("min"===t?(this.options.value=this._values(0),this.options.values=null):"max"===t&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),Array.isArray(this.options.values)&&(s=this.options.values.length),this._super(e,t),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(t),this.handles.css("horizontal"===t?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=s-1;0<=i;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(e){this._super(e),this._toggleClass(null,"ui-state-disabled",!!e)},_value:function(){var e=this.options.value;return this._trimAlignValue(e)},_values:function(e){var t,i;if(arguments.length)return e=this.options.values[e],this._trimAlignValue(e);if(this._hasMultipleValues()){for(t=this.options.values.slice(),i=0;i<t.length;i+=1)t[i]=this._trimAlignValue(t[i]);return t}return[]},_trimAlignValue:function(e){var t,i;return e<=this._valueMin()?this._valueMin():e>=this._valueMax()?this._valueMax():(t=0<this.options.step?this.options.step:1,i=e-(e=(e-this._valueMin())%t),2*Math.abs(e)>=t&&(i+=0<e?t:-t),parseFloat(i.toFixed(5)))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),i=this.options.step;(e=Math.round((e-t)/i)*i+t)>this.options.max&&(e-=i),this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return e=null!==this.options.min?Math.max(e,this._precisionOf(this.options.min)):e},_precisionOf:function(e){var e=e.toString(),t=e.indexOf(".");return-1===t?0:e.length-t-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(e){"vertical"===e&&this.range.css({width:"",left:""}),"horizontal"===e&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var t,i,e,s,a,n=this.options.range,h=this.options,l=this,u=!this._animateOff&&h.animate,r={};this._hasMultipleValues()?this.handles.each(function(e){i=(l.values(e)-l._valueMin())/(l._valueMax()-l._valueMin())*100,r["horizontal"===l.orientation?"left":"bottom"]=i+"%",o(this).stop(1,1)[u?"animate":"css"](r,h.animate),!0===l.options.range&&("horizontal"===l.orientation?(0===e&&l.range.stop(1,1)[u?"animate":"css"]({left:i+"%"},h.animate),1===e&&l.range[u?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:h.animate})):(0===e&&l.range.stop(1,1)[u?"animate":"css"]({bottom:i+"%"},h.animate),1===e&&l.range[u?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:h.animate}))),t=i}):(e=this.value(),s=this._valueMin(),a=this._valueMax(),i=a!==s?(e-s)/(a-s)*100:0,r["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[u?"animate":"css"](r,h.animate),"min"===n&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:i+"%"},h.animate),"max"===n&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:100-i+"%"},h.animate),"min"===n&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:i+"%"},h.animate),"max"===n&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:100-i+"%"},h.animate))},_handleEvents:{keydown:function(e){var t,i,s,a=o(e.target).data("ui-slider-handle-index");switch(e.keyCode){case o.ui.keyCode.HOME:case o.ui.keyCode.END:case o.ui.keyCode.PAGE_UP:case o.ui.keyCode.PAGE_DOWN:case o.ui.keyCode.UP:case o.ui.keyCode.RIGHT:case o.ui.keyCode.DOWN:case o.ui.keyCode.LEFT:if(e.preventDefault(),this._keySliding||(this._keySliding=!0,this._addClass(o(e.target),null,"ui-state-active"),!1!==this._start(e,a)))break;return}switch(s=this.options.step,t=i=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case o.ui.keyCode.HOME:i=this._valueMin();break;case o.ui.keyCode.END:i=this._valueMax();break;case o.ui.keyCode.PAGE_UP:i=this._trimAlignValue(t+(this._valueMax()-this._valueMin())/this.numPages);break;case o.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(t-(this._valueMax()-this._valueMin())/this.numPages);break;case o.ui.keyCode.UP:case o.ui.keyCode.RIGHT:if(t===this._valueMax())return;i=this._trimAlignValue(t+s);break;case o.ui.keyCode.DOWN:case o.ui.keyCode.LEFT:if(t===this._valueMin())return;i=this._trimAlignValue(t-s)}this._slide(e,a,i)},keyup:function(e){var t=o(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,t),this._change(e,t),this._removeClass(o(e.target),null,"ui-state-active"))}}})});
;(function ($){
"use strict";
var pxl_scroll_top;
var pxl_window_height;
var pxl_window_width;
var pxl_scroll_status='';
var pxl_last_scroll_top=0;
$(window).on('load', function (){
pxl_window_width=$(window).width();
digicove_loader();
digicove_col_offset();
digicove_header_sticky();
digicove_scroll_to_top();
digicove_footer_fixed();
digicove_quantity_icon();
backtotopIndicator();
digicove_panel_anchor_toggle();
digicove_webgl_effects();
digicove_document_click();
});
$(window).on('scroll', function (){
pxl_scroll_top=$(window).scrollTop();
pxl_window_height=$(window).height();
pxl_window_width=$(window).width();
if(pxl_scroll_top < pxl_last_scroll_top){
pxl_scroll_status='up';
}else{
pxl_scroll_status='down';
}
pxl_last_scroll_top=pxl_scroll_top;
digicove_header_sticky();
digicove_scroll_to_top();
digicove_footer_fixed();
});
$(document).ready(function (){
$('.pxl-circle-svg svg').each(function(){
var linearGradient=$(this).find('.linear-dot1');
if(linearGradient.length > 0){
var linearGradientId=linearGradient.attr('id');
}
var linearGradient1=$(this).find('.linear-dot2');
if(linearGradient1.length > 0){
var linearGradientId1=linearGradient1.attr('id');
}
digicove_circle_svg(this,linearGradientId,linearGradientId1);
});
const websiteUrlInput=$('#website-url');
const userEmailInput=$('#user-email');
const submitButton=$('#submit-button');
const resultContainer=$('#result-container');
if(websiteUrlInput.length&&userEmailInput.length&&submitButton.length&&resultContainer.length){
updateSubmitButtonState();
websiteUrlInput.on('input', updateSubmitButtonState);
userEmailInput.on('input', updateSubmitButtonState);
submitButton.on('click', function(){
const websiteUrl=websiteUrlInput.val().trim();
const userEmail=userEmailInput.val().trim();
if(websiteUrl&&userEmail){
resultContainer.css('display', 'block');
resultContainer.html('Loading...');
$.ajax({
url: `https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=${websiteUrl}`,
method: 'GET',
dataType: 'json',
success: function(data){
const performanceScore=data.lighthouseResult.categories.performance.score * 100;
const firstContentfulPaint=data.lighthouseResult.audits['first-contentful-paint'].displayValue;
const largestContentfulPaint=data.lighthouseResult.audits['largest-contentful-paint'].displayValue;
const totalBlockingTime=data.lighthouseResult.audits['total-blocking-time'].displayValue;
resultContainer.html(`
SEO Score for ${websiteUrl}: ${performanceScore}<br>
First Contentful Paint: ${firstContentfulPaint}<br>
Largest Contentful Paint: ${largestContentfulPaint}<br>
Total Blocking Time: ${totalBlockingTime}
`);
},
error: function(error){
resultContainer.html('Error loading data. Please try again later.');
console.error('Error calling the SEO score API:', error);
}});
}});
}
function updateSubmitButtonState(){
const websiteUrl=websiteUrlInput.val().trim();
const userEmail=userEmailInput.val().trim();
if(websiteUrl&&userEmail){
submitButton.prop('disabled', false);
}else{
submitButton.prop('disabled', true);
}}
var $digicove_menu=$('.pxl-header-elementor-main');
$digicove_menu.find('.pxl-menu-primary li').each(function (){
var $digicove_submenu=$(this).find('> ul.sub-menu');
if($digicove_submenu.length==1){
$(this).hover(function (){
if($digicove_submenu.offset().left + $digicove_submenu.width() > $(window).width()){
$digicove_submenu.addClass('pxl-sub-reverse');
}else if($digicove_submenu.offset().left < 0){
$digicove_submenu.addClass('pxl-sub-reverse');
}}, function (){
$digicove_submenu.removeClass('pxl-sub-reverse');
});
}});
var parallaxImg=$('.pxl-img-text .pxl-img');
if(pxl_window_width < 1200){
parallaxImg.removeAttr('data-parallax');
}
$('.pxl-header-menu li.menu-item-has-children, .pxl-nav-hidden li.menu-item-has-children, .pxl-menu-primary li.menu-item-has-children').append('<span class="pxl-menu-toggle"></span>');
$('.pxl-menu-toggle').on('click', function (){
if($(this).hasClass('active')){
$(this).closest('ul').find('.pxl-menu-toggle.active').toggleClass('active');
$(this).closest('ul').find('.sub-menu.active').toggleClass('active').slideToggle();
}else{
$(this).closest('ul').find('.pxl-menu-toggle.active').toggleClass('active');
$(this).closest('ul').find('.sub-menu.active').toggleClass('active').slideToggle();
$(this).toggleClass('active');
$(this).parent().find('> .sub-menu').toggleClass('active');
$(this).parent().find('> .sub-menu').slideToggle();
}});
$("#pxl-nav-mobile").on('click', function (){
$(this).toggleClass('active');
$('.pxl-header-menu').toggleClass('active');
});
$(".pxl-menu-close, .pxl-header-menu-backdrop").on('click', function (){
$(this).parents('.pxl-header-main').find('.pxl-header-menu').removeClass('active');
$('#pxl-nav-mobile').removeClass('active');
});
$('.pxl-nice-select, .woocommerce .woocommerce-ordering .orderby, #wp-block-archives-1, #wp-block-categories-1').each(function (){
$(this).niceSelect();
});
$('.woocommerce div.product form.cart .variations select').each(function (){
$(this).niceSelect();
});
var woo_nice_select=document.querySelectorAll('.woocommerce .nice-select');
woo_nice_select.forEach(function(){
var default_width=$('.woocommerce .woocommerce-product-inner').width();
$('.woocommerce .nice-select').css("min-width", default_width);
$(window).resize(function(){
var default_width=$('.woocommerce .woocommerce-product-inner').width();
$('.woocommerce .nice-select').css("min-width", default_width);
});
});
$('.pxl-type-header-clip > .elementor-container').append('<div class="pxl-header-shape"><span></span></div>');
$('.pxl-scroll-top').click(function (){
$('html, body').animate({scrollTop: 0}, 800);
return false;
});
$('.pxl-grid-masonry').each(function (){
var eltime=100;
var elt_inner=$(this).children().length;
var _elt=elt_inner - 1;
$(this).find('> .pxl-grid-item > .wow').each(function (index, obj){
$(this).css('animation-delay', eltime + 'ms');
if(_elt===index){
eltime=100;
_elt=_elt + elt_inner;
}else{
eltime=eltime + 60;
}});
});
var video_laptop=$('.pxl-video-player2');
if(video_laptop){
$(this).find('iframe').addClass('parallax-inner');
}
$(document).ready(function(){
const elements=document.querySelectorAll('.pxl-mask-bg-parallax');
elements.forEach(element=> {
const dataColor=element.getAttribute('data-color');
if(dataColor){
const { x, y, z }=JSON.parse(dataColor);
const gradient=`linear-gradient(${z}deg, ${x}, ${y})`;
element.style.background=gradient;
}});
});
$('.btn-video, .pxl-video-popup').magnificPopup({
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: false
});
$('.comment-reply a').append('<i class="common icon-arrow-forward-ne1"></i>');
if($('.pxl-page-title-default-bg').hasClass('pxl--parallax')){
$(this).stellar();
}
$('.btn-hover').each(function (){
$(this).hover(function (){
$(this).parents('.item-feature').find('.btn-hover').removeClass('active');
$(this).addClass('active');
});
});
$('.pxl--widget-hover').each(function (){
$(this).hover(function (){
$(this).parents('.elementor-row').find('.pxl--widget-hover').removeClass('pxl--item-active');
$(this).parents('.elementor-container').find('.pxl--widget-hover').removeClass('pxl--item-active');
$(this).addClass('pxl--item-active');
});
});
$('.btn-plus-text').hover(function (){
$(this).find('span').toggle(300);
});
$(".pxl-nav-button").on('click', function (){
$(this).toggleClass('active');
$(this).parent().find('.pxl-nav-wrap').toggle(400);
});
var boxEls=$('.el-bounce, .pxl-image-effect1');
$.each(boxEls, function(boxIndex, boxEl){
loopToggleClass(boxEl, 'bounce-active');
});
function loopToggleClass(el, toggleClass){
el=$(el);
let counter=0;
if(el.hasClass(toggleClass)){
waitFor(function (){
counter++;
return counter==2;
}, function (){
counter=0;
el.removeClass(toggleClass);
loopToggleClass(el, toggleClass);
}, 'Deactivate', 1000);
}else{
waitFor(function (){
counter++;
return counter==3;
}, function (){
counter=0;
el.addClass(toggleClass);
loopToggleClass(el, toggleClass);
}, 'Activate', 1000);
}}
function waitFor(condition, callback, message, time){
if(message==null||message==''||typeof message=='undefined'){
message='Timeout';
}
if(time==null||time==''||typeof time=='undefined'){
time=100;
}
var cond=condition();
if(cond){
callback();
}else{
setTimeout(function(){
console.log(message);
waitFor(condition, callback, message, time);
}, time);
}}
var btn_comment=$('#comments .form-submit');
if(btn_comment){
btn_comment.append('<span class="button-arrow-hover"><svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22" fill="none"><path d="M20.2202 0.845311L7.31632 0.646853C6.97468 0.647537 6.6511 0.782449 6.41528 1.02253C6.17946 1.26262 6.05027 1.58866 6.05552 1.93045C6.06078 2.27223 6.20007 2.60241 6.44339 2.84986C6.6867 3.09731 7.01458 3.24224 7.35641 3.25344L17.1136 3.4035L1.15375 19.3633C0.913059 19.604 0.780827 19.9335 0.786144 20.2792C0.79146 20.6249 0.933891 20.9585 1.1821 21.2068C1.43031 21.455 1.76397 21.5974 2.10968 21.6027C2.45539 21.608 2.78482 21.4758 3.02552 21.2351L18.9854 5.27527L19.1354 15.0325C19.1351 15.2055 19.1692 15.3779 19.2358 15.5396C19.3024 15.7014 19.4002 15.8492 19.5234 15.9745C19.6467 16.0998 19.7929 16.2001 19.9535 16.2695C20.1141 16.3389 20.286 16.376 20.4591 16.3786C20.6322 16.3813 20.803 16.3495 20.9616 16.285C21.1202 16.2205 21.2634 16.1247 21.3828 16.0031C21.5022 15.8815 21.5955 15.7366 21.6572 15.5769C21.7188 15.4171 21.7477 15.2456 21.742 15.0725L21.5436 2.16865C21.5382 1.82301 21.3958 1.48943 21.1476 1.24127C20.8994 0.993105 20.5659 0.850679 20.2202 0.845311Z" fill="#FDFDFD"/></svg><svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22" fill="none"><path d="M20.2202 0.845311L7.31632 0.646853C6.97468 0.647537 6.6511 0.782449 6.41528 1.02253C6.17946 1.26262 6.05027 1.58866 6.05552 1.93045C6.06078 2.27223 6.20007 2.60241 6.44339 2.84986C6.6867 3.09731 7.01458 3.24224 7.35641 3.25344L17.1136 3.4035L1.15375 19.3633C0.913059 19.604 0.780827 19.9335 0.786144 20.2792C0.79146 20.6249 0.933891 20.9585 1.1821 21.2068C1.43031 21.455 1.76397 21.5974 2.10968 21.6027C2.45539 21.608 2.78482 21.4758 3.02552 21.2351L18.9854 5.27527L19.1354 15.0325C19.1351 15.2055 19.1692 15.3779 19.2358 15.5396C19.3024 15.7014 19.4002 15.8492 19.5234 15.9745C19.6467 16.0998 19.7929 16.2001 19.9535 16.2695C20.1141 16.3389 20.286 16.376 20.4591 16.3786C20.6322 16.3813 20.803 16.3495 20.9616 16.285C21.1202 16.2205 21.2634 16.1247 21.3828 16.0031C21.5022 15.8815 21.5955 15.7366 21.6572 15.5769C21.7188 15.4171 21.7477 15.2456 21.742 15.0725L21.5436 2.16865C21.5382 1.82301 21.3958 1.48943 21.1476 1.24127C20.8994 0.993105 20.5659 0.850679 20.2202 0.845311Z" fill="#FDFDFD"/></svg></span>');
}
if($('.pxl-image-tilt').length){
$('.pxl-image-tilt').parents('.elementor-top-section').addClass('pxl-image-tilt-active');
$('.pxl-image-tilt').each(function (){
var pxl_maxtilt=$(this).data('maxtilt'),
pxl_speedtilt=$(this).data('speedtilt'),
pxl_perspectivetilt=$(this).data('perspectivetilt');
VanillaTilt.init(this, {
max: pxl_maxtilt,
speed: pxl_speedtilt,
perspective: pxl_perspectivetilt
});
});
}
$('.wpcf7-select').each(function(){
var $this=$(this), numberOfOptions=$(this).children('option').length;
$this.addClass('pxl-select-hidden');
$this.wrap('<div class="pxl-select"></div>');
$this.after('<div class="pxl-select-higthlight"></div>');
var $styledSelect=$this.next('div.pxl-select-higthlight');
$styledSelect.text($this.children('option').eq(0).text());
var $list=$('<ul />', {
'class': 'pxl-select-options'
}).insertAfter($styledSelect);
for (var i=0; i < numberOfOptions; i++){
$('<li />', {
text: $this.children('option').eq(i).text(),
rel: $this.children('option').eq(i).val()
}).appendTo($list);
}
var $listItems=$list.children('li');
$styledSelect.click(function(e){
e.stopPropagation();
$('div.pxl-select-higthlight.active').not(this).each(function(){
$(this).removeClass('active').next('ul.pxl-select-options').addClass('pxl-select-lists-hide');
});
$(this).toggleClass('active');
});
$listItems.click(function(e){
e.stopPropagation();
$styledSelect.text($(this).text()).removeClass('active');
$this.val($(this).attr('rel'));
});
$(document).click(function(){
$styledSelect.removeClass('active');
});
});
$('#pxl-sidebar-area select').each(function(){
var $this=$(this), numberOfOptions=$(this).children('option').length;
$this.addClass('pxl-select-hidden');
$this.wrap('<div class="pxl-select"></div>');
$this.after('<div class="pxl-select-higthlight"></div>');
var $styledSelect=$this.next('div.pxl-select-higthlight');
$styledSelect.text($this.children('option').eq(0).text());
var $list=$('<ul />', {
'class': 'pxl-select-options'
}).insertAfter($styledSelect);
for (var i=0; i < numberOfOptions; i++){
$('<li />', {
text: $this.children('option').eq(i).text(),
rel: $this.children('option').eq(i).val()
}).appendTo($list);
}
var $listItems=$list.children('li');
$styledSelect.click(function(e){
e.stopPropagation();
$('div.pxl-select-higthlight.active').not(this).each(function(){
$(this).removeClass('active').next('ul.pxl-select-options').addClass('pxl-select-lists-hide');
});
$(this).toggleClass('active');
});
$listItems.click(function(e){
e.stopPropagation();
$styledSelect.text($(this).text()).removeClass('active');
$this.val($(this).attr('rel'));
});
$(document).click(function(){
$styledSelect.removeClass('active');
});
});
$(document).ready(function(){
var element=$('#preloader');
var qodefClipValue=0;
var loadTime=performance.now();
var step=100 / (loadTime / 1000);
var interval=setInterval(function(){
qodefClipValue +=step;
element.css('--pxl-clip', qodefClipValue);
if(qodefClipValue >=100){
clearInterval(interval);
}}, 30);
});
if($('.pxl-title--typewriter').length){
function typewriterOut(elements, callback){
if(elements.length){
elements.eq(0).addClass('is-active');
elements.eq(0).delay(3000);
elements.eq(0).removeClass('is-active');
typewriterOut(elements.slice(1), callback);
}else{
callback();
}}
function typewriterIn(elements, callback){
if(elements.length){
elements.eq(0).addClass('is-active');
elements.eq(0).delay(3000).slideDown(3000, function(){
elements.eq(0).removeClass('is-active');
typewriterIn(elements.slice(1), callback);
});
}else{
callback();
}}
function typewriterInfinite(){
typewriterOut($('.pxl-title--typewriter .pxl-item--text'), function(){
typewriterIn($('.pxl-title--typewriter .pxl-item--text'), function(){
typewriterInfinite();
});
});
}
$(function(){
typewriterInfinite();
});
}
$('.pxl-row-divider-angle-top').append('<svg class="pxl-row-angle" style="fill:#ffffff" xmlns="http://www.w3.org/2000/svg" width="100%" viewBox="0 0 100 100" version="1.1" preserveAspectRatio="none" height="130px"><path stroke="" stroke-width="0" d="M0 100 L100 0 L200 100"></path></svg>');
setTimeout(function(){
$('.md-align-center').parents('.rs-parallax-wrap').addClass('pxl-group-center');
}, 300);
});
function digicove_circle_svg(element, linearGradientId, linearGradientId1){
var activeWidth=window.innerWidth||document.documentElement.clientWidth;
if(activeWidth <=1200){
return;
}
var svgEl=Snap(element);
if(!svgEl){
return;
}
var size=13;
var filter=svgEl.filter(Snap.filter.shadow(0, 4, 30, 'rgba(0, 255, 255, 0.6)')).addClass('filter1');
var filter1=svgEl.filter(Snap.filter.shadow(0, 4, 30, 'rgba(0, 255, 255, 0.1)')).addClass('filter2');
var circle1=svgEl.circle(0, 0, size * 1);
var linearGradient=svgEl.select('.pxl-circle-svg svg .' + linearGradientId);
circle1.attr({ id: 'circle1', class: 'dot', fill: 'url(#' + linearGradientId + ')' });
circle1.attr({ filter: filter });
var circle2=svgEl.circle(0, 0, size * 1);
circle2.attr({ id: 'circle2', class: 'dot', fill: 'url(#' + linearGradientId1 + ')' });
circle2.attr({ filter: filter1 });
var dotEl1=svgEl.select('#circle1');
var dotEl2=svgEl.select('#circle2');
var motionPath1=svgEl.select('path').getTotalLength();
var motionPath2=svgEl.select('path').getTotalLength();
var motionPath1Partial=motionPath1 * 0.7;
var motionPath2Partial=motionPath2 * 0.7;
dotEl1.transform('t0,0');
dotEl2.transform('t0,0');
var carouselInnerEl=$(".pxl-carousel-inner,.pxl-swiper-arrow");
var animation1, animation2;
var isHovered=false;
function animateDot1(forward){
var fromVal, toVal;
if(forward){
fromVal=0;
toVal=motionPath1;
}else{
fromVal=motionPath2;
toVal=0;
}
animation1=Snap.animate(fromVal, toVal, function (val){
var point=svgEl.select("path").getPointAtLength(val);
dotEl1.attr({ cx: point.x, cy: point.y });
}, 15000, function (){
if(!isHovered){
dotEl1.transform('t0,0');
animateDot1(true);
}});
}
function animateDot2(forward){
var fromVal, toVal;
if(forward){
fromVal=motionPath1;
toVal=0;
}else{
fromVal=0;
toVal=motionPath2;
}
animation2=Snap.animate(fromVal, toVal, function (val){
var point=svgEl.select("path").getPointAtLength(motionPath2 - val);
dotEl2.attr({ cx: point.x, cy: point.y });
}, 15000, function (){
if(!isHovered){
dotEl2.transform('t0,0');
animateDot2(false);
}});
}
carouselInnerEl.on("mouseenter", function (){
isHovered=true;
if(animation1){
animation1.pause();
}
if(animation2){
animation2.pause();
}});
carouselInnerEl.on("mouseleave", function (){
isHovered=false;
if(animation1){
animation1.stop();
}
if(animation2){
animation2.stop();
}
dotEl1.transform('t0,0');
dotEl2.transform('t0,0');
animateDot1(true);
animateDot2(false);
});
animateDot1(true);
animateDot2(false);
}
function digicove_panel_anchor_toggle(){
'use strict';
$(document).on('click','.pxl-anchor.side-panel',function(e){
e.preventDefault();
e.stopPropagation();
var target=$(this).attr('data-target');
$(this).toggleClass('cliked');
$(target).toggleClass('open');
$('body').toggleClass('side-panel-open');
$('.pxl-overlay-drop').toggleClass('panel-open');
setTimeout(function(){
$(document).find('.pxl-search-form input[name="s"]').focus();
$(document).find('.search-form input[name="s"]').focus();
},1000);
});
$(document).on('click','.custom-link.anchor',function(e){
e.preventDefault();
e.stopPropagation();
var target=$(this).attr('data-target');
$(this).toggleClass('cliked');
$(target).toggleClass('anchor-target-open');
$('.pxl-anchor-bg').toggleClass('anchor-bg-open');
});
$('.pxl-menu-primary li').each(function (){
var $submenu=$(this).find('> ul.sub-menu');
if($submenu.length==1){
$(this).hover(function (){
if($submenu.offset().left + $submenu.width() > $(window).width()){
$submenu.addClass('back');
}else if($submenu.offset().left < 0){
$submenu.addClass('back');
}}, function (){
$submenu.removeClass('back');
});
}});
}
function digicove_loader(){
if($('#pxl-loadding').hasClass('style-text')){
$('#pxl-loadding').addClass('hide');
$(".loading-text").addClass("fadeout");
}else{
$(".pxl-loader").fadeOut("slow");
}}
function digicove_document_click(){
$(document).on('click',function (e){
var target=$(e.target);
var check='.btn-nav-mobile';
if(!(target.is(check))&&target.closest('.pxl-hidden-template').length <=0&&$('body').hasClass('side-panel-open')){
$('.btn-nav-mobile').removeClass('cliked');
$('.pxl-hidden-template').removeClass('open');
$('body').removeClass('side-panel-open');
}});
$(document).on('click','.pxl-close',function(e){
e.preventDefault();
e.stopPropagation();
$(this).closest('.pxl-hidden-template').toggleClass('open');
$('.btn-nav-mobile').removeClass('cliked');
$('body').toggleClass('side-panel-open');
});
$('.pxl-widget-cart-overlay').click(function (e){
e.preventDefault();
$(this).parent().toggleClass('open');
$(this).parents('body').removeClass('ov-hidden');
});
}
$('.pxl-swiper-arrow-custom').parents('.pxl-swiper-sliders').addClass('pxl--hide-arrow');
$('.pxl-navigation-carousel').parents('.elementor-section').addClass('pxl--hide-arrow');
setTimeout(function(){
$('.pxl-swiper-arrow-custom.pxl-swiper-arrow-next').on('click', function (){
$(this).parents('.pxl-swiper-sliders').find('.pxl-swiper-arrow-main.pxl-swiper-arrow-next').trigger('click');
});
$('.pxl-swiper-arrow-custom.pxl-swiper-arrow-prev').on('click', function (){
$(this).parents('.pxl-swiper-sliders').find('.pxl-swiper-arrow-main.pxl-swiper-arrow-prev').trigger('click');
});
}, 300);
setTimeout(function(){
$('.pxl-navigation-carousel .pxl-navigation-arrow-prev').on('click', function (){
$(this).parents('.elementor-section').find('.pxl-swiper-arrow.pxl-swiper-arrow-prev').trigger('click');
});
$('.pxl-navigation-carousel .pxl-navigation-arrow-next').on('click', function (){
$(this).parents('.elementor-section').find('.pxl-swiper-arrow.pxl-swiper-arrow-next').trigger('click');
});
}, 300);
function digicove_header_sticky(){
if($('#pxl-header-elementor').hasClass('is-sticky')){
if(pxl_scroll_top > 100){
$('.pxl-header-elementor-sticky.pxl-sticky-stb').addClass('pxl-header-fixed');
}else{
$('.pxl-header-elementor-sticky.pxl-sticky-stb').removeClass('pxl-header-fixed');
}
if(pxl_scroll_status=='up'&&pxl_scroll_top > 100){
$('.pxl-header-elementor-sticky.pxl-sticky-stt').addClass('pxl-header-fixed');
}else{
$('.pxl-header-elementor-sticky.pxl-sticky-stt').removeClass('pxl-header-fixed');
}}
$('.pxl-header-elementor-sticky').parents('body').addClass('pxl-header-sticky');
}
function digicove_col_offset(){
var w_vc_row_lg=($('#pxl-main').width() - 1620) / 2;
if(pxl_window_width > 1200){
$('body:not(.rtl) .col-offset-left.elementor-column > .elementor-widget-wrap').css('padding-left', w_vc_row_lg + 'px');
$('body:not(.rtl) .col-offset-right.elementor-column > .elementor-widget-wrap').css('padding-right', w_vc_row_lg + 'px');
$('.rtl .col-offset-left.elementor-column > .elementor-widget-wrap').css('padding-right', w_vc_row_lg + 'px');
$('.rtl .col-offset-right.elementor-column > .elementor-widget-wrap').css('padding-left', w_vc_row_lg + 'px');
}}
function digicove_scroll_to_top(){
if(pxl_scroll_top < pxl_window_height){
$('.pxl-scroll-top').addClass('pxl-off').removeClass('pxl-on');
}
if(pxl_scroll_top > pxl_window_height){
$('.pxl-scroll-top').addClass('pxl-on').removeClass('pxl-off');
}}
function digicove_quantity_icon(){
$('#pxl-main .quantity').append('<span class="quantity-icon"><i class="quantity-down">-</i><i class="quantity-up">+</i></span>');
$('.quantity-up').on('click', function (){
$(this).parents('.quantity').find('input[type="number"]').get(0).stepUp();
$(this).parents('.woocommerce-cart-form').find('.actions .button').removeAttr('disabled');
});
$('.quantity-down').on('click', function (){
$(this).parents('.quantity').find('input[type="number"]').get(0).stepDown();
$(this).parents('.woocommerce-cart-form').find('.actions .button').removeAttr('disabled');
});
$('.woocommerce-cart-form .actions .button').removeAttr('disabled');
}
function digicove_webgl_effects(){
class WebglHover {
constructor(set){
this.canvas=set.canvas
this.webGLCurtain=new Curtains({
container: this.canvas,
watchScroll: false,
pixelRatio: Math.min(1.5, window.devicePixelRatio)
})
this.planeElement=set.planeElement
this.mouse={
x: 0,
y: 0
}
this.params={
vertexShader: document.getElementById("vs").textContent,
fragmentShader: document.getElementById("fs").textContent,
widthSegments: 40,
heightSegments: 40,
uniforms: {
time: {
name: "uTime",
type: "1f",
value: 0
},
mousepos: {
name: "uMouse",
type: "2f",
value: [0, 0]
},
resolution: {
name: "uReso",
type: "2f",
value: [innerWidth, innerHeight]
},
progress: {
name: "uProgress",
type: "1f",
value: 0
}}
}
this.initPlane()
}
initPlane(){
this.plane=new Plane(this.webGLCurtain, this.planeElement, this.params)
if(this.plane){
this.plane.onReady(()=> {
this.update()
this.initEvent()
})
}}
update(){
this.plane.onRender(()=> {
this.plane.uniforms.time.value +=0.01
this.plane.uniforms.resolution.value=[innerWidth, innerHeight]
})
}
initEvent(){
this.planeElement.addEventListener("mouseenter", ()=> {
gsap.to(this.plane.uniforms.progress, .8, {
value: 1
})
})
this.planeElement.addEventListener("mouseout", ()=> {
gsap.to(this.plane.uniforms.progress, .8, {
value: 0
})
})
}}
$('.pxl-case-grid.layout3 .pxl-grid-item').each(function(){
const $this=$(this);
const item_image_height=$this.find('.image-front').height();
$this.find('.canvas canvas').css('height', item_image_height + 'px');
const initialized=$this.data('initialized');
if(!initialized){
$this.data('initialized', true);
const canvas=$this.find('.canvas')[0];
const planeElement=$this.find('.item--image')[0];
new WebglHover({
canvas: canvas,
planeElement: planeElement
});
}});
}
setTimeout(()=> {
var wobbleElements=document.querySelectorAll('.pxl-wobble');
wobbleElements.forEach(function(el){
el.addEventListener('mouseover', function(){
if(!el.classList.contains('animating')&&!el.classList.contains('mouseover')){
el.classList.add('animating','mouseover');
var letters=el.innerText.split('');
setTimeout(function(){ el.classList.remove('animating'); }, (letters.length + 1) * 50);
var animationName=el.dataset.animation;
if(!animationName){ animationName="pxl-jump"; }
el.innerText='';
letters.forEach(function(letter){
if(letter==" "){
letter="&nbsp;";
}
el.innerHTML +='<span class="letter">'+letter+'</span>';
});
var letterElements=el.querySelectorAll('.letter');
letterElements.forEach(function(letter, i){
setTimeout(function(){
letter.classList.add(animationName);
}, 50 * i);
});
}});
el.addEventListener('mouseout', function(){
el.classList.remove('mouseover');
});
});
}, 100);
function backtotopIndicator(){
var $isHome=$('body .pxl-scroll-top');
if($isHome.length){
var progressPath=document.querySelector('.pxl-progress-circle path');
var pathLength=progressPath.getTotalLength();
progressPath.style.transition=progressPath.style.WebkitTransition='none';
progressPath.style.strokeDasharray=pathLength + ' ' + pathLength;
progressPath.style.strokeDashoffset=pathLength;
progressPath.getBoundingClientRect();
progressPath.style.transition=progressPath.style.WebkitTransition='stroke-dashoffset 10ms linear';
var updateProgress=function (){
var scroll=$(window).scrollTop();
var height=$(document).height() - $(window).height();
var progress=pathLength - (scroll * pathLength / height);
progressPath.style.strokeDashoffset=progress;
}
updateProgress();
$(window).scroll(updateProgress);
}}
function digicove_footer_fixed(){
setTimeout(function(){
var h_footer=$('.pxl-footer-fixed #pxl-footer-elementor').outerHeight() - 1;
$('.pxl-footer-fixed #pxl-main').css('margin-bottom', h_footer + 'px');
}, 600);
}
$(document).ajaxComplete(function(){
digicove_webgl_effects();
});
})(jQuery);
;(function ($){
"use strict";
$(document).ready(function (){
$('.widget_product_search .search-field').find("input[type='text']").each(function (ev){
if(!$(this).val()){
$(this).attr("placeholder", "Search and Press Enter");
}});
$('.product-layout-list').parents('ul.products').addClass('products-list');
$('.single_variation_wrap').addClass('clearfix');
$('.woocommerce-variation-add-to-cart').addClass('clearfix');
var  wooc_product_meta=$('.woocommerce .wooc-product-meta');
var  wooc_product_form=$('.woocommerce form.cart');
if(wooc_product_meta){
wooc_product_meta.append(wooc_product_form);
}
var  wooc_checkout_meta=$('.woocommerce .woocommerce-form-coupon-toggle .woocommerce-info');
var  wooc_checkout_form=$('.woocommerce .woocommerce-form-coupon');
if(wooc_checkout_meta){
wooc_checkout_meta.append(wooc_checkout_form);
wooc_checkout_meta.find('.showcoupon').css('display','none');
wooc_checkout_form.css('display','inline-flex');
}
$('.cart-total-wrap').on('click', function (){
$('.widget-cart-sidebar').toggleClass('open');
$(this).toggleClass('cart-open');
$('.site-overlay').toggleClass('open');
});
$('.site-overlay').on('click', function (){
$(this).removeClass('open');
$(this).parents('#page').find('.widget-cart-sidebar').removeClass('open');
});
$('.woocommerce-tab-heading').on('click', function (){
$(this).toggleClass('open');
$(this).parent().find('.woocommerce-tab-content').slideToggle('');
});
$('.site-menu-right .h-btn-cart, .mobile-menu-cart .h-btn-cart').on('click', function (e){
e.preventDefault();
$(this).parents('#pxl-header-wrap').find('.widget_shopping_cart').toggleClass('open');
$('.pxl-hidden-sidebar').removeClass('open');
$('.pxl-search-popup').removeClass('open');
});
$('.woocommerce-add-to-cart a.button:not(".no-animate")').append('<i>+</i>');
$('.page #pxl-wapper #pxl-main #reviews').remove();
$('.woocommerce-add-to-cart a.button').on('click', function (){
$(this).parents('.woocommerce-product-inner').addClass('cart-added');
});
$('.woocommerce-archive-layout .layout-grid').on('click', function (){
$(this).addClass('active');
$(this).parent().find('.layout-list').removeClass('active');
$(this).parents('.site-main').find('ul.products').addClass('pxl-products-grid').removeClass('pxl-products-list');
});
$('.woocommerce-archive-layout .layout-list').on('click', function (){
$(this).addClass('active');
$(this).parent().find('.layout-grid').removeClass('active');
$(this).parents('.site-main').find('ul.products').addClass('pxl-products-list').removeClass('pxl-products-grid');
});
$('.woocommerce-archive-layout .layout-list.active').parents('.site-main').find('ul.products').addClass('pxl-products-list').removeClass('pxl-products-grid');
});
})(jQuery);