/*! * * leaflet.motion - v0.1.5 (https://github.com/Igor-Vladyka/leaflet.motion#readme) * Animation plugin for Leaflet.js * * MIT (http://www.opensource.org/licenses/mit-license.php) * (c) 2019 Igor Vladyka (https://github.com/Igor-Vladyka/) * */!function(t){var n={};function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:i})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(e.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(i,o,function(n){return t[n]}.bind(null,o));return i},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=6)}([function(t,n){L.Motion.Seq=L.Motion.Group.extend({_activeLayer:null,motionStart:function(){var t=this.getFirstLayer();return t&&(this.__prepareStart(),t.motionStart(),this.fire(L.Motion.Event.Started,{layer:this},!1)),this},motionStop:function(){return this.invoke("motionStop"),this._activeLayer=null,this.fire(L.Motion.Event.Ended,{layer:this},!1),this},motionPause:function(){return this._activeLayer&&(this._activeLayer.motionPause(),this.fire(L.Motion.Event.Paused,{layer:this},!1)),this},motionResume:function(){return this._activeLayer&&(this._activeLayer.motionResume(),this.fire(L.Motion.Event.Resumed,{layer:this},!1)),this},motionToggle:function(){return this._activeLayer?this.motionPause():this.motionResume(),this},getFirstLayer:function(){var t=this.getLayers();return t.length?t[0]:null},__prepareStart:function(){var t=this;this.getLayers().forEach(function(n){n.off(L.Motion.Event.Ended,t.__clearActiveLayer__,t),n.on(L.Motion.Event.Ended,t.__clearActiveLayer__,t),n.off(L.Motion.Event.Started,t.__putActiveLayer__,t),n.on(L.Motion.Event.Started,t.__putActiveLayer__,t)})},__clearActiveLayer__:function(t){this._activeLayer=null;var n=this.getLayers(),e=t.layer._leaflet_id,i=n.filter(function(t){return t._leaflet_id==e})[0],o=n.indexOf(i)+1;n.length>o?n[o].motionStart():this.fire(L.Motion.Event.Ended,{layer:this},!1)},__putActiveLayer__:function(t){this._activeLayer=t.layer,this.fire(L.Motion.Event.Section,{layer:this._activeLayer},!1)}}),L.motion.seq=function(t,n){return new L.Motion.Seq(t,n)}},function(t,n){L.Motion.Group=L.FeatureGroup.extend({options:{pane:L.Motion.Animate.options.pane,attribution:L.Motion.Animate.options.attribution},motionStart:function(){return this.invoke("motionStart"),this.fire(L.Motion.Event.Started,{layer:this},!1),this},motionStop:function(){return this.invoke("motionStop"),this.fire(L.Motion.Event.Ended,{layer:this},!1),this},motionPause:function(){return this.invoke("motionPause"),this.fire(L.Motion.Event.Paused,{layer:this},!1),this},motionResume:function(){return this.invoke("motionResume"),this.fire(L.Motion.Event.Resumed,{layer:this},!1),this},motionToggle:function(){return this.invoke("motionToggle"),this},getMarkers:function(){return this.getLayers().map(function(t){return t.getMarkers()})}}),L.motion.group=function(t,n){return new L.Motion.Group(t,n)}},function(t,n){L.Motion.Polyline=L.Polyline.extend(L.Motion.Animate),L.motion.polyline=function(t,n,e,i){return new L.Motion.Polyline(t,n,e,i)}},function(t,n){L.Motion.Ease={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},easeInQuad:function(t,n,e,i,o){return i*(n/=o)*n+e},easeOutQuad:function(t,n,e,i,o){return-i*(n/=o)*(n-2)+e},easeInOutQuad:function(t,n,e,i,o){return(n/=o/2)<1?i/2*n*n+e:-i/2*(--n*(n-2)-1)+e},easeInCubic:function(t,n,e,i,o){return i*(n/=o)*n*n+e},easeOutCubic:function(t,n,e,i,o){return i*((n=n/o-1)*n*n+1)+e},easeInOutCubic:function(t,n,e,i,o){return(n/=o/2)<1?i/2*n*n*n+e:i/2*((n-=2)*n*n+2)+e},easeInQuart:function(t,n,e,i,o){return i*(n/=o)*n*n*n+e},easeOutQuart:function(t,n,e,i,o){return-i*((n=n/o-1)*n*n*n-1)+e},easeInOutQuart:function(t,n,e,i,o){return(n/=o/2)<1?i/2*n*n*n*n+e:-i/2*((n-=2)*n*n*n-2)+e},easeInQuint:function(t,n,e,i,o){return i*(n/=o)*n*n*n*n+e},easeOutQuint:function(t,n,e,i,o){return i*((n=n/o-1)*n*n*n*n+1)+e},easeInOutQuint:function(t,n,e,i,o){return(n/=o/2)<1?i/2*n*n*n*n*n+e:i/2*((n-=2)*n*n*n*n+2)+e},easeInSine:function(t,n,e,i,o){return-i*Math.cos(n/o*(Math.PI/2))+i+e},easeOutSine:function(t,n,e,i,o){return i*Math.sin(n/o*(Math.PI/2))+e},easeInOutSine:function(t,n,e,i,o){return-i/2*(Math.cos(Math.PI*n/o)-1)+e},easeInExpo:function(t,n,e,i,o){return 0==n?e:i*Math.pow(2,10*(n/o-1))+e},easeOutExpo:function(t,n,e,i,o){return n==o?e+i:i*(1-Math.pow(2,-10*n/o))+e},easeInOutExpo:function(t,n,e,i,o){return 0==n?e:n==o?e+i:(n/=o/2)<1?i/2*Math.pow(2,10*(n-1))+e:i/2*(2-Math.pow(2,-10*--n))+e},easeInCirc:function(t,n,e,i,o){return-i*(Math.sqrt(1-(n/=o)*n)-1)+e},easeOutCirc:function(t,n,e,i,o){return i*Math.sqrt(1-(n=n/o-1)*n)+e},easeInOutCirc:function(t,n,e,i,o){return(n/=o/2)<1?-i/2*(Math.sqrt(1-n*n)-1)+e:i/2*(Math.sqrt(1-(n-=2)*n)+1)+e},easeInElastic:function(t,n,e,i,o){var r=1.70158,a=0,s=i;if(0==n)return e;if(1==(n/=o))return e+i;if(a||(a=.3*o),s0&&(a+=r[s-1].distanceTo(r[s]));var u=a*e,h=0,l=0;for(s=0;l