text: /*! leaflet-realtime - v2.1.1 - 2019-04-08 */
  
  
  !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;((t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).L||(t.L={})).Realtime=e()}}(function(){return function s(o,u,a){function f(t,e){if(!u[t]){if(!o[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(h)return h(t,!0);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}var n=u[t]={exports:{}};o[t][0].call(n.exports,function(e){return f(o[t][1][e]||e)},n,n.exports,s,o,u,a)}return u[t].exports}for(var h="function"==typeof require&&require,e=0;e<a.length;e++)f(a[e]);return f}({1:[function(e,t,r){"use strict";L.Realtime=L.Layer.extend({options:{start:!0,interval:6e4,getFeatureId:function(e){return e.properties.id},updateFeature:function(e,t){if(t&&"Point"===e.geometry.type){var r=e.geometry.coordinates;return t.setLatLng([r[1],r[0]]),t}},logErrors:!0,cache:!1,removeMissing:!0},initialize:function(e,t){L.setOptions(this,t),this._container=t.container||L.geoJson(null,t),"function"==typeof e?this._src=e:(this._fetchOptions=e&&e.url?e:{url:e},this._src=L.bind(this._defaultSource,this)),this._features={},this._featureLayers={},this._requestCount=0},start:function(){return this._timer||(this._timer=setInterval(L.bind(this.update,this),this.options.interval),this.update()),this},stop:function(){return this._timer&&(clearTimeout(this._timer),delete this._timer),this},isRunning:function(){return this._timer},setUrl:function(e){if(!this._fetchOptions)throw new Error("Custom sources does not support setting URL.");this._fetchOptions.url=e,this.update()},update:function(e){var t,r,i=++this._requestCount,n=L.bind(function(e){return L.bind(function(){if(i===this._requestCount)return e.apply(this,arguments)},this)},this);return e?this._onNewData(!1,e):(t=L.bind(function(e){this._onNewData(this.options.removeMissing,e)},this),r=L.bind(this._onError,this),this._src(n(t),n(r))),this},remove:function(e){var t,r,i,n=L.Util.isArray(e)?e:e.features?e.features:[e],s={};for(t=0,r=n.length;t<r;t++)i=this.options.getFeatureId(n[t]),this._container.removeLayer(this._featureLayers[i]),s[i]=this._features[i],delete this._features[i],delete this._featureLayers[i];return this.fire("update",{features:this._features,enter:{},update:{},exit:s}),this},getLayer:function(e){return this._featureLayers[e]},getFeature:function(e){return this._features[e]},getBounds:function(){var e=this._container;if(e.getBounds)return e.getBounds();throw new Error("Container has no getBounds method")},onAdd:function(e){e.addLayer(this._container),this.options.start&&this.start()},onRemove:function(e){this.stop(),e.removeLayer(this._container)},_onNewData:function(e,t){var a,f,h,c=[],d={},l={},r={},_={},p=L.bind(function(e){var t=L.Util.isArray(e)?e:e.features;if(t)for(a=0,f=t.length;a<f;a++)((h=t[a]).geometries||h.geometry||h.features||h.coordinates)&&p(h);else{var r=this._container,i=this.options;if(!i.filter||i.filter(e)){var n=L.GeoJSON.asFeature(e),s=i.getFeatureId(n),o=this._featureLayers[s],u=this.options.updateFeature(n,o);if(!u){if(!(u=L.GeoJSON.geometryToLayer(e,i)))return;u.defaultOptions=u.options,u.feature=n,i.onEachFeature&&i.onEachFeature(e,u),i.style&&u.setStyle&&u.setStyle(i.style(e))}u.feature=n,r.resetStyle&&r.resetStyle(u),o?(l[s]=e,o!=u&&(c.push(o),r.addLayer(u))):(d[s]=e,r.addLayer(u)),this._featureLayers[s]=u,this._features[s]=_[s]=n}}},this);for(p(t),e&&(r=this._removeUnknown(_)),a=0;a<c.length;a++)this._container.removeLayer(c[a]);this.fire("update",{features:this._features,enter:d,update:l,exit:r})},_onError:function(e,t){this.options.logErrors&&console.warn(e,t),this.fire("error",{error:e,message:t})},_removeUnknown:function(e){var t,r={};for(t in this._featureLayers)e[t]||(this._container.removeLayer(this._featureLayers[t]),r[t]=this._features[t],delete this._featureLayers[t],delete this._features[t]);return r},_bustCache:function(e){return e+L.Util.getParamString({_:(new Date).getTime()},e)},_defaultSource:function(e,t){var r=this._fetchOptions,i=r.url;i=this.options.cache?i:this._bustCache(i),fetch(i,r).then(function(e){return e.json()}).then(e).catch(t)}}),L.realtime=function(e,t){return new L.Realtime(e,t)},t.exports=L.Realtime},{}]},{},[1])(1)});