diff --git a/dist/iwmlib.3rdparty.js b/dist/iwmlib.3rdparty.js index 2b268ec..68736f6 100644 --- a/dist/iwmlib.3rdparty.js +++ b/dist/iwmlib.3rdparty.js @@ -83764,7 +83764,7 @@ if (typeof pixi_viewport !== 'undefined') { Object.assign(this.PIXI, pixi_viewpo window.convertPointFromNodeToPage = function (element, offsetX, offsetY) { return new Point(offsetX, offsetY, 0).transformBy(getTransformationMatrix(element)) } -})() +})(); ;(function () { var module = { @@ -83989,7 +83989,7 @@ if (typeof pixi_viewport !== 'undefined') { Object.assign(this.PIXI, pixi_viewpo }) } } -})(jQuery) +})(jQuery); (function () { diff --git a/dist/iwmlib.3rdparty.min.js b/dist/iwmlib.3rdparty.min.js index 7496df7..a114ac1 100644 --- a/dist/iwmlib.3rdparty.min.js +++ b/dist/iwmlib.3rdparty.min.js @@ -250,4 +250,4 @@ vec2 vTextureCoord = uv; vec4 color; %forloop% gl_FragColor = color * rColor; -}`,geometryClass:_e,vertexSize:16},e);return X=class extends Y{constructor(e){super(e),X.prototype.__init.call(this),X.prototype.__init2.call(this),X.prototype.__init3.call(this),this.shaderGenerator=new _.BatchShaderGenerator(t,i),this.geometryClass=n,this.vertexSize=r}__init(){this.defUniforms={translationMatrix:new d.Matrix,distortion:new Float32Array([0,0,1/0,1/0])}}__init2(){this.size=1e3}__init3(){this.forceMaxTextures=1}getUniforms(e){e=e.proj;return null!==e.surface?e.uniforms:null!==e._activeProjection?e._activeProjection.uniforms:this.defUniforms}packInterleavedGeometry(e,t,i,r,n){var{uint32View:s,float32View:o}=t,a=r/this.vertexSize,l=e.indices,u=e.vertexData,h=e._texture._frame,c=e.aTrans,{_batchLocation:p,realWidth:d,realHeight:f,resolution:m}=e._texture.baseTexture,t=Math.min(e.worldAlpha,1),_=t<1&&e._texture.baseTexture.alphaMode?g.premultiplyTint(e._tintRGB,t):e._tintRGB+(255*t<<24);for(let e=0;et[e]&&(r=t[e]),st[e+1]&&(n=t[e+1]),oR[e]&&(l=O[t],O[t]=O[e],O[e]=l,l=R[t],R[t]=R[e],R[e]=l)}t[0]=O[0].x,t[1]=O[0].y,t[2]=O[1].x,t[3]=O[1].y,t[4]=O[2].x,t[5]=O[2].y,t[6]=O[3].x,t[7]=O[3].y,(O[3].x-O[2].x)*(O[1].y-O[2].y)-(O[1].x-O[2].x)*(O[3].y-O[2].y)<0&&(t[4]=O[3].x,t[5]=O[3].y)}}}const ve=new d.Matrix,M=new d.Rectangle,I=new d.Point;class ye extends C{constructor(...e){super(...e),ye.prototype.__init.call(this)}__init(){this.distortion=new d.Point}clear(){this.distortion.set(0,0)}apply(e,t){t=t||new d.Point;var i=this.distortion,r=e.x*e.y;return t.x=e.x+i.x*r,t.y=e.y+i.y*r,t}applyInverse(e,t){t=t||new d.Point;var i=e.x,e=e.y,r=this.distortion.x,n=this.distortion.y;if(0===r)t.x=i,t.y=e/(1+n*i);else if(0===n)t.y=e,t.x=i/(1+r*e);else{var e=.5*(e*r-i*n+1)/n,s=e*e+i/n;if(s<=1e-5)return t.set(NaN,NaN),t;t.x=0>0,0!==h._cycle&&h._cycle===h._totalTime/c&&d<=e&&h._cycle--,h._time=h._totalTime-h._cycle*c,h._yoyo&&0!=(1&h._cycle)&&(h._time=m-h._time,(u=h._yoyoEase||h.vars.yoyoEase)&&(h._yoyoEase||(!0!==u||h._initted?h._yoyoEase=u=!0===u?h._ease:u instanceof Ease?u:Ease.map[u]:(u=h.vars.ease,h._yoyoEase=u=u?u instanceof Ease?u:"function"==typeof u?new Ease(u,h.vars.easeParams):Ease.map[u]||g.defaultEase:g.defaultEase)),h.ratio=u?1-u.getRatio((m-h._time)/m):0)),h._time>m?h._time=m:h._time<0&&(h._time=0)),h._easeType&&!u?(c=h._time/m,(1===(o=h._easeType)||3===o&&.5<=c)&&(c=1-c),3===o&&(c*=2),1===(a=h._easePower)?c*=c:2===a?c*=c*c:3===a?c*=c*c*c:4===a&&(c*=c*c*c*c),h.ratio=1===o?1-c:2===o?c:h._time/m<.5?c/2:1-c/2):u||(h.ratio=h._ease.getRatio(h._time/m))),p!==h._time||i||f!==h._cycle){if(!h._initted){if(h._init(),!h._initted||h._gc)return;if(!i&&h._firstPT&&(!1!==h.vars.lazy&&h._duration||h.vars.lazy&&!h._duration))return h._time=p,h._totalTime=d,h._rawPrevTime=_,h._cycle=f,x.lazyTweens.push(h),void(h._lazy=[e,t]);!h._time||r||u?r&&this._ease._calcEnd&&!u&&(h.ratio=h._ease.getRatio(0===h._time?0:1)):h.ratio=h._ease.getRatio(h._time/m)}for(!1!==h._lazy&&(h._lazy=!1),h._active||!h._paused&&h._time!==p&&0<=e&&(h._active=!0),0===d&&(2===h._initted&&0e._startTime;l._timeline;)u&&l._timeline.smoothChildTiming?l.totalTime(l._totalTime,!0):l._gc&&l._enabled(!0,!1),l=l._timeline;return h},e.remove=function(e){var t;if(e instanceof c)return this._remove(e,!1),t=e._timeline=e.vars.useFrames?c._rootFramesTimeline:c._rootTimeline,e._startTime=(e._paused?e._pauseTime:t._time)-(e._reversed?e.totalDuration()-e._totalTime:e._totalTime)/e._timeScale,this;if(e instanceof Array||e&&e.push&&d(e)){for(var i=e.length;-1<--i;)this.remove(e[i]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},e._remove=function(e,t){return p.prototype._remove.call(this,e,t),this._last?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},e.append=function(e,t){return this.add(e,this._parseTimeOrLabel(null,t,!0,e))},e.insert=e.insertMultiple=function(e,t,i,r){return this.add(e,t||0,i,r)},e.appendMultiple=function(e,t,i,r){return this.add(e,this._parseTimeOrLabel(null,t,!0,e),i,r)},e.addLabel=function(e,t){return this._labels[e]=this._parseTimeOrLabel(t),this},e.addPause=function(e,t,i,r){i=f.delayedCall(0,n,i,r||this);return i.vars.onComplete=i.vars.onReverseComplete=t,i.data="isPause",this._hasPause=!0,this.add(i,e)},e.removeLabel=function(e){return delete this._labels[e],this},e.getLabelTime=function(e){return null!=this._labels[e]?this._labels[e]:-1},e._parseTimeOrLabel=function(e,t,i,r){var n,s;if(r instanceof c&&r.timeline===this)this.remove(r);else if(r&&(r instanceof Array||r.push&&d(r)))for(s=r.length;-1<--s;)r[s]instanceof c&&r[s].timeline===this&&this.remove(r[s]);if(n="number"!=typeof e||t?99999999999=e&&!l;)r._duration||"isPause"===r.data&&0c._time;)l.render(l._reversed?l.totalDuration()-(e-l._startTime)*l._timeScale:(e-l._startTime)*l._timeScale,t,i),l=l._prev;l=null,c.pause(),c._pauseTime=h}r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(e-r._startTime)*r._timeScale,t,i):r.render((e-r._startTime)*r._timeScale,t,i)}r=s}!c._onUpdate||t||(b.length&&x(),c._callback("onUpdate")),!o||c._gc||f!==c._startTime&&m===c._timeScale||(0===c._time||d>=c.totalDuration())&&(n&&(b.length&&x(),c._timeline.autoRemoveChildren&&c._enabled(!1,!1),c._active=!1),!t&&c.vars[o]&&c._callback(o))}},e._hasPausedChild=function(){for(var e=this._first;e;){if(e._paused||e instanceof m&&e._hasPausedChild())return!0;e=e._next}return!1},e.getChildren=function(e,t,i,r){r=r||-9999999999;for(var n=[],s=this._first,o=0;s;)s._startTime=i&&(n._startTime+=e),n=n._next;if(t)for(r in s)s[r]>=i&&(s[r]+=e);return this._uncache(!0)},e._kill=function(e,t){if(!e&&!t)return this._enabled(!1,!1);for(var i=t?this.getTweensOf(t):this.getChildren(!0,!0,!1),r=i.length,n=!1;-1<--r;)i[r]._kill(e,t)&&(n=!0);return n},e.clear=function(e){var t=this.getChildren(!1,!0,!0),i=t.length;for(this._time=this._totalTime=0;-1<--i;)t[i]._enabled(!1,!1);return!1!==e&&(this._labels={}),this._uncache(!0)},e.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return c.prototype.invalidate.call(this)},e._enabled=function(e,t){if(e===this._gc)for(var i=this._first;i;)i._enabled(e,!0),i=i._next;return p.prototype._enabled.call(this,e,t)},e.totalTime=function(e,t,i){this._forcingPlayhead=!0;var r=c.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,r},e.duration=function(e){return arguments.length?(0!==this.duration()&&0!==e&&this.timeScale(this._duration/e),this):(this._dirty&&this.totalDuration(),this._duration)},e.totalDuration=function(e){if(arguments.length)return e&&this.totalDuration()?this.timeScale(this._totalDuration/e):this;if(this._dirty){for(var t,i,r=0,n=this,s=n._last,o=999999999999;s;)t=s._prev,s._dirty&&s.totalDuration(),s._startTime>o&&n._sortChildren&&!s._paused&&!n._calculatingDuration?(n._calculatingDuration=1,n.add(s,s._startTime-s._delay),n._calculatingDuration=0):o=s._startTime,s._startTime<0&&!s._paused&&(r-=s._startTime,n._timeline.smoothChildTiming&&(n._startTime+=s._startTime/n._timeScale,n._time-=s._startTime,n._totalTime-=s._startTime,n._rawPrevTime-=s._startTime),n.shiftChildren(-s._startTime,!1,-9999999999),o=0),r<(i=s._startTime+s._totalDuration/s._timeScale)&&(r=i),s=t;n._duration=n._totalDuration=r,n._dirty=!1}return this._totalDuration},e.paused=function(e){if(!1===e&&this._paused)for(var t=this._first;t;)t._startTime===this._time&&"isPause"===t.data&&(t._rawPrevTime=0),t=t._next;return c.prototype.paused.apply(this,arguments)},e.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===c._rootFramesTimeline},e.rawTime=function(e){return e&&(this._paused||this._repeat&&0>0,c._cycle&&c._cycle===c._totalTime/x&&m<=e&&c._cycle--,c._time=c._totalTime-c._cycle*x,c._yoyo&&1&c._cycle&&(c._time=f-c._time),c._time>f?e=(c._time=f)+1e-4:c._time<0?c._time=e=0:e=c._time));if(c._hasPause&&!c._forcingPlayhead&&!t){if(p<(e=c._time)||c._repeat&&b!==c._cycle)for(r=c._first;r&&r._startTime<=e&&!l;)r._duration||"isPause"!==r.data||r.ratio||0===r._startTime&&0===c._rawPrevTime||(l=r),r=r._next;else for(r=c._last;r&&r._startTime>=e&&!l;)r._duration||"isPause"===r.data&&0c._time;)l.render(l._reversed?l.totalDuration()-(e-l._startTime)*l._timeScale:(e-l._startTime)*l._timeScale,t,i),l=l._prev;l=null,c.pause(),c._pauseTime=h}r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(e-r._startTime)*r._timeScale,t,i):r.render((e-r._startTime)*r._timeScale,t,i)}r=s}!c._onUpdate||t||(P.length&&O(),c._callback("onUpdate")),!o||c._locked||c._gc||_!==c._startTime&&g===c._timeScale||(0===c._time||d>=c.totalDuration())&&(n&&(P.length&&O(),c._timeline.autoRemoveChildren&&c._enabled(!1,!1),c._active=!1),!t&&c.vars[o]&&c._callback(o))}else m!==c._totalTime&&c._onUpdate&&!t&&c._callback("onUpdate")},r.getActive=function(e,t,i){for(var r,n=[],s=this.getChildren(e||null==e,t||null==e,!!i),o=0,a=s.length,l=0;le)return t[r].name;return null},r.getLabelBefore=function(e){null==e&&(e=this._time);for(var t=this.getLabelsArray(),i=t.length;-1<--i;)if(t[i].time>0||6)-1,c=[],p=[];for(i in e){x=b=y=v=x=g=_=m=f=d=y=A=S=void 0;for(var d,f,m,_,g,v,y,b,x,T=e[i],w=o,E=t,S=1/E,A=T.length;-1<--A;)for(f=(b=T[A]).a,m=b.d-f,_=b.c-f,g=b.b-f,d=0,v=1;v<=E;v++)y=d-(d=((x=S*v)*x*m+3*(y=1-x)*(x*_+y*g))*x),w[x=A*E+v-1]=(w[x]||0)+y*y}for(n=o.length,r=0;r>0]=p,a[s]=u,l=0,p=[]);return{length:u,lengths:a,segments:c}}(this._beziers,this._timeRes),this._length=h.length,this._lengths=h.lengths,this._segments=h.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length),c=this._autoRotate)for(this._initialRotations=[],c[0]instanceof Array||(this._autoRotate=c=[c]),s=c.length;-1<--s;){for(o=0;o<3;o++)r=c[s][o],this._func[r]="function"==typeof e[r]&&e[r.indexOf("set")||"function"!=typeof e["get"+r.substr(3)]?r:"get"+r.substr(3)];r=c[s][2],this._initialRotations[s]=(this._func[r]?this._func[r].call(this._target):this._target[r])||0,this._overwriteProps.push(r)}return this._startRatio=i.vars.runBackwards?1:0,!0},set:function(e){var t,i,r,n,s,o,a,l,u,h,c=this._segCount,p=this._func,d=this._target,f=e!==this._startRatio;if(this._timeRes){if(l=this._lengths,u=this._curSeg,h=e*this._length,w=this._li,h>this._l2&&w=h;);0===w&&hthis._s2&&w=h;);0===w&&h>0)*(1/c))*c;for(i=1-s,w=this._props.length;-1<--w;)r=this._props[w],o=(s*s*(n=this._beziers[r][t]).da+3*i*(s*n.ca+i*n.ba))*s+n.a,this._mod[r]&&(o=this._mod[r](o,d)),p[r]?d[r](o):d[r]=o;if(this._autoRotate)for(var m,_,g,v,y,b,x,T=this._autoRotate,w=T.length;-1<--w;)r=T[w][2],b=T[w][3]||0,x=!0===T[w][4]?1:E,n=this._beziers[T[w][0]],m=this._beziers[T[w][1]],n&&m&&(n=n[t],m=m[t],_=n.a+(n.b-n.a)*s,_+=((v=n.b+(n.c-n.b)*s)-_)*s,v+=(n.c+(n.d-n.c)*s-v)*s,g=m.a+(m.b-m.a)*s,g+=((y=m.b+(m.c-m.b)*s)-g)*s,y+=(m.c+(m.d-m.c)*s-y)*s,o=f?Math.atan2(y-g,v-_)*x+b:this._initialRotations[w],this._mod[r]&&(o=this._mod[r](o,d)),p[r]?d[r](o):d[r]=o)}}),e=_.prototype,_.bezierThrough=p,_.cubicToQuadratic=U,_._autoCSS=!0,_.quadraticToCubic=function(e,t,i){return new B(e,(2*t+e)/3,(2*t+i)/3,i)},_._cssRegister=function(){var d,f,m,e=t.CSSPlugin;e&&(e=e._internals,d=e._parseToProxy,f=e._setPluginRatio,m=e.CSSPropTween,e._registerComplexSpecialProp("bezier",{parser:function(e,t,i,r,n,s){t instanceof Array&&(t={values:t}),s=new _;var o,a,l,u=t.values,h=u.length-1,c=[],p={};if(!(h<0)){for(o=0;o<=h;o++)l=d(e,u[o],r,n,s,h!==o),c[o]=l.end;for(a in t)p[a]=t[a];p.values=c,(n=new m(e,"bezier",0,0,l.pt,2)).data=l,n.plugin=s,n.setRatio=f,0===p.autoRotate&&(p.autoRotate=!0),!p.autoRotate||p.autoRotate instanceof Array||(o=!0===p.autoRotate?0:Number(p.autoRotate),p.autoRotate=null!=l.end.left?[["left","top","rotation",o,!1]]:null!=l.end.x&&[["x","y","rotation",o,!1]]),p.autoRotate&&(r._transform||r._enableTransforms(!1),l.autoRotate=r._target._gsTransform,l.proxy.rotation=l.autoRotate.rotation||0,r._overwriteProps.push("rotation")),s._onInitTween(l.proxy,p,r._tween)}return n}}))},e._mod=function(e){for(var t,i=this._overwriteProps,r=i.length;-1<--r;)(t=e[i[r]])&&"function"==typeof t&&(this._mod[i[r]]=t)},e._kill=function(e){var t,i,r=this._props;for(t in this._beziers)if(t in e)for(delete this._beziers[t],delete this._func[t],i=r.length;-1<--i;)r[i]===t&&r.splice(i,1);if(r=this._autoRotate)for(i=r.length;-1<--i;)e[r[i][2]]&&r.splice(i,1);return this._super._kill.call(this,e)},_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(o,R){function C(){o.call(this,"css"),this._overwriteProps.length=0,this.setRatio=C.prototype.setRatio}function a(e,t){return t.toUpperCase()}function l(e,t){return(t=L.createElementNS?L.createElementNS(t||"http://www.w3.org/1999/xhtml",e):L.createElement(e)).style?t:L.createElement(e)}function u(e){return ne.test("string"==typeof e?e:(e.currentStyle||e.style).filter||"")?parseFloat(RegExp.$1)/100:1}function _(e){_gsScope.console&&console.log(e)}function T(e,t){var i,r,n=(t=t||F).style;if(void 0!==n[e])return e;for(e=e.charAt(0).toUpperCase()+e.substr(1),i=["O","Moz","ms","Ms","Webkit"],r=5;-1<--r&&void 0===n[i[r]+e];);return 0<=r?(ve="-"+(ye=3===r?"ms":i[r]).toLowerCase()+"-",ye+e):null}function f(e){return be.getComputedStyle(e)}function p(e,t){var i,r,n={};if(t=t||f(e))if(i=t.length)for(;-1<--i;)-1!==(r=t[i]).indexOf("-transform")&&Ge!==r||(n[r.replace(ue,a)]=t.getPropertyValue(r));else for(i in t)-1!==i.indexOf("Transform")&&H!==i||(n[i]=t[i]);else if(t=e.currentStyle||e.style)for(i in t)"string"==typeof i&&void 0===n[i]&&(n[i.replace(ue,a)]=t[i]);return N||(n.opacity=u(e)),e=Ze(e,t,!1),n.rotation=e.rotation,n.skewX=e.skewX,n.scaleX=e.scaleX,n.scaleY=e.scaleY,n.x=e.x,n.y=e.y,Y&&(n.z=e.z,n.rotationX=e.rotationX,n.rotationY=e.rotationY,n.scaleZ=e.scaleZ),n.filters&&delete n.filters,n}function g(e,t,i,r,n){var s,o,a,l={},u=e.style;for(o in i)"cssText"===o||"length"!==o&&isNaN(o)&&(t[o]!==(s=i[o])||n&&n[o])&&-1===o.indexOf("Origin")&&("number"==typeof s||"string"==typeof s)&&(l[o]="auto"!==s||"left"!==o&&"top"!==o?""!==s&&"auto"!==s&&"none"!==s||"string"!=typeof t[o]||""===t[o].replace(ie,"")?s:0:xe(e,o),void 0!==u[o]&&(a=new Pe(u,o,u[o],a)));if(r)for(o in r)"className"!==o&&(l[o]=r[o]);return{difs:l,firstMPT:a}}function A(e,t){return"string"==typeof(e="function"==typeof e?e(O,P):e)&&"="===e.charAt(1)?parseInt(e.charAt(0)+"1",10)*parseFloat(e.substr(2)):parseFloat(e)-parseFloat(t)||0}function E(e,t){var i="string"==typeof(e="function"==typeof e?e(O,P):e)&&"="===e.charAt(1);return null==(e="string"==typeof e&&"v"===e.charAt(e.length-2)?(i?e.substr(0,2):0)+window["inner"+("vh"===e.substr(-2)?"Height":"Width")]*(parseFloat(i?e.substr(2):e)/100):e)?t:i?parseInt(e.charAt(0)+"1",10)*parseFloat(e.substr(2))+t:parseFloat(e)||0}function S(e,t,i,r){var n,s;return n=(n=null==(e="function"==typeof e?e(O,P):e)?t:"number"==typeof e?e:(n=e.split("_"),s=((s="="===e.charAt(1))?parseInt(e.charAt(0)+"1",10)*parseFloat(n[0].substr(2)):parseFloat(n[0]))*(-1===e.indexOf("rad")?1:D)-(s?0:t),n.length&&(r&&(r[i]=t+s),-1!==e.indexOf("short")&&(s%=360)!==s%180&&(s=s<0?s+360:s-360),-1!==e.indexOf("_cw")&&s<0?s=(s+3599999999640)%360-360*(s/360|0):-1!==e.indexOf("ccw")&&0>16,e>>8&255,255&e];else{if(","===e.charAt(e.length-1)&&(e=e.substr(0,e.length-1)),Ee[e])i=Ee[e];else if("#"===e.charAt(0))4===e.length&&(e="#"+(r=e.charAt(1))+r+(n=e.charAt(2))+n+(s=e.charAt(3))+s),i=[(e=parseInt(e.substr(1),16))>>16,e>>8&255,255&e];else if("hsl"===e.substr(0,3))if(i=u=e.match(Q),t){if(-1!==e.indexOf("="))return e.match($)}else o=Number(i[0])%360/360,a=Number(i[1])/100,r=2*(l=Number(i[2])/100)-(n=l<=.5?l*(a+1):l+a-l*a),3r--)for(;++rr--)for(;++r>0];return r.parse(e,o,n,s)}}function Pe(e,t,i,r,n){this.t=e,this.p=t,this.v=i,this.r=n,r&&((r._prev=this)._next=r)}t._setPluginRatio=function(e){this.plugin.setRatio(e);for(var t,i,r,n,s,o=this.data,a=o.proxy,l=o.firstMPT;l;)t=a[l.v],l.r?t=l.r(t):t<1e-6&&-1e-6a.length?l:a).length,o=0;on.pr;)s=s._next;(n._prev=s?s._prev:a)?n._prev._next=n:o=n,(n._next=s)?s._prev=n:a=n,n=l}this._firstPT=o}return!0},e.parse=function(e,t,i,r){var n,s,o,a,l,u,h,c,p=e.style;for(n in t){if(l=t[n],a=m[n],"function"!=typeof l||a&&a.allowFunc||(l=l(O,P)),a)i=a.parse(e,l,n,this,i,r,t);else{if("--"===n.substr(0,2)){this._tween._propLookup[n]=this._addTween.call(this._tween,e.style,"setProperty",f(e).getPropertyValue(n)+"",l+"",n,!1,n);continue}a=z(e,n,k)+"",h="string"==typeof l,"color"===n||"fill"===n||"stroke"===n||-1!==n.indexOf("Color")||h&&ae.test(l)?(h||(l=(3<(l=Se(l)).length?"rgba(":"rgb(")+l.join(",")+")"),i=Re(p,n,a,l,!0,"transparent",i,0,r)):h&&fe.test(l)?i=Re(p,n,a,l,!0,null,i,0,r):(u=(s=parseFloat(a))||0===s?a.substr((s+"").length):"",""!==a&&"auto"!==a||(u="width"===n||"height"===n?(s=function(e,t,i){if("svg"===(e.nodeName+"").toLowerCase())return(i||f(e))[t]||0;if(e.getCTM&&qe(e))return e.getBBox()[t]||0;var r=parseFloat("width"===t?e.offsetWidth:e.offsetHeight),n=Te[t],s=n.length;for(i=i||f(e);-1<--s;)r=(r-=parseFloat(z(e,"padding"+n[s],i,!0))||0)-(parseFloat(z(e,"border"+n[s]+"Width",i,!0))||0);return r}(e,n,k),"px"):"left"===n||"top"===n?(s=xe(e,n,k),"px"):(s="opacity"!==n?0:1,"")),""===(h=(c=h&&"="===l.charAt(1))?(o=parseInt(l.charAt(0)+"1",10),l=l.substr(2),o*=parseFloat(l),l.replace(re,"")):(o=parseFloat(l),h?l.replace(re,""):""))&&(h=n in W?W[n]:u),l=o||0===o?(c?o+s:o)+h:t[n],u===h||""===h&&"lineHeight"!==n||(o||0===o)&&s&&(s=w(e,n,s,u),"%"===h?(s/=w(e,n,100,"%")/100,!0!==t.strictUnits&&(a=s+"%")):"em"===h||"rem"===h||"vw"===h||"vh"===h?s/=w(e,n,1,h):"px"!==h&&(o=w(e,n,o,h),h="px"),c&&(o||0===o)&&(l=o+s+h)),c&&(o+=s),!s&&0!==s||!o&&0!==o?void 0!==p[n]&&(l||l+""!="NaN"&&null!=l)?(i=new j(p,n,o||s||0,0,i,-1,n,!1,0,a,l)).xs0="none"!==l||"display"!==n&&-1===n.indexOf("Style")?l:a:_("invalid "+n+" tween value: "+t[n]):(i=new j(p,n,s,o-s,i,0,n,!1!==V&&("px"===h||"zIndex"===n),0,a,l)).xs0=h)}r&&i&&!i.plugin&&(i.plugin=r)}return i},e.setRatio=function(e){var t,i,r,n=this._firstPT;if(1!==e||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(e||this._tween._time!==this._tween._duration&&0!==this._tween._time||-1e-6===this._tween._rawPrevTime)for(;n;){if(t=n.c*e+n.s,n.r?t=n.r(t):t<1e-6&&-1e-6this._p3?this._calcEnd?1===e?0:1-(e=(e-this._p3)/this._p1)*e:t+(e-t)*(e=(e-this._p3)/this._p1)*e*e*e:this._calcEnd?1:t},p.ease=new p(.7,.7),d.config=p.config=function(e,t,i){return new p(e,t,i)},(d=(r=h("easing.SteppedEase",function(e,t){this._p1=1/(e=e||1),this._p2=e+(t?0:1),this._p3=t?1:0},!0)).prototype=new _).constructor=r,d.getRatio=function(e){return e<0?e=0:1<=e&&(e=.999999999),((this._p2*e|0)+this._p3)*this._p1},d.config=r.config=function(e,t){return new r(e,t)},(d=(n=h("easing.ExpoScaleEase",function(e,t,i){this._p1=Math.log(t/e),this._p2=t-e,this._p3=e,this._ease=i},!0)).prototype=new _).constructor=n,d.getRatio=function(e){return this._ease&&(e=this._ease.getRatio(e)),(this._p3*Math.exp(this._p1*e)-this._p3)/this._p2},d.config=n.config=function(e,t,i){return new n(e,t,i)},(d=(s=h("easing.RoughEase",function(e){for(var t,i,r,n,s,o,a=(e=e||{}).taper||"none",l=[],u=0,h=0|(e.points||20),c=h,p=!1!==e.randomize,d=!0===e.clamp,f=e.template instanceof _?e.template:null,m="number"==typeof e.strength?.4*e.strength:.4;-1<--c;)t=p?Math.random():1/h*c,i=f?f.getRatio(t):t,r="none"===a?m:"out"===a?(n=1-t)*n*m:"in"===a?t*t*m:t<.5?(n=2*t)*n*.5*m:(n=2*(1-t))*n*.5*m,p?i+=Math.random()*r-.5*r:c%2?i+=.5*r:i-=.5*r,d&&(1t.t){for(;t.next&&e>=t.t;)t=t.next;t=t.prev}else for(;t.prev&&e<=t.t;)t=t.prev;return(this._prev=t).v+(e-t.t)/t.gap*t.c},d.config=function(e){return new s(e)},s.ease=new s,t("Bounce",e("BounceOut",function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}),e("BounceIn",function(e){return(e=1-e)<1/2.75?1-7.5625*e*e:e<2/2.75?1-(7.5625*(e-=1.5/2.75)*e+.75):e<2.5/2.75?1-(7.5625*(e-=2.25/2.75)*e+.9375):1-(7.5625*(e-=2.625/2.75)*e+.984375)}),e("BounceInOut",function(e){var t=e<.5;return(e=t?1-2*e:2*e-1)<1/2.75?e*=7.5625*e:e=e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,t?.5*(1-e):.5*e+.5})),t("Circ",e("CircOut",function(e){return Math.sqrt(1-(e-=1)*e)}),e("CircIn",function(e){return-(Math.sqrt(1-e*e)-1)}),e("CircInOut",function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)})),t("Elastic",(d=function(e,t,i){var r=h("easing."+e,function(e,t){this._p1=1<=e?e:1,this._p2=(t||i)/(e<1?e:1),this._p3=this._p2/l*(Math.asin(1/this._p1)||0),this._p2=l/this._p2},!0),e=r.prototype=new _;return e.constructor=r,e.getRatio=t,e.config=function(e,t){return new r(e,t)},r})("ElasticOut",function(e){return this._p1*Math.pow(2,-10*e)*Math.sin((e-this._p3)*this._p2)+1},.3),d("ElasticIn",function(e){return-(this._p1*Math.pow(2,10*--e)*Math.sin((e-this._p3)*this._p2))},.3),d("ElasticInOut",function(e){return(e*=2)<1?this._p1*Math.pow(2,10*--e)*Math.sin((e-this._p3)*this._p2)*-.5:this._p1*Math.pow(2,-10*--e)*Math.sin((e-this._p3)*this._p2)*.5+1},.45)),t("Expo",e("ExpoOut",function(e){return 1-Math.pow(2,-10*e)}),e("ExpoIn",function(e){return Math.pow(2,10*(e-1))-.001}),e("ExpoInOut",function(e){return(e*=2)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*(e-1)))})),t("Sine",e("SineOut",function(e){return Math.sin(e*u)}),e("SineIn",function(e){return 1-Math.cos(e*u)}),e("SineInOut",function(e){return-.5*(Math.cos(Math.PI*e)-1)})),h("easing.EaseLookup",{find:function(e){return _.map[e]}},!0),c(o.SlowMo,"SlowMo","ease,"),c(s,"RoughEase","ease,"),c(r,"SteppedEase","ease,"),a},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),!function(m,p){"use strict";var d={},f=m.document,_=m.GreenSockGlobals=m.GreenSockGlobals||m,e=_[p];if(e)"undefined"!=typeof module&&module.exports&&(module.exports=e);else{var g,t,F,N=function(e){for(var t=e.split("."),i=_,r=0;r=t&&ethis._duration?this._duration:e,t)):this._time},n.totalTime=function(e,t,i){if(g||P.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(e<0&&!i&&(e+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var r=this._totalDuration,n=this._timeline;if(rs;)n=n._prev;return n?(e._next=n._next,n._next=e):(e._next=this._first,this._first=e),e._next?e._next._prev=e:this._last=e,e._prev=n,this._recent=e,this._timeline&&this._uncache(!0),this},n._remove=function(e,t){return e.timeline===this&&(t||e._enabled(!1,!0),e._prev?e._prev._next=e._next:this._first===e&&(this._first=e._next),e._next?e._next._prev=e._prev:this._last===e&&(this._last=e._prev),e._next=e._prev=e.timeline=null,e===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},n.render=function(e,t,i){var r,n=this._first;for(this._totalTime=this._time=this._rawPrevTime=e;n;)r=n._next,(n._active||e>=n._startTime&&!n._paused&&!n._gc)&&(n._reversed?n.render((n._dirty?n.totalDuration():n._totalDuration)-(e-n._startTime)*n._timeScale,t,i):n.render((e-n._startTime)*n._timeScale,t,i)),n=r},n.rawTime=function(){return g||P.wake(),this._totalTime},x("TweenLite",function(e,t,i){if(a.call(this,t,i),this.render=O.prototype.render,null==e)throw"Cannot tween a null target.";this.target=e="string"==typeof e&&O.selector(e)||e;var r,n,s,i=e.jquery||e.length&&e!==m&&e[0]&&(e[0]===m||e[0].nodeType&&e[0].style&&!e.nodeType),o=this.vars.overwrite;if(this._overwrite=o=null==o?ee[O.defaultOverwrite]:"number"==typeof o?o>>0:ee[o],(i||e instanceof Array||e.push&&y(e))&&"number"!=typeof e[0])for(this._targets=s=z(e),this._propLookup=[],this._siblings=[],r=0;r=te){for(i in te=P.frame+(parseInt(O.autoSleep,10)||120),l){for(e=(t=l[i].tweens).length;-1<--e;)t[e]._gc&&t.splice(e,1);0===t.length&&delete l[i]}if((!(i=h._first)||i._paused)&&O.autoSleep&&!u._first&&1===P._listeners.tick.length){for(;i&&i._paused;)i=i._next;i||P.sleep()}}},P.addEventListener("tick",a._updateRoot),function(e,t,i){var r,n,s=e._gsTweenID;if(l[s||(e._gsTweenID=s="t"+Q++)]||(l[s]={target:e,tweens:[]}),t&&((r=l[s].tweens)[n=r.length]=t,i))for(;-1<--n;)r[n]===t&&r.splice(n,1);return l[s].tweens}),ie=function(e,t,i,r){var n,s,o=e.vars.onOverwrite;return o&&(n=o(e,t,i,r)),(o=O.onOverwrite)&&(s=o(e,t,i,r)),!1!==n&&!1!==s},re=function(e,t,i,r,n){var s,o,a;if(1===r||4<=r){for(a=n.length,d=0;du&&((p||!o._initted)&&u-o._startTime<=2e-8||(h[c++]=o)));for(d=c;-1<--d;)a=(o=h[d])._firstPT,2===r&&o._kill(i,e,t)&&(s=!0),(2!==r||!o._firstPT&&o._initted&&a)&&(2===r||ie(o,t))&&o._enabled(!1,!1)&&(s=!0)}return s},ne=function(e,t,i){for(var r=e._timeline,n=r._timeScale,s=e._startTime;r._timeline;){if(s+=r._startTime,n*=r._timeScale,r._paused)return-100;r=r._timeline}return t<(s/=n)?s-t:i&&s===t||!e._initted&&s-t<2e-8?v:(s+=e.totalDuration()/e._timeScale/n)>t+v?0:s-t-v},L=(n._init=function(){var e,t,i,r,n,s,o=this.vars,a=this._overwrittenProps,l=this._duration,u=!!o.immediateRender,h=o.ease,c=this._startAt;if(o.startAt){for(r in c&&(c.render(-1,!0),c.kill()),n={},o.startAt)n[r]=o.startAt[r];if(n.data="isStart",n.overwrite=!1,n.immediateRender=!0,n.lazy=u&&!1!==o.lazy,n.startAt=n.delay=null,n.onUpdate=o.onUpdate,n.onUpdateParams=o.onUpdateParams,n.onUpdateScope=o.onUpdateScope||o.callbackScope||this,this._startAt=O.to(this.target||{},0,n),u)if(0a.pr;)r=r._next;(a._prev=r?r._prev:s)?a._prev._next=a:n=a,(a._next=r)?r._prev=a:s=a,a=o}a=t._firstPT=n}for(;a;)a.pg&&"function"==typeof a.t[e]&&a.t[e]()&&(i=!0),a=a._next;return i},L.activate=function(e){for(var t=e.length;-1<--t;)e[t].API===L.API&&(M[(new e[t])._propName]=e[t]);return!0},r.plugin=function(e){if(!(e&&e.propName&&e.init&&e.API))throw"illegal plugin definition.";var t,i=e.propName,r=e.priority||0,n=e.overwriteProps,s={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},o=x("plugins."+i.charAt(0).toUpperCase()+i.substr(1)+"Plugin",function(){L.call(this,i,r),this._overwriteProps=n||[]},!0===e.global),a=o.prototype=new L(i);for(t in(a.constructor=o).API=e.API,s)"function"==typeof e[t]&&(a[s[t]]=e[t]);return o.version=e.version,L.activate([o]),o},s=m._gsQueue){for(o=0;o>0,c._cycle&&c._cycle===c._totalTime/x&&m<=e&&c._cycle--,c._time=c._totalTime-c._cycle*x,c._yoyo&&1&c._cycle&&(c._time=f-c._time),c._time>f?e=(c._time=f)+1e-4:c._time<0?c._time=e=0:e=c._time));if(c._hasPause&&!c._forcingPlayhead&&!t){if(p<(e=c._time)||c._repeat&&b!==c._cycle)for(r=c._first;r&&r._startTime<=e&&!l;)r._duration||"isPause"!==r.data||r.ratio||0===r._startTime&&0===c._rawPrevTime||(l=r),r=r._next;else for(r=c._last;r&&r._startTime>=e&&!l;)r._duration||"isPause"===r.data&&0c._time;)l.render(l._reversed?l.totalDuration()-(e-l._startTime)*l._timeScale:(e-l._startTime)*l._timeScale,t,i),l=l._prev;l=null,c.pause(),c._pauseTime=h}r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(e-r._startTime)*r._timeScale,t,i):r.render((e-r._startTime)*r._timeScale,t,i)}r=s}!c._onUpdate||t||(P.length&&O(),c._callback("onUpdate")),!o||c._locked||c._gc||_!==c._startTime&&g===c._timeScale||(0===c._time||d>=c.totalDuration())&&(n&&(P.length&&O(),c._timeline.autoRemoveChildren&&c._enabled(!1,!1),c._active=!1),!t&&c.vars[o]&&c._callback(o))}else m!==c._totalTime&&c._onUpdate&&!t&&c._callback("onUpdate")},r.getActive=function(e,t,i){for(var r,n=[],s=this.getChildren(e||null==e,t||null==e,!!i),o=0,a=s.length,l=0;le)return t[r].name;return null},r.getLabelBefore=function(e){null==e&&(e=this._time);for(var t=this.getLabelsArray(),i=t.length;-1<--i;)if(t[i].timee._startTime;l._timeline;)u&&l._timeline.smoothChildTiming?l.totalTime(l._totalTime,!0):l._gc&&l._enabled(!0,!1),l=l._timeline;return h},e.remove=function(e){var t;if(e instanceof c)return this._remove(e,!1),t=e._timeline=e.vars.useFrames?c._rootFramesTimeline:c._rootTimeline,e._startTime=(e._paused?e._pauseTime:t._time)-(e._reversed?e.totalDuration()-e._totalTime:e._totalTime)/e._timeScale,this;if(e instanceof Array||e&&e.push&&d(e)){for(var i=e.length;-1<--i;)this.remove(e[i]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},e._remove=function(e,t){return p.prototype._remove.call(this,e,t),this._last?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},e.append=function(e,t){return this.add(e,this._parseTimeOrLabel(null,t,!0,e))},e.insert=e.insertMultiple=function(e,t,i,r){return this.add(e,t||0,i,r)},e.appendMultiple=function(e,t,i,r){return this.add(e,this._parseTimeOrLabel(null,t,!0,e),i,r)},e.addLabel=function(e,t){return this._labels[e]=this._parseTimeOrLabel(t),this},e.addPause=function(e,t,i,r){i=f.delayedCall(0,n,i,r||this);return i.vars.onComplete=i.vars.onReverseComplete=t,i.data="isPause",this._hasPause=!0,this.add(i,e)},e.removeLabel=function(e){return delete this._labels[e],this},e.getLabelTime=function(e){return null!=this._labels[e]?this._labels[e]:-1},e._parseTimeOrLabel=function(e,t,i,r){var n,s;if(r instanceof c&&r.timeline===this)this.remove(r);else if(r&&(r instanceof Array||r.push&&d(r)))for(s=r.length;-1<--s;)r[s]instanceof c&&r[s].timeline===this&&this.remove(r[s]);if(n="number"!=typeof e||t?99999999999=e&&!l;)r._duration||"isPause"===r.data&&0c._time;)l.render(l._reversed?l.totalDuration()-(e-l._startTime)*l._timeScale:(e-l._startTime)*l._timeScale,t,i),l=l._prev;l=null,c.pause(),c._pauseTime=h}r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(e-r._startTime)*r._timeScale,t,i):r.render((e-r._startTime)*r._timeScale,t,i)}r=s}!c._onUpdate||t||(b.length&&x(),c._callback("onUpdate")),!o||c._gc||f!==c._startTime&&m===c._timeScale||(0===c._time||d>=c.totalDuration())&&(n&&(b.length&&x(),c._timeline.autoRemoveChildren&&c._enabled(!1,!1),c._active=!1),!t&&c.vars[o]&&c._callback(o))}},e._hasPausedChild=function(){for(var e=this._first;e;){if(e._paused||e instanceof m&&e._hasPausedChild())return!0;e=e._next}return!1},e.getChildren=function(e,t,i,r){r=r||-9999999999;for(var n=[],s=this._first,o=0;s;)s._startTime=i&&(n._startTime+=e),n=n._next;if(t)for(r in s)s[r]>=i&&(s[r]+=e);return this._uncache(!0)},e._kill=function(e,t){if(!e&&!t)return this._enabled(!1,!1);for(var i=t?this.getTweensOf(t):this.getChildren(!0,!0,!1),r=i.length,n=!1;-1<--r;)i[r]._kill(e,t)&&(n=!0);return n},e.clear=function(e){var t=this.getChildren(!1,!0,!0),i=t.length;for(this._time=this._totalTime=0;-1<--i;)t[i]._enabled(!1,!1);return!1!==e&&(this._labels={}),this._uncache(!0)},e.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return c.prototype.invalidate.call(this)},e._enabled=function(e,t){if(e===this._gc)for(var i=this._first;i;)i._enabled(e,!0),i=i._next;return p.prototype._enabled.call(this,e,t)},e.totalTime=function(e,t,i){this._forcingPlayhead=!0;var r=c.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,r},e.duration=function(e){return arguments.length?(0!==this.duration()&&0!==e&&this.timeScale(this._duration/e),this):(this._dirty&&this.totalDuration(),this._duration)},e.totalDuration=function(e){if(arguments.length)return e&&this.totalDuration()?this.timeScale(this._totalDuration/e):this;if(this._dirty){for(var t,i,r=0,n=this,s=n._last,o=999999999999;s;)t=s._prev,s._dirty&&s.totalDuration(),s._startTime>o&&n._sortChildren&&!s._paused&&!n._calculatingDuration?(n._calculatingDuration=1,n.add(s,s._startTime-s._delay),n._calculatingDuration=0):o=s._startTime,s._startTime<0&&!s._paused&&(r-=s._startTime,n._timeline.smoothChildTiming&&(n._startTime+=s._startTime/n._timeScale,n._time-=s._startTime,n._totalTime-=s._startTime,n._rawPrevTime-=s._startTime),n.shiftChildren(-s._startTime,!1,-9999999999),o=0),r<(i=s._startTime+s._totalDuration/s._timeScale)&&(r=i),s=t;n._duration=n._totalDuration=r,n._dirty=!1}return this._totalDuration},e.paused=function(e){if(!1===e&&this._paused)for(var t=this._first;t;)t._startTime===this._time&&"isPause"===t.data&&(t._rawPrevTime=0),t=t._next;return c.prototype.paused.apply(this,arguments)},e.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===c._rootFramesTimeline},e.rawTime=function(e){return e&&(this._paused||this._repeat&&0>10|55296,1023&r|56320)}function N(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}function z(){T()}var e,d,b,s,B,f,U,j,x,l,u,T,w,i,E,m,r,n,_,S="sizzle"+ +new Date,g=F.document,A=0,G=0,X=ce(),H=ce(),v=ce(),Y=function(e,t){return e===t&&(u=!0),0},W={}.hasOwnProperty,t=[],V=t.pop,q=t.push,k=t.push,K=t.slice,y=function(e,t){for(var i=0,r=e.length;i+~]|"+o+")"+o+"*"),ie=new RegExp("="+o+"*([^\\]'\"]*?)"+o+"*\\]","g"),re=new RegExp(Q),ne=new RegExp("^"+a+"$"),p={ID:new RegExp("^#("+a+")"),CLASS:new RegExp("^\\.("+a+")"),TAG:new RegExp("^("+a+"|[*])"),ATTR:new RegExp("^"+J),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+o+"*(even|odd|(([+-]|)(\\d*)n|)"+o+"*(?:([+-]|)"+o+"*(\\d+)|))"+o+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+o+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+o+"*((?:-\\d)?\\d*)"+o+"*\\)|)(?=[^-]|$)","i")},se=/^(?:input|select|textarea|button)$/i,oe=/^h\d$/i,h=/^[^{]+\{\s*\[native \w/,ae=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,le=/[+~]/,O=new RegExp("\\\\([\\da-f]{1,6}"+o+"?|("+o+")|.)","ig"),ue=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,he=L(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{k.apply(t=K.call(g.childNodes),g.childNodes),t[g.childNodes.length].nodeType}catch(e){k={apply:t.length?function(e,t){q.apply(e,K.call(t))}:function(e,t){for(var i=e.length,r=0;e[i++]=t[r++];);e.length=i-1}}}function R(e,t,i,r){var n,s,o,a,l,u,h,c=t&&t.ownerDocument,p=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return i;if(!r&&((t?t.ownerDocument||t:g)!==w&&T(t),t=t||w,E)){if(11!==p&&(l=ae.exec(e)))if(n=l[1]){if(9===p){if(!(o=t.getElementById(n)))return i;if(o.id===n)return i.push(o),i}else if(c&&(o=c.getElementById(n))&&_(t,o)&&o.id===n)return i.push(o),i}else{if(l[2])return k.apply(i,t.getElementsByTagName(e)),i;if((n=l[3])&&d.getElementsByClassName&&t.getElementsByClassName)return k.apply(i,t.getElementsByClassName(n)),i}if(d.qsa&&!v[e+" "]&&(!m||!m.test(e))){if(1!==p)c=t,h=e;else if("object"!==t.nodeName.toLowerCase()){for((a=t.getAttribute("id"))?a=a.replace(ue,N):t.setAttribute("id",a=S),s=(u=f(e)).length;s--;)u[s]="#"+a+" "+D(u[s]);h=u.join(","),c=le.test(e)&&me(t.parentNode)||t}if(h)try{return k.apply(i,c.querySelectorAll(h)),i}catch(e){}finally{a===S&&t.removeAttribute("id")}}}return j(e.replace(P,"$1"),t,i,r)}function ce(){var i=[];function r(e,t){return i.push(e+" ")>b.cacheLength&&delete r[i.shift()],r[e+" "]=t}return r}function C(e){return e[S]=!0,e}function M(e){var t=w.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t)}}function pe(e,t){for(var i=e.split("|"),r=i.length;r--;)b.attrHandle[i[r]]=t}function de(e,t){var i=t&&e,r=i&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function fe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&he(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function I(o){return C(function(s){return s=+s,C(function(e,t){for(var i,r=o([],e.length,s),n=r.length;n--;)e[i=r[n]]&&(e[i]=!(t[i]=e[i]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in d=R.support={},B=R.isXML=function(e){e=e&&(e.ownerDocument||e).documentElement;return!!e&&"HTML"!==e.nodeName},T=R.setDocument=function(e){var e=e?e.ownerDocument||e:g;return e!==w&&9===e.nodeType&&e.documentElement&&(i=(w=e).documentElement,E=!B(w),g!==w&&(e=w.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",z,!1):e.attachEvent&&e.attachEvent("onunload",z)),d.attributes=M(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=M(function(e){return e.appendChild(w.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=h.test(w.getElementsByClassName),d.getById=M(function(e){return i.appendChild(e).id=S,!w.getElementsByName||!w.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(O,c);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E)return(t=t.getElementById(e))?[t]:[]}):(b.filter.ID=function(e){var t=e.replace(O,c);return function(e){e=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return e&&e.value===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var i,r,n,s=t.getElementById(e);if(s){if((i=s.getAttributeNode("id"))&&i.value===e)return[s];for(n=t.getElementsByName(e),r=0;s=n[r++];)if((i=s.getAttributeNode("id"))&&i.value===e)return[s]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var i,r=[],n=0,s=t.getElementsByTagName(e);if("*"!==e)return s;for(;i=s[n++];)1===i.nodeType&&r.push(i);return r},b.find.CLASS=d.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&E)return t.getElementsByClassName(e)},r=[],m=[],(d.qsa=h.test(w.querySelectorAll))&&(M(function(e){i.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+o+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+o+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+S+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||m.push(".#.+[+~]")}),M(function(e){e.innerHTML="";var t=w.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+o+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),i.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(d.matchesSelector=h.test(n=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.oMatchesSelector||i.msMatchesSelector))&&M(function(e){d.disconnectedMatch=n.call(e,"*"),n.call(e,"[s!='']:x"),r.push("!=",Q)}),m=m.length&&new RegExp(m.join("|")),r=r.length&&new RegExp(r.join("|")),e=h.test(i.compareDocumentPosition),_=e||h.test(i.contains)?function(e,t){var i=9===e.nodeType?e.documentElement:e,t=t&&t.parentNode;return e===t||!(!t||1!==t.nodeType||!(i.contains?i.contains(t):e.compareDocumentPosition&&16&e.compareDocumentPosition(t)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Y=e?function(e,t){var i;return e===t?(u=!0,0):(i=!e.compareDocumentPosition-!t.compareDocumentPosition)||(1&(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===i?e===w||e.ownerDocument===g&&_(g,e)?-1:t===w||t.ownerDocument===g&&_(g,t)?1:l?y(l,e)-y(l,t):0:4&i?-1:1)}:function(e,t){if(e===t)return u=!0,0;var i,r=0,n=e.parentNode,s=t.parentNode,o=[e],a=[t];if(!n||!s)return e===w?-1:t===w?1:n?-1:s?1:l?y(l,e)-y(l,t):0;if(n===s)return de(e,t);for(i=e;i=i.parentNode;)o.unshift(i);for(i=t;i=i.parentNode;)a.unshift(i);for(;o[r]===a[r];)r++;return r?de(o[r],a[r]):o[r]===g?-1:a[r]===g?1:0}),w},R.matches=function(e,t){return R(e,null,null,t)},R.matchesSelector=function(e,t){if((e.ownerDocument||e)!==w&&T(e),t=t.replace(ie,"='$1']"),d.matchesSelector&&E&&!v[t+" "]&&(!r||!r.test(t))&&(!m||!m.test(t)))try{var i=n.call(e,t);if(i||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,c),e[3]=(e[3]||e[4]||e[5]||"").replace(O,c),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||R.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&R.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return p.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&re.test(i)&&(t=f(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,c).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=X[e+" "];return t||(t=new RegExp("(^|"+o+")"+e+"("+o+"|$)"))&&X(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(t,i,r){return function(e){e=R.attr(e,t);return null==e?"!="===i:!i||(e+="","="===i?e===r:"!="===i?e!==r:"^="===i?r&&0===e.indexOf(r):"*="===i?r&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function $(e,i,r){return v(i)?w.grep(e,function(e,t){return!!i.call(e,t,e)!==r}):i.nodeType?w.grep(e,function(e){return e===i!==r}):"string"!=typeof i?w.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/,ie=((w.fn.init=function(e,t,i){if(e){if(i=i||ee,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==i.ready?i.ready(e):e(w):w.makeArray(e,this);if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:te.exec(e))||!r[1]&&t)return(!t||t.jquery?t||i:this.constructor(t)).find(e);if(r[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:T,!0)),Q.test(r[1])&&w.isPlainObject(t))for(var r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r])}else(i=T.getElementById(r[2]))&&(this[0]=i,this.length=1)}return this}).prototype=w.fn,ee=w(T),/^(?:parents|prev(?:Until|All))/),re={children:!0,contents:!0,next:!0,prev:!0};function ne(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}w.fn.extend({has:function(e){var t=w(e,this),i=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]+)/i,we=/^$|^module$|\/(?:java|ecma)script/i,S={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function A(e,t){var i=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&l(e,t)?w.merge([e],i):i}function Ee(e,t){for(var i=0,r=e.length;ix",_.noCloneChecked=!!C.cloneNode(!0).lastChild.defaultValue;var ke=T.documentElement,Pe=/^key/,Oe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Re=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function k(){return!1}function Me(){try{return T.activeElement}catch(e){}}function Ie(e,t,i,r,n,s){var o,a;if("object"==typeof t){for(a in"string"!=typeof i&&(r=r||i,i=void 0),t)Ie(e,a,i,r,t[a],s);return e}if(null==r&&null==n?(n=i,r=i=void 0):null==n&&("string"==typeof i?(n=r,r=void 0):(n=r,r=i,i=void 0)),!1===n)n=k;else if(!n)return e;return 1===s&&(o=n,(n=function(e){return w().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=w.guid++)),e.each(function(){w.event.add(this,t,n,r,i)})}w.event={global:{},add:function(t,e,i,r,n){var s,o,a,l,u,h,c,p,d,f=g.get(t);if(f)for(i.handler&&(i=(s=i).handler,n=s.selector),n&&w.find.matchesSelector(ke,n),i.guid||(i.guid=w.guid++),(a=f.events)||(a=f.events={}),(o=f.handle)||(o=f.handle=function(e){return void 0!==w&&w.event.triggered!==e.type?w.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(E)||[""]).length;l--;)c=d=(p=Re.exec(e[l])||[])[1],p=(p[2]||"").split(".").sort(),c&&(u=w.event.special[c]||{},c=(n?u.delegateType:u.bindType)||c,u=w.event.special[c]||{},d=w.extend({type:c,origType:d,data:r,handler:i,guid:i.guid,selector:n,needsContext:n&&w.expr.match.needsContext.test(n),namespace:p.join(".")},s),(h=a[c])||((h=a[c]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(t,r,p,o)||t.addEventListener&&t.addEventListener(c,o)),u.add&&(u.add.call(t,d),d.handler.guid||(d.handler.guid=i.guid)),n?h.splice(h.delegateCount++,0,d):h.push(d),w.event.global[c]=!0)},remove:function(e,t,i,r,n){var s,o,a,l,u,h,c,p,d,f,m,_=g.hasData(e)&&g.get(e);if(_&&(l=_.events)){for(u=(t=(t||"").match(E)||[""]).length;u--;)if(d=m=(a=Re.exec(t[u])||[])[1],f=(a[2]||"").split(".").sort(),d){for(c=w.event.special[d]||{},p=l[d=(r?c.delegateType:c.bindType)||d]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=p.length;s--;)h=p[s],!n&&m!==h.origType||i&&i.guid!==h.guid||a&&!a.test(h.namespace)||r&&r!==h.selector&&("**"!==r||!h.selector)||(p.splice(s,1),h.selector&&p.delegateCount--,c.remove&&c.remove.call(e,h));o&&!p.length&&(c.teardown&&!1!==c.teardown.call(e,f,_.handle)||w.removeEvent(e,d,_.handle),delete l[d])}else for(d in l)w.event.remove(e,d+t[u],i,r,!0);w.isEmptyObject(l)&&g.remove(e,"handle events")}},dispatch:function(e){var t,i,r,n,s,o=w.event.fix(e),a=new Array(arguments.length),e=(g.get(this,"events")||{})[o.type]||[],l=w.event.special[o.type]||{};for(a[0]=o,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,Le=/\s*$/g;function ze(e,t){return l(e,"table")&&l(11!==t.nodeType?t:t.firstChild,"tr")&&w(e).children("tbody")[0]||e}function Be(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ue(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function je(e,t){var i,r,n,s,o,a;if(1===t.nodeType){if(g.hasData(e)&&(s=g.access(e),o=g.set(t,s),a=s.events))for(n in delete o.handle,o.events={},a)for(i=0,r=a[n].length;i")},clone:function(e,t,i){var r,n,s,o,a,l,u,h=e.cloneNode(!0),c=w.contains(e.ownerDocument,e);if(!(_.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(o=A(h),r=0,n=(s=A(e)).length;r").prop({charset:i.scriptCharset,src:i.url}).on("load error",n=function(e){r.remove(),n=null,e&&t("error"===e.type?404:200,e.type)}),T.head.appendChild(r[0])},abort:function(){n&&n()}}}),[]),Vt=/(=)\?(?=&|$)|\?\?/,qt=(w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Wt.pop()||w.expando+"_"+St++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",function(e,t,i){var r,n,s,o=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(o||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,o?e[o]=e[o].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||w.error(r+" was not called"),s[0]},e.dataTypes[0]="json",n=x[r],x[r]=function(){s=arguments},i.always(function(){void 0===n?w(x).removeProp(r):x[r]=n,e[r]&&(e.jsonpCallback=t.jsonpCallback,Wt.push(r)),s&&v(n)&&n(s[0]),s=n=void 0}),"script"}),_.createHTMLDocument=((e=T.implementation.createHTMLDocument("").body).innerHTML="
",2===e.childNodes.length),w.parseHTML=function(e,t,i){var r;return"string"!=typeof e?[]:("boolean"==typeof t&&(i=t,t=!1),t||(_.createHTMLDocument?((r=(t=T.implementation.createHTMLDocument("")).createElement("base")).href=T.location.href,t.head.appendChild(r)):t=T),r=!i&&[],(i=Q.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,r),r&&r.length&&w(r).remove(),w.merge([],i.childNodes)))},w.fn.load=function(e,t,i){var r,n,s,o=this,a=e.indexOf(" ");return-1").append(w.parseHTML(e)).find(r):e)}).always(i&&function(e,t){o.each(function(){i.apply(this,s||[e.responseText,t,e])})}),this},w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){w.fn[t]=function(e){return this.on(t,e)}}),w.expr.pseudos.animated=function(t){return w.grep(w.timers,function(e){return t===e.elem}).length},w.offset={setOffset:function(e,t,i){var r,n,s,o,a=w.css(e,"position"),l=w(e),u={};"static"===a&&(e.style.position="relative"),s=l.offset(),r=w.css(e,"top"),o=w.css(e,"left"),a=("absolute"===a||"fixed"===a)&&-1<(r+o).indexOf("auto")?(n=(a=l.position()).top,a.left):(n=parseFloat(r)||0,parseFloat(o)||0),null!=(t=v(t)?t.call(e,i,w.extend({},s)):t).top&&(u.top=t.top-s.top+n),null!=t.left&&(u.left=t.left-s.left+a),"using"in t?t.using.call(e,u):l.css(u)}},w.fn.extend({offset:function(t){var e,i;return arguments.length?void 0===t?this:this.each(function(e){w.offset.setOffset(this,t,e)}):(i=this[0])?i.getClientRects().length?(e=i.getBoundingClientRect(),i=i.ownerDocument.defaultView,{top:e.top+i.pageYOffset,left:e.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,i,r=this[0],n={top:0,left:0};if("fixed"===w.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),i=r.ownerDocument,e=r.offsetParent||i.documentElement;e&&(e===i.body||e===i.documentElement)&&"static"===w.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((n=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),n.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-n.top-w.css(r,"marginTop",!0),left:t.left-n.left-w.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===w.css(e,"position");)e=e.offsetParent;return e||ke})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var s="pageYOffset"===n;w.fn[t]=function(e){return c(this,function(e,t,i){var r;if(m(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===i)return r?r[n]:e[t];r?r.scrollTo(s?r.pageXOffset:i,s?i:r.pageYOffset):e[t]=i},t,e,arguments.length)}}),w.each(["top","left"],function(e,i){w.cssHooks[i]=$e(_.pixelPosition,function(e,t){if(t)return t=O(e,i),Ze.test(t)?w(e).position()[i]+"px":t})}),w.each({Height:"height",Width:"width"},function(o,a){w.each({padding:"inner"+o,content:a,"":"outer"+o},function(r,s){w.fn[s]=function(e,t){var i=arguments.length&&(r||"boolean"!=typeof e),n=r||(!0===e||!0===t?"margin":"border");return c(this,function(e,t,i){var r;return m(e)?0===s.indexOf("outer")?e["inner"+o]:e.document.documentElement["client"+o]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+o],r["scroll"+o],e.body["offset"+o],r["offset"+o],r["client"+o])):void 0===i?w.css(e,t,n):w.style(e,t,i,n)},a,i?e:void 0,i)}})}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,i){w.fn[i]=function(e,t){return 0this.updateCoord(e,a,"x");break;case"scaleY":case"skewY":n=i,s=i-(r=e[a=t.substr(0,t.length-1)].y),o=e=>this.updateCoord(e,a,"y");break;case"tint":case"blend":const l=Array.isArray(i)?i:[e.tint,i];r=0,s=n=l.length,o="tint"===t?e=>this.updateTint(e,l):e=>this.updateBlend(e,l);break;case"shake":r={x:e.x,y:e.y},n=i,o=e=>this.updateShake(e);break;case"position":r={x:e.x,y:e.y},s={x:(n={x:i.x,y:i.y}).x-r.x,y:n.y-r.y},o=e=>this.updatePosition(e);break;case"skew":case"scale":n=i,s=i-(r=e[t].x),o=e=>this.updatePoint(e,t);break;case"face":r=e.rotation,s=(n=u.shortestAngle(r,Math.atan2(i.y-e.y,i.x-e.x)))-r,o=e=>this.updateOne(e,"rotation");break;default:n=i,s=i-(r=e[t]),o=e=>this.updateOne(e,t)}this.eases.push({element:e,entry:t,update:o,start:r,to:n,delta:s})}static shortestAngle(e,t){var i=2*Math.PI,r=Math.abs(e-t)%i;return(r>Math.PI?i-r:r)*(0<((t-e+Math.PI)%i+i)%i-Math.PI?1:-1)}remove(t,i){if(0===arguments.length)this.eases=[];else{"string"==typeof i&&(i=[i]);for(let e=0;e>16)+i*(t>>16)<<16|o*(s>>8&255)+i*(t>>8&255)<<8|o*(255&s)+i*(255&t)}updateShake(e){function t(e){return Math.floor(Math.random()*e)-Math.floor(e/2)}e.element.x=e.start.x+t(e.to),e.element.y=e.start.y+t(e.to)}complete(e){"shake"===e.entry&&(e.element.x=e.start.x,e.element.y=e.start.y)}reverse(e){var t,i;"position"===e.entry?(i=e.to.x,t=e.to.y,e.to.x=e.start.x,e.to.y=e.start.y,e.start.x=i,e.start.y=t,e.delta.x=-e.delta.x,e.delta.y=-e.delta.y):(i=e.to,e.to=e.start,e.start=i,e.delta=-e.delta)}repeat(e){switch(e.entry){case"skewX":e.element.skew.x=e.start;break;case"skewY":e.element.skew.y=e.start;break;case"skew":e.element.skew.x=e.start,e.element.skew.y=e.start;break;case"scaleX":e.element.scale.x=e.start;break;case"scaleY":e.element.scale.y=e.start;break;case"scale":e.element.scale.x=e.start,e.element.scale.y=e.start;break;case"position":e.element.x=e.start.x,e.element.y=e.start.y;break;default:e.element[e.entry]=e.start}}update(e){if(0===this.eases.length)return!0;if(this.options.wait){if(this.options.wait-=e,0=this.options.duration&&(t=this.time-this.options.duration,this.time=this.options.duration);for(let e=0;e=this.options.duration)if(this.options.reverse)this.eases.forEach(e=>this.reverse(e)),(this.time=t)&&this.eases.forEach(e=>e.update(e)),this.emit("reverse",this),this.options.repeat?!0!==this.options.repeat&&this.options.repeat--:this.options.reverse=!1;else{if(!this.options.repeat)return this.eases.forEach(e=>this.complete(e)),this.emit("complete",this),!0;this.eases.forEach(e=>this.repeat(e)),(this.time=t)&&this.eases.forEach(e=>e.update(e)),!0!==this.options.repeat&&this.options.repeat--,this.emit("repeat",this)}}get count(){return this.eases.length}}const s={duration:1e3,ease:r.easeInOutSine,maxFrame:1e3/60,ticker:null,useRAF:!0};class o extends n{constructor(e){super(),this.options=Object.assign({},s,e),this.easings=[],this.empty=!0,this.options.ticker&&this.options.ticker.add(this.update,this)}destroy(){this.removeAll(),this.options.useTicker?this.ticker.remove(this.update,this):this.options.useRAF&&(cancelAnimationFrame(this.handleRAF),this.handleRAF=null)}add(e,t,i){(i=i||{}).duration=(void 0!==i.duration?i:this.options).duration,i.ease=i.ease||this.options.ease,"string"==typeof i.ease&&(i.ease=r[i.ease]);e=new u(e,t,i);return this.easings.push(e),this.empty&&this.options.useRAF&&(this.handleRAF=requestAnimationFrame(()=>this.update()),this.lastTime=Date.now()),this.empty=!1,e}target(e,t,i,r){i=Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))/i;return(r=r||{}).duration=i,this.add(e,{x:t.x,y:t.y},r)}face(e,t,i,r){t=u.shortestAngle(e.rotation,Math.atan2(t.y-e.y,t.x-e.x)),i=Math.abs(t-e.rotation)/i;return(r=r||{}).duration=i,this.add(e,{rotation:t},r)}removeEase(t,i){for(let e=0;ethis.update()):this.handleRAF=null}get count(){return this.easings.length}countRunning(){let e=0;for(var t of this.easings)e+=t.count;return e}set duration(e){this.options.duration=e}get duration(){return this.options.duration}set ease(e){this.options.ease=e}get ease(){return this.options.ease}}o.id=0;n=new o;o.ease=n,e.Ease=o,e.List=class{constructor(){console.warn("Ease.List was deprecated. Use new Ease() instead.")}},e.ease=n,Object.defineProperty(e,"__esModule",{value:!0})}),this.PIXI=this.PIXI||{},!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@pixi/math"),require("@pixi/display"),require("@pixi/ticker")):"function"==typeof define&&define.amd?define(["exports","@pixi/math","@pixi/display","@pixi/ticker"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).pixi_viewport={},e.PIXI,e.PIXI,e.PIXI)}(this,function(e,a,t,i){"use strict";class r{constructor(e){this.parent=e,this.paused=!1}destroy(){}down(e){return!1}move(e){return!1}up(e){return!1}wheel(e){return!1}update(e){}resize(){}reset(){}pause(){this.paused=!0}resume(){this.paused=!1}}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};(function(t){!function(){var n={linear:function(e,t,i,r){return i*e/r+t},easeInQuad:function(e,t,i,r){return i*(e/=r)*e+t},easeOutQuad:function(e,t,i,r){return-i*(e/=r)*(e-2)+t},easeInOutQuad:function(e,t,i,r){return(e/=r/2)<1?i/2*e*e+t:-i/2*(--e*(e-2)-1)+t},easeInCubic:function(e,t,i,r){return i*(e/=r)*e*e+t},easeOutCubic:function(e,t,i,r){return i*((e=e/r-1)*e*e+1)+t},easeInOutCubic:function(e,t,i,r){return(e/=r/2)<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t},easeInQuart:function(e,t,i,r){return i*(e/=r)*e*e*e+t},easeOutQuart:function(e,t,i,r){return-i*((e=e/r-1)*e*e*e-1)+t},easeInOutQuart:function(e,t,i,r){return(e/=r/2)<1?i/2*e*e*e*e+t:-i/2*((e-=2)*e*e*e-2)+t},easeInQuint:function(e,t,i,r){return i*(e/=r)*e*e*e*e+t},easeOutQuint:function(e,t,i,r){return i*((e=e/r-1)*e*e*e*e+1)+t},easeInOutQuint:function(e,t,i,r){return(e/=r/2)<1?i/2*e*e*e*e*e+t:i/2*((e-=2)*e*e*e*e+2)+t},easeInSine:function(e,t,i,r){return-i*Math.cos(e/r*(Math.PI/2))+i+t},easeOutSine:function(e,t,i,r){return i*Math.sin(e/r*(Math.PI/2))+t},easeInOutSine:function(e,t,i,r){return-i/2*(Math.cos(Math.PI*e/r)-1)+t},easeInExpo:function(e,t,i,r){return 0===e?t:i*Math.pow(2,10*(e/r-1))+t},easeOutExpo:function(e,t,i,r){return e===r?t+i:i*(1-Math.pow(2,-10*e/r))+t},easeInOutExpo:function(e,t,i,r){return(e/=r/2)<1?i/2*Math.pow(2,10*(e-1))+t:i/2*(2-Math.pow(2,-10*--e))+t},easeInCirc:function(e,t,i,r){return-i*(Math.sqrt(1-(e/=r)*e)-1)+t},easeOutCirc:function(e,t,i,r){return i*Math.sqrt(1-(e=e/r-1)*e)+t},easeInOutCirc:function(e,t,i,r){return(e/=r/2)<1?-i/2*(Math.sqrt(1-e*e)-1)+t:i/2*(Math.sqrt(1-(e-=2)*e)+1)+t},easeInElastic:function(e,t,i,r){var n=1.70158,s=0,o=i;return 0!==e&&(e/=r),s=s||.3*r,n=o=this.options.time?(t=this.parent.width,i=this.parent.height,this.complete(),t===this.parent.width&&i===this.parent.height||this.parent.emit("zoomed",{viewport:this.parent,original:e,type:"animate"})):(t=this.options.ease(this.time,0,1,this.options.time),null!==this.width&&(i=this.startWidth,r=this.deltaWidth,this.parent.fitWidth(i+r*t,this.keepCenter,null===this.height)),null!==this.height&&(i=this.startHeight,r=this.deltaHeight,this.parent.fitHeight(i+r*t,this.keepCenter,null===this.width)),null===this.width?this.parent.scale.x=this.parent.scale.y:null===this.height&&(this.parent.scale.y=this.parent.scale.x),this.keepCenter||(i=this.startX,r=this.startY,n=this.deltaX,s=this.deltaY,o=new a.Point(this.parent.x,this.parent.y),this.parent.moveCenter(i+n*t,r+s*t),this.parent.emit("moved",{viewport:this.parent,original:o,type:"animate"})),(this.width||this.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:e,type:"animate"})))}}function p(e){let t=void 0,i=e[0],r=1;for(;ri.call(t,...e)),t=void 0)}return i}const d={sides:"all",friction:.5,time:150,ease:"easeInOutSine",underflow:"center",bounceBox:null};class f extends r{constructor(e,t={}){super(e),this.options=Object.assign({},d,t),this.ease=u(this.options.ease,"easeInOutSine"),this.options.sides?"all"===this.options.sides?this.top=this.bottom=this.left=this.right=!0:"horizontal"===this.options.sides?(this.right=this.left=!0,this.top=this.bottom=!1):"vertical"===this.options.sides?(this.left=this.right=!1,this.top=this.bottom=!0):(this.top=-1!==this.options.sides.indexOf("top"),this.bottom=-1!==this.options.sides.indexOf("bottom"),this.left=-1!==this.options.sides.indexOf("left"),this.right=-1!==this.options.sides.indexOf("right")):this.left=this.top=this.right=this.bottom=!1;e=this.options.underflow.toLowerCase();"center"===e?(this.underflowX=0,this.underflowY=0):(this.underflowX=-1!==e.indexOf("left")?-1:-1!==e.indexOf("right")?1:0,this.underflowY=-1!==e.indexOf("top")?-1:-1!==e.indexOf("bottom")?1:0),this.reset()}isActive(){return null!==this.toX||null!==this.toY}down(){return this.toX=this.toY=null,!1}up(){return this.bounce(),!1}update(e){var t;this.paused||(this.bounce(),this.toX&&((t=this.toX).time+=e,this.parent.emit("moved",{viewport:this.parent,type:"bounce-x"}),t.time>=this.options.time?(this.parent.x=t.end,this.toX=null,this.parent.emit("bounce-x-end",this.parent)):this.parent.x=this.ease(t.time,t.start,t.delta,this.options.time)),this.toY&&((t=this.toY).time+=e,this.parent.emit("moved",{viewport:this.parent,type:"bounce-y"}),t.time>=this.options.time?(this.parent.y=t.end,this.toY=null,this.parent.emit("bounce-y-end",this.parent)):this.parent.y=this.ease(t.time,t.start,t.delta,this.options.time)))}calcUnderflowX(){let e;switch(this.underflowX){case-1:e=0;break;case 1:e=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:e=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}return e}calcUnderflowY(){let e;switch(this.underflowY){case-1:e=0;break;case 1:e=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:e=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}return e}oob(){var e,t,i,r=this.options.bounceBox;return r?(e=void 0===r.x?0:r.x,t=void 0===r.y?0:r.y,i=void 0===r.width?this.parent.worldWidth:r.width,r=void 0===r.height?this.parent.worldHeight:r.height,{left:this.parent.lefti,top:this.parent.topr,topLeft:new a.Point(e*this.parent.scale.x,t*this.parent.scale.y),bottomRight:new a.Point(i*this.parent.scale.x-this.parent.screenWidth,r*this.parent.scale.y-this.parent.screenHeight)}):{left:this.parent.left<0,right:this.parent.right>this.parent.worldWidth,top:this.parent.top<0,bottom:this.parent.bottom>this.parent.worldHeight,topLeft:new a.Point(0,0),bottomRight:new a.Point(this.parent.worldWidth*this.parent.scale.x-this.parent.screenWidth,this.parent.worldHeight*this.parent.scale.y-this.parent.screenHeight)}}bounce(){if(!this.paused){let t,e=this.parent.plugins.get("decelerate",!0);e&&(e.x||e.y)&&(e.x&&e.percentChangeX===p([e,"access",e=>e.options,"optionalAccess",e=>e.friction])||e.y&&e.percentChangeY===p([e,"access",e=>e.options,"optionalAccess",e=>e.friction]))&&(((t=this.oob()).left&&this.left||t.right&&this.right)&&(e.percentChangeX=this.options.friction),(t.top&&this.top||t.bottom&&this.bottom)&&(e.percentChangeY=this.options.friction));var i=this.parent.plugins.get("drag",!0)||{},r=this.parent.plugins.get("pinch",!0)||{};if(e=e||{},!(p([i,"optionalAccess",e=>e.active])||p([r,"optionalAccess",e=>e.active])||this.toX&&this.toY||e.x&&e.y)){i=(t=t||this.oob()).topLeft,r=t.bottomRight;if(!this.toX&&!e.x){let e=null;t.left&&this.left?e=this.parent.screenWorldWidth(!0===this.options.right?this.parent.worldWidth:this.options.right)&&(this.parent.x=-(!0===this.options.right?this.parent.worldWidth:this.options.right)*this.parent.scale.x+this.parent.screenWidth,i.x=0,e=!0);e&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-x"})}if(null!==this.options.top||null!==this.options.bottom){let e=!1;if(!this.noUnderflow&&this.parent.screenWorldHeight(!0===this.options.bottom?this.parent.worldHeight:this.options.bottom)&&(this.parent.y=-(!0===this.options.bottom?this.parent.worldHeight:this.options.bottom)*this.parent.scale.y+this.parent.screenHeight,i.y=0,e=!0);e&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-y"})}this.last.x=this.parent.x,this.last.y=this.parent.y,this.last.scaleX=this.parent.scale.x,this.last.scaleY=this.parent.scale.y}}reset(){this.update()}}const g={minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,minScale:null,maxScale:null};class v extends r{constructor(e,t={}){super(e),this.options=Object.assign({},g,t),this.clamp()}resize(){this.clamp()}clamp(){if(!this.paused)if(this.options.minWidth||this.options.minHeight||this.options.maxWidth||this.options.maxHeight){let e=this.parent.worldScreenWidth,t=this.parent.worldScreenHeight;null!==this.options.minWidth&&ethis.options.maxWidth&&(r=this.parent.scale.x,this.parent.fitWidth(this.options.maxWidth,!1,!1,!0),this.parent.scale.y*=this.parent.scale.x/r,e=this.parent.worldScreenWidth,t=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})),null!==this.options.minHeight&&tthis.options.maxHeight&&(r=this.parent.scale.y,this.parent.fitHeight(this.options.maxHeight,!1,!1,!0),this.parent.scale.x*=this.parent.scale.y/r,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"}))}else if(this.options.minScale||this.options.maxScale){var i,r={x:null,y:null},n={x:null,y:null};"number"==typeof this.options.minScale?(r.x=this.options.minScale,r.y=this.options.minScale):null!==this.options.minScale&&(i=this.options.minScale,r.x=void 0===i.x?null:i.x,r.y=void 0===i.y?null:i.y),"number"==typeof this.options.maxScale?(n.x=this.options.maxScale,n.y=this.options.maxScale):null!==this.options.maxScale&&(i=this.options.maxScale,n.x=void 0===i.x?null:i.x,n.y=void 0===i.y?null:i.y);let e=this.parent.scale.x,t=this.parent.scale.y;null!==r.x&&en.x&&(e=n.x),null!==r.y&&tn.y&&(t=n.y),e===this.parent.scale.x&&t===this.parent.scale.y||(this.parent.scale.set(e,t),this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"}))}}reset(){this.clamp()}}const y={friction:.98,bounce:.8,minSpeed:.01};class b extends r{constructor(e,t={}){super(e),this.options=Object.assign({},y,t),this.saved=[],this.timeSinceRelease=0,this.reset(),this.parent.on("moved",e=>this.moved(e))}down(){return this.saved=[],this.x=this.y=null,!1}isActive(){return!(!this.x&&!this.y)}move(){var e;return this.paused||(1===(e=this.parent.input.count())||1=e-100){var t=e-i.time;this.x=(this.parent.x-i.x)/t,this.y=(this.parent.y-i.y)/t,this.percentChangeX=this.percentChangeY=this.options.friction,this.timeSinceRelease=0;break}}return!1}activate(e){void 0!==(e=e||{}).x&&(this.x=e.x,this.percentChangeX=this.options.friction),void 0!==e.y&&(this.y=e.y,this.percentChangeY=this.options.friction)}update(e){var t,i,r,n,s;this.paused||(t=this.x||this.y,i=this.timeSinceRelease,r=this.timeSinceRelease+e,this.x&&(s=this.percentChangeX,n=Math.log(s),this.parent.x+=16*this.x/n*(Math.pow(s,r/16)-Math.pow(s,i/16)),this.x*=Math.pow(this.percentChangeX,e/16)),this.y&&(n=this.percentChangeY,s=Math.log(n),this.parent.y+=16*this.y/s*(Math.pow(n,r/16)-Math.pow(n,i/16)),this.y*=Math.pow(this.percentChangeY,e/16)),this.timeSinceRelease+=e,this.x&&this.y?Math.abs(this.x){t.includes(e.code)&&(this.keyIsPressed=!0)}),window.addEventListener("keyup",e=>{t.includes(e.code)&&(this.keyIsPressed=!1)})}mouseButtons(e){this.mouse=e&&"all"!==e?[-1!==e.indexOf("left"),-1!==e.indexOf("middle"),-1!==e.indexOf("right")]:[!0,!0,!0]}parseUnderflow(){var e=this.options.underflow.toLowerCase();"center"===e?(this.underflowX=0,this.underflowY=0):(e.includes("left")?this.underflowX=-1:e.includes("right")?this.underflowX=1:this.underflowX=0,e.includes("top")?this.underflowY=-1:e.includes("bottom")?this.underflowY=1:this.underflowY=0)}checkButtons(e){var t="mouse"===e.data.pointerType,i=this.parent.input.count();return!(!(1===i||1this.parent.worldWidth&&(this.parent.x=-this.parent.worldWidth*this.parent.scale.x+this.parent.screenWidth,e.x=0);if("x"!==this.options.clampWheel)if(this.parent.screenWorldHeightthis.parent.worldHeight&&(this.parent.y=-this.parent.worldHeight*this.parent.scale.y+this.parent.screenHeight,e.y=0)}}const w={speed:0,acceleration:null,radius:null};class E extends r{constructor(e,t,i={}){super(e),this.target=t,this.options=Object.assign({},w,i),this.velocity={x:0,y:0}}update(i){if(!this.paused){var r=this.parent.center;let e=this.target.x,t=this.target.y;if(this.options.radius){if(!(Math.sqrt(Math.pow(this.target.y-r.y,2)+Math.pow(this.target.x-r.x,2))>this.options.radius))return;var n=Math.atan2(this.target.y-r.y,this.target.x-r.x);e=this.target.x-Math.cos(n)*this.options.radius,t=this.target.y-Math.sin(n)*this.options.radius}var s,o,a,n=e-r.x,l=t-r.y;(n||l)&&(this.options.speed?this.options.acceleration?(o=Math.atan2(t-r.y,e-r.x),(s=Math.sqrt(Math.pow(n,2)+Math.pow(l,2)))&&(a=(Math.pow(this.velocity.x,2)+Math.pow(this.velocity.y,2))/(2*this.options.acceleration),this.velocity=aMath.abs(n)?e:r.x+a,o=Math.abs(s)>Math.abs(l)?t:r.y+s,this.parent.moveCenter(i,o),this.parent.emit("moved",{viewport:this.parent,type:"follow"}))):(a=Math.atan2(t-r.y,e-r.x),s=Math.cos(a)*this.options.speed,i=Math.sin(a)*this.options.speed,o=Math.abs(s)>Math.abs(n)?e:r.x+s,a=Math.abs(i)>Math.abs(l)?t:r.y+i,this.parent.moveCenter(o,a),this.parent.emit("moved",{viewport:this.parent,type:"follow"})):(this.parent.moveCenter(e,t),this.parent.emit("moved",{viewport:this.parent,type:"follow"})))}}}const S={radius:null,distance:null,top:null,bottom:null,left:null,right:null,speed:8,reverse:!1,noDecelerate:!1,linear:!1,allowButtons:!1};class A extends r{constructor(e,t={}){super(e),this.options=Object.assign({},S,t),this.reverse=this.options.reverse?1:-1,this.radiusSquared="number"==typeof this.options.radius?Math.pow(this.options.radius,2):null,this.resize()}resize(){var e=this.options.distance;null!==e?(this.left=e,this.top=e,this.right=this.parent.screenWidth-e,this.bottom=this.parent.screenHeight-e):this.options.radius||(this.left=this.options.left,this.top=this.options.top,this.right=null===this.options.right?null:this.parent.screenWidth-this.options.right,this.bottom=null===this.options.bottom?null:this.parent.screenHeight-this.options.bottom)}down(){return this.paused||this.options.allowButtons||(this.horizontal=this.vertical=null),!1}move(e){var t,i;return this.paused||"mouse"!==e.data.pointerType&&1!==e.data.identifier||!this.options.allowButtons&&0!==e.data.buttons||(t=e.data.global.x,e=e.data.global.y,this.radiusSquared?(i=this.parent.toScreen(this.parent.center),Math.pow(i.x-t,2)+Math.pow(i.y-e,2)>=this.radiusSquared?(i=Math.atan2(i.y-e,i.x-t),this.options.linear?(this.horizontal=Math.round(Math.cos(i))*this.options.speed*this.reverse*.06,this.vertical=Math.round(Math.sin(i))*this.options.speed*this.reverse*.06):(this.horizontal=Math.cos(i)*this.options.speed*this.reverse*.06,this.vertical=Math.sin(i)*this.options.speed*this.reverse*.06)):(this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=0)):(null!==this.left&&tthis.right?this.horizontal=-1*this.reverse*this.options.speed*.06:(this.decelerateHorizontal(),this.horizontal=0),null!==this.top&&ethis.bottom?this.vertical=-1*this.reverse*this.options.speed*.06:(this.decelerateVertical(),this.vertical=0))),!1}decelerateHorizontal(){var e=this.parent.plugins.get("decelerate",!0);this.horizontal&&e&&!this.options.noDecelerate&&e.activate({x:this.horizontal*this.options.speed*this.reverse/(1e3/60)})}decelerateVertical(){var e=this.parent.plugins.get("decelerate",!0);this.vertical&&e&&!this.options.noDecelerate&&e.activate({y:this.vertical*this.options.speed*this.reverse/(1e3/60)})}up(){return this.paused||(this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=null),!1}update(){var e;this.paused||(this.horizontal||this.vertical)&&(e=this.parent.center,this.horizontal&&(e.x+=this.horizontal*this.options.speed),this.vertical&&(e.y+=this.vertical*this.options.speed),this.parent.moveCenter(e),this.parent.emit("moved",{viewport:this.parent,type:"mouse-edges"}))}}const F={noDrag:!1,percent:1,center:null,factor:1,axis:"all"};class k extends r{__init(){this.active=!1}__init2(){this.pinching=!1}__init3(){this.moved=!1}constructor(e,t={}){super(e),k.prototype.__init.call(this),k.prototype.__init2.call(this),k.prototype.__init3.call(this),this.options=Object.assign({},F,t)}down(){return 2<=this.parent.input.count()&&(this.active=!0)}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}move(i){if(!this.paused&&this.active){var r=i.data.global.x,n=i.data.global.y,s=this.parent.input.touches;if(2<=s.length){var o=s[0],s=s[1],a=o.last&&s.last?Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2)):null;if(o.id===i.data.pointerId?o.last={x:r,y:n,data:i.data}:s.id===i.data.pointerId&&(s.last={x:r,y:n,data:i.data}),a){let e;r={x:o.last.x+(s.last.x-o.last.x)/2,y:o.last.y+(s.last.y-o.last.y)/2};this.options.center||(e=this.parent.toLocal(r));let t=Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2));n=(1-a/(t=0===t?t=1e-10:t))*this.options.percent*(this.isAxisX()?this.parent.scale.x:this.parent.scale.y),i=(this.isAxisX()&&(this.parent.scale.x+=n),this.isAxisY()&&(this.parent.scale.y+=n),this.parent.emit("zoomed",{viewport:this.parent,type:"pinch",center:r}),this.parent.plugins.get("clamp-zoom",!0));i&&i.clamp(),this.options.center?this.parent.moveCenter(this.options.center):(s=this.parent.toGlobal(e),this.parent.x+=(r.x-s.x)*this.options.factor,this.parent.y+=(r.y-s.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),!this.options.noDrag&&this.lastCenter&&(this.parent.x+=(r.x-this.lastCenter.x)*this.options.factor,this.parent.y+=(r.y-this.lastCenter.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=r,this.moved=!0}else this.pinching||(this.parent.emit("pinch-start",this.parent),this.pinching=!0);return!0}}return!1}up(){return!!(this.pinching&&this.parent.input.touches.length<=1)&&(this.active=!1,this.lastCenter=null,this.pinching=!1,this.moved=!1,this.parent.emit("pinch-end",this.parent),!0)}}const N={topLeft:!1,friction:.8,time:1e3,ease:"easeInOutSine",interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1};class P extends r{constructor(e,t,i,r={}){super(e),this.options=Object.assign({},N,r),this.ease=u(r.ease,"easeInOutSine"),this.x=t,this.y=i,this.options.forceStart&&this.snapStart()}snapStart(){this.percent=0,this.snapping={time:0};var e=this.options.topLeft?this.parent.corner:this.parent.center;this.deltaX=this.x-e.x,this.deltaY=this.y-e.y,this.startX=e.x,this.startY=e.y,this.parent.emit("snap-start",this.parent)}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap"):this.options.interrupt&&(this.snapping=null),!1}up(){var e;return 0===this.parent.input.count()&&(e=this.parent.plugins.get("decelerate",!0))&&(e.x||e.y)&&(e.percentChangeX=e.percentChangeY=this.options.friction),!1}update(r){if(!(this.paused||this.options.interrupt&&0!==this.parent.input.count()))if(this.snapping){var n=this.snapping;n.time+=r;let e,t,i;var r=this.startX,s=this.startY,o=this.deltaX,a=this.deltaY;i=n.time>this.options.time?(e=!0,t=r+o,s+a):(n=this.ease(n.time,0,1,this.options.time),t=r+o*n,s+a*n),this.options.topLeft?this.parent.moveCorner(t,i):this.parent.moveCenter(t,i),this.parent.emit("moved",{viewport:this.parent,type:"snap"}),e&&(this.options.removeOnComplete&&this.parent.plugins.remove("snap"),this.parent.emit("snap-end",this.parent),this.snapping=null)}else{r=this.options.topLeft?this.parent.corner:this.parent.center;r.x===this.x&&r.y===this.y||this.snapStart()}}}const z={width:0,height:0,time:1e3,ease:"easeInOutSine",center:null,interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1,noMove:!1};class O extends r{constructor(e,t={}){super(e),this.options=Object.assign({},z,t),this.ease=u(this.options.ease),this.xIndependent=!1,this.yIndependent=!1,this.xScale=0,(this.yScale=0)=this.options.time?(this.parent.scale.set(this.xScale,this.yScale),this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom"),this.parent.emit("snap-zoom-end",this.parent),this.snapping=null):(t=this.snapping,i=this.ease(t.time,t.startX,t.deltaX,this.options.time),t=this.ease(t.time,t.startY,t.deltaY,this.options.time),this.parent.scale.x=this.parent.screenWidth/i,this.parent.scale.y=this.parent.screenHeight/t),(i=this.parent.plugins.get("clamp-zoom",!0))&&i.clamp(),this.options.noMove||(this.options.center?this.parent.moveCenter(this.options.center):this.parent.moveCenter(e))):this.parent.scale.x===this.xScale&&this.parent.scale.y===this.yScale||this.createSnapping()}}resume(){this.snapping=null,super.resume()}}const B={percent:.1,smooth:!1,interrupt:!0,reverse:!1,center:null,lineHeight:20,axis:"all",keyToPress:null,trackpadPinch:!1,wheelZoom:!0};class R extends r{constructor(e,t={}){super(e),this.options=Object.assign({},B,t),this.keyIsPressed=!1,this.options.keyToPress&&this.handleKeyPresses(this.options.keyToPress)}handleKeyPresses(t){window.addEventListener("keydown",e=>{t.includes(e.code)&&(this.keyIsPressed=!0)}),window.addEventListener("keyup",e=>{t.includes(e.code)&&(this.keyIsPressed=!1)})}checkKeyPress(){return!this.options.keyToPress||this.keyIsPressed}down(){return this.options.interrupt&&(this.smoothing=null),!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}update(){if(this.smoothing){var t=this.smoothingCenter,i=this.smoothing;let e;this.options.center||(e=this.parent.toLocal(t)),this.isAxisX()&&(this.parent.scale.x+=i.x),this.isAxisY()&&(this.parent.scale.y+=i.y),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});var i=this.parent.plugins.get("clamp-zoom",!0);i&&i.clamp(),this.options.center?this.parent.moveCenter(this.options.center):(i=this.parent.toGlobal(e),this.parent.x+=t.x-i.x,this.parent.y+=t.y-i.y),this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.smoothingCount++,this.smoothingCount>=this.options.smooth&&(this.smoothing=null)}}pinch(t){if(!this.paused){var i=this.parent.input.getPointerPosition(t),r=-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/200,r=Math.pow(2,(1+this.options.percent)*r);let e;this.options.center||(e=this.parent.toLocal(i)),this.isAxisX()&&(this.parent.scale.x*=r),this.isAxisY()&&(this.parent.scale.y*=r),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});r=this.parent.plugins.get("clamp-zoom",!0);r&&r.clamp(),this.options.center?this.parent.moveCenter(this.options.center):(r=this.parent.toGlobal(e),this.parent.x+=i.x-r.x,this.parent.y+=i.y-r.y),this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel",{wheel:{dx:t.deltaX,dy:t.deltaY,dz:t.deltaZ},event:t,viewport:this.parent})}}wheel(e){if(this.paused)return!1;if(!this.checkKeyPress())return!1;if(e.ctrlKey&&this.options.trackpadPinch)this.pinch(e);else if(this.options.wheelZoom){var t=this.parent.input.getPointerPosition(e),i=(this.options.reverse?-1:1)*-e.deltaY*(e.deltaMode?this.options.lineHeight:1)/500,i=Math.pow(2,(1+this.options.percent)*i);if(this.options.smooth){var r={x:this.smoothing?this.smoothing.x*(this.options.smooth-this.smoothingCount):0,y:this.smoothing?this.smoothing.y*(this.options.smooth-this.smoothingCount):0};this.smoothing={x:((this.parent.scale.x+r.x)*i-this.parent.scale.x)/this.options.smooth,y:((this.parent.scale.y+r.y)*i-this.parent.scale.y)/this.options.smooth},this.smoothingCount=0,this.smoothingCenter=t}else{let e;this.options.center||(e=this.parent.toLocal(t)),this.isAxisX()&&(this.parent.scale.x*=i),this.isAxisY()&&(this.parent.scale.y*=i),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});r=this.parent.plugins.get("clamp-zoom",!0);r&&r.clamp(),this.options.center?this.parent.moveCenter(this.options.center):(i=this.parent.toGlobal(e),this.parent.x+=t.x-i.x,this.parent.y+=t.y-i.y)}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel",{wheel:{dx:e.deltaX,dy:e.deltaY,dz:e.deltaZ},event:e,viewport:this.parent})}return!this.parent.options.passiveWheel}}class C{constructor(e){this.viewport=e,this.touches=[],this.addListeners()}addListeners(){this.viewport.interactive=!0,this.viewport.forceHitArea||(this.viewport.hitArea=new a.Rectangle(0,0,this.viewport.worldWidth,this.viewport.worldHeight)),this.viewport.on("pointerdown",this.down,this),this.viewport.on("pointermove",this.move,this),this.viewport.on("pointerup",this.up,this),this.viewport.on("pointerupoutside",this.up,this),this.viewport.on("pointercancel",this.up,this),this.viewport.on("pointerout",this.up,this),this.wheelFunction=e=>this.handleWheel(e),this.viewport.options.divWheel.addEventListener("wheel",this.wheelFunction,{passive:this.viewport.options.passiveWheel}),this.isMouseDown=!1}destroy(){this.viewport.options.divWheel.removeEventListener("wheel",this.wheelFunction)}down(e){var t,i;!this.viewport.pause&&this.viewport.worldVisible&&("mouse"===e.data.pointerType?this.isMouseDown=!0:this.get(e.data.pointerId)||this.touches.push({id:e.data.pointerId,last:null}),1!==this.count()||(this.last=e.data.global.clone(),t=this.viewport.plugins.get("decelerate",!0),i=this.viewport.plugins.get("bounce",!0),t&&t.isActive()||i&&i.isActive())?this.clickedAvailable=!1:this.clickedAvailable=!0,this.viewport.plugins.down(e)&&this.viewport.options.stopPropagation&&e.stopPropagation())}clear(){this.isMouseDown=!1,this.touches=[],this.last=null}checkThreshold(e){return Math.abs(e)>=this.viewport.threshold}move(e){var t,i,r;!this.viewport.pause&&this.viewport.worldVisible&&(t=this.viewport.plugins.move(e),this.clickedAvailable&&this.last&&(i=e.data.global.x-this.last.x,r=e.data.global.y-this.last.y,(this.checkThreshold(i)||this.checkThreshold(r))&&(this.clickedAvailable=!1)),t&&this.viewport.options.stopPropagation&&e.stopPropagation())}up(e){var t;!this.viewport.pause&&this.viewport.worldVisible&&("mouse"===e.data.pointerType&&(this.isMouseDown=!1),"mouse"!==e.data.pointerType&&this.remove(e.data.pointerId),t=this.viewport.plugins.up(e),this.clickedAvailable&&0===this.count()&&this.last&&(this.viewport.emit("clicked",{event:e,screen:this.last,world:this.viewport.toWorld(this.last),viewport:this}),this.clickedAvailable=!1),t&&this.viewport.options.stopPropagation&&e.stopPropagation())}getPointerPosition(e){var t,i=new a.Point;return this.viewport.options.interaction?this.viewport.options.interaction.mapPositionToPoint(i,e.clientX,e.clientY):this.viewport.options.useDivWheelForInputManager&&this.viewport.options.divWheel?(t=this.viewport.options.divWheel.getBoundingClientRect(),i.x=e.clientX-t.left,i.y=e.clientY-t.top):(i.x=e.clientX,i.y=e.clientY),i}handleWheel(e){var t;this.viewport.pause||!this.viewport.worldVisible||this.viewport.options.interaction&&this.viewport.options.interaction.interactionDOMElement!==e.target||(t=this.viewport.toLocal(this.getPointerPosition(e)),this.viewport.left<=t.x&&t.x<=this.viewport.right&&this.viewport.top<=t.y&&t.y<=this.viewport.bottom&&this.viewport.plugins.wheel(e)&&!this.viewport.options.passiveWheel&&e.preventDefault())}pause(){this.touches=[],this.isMouseDown=!1}get(e){for(const t of this.touches)if(t.id===e)return t;return null}remove(t){for(let e=0;ei.call(t,...e)),t=void 0)}return i}const I=["drag","pinch","wheel","follow","mouse-edges","decelerate","animate","bounce","snap-zoom","clamp-zoom","snap","clamp"];class D{constructor(e){this.viewport=e,this.list=[],this.plugins={}}add(e,t,i=I.length){this.plugins[e]=t;t=I.indexOf(e);-1!==t&&I.splice(t,1),I.splice(i,0,e),this.sort()}get(t,e){return e&&M([this,"access",e=>e.plugins,"access",e=>e[t],"optionalAccess",e=>e.paused])?null:this.plugins[t]}update(e){for(const t of this.list)t.update(e)}resize(){for(const e of this.list)e.resize()}reset(){for(const e of this.list)e.reset()}removeAll(){this.plugins={},this.sort()}remove(e){this.plugins[e]&&(delete this.plugins[e],this.viewport.emit(e+"-remove"),this.sort())}pause(t){M([this,"access",e=>e.plugins,"access",e=>e[t],"optionalAccess",e=>e.pause,"call",e=>e()])}resume(t){M([this,"access",e=>e.plugins,"access",e=>e[t],"optionalAccess",e=>e.resume,"call",e=>e()])}sort(){this.list=[];for(const e of I)this.plugins[e]&&this.list.push(this.plugins[e])}down(e){let t=!1;for(const i of this.list)i.down(e)&&(t=!0);return t}move(e){let t=!1;for(const i of this.viewport.plugins.list)i.move(e)&&(t=!0);return t}up(e){let t=!1;for(const i of this.list)i.up(e)&&(t=!0);return t}wheel(e){let t=!1;for(const i of this.list)i.wheel(e)&&(t=!0);return t}}const U={screenWidth:window.innerWidth,screenHeight:window.innerHeight,worldWidth:null,worldHeight:null,threshold:5,passiveWheel:!0,stopPropagation:!1,forceHitArea:null,noTicker:!1,interaction:null,disableOnContextMenu:!1,ticker:i.Ticker.shared};class L extends t.Container{__init(){this._disableOnContextMenu=e=>e.preventDefault()}constructor(e={}){super(),L.prototype.__init.call(this),this.options=Object.assign({},{divWheel:document.body},U,e),this.screenWidth=this.options.screenWidth,this.screenHeight=this.options.screenHeight,this._worldWidth=this.options.worldWidth,this._worldHeight=this.options.worldHeight,this.forceHitArea=this.options.forceHitArea,this.threshold=this.options.threshold,this.options.divWheel=this.options.divWheel||document.body,this.options.disableOnContextMenu&&this.options.divWheel.addEventListener("contextmenu",this._disableOnContextMenu),this.options.noTicker||(this.tickerFunction=()=>this.update(this.options.ticker.elapsedMS),this.options.ticker.add(this.tickerFunction)),this.input=new C(this),this.plugins=new D(this)}destroy(e){!this.options.noTicker&&this.tickerFunction&&this.options.ticker.remove(this.tickerFunction),this.options.disableOnContextMenu&&this.options.divWheel.removeEventListener("contextmenu",this._disableOnContextMenu),this.input.destroy(),super.destroy(e)}update(e){this.pause||(this.plugins.update(e),this.lastViewport&&(this.lastViewport.x!==this.x||this.lastViewport.y!==this.y?this.moving=!0:this.moving&&(this.emit("moved-end",this),this.moving=!1),this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y?this.zooming=!0:this.zooming&&(this.emit("zoomed-end",this),this.zooming=!1)),this.forceHitArea||(this._hitAreaDefault=new a.Rectangle(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight),this.hitArea=this._hitAreaDefault),this._dirty=this._dirty||!this.lastViewport||this.lastViewport.x!==this.x||this.lastViewport.y!==this.y||this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y,this.lastViewport={x:this.x,y:this.y,scaleX:this.scale.x,scaleY:this.scale.y},this.emit("frame-end",this))}resize(e=window.innerWidth,t=window.innerHeight,i,r){this.screenWidth=e,this.screenHeight=t,void 0!==i&&(this._worldWidth=i),void 0!==r&&(this._worldHeight=r),this.plugins.resize(),this.dirty=!0}get worldWidth(){return this._worldWidth||this.width/this.scale.x}set worldWidth(e){this._worldWidth=e,this.plugins.resize()}get worldHeight(){return this._worldHeight||this.height/this.scale.y}set worldHeight(e){this._worldHeight=e,this.plugins.resize()}getVisibleBounds(){return new a.Rectangle(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight)}toWorld(e,t){return 2===arguments.length?this.toLocal(new a.Point(e,t)):this.toLocal(e)}toScreen(e,t){return 2===arguments.length?this.toGlobal(new a.Point(e,t)):this.toGlobal(e)}get worldScreenWidth(){return this.screenWidth/this.scale.x}get worldScreenHeight(){return this.screenHeight/this.scale.y}get screenWorldWidth(){return this.worldWidth*this.scale.x}get screenWorldHeight(){return this.worldHeight*this.scale.y}get center(){return new a.Point(this.worldScreenWidth/2-this.x/this.scale.x,this.worldScreenHeight/2-this.y/this.scale.y)}set center(e){this.moveCenter(e)}moveCenter(...e){let t,i;i="number"==typeof e[0]?(t=e[0],e[1]):(t=e[0].x,e[0].y);var e=(this.worldScreenWidth/2-t)*this.scale.x,r=(this.worldScreenHeight/2-i)*this.scale.y;return this.x===e&&this.y===r||(this.position.set(e,r),this.plugins.reset(),this.dirty=!0),this}get corner(){return new a.Point(-this.x/this.scale.x,-this.y/this.scale.y)}set corner(e){this.moveCorner(e)}moveCorner(...e){let t,i;return i=1===e.length?(t=-e[0].x*this.scale.x,-e[0].y*this.scale.y):(t=-e[0]*this.scale.x,-e[1]*this.scale.y),t===this.x&&i===this.y||(this.position.set(t,i),this.plugins.reset(),this.dirty=!0),this}get screenWidthInWorldPixels(){return this.screenWidth/this.scale.x}get screenHeightInWorldPixels(){return this.screenHeight/this.scale.y}findFitWidth(e){return this.screenWidth/e}findFitHeight(e){return this.screenHeight/e}findFit(e,t){e=this.screenWidth/e,t=this.screenHeight/t;return Math.min(e,t)}findCover(e,t){e=this.screenWidth/e,t=this.screenHeight/t;return Math.max(e,t)}fitWidth(e=this.worldWidth,t,i=!0,r){let n;t&&(n=this.center),this.scale.x=this.screenWidth/e,i&&(this.scale.y=this.scale.x);e=this.plugins.get("clamp-zoom",!0);return!r&&e&&e.clamp(),t&&n&&this.moveCenter(n),this}fitHeight(e=this.worldHeight,t,i=!0,r){let n;t&&(n=this.center),this.scale.y=this.screenHeight/e,i&&(this.scale.x=this.scale.y);e=this.plugins.get("clamp-zoom",!0);return!r&&e&&e.clamp(),t&&n&&this.moveCenter(n),this}fitWorld(e){let t;e&&(t=this.center),this.scale.x=this.screenWidth/this.worldWidth,this.scale.y=this.screenHeight/this.worldHeight,this.scale.xthis.worldWidth,top:this.top<0,bottom:this.bottom>this.worldHeight,cornerPoint:new a.Point(this.worldWidth*this.scale.x-this.screenWidth,this.worldHeight*this.scale.y-this.screenHeight)}}get right(){return-this.x/this.scale.x+this.worldScreenWidth}set right(e){this.x=-e*this.scale.x+this.screenWidth,this.plugins.reset()}get left(){return-this.x/this.scale.x}set left(e){this.x=-e*this.scale.x,this.plugins.reset()}get top(){return-this.y/this.scale.y}set top(e){this.y=-e*this.scale.y,this.plugins.reset()}get bottom(){return-this.y/this.scale.y+this.worldScreenHeight}set bottom(e){this.y=-e*this.scale.y+this.screenHeight,this.plugins.reset()}get dirty(){return!!this._dirty}set dirty(e){this._dirty=e}get forceHitArea(){return this._forceHitArea}set forceHitArea(e){e?(this._forceHitArea=e,this.hitArea=e):(this._forceHitArea=null,this.hitArea=new a.Rectangle(0,0,this.worldWidth,this.worldHeight))}drag(e){return this.plugins.add("drag",new T(this,e)),this}clamp(e){return this.plugins.add("clamp",new _(this,e)),this}decelerate(e){return this.plugins.add("decelerate",new b(this,e)),this}bounce(e){return this.plugins.add("bounce",new f(this,e)),this}pinch(e){return this.plugins.add("pinch",new k(this,e)),this}snap(e,t,i){return this.plugins.add("snap",new P(this,e,t,i)),this}follow(e,t){return this.plugins.add("follow",new E(this,e,t)),this}wheel(e){return this.plugins.add("wheel",new R(this,e)),this}animate(e){return this.plugins.add("animate",new c(this,e)),this}clampZoom(e){return this.plugins.add("clamp-zoom",new v(this,e)),this}mouseEdges(e){return this.plugins.add("mouse-edges",new A(this,e)),this}get pause(){return!!this._pause}set pause(e){this._pause=e,this.lastViewport=null,this.moving=!1,this.zooming=!1,e&&this.input.pause()}ensureVisible(e,t,i,r,n){n&&(i>this.worldScreenWidth||r>this.worldScreenHeight)&&(this.fit(!0,i,r),this.emit("zoomed",{viewport:this,type:"ensureVisible"}));let s=!1;ethis.right&&(this.right=e+i,s=!0),tthis.bottom&&(this.bottom=t+r,s=!0),s&&this.emit("moved",{viewport:this,type:"ensureVisible"})}}e.Animate=c,e.Bounce=f,e.Clamp=_,e.ClampZoom=v,e.Decelerate=b,e.Drag=T,e.Follow=E,e.InputManager=C,e.MouseEdges=A,e.Pinch=k,e.Plugin=r,e.PluginManager=D,e.Snap=P,e.SnapZoom=O,e.Viewport=L,e.Wheel=R,Object.defineProperty(e,"__esModule",{value:!0})}),"undefined"!=typeof pixi_viewport&&Object.assign(this.PIXI,pixi_viewport),!function(){"use strict";var h=new("undefined"==typeof WebKitCSSMatrix?DOMMatrix:WebKitCSSMatrix);function c(e,t,i){this.x=e,this.y=t,this.z=i}function r(e){for(var t=h,i=e;null!=i&&i!==i.ownerDocument.documentElement;)var r=window.getComputedStyle(i,void 0).transform||"none",t=("none"===r?h:function(t){try{return new("undefined"==typeof WebKitCSSMatrix?DOMMatrix:WebKitCSSMatrix)(t)}catch(e){return console.warn(t),console.warn(e.toString()),h}}(r)).multiply(t),i=i.parentNode;for(var n=e.offsetWidth,s=e.offsetHeight,o=4,a=1/0,l=1/0;0<=--o;){var u=new c(0===o||1===o?0:n,0===o||3===o?0:s,0).transformBy(t);u.xt&&(i[r]=this.hyphenate(i[r]).join("­"));return i.join("")},t.prototype.hyphenate=function(e){var t,i,r,n,s,o,a,l,u,h=[],c=[],p=e.toLowerCase(),d=Math.max,f=this.trie,m=[""];if(this.exceptions.hasOwnProperty(p))return e.match(this.exceptions[p]).slice(1);if(-1!==e.indexOf("­"))return[e];for(t=(e="_"+e+"_").toLowerCase().split(""),i=e.split(""),a=t.length,r=0;rthis.leftMin&&rt[e]&&(r=t[e]),st[e+1]&&(n=t[e+1]),oR[e]&&(l=O[t],O[t]=O[e],O[e]=l,l=R[t],R[t]=R[e],R[e]=l)}t[0]=O[0].x,t[1]=O[0].y,t[2]=O[1].x,t[3]=O[1].y,t[4]=O[2].x,t[5]=O[2].y,t[6]=O[3].x,t[7]=O[3].y,(O[3].x-O[2].x)*(O[1].y-O[2].y)-(O[1].x-O[2].x)*(O[3].y-O[2].y)<0&&(t[4]=O[3].x,t[5]=O[3].y)}}}const ve=new d.Matrix,M=new d.Rectangle,I=new d.Point;class ye extends C{constructor(...e){super(...e),ye.prototype.__init.call(this)}__init(){this.distortion=new d.Point}clear(){this.distortion.set(0,0)}apply(e,t){t=t||new d.Point;var i=this.distortion,r=e.x*e.y;return t.x=e.x+i.x*r,t.y=e.y+i.y*r,t}applyInverse(e,t){t=t||new d.Point;var i=e.x,e=e.y,r=this.distortion.x,n=this.distortion.y;if(0===r)t.x=i,t.y=e/(1+n*i);else if(0===n)t.y=e,t.x=i/(1+r*e);else{var e=.5*(e*r-i*n+1)/n,s=e*e+i/n;if(s<=1e-5)return t.set(NaN,NaN),t;t.x=0>0,0!==h._cycle&&h._cycle===h._totalTime/c&&d<=e&&h._cycle--,h._time=h._totalTime-h._cycle*c,h._yoyo&&0!=(1&h._cycle)&&(h._time=m-h._time,(u=h._yoyoEase||h.vars.yoyoEase)&&(h._yoyoEase||(!0!==u||h._initted?h._yoyoEase=u=!0===u?h._ease:u instanceof Ease?u:Ease.map[u]:(u=h.vars.ease,h._yoyoEase=u=u?u instanceof Ease?u:"function"==typeof u?new Ease(u,h.vars.easeParams):Ease.map[u]||g.defaultEase:g.defaultEase)),h.ratio=u?1-u.getRatio((m-h._time)/m):0)),h._time>m?h._time=m:h._time<0&&(h._time=0)),h._easeType&&!u?(c=h._time/m,(1===(o=h._easeType)||3===o&&.5<=c)&&(c=1-c),3===o&&(c*=2),1===(a=h._easePower)?c*=c:2===a?c*=c*c:3===a?c*=c*c*c:4===a&&(c*=c*c*c*c),h.ratio=1===o?1-c:2===o?c:h._time/m<.5?c/2:1-c/2):u||(h.ratio=h._ease.getRatio(h._time/m))),p!==h._time||i||f!==h._cycle){if(!h._initted){if(h._init(),!h._initted||h._gc)return;if(!i&&h._firstPT&&(!1!==h.vars.lazy&&h._duration||h.vars.lazy&&!h._duration))return h._time=p,h._totalTime=d,h._rawPrevTime=_,h._cycle=f,x.lazyTweens.push(h),void(h._lazy=[e,t]);!h._time||r||u?r&&this._ease._calcEnd&&!u&&(h.ratio=h._ease.getRatio(0===h._time?0:1)):h.ratio=h._ease.getRatio(h._time/m)}for(!1!==h._lazy&&(h._lazy=!1),h._active||!h._paused&&h._time!==p&&0<=e&&(h._active=!0),0===d&&(2===h._initted&&0e._startTime;l._timeline;)u&&l._timeline.smoothChildTiming?l.totalTime(l._totalTime,!0):l._gc&&l._enabled(!0,!1),l=l._timeline;return h},e.remove=function(e){var t;if(e instanceof c)return this._remove(e,!1),t=e._timeline=e.vars.useFrames?c._rootFramesTimeline:c._rootTimeline,e._startTime=(e._paused?e._pauseTime:t._time)-(e._reversed?e.totalDuration()-e._totalTime:e._totalTime)/e._timeScale,this;if(e instanceof Array||e&&e.push&&d(e)){for(var i=e.length;-1<--i;)this.remove(e[i]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},e._remove=function(e,t){return p.prototype._remove.call(this,e,t),this._last?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},e.append=function(e,t){return this.add(e,this._parseTimeOrLabel(null,t,!0,e))},e.insert=e.insertMultiple=function(e,t,i,r){return this.add(e,t||0,i,r)},e.appendMultiple=function(e,t,i,r){return this.add(e,this._parseTimeOrLabel(null,t,!0,e),i,r)},e.addLabel=function(e,t){return this._labels[e]=this._parseTimeOrLabel(t),this},e.addPause=function(e,t,i,r){i=f.delayedCall(0,n,i,r||this);return i.vars.onComplete=i.vars.onReverseComplete=t,i.data="isPause",this._hasPause=!0,this.add(i,e)},e.removeLabel=function(e){return delete this._labels[e],this},e.getLabelTime=function(e){return null!=this._labels[e]?this._labels[e]:-1},e._parseTimeOrLabel=function(e,t,i,r){var n,s;if(r instanceof c&&r.timeline===this)this.remove(r);else if(r&&(r instanceof Array||r.push&&d(r)))for(s=r.length;-1<--s;)r[s]instanceof c&&r[s].timeline===this&&this.remove(r[s]);if(n="number"!=typeof e||t?99999999999=e&&!l;)r._duration||"isPause"===r.data&&0c._time;)l.render(l._reversed?l.totalDuration()-(e-l._startTime)*l._timeScale:(e-l._startTime)*l._timeScale,t,i),l=l._prev;l=null,c.pause(),c._pauseTime=h}r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(e-r._startTime)*r._timeScale,t,i):r.render((e-r._startTime)*r._timeScale,t,i)}r=s}!c._onUpdate||t||(b.length&&x(),c._callback("onUpdate")),!o||c._gc||f!==c._startTime&&m===c._timeScale||(0===c._time||d>=c.totalDuration())&&(n&&(b.length&&x(),c._timeline.autoRemoveChildren&&c._enabled(!1,!1),c._active=!1),!t&&c.vars[o]&&c._callback(o))}},e._hasPausedChild=function(){for(var e=this._first;e;){if(e._paused||e instanceof m&&e._hasPausedChild())return!0;e=e._next}return!1},e.getChildren=function(e,t,i,r){r=r||-9999999999;for(var n=[],s=this._first,o=0;s;)s._startTime=i&&(n._startTime+=e),n=n._next;if(t)for(r in s)s[r]>=i&&(s[r]+=e);return this._uncache(!0)},e._kill=function(e,t){if(!e&&!t)return this._enabled(!1,!1);for(var i=t?this.getTweensOf(t):this.getChildren(!0,!0,!1),r=i.length,n=!1;-1<--r;)i[r]._kill(e,t)&&(n=!0);return n},e.clear=function(e){var t=this.getChildren(!1,!0,!0),i=t.length;for(this._time=this._totalTime=0;-1<--i;)t[i]._enabled(!1,!1);return!1!==e&&(this._labels={}),this._uncache(!0)},e.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return c.prototype.invalidate.call(this)},e._enabled=function(e,t){if(e===this._gc)for(var i=this._first;i;)i._enabled(e,!0),i=i._next;return p.prototype._enabled.call(this,e,t)},e.totalTime=function(e,t,i){this._forcingPlayhead=!0;var r=c.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,r},e.duration=function(e){return arguments.length?(0!==this.duration()&&0!==e&&this.timeScale(this._duration/e),this):(this._dirty&&this.totalDuration(),this._duration)},e.totalDuration=function(e){if(arguments.length)return e&&this.totalDuration()?this.timeScale(this._totalDuration/e):this;if(this._dirty){for(var t,i,r=0,n=this,s=n._last,o=999999999999;s;)t=s._prev,s._dirty&&s.totalDuration(),s._startTime>o&&n._sortChildren&&!s._paused&&!n._calculatingDuration?(n._calculatingDuration=1,n.add(s,s._startTime-s._delay),n._calculatingDuration=0):o=s._startTime,s._startTime<0&&!s._paused&&(r-=s._startTime,n._timeline.smoothChildTiming&&(n._startTime+=s._startTime/n._timeScale,n._time-=s._startTime,n._totalTime-=s._startTime,n._rawPrevTime-=s._startTime),n.shiftChildren(-s._startTime,!1,-9999999999),o=0),r<(i=s._startTime+s._totalDuration/s._timeScale)&&(r=i),s=t;n._duration=n._totalDuration=r,n._dirty=!1}return this._totalDuration},e.paused=function(e){if(!1===e&&this._paused)for(var t=this._first;t;)t._startTime===this._time&&"isPause"===t.data&&(t._rawPrevTime=0),t=t._next;return c.prototype.paused.apply(this,arguments)},e.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===c._rootFramesTimeline},e.rawTime=function(e){return e&&(this._paused||this._repeat&&0>0,c._cycle&&c._cycle===c._totalTime/x&&m<=e&&c._cycle--,c._time=c._totalTime-c._cycle*x,c._yoyo&&1&c._cycle&&(c._time=f-c._time),c._time>f?e=(c._time=f)+1e-4:c._time<0?c._time=e=0:e=c._time));if(c._hasPause&&!c._forcingPlayhead&&!t){if(p<(e=c._time)||c._repeat&&b!==c._cycle)for(r=c._first;r&&r._startTime<=e&&!l;)r._duration||"isPause"!==r.data||r.ratio||0===r._startTime&&0===c._rawPrevTime||(l=r),r=r._next;else for(r=c._last;r&&r._startTime>=e&&!l;)r._duration||"isPause"===r.data&&0c._time;)l.render(l._reversed?l.totalDuration()-(e-l._startTime)*l._timeScale:(e-l._startTime)*l._timeScale,t,i),l=l._prev;l=null,c.pause(),c._pauseTime=h}r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(e-r._startTime)*r._timeScale,t,i):r.render((e-r._startTime)*r._timeScale,t,i)}r=s}!c._onUpdate||t||(P.length&&O(),c._callback("onUpdate")),!o||c._locked||c._gc||_!==c._startTime&&g===c._timeScale||(0===c._time||d>=c.totalDuration())&&(n&&(P.length&&O(),c._timeline.autoRemoveChildren&&c._enabled(!1,!1),c._active=!1),!t&&c.vars[o]&&c._callback(o))}else m!==c._totalTime&&c._onUpdate&&!t&&c._callback("onUpdate")},r.getActive=function(e,t,i){for(var r,n=[],s=this.getChildren(e||null==e,t||null==e,!!i),o=0,a=s.length,l=0;le)return t[r].name;return null},r.getLabelBefore=function(e){null==e&&(e=this._time);for(var t=this.getLabelsArray(),i=t.length;-1<--i;)if(t[i].time>0||6)-1,c=[],p=[];for(i in e){x=b=y=v=x=g=_=m=f=d=y=A=S=void 0;for(var d,f,m,_,g,v,y,b,x,T=e[i],w=o,E=t,S=1/E,A=T.length;-1<--A;)for(f=(b=T[A]).a,m=b.d-f,_=b.c-f,g=b.b-f,d=0,v=1;v<=E;v++)y=d-(d=((x=S*v)*x*m+3*(y=1-x)*(x*_+y*g))*x),w[x=A*E+v-1]=(w[x]||0)+y*y}for(n=o.length,r=0;r>0]=p,a[s]=u,l=0,p=[]);return{length:u,lengths:a,segments:c}}(this._beziers,this._timeRes),this._length=h.length,this._lengths=h.lengths,this._segments=h.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length),c=this._autoRotate)for(this._initialRotations=[],c[0]instanceof Array||(this._autoRotate=c=[c]),s=c.length;-1<--s;){for(o=0;o<3;o++)r=c[s][o],this._func[r]="function"==typeof e[r]&&e[r.indexOf("set")||"function"!=typeof e["get"+r.substr(3)]?r:"get"+r.substr(3)];r=c[s][2],this._initialRotations[s]=(this._func[r]?this._func[r].call(this._target):this._target[r])||0,this._overwriteProps.push(r)}return this._startRatio=i.vars.runBackwards?1:0,!0},set:function(e){var t,i,r,n,s,o,a,l,u,h,c=this._segCount,p=this._func,d=this._target,f=e!==this._startRatio;if(this._timeRes){if(l=this._lengths,u=this._curSeg,h=e*this._length,w=this._li,h>this._l2&&w=h;);0===w&&hthis._s2&&w=h;);0===w&&h>0)*(1/c))*c;for(i=1-s,w=this._props.length;-1<--w;)r=this._props[w],o=(s*s*(n=this._beziers[r][t]).da+3*i*(s*n.ca+i*n.ba))*s+n.a,this._mod[r]&&(o=this._mod[r](o,d)),p[r]?d[r](o):d[r]=o;if(this._autoRotate)for(var m,_,g,v,y,b,x,T=this._autoRotate,w=T.length;-1<--w;)r=T[w][2],b=T[w][3]||0,x=!0===T[w][4]?1:E,n=this._beziers[T[w][0]],m=this._beziers[T[w][1]],n&&m&&(n=n[t],m=m[t],_=n.a+(n.b-n.a)*s,_+=((v=n.b+(n.c-n.b)*s)-_)*s,v+=(n.c+(n.d-n.c)*s-v)*s,g=m.a+(m.b-m.a)*s,g+=((y=m.b+(m.c-m.b)*s)-g)*s,y+=(m.c+(m.d-m.c)*s-y)*s,o=f?Math.atan2(y-g,v-_)*x+b:this._initialRotations[w],this._mod[r]&&(o=this._mod[r](o,d)),p[r]?d[r](o):d[r]=o)}}),e=_.prototype,_.bezierThrough=p,_.cubicToQuadratic=U,_._autoCSS=!0,_.quadraticToCubic=function(e,t,i){return new B(e,(2*t+e)/3,(2*t+i)/3,i)},_._cssRegister=function(){var d,f,m,e=t.CSSPlugin;e&&(e=e._internals,d=e._parseToProxy,f=e._setPluginRatio,m=e.CSSPropTween,e._registerComplexSpecialProp("bezier",{parser:function(e,t,i,r,n,s){t instanceof Array&&(t={values:t}),s=new _;var o,a,l,u=t.values,h=u.length-1,c=[],p={};if(!(h<0)){for(o=0;o<=h;o++)l=d(e,u[o],r,n,s,h!==o),c[o]=l.end;for(a in t)p[a]=t[a];p.values=c,(n=new m(e,"bezier",0,0,l.pt,2)).data=l,n.plugin=s,n.setRatio=f,0===p.autoRotate&&(p.autoRotate=!0),!p.autoRotate||p.autoRotate instanceof Array||(o=!0===p.autoRotate?0:Number(p.autoRotate),p.autoRotate=null!=l.end.left?[["left","top","rotation",o,!1]]:null!=l.end.x&&[["x","y","rotation",o,!1]]),p.autoRotate&&(r._transform||r._enableTransforms(!1),l.autoRotate=r._target._gsTransform,l.proxy.rotation=l.autoRotate.rotation||0,r._overwriteProps.push("rotation")),s._onInitTween(l.proxy,p,r._tween)}return n}}))},e._mod=function(e){for(var t,i=this._overwriteProps,r=i.length;-1<--r;)(t=e[i[r]])&&"function"==typeof t&&(this._mod[i[r]]=t)},e._kill=function(e){var t,i,r=this._props;for(t in this._beziers)if(t in e)for(delete this._beziers[t],delete this._func[t],i=r.length;-1<--i;)r[i]===t&&r.splice(i,1);if(r=this._autoRotate)for(i=r.length;-1<--i;)e[r[i][2]]&&r.splice(i,1);return this._super._kill.call(this,e)},_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(o,R){function C(){o.call(this,"css"),this._overwriteProps.length=0,this.setRatio=C.prototype.setRatio}function a(e,t){return t.toUpperCase()}function l(e,t){return(t=L.createElementNS?L.createElementNS(t||"http://www.w3.org/1999/xhtml",e):L.createElement(e)).style?t:L.createElement(e)}function u(e){return ne.test("string"==typeof e?e:(e.currentStyle||e.style).filter||"")?parseFloat(RegExp.$1)/100:1}function _(e){_gsScope.console&&console.log(e)}function T(e,t){var i,r,n=(t=t||F).style;if(void 0!==n[e])return e;for(e=e.charAt(0).toUpperCase()+e.substr(1),i=["O","Moz","ms","Ms","Webkit"],r=5;-1<--r&&void 0===n[i[r]+e];);return 0<=r?(ve="-"+(ye=3===r?"ms":i[r]).toLowerCase()+"-",ye+e):null}function f(e){return be.getComputedStyle(e)}function p(e,t){var i,r,n={};if(t=t||f(e))if(i=t.length)for(;-1<--i;)-1!==(r=t[i]).indexOf("-transform")&&Ge!==r||(n[r.replace(ue,a)]=t.getPropertyValue(r));else for(i in t)-1!==i.indexOf("Transform")&&H!==i||(n[i]=t[i]);else if(t=e.currentStyle||e.style)for(i in t)"string"==typeof i&&void 0===n[i]&&(n[i.replace(ue,a)]=t[i]);return N||(n.opacity=u(e)),e=Ze(e,t,!1),n.rotation=e.rotation,n.skewX=e.skewX,n.scaleX=e.scaleX,n.scaleY=e.scaleY,n.x=e.x,n.y=e.y,Y&&(n.z=e.z,n.rotationX=e.rotationX,n.rotationY=e.rotationY,n.scaleZ=e.scaleZ),n.filters&&delete n.filters,n}function g(e,t,i,r,n){var s,o,a,l={},u=e.style;for(o in i)"cssText"===o||"length"!==o&&isNaN(o)&&(t[o]!==(s=i[o])||n&&n[o])&&-1===o.indexOf("Origin")&&("number"==typeof s||"string"==typeof s)&&(l[o]="auto"!==s||"left"!==o&&"top"!==o?""!==s&&"auto"!==s&&"none"!==s||"string"!=typeof t[o]||""===t[o].replace(ie,"")?s:0:xe(e,o),void 0!==u[o]&&(a=new Pe(u,o,u[o],a)));if(r)for(o in r)"className"!==o&&(l[o]=r[o]);return{difs:l,firstMPT:a}}function A(e,t){return"string"==typeof(e="function"==typeof e?e(O,P):e)&&"="===e.charAt(1)?parseInt(e.charAt(0)+"1",10)*parseFloat(e.substr(2)):parseFloat(e)-parseFloat(t)||0}function E(e,t){var i="string"==typeof(e="function"==typeof e?e(O,P):e)&&"="===e.charAt(1);return null==(e="string"==typeof e&&"v"===e.charAt(e.length-2)?(i?e.substr(0,2):0)+window["inner"+("vh"===e.substr(-2)?"Height":"Width")]*(parseFloat(i?e.substr(2):e)/100):e)?t:i?parseInt(e.charAt(0)+"1",10)*parseFloat(e.substr(2))+t:parseFloat(e)||0}function S(e,t,i,r){var n,s;return n=(n=null==(e="function"==typeof e?e(O,P):e)?t:"number"==typeof e?e:(n=e.split("_"),s=((s="="===e.charAt(1))?parseInt(e.charAt(0)+"1",10)*parseFloat(n[0].substr(2)):parseFloat(n[0]))*(-1===e.indexOf("rad")?1:D)-(s?0:t),n.length&&(r&&(r[i]=t+s),-1!==e.indexOf("short")&&(s%=360)!==s%180&&(s=s<0?s+360:s-360),-1!==e.indexOf("_cw")&&s<0?s=(s+3599999999640)%360-360*(s/360|0):-1!==e.indexOf("ccw")&&0>16,e>>8&255,255&e];else{if(","===e.charAt(e.length-1)&&(e=e.substr(0,e.length-1)),Ee[e])i=Ee[e];else if("#"===e.charAt(0))4===e.length&&(e="#"+(r=e.charAt(1))+r+(n=e.charAt(2))+n+(s=e.charAt(3))+s),i=[(e=parseInt(e.substr(1),16))>>16,e>>8&255,255&e];else if("hsl"===e.substr(0,3))if(i=u=e.match(Q),t){if(-1!==e.indexOf("="))return e.match($)}else o=Number(i[0])%360/360,a=Number(i[1])/100,r=2*(l=Number(i[2])/100)-(n=l<=.5?l*(a+1):l+a-l*a),3r--)for(;++rr--)for(;++r>0];return r.parse(e,o,n,s)}}function Pe(e,t,i,r,n){this.t=e,this.p=t,this.v=i,this.r=n,r&&((r._prev=this)._next=r)}t._setPluginRatio=function(e){this.plugin.setRatio(e);for(var t,i,r,n,s,o=this.data,a=o.proxy,l=o.firstMPT;l;)t=a[l.v],l.r?t=l.r(t):t<1e-6&&-1e-6a.length?l:a).length,o=0;on.pr;)s=s._next;(n._prev=s?s._prev:a)?n._prev._next=n:o=n,(n._next=s)?s._prev=n:a=n,n=l}this._firstPT=o}return!0},e.parse=function(e,t,i,r){var n,s,o,a,l,u,h,c,p=e.style;for(n in t){if(l=t[n],a=m[n],"function"!=typeof l||a&&a.allowFunc||(l=l(O,P)),a)i=a.parse(e,l,n,this,i,r,t);else{if("--"===n.substr(0,2)){this._tween._propLookup[n]=this._addTween.call(this._tween,e.style,"setProperty",f(e).getPropertyValue(n)+"",l+"",n,!1,n);continue}a=z(e,n,k)+"",h="string"==typeof l,"color"===n||"fill"===n||"stroke"===n||-1!==n.indexOf("Color")||h&&ae.test(l)?(h||(l=(3<(l=Se(l)).length?"rgba(":"rgb(")+l.join(",")+")"),i=Re(p,n,a,l,!0,"transparent",i,0,r)):h&&fe.test(l)?i=Re(p,n,a,l,!0,null,i,0,r):(u=(s=parseFloat(a))||0===s?a.substr((s+"").length):"",""!==a&&"auto"!==a||(u="width"===n||"height"===n?(s=function(e,t,i){if("svg"===(e.nodeName+"").toLowerCase())return(i||f(e))[t]||0;if(e.getCTM&&qe(e))return e.getBBox()[t]||0;var r=parseFloat("width"===t?e.offsetWidth:e.offsetHeight),n=Te[t],s=n.length;for(i=i||f(e);-1<--s;)r=(r-=parseFloat(z(e,"padding"+n[s],i,!0))||0)-(parseFloat(z(e,"border"+n[s]+"Width",i,!0))||0);return r}(e,n,k),"px"):"left"===n||"top"===n?(s=xe(e,n,k),"px"):(s="opacity"!==n?0:1,"")),""===(h=(c=h&&"="===l.charAt(1))?(o=parseInt(l.charAt(0)+"1",10),l=l.substr(2),o*=parseFloat(l),l.replace(re,"")):(o=parseFloat(l),h?l.replace(re,""):""))&&(h=n in W?W[n]:u),l=o||0===o?(c?o+s:o)+h:t[n],u===h||""===h&&"lineHeight"!==n||(o||0===o)&&s&&(s=w(e,n,s,u),"%"===h?(s/=w(e,n,100,"%")/100,!0!==t.strictUnits&&(a=s+"%")):"em"===h||"rem"===h||"vw"===h||"vh"===h?s/=w(e,n,1,h):"px"!==h&&(o=w(e,n,o,h),h="px"),c&&(o||0===o)&&(l=o+s+h)),c&&(o+=s),!s&&0!==s||!o&&0!==o?void 0!==p[n]&&(l||l+""!="NaN"&&null!=l)?(i=new j(p,n,o||s||0,0,i,-1,n,!1,0,a,l)).xs0="none"!==l||"display"!==n&&-1===n.indexOf("Style")?l:a:_("invalid "+n+" tween value: "+t[n]):(i=new j(p,n,s,o-s,i,0,n,!1!==V&&("px"===h||"zIndex"===n),0,a,l)).xs0=h)}r&&i&&!i.plugin&&(i.plugin=r)}return i},e.setRatio=function(e){var t,i,r,n=this._firstPT;if(1!==e||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(e||this._tween._time!==this._tween._duration&&0!==this._tween._time||-1e-6===this._tween._rawPrevTime)for(;n;){if(t=n.c*e+n.s,n.r?t=n.r(t):t<1e-6&&-1e-6this._p3?this._calcEnd?1===e?0:1-(e=(e-this._p3)/this._p1)*e:t+(e-t)*(e=(e-this._p3)/this._p1)*e*e*e:this._calcEnd?1:t},p.ease=new p(.7,.7),d.config=p.config=function(e,t,i){return new p(e,t,i)},(d=(r=h("easing.SteppedEase",function(e,t){this._p1=1/(e=e||1),this._p2=e+(t?0:1),this._p3=t?1:0},!0)).prototype=new _).constructor=r,d.getRatio=function(e){return e<0?e=0:1<=e&&(e=.999999999),((this._p2*e|0)+this._p3)*this._p1},d.config=r.config=function(e,t){return new r(e,t)},(d=(n=h("easing.ExpoScaleEase",function(e,t,i){this._p1=Math.log(t/e),this._p2=t-e,this._p3=e,this._ease=i},!0)).prototype=new _).constructor=n,d.getRatio=function(e){return this._ease&&(e=this._ease.getRatio(e)),(this._p3*Math.exp(this._p1*e)-this._p3)/this._p2},d.config=n.config=function(e,t,i){return new n(e,t,i)},(d=(s=h("easing.RoughEase",function(e){for(var t,i,r,n,s,o,a=(e=e||{}).taper||"none",l=[],u=0,h=0|(e.points||20),c=h,p=!1!==e.randomize,d=!0===e.clamp,f=e.template instanceof _?e.template:null,m="number"==typeof e.strength?.4*e.strength:.4;-1<--c;)t=p?Math.random():1/h*c,i=f?f.getRatio(t):t,r="none"===a?m:"out"===a?(n=1-t)*n*m:"in"===a?t*t*m:t<.5?(n=2*t)*n*.5*m:(n=2*(1-t))*n*.5*m,p?i+=Math.random()*r-.5*r:c%2?i+=.5*r:i-=.5*r,d&&(1t.t){for(;t.next&&e>=t.t;)t=t.next;t=t.prev}else for(;t.prev&&e<=t.t;)t=t.prev;return(this._prev=t).v+(e-t.t)/t.gap*t.c},d.config=function(e){return new s(e)},s.ease=new s,t("Bounce",e("BounceOut",function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}),e("BounceIn",function(e){return(e=1-e)<1/2.75?1-7.5625*e*e:e<2/2.75?1-(7.5625*(e-=1.5/2.75)*e+.75):e<2.5/2.75?1-(7.5625*(e-=2.25/2.75)*e+.9375):1-(7.5625*(e-=2.625/2.75)*e+.984375)}),e("BounceInOut",function(e){var t=e<.5;return(e=t?1-2*e:2*e-1)<1/2.75?e*=7.5625*e:e=e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,t?.5*(1-e):.5*e+.5})),t("Circ",e("CircOut",function(e){return Math.sqrt(1-(e-=1)*e)}),e("CircIn",function(e){return-(Math.sqrt(1-e*e)-1)}),e("CircInOut",function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)})),t("Elastic",(d=function(e,t,i){var r=h("easing."+e,function(e,t){this._p1=1<=e?e:1,this._p2=(t||i)/(e<1?e:1),this._p3=this._p2/l*(Math.asin(1/this._p1)||0),this._p2=l/this._p2},!0),e=r.prototype=new _;return e.constructor=r,e.getRatio=t,e.config=function(e,t){return new r(e,t)},r})("ElasticOut",function(e){return this._p1*Math.pow(2,-10*e)*Math.sin((e-this._p3)*this._p2)+1},.3),d("ElasticIn",function(e){return-(this._p1*Math.pow(2,10*--e)*Math.sin((e-this._p3)*this._p2))},.3),d("ElasticInOut",function(e){return(e*=2)<1?this._p1*Math.pow(2,10*--e)*Math.sin((e-this._p3)*this._p2)*-.5:this._p1*Math.pow(2,-10*--e)*Math.sin((e-this._p3)*this._p2)*.5+1},.45)),t("Expo",e("ExpoOut",function(e){return 1-Math.pow(2,-10*e)}),e("ExpoIn",function(e){return Math.pow(2,10*(e-1))-.001}),e("ExpoInOut",function(e){return(e*=2)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*(e-1)))})),t("Sine",e("SineOut",function(e){return Math.sin(e*u)}),e("SineIn",function(e){return 1-Math.cos(e*u)}),e("SineInOut",function(e){return-.5*(Math.cos(Math.PI*e)-1)})),h("easing.EaseLookup",{find:function(e){return _.map[e]}},!0),c(o.SlowMo,"SlowMo","ease,"),c(s,"RoughEase","ease,"),c(r,"SteppedEase","ease,"),a},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),!function(m,p){"use strict";var d={},f=m.document,_=m.GreenSockGlobals=m.GreenSockGlobals||m,e=_[p];if(e)"undefined"!=typeof module&&module.exports&&(module.exports=e);else{var g,t,F,N=function(e){for(var t=e.split("."),i=_,r=0;r=t&&ethis._duration?this._duration:e,t)):this._time},n.totalTime=function(e,t,i){if(g||P.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(e<0&&!i&&(e+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var r=this._totalDuration,n=this._timeline;if(rs;)n=n._prev;return n?(e._next=n._next,n._next=e):(e._next=this._first,this._first=e),e._next?e._next._prev=e:this._last=e,e._prev=n,this._recent=e,this._timeline&&this._uncache(!0),this},n._remove=function(e,t){return e.timeline===this&&(t||e._enabled(!1,!0),e._prev?e._prev._next=e._next:this._first===e&&(this._first=e._next),e._next?e._next._prev=e._prev:this._last===e&&(this._last=e._prev),e._next=e._prev=e.timeline=null,e===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},n.render=function(e,t,i){var r,n=this._first;for(this._totalTime=this._time=this._rawPrevTime=e;n;)r=n._next,(n._active||e>=n._startTime&&!n._paused&&!n._gc)&&(n._reversed?n.render((n._dirty?n.totalDuration():n._totalDuration)-(e-n._startTime)*n._timeScale,t,i):n.render((e-n._startTime)*n._timeScale,t,i)),n=r},n.rawTime=function(){return g||P.wake(),this._totalTime},x("TweenLite",function(e,t,i){if(a.call(this,t,i),this.render=O.prototype.render,null==e)throw"Cannot tween a null target.";this.target=e="string"==typeof e&&O.selector(e)||e;var r,n,s,i=e.jquery||e.length&&e!==m&&e[0]&&(e[0]===m||e[0].nodeType&&e[0].style&&!e.nodeType),o=this.vars.overwrite;if(this._overwrite=o=null==o?ee[O.defaultOverwrite]:"number"==typeof o?o>>0:ee[o],(i||e instanceof Array||e.push&&y(e))&&"number"!=typeof e[0])for(this._targets=s=z(e),this._propLookup=[],this._siblings=[],r=0;r=te){for(i in te=P.frame+(parseInt(O.autoSleep,10)||120),l){for(e=(t=l[i].tweens).length;-1<--e;)t[e]._gc&&t.splice(e,1);0===t.length&&delete l[i]}if((!(i=h._first)||i._paused)&&O.autoSleep&&!u._first&&1===P._listeners.tick.length){for(;i&&i._paused;)i=i._next;i||P.sleep()}}},P.addEventListener("tick",a._updateRoot),function(e,t,i){var r,n,s=e._gsTweenID;if(l[s||(e._gsTweenID=s="t"+Q++)]||(l[s]={target:e,tweens:[]}),t&&((r=l[s].tweens)[n=r.length]=t,i))for(;-1<--n;)r[n]===t&&r.splice(n,1);return l[s].tweens}),ie=function(e,t,i,r){var n,s,o=e.vars.onOverwrite;return o&&(n=o(e,t,i,r)),(o=O.onOverwrite)&&(s=o(e,t,i,r)),!1!==n&&!1!==s},re=function(e,t,i,r,n){var s,o,a;if(1===r||4<=r){for(a=n.length,d=0;du&&((p||!o._initted)&&u-o._startTime<=2e-8||(h[c++]=o)));for(d=c;-1<--d;)a=(o=h[d])._firstPT,2===r&&o._kill(i,e,t)&&(s=!0),(2!==r||!o._firstPT&&o._initted&&a)&&(2===r||ie(o,t))&&o._enabled(!1,!1)&&(s=!0)}return s},ne=function(e,t,i){for(var r=e._timeline,n=r._timeScale,s=e._startTime;r._timeline;){if(s+=r._startTime,n*=r._timeScale,r._paused)return-100;r=r._timeline}return t<(s/=n)?s-t:i&&s===t||!e._initted&&s-t<2e-8?v:(s+=e.totalDuration()/e._timeScale/n)>t+v?0:s-t-v},L=(n._init=function(){var e,t,i,r,n,s,o=this.vars,a=this._overwrittenProps,l=this._duration,u=!!o.immediateRender,h=o.ease,c=this._startAt;if(o.startAt){for(r in c&&(c.render(-1,!0),c.kill()),n={},o.startAt)n[r]=o.startAt[r];if(n.data="isStart",n.overwrite=!1,n.immediateRender=!0,n.lazy=u&&!1!==o.lazy,n.startAt=n.delay=null,n.onUpdate=o.onUpdate,n.onUpdateParams=o.onUpdateParams,n.onUpdateScope=o.onUpdateScope||o.callbackScope||this,this._startAt=O.to(this.target||{},0,n),u)if(0a.pr;)r=r._next;(a._prev=r?r._prev:s)?a._prev._next=a:n=a,(a._next=r)?r._prev=a:s=a,a=o}a=t._firstPT=n}for(;a;)a.pg&&"function"==typeof a.t[e]&&a.t[e]()&&(i=!0),a=a._next;return i},L.activate=function(e){for(var t=e.length;-1<--t;)e[t].API===L.API&&(M[(new e[t])._propName]=e[t]);return!0},r.plugin=function(e){if(!(e&&e.propName&&e.init&&e.API))throw"illegal plugin definition.";var t,i=e.propName,r=e.priority||0,n=e.overwriteProps,s={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},o=x("plugins."+i.charAt(0).toUpperCase()+i.substr(1)+"Plugin",function(){L.call(this,i,r),this._overwriteProps=n||[]},!0===e.global),a=o.prototype=new L(i);for(t in(a.constructor=o).API=e.API,s)"function"==typeof e[t]&&(a[s[t]]=e[t]);return o.version=e.version,L.activate([o]),o},s=m._gsQueue){for(o=0;o>0,c._cycle&&c._cycle===c._totalTime/x&&m<=e&&c._cycle--,c._time=c._totalTime-c._cycle*x,c._yoyo&&1&c._cycle&&(c._time=f-c._time),c._time>f?e=(c._time=f)+1e-4:c._time<0?c._time=e=0:e=c._time));if(c._hasPause&&!c._forcingPlayhead&&!t){if(p<(e=c._time)||c._repeat&&b!==c._cycle)for(r=c._first;r&&r._startTime<=e&&!l;)r._duration||"isPause"!==r.data||r.ratio||0===r._startTime&&0===c._rawPrevTime||(l=r),r=r._next;else for(r=c._last;r&&r._startTime>=e&&!l;)r._duration||"isPause"===r.data&&0c._time;)l.render(l._reversed?l.totalDuration()-(e-l._startTime)*l._timeScale:(e-l._startTime)*l._timeScale,t,i),l=l._prev;l=null,c.pause(),c._pauseTime=h}r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(e-r._startTime)*r._timeScale,t,i):r.render((e-r._startTime)*r._timeScale,t,i)}r=s}!c._onUpdate||t||(P.length&&O(),c._callback("onUpdate")),!o||c._locked||c._gc||_!==c._startTime&&g===c._timeScale||(0===c._time||d>=c.totalDuration())&&(n&&(P.length&&O(),c._timeline.autoRemoveChildren&&c._enabled(!1,!1),c._active=!1),!t&&c.vars[o]&&c._callback(o))}else m!==c._totalTime&&c._onUpdate&&!t&&c._callback("onUpdate")},r.getActive=function(e,t,i){for(var r,n=[],s=this.getChildren(e||null==e,t||null==e,!!i),o=0,a=s.length,l=0;le)return t[r].name;return null},r.getLabelBefore=function(e){null==e&&(e=this._time);for(var t=this.getLabelsArray(),i=t.length;-1<--i;)if(t[i].timee._startTime;l._timeline;)u&&l._timeline.smoothChildTiming?l.totalTime(l._totalTime,!0):l._gc&&l._enabled(!0,!1),l=l._timeline;return h},e.remove=function(e){var t;if(e instanceof c)return this._remove(e,!1),t=e._timeline=e.vars.useFrames?c._rootFramesTimeline:c._rootTimeline,e._startTime=(e._paused?e._pauseTime:t._time)-(e._reversed?e.totalDuration()-e._totalTime:e._totalTime)/e._timeScale,this;if(e instanceof Array||e&&e.push&&d(e)){for(var i=e.length;-1<--i;)this.remove(e[i]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},e._remove=function(e,t){return p.prototype._remove.call(this,e,t),this._last?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},e.append=function(e,t){return this.add(e,this._parseTimeOrLabel(null,t,!0,e))},e.insert=e.insertMultiple=function(e,t,i,r){return this.add(e,t||0,i,r)},e.appendMultiple=function(e,t,i,r){return this.add(e,this._parseTimeOrLabel(null,t,!0,e),i,r)},e.addLabel=function(e,t){return this._labels[e]=this._parseTimeOrLabel(t),this},e.addPause=function(e,t,i,r){i=f.delayedCall(0,n,i,r||this);return i.vars.onComplete=i.vars.onReverseComplete=t,i.data="isPause",this._hasPause=!0,this.add(i,e)},e.removeLabel=function(e){return delete this._labels[e],this},e.getLabelTime=function(e){return null!=this._labels[e]?this._labels[e]:-1},e._parseTimeOrLabel=function(e,t,i,r){var n,s;if(r instanceof c&&r.timeline===this)this.remove(r);else if(r&&(r instanceof Array||r.push&&d(r)))for(s=r.length;-1<--s;)r[s]instanceof c&&r[s].timeline===this&&this.remove(r[s]);if(n="number"!=typeof e||t?99999999999=e&&!l;)r._duration||"isPause"===r.data&&0c._time;)l.render(l._reversed?l.totalDuration()-(e-l._startTime)*l._timeScale:(e-l._startTime)*l._timeScale,t,i),l=l._prev;l=null,c.pause(),c._pauseTime=h}r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(e-r._startTime)*r._timeScale,t,i):r.render((e-r._startTime)*r._timeScale,t,i)}r=s}!c._onUpdate||t||(b.length&&x(),c._callback("onUpdate")),!o||c._gc||f!==c._startTime&&m===c._timeScale||(0===c._time||d>=c.totalDuration())&&(n&&(b.length&&x(),c._timeline.autoRemoveChildren&&c._enabled(!1,!1),c._active=!1),!t&&c.vars[o]&&c._callback(o))}},e._hasPausedChild=function(){for(var e=this._first;e;){if(e._paused||e instanceof m&&e._hasPausedChild())return!0;e=e._next}return!1},e.getChildren=function(e,t,i,r){r=r||-9999999999;for(var n=[],s=this._first,o=0;s;)s._startTime=i&&(n._startTime+=e),n=n._next;if(t)for(r in s)s[r]>=i&&(s[r]+=e);return this._uncache(!0)},e._kill=function(e,t){if(!e&&!t)return this._enabled(!1,!1);for(var i=t?this.getTweensOf(t):this.getChildren(!0,!0,!1),r=i.length,n=!1;-1<--r;)i[r]._kill(e,t)&&(n=!0);return n},e.clear=function(e){var t=this.getChildren(!1,!0,!0),i=t.length;for(this._time=this._totalTime=0;-1<--i;)t[i]._enabled(!1,!1);return!1!==e&&(this._labels={}),this._uncache(!0)},e.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return c.prototype.invalidate.call(this)},e._enabled=function(e,t){if(e===this._gc)for(var i=this._first;i;)i._enabled(e,!0),i=i._next;return p.prototype._enabled.call(this,e,t)},e.totalTime=function(e,t,i){this._forcingPlayhead=!0;var r=c.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,r},e.duration=function(e){return arguments.length?(0!==this.duration()&&0!==e&&this.timeScale(this._duration/e),this):(this._dirty&&this.totalDuration(),this._duration)},e.totalDuration=function(e){if(arguments.length)return e&&this.totalDuration()?this.timeScale(this._totalDuration/e):this;if(this._dirty){for(var t,i,r=0,n=this,s=n._last,o=999999999999;s;)t=s._prev,s._dirty&&s.totalDuration(),s._startTime>o&&n._sortChildren&&!s._paused&&!n._calculatingDuration?(n._calculatingDuration=1,n.add(s,s._startTime-s._delay),n._calculatingDuration=0):o=s._startTime,s._startTime<0&&!s._paused&&(r-=s._startTime,n._timeline.smoothChildTiming&&(n._startTime+=s._startTime/n._timeScale,n._time-=s._startTime,n._totalTime-=s._startTime,n._rawPrevTime-=s._startTime),n.shiftChildren(-s._startTime,!1,-9999999999),o=0),r<(i=s._startTime+s._totalDuration/s._timeScale)&&(r=i),s=t;n._duration=n._totalDuration=r,n._dirty=!1}return this._totalDuration},e.paused=function(e){if(!1===e&&this._paused)for(var t=this._first;t;)t._startTime===this._time&&"isPause"===t.data&&(t._rawPrevTime=0),t=t._next;return c.prototype.paused.apply(this,arguments)},e.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===c._rootFramesTimeline},e.rawTime=function(e){return e&&(this._paused||this._repeat&&0>10|55296,1023&r|56320)}function N(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}function z(){T()}var e,d,b,s,B,f,U,j,x,l,u,T,w,i,E,m,r,n,_,S="sizzle"+ +new Date,g=F.document,A=0,G=0,X=ce(),H=ce(),v=ce(),Y=function(e,t){return e===t&&(u=!0),0},W={}.hasOwnProperty,t=[],V=t.pop,q=t.push,k=t.push,K=t.slice,y=function(e,t){for(var i=0,r=e.length;i+~]|"+o+")"+o+"*"),ie=new RegExp("="+o+"*([^\\]'\"]*?)"+o+"*\\]","g"),re=new RegExp(Q),ne=new RegExp("^"+a+"$"),p={ID:new RegExp("^#("+a+")"),CLASS:new RegExp("^\\.("+a+")"),TAG:new RegExp("^("+a+"|[*])"),ATTR:new RegExp("^"+J),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+o+"*(even|odd|(([+-]|)(\\d*)n|)"+o+"*(?:([+-]|)"+o+"*(\\d+)|))"+o+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+o+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+o+"*((?:-\\d)?\\d*)"+o+"*\\)|)(?=[^-]|$)","i")},se=/^(?:input|select|textarea|button)$/i,oe=/^h\d$/i,h=/^[^{]+\{\s*\[native \w/,ae=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,le=/[+~]/,O=new RegExp("\\\\([\\da-f]{1,6}"+o+"?|("+o+")|.)","ig"),ue=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,he=L(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{k.apply(t=K.call(g.childNodes),g.childNodes),t[g.childNodes.length].nodeType}catch(e){k={apply:t.length?function(e,t){q.apply(e,K.call(t))}:function(e,t){for(var i=e.length,r=0;e[i++]=t[r++];);e.length=i-1}}}function R(e,t,i,r){var n,s,o,a,l,u,h,c=t&&t.ownerDocument,p=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return i;if(!r&&((t?t.ownerDocument||t:g)!==w&&T(t),t=t||w,E)){if(11!==p&&(l=ae.exec(e)))if(n=l[1]){if(9===p){if(!(o=t.getElementById(n)))return i;if(o.id===n)return i.push(o),i}else if(c&&(o=c.getElementById(n))&&_(t,o)&&o.id===n)return i.push(o),i}else{if(l[2])return k.apply(i,t.getElementsByTagName(e)),i;if((n=l[3])&&d.getElementsByClassName&&t.getElementsByClassName)return k.apply(i,t.getElementsByClassName(n)),i}if(d.qsa&&!v[e+" "]&&(!m||!m.test(e))){if(1!==p)c=t,h=e;else if("object"!==t.nodeName.toLowerCase()){for((a=t.getAttribute("id"))?a=a.replace(ue,N):t.setAttribute("id",a=S),s=(u=f(e)).length;s--;)u[s]="#"+a+" "+D(u[s]);h=u.join(","),c=le.test(e)&&me(t.parentNode)||t}if(h)try{return k.apply(i,c.querySelectorAll(h)),i}catch(e){}finally{a===S&&t.removeAttribute("id")}}}return j(e.replace(P,"$1"),t,i,r)}function ce(){var i=[];function r(e,t){return i.push(e+" ")>b.cacheLength&&delete r[i.shift()],r[e+" "]=t}return r}function C(e){return e[S]=!0,e}function M(e){var t=w.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t)}}function pe(e,t){for(var i=e.split("|"),r=i.length;r--;)b.attrHandle[i[r]]=t}function de(e,t){var i=t&&e,r=i&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function fe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&he(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function I(o){return C(function(s){return s=+s,C(function(e,t){for(var i,r=o([],e.length,s),n=r.length;n--;)e[i=r[n]]&&(e[i]=!(t[i]=e[i]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in d=R.support={},B=R.isXML=function(e){e=e&&(e.ownerDocument||e).documentElement;return!!e&&"HTML"!==e.nodeName},T=R.setDocument=function(e){var e=e?e.ownerDocument||e:g;return e!==w&&9===e.nodeType&&e.documentElement&&(i=(w=e).documentElement,E=!B(w),g!==w&&(e=w.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",z,!1):e.attachEvent&&e.attachEvent("onunload",z)),d.attributes=M(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=M(function(e){return e.appendChild(w.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=h.test(w.getElementsByClassName),d.getById=M(function(e){return i.appendChild(e).id=S,!w.getElementsByName||!w.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(O,c);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E)return(t=t.getElementById(e))?[t]:[]}):(b.filter.ID=function(e){var t=e.replace(O,c);return function(e){e=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return e&&e.value===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var i,r,n,s=t.getElementById(e);if(s){if((i=s.getAttributeNode("id"))&&i.value===e)return[s];for(n=t.getElementsByName(e),r=0;s=n[r++];)if((i=s.getAttributeNode("id"))&&i.value===e)return[s]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var i,r=[],n=0,s=t.getElementsByTagName(e);if("*"!==e)return s;for(;i=s[n++];)1===i.nodeType&&r.push(i);return r},b.find.CLASS=d.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&E)return t.getElementsByClassName(e)},r=[],m=[],(d.qsa=h.test(w.querySelectorAll))&&(M(function(e){i.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+o+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+o+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+S+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||m.push(".#.+[+~]")}),M(function(e){e.innerHTML="";var t=w.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+o+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),i.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(d.matchesSelector=h.test(n=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.oMatchesSelector||i.msMatchesSelector))&&M(function(e){d.disconnectedMatch=n.call(e,"*"),n.call(e,"[s!='']:x"),r.push("!=",Q)}),m=m.length&&new RegExp(m.join("|")),r=r.length&&new RegExp(r.join("|")),e=h.test(i.compareDocumentPosition),_=e||h.test(i.contains)?function(e,t){var i=9===e.nodeType?e.documentElement:e,t=t&&t.parentNode;return e===t||!(!t||1!==t.nodeType||!(i.contains?i.contains(t):e.compareDocumentPosition&&16&e.compareDocumentPosition(t)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Y=e?function(e,t){var i;return e===t?(u=!0,0):(i=!e.compareDocumentPosition-!t.compareDocumentPosition)||(1&(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===i?e===w||e.ownerDocument===g&&_(g,e)?-1:t===w||t.ownerDocument===g&&_(g,t)?1:l?y(l,e)-y(l,t):0:4&i?-1:1)}:function(e,t){if(e===t)return u=!0,0;var i,r=0,n=e.parentNode,s=t.parentNode,o=[e],a=[t];if(!n||!s)return e===w?-1:t===w?1:n?-1:s?1:l?y(l,e)-y(l,t):0;if(n===s)return de(e,t);for(i=e;i=i.parentNode;)o.unshift(i);for(i=t;i=i.parentNode;)a.unshift(i);for(;o[r]===a[r];)r++;return r?de(o[r],a[r]):o[r]===g?-1:a[r]===g?1:0}),w},R.matches=function(e,t){return R(e,null,null,t)},R.matchesSelector=function(e,t){if((e.ownerDocument||e)!==w&&T(e),t=t.replace(ie,"='$1']"),d.matchesSelector&&E&&!v[t+" "]&&(!r||!r.test(t))&&(!m||!m.test(t)))try{var i=n.call(e,t);if(i||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,c),e[3]=(e[3]||e[4]||e[5]||"").replace(O,c),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||R.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&R.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return p.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&re.test(i)&&(t=f(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,c).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=X[e+" "];return t||(t=new RegExp("(^|"+o+")"+e+"("+o+"|$)"))&&X(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(t,i,r){return function(e){e=R.attr(e,t);return null==e?"!="===i:!i||(e+="","="===i?e===r:"!="===i?e!==r:"^="===i?r&&0===e.indexOf(r):"*="===i?r&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function $(e,i,r){return v(i)?w.grep(e,function(e,t){return!!i.call(e,t,e)!==r}):i.nodeType?w.grep(e,function(e){return e===i!==r}):"string"!=typeof i?w.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/,ie=((w.fn.init=function(e,t,i){if(e){if(i=i||ee,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==i.ready?i.ready(e):e(w):w.makeArray(e,this);if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:te.exec(e))||!r[1]&&t)return(!t||t.jquery?t||i:this.constructor(t)).find(e);if(r[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:T,!0)),Q.test(r[1])&&w.isPlainObject(t))for(var r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r])}else(i=T.getElementById(r[2]))&&(this[0]=i,this.length=1)}return this}).prototype=w.fn,ee=w(T),/^(?:parents|prev(?:Until|All))/),re={children:!0,contents:!0,next:!0,prev:!0};function ne(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}w.fn.extend({has:function(e){var t=w(e,this),i=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]+)/i,we=/^$|^module$|\/(?:java|ecma)script/i,S={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function A(e,t){var i=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&l(e,t)?w.merge([e],i):i}function Ee(e,t){for(var i=0,r=e.length;ix",_.noCloneChecked=!!C.cloneNode(!0).lastChild.defaultValue;var ke=T.documentElement,Pe=/^key/,Oe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Re=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function k(){return!1}function Me(){try{return T.activeElement}catch(e){}}function Ie(e,t,i,r,n,s){var o,a;if("object"==typeof t){for(a in"string"!=typeof i&&(r=r||i,i=void 0),t)Ie(e,a,i,r,t[a],s);return e}if(null==r&&null==n?(n=i,r=i=void 0):null==n&&("string"==typeof i?(n=r,r=void 0):(n=r,r=i,i=void 0)),!1===n)n=k;else if(!n)return e;return 1===s&&(o=n,(n=function(e){return w().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=w.guid++)),e.each(function(){w.event.add(this,t,n,r,i)})}w.event={global:{},add:function(t,e,i,r,n){var s,o,a,l,u,h,c,p,d,f=g.get(t);if(f)for(i.handler&&(i=(s=i).handler,n=s.selector),n&&w.find.matchesSelector(ke,n),i.guid||(i.guid=w.guid++),(a=f.events)||(a=f.events={}),(o=f.handle)||(o=f.handle=function(e){return void 0!==w&&w.event.triggered!==e.type?w.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(E)||[""]).length;l--;)c=d=(p=Re.exec(e[l])||[])[1],p=(p[2]||"").split(".").sort(),c&&(u=w.event.special[c]||{},c=(n?u.delegateType:u.bindType)||c,u=w.event.special[c]||{},d=w.extend({type:c,origType:d,data:r,handler:i,guid:i.guid,selector:n,needsContext:n&&w.expr.match.needsContext.test(n),namespace:p.join(".")},s),(h=a[c])||((h=a[c]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(t,r,p,o)||t.addEventListener&&t.addEventListener(c,o)),u.add&&(u.add.call(t,d),d.handler.guid||(d.handler.guid=i.guid)),n?h.splice(h.delegateCount++,0,d):h.push(d),w.event.global[c]=!0)},remove:function(e,t,i,r,n){var s,o,a,l,u,h,c,p,d,f,m,_=g.hasData(e)&&g.get(e);if(_&&(l=_.events)){for(u=(t=(t||"").match(E)||[""]).length;u--;)if(d=m=(a=Re.exec(t[u])||[])[1],f=(a[2]||"").split(".").sort(),d){for(c=w.event.special[d]||{},p=l[d=(r?c.delegateType:c.bindType)||d]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=p.length;s--;)h=p[s],!n&&m!==h.origType||i&&i.guid!==h.guid||a&&!a.test(h.namespace)||r&&r!==h.selector&&("**"!==r||!h.selector)||(p.splice(s,1),h.selector&&p.delegateCount--,c.remove&&c.remove.call(e,h));o&&!p.length&&(c.teardown&&!1!==c.teardown.call(e,f,_.handle)||w.removeEvent(e,d,_.handle),delete l[d])}else for(d in l)w.event.remove(e,d+t[u],i,r,!0);w.isEmptyObject(l)&&g.remove(e,"handle events")}},dispatch:function(e){var t,i,r,n,s,o=w.event.fix(e),a=new Array(arguments.length),e=(g.get(this,"events")||{})[o.type]||[],l=w.event.special[o.type]||{};for(a[0]=o,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,Le=/\s*$/g;function ze(e,t){return l(e,"table")&&l(11!==t.nodeType?t:t.firstChild,"tr")&&w(e).children("tbody")[0]||e}function Be(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ue(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function je(e,t){var i,r,n,s,o,a;if(1===t.nodeType){if(g.hasData(e)&&(s=g.access(e),o=g.set(t,s),a=s.events))for(n in delete o.handle,o.events={},a)for(i=0,r=a[n].length;i")},clone:function(e,t,i){var r,n,s,o,a,l,u,h=e.cloneNode(!0),c=w.contains(e.ownerDocument,e);if(!(_.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(o=A(h),r=0,n=(s=A(e)).length;r").prop({charset:i.scriptCharset,src:i.url}).on("load error",n=function(e){r.remove(),n=null,e&&t("error"===e.type?404:200,e.type)}),T.head.appendChild(r[0])},abort:function(){n&&n()}}}),[]),Vt=/(=)\?(?=&|$)|\?\?/,qt=(w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Wt.pop()||w.expando+"_"+St++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",function(e,t,i){var r,n,s,o=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(o||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,o?e[o]=e[o].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||w.error(r+" was not called"),s[0]},e.dataTypes[0]="json",n=x[r],x[r]=function(){s=arguments},i.always(function(){void 0===n?w(x).removeProp(r):x[r]=n,e[r]&&(e.jsonpCallback=t.jsonpCallback,Wt.push(r)),s&&v(n)&&n(s[0]),s=n=void 0}),"script"}),_.createHTMLDocument=((e=T.implementation.createHTMLDocument("").body).innerHTML="
",2===e.childNodes.length),w.parseHTML=function(e,t,i){var r;return"string"!=typeof e?[]:("boolean"==typeof t&&(i=t,t=!1),t||(_.createHTMLDocument?((r=(t=T.implementation.createHTMLDocument("")).createElement("base")).href=T.location.href,t.head.appendChild(r)):t=T),r=!i&&[],(i=Q.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,r),r&&r.length&&w(r).remove(),w.merge([],i.childNodes)))},w.fn.load=function(e,t,i){var r,n,s,o=this,a=e.indexOf(" ");return-1").append(w.parseHTML(e)).find(r):e)}).always(i&&function(e,t){o.each(function(){i.apply(this,s||[e.responseText,t,e])})}),this},w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){w.fn[t]=function(e){return this.on(t,e)}}),w.expr.pseudos.animated=function(t){return w.grep(w.timers,function(e){return t===e.elem}).length},w.offset={setOffset:function(e,t,i){var r,n,s,o,a=w.css(e,"position"),l=w(e),u={};"static"===a&&(e.style.position="relative"),s=l.offset(),r=w.css(e,"top"),o=w.css(e,"left"),a=("absolute"===a||"fixed"===a)&&-1<(r+o).indexOf("auto")?(n=(a=l.position()).top,a.left):(n=parseFloat(r)||0,parseFloat(o)||0),null!=(t=v(t)?t.call(e,i,w.extend({},s)):t).top&&(u.top=t.top-s.top+n),null!=t.left&&(u.left=t.left-s.left+a),"using"in t?t.using.call(e,u):l.css(u)}},w.fn.extend({offset:function(t){var e,i;return arguments.length?void 0===t?this:this.each(function(e){w.offset.setOffset(this,t,e)}):(i=this[0])?i.getClientRects().length?(e=i.getBoundingClientRect(),i=i.ownerDocument.defaultView,{top:e.top+i.pageYOffset,left:e.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,i,r=this[0],n={top:0,left:0};if("fixed"===w.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),i=r.ownerDocument,e=r.offsetParent||i.documentElement;e&&(e===i.body||e===i.documentElement)&&"static"===w.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((n=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),n.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-n.top-w.css(r,"marginTop",!0),left:t.left-n.left-w.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===w.css(e,"position");)e=e.offsetParent;return e||ke})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var s="pageYOffset"===n;w.fn[t]=function(e){return c(this,function(e,t,i){var r;if(m(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===i)return r?r[n]:e[t];r?r.scrollTo(s?r.pageXOffset:i,s?i:r.pageYOffset):e[t]=i},t,e,arguments.length)}}),w.each(["top","left"],function(e,i){w.cssHooks[i]=$e(_.pixelPosition,function(e,t){if(t)return t=O(e,i),Ze.test(t)?w(e).position()[i]+"px":t})}),w.each({Height:"height",Width:"width"},function(o,a){w.each({padding:"inner"+o,content:a,"":"outer"+o},function(r,s){w.fn[s]=function(e,t){var i=arguments.length&&(r||"boolean"!=typeof e),n=r||(!0===e||!0===t?"margin":"border");return c(this,function(e,t,i){var r;return m(e)?0===s.indexOf("outer")?e["inner"+o]:e.document.documentElement["client"+o]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+o],r["scroll"+o],e.body["offset"+o],r["offset"+o],r["client"+o])):void 0===i?w.css(e,t,n):w.style(e,t,i,n)},a,i?e:void 0,i)}})}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,i){w.fn[i]=function(e,t){return 0this.updateCoord(e,a,"x");break;case"scaleY":case"skewY":n=i,s=i-(r=e[a=t.substr(0,t.length-1)].y),o=e=>this.updateCoord(e,a,"y");break;case"tint":case"blend":const l=Array.isArray(i)?i:[e.tint,i];r=0,s=n=l.length,o="tint"===t?e=>this.updateTint(e,l):e=>this.updateBlend(e,l);break;case"shake":r={x:e.x,y:e.y},n=i,o=e=>this.updateShake(e);break;case"position":r={x:e.x,y:e.y},s={x:(n={x:i.x,y:i.y}).x-r.x,y:n.y-r.y},o=e=>this.updatePosition(e);break;case"skew":case"scale":n=i,s=i-(r=e[t].x),o=e=>this.updatePoint(e,t);break;case"face":r=e.rotation,s=(n=u.shortestAngle(r,Math.atan2(i.y-e.y,i.x-e.x)))-r,o=e=>this.updateOne(e,"rotation");break;default:n=i,s=i-(r=e[t]),o=e=>this.updateOne(e,t)}this.eases.push({element:e,entry:t,update:o,start:r,to:n,delta:s})}static shortestAngle(e,t){var i=2*Math.PI,r=Math.abs(e-t)%i;return(r>Math.PI?i-r:r)*(0<((t-e+Math.PI)%i+i)%i-Math.PI?1:-1)}remove(t,i){if(0===arguments.length)this.eases=[];else{"string"==typeof i&&(i=[i]);for(let e=0;e>16)+i*(t>>16)<<16|o*(s>>8&255)+i*(t>>8&255)<<8|o*(255&s)+i*(255&t)}updateShake(e){function t(e){return Math.floor(Math.random()*e)-Math.floor(e/2)}e.element.x=e.start.x+t(e.to),e.element.y=e.start.y+t(e.to)}complete(e){"shake"===e.entry&&(e.element.x=e.start.x,e.element.y=e.start.y)}reverse(e){var t,i;"position"===e.entry?(i=e.to.x,t=e.to.y,e.to.x=e.start.x,e.to.y=e.start.y,e.start.x=i,e.start.y=t,e.delta.x=-e.delta.x,e.delta.y=-e.delta.y):(i=e.to,e.to=e.start,e.start=i,e.delta=-e.delta)}repeat(e){switch(e.entry){case"skewX":e.element.skew.x=e.start;break;case"skewY":e.element.skew.y=e.start;break;case"skew":e.element.skew.x=e.start,e.element.skew.y=e.start;break;case"scaleX":e.element.scale.x=e.start;break;case"scaleY":e.element.scale.y=e.start;break;case"scale":e.element.scale.x=e.start,e.element.scale.y=e.start;break;case"position":e.element.x=e.start.x,e.element.y=e.start.y;break;default:e.element[e.entry]=e.start}}update(e){if(0===this.eases.length)return!0;if(this.options.wait){if(this.options.wait-=e,0=this.options.duration&&(t=this.time-this.options.duration,this.time=this.options.duration);for(let e=0;e=this.options.duration)if(this.options.reverse)this.eases.forEach(e=>this.reverse(e)),(this.time=t)&&this.eases.forEach(e=>e.update(e)),this.emit("reverse",this),this.options.repeat?!0!==this.options.repeat&&this.options.repeat--:this.options.reverse=!1;else{if(!this.options.repeat)return this.eases.forEach(e=>this.complete(e)),this.emit("complete",this),!0;this.eases.forEach(e=>this.repeat(e)),(this.time=t)&&this.eases.forEach(e=>e.update(e)),!0!==this.options.repeat&&this.options.repeat--,this.emit("repeat",this)}}get count(){return this.eases.length}}const s={duration:1e3,ease:r.easeInOutSine,maxFrame:1e3/60,ticker:null,useRAF:!0};class o extends n{constructor(e){super(),this.options=Object.assign({},s,e),this.easings=[],this.empty=!0,this.options.ticker&&this.options.ticker.add(this.update,this)}destroy(){this.removeAll(),this.options.useTicker?this.ticker.remove(this.update,this):this.options.useRAF&&(cancelAnimationFrame(this.handleRAF),this.handleRAF=null)}add(e,t,i){(i=i||{}).duration=(void 0!==i.duration?i:this.options).duration,i.ease=i.ease||this.options.ease,"string"==typeof i.ease&&(i.ease=r[i.ease]);e=new u(e,t,i);return this.easings.push(e),this.empty&&this.options.useRAF&&(this.handleRAF=requestAnimationFrame(()=>this.update()),this.lastTime=Date.now()),this.empty=!1,e}target(e,t,i,r){i=Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))/i;return(r=r||{}).duration=i,this.add(e,{x:t.x,y:t.y},r)}face(e,t,i,r){t=u.shortestAngle(e.rotation,Math.atan2(t.y-e.y,t.x-e.x)),i=Math.abs(t-e.rotation)/i;return(r=r||{}).duration=i,this.add(e,{rotation:t},r)}removeEase(t,i){for(let e=0;ethis.update()):this.handleRAF=null}get count(){return this.easings.length}countRunning(){let e=0;for(var t of this.easings)e+=t.count;return e}set duration(e){this.options.duration=e}get duration(){return this.options.duration}set ease(e){this.options.ease=e}get ease(){return this.options.ease}}o.id=0;n=new o;o.ease=n,e.Ease=o,e.List=class{constructor(){console.warn("Ease.List was deprecated. Use new Ease() instead.")}},e.ease=n,Object.defineProperty(e,"__esModule",{value:!0})}),this.PIXI=this.PIXI||{},!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@pixi/math"),require("@pixi/display"),require("@pixi/ticker")):"function"==typeof define&&define.amd?define(["exports","@pixi/math","@pixi/display","@pixi/ticker"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).pixi_viewport={},e.PIXI,e.PIXI,e.PIXI)}(this,function(e,a,t,i){"use strict";class r{constructor(e){this.parent=e,this.paused=!1}destroy(){}down(e){return!1}move(e){return!1}up(e){return!1}wheel(e){return!1}update(e){}resize(){}reset(){}pause(){this.paused=!0}resume(){this.paused=!1}}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};(function(t){!function(){var n={linear:function(e,t,i,r){return i*e/r+t},easeInQuad:function(e,t,i,r){return i*(e/=r)*e+t},easeOutQuad:function(e,t,i,r){return-i*(e/=r)*(e-2)+t},easeInOutQuad:function(e,t,i,r){return(e/=r/2)<1?i/2*e*e+t:-i/2*(--e*(e-2)-1)+t},easeInCubic:function(e,t,i,r){return i*(e/=r)*e*e+t},easeOutCubic:function(e,t,i,r){return i*((e=e/r-1)*e*e+1)+t},easeInOutCubic:function(e,t,i,r){return(e/=r/2)<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t},easeInQuart:function(e,t,i,r){return i*(e/=r)*e*e*e+t},easeOutQuart:function(e,t,i,r){return-i*((e=e/r-1)*e*e*e-1)+t},easeInOutQuart:function(e,t,i,r){return(e/=r/2)<1?i/2*e*e*e*e+t:-i/2*((e-=2)*e*e*e-2)+t},easeInQuint:function(e,t,i,r){return i*(e/=r)*e*e*e*e+t},easeOutQuint:function(e,t,i,r){return i*((e=e/r-1)*e*e*e*e+1)+t},easeInOutQuint:function(e,t,i,r){return(e/=r/2)<1?i/2*e*e*e*e*e+t:i/2*((e-=2)*e*e*e*e+2)+t},easeInSine:function(e,t,i,r){return-i*Math.cos(e/r*(Math.PI/2))+i+t},easeOutSine:function(e,t,i,r){return i*Math.sin(e/r*(Math.PI/2))+t},easeInOutSine:function(e,t,i,r){return-i/2*(Math.cos(Math.PI*e/r)-1)+t},easeInExpo:function(e,t,i,r){return 0===e?t:i*Math.pow(2,10*(e/r-1))+t},easeOutExpo:function(e,t,i,r){return e===r?t+i:i*(1-Math.pow(2,-10*e/r))+t},easeInOutExpo:function(e,t,i,r){return(e/=r/2)<1?i/2*Math.pow(2,10*(e-1))+t:i/2*(2-Math.pow(2,-10*--e))+t},easeInCirc:function(e,t,i,r){return-i*(Math.sqrt(1-(e/=r)*e)-1)+t},easeOutCirc:function(e,t,i,r){return i*Math.sqrt(1-(e=e/r-1)*e)+t},easeInOutCirc:function(e,t,i,r){return(e/=r/2)<1?-i/2*(Math.sqrt(1-e*e)-1)+t:i/2*(Math.sqrt(1-(e-=2)*e)+1)+t},easeInElastic:function(e,t,i,r){var n=1.70158,s=0,o=i;return 0!==e&&(e/=r),s=s||.3*r,n=o=this.options.time?(t=this.parent.width,i=this.parent.height,this.complete(),t===this.parent.width&&i===this.parent.height||this.parent.emit("zoomed",{viewport:this.parent,original:e,type:"animate"})):(t=this.options.ease(this.time,0,1,this.options.time),null!==this.width&&(i=this.startWidth,r=this.deltaWidth,this.parent.fitWidth(i+r*t,this.keepCenter,null===this.height)),null!==this.height&&(i=this.startHeight,r=this.deltaHeight,this.parent.fitHeight(i+r*t,this.keepCenter,null===this.width)),null===this.width?this.parent.scale.x=this.parent.scale.y:null===this.height&&(this.parent.scale.y=this.parent.scale.x),this.keepCenter||(i=this.startX,r=this.startY,n=this.deltaX,s=this.deltaY,o=new a.Point(this.parent.x,this.parent.y),this.parent.moveCenter(i+n*t,r+s*t),this.parent.emit("moved",{viewport:this.parent,original:o,type:"animate"})),(this.width||this.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:e,type:"animate"})))}}function p(e){let t=void 0,i=e[0],r=1;for(;ri.call(t,...e)),t=void 0)}return i}const d={sides:"all",friction:.5,time:150,ease:"easeInOutSine",underflow:"center",bounceBox:null};class f extends r{constructor(e,t={}){super(e),this.options=Object.assign({},d,t),this.ease=u(this.options.ease,"easeInOutSine"),this.options.sides?"all"===this.options.sides?this.top=this.bottom=this.left=this.right=!0:"horizontal"===this.options.sides?(this.right=this.left=!0,this.top=this.bottom=!1):"vertical"===this.options.sides?(this.left=this.right=!1,this.top=this.bottom=!0):(this.top=-1!==this.options.sides.indexOf("top"),this.bottom=-1!==this.options.sides.indexOf("bottom"),this.left=-1!==this.options.sides.indexOf("left"),this.right=-1!==this.options.sides.indexOf("right")):this.left=this.top=this.right=this.bottom=!1;e=this.options.underflow.toLowerCase();"center"===e?(this.underflowX=0,this.underflowY=0):(this.underflowX=-1!==e.indexOf("left")?-1:-1!==e.indexOf("right")?1:0,this.underflowY=-1!==e.indexOf("top")?-1:-1!==e.indexOf("bottom")?1:0),this.reset()}isActive(){return null!==this.toX||null!==this.toY}down(){return this.toX=this.toY=null,!1}up(){return this.bounce(),!1}update(e){var t;this.paused||(this.bounce(),this.toX&&((t=this.toX).time+=e,this.parent.emit("moved",{viewport:this.parent,type:"bounce-x"}),t.time>=this.options.time?(this.parent.x=t.end,this.toX=null,this.parent.emit("bounce-x-end",this.parent)):this.parent.x=this.ease(t.time,t.start,t.delta,this.options.time)),this.toY&&((t=this.toY).time+=e,this.parent.emit("moved",{viewport:this.parent,type:"bounce-y"}),t.time>=this.options.time?(this.parent.y=t.end,this.toY=null,this.parent.emit("bounce-y-end",this.parent)):this.parent.y=this.ease(t.time,t.start,t.delta,this.options.time)))}calcUnderflowX(){let e;switch(this.underflowX){case-1:e=0;break;case 1:e=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:e=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}return e}calcUnderflowY(){let e;switch(this.underflowY){case-1:e=0;break;case 1:e=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:e=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}return e}oob(){var e,t,i,r=this.options.bounceBox;return r?(e=void 0===r.x?0:r.x,t=void 0===r.y?0:r.y,i=void 0===r.width?this.parent.worldWidth:r.width,r=void 0===r.height?this.parent.worldHeight:r.height,{left:this.parent.lefti,top:this.parent.topr,topLeft:new a.Point(e*this.parent.scale.x,t*this.parent.scale.y),bottomRight:new a.Point(i*this.parent.scale.x-this.parent.screenWidth,r*this.parent.scale.y-this.parent.screenHeight)}):{left:this.parent.left<0,right:this.parent.right>this.parent.worldWidth,top:this.parent.top<0,bottom:this.parent.bottom>this.parent.worldHeight,topLeft:new a.Point(0,0),bottomRight:new a.Point(this.parent.worldWidth*this.parent.scale.x-this.parent.screenWidth,this.parent.worldHeight*this.parent.scale.y-this.parent.screenHeight)}}bounce(){if(!this.paused){let t,e=this.parent.plugins.get("decelerate",!0);e&&(e.x||e.y)&&(e.x&&e.percentChangeX===p([e,"access",e=>e.options,"optionalAccess",e=>e.friction])||e.y&&e.percentChangeY===p([e,"access",e=>e.options,"optionalAccess",e=>e.friction]))&&(((t=this.oob()).left&&this.left||t.right&&this.right)&&(e.percentChangeX=this.options.friction),(t.top&&this.top||t.bottom&&this.bottom)&&(e.percentChangeY=this.options.friction));var i=this.parent.plugins.get("drag",!0)||{},r=this.parent.plugins.get("pinch",!0)||{};if(e=e||{},!(p([i,"optionalAccess",e=>e.active])||p([r,"optionalAccess",e=>e.active])||this.toX&&this.toY||e.x&&e.y)){i=(t=t||this.oob()).topLeft,r=t.bottomRight;if(!this.toX&&!e.x){let e=null;t.left&&this.left?e=this.parent.screenWorldWidth(!0===this.options.right?this.parent.worldWidth:this.options.right)&&(this.parent.x=-(!0===this.options.right?this.parent.worldWidth:this.options.right)*this.parent.scale.x+this.parent.screenWidth,i.x=0,e=!0);e&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-x"})}if(null!==this.options.top||null!==this.options.bottom){let e=!1;if(!this.noUnderflow&&this.parent.screenWorldHeight(!0===this.options.bottom?this.parent.worldHeight:this.options.bottom)&&(this.parent.y=-(!0===this.options.bottom?this.parent.worldHeight:this.options.bottom)*this.parent.scale.y+this.parent.screenHeight,i.y=0,e=!0);e&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-y"})}this.last.x=this.parent.x,this.last.y=this.parent.y,this.last.scaleX=this.parent.scale.x,this.last.scaleY=this.parent.scale.y}}reset(){this.update()}}const g={minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,minScale:null,maxScale:null};class v extends r{constructor(e,t={}){super(e),this.options=Object.assign({},g,t),this.clamp()}resize(){this.clamp()}clamp(){if(!this.paused)if(this.options.minWidth||this.options.minHeight||this.options.maxWidth||this.options.maxHeight){let e=this.parent.worldScreenWidth,t=this.parent.worldScreenHeight;null!==this.options.minWidth&&ethis.options.maxWidth&&(r=this.parent.scale.x,this.parent.fitWidth(this.options.maxWidth,!1,!1,!0),this.parent.scale.y*=this.parent.scale.x/r,e=this.parent.worldScreenWidth,t=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})),null!==this.options.minHeight&&tthis.options.maxHeight&&(r=this.parent.scale.y,this.parent.fitHeight(this.options.maxHeight,!1,!1,!0),this.parent.scale.x*=this.parent.scale.y/r,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"}))}else if(this.options.minScale||this.options.maxScale){var i,r={x:null,y:null},n={x:null,y:null};"number"==typeof this.options.minScale?(r.x=this.options.minScale,r.y=this.options.minScale):null!==this.options.minScale&&(i=this.options.minScale,r.x=void 0===i.x?null:i.x,r.y=void 0===i.y?null:i.y),"number"==typeof this.options.maxScale?(n.x=this.options.maxScale,n.y=this.options.maxScale):null!==this.options.maxScale&&(i=this.options.maxScale,n.x=void 0===i.x?null:i.x,n.y=void 0===i.y?null:i.y);let e=this.parent.scale.x,t=this.parent.scale.y;null!==r.x&&en.x&&(e=n.x),null!==r.y&&tn.y&&(t=n.y),e===this.parent.scale.x&&t===this.parent.scale.y||(this.parent.scale.set(e,t),this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"}))}}reset(){this.clamp()}}const y={friction:.98,bounce:.8,minSpeed:.01};class b extends r{constructor(e,t={}){super(e),this.options=Object.assign({},y,t),this.saved=[],this.timeSinceRelease=0,this.reset(),this.parent.on("moved",e=>this.moved(e))}down(){return this.saved=[],this.x=this.y=null,!1}isActive(){return!(!this.x&&!this.y)}move(){var e;return this.paused||(1===(e=this.parent.input.count())||1=e-100){var t=e-i.time;this.x=(this.parent.x-i.x)/t,this.y=(this.parent.y-i.y)/t,this.percentChangeX=this.percentChangeY=this.options.friction,this.timeSinceRelease=0;break}}return!1}activate(e){void 0!==(e=e||{}).x&&(this.x=e.x,this.percentChangeX=this.options.friction),void 0!==e.y&&(this.y=e.y,this.percentChangeY=this.options.friction)}update(e){var t,i,r,n,s;this.paused||(t=this.x||this.y,i=this.timeSinceRelease,r=this.timeSinceRelease+e,this.x&&(s=this.percentChangeX,n=Math.log(s),this.parent.x+=16*this.x/n*(Math.pow(s,r/16)-Math.pow(s,i/16)),this.x*=Math.pow(this.percentChangeX,e/16)),this.y&&(n=this.percentChangeY,s=Math.log(n),this.parent.y+=16*this.y/s*(Math.pow(n,r/16)-Math.pow(n,i/16)),this.y*=Math.pow(this.percentChangeY,e/16)),this.timeSinceRelease+=e,this.x&&this.y?Math.abs(this.x){t.includes(e.code)&&(this.keyIsPressed=!0)}),window.addEventListener("keyup",e=>{t.includes(e.code)&&(this.keyIsPressed=!1)})}mouseButtons(e){this.mouse=e&&"all"!==e?[-1!==e.indexOf("left"),-1!==e.indexOf("middle"),-1!==e.indexOf("right")]:[!0,!0,!0]}parseUnderflow(){var e=this.options.underflow.toLowerCase();"center"===e?(this.underflowX=0,this.underflowY=0):(e.includes("left")?this.underflowX=-1:e.includes("right")?this.underflowX=1:this.underflowX=0,e.includes("top")?this.underflowY=-1:e.includes("bottom")?this.underflowY=1:this.underflowY=0)}checkButtons(e){var t="mouse"===e.data.pointerType,i=this.parent.input.count();return!(!(1===i||1this.parent.worldWidth&&(this.parent.x=-this.parent.worldWidth*this.parent.scale.x+this.parent.screenWidth,e.x=0);if("x"!==this.options.clampWheel)if(this.parent.screenWorldHeightthis.parent.worldHeight&&(this.parent.y=-this.parent.worldHeight*this.parent.scale.y+this.parent.screenHeight,e.y=0)}}const w={speed:0,acceleration:null,radius:null};class E extends r{constructor(e,t,i={}){super(e),this.target=t,this.options=Object.assign({},w,i),this.velocity={x:0,y:0}}update(i){if(!this.paused){var r=this.parent.center;let e=this.target.x,t=this.target.y;if(this.options.radius){if(!(Math.sqrt(Math.pow(this.target.y-r.y,2)+Math.pow(this.target.x-r.x,2))>this.options.radius))return;var n=Math.atan2(this.target.y-r.y,this.target.x-r.x);e=this.target.x-Math.cos(n)*this.options.radius,t=this.target.y-Math.sin(n)*this.options.radius}var s,o,a,n=e-r.x,l=t-r.y;(n||l)&&(this.options.speed?this.options.acceleration?(o=Math.atan2(t-r.y,e-r.x),(s=Math.sqrt(Math.pow(n,2)+Math.pow(l,2)))&&(a=(Math.pow(this.velocity.x,2)+Math.pow(this.velocity.y,2))/(2*this.options.acceleration),this.velocity=aMath.abs(n)?e:r.x+a,o=Math.abs(s)>Math.abs(l)?t:r.y+s,this.parent.moveCenter(i,o),this.parent.emit("moved",{viewport:this.parent,type:"follow"}))):(a=Math.atan2(t-r.y,e-r.x),s=Math.cos(a)*this.options.speed,i=Math.sin(a)*this.options.speed,o=Math.abs(s)>Math.abs(n)?e:r.x+s,a=Math.abs(i)>Math.abs(l)?t:r.y+i,this.parent.moveCenter(o,a),this.parent.emit("moved",{viewport:this.parent,type:"follow"})):(this.parent.moveCenter(e,t),this.parent.emit("moved",{viewport:this.parent,type:"follow"})))}}}const S={radius:null,distance:null,top:null,bottom:null,left:null,right:null,speed:8,reverse:!1,noDecelerate:!1,linear:!1,allowButtons:!1};class A extends r{constructor(e,t={}){super(e),this.options=Object.assign({},S,t),this.reverse=this.options.reverse?1:-1,this.radiusSquared="number"==typeof this.options.radius?Math.pow(this.options.radius,2):null,this.resize()}resize(){var e=this.options.distance;null!==e?(this.left=e,this.top=e,this.right=this.parent.screenWidth-e,this.bottom=this.parent.screenHeight-e):this.options.radius||(this.left=this.options.left,this.top=this.options.top,this.right=null===this.options.right?null:this.parent.screenWidth-this.options.right,this.bottom=null===this.options.bottom?null:this.parent.screenHeight-this.options.bottom)}down(){return this.paused||this.options.allowButtons||(this.horizontal=this.vertical=null),!1}move(e){var t,i;return this.paused||"mouse"!==e.data.pointerType&&1!==e.data.identifier||!this.options.allowButtons&&0!==e.data.buttons||(t=e.data.global.x,e=e.data.global.y,this.radiusSquared?(i=this.parent.toScreen(this.parent.center),Math.pow(i.x-t,2)+Math.pow(i.y-e,2)>=this.radiusSquared?(i=Math.atan2(i.y-e,i.x-t),this.options.linear?(this.horizontal=Math.round(Math.cos(i))*this.options.speed*this.reverse*.06,this.vertical=Math.round(Math.sin(i))*this.options.speed*this.reverse*.06):(this.horizontal=Math.cos(i)*this.options.speed*this.reverse*.06,this.vertical=Math.sin(i)*this.options.speed*this.reverse*.06)):(this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=0)):(null!==this.left&&tthis.right?this.horizontal=-1*this.reverse*this.options.speed*.06:(this.decelerateHorizontal(),this.horizontal=0),null!==this.top&&ethis.bottom?this.vertical=-1*this.reverse*this.options.speed*.06:(this.decelerateVertical(),this.vertical=0))),!1}decelerateHorizontal(){var e=this.parent.plugins.get("decelerate",!0);this.horizontal&&e&&!this.options.noDecelerate&&e.activate({x:this.horizontal*this.options.speed*this.reverse/(1e3/60)})}decelerateVertical(){var e=this.parent.plugins.get("decelerate",!0);this.vertical&&e&&!this.options.noDecelerate&&e.activate({y:this.vertical*this.options.speed*this.reverse/(1e3/60)})}up(){return this.paused||(this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=null),!1}update(){var e;this.paused||(this.horizontal||this.vertical)&&(e=this.parent.center,this.horizontal&&(e.x+=this.horizontal*this.options.speed),this.vertical&&(e.y+=this.vertical*this.options.speed),this.parent.moveCenter(e),this.parent.emit("moved",{viewport:this.parent,type:"mouse-edges"}))}}const F={noDrag:!1,percent:1,center:null,factor:1,axis:"all"};class k extends r{__init(){this.active=!1}__init2(){this.pinching=!1}__init3(){this.moved=!1}constructor(e,t={}){super(e),k.prototype.__init.call(this),k.prototype.__init2.call(this),k.prototype.__init3.call(this),this.options=Object.assign({},F,t)}down(){return 2<=this.parent.input.count()&&(this.active=!0)}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}move(i){if(!this.paused&&this.active){var r=i.data.global.x,n=i.data.global.y,s=this.parent.input.touches;if(2<=s.length){var o=s[0],s=s[1],a=o.last&&s.last?Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2)):null;if(o.id===i.data.pointerId?o.last={x:r,y:n,data:i.data}:s.id===i.data.pointerId&&(s.last={x:r,y:n,data:i.data}),a){let e;r={x:o.last.x+(s.last.x-o.last.x)/2,y:o.last.y+(s.last.y-o.last.y)/2};this.options.center||(e=this.parent.toLocal(r));let t=Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2));n=(1-a/(t=0===t?t=1e-10:t))*this.options.percent*(this.isAxisX()?this.parent.scale.x:this.parent.scale.y),i=(this.isAxisX()&&(this.parent.scale.x+=n),this.isAxisY()&&(this.parent.scale.y+=n),this.parent.emit("zoomed",{viewport:this.parent,type:"pinch",center:r}),this.parent.plugins.get("clamp-zoom",!0));i&&i.clamp(),this.options.center?this.parent.moveCenter(this.options.center):(s=this.parent.toGlobal(e),this.parent.x+=(r.x-s.x)*this.options.factor,this.parent.y+=(r.y-s.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),!this.options.noDrag&&this.lastCenter&&(this.parent.x+=(r.x-this.lastCenter.x)*this.options.factor,this.parent.y+=(r.y-this.lastCenter.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=r,this.moved=!0}else this.pinching||(this.parent.emit("pinch-start",this.parent),this.pinching=!0);return!0}}return!1}up(){return!!(this.pinching&&this.parent.input.touches.length<=1)&&(this.active=!1,this.lastCenter=null,this.pinching=!1,this.moved=!1,this.parent.emit("pinch-end",this.parent),!0)}}const N={topLeft:!1,friction:.8,time:1e3,ease:"easeInOutSine",interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1};class P extends r{constructor(e,t,i,r={}){super(e),this.options=Object.assign({},N,r),this.ease=u(r.ease,"easeInOutSine"),this.x=t,this.y=i,this.options.forceStart&&this.snapStart()}snapStart(){this.percent=0,this.snapping={time:0};var e=this.options.topLeft?this.parent.corner:this.parent.center;this.deltaX=this.x-e.x,this.deltaY=this.y-e.y,this.startX=e.x,this.startY=e.y,this.parent.emit("snap-start",this.parent)}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap"):this.options.interrupt&&(this.snapping=null),!1}up(){var e;return 0===this.parent.input.count()&&(e=this.parent.plugins.get("decelerate",!0))&&(e.x||e.y)&&(e.percentChangeX=e.percentChangeY=this.options.friction),!1}update(r){if(!(this.paused||this.options.interrupt&&0!==this.parent.input.count()))if(this.snapping){var n=this.snapping;n.time+=r;let e,t,i;var r=this.startX,s=this.startY,o=this.deltaX,a=this.deltaY;i=n.time>this.options.time?(e=!0,t=r+o,s+a):(n=this.ease(n.time,0,1,this.options.time),t=r+o*n,s+a*n),this.options.topLeft?this.parent.moveCorner(t,i):this.parent.moveCenter(t,i),this.parent.emit("moved",{viewport:this.parent,type:"snap"}),e&&(this.options.removeOnComplete&&this.parent.plugins.remove("snap"),this.parent.emit("snap-end",this.parent),this.snapping=null)}else{r=this.options.topLeft?this.parent.corner:this.parent.center;r.x===this.x&&r.y===this.y||this.snapStart()}}}const z={width:0,height:0,time:1e3,ease:"easeInOutSine",center:null,interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1,noMove:!1};class O extends r{constructor(e,t={}){super(e),this.options=Object.assign({},z,t),this.ease=u(this.options.ease),this.xIndependent=!1,this.yIndependent=!1,this.xScale=0,(this.yScale=0)=this.options.time?(this.parent.scale.set(this.xScale,this.yScale),this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom"),this.parent.emit("snap-zoom-end",this.parent),this.snapping=null):(t=this.snapping,i=this.ease(t.time,t.startX,t.deltaX,this.options.time),t=this.ease(t.time,t.startY,t.deltaY,this.options.time),this.parent.scale.x=this.parent.screenWidth/i,this.parent.scale.y=this.parent.screenHeight/t),(i=this.parent.plugins.get("clamp-zoom",!0))&&i.clamp(),this.options.noMove||(this.options.center?this.parent.moveCenter(this.options.center):this.parent.moveCenter(e))):this.parent.scale.x===this.xScale&&this.parent.scale.y===this.yScale||this.createSnapping()}}resume(){this.snapping=null,super.resume()}}const B={percent:.1,smooth:!1,interrupt:!0,reverse:!1,center:null,lineHeight:20,axis:"all",keyToPress:null,trackpadPinch:!1,wheelZoom:!0};class R extends r{constructor(e,t={}){super(e),this.options=Object.assign({},B,t),this.keyIsPressed=!1,this.options.keyToPress&&this.handleKeyPresses(this.options.keyToPress)}handleKeyPresses(t){window.addEventListener("keydown",e=>{t.includes(e.code)&&(this.keyIsPressed=!0)}),window.addEventListener("keyup",e=>{t.includes(e.code)&&(this.keyIsPressed=!1)})}checkKeyPress(){return!this.options.keyToPress||this.keyIsPressed}down(){return this.options.interrupt&&(this.smoothing=null),!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}update(){if(this.smoothing){var t=this.smoothingCenter,i=this.smoothing;let e;this.options.center||(e=this.parent.toLocal(t)),this.isAxisX()&&(this.parent.scale.x+=i.x),this.isAxisY()&&(this.parent.scale.y+=i.y),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});var i=this.parent.plugins.get("clamp-zoom",!0);i&&i.clamp(),this.options.center?this.parent.moveCenter(this.options.center):(i=this.parent.toGlobal(e),this.parent.x+=t.x-i.x,this.parent.y+=t.y-i.y),this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.smoothingCount++,this.smoothingCount>=this.options.smooth&&(this.smoothing=null)}}pinch(t){if(!this.paused){var i=this.parent.input.getPointerPosition(t),r=-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/200,r=Math.pow(2,(1+this.options.percent)*r);let e;this.options.center||(e=this.parent.toLocal(i)),this.isAxisX()&&(this.parent.scale.x*=r),this.isAxisY()&&(this.parent.scale.y*=r),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});r=this.parent.plugins.get("clamp-zoom",!0);r&&r.clamp(),this.options.center?this.parent.moveCenter(this.options.center):(r=this.parent.toGlobal(e),this.parent.x+=i.x-r.x,this.parent.y+=i.y-r.y),this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel",{wheel:{dx:t.deltaX,dy:t.deltaY,dz:t.deltaZ},event:t,viewport:this.parent})}}wheel(e){if(this.paused)return!1;if(!this.checkKeyPress())return!1;if(e.ctrlKey&&this.options.trackpadPinch)this.pinch(e);else if(this.options.wheelZoom){var t=this.parent.input.getPointerPosition(e),i=(this.options.reverse?-1:1)*-e.deltaY*(e.deltaMode?this.options.lineHeight:1)/500,i=Math.pow(2,(1+this.options.percent)*i);if(this.options.smooth){var r={x:this.smoothing?this.smoothing.x*(this.options.smooth-this.smoothingCount):0,y:this.smoothing?this.smoothing.y*(this.options.smooth-this.smoothingCount):0};this.smoothing={x:((this.parent.scale.x+r.x)*i-this.parent.scale.x)/this.options.smooth,y:((this.parent.scale.y+r.y)*i-this.parent.scale.y)/this.options.smooth},this.smoothingCount=0,this.smoothingCenter=t}else{let e;this.options.center||(e=this.parent.toLocal(t)),this.isAxisX()&&(this.parent.scale.x*=i),this.isAxisY()&&(this.parent.scale.y*=i),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});r=this.parent.plugins.get("clamp-zoom",!0);r&&r.clamp(),this.options.center?this.parent.moveCenter(this.options.center):(i=this.parent.toGlobal(e),this.parent.x+=t.x-i.x,this.parent.y+=t.y-i.y)}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel",{wheel:{dx:e.deltaX,dy:e.deltaY,dz:e.deltaZ},event:e,viewport:this.parent})}return!this.parent.options.passiveWheel}}class C{constructor(e){this.viewport=e,this.touches=[],this.addListeners()}addListeners(){this.viewport.interactive=!0,this.viewport.forceHitArea||(this.viewport.hitArea=new a.Rectangle(0,0,this.viewport.worldWidth,this.viewport.worldHeight)),this.viewport.on("pointerdown",this.down,this),this.viewport.on("pointermove",this.move,this),this.viewport.on("pointerup",this.up,this),this.viewport.on("pointerupoutside",this.up,this),this.viewport.on("pointercancel",this.up,this),this.viewport.on("pointerout",this.up,this),this.wheelFunction=e=>this.handleWheel(e),this.viewport.options.divWheel.addEventListener("wheel",this.wheelFunction,{passive:this.viewport.options.passiveWheel}),this.isMouseDown=!1}destroy(){this.viewport.options.divWheel.removeEventListener("wheel",this.wheelFunction)}down(e){var t,i;!this.viewport.pause&&this.viewport.worldVisible&&("mouse"===e.data.pointerType?this.isMouseDown=!0:this.get(e.data.pointerId)||this.touches.push({id:e.data.pointerId,last:null}),1!==this.count()||(this.last=e.data.global.clone(),t=this.viewport.plugins.get("decelerate",!0),i=this.viewport.plugins.get("bounce",!0),t&&t.isActive()||i&&i.isActive())?this.clickedAvailable=!1:this.clickedAvailable=!0,this.viewport.plugins.down(e)&&this.viewport.options.stopPropagation&&e.stopPropagation())}clear(){this.isMouseDown=!1,this.touches=[],this.last=null}checkThreshold(e){return Math.abs(e)>=this.viewport.threshold}move(e){var t,i,r;!this.viewport.pause&&this.viewport.worldVisible&&(t=this.viewport.plugins.move(e),this.clickedAvailable&&this.last&&(i=e.data.global.x-this.last.x,r=e.data.global.y-this.last.y,(this.checkThreshold(i)||this.checkThreshold(r))&&(this.clickedAvailable=!1)),t&&this.viewport.options.stopPropagation&&e.stopPropagation())}up(e){var t;!this.viewport.pause&&this.viewport.worldVisible&&("mouse"===e.data.pointerType&&(this.isMouseDown=!1),"mouse"!==e.data.pointerType&&this.remove(e.data.pointerId),t=this.viewport.plugins.up(e),this.clickedAvailable&&0===this.count()&&this.last&&(this.viewport.emit("clicked",{event:e,screen:this.last,world:this.viewport.toWorld(this.last),viewport:this}),this.clickedAvailable=!1),t&&this.viewport.options.stopPropagation&&e.stopPropagation())}getPointerPosition(e){var t,i=new a.Point;return this.viewport.options.interaction?this.viewport.options.interaction.mapPositionToPoint(i,e.clientX,e.clientY):this.viewport.options.useDivWheelForInputManager&&this.viewport.options.divWheel?(t=this.viewport.options.divWheel.getBoundingClientRect(),i.x=e.clientX-t.left,i.y=e.clientY-t.top):(i.x=e.clientX,i.y=e.clientY),i}handleWheel(e){var t;this.viewport.pause||!this.viewport.worldVisible||this.viewport.options.interaction&&this.viewport.options.interaction.interactionDOMElement!==e.target||(t=this.viewport.toLocal(this.getPointerPosition(e)),this.viewport.left<=t.x&&t.x<=this.viewport.right&&this.viewport.top<=t.y&&t.y<=this.viewport.bottom&&this.viewport.plugins.wheel(e)&&!this.viewport.options.passiveWheel&&e.preventDefault())}pause(){this.touches=[],this.isMouseDown=!1}get(e){for(const t of this.touches)if(t.id===e)return t;return null}remove(t){for(let e=0;ei.call(t,...e)),t=void 0)}return i}const I=["drag","pinch","wheel","follow","mouse-edges","decelerate","animate","bounce","snap-zoom","clamp-zoom","snap","clamp"];class D{constructor(e){this.viewport=e,this.list=[],this.plugins={}}add(e,t,i=I.length){this.plugins[e]=t;t=I.indexOf(e);-1!==t&&I.splice(t,1),I.splice(i,0,e),this.sort()}get(t,e){return e&&M([this,"access",e=>e.plugins,"access",e=>e[t],"optionalAccess",e=>e.paused])?null:this.plugins[t]}update(e){for(const t of this.list)t.update(e)}resize(){for(const e of this.list)e.resize()}reset(){for(const e of this.list)e.reset()}removeAll(){this.plugins={},this.sort()}remove(e){this.plugins[e]&&(delete this.plugins[e],this.viewport.emit(e+"-remove"),this.sort())}pause(t){M([this,"access",e=>e.plugins,"access",e=>e[t],"optionalAccess",e=>e.pause,"call",e=>e()])}resume(t){M([this,"access",e=>e.plugins,"access",e=>e[t],"optionalAccess",e=>e.resume,"call",e=>e()])}sort(){this.list=[];for(const e of I)this.plugins[e]&&this.list.push(this.plugins[e])}down(e){let t=!1;for(const i of this.list)i.down(e)&&(t=!0);return t}move(e){let t=!1;for(const i of this.viewport.plugins.list)i.move(e)&&(t=!0);return t}up(e){let t=!1;for(const i of this.list)i.up(e)&&(t=!0);return t}wheel(e){let t=!1;for(const i of this.list)i.wheel(e)&&(t=!0);return t}}const U={screenWidth:window.innerWidth,screenHeight:window.innerHeight,worldWidth:null,worldHeight:null,threshold:5,passiveWheel:!0,stopPropagation:!1,forceHitArea:null,noTicker:!1,interaction:null,disableOnContextMenu:!1,ticker:i.Ticker.shared};class L extends t.Container{__init(){this._disableOnContextMenu=e=>e.preventDefault()}constructor(e={}){super(),L.prototype.__init.call(this),this.options=Object.assign({},{divWheel:document.body},U,e),this.screenWidth=this.options.screenWidth,this.screenHeight=this.options.screenHeight,this._worldWidth=this.options.worldWidth,this._worldHeight=this.options.worldHeight,this.forceHitArea=this.options.forceHitArea,this.threshold=this.options.threshold,this.options.divWheel=this.options.divWheel||document.body,this.options.disableOnContextMenu&&this.options.divWheel.addEventListener("contextmenu",this._disableOnContextMenu),this.options.noTicker||(this.tickerFunction=()=>this.update(this.options.ticker.elapsedMS),this.options.ticker.add(this.tickerFunction)),this.input=new C(this),this.plugins=new D(this)}destroy(e){!this.options.noTicker&&this.tickerFunction&&this.options.ticker.remove(this.tickerFunction),this.options.disableOnContextMenu&&this.options.divWheel.removeEventListener("contextmenu",this._disableOnContextMenu),this.input.destroy(),super.destroy(e)}update(e){this.pause||(this.plugins.update(e),this.lastViewport&&(this.lastViewport.x!==this.x||this.lastViewport.y!==this.y?this.moving=!0:this.moving&&(this.emit("moved-end",this),this.moving=!1),this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y?this.zooming=!0:this.zooming&&(this.emit("zoomed-end",this),this.zooming=!1)),this.forceHitArea||(this._hitAreaDefault=new a.Rectangle(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight),this.hitArea=this._hitAreaDefault),this._dirty=this._dirty||!this.lastViewport||this.lastViewport.x!==this.x||this.lastViewport.y!==this.y||this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y,this.lastViewport={x:this.x,y:this.y,scaleX:this.scale.x,scaleY:this.scale.y},this.emit("frame-end",this))}resize(e=window.innerWidth,t=window.innerHeight,i,r){this.screenWidth=e,this.screenHeight=t,void 0!==i&&(this._worldWidth=i),void 0!==r&&(this._worldHeight=r),this.plugins.resize(),this.dirty=!0}get worldWidth(){return this._worldWidth||this.width/this.scale.x}set worldWidth(e){this._worldWidth=e,this.plugins.resize()}get worldHeight(){return this._worldHeight||this.height/this.scale.y}set worldHeight(e){this._worldHeight=e,this.plugins.resize()}getVisibleBounds(){return new a.Rectangle(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight)}toWorld(e,t){return 2===arguments.length?this.toLocal(new a.Point(e,t)):this.toLocal(e)}toScreen(e,t){return 2===arguments.length?this.toGlobal(new a.Point(e,t)):this.toGlobal(e)}get worldScreenWidth(){return this.screenWidth/this.scale.x}get worldScreenHeight(){return this.screenHeight/this.scale.y}get screenWorldWidth(){return this.worldWidth*this.scale.x}get screenWorldHeight(){return this.worldHeight*this.scale.y}get center(){return new a.Point(this.worldScreenWidth/2-this.x/this.scale.x,this.worldScreenHeight/2-this.y/this.scale.y)}set center(e){this.moveCenter(e)}moveCenter(...e){let t,i;i="number"==typeof e[0]?(t=e[0],e[1]):(t=e[0].x,e[0].y);var e=(this.worldScreenWidth/2-t)*this.scale.x,r=(this.worldScreenHeight/2-i)*this.scale.y;return this.x===e&&this.y===r||(this.position.set(e,r),this.plugins.reset(),this.dirty=!0),this}get corner(){return new a.Point(-this.x/this.scale.x,-this.y/this.scale.y)}set corner(e){this.moveCorner(e)}moveCorner(...e){let t,i;return i=1===e.length?(t=-e[0].x*this.scale.x,-e[0].y*this.scale.y):(t=-e[0]*this.scale.x,-e[1]*this.scale.y),t===this.x&&i===this.y||(this.position.set(t,i),this.plugins.reset(),this.dirty=!0),this}get screenWidthInWorldPixels(){return this.screenWidth/this.scale.x}get screenHeightInWorldPixels(){return this.screenHeight/this.scale.y}findFitWidth(e){return this.screenWidth/e}findFitHeight(e){return this.screenHeight/e}findFit(e,t){e=this.screenWidth/e,t=this.screenHeight/t;return Math.min(e,t)}findCover(e,t){e=this.screenWidth/e,t=this.screenHeight/t;return Math.max(e,t)}fitWidth(e=this.worldWidth,t,i=!0,r){let n;t&&(n=this.center),this.scale.x=this.screenWidth/e,i&&(this.scale.y=this.scale.x);e=this.plugins.get("clamp-zoom",!0);return!r&&e&&e.clamp(),t&&n&&this.moveCenter(n),this}fitHeight(e=this.worldHeight,t,i=!0,r){let n;t&&(n=this.center),this.scale.y=this.screenHeight/e,i&&(this.scale.x=this.scale.y);e=this.plugins.get("clamp-zoom",!0);return!r&&e&&e.clamp(),t&&n&&this.moveCenter(n),this}fitWorld(e){let t;e&&(t=this.center),this.scale.x=this.screenWidth/this.worldWidth,this.scale.y=this.screenHeight/this.worldHeight,this.scale.xthis.worldWidth,top:this.top<0,bottom:this.bottom>this.worldHeight,cornerPoint:new a.Point(this.worldWidth*this.scale.x-this.screenWidth,this.worldHeight*this.scale.y-this.screenHeight)}}get right(){return-this.x/this.scale.x+this.worldScreenWidth}set right(e){this.x=-e*this.scale.x+this.screenWidth,this.plugins.reset()}get left(){return-this.x/this.scale.x}set left(e){this.x=-e*this.scale.x,this.plugins.reset()}get top(){return-this.y/this.scale.y}set top(e){this.y=-e*this.scale.y,this.plugins.reset()}get bottom(){return-this.y/this.scale.y+this.worldScreenHeight}set bottom(e){this.y=-e*this.scale.y+this.screenHeight,this.plugins.reset()}get dirty(){return!!this._dirty}set dirty(e){this._dirty=e}get forceHitArea(){return this._forceHitArea}set forceHitArea(e){e?(this._forceHitArea=e,this.hitArea=e):(this._forceHitArea=null,this.hitArea=new a.Rectangle(0,0,this.worldWidth,this.worldHeight))}drag(e){return this.plugins.add("drag",new T(this,e)),this}clamp(e){return this.plugins.add("clamp",new _(this,e)),this}decelerate(e){return this.plugins.add("decelerate",new b(this,e)),this}bounce(e){return this.plugins.add("bounce",new f(this,e)),this}pinch(e){return this.plugins.add("pinch",new k(this,e)),this}snap(e,t,i){return this.plugins.add("snap",new P(this,e,t,i)),this}follow(e,t){return this.plugins.add("follow",new E(this,e,t)),this}wheel(e){return this.plugins.add("wheel",new R(this,e)),this}animate(e){return this.plugins.add("animate",new c(this,e)),this}clampZoom(e){return this.plugins.add("clamp-zoom",new v(this,e)),this}mouseEdges(e){return this.plugins.add("mouse-edges",new A(this,e)),this}get pause(){return!!this._pause}set pause(e){this._pause=e,this.lastViewport=null,this.moving=!1,this.zooming=!1,e&&this.input.pause()}ensureVisible(e,t,i,r,n){n&&(i>this.worldScreenWidth||r>this.worldScreenHeight)&&(this.fit(!0,i,r),this.emit("zoomed",{viewport:this,type:"ensureVisible"}));let s=!1;ethis.right&&(this.right=e+i,s=!0),tthis.bottom&&(this.bottom=t+r,s=!0),s&&this.emit("moved",{viewport:this,type:"ensureVisible"})}}e.Animate=c,e.Bounce=f,e.Clamp=_,e.ClampZoom=v,e.Decelerate=b,e.Drag=T,e.Follow=E,e.InputManager=C,e.MouseEdges=A,e.Pinch=k,e.Plugin=r,e.PluginManager=D,e.Snap=P,e.SnapZoom=O,e.Viewport=L,e.Wheel=R,Object.defineProperty(e,"__esModule",{value:!0})}),"undefined"!=typeof pixi_viewport&&Object.assign(this.PIXI,pixi_viewport),!function(){"use strict";var h=new("undefined"==typeof WebKitCSSMatrix?DOMMatrix:WebKitCSSMatrix);function c(e,t,i){this.x=e,this.y=t,this.z=i}function r(e){for(var t=h,i=e;null!=i&&i!==i.ownerDocument.documentElement;)var r=window.getComputedStyle(i,void 0).transform||"none",t=("none"===r?h:function(t){try{return new("undefined"==typeof WebKitCSSMatrix?DOMMatrix:WebKitCSSMatrix)(t)}catch(e){return console.warn(t),console.warn(e.toString()),h}}(r)).multiply(t),i=i.parentNode;for(var n=e.offsetWidth,s=e.offsetHeight,o=4,a=1/0,l=1/0;0<=--o;){var u=new c(0===o||1===o?0:n,0===o||3===o?0:s,0).transformBy(t);u.xt&&(i[r]=this.hyphenate(i[r]).join("­"));return i.join("")},t.prototype.hyphenate=function(e){var t,i,r,n,s,o,a,l,u,h=[],c=[],p=e.toLowerCase(),d=Math.max,f=this.trie,m=[""];if(this.exceptions.hasOwnProperty(p))return e.match(this.exceptions[p]).slice(1);if(-1!==e.indexOf("­"))return[e];for(t=(e="_"+e+"_").toLowerCase().split(""),i=e.split(""),a=t.length,r=0;rthis.leftMin&&r= 0) { - var p = new Point(i === 0 || i === 1 ? 0 : w, i === 0 || i === 3 ? 0 : h, 0).transformBy( - transformationMatrix - ) - if (p.x < left) { - left = p.x - } - if (p.y < top) { - top = p.y - } - } - var rect = element.getBoundingClientRect() - transformationMatrix = I.translate( - window.pageXOffset + rect.left - left, - window.pageYOffset + rect.top - top, - 0 - ).multiply(transformationMatrix) - return transformationMatrix -} - -var convertPointFromPageToNode = function (element, pageX, pageY) { - return new Point(pageX, pageY, 0).transformBy(getTransformationMatrix(element).inverse()) -} - -var convertPointFromNodeToPage = function (element, offsetX, offsetY) { - return new Point(offsetX, offsetY, 0).transformBy(getTransformationMatrix(element)) -} - - - - - /** * A helper class for common set operations. *