New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-leaflet

Package Overview
Dependencies
Maintainers
1
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-leaflet - npm Package Compare versions

Comparing version 2.4.0 to 2.5.0

es/SVGOverlay.js

12

CHANGELOG.md

@@ -0,1 +1,13 @@

## v2.5.0 (2019-10-19)
- Added `SVGOverlay` component ([PR #630](https://github.com/PaulLeCam/react-leaflet/pull/630) by _fenech_).
- Added a `GeoJSON` with `Popup` example ([PR #608](https://github.com/PaulLeCam/react-leaflet/pull/608) by _hackleman_).
- Fixed wrongly injecting the `leaflet` parameter in the `WMSTileLayer` URL.
- [website] Added logo and branding guidelines ([PR #629](https://github.com/PaulLeCam/react-leaflet/pull/629) by _colbyfayock_).
- [website] Added `react-leaflet-enhanced-marker` plugin ([PR #610](https://github.com/PaulLeCam/react-leaflet/pull/610) by _ishaan6395_).
- [website] Added `leaflet-drift-marker` plugin ([PR #615](https://github.com/PaulLeCam/react-leaflet/pull/615) by _hugobarragon_).
- [website] Added `react-leaflet-street-view` plugin ([PR #616](https://github.com/PaulLeCam/react-leaflet/pull/616) by _ishaan6395_).
- [website] Removed unmaintained plugin `react-leaflet-rotatedmarker` plugin ([PR #617](https://github.com/PaulLeCam/react-leaflet/pull/617) by _verdie-g_).
- [website] Added `react-leaflet-d3-svg-overlay` plugin ([PR #628](https://github.com/PaulLeCam/react-leaflet/pull/628) by _johannesloetzsch_).
## v2.4.0 (2019-06-09)

@@ -2,0 +14,0 @@

2

dist/react-leaflet.min.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("leaflet"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","leaflet","react-dom"],t):t((e=e||self).ReactLeaflet={},e.React,e.L,e.ReactDOM)}(this,function(e,l,i,t){"use strict";var a="default"in l?l.default:l;function n(e,t){return e(t={exports:{}},t.exports),t.exports}var o,r=n(function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},t.apply(this,arguments)}e.exports=t}),s=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,l=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,i=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,p=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,c=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.memo"):60115,y=n?Symbol.for("react.lazy"):60116;function d(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case p:case f:case r:case i:case a:case h:return e;default:switch(e=e&&e.$$typeof){case u:case c:case s:return e;default:return t}}case y:case m:case l:return t}}}function v(e){return d(e)===f}t.typeOf=d,t.AsyncMode=p,t.ConcurrentMode=f,t.ContextConsumer=u,t.ContextProvider=s,t.Element=o,t.ForwardRef=c,t.Fragment=r,t.Lazy=y,t.Memo=m,t.Portal=l,t.Profiler=i,t.StrictMode=a,t.Suspense=h,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===f||e===i||e===a||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===s||e.$$typeof===u||e.$$typeof===c)},t.isAsyncMode=function(e){return v(e)||d(e)===p},t.isConcurrentMode=v,t.isContextConsumer=function(e){return d(e)===u},t.isContextProvider=function(e){return d(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return d(e)===c},t.isFragment=function(e){return d(e)===r},t.isLazy=function(e){return d(e)===y},t.isMemo=function(e){return d(e)===m},t.isPortal=function(e){return d(e)===l},t.isProfiler=function(e){return d(e)===i},t.isStrictMode=function(e){return d(e)===a},t.isSuspense=function(e){return d(e)===h}});(o=s)&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")&&o.default;s.typeOf,s.AsyncMode,s.ConcurrentMode,s.ContextConsumer,s.ContextProvider,s.Element,s.ForwardRef,s.Fragment,s.Lazy,s.Memo,s.Portal,s.Profiler,s.StrictMode,s.Suspense,s.isValidElementType,s.isAsyncMode,s.isConcurrentMode,s.isContextConsumer,s.isContextProvider,s.isElement,s.isForwardRef,s.isFragment,s.isLazy,s.isMemo,s.isPortal,s.isProfiler,s.isStrictMode,s.isSuspense;var u=n(function(e){e.exports=s}),p={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},f={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},c={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},h={};function m(e){return u.isMemo(e)?c:h[e.$$typeof]||p}h[u.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var y=Object.defineProperty,d=Object.getOwnPropertyNames,v=Object.getOwnPropertySymbols,E=Object.getOwnPropertyDescriptor,g=Object.getPrototypeOf,b=Object.prototype;function L(o){function e(t,n){return a.createElement(C,null,function(e){return a.createElement(o,r({},t,{leaflet:e,ref:n}))})}var t=o.displayName||o.name||"Component";e.displayName="Leaflet(".concat(t,")");var n=l.forwardRef(e);return O(n,o),n}var O=function e(t,n,o){if("string"==typeof n)return t;if(b){var l=g(n);l&&l!==b&&e(t,l,o)}var r=d(n);v&&(r=r.concat(v(n)));for(var a=m(t),i=m(n),s=0;s<r.length;++s){var u=r[s];if(!(f[u]||o&&o[u]||i&&i[u]||a&&a[u])){var p=E(n,u);try{y(t,u,p)}catch(e){}}}return t},k=l.createContext({}),C=k.Consumer,P=k.Provider;var x=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function w(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var S=function(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),e},M=n(function(t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=o=function(e){return n(e)}:t.exports=o=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},o(e)}t.exports=o});var _=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var j=function(e,t){return!t||"object"!==M(t)&&"function"!=typeof t?_(e):t},Z=n(function(t){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}t.exports=n}),U=n(function(n){function o(e,t){return n.exports=o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}n.exports=o});var V=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&U(e,t)};var D=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},T=function(e){function n(e){var t;return x(this,n),t=j(this,Z(n).call(this,e)),D(_(t),"leafletElement",void 0),t.leafletElement=t.createLeafletElement(t.props),t}return V(n,e),S(n,[{key:"createLeafletElement",value:function(e){throw new Error("createLeafletElement() must be implemented")}},{key:"updateLeafletElement",value:function(e,t){t.position!==e.position&&this.leafletElement.setPosition(t.position)}},{key:"componentDidMount",value:function(){this.leafletElement.addTo(this.props.leaflet.map)}},{key:"componentDidUpdate",value:function(e){this.updateLeafletElement(e,this.props)}},{key:"componentWillUnmount",value:function(){this.leafletElement.remove()}},{key:"render",value:function(){return null}}]),n}(l.Component),z=L(function(e){function t(){return x(this,t),j(this,Z(t).apply(this,arguments))}return V(t,T),S(t,[{key:"createLeafletElement",value:function(e){return new i.Control.Attribution(e)}}]),t}());var I=function(e,t){if(null==e)return{};var n,o,l={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],0<=t.indexOf(n)||(l[n]=e[n]);return l};var R=function(e,t){if(null==e)return{};var n,o,l=I(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l};var B=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(e){D(t,e,n[e])})}return t};function N(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var n,o,l,r=A(e),a=A(t);if(r&&a){if((o=e.length)!=t.length)return!1;for(n=o;0!=n--;)if(!N(e[n],t[n]))return!1;return!0}if(r!=a)return!1;var i=e instanceof Date,s=t instanceof Date;if(i!=s)return!1;if(i&&s)return e.getTime()==t.getTime();var u=e instanceof RegExp,p=t instanceof RegExp;if(u!=p)return!1;if(u&&p)return e.toString()==t.toString();var f=W(e);if((o=f.length)!==W(t).length)return!1;for(n=o;0!=n--;)if(!G.call(t,f[n]))return!1;for(n=o;0!=n--;)if(!N(e[l=f[n]],t[l]))return!1;return!0}return e!=e&&t!=t}var $=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Z(e)););return e},F=n(function(o){function l(e,t,n){return"undefined"!=typeof Reflect&&Reflect.get?o.exports=l=Reflect.get:o.exports=l=function(e,t,n){var o=$(e,t);if(o){var l=Object.getOwnPropertyDescriptor(o,t);return l.get?l.get.call(n):l.value}},l(e,t,n||e)}o.exports=l}),A=Array.isArray,W=Object.keys,G=Object.prototype.hasOwnProperty,q=/^on(.+)$/i,J=function(e){function n(e){var t;return x(this,n),t=j(this,Z(n).call(this,e)),D(_(t),"_leafletEvents",void 0),D(_(t),"leafletElement",void 0),t._leafletEvents=t.extractLeafletEvents(e),t}return V(n,e),S(n,[{key:"componentDidMount",value:function(){this.bindLeafletEvents(this._leafletEvents)}},{key:"componentDidUpdate",value:function(e){this._leafletEvents=this.bindLeafletEvents(this.extractLeafletEvents(this.props),this._leafletEvents)}},{key:"componentWillUnmount",value:function(){var t=this,n=this.leafletElement;n&&Object.keys(this._leafletEvents).forEach(function(e){n.off(e,t._leafletEvents[e])})}},{key:"extractLeafletEvents",value:function(n){return Object.keys(n).reduce(function(e,t){q.test(t)&&null!=n[t]&&(e[t.replace(q,function(e,t){return t.toLowerCase()})]=n[t]);return e},{})}},{key:"bindLeafletEvents",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=this.leafletElement;if(null==o||null==o.on)return{};var l=B({},n);return Object.keys(n).forEach(function(e){null!=t[e]&&n[e]===t[e]||(delete l[e],o.off(e,n[e]))}),Object.keys(t).forEach(function(e){null!=n[e]&&t[e]===n[e]||(l[e]=t[e],o.on(e,t[e]))}),l}},{key:"fireLeafletEvent",value:function(e,t){var n=this.leafletElement;n&&n.fire(e,t)}}]),n}(l.Component),H=function(e){function t(){return x(this,t),j(this,Z(t).apply(this,arguments))}return V(t,J),S(t,[{key:"getOptions",value:function(e){return null!=e.pane?e:null!=e.leaflet&&null!=e.leaflet.pane?B({},e,{pane:e.leaflet.pane}):e}}]),t}(),K=function(e){function n(e){var t;return x(this,n),t=j(this,Z(n).call(this,e)),D(_(t),"contextValue",void 0),D(_(t),"leafletElement",void 0),t.leafletElement=t.createLeafletElement(e),t}return V(n,H),S(n,[{key:"createLeafletElement",value:function(e){throw new Error("createLeafletElement() must be implemented")}},{key:"updateLeafletElement",value:function(e,t){}},{key:"componentDidMount",value:function(){F(Z(n.prototype),"componentDidMount",this).call(this),this.layerContainer.addLayer(this.leafletElement)}},{key:"componentDidUpdate",value:function(e){if(F(Z(n.prototype),"componentDidUpdate",this).call(this,e),this.props.attribution!==e.attribution){var t=this.props.leaflet.map;null!=t&&null!=t.attributionControl&&(t.attributionControl.removeAttribution(e.attribution),t.attributionControl.addAttribution(this.props.attribution))}this.updateLeafletElement(e,this.props)}},{key:"componentWillUnmount",value:function(){F(Z(n.prototype),"componentWillUnmount",this).call(this),this.layerContainer.removeLayer(this.leafletElement)}},{key:"render",value:function(){var e=this.props.children;return null==e?null:null==this.contextValue?a.createElement(l.Fragment,null,e):a.createElement(P,{value:this.contextValue},e)}},{key:"layerContainer",get:function(){return this.props.leaflet.layerContainer||this.props.leaflet.map}}]),n}();function Q(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"").split(" ").filter(Boolean)}function X(t,e){Q(e).forEach(function(e){i.DomUtil.addClass(t,e)})}function Y(t,e){Q(e).forEach(function(e){i.DomUtil.removeClass(t,e)})}function ee(e,t,n){null!=e&&n!==t&&(null!=t&&0<t.length&&Y(e,t),null!=n&&0<n.length&&X(e,n))}var te=["stroke","color","weight","opacity","lineCap","lineJoin","dashArray","dashOffset","fill","fillColor","fillOpacity","fillRule","bubblingMouseEvents","renderer","className","interactive","pane","attribution"],ne=function(e){function n(e){var t;return x(this,n),null==(t=j(this,Z(n).call(this,e))).contextValue&&(t.contextValue=B({},e.leaflet,{popupContainer:t.leafletElement})),t}return V(n,K),S(n,[{key:"componentDidUpdate",value:function(e){F(Z(n.prototype),"componentDidUpdate",this).call(this,e),this.setStyleIfChanged(e,this.props)}},{key:"getPathOptions",value:function(e){return function(n,e){return e.reduce(function(e,t){return n[t]&&(e[t]=n[t]),e},{})}(e,te)}},{key:"setStyle",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.leafletElement.setStyle(e)}},{key:"setStyleIfChanged",value:function(e,t){var n=this.getPathOptions(t);N(n,this.getPathOptions(e))||this.setStyle(n)}}]),n}(),oe=L(function(e){function t(){return x(this,t),j(this,Z(t).apply(this,arguments))}return V(t,ne),S(t,[{key:"createLeafletElement",value:function(e){var t=e.center,n=e.radius,o=R(e,["center","radius"]);return new i.Circle(t,n,this.getOptions(o))}},{key:"updateLeafletElement",value:function(e,t){t.center!==e.center&&this.leafletElement.setLatLng(t.center),t.radius!==e.radius&&this.leafletElement.setRadius(t.radius)}}]),t}()),le=L(function(e){function t(){return x(this,t),j(this,Z(t).apply(this,arguments))}return V(t,ne),S(t,[{key:"createLeafletElement",value:function(e){var t=new i.CircleMarker(e.center,this.getOptions(e));return this.contextValue=B({},e.leaflet,{popupContainer:t}),t}},{key:"updateLeafletElement",value:function(e,t){t.center!==e.center&&this.leafletElement.setLatLng(t.center),t.radius!==e.radius&&this.leafletElement.setRadius(t.radius)}}]),t}()),re=function(e){function n(e){var t;return x(this,n),t=j(this,Z(n).call(this,e)),D(_(t),"onClose",function(){t.props.onClose&&t.props.onClose()}),D(_(t),"onOpen",function(){t.forceUpdate(),t.props.onOpen&&t.props.onOpen()}),t.leafletElement=t.createLeafletElement(e),t}return V(n,H),S(n,[{key:"createLeafletElement",value:function(e){throw new Error("createLeafletElement() must be implemented")}},{key:"updateLeafletElement",value:function(e,t){}},{key:"componentDidUpdate",value:function(e){ee(this.leafletElement._container,e.className,this.props.className),this.updateLeafletElement(e,this.props),this.leafletElement.isOpen()&&(this.leafletElement.update(),this.onRender())}},{key:"onRender",value:function(){}},{key:"render",value:function(){return this.leafletElement._contentNode?t.createPortal(this.props.children,this.leafletElement._contentNode):null}}]),n}(),ae=L(function(e){function t(){return x(this,t),j(this,Z(t).apply(this,arguments))}return V(t,ne),S(t,[{key:"createLeafletElement",value:function(e){var t=new i.FeatureGroup(this.getOptions(e));return this.contextValue=B({},e.leaflet,{layerContainer:t,popupContainer:t}),t}},{key:"componentDidMount",value:function(){F(Z(t.prototype),"componentDidMount",this).call(this),this.setStyle(this.props)}}]),t}()),ie=L(function(e){function t(){return x(this,t),j(this,Z(t).apply(this,arguments))}return V(t,ne),S(t,[{key:"createLeafletElement",value:function(e){return new i.GeoJSON(e.data,this.getOptions(e))}},{key:"updateLeafletElement",value:function(e,t){"function"==typeof t.style?this.leafletElement.setStyle(t.style):this.setStyleIfChanged(e,t)}}]),t}()),se=function(e){function n(){return x(this,n),j(this,Z(n).apply(this,arguments))}return V(n,K),S(n,[{key:"createLeafletElement",value:function(e){return new i.GridLayer(this.getOptions(e))}},{key:"updateLeafletElement",value:function(e,t){var n=t.opacity,o=t.zIndex;n!==e.opacity&&this.leafletElement.setOpacity(n),o!==e.zIndex&&this.leafletElement.setZIndex(o)}},{key:"getOptions",value:function(e){var t=F(Z(n.prototype),"getOptions",this).call(this,e);return null==e.leaflet.map?t:B({maxZoom:e.leaflet.map.options.maxZoom,minZoom:e.leaflet.map.options.minZoom},t)}},{key:"render",value:function(){return null}}]),n}(),ue=L(function(e){function t(){return x(this,t),j(this,Z(t).apply(this,arguments))}return V(t,K),S(t,[{key:"createLeafletElement",value:function(e){var t=new i.ImageOverlay(e.url,e.bounds,this.getOptions(e));return this.contextValue=B({},e.leaflet,{popupContainer:t}),t}},{key:"updateLeafletElement",value:function(e,t){t.url!==e.url&&this.leafletElement.setUrl(t.url),t.bounds!==e.bounds&&this.leafletElement.setBounds(i.latLngBounds(t.bounds)),t.opacity!==e.opacity&&this.leafletElement.setOpacity(t.opacity),t.zIndex!==e.zIndex&&this.leafletElement.setZIndex(t.zIndex)}}]),t}()),pe=L(function(e){function t(){return x(this,t),j(this,Z(t).apply(this,arguments))}return V(t,K),S(t,[{key:"createLeafletElement",value:function(e){var t=new i.LayerGroup([],this.getOptions(e));return this.contextValue=B({},e.leaflet,{layerContainer:t}),t}}]),t}()),fe=function(e){function r(){var e,t;x(this,r);for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return t=j(this,(e=Z(r)).call.apply(e,[this].concat(o))),D(_(t),"contextValue",void 0),D(_(t),"layer",void 0),t}return V(r,e),S(r,[{key:"componentDidUpdate",value:function(e){var t=e.checked;null!=this.props.leaflet.map&&(!0!==this.props.checked||null!=t&&!1!==t?!0!==t||null!=this.props.checked&&!1!==this.props.checked||this.props.leaflet.map.removeLayer(this.layer):this.props.leaflet.map.addLayer(this.layer))}},{key:"componentWillUnmount",value:function(){this.props.removeLayerControl(this.layer)}},{key:"addLayer",value:function(){throw new Error("Must be implemented in extending class")}},{key:"removeLayer",value:function(e){this.props.removeLayer(e)}},{key:"render",value:function(){var e=this.props.children;return e?a.createElement(P,{value:this.contextValue},e):null}}]),r}(l.Component),ce=function(e){function t(e){var l;return x(this,t),l=j(this,Z(t).call(this,e)),D(_(l),"addLayer",function(e){l.layer=e;var t=l.props,n=t.addBaseLayer,o=t.checked;n(e,t.name,o)}),l.contextValue=B({},e.leaflet,{layerContainer:{addLayer:l.addLayer.bind(_(l)),removeLayer:l.removeLayer.bind(_(l))}}),l}return V(t,fe),t}(),he=function(e){function t(e){var l;return x(this,t),l=j(this,Z(t).call(this,e)),D(_(l),"addLayer",function(e){l.layer=e;var t=l.props,n=t.addOverlay,o=t.checked;n(e,t.name,o)}),l.contextValue=B({},e.leaflet,{layerContainer:{addLayer:l.addLayer.bind(_(l)),removeLayer:l.removeLayer.bind(_(l))}}),l}return V(t,fe),t}(),me=L(function(e){function n(e){var t;return x(this,n),t=j(this,Z(n).call(this,e)),D(_(t),"controlProps",void 0),t.controlProps={addBaseLayer:t.addBaseLayer.bind(_(t)),addOverlay:t.addOverlay.bind(_(t)),leaflet:e.leaflet,removeLayer:t.removeLayer.bind(_(t)),removeLayerControl:t.removeLayerControl.bind(_(t))},t}return V(n,T),S(n,[{key:"createLeafletElement",value:function(e){e.children;var t=R(e,["children"]);return new i.Control.Layers(void 0,void 0,t)}},{key:"updateLeafletElement",value:function(e,t){F(Z(n.prototype),"updateLeafletElement",this).call(this,e,t),t.collapsed!==e.collapsed&&(!0===t.collapsed?this.leafletElement.collapse():this.leafletElement.expand())}},{key:"componentWillUnmount",value:function(){var e=this;setTimeout(function(){F(Z(n.prototype),"componentWillUnmount",e).call(e)},0)}},{key:"addBaseLayer",value:function(e,t){2<arguments.length&&void 0!==arguments[2]&&arguments[2]&&null!=this.props.leaflet.map&&this.props.leaflet.map.addLayer(e),this.leafletElement.addBaseLayer(e,t)}},{key:"addOverlay",value:function(e,t){2<arguments.length&&void 0!==arguments[2]&&arguments[2]&&null!=this.props.leaflet.map&&this.props.leaflet.map.addLayer(e),this.leafletElement.addOverlay(e,t)}},{key:"removeLayer",value:function(e){null!=this.props.leaflet.map&&this.props.leaflet.map.removeLayer(e)}},{key:"removeLayerControl",value:function(e){this.leafletElement.removeLayer(e)}},{key:"render",value:function(){var t=this,e=l.Children.map(this.props.children,function(e){return e?l.cloneElement(e,t.controlProps):null});return a.createElement(l.Fragment,null,e)}}]),n}());function ye(n){for(var e=arguments.length,o=new Array(1<e?e-1:0),t=1;t<e;t++)o[t-1]=arguments[t];return Object.keys(n).reduce(function(e,t){return-1===o.indexOf(t)&&(e[t]=n[t]),e},{})}me.BaseLayer=ce,me.Overlay=he;function de(e){return Array.isArray(e)?[e[0],e[1]]:[e.lat,e.lon?e.lon:e.lng]}var ve=["children","className","id","style","useFlyTo","whenReady"],Ee=function(e){function n(e){var t;return x(this,n),t=j(this,Z(n).call(this,e)),D(_(t),"className",void 0),D(_(t),"contextValue",void 0),D(_(t),"container",void 0),D(_(t),"viewport",{center:void 0,zoom:void 0}),D(_(t),"_ready",!1),D(_(t),"_updating",!1),D(_(t),"onViewportChange",function(){var e=t.leafletElement.getCenter();t.viewport={center:e?[e.lat,e.lng]:void 0,zoom:t.leafletElement.getZoom()},t.props.onViewportChange&&!t._updating&&t.props.onViewportChange(t.viewport)}),D(_(t),"onViewportChanged",function(){t.props.onViewportChanged&&!t._updating&&t.props.onViewportChanged(t.viewport)}),D(_(t),"bindContainer",function(e){t.container=e}),t.className=e.className,t}return V(n,J),S(n,[{key:"createLeafletElement",value:function(e){var t=e.viewport,n=R(e,["viewport"]);return t&&(t.center&&(n.center=t.center),"number"==typeof t.zoom&&(n.zoom=t.zoom)),new i.Map(this.container,n)}},{key:"updateLeafletElement",value:function(e,t){this._updating=!0;var n=t.bounds,o=t.boundsOptions,l=t.boxZoom,r=t.center,a=t.className,i=t.doubleClickZoom,s=t.dragging,u=t.keyboard,p=t.maxBounds,f=t.scrollWheelZoom,c=t.tap,h=t.touchZoom,m=t.useFlyTo,y=t.viewport,d=t.zoom;if(ee(this.container,e.className,a),y&&y!==e.viewport){var v=y.center?y.center:r,E=null==y.zoom?d:y.zoom;!0===m?this.leafletElement.flyTo(v,E,this.getZoomPanOptions(t)):this.leafletElement.setView(v,E,this.getZoomPanOptions(t))}else r&&this.shouldUpdateCenter(r,e.center)?!0===m?this.leafletElement.flyTo(r,d,this.getZoomPanOptions(t)):this.leafletElement.setView(r,d,this.getZoomPanOptions(t)):"number"==typeof d&&d!==e.zoom&&(null==e.zoom?this.leafletElement.setView(r,d,this.getZoomPanOptions(t)):this.leafletElement.setZoom(d,this.getZoomPanOptions(t)));p&&this.shouldUpdateBounds(p,e.maxBounds)&&this.leafletElement.setMaxBounds(p),n&&(this.shouldUpdateBounds(n,e.bounds)||o!==e.boundsOptions)&&(!0===m?this.leafletElement.flyToBounds(n,this.getFitBoundsOptions(t)):this.leafletElement.fitBounds(n,this.getFitBoundsOptions(t))),l!==e.boxZoom&&(!0===l?this.leafletElement.boxZoom.enable():this.leafletElement.boxZoom.disable()),i!==e.doubleClickZoom&&(!0===i?this.leafletElement.doubleClickZoom.enable():this.leafletElement.doubleClickZoom.disable()),s!==e.dragging&&(!0===s?this.leafletElement.dragging.enable():this.leafletElement.dragging.disable()),u!==e.keyboard&&(!0===u?this.leafletElement.keyboard.enable():this.leafletElement.keyboard.disable()),f!==e.scrollWheelZoom&&(!0===f||"string"==typeof f?(this.leafletElement.options.scrollWheelZoom=f,this.leafletElement.scrollWheelZoom.enable()):this.leafletElement.scrollWheelZoom.disable()),c!==e.tap&&(!0===c?this.leafletElement.tap.enable():this.leafletElement.tap.disable()),h!==e.touchZoom&&(!0===h||"string"==typeof h?(this.leafletElement.options.touchZoom=h,this.leafletElement.touchZoom.enable()):this.leafletElement.touchZoom.disable()),this._updating=!1}},{key:"getZoomPanOptions",value:function(e){return{animate:e.animate,duration:e.duration,easeLinearity:e.easeLinearity,noMoveStart:e.noMoveStart}}},{key:"getFitBoundsOptions",value:function(e){var t=this.getZoomPanOptions(e);return B({},t,e.boundsOptions)}},{key:"componentDidMount",value:function(){var e=ye.apply(void 0,[this.props].concat(ve));this.leafletElement=this.createLeafletElement(e),this.leafletElement.on("move",this.onViewportChange),this.leafletElement.on("moveend",this.onViewportChanged),null!=e.bounds&&this.leafletElement.fitBounds(e.bounds,this.getFitBoundsOptions(e)),this.contextValue={layerContainer:this.leafletElement,map:this.leafletElement},F(Z(n.prototype),"componentDidMount",this).call(this),this.forceUpdate()}},{key:"componentDidUpdate",value:function(e){!1===this._ready&&(this._ready=!0,this.props.whenReady&&this.leafletElement.whenReady(this.props.whenReady)),F(Z(n.prototype),"componentDidUpdate",this).call(this,e),this.updateLeafletElement(e,this.props)}},{key:"componentWillUnmount",value:function(){F(Z(n.prototype),"componentWillUnmount",this).call(this),this.leafletElement.off("move",this.onViewportChange),this.leafletElement.off("moveend",this.onViewportChanged),!0===this.props.preferCanvas?(this.leafletElement._initEvents(!0),this.leafletElement._stop()):this.leafletElement.remove()}},{key:"shouldUpdateCenter",value:function(e,t){return!t||(e=de(e),t=de(t),e[0]!==t[0]||e[1]!==t[1])}},{key:"shouldUpdateBounds",value:function(e,t){return!t||!i.latLngBounds(e).equals(i.latLngBounds(t))}},{key:"render",value:function(){return a.createElement("div",{className:this.className,id:this.props.id,ref:this.bindContainer,style:this.props.style},this.contextValue?a.createElement(P,{value:this.contextValue},this.props.children):null)}}]),n}(),ge=L(function(e){function t(){return x(this,t),j(this,Z(t).apply(this,arguments))}return V(t,K),S(t,[{key:"createLeafletElement",value:function(e){var t=new i.Marker(e.position,this.getOptions(e));return this.contextValue=B({},e.leaflet,{popupContainer:t}),t}},{key:"updateLeafletElement",value:function(e,t){t.position!==e.position&&this.leafletElement.setLatLng(t.position),t.icon!==e.icon&&this.leafletElement.setIcon(t.icon),t.zIndexOffset!==e.zIndexOffset&&this.leafletElement.setZIndexOffset(t.zIndexOffset),t.opacity!==e.opacity&&this.leafletElement.setOpacity(t.opacity),t.draggable!==e.draggable&&(!0===t.draggable?this.leafletElement.dragging.enable():this.leafletElement.dragging.disable())}},{key:"render",value:function(){var e=this.props.children;return null==e||null==this.contextValue?null:a.createElement(P,{value:this.contextValue},e)}}]),t}()),be=0,Le=["tile","shadow","overlay","map","marker","tooltip","popup"],Oe=/-*pane/gi,ke={position:"absolute",top:0,right:0,bottom:0,left:0},Ce=L(function(e){function r(){var e,l;x(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return l=j(this,(e=Z(r)).call.apply(e,[this].concat(n))),D(_(l),"state",{name:void 0,context:void 0}),D(_(l),"setStyle",function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:l.props,t=e.style,n=e.className,o=l.getPane(l.state.name);o&&(n&&X(o,n),t&&Object.keys(t).forEach(function(e){o.style[e]=t[e]}))}),l}return V(r,e),S(r,[{key:"componentDidMount",value:function(){this.createPane(this.props)}},{key:"componentDidUpdate",value:function(e){if(this.state.name)if(this.props.name!==e.name)this.removePane(),this.createPane(this.props);else{if(e.className&&this.props.className!==e.className){var t=this.getPane(this.state.name);null!=t&&null!=e.className&&Y(t,e.className)}this.setStyle(this.props)}}},{key:"componentWillUnmount",value:function(){this.removePane()}},{key:"createPane",value:function(e){var t=e.leaflet.map,n=e.name||"pane-".concat(++be);null!=t&&null!=t.createPane&&(null==(function(e){return-1!==Le.indexOf(e.replace(Oe,""))}(n)||this.getPane(n))&&t.createPane(n,this.getParentPane()),this.setState({name:n,context:B({},e.leaflet,{pane:n})},this.setStyle))}},{key:"removePane",value:function(){var e=this.state.name;if(null!=e){var t=this.getPane(e);null!=t&&t.remove&&t.remove();var n=this.props.leaflet.map;null!=n&&null!=n._panes&&(n._panes=ye(n._panes,e),n._paneRenderers=ye(n._paneRenderers,e))}}},{key:"getParentPane",value:function(){return this.getPane(this.props.pane||this.props.leaflet.pane)}},{key:"getPane",value:function(e){if(null!=e&&null!=this.props.leaflet.map)return this.props.leaflet.map.getPane(e)}},{key:"render",value:function(){var e=this.state.context;return e?a.createElement(P,{value:e},a.createElement("div",{style:ke},this.props.children)):null}}]),r}(l.Component)),Pe=L(function(e){function t(){return x(this,t),j(this,Z(t).apply(this,arguments))}return V(t,ne),S(t,[{key:"createLeafletElement",value:function(e){return new i.Polygon(e.positions,this.getOptions(e))}},{key:"updateLeafletElement",value:function(e,t){t.positions!==e.positions&&this.leafletElement.setLatLngs(t.positions),this.setStyleIfChanged(e,t)}}]),t}()),xe=L(function(e){function t(){return x(this,t),j(this,Z(t).apply(this,arguments))}return V(t,ne),S(t,[{key:"createLeafletElement",value:function(e){return new i.Polyline(e.positions,this.getOptions(e))}},{key:"updateLeafletElement",value:function(e,t){t.positions!==e.positions&&this.leafletElement.setLatLngs(t.positions),this.setStyleIfChanged(e,t)}}]),t}()),we=function(e){function r(){var e,t;x(this,r);for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return t=j(this,(e=Z(r)).call.apply(e,[this].concat(o))),D(_(t),"onPopupOpen",function(e){e.popup===t.leafletElement&&t.onOpen()}),D(_(t),"onPopupClose",function(e){e.popup===t.leafletElement&&t.onClose()}),D(_(t),"onRender",function(){!1!==t.props.autoPan&&t.leafletElement.isOpen()&&(t.leafletElement._map&&t.leafletElement._map._panAnim&&(t.leafletElement._map._panAnim=void 0),t.leafletElement._adjustPan())}),t}return V(r,re),S(r,[{key:"getOptions",value:function(e){return B({},F(Z(r.prototype),"getOptions",this).call(this,e),{autoPan:!1})}},{key:"createLeafletElement",value:function(e){var t=this.getOptions(e);return t.autoPan=!1!==e.autoPan,new i.Popup(t,e.leaflet.popupContainer)}},{key:"updateLeafletElement",value:function(e,t){t.position!==e.position&&this.leafletElement.setLatLng(t.position)}},{key:"componentDidMount",value:function(){var e=this.props.position,t=this.props.leaflet,n=t.map,o=t.popupContainer,l=this.leafletElement;null!=n&&n.on({popupopen:this.onPopupOpen,popupclose:this.onPopupClose}),o?o.bindPopup(l):(e&&l.setLatLng(e),l.openOn(n))}},{key:"componentWillUnmount",value:function(){var e=this.props.leaflet.map;null!=e&&(e.off({popupopen:this.onPopupOpen,popupclose:this.onPopupClose}),e.removeLayer(this.leafletElement)),F(Z(r.prototype),"componentWillUnmount",this).call(this)}}]),r}();D(we,"defaultProps",{pane:"popupPane"});var Se=L(we),Me=L(function(e){function t(){return x(this,t),j(this,Z(t).apply(this,arguments))}return V(t,ne),S(t,[{key:"createLeafletElement",value:function(e){return new i.Rectangle(e.bounds,this.getOptions(e))}},{key:"updateLeafletElement",value:function(e,t){t.bounds!==e.bounds&&this.leafletElement.setBounds(t.bounds),this.setStyleIfChanged(e,t)}}]),t}()),_e=L(function(e){function t(){return x(this,t),j(this,Z(t).apply(this,arguments))}return V(t,T),S(t,[{key:"createLeafletElement",value:function(e){return new i.Control.Scale(e)}}]),t}()),je=L(function(e){function n(){return x(this,n),j(this,Z(n).apply(this,arguments))}return V(n,se),S(n,[{key:"createLeafletElement",value:function(e){return new i.TileLayer(e.url,this.getOptions(e))}},{key:"updateLeafletElement",value:function(e,t){F(Z(n.prototype),"updateLeafletElement",this).call(this,e,t),t.url!==e.url&&this.leafletElement.setUrl(t.url)}}]),n}()),Ze=function(e){function r(){var e,t;x(this,r);for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return t=j(this,(e=Z(r)).call.apply(e,[this].concat(o))),D(_(t),"onTooltipOpen",function(e){e.tooltip===t.leafletElement&&t.onOpen()}),D(_(t),"onTooltipClose",function(e){e.tooltip===t.leafletElement&&t.onClose()}),t}return V(r,re),S(r,[{key:"createLeafletElement",value:function(e){return new i.Tooltip(this.getOptions(e),e.leaflet.popupContainer)}},{key:"componentDidMount",value:function(){var e=this.props.leaflet.popupContainer;null!=e&&(e.on({tooltipopen:this.onTooltipOpen,tooltipclose:this.onTooltipClose}),e.bindTooltip(this.leafletElement))}},{key:"componentWillUnmount",value:function(){var e=this.props.leaflet.popupContainer;null!=e&&(e.off({tooltipopen:this.onTooltipOpen,tooltipclose:this.onTooltipClose}),null!=e._map&&e.unbindTooltip(this.leafletElement))}}]),r}();D(Ze,"defaultProps",{pane:"tooltipPane"});var Ue=L(Ze),Ve=L(function(e){function t(){return x(this,t),j(this,Z(t).apply(this,arguments))}return V(t,K),S(t,[{key:"createLeafletElement",value:function(e){return new i.VideoOverlay(e.url,e.bounds,this.getOptions(e))}},{key:"componentDidMount",value:function(){F(Z(t.prototype),"componentDidMount",this).call(this),!0===this.props.play&&this.leafletElement.getElement().play()}},{key:"updateLeafletElement",value:function(e,t){t.url!==e.url&&this.leafletElement.setUrl(t.url),t.bounds!==e.bounds&&this.leafletElement.setBounds(i.latLngBounds(t.bounds)),t.opacity!==e.opacity&&this.leafletElement.setOpacity(t.opacity),t.zIndex!==e.zIndex&&this.leafletElement.setZIndex(t.zIndex),!0!==t.play||e.play?t.play||!0!==e.play||this.leafletElement.getElement().pause():this.leafletElement.getElement().play()}}]),t}()),De=L(function(e){function a(){return x(this,a),j(this,Z(a).apply(this,arguments))}return V(a,se),S(a,[{key:"createLeafletElement",value:function(e){var t=e.url,n=R(e,["url"]);return new i.TileLayer.WMS(t,this.getOptions(n))}},{key:"updateLeafletElement",value:function(e,t){F(Z(a.prototype),"updateLeafletElement",this).call(this,e,t);var n=e.url,o=(e.opacity,e.zIndex,R(e,["url","opacity","zIndex"])),l=t.url,r=(t.opacity,t.zIndex,R(t,["url","opacity","zIndex"]));l!==n&&this.leafletElement.setUrl(l),N(r,o)||this.leafletElement.setParams(r)}},{key:"getOptions",value:function(e){var n=F(Z(a.prototype),"getOptions",this).call(this,e);return Object.keys(n).reduce(function(e,t){return q.test(t)||(e[t]=n[t]),e},{})}}]),a}()),Te=L(function(e){function t(){return x(this,t),j(this,Z(t).apply(this,arguments))}return V(t,T),S(t,[{key:"createLeafletElement",value:function(e){return new i.Control.Zoom(e)}}]),t}());e.AttributionControl=z,e.Circle=oe,e.CircleMarker=le,e.ControlledLayer=fe,e.DivOverlay=re,e.FeatureGroup=ae,e.GeoJSON=ie,e.GridLayer=se,e.ImageOverlay=ue,e.LayerGroup=pe,e.LayersControl=me,e.LeafletConsumer=C,e.LeafletProvider=P,e.Map=Ee,e.MapComponent=H,e.MapControl=T,e.MapEvented=J,e.MapLayer=K,e.Marker=ge,e.Pane=Ce,e.Path=ne,e.Polygon=Pe,e.Polyline=xe,e.Popup=Se,e.Rectangle=Me,e.ScaleControl=_e,e.TileLayer=je,e.Tooltip=Ue,e.VideoOverlay=Ve,e.WMSTileLayer=De,e.ZoomControl=Te,e.useLeaflet=function(){return l.useContext(k)},e.withLeaflet=L,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("leaflet"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","leaflet","react-dom"],t):t((e=e||self).ReactLeaflet={},e.React,e.L,e.ReactDOM)}(this,function(e,o,i,t){"use strict";var a="default"in o?o.default:o;function n(e,t){return e(t={exports:{}},t.exports),t.exports}var r,l=n(function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}e.exports=t}),s=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,l=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,p=n?Symbol.for("react.async_mode"):60111,c=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,y=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116;function d(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case p:case c:case l:case a:case i:case y:return e;default:switch(e=e&&e.$$typeof){case u:case f:case s:return e;default:return t}}case m:case h:case o:return t}}}function v(e){return d(e)===c}t.typeOf=d,t.AsyncMode=p,t.ConcurrentMode=c,t.ContextConsumer=u,t.ContextProvider=s,t.Element=r,t.ForwardRef=f,t.Fragment=l,t.Lazy=m,t.Memo=h,t.Portal=o,t.Profiler=a,t.StrictMode=i,t.Suspense=y,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===l||e===c||e===a||e===i||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===s||e.$$typeof===u||e.$$typeof===f)},t.isAsyncMode=function(e){return v(e)||d(e)===p},t.isConcurrentMode=v,t.isContextConsumer=function(e){return d(e)===u},t.isContextProvider=function(e){return d(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return d(e)===f},t.isFragment=function(e){return d(e)===l},t.isLazy=function(e){return d(e)===m},t.isMemo=function(e){return d(e)===h},t.isPortal=function(e){return d(e)===o},t.isProfiler=function(e){return d(e)===a},t.isStrictMode=function(e){return d(e)===i},t.isSuspense=function(e){return d(e)===y}});(r=s)&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")&&r.default;s.typeOf,s.AsyncMode,s.ConcurrentMode,s.ContextConsumer,s.ContextProvider,s.Element,s.ForwardRef,s.Fragment,s.Lazy,s.Memo,s.Portal,s.Profiler,s.StrictMode,s.Suspense,s.isValidElementType,s.isAsyncMode,s.isConcurrentMode,s.isContextConsumer,s.isContextProvider,s.isElement,s.isForwardRef,s.isFragment,s.isLazy,s.isMemo,s.isPortal,s.isProfiler,s.isStrictMode,s.isSuspense;var u=n(function(e){e.exports=s}),p={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},c={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},f={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},y={};function h(e){return u.isMemo(e)?f:y[e.$$typeof]||p}y[u.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var m=Object.defineProperty,d=Object.getOwnPropertyNames,v=Object.getOwnPropertySymbols,b=Object.getOwnPropertyDescriptor,O=Object.getPrototypeOf,g=Object.prototype;function E(r){function e(t,n){return a.createElement(j,null,function(e){return a.createElement(r,l({},t,{leaflet:e,ref:n}))})}var t=r.displayName||r.name||"Component";e.displayName="Leaflet(".concat(t,")");var n=o.forwardRef(e);return P(n,r),n}var P=function e(t,n,r){if("string"==typeof n)return t;if(g){var o=O(n);o&&o!==g&&e(t,o,r)}var l=d(n);v&&(l=l.concat(v(n)));for(var i=h(t),a=h(n),s=0;s<l.length;++s){var u=l[s];if(!(c[u]||r&&r[u]||a&&a[u]||i&&i[u])){var p=b(n,u);try{m(t,u,p)}catch(e){}}}return t},w=o.createContext({}),j=w.Consumer,k=w.Provider;var L=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var x=function(e,t,n){return t&&C(e.prototype,t),n&&C(e,n),e},S=n(function(t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=r=function(e){return n(e)}:t.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(e)}t.exports=r});var D=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var M=function(e,t){return!t||"object"!==S(t)&&"function"!=typeof t?D(e):t},_=n(function(t){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}t.exports=n}),U=n(function(n){function r(e,t){return n.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}n.exports=r});var V=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&U(e,t)};var Z=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},z=function(e){function n(e){var t;return L(this,n),t=M(this,_(n).call(this,e)),Z(D(t),"leafletElement",void 0),t.leafletElement=t.createLeafletElement(t.props),t}return V(n,e),x(n,[{key:"createLeafletElement",value:function(e){throw new Error("createLeafletElement() must be implemented")}},{key:"updateLeafletElement",value:function(e,t){t.position!==e.position&&this.leafletElement.setPosition(t.position)}},{key:"componentDidMount",value:function(){this.leafletElement.addTo(this.props.leaflet.map)}},{key:"componentDidUpdate",value:function(e){this.updateLeafletElement(e,this.props)}},{key:"componentWillUnmount",value:function(){this.leafletElement.remove()}},{key:"render",value:function(){return null}}]),n}(o.Component),I=E(function(e){function t(){return L(this,t),M(this,_(t).apply(this,arguments))}return V(t,z),x(t,[{key:"createLeafletElement",value:function(e){return new i.Control.Attribution(e)}}]),t}());var T=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],0<=t.indexOf(n)||(o[n]=e[n]);return o};var R=function(e,t){if(null==e)return{};var n,r,o=T(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o};function B(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var n,r,o,l=A(e),i=A(t);if(l&&i){if((r=e.length)!=t.length)return!1;for(n=r;0!=n--;)if(!B(e[n],t[n]))return!1;return!0}if(l!=i)return!1;var a=e instanceof Date,s=t instanceof Date;if(a!=s)return!1;if(a&&s)return e.getTime()==t.getTime();var u=e instanceof RegExp,p=t instanceof RegExp;if(u!=p)return!1;if(u&&p)return e.toString()==t.toString();var c=W(e);if((r=c.length)!==W(t).length)return!1;for(n=r;0!=n--;)if(!F.call(t,c[n]))return!1;for(n=r;0!=n--;)if(!B(e[o=c[n]],t[o]))return!1;return!0}return e!=e&&t!=t}var N=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_(e)););return e},$=n(function(r){function o(e,t,n){return"undefined"!=typeof Reflect&&Reflect.get?r.exports=o=Reflect.get:r.exports=o=function(e,t,n){var r=N(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}},o(e,t,n||e)}r.exports=o}),A=Array.isArray,W=Object.keys,F=Object.prototype.hasOwnProperty;function G(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}var q=/^on(.+)$/i,J=function(e){function n(e){var t;return L(this,n),t=M(this,_(n).call(this,e)),Z(D(t),"_leafletEvents",void 0),Z(D(t),"leafletElement",void 0),t._leafletEvents=t.extractLeafletEvents(e),t}return V(n,e),x(n,[{key:"componentDidMount",value:function(){this.bindLeafletEvents(this._leafletEvents)}},{key:"componentDidUpdate",value:function(e){this._leafletEvents=this.bindLeafletEvents(this.extractLeafletEvents(this.props),this._leafletEvents)}},{key:"componentWillUnmount",value:function(){var t=this,n=this.leafletElement;n&&Object.keys(this._leafletEvents).forEach(function(e){n.off(e,t._leafletEvents[e])})}},{key:"extractLeafletEvents",value:function(n){return Object.keys(n).reduce(function(e,t){q.test(t)&&null!=n[t]&&(e[t.replace(q,function(e,t){return t.toLowerCase()})]=n[t]);return e},{})}},{key:"bindLeafletEvents",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=this.leafletElement;if(null==r||null==r.on)return{};var o=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?G(n,!0).forEach(function(e){Z(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):G(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},n);return Object.keys(n).forEach(function(e){null!=t[e]&&n[e]===t[e]||(delete o[e],r.off(e,n[e]))}),Object.keys(t).forEach(function(e){null!=n[e]&&t[e]===n[e]||(o[e]=t[e],r.on(e,t[e]))}),o}},{key:"fireLeafletEvent",value:function(e,t){var n=this.leafletElement;n&&n.fire(e,t)}}]),n}(o.Component);function H(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}var K=function(e){function t(){return L(this,t),M(this,_(t).apply(this,arguments))}return V(t,J),x(t,[{key:"getOptions",value:function(e){return null!=e.pane?e:null!=e.leaflet&&null!=e.leaflet.pane?function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?H(n,!0).forEach(function(e){Z(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):H(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},e,{pane:e.leaflet.pane}):e}}]),t}(),Q=function(e){function n(e){var t;return L(this,n),t=M(this,_(n).call(this,e)),Z(D(t),"contextValue",void 0),Z(D(t),"leafletElement",void 0),t.leafletElement=t.createLeafletElement(e),t}return V(n,K),x(n,[{key:"createLeafletElement",value:function(e){throw new Error("createLeafletElement() must be implemented")}},{key:"updateLeafletElement",value:function(e,t){}},{key:"componentDidMount",value:function(){$(_(n.prototype),"componentDidMount",this).call(this),this.layerContainer.addLayer(this.leafletElement)}},{key:"componentDidUpdate",value:function(e){if($(_(n.prototype),"componentDidUpdate",this).call(this,e),this.props.attribution!==e.attribution){var t=this.props.leaflet.map;null!=t&&null!=t.attributionControl&&(t.attributionControl.removeAttribution(e.attribution),t.attributionControl.addAttribution(this.props.attribution))}this.updateLeafletElement(e,this.props)}},{key:"componentWillUnmount",value:function(){$(_(n.prototype),"componentWillUnmount",this).call(this),this.layerContainer.removeLayer(this.leafletElement)}},{key:"render",value:function(){var e=this.props.children;return null==e?null:null==this.contextValue?a.createElement(o.Fragment,null,e):a.createElement(k,{value:this.contextValue},e)}},{key:"layerContainer",get:function(){return this.props.leaflet.layerContainer||this.props.leaflet.map}}]),n}();function X(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}var Y=["stroke","color","weight","opacity","lineCap","lineJoin","dashArray","dashOffset","fill","fillColor","fillOpacity","fillRule","bubblingMouseEvents","renderer","className","interactive","pane","attribution"],ee=function(e){function n(e){var t;return L(this,n),null==(t=M(this,_(n).call(this,e))).contextValue&&(t.contextValue=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?X(n,!0).forEach(function(e){Z(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):X(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},e.leaflet,{popupContainer:t.leafletElement})),t}return V(n,Q),x(n,[{key:"componentDidUpdate",value:function(e){$(_(n.prototype),"componentDidUpdate",this).call(this,e),this.setStyleIfChanged(e,this.props)}},{key:"getPathOptions",value:function(e){return function(n,e){return e.reduce(function(e,t){return n[t]&&(e[t]=n[t]),e},{})}(e,Y)}},{key:"setStyle",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.leafletElement.setStyle(e)}},{key:"setStyleIfChanged",value:function(e,t){var n=this.getPathOptions(t);B(n,this.getPathOptions(e))||this.setStyle(n)}}]),n}(),te=E(function(e){function t(){return L(this,t),M(this,_(t).apply(this,arguments))}return V(t,ee),x(t,[{key:"createLeafletElement",value:function(e){var t=e.center,n=e.radius,r=R(e,["center","radius"]);return new i.Circle(t,n,this.getOptions(r))}},{key:"updateLeafletElement",value:function(e,t){t.center!==e.center&&this.leafletElement.setLatLng(t.center),t.radius!==e.radius&&this.leafletElement.setRadius(t.radius)}}]),t}());function ne(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function re(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"").split(" ").filter(Boolean)}function oe(t,e){re(e).forEach(function(e){i.DomUtil.addClass(t,e)})}function le(t,e){re(e).forEach(function(e){i.DomUtil.removeClass(t,e)})}function ie(e,t,n){null!=e&&n!==t&&(null!=t&&0<t.length&&le(e,t),null!=n&&0<n.length&&oe(e,n))}var ae=E(function(e){function t(){return L(this,t),M(this,_(t).apply(this,arguments))}return V(t,ee),x(t,[{key:"createLeafletElement",value:function(e){var t=new i.CircleMarker(e.center,this.getOptions(e));return this.contextValue=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ne(n,!0).forEach(function(e){Z(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ne(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},e.leaflet,{popupContainer:t}),t}},{key:"updateLeafletElement",value:function(e,t){t.center!==e.center&&this.leafletElement.setLatLng(t.center),t.radius!==e.radius&&this.leafletElement.setRadius(t.radius)}}]),t}()),se=function(e){function n(e){var t;return L(this,n),t=M(this,_(n).call(this,e)),Z(D(t),"onClose",function(){t.props.onClose&&t.props.onClose()}),Z(D(t),"onOpen",function(){t.forceUpdate(),t.props.onOpen&&t.props.onOpen()}),t.leafletElement=t.createLeafletElement(e),t}return V(n,K),x(n,[{key:"createLeafletElement",value:function(e){throw new Error("createLeafletElement() must be implemented")}},{key:"updateLeafletElement",value:function(e,t){}},{key:"componentDidUpdate",value:function(e){ie(this.leafletElement._container,e.className,this.props.className),this.updateLeafletElement(e,this.props),this.leafletElement.isOpen()&&(this.leafletElement.update(),this.onRender())}},{key:"onRender",value:function(){}},{key:"render",value:function(){return this.leafletElement._contentNode?t.createPortal(this.props.children,this.leafletElement._contentNode):null}}]),n}();function ue(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}var pe=E(function(e){function t(){return L(this,t),M(this,_(t).apply(this,arguments))}return V(t,ee),x(t,[{key:"createLeafletElement",value:function(e){var t=new i.FeatureGroup(this.getOptions(e));return this.contextValue=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ue(n,!0).forEach(function(e){Z(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ue(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},e.leaflet,{layerContainer:t,popupContainer:t}),t}},{key:"componentDidMount",value:function(){$(_(t.prototype),"componentDidMount",this).call(this),this.setStyle(this.props)}}]),t}()),ce=E(function(e){function t(){return L(this,t),M(this,_(t).apply(this,arguments))}return V(t,ee),x(t,[{key:"createLeafletElement",value:function(e){return new i.GeoJSON(e.data,this.getOptions(e))}},{key:"updateLeafletElement",value:function(e,t){"function"==typeof t.style?this.leafletElement.setStyle(t.style):this.setStyleIfChanged(e,t)}}]),t}());function fe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}var ye=function(e){function n(){return L(this,n),M(this,_(n).apply(this,arguments))}return V(n,Q),x(n,[{key:"createLeafletElement",value:function(e){return new i.GridLayer(this.getOptions(e))}},{key:"updateLeafletElement",value:function(e,t){var n=t.opacity,r=t.zIndex;n!==e.opacity&&this.leafletElement.setOpacity(n),r!==e.zIndex&&this.leafletElement.setZIndex(r)}},{key:"getOptions",value:function(e){var t=$(_(n.prototype),"getOptions",this).call(this,e);return null==e.leaflet.map?t:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?fe(n,!0).forEach(function(e){Z(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fe(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({maxZoom:e.leaflet.map.options.maxZoom,minZoom:e.leaflet.map.options.minZoom},t)}},{key:"render",value:function(){return null}}]),n}();function he(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}var me=E(function(e){function t(){return L(this,t),M(this,_(t).apply(this,arguments))}return V(t,Q),x(t,[{key:"createLeafletElement",value:function(e){var t=new i.ImageOverlay(e.url,e.bounds,this.getOptions(e));return this.contextValue=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?he(n,!0).forEach(function(e){Z(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):he(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},e.leaflet,{popupContainer:t}),t}},{key:"updateLeafletElement",value:function(e,t){t.url!==e.url&&this.leafletElement.setUrl(t.url),t.bounds!==e.bounds&&this.leafletElement.setBounds(i.latLngBounds(t.bounds)),t.opacity!==e.opacity&&this.leafletElement.setOpacity(t.opacity),t.zIndex!==e.zIndex&&this.leafletElement.setZIndex(t.zIndex)}}]),t}());function de(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}var ve=E(function(e){function t(){return L(this,t),M(this,_(t).apply(this,arguments))}return V(t,Q),x(t,[{key:"createLeafletElement",value:function(e){var t=new i.LayerGroup([],this.getOptions(e));return this.contextValue=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?de(n,!0).forEach(function(e){Z(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):de(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},e.leaflet,{layerContainer:t}),t}}]),t}());function be(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Oe(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?be(n,!0).forEach(function(e){Z(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):be(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var ge=function(e){function l(){var e,t;L(this,l);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t=M(this,(e=_(l)).call.apply(e,[this].concat(r))),Z(D(t),"contextValue",void 0),Z(D(t),"layer",void 0),t}return V(l,e),x(l,[{key:"componentDidUpdate",value:function(e){var t=e.checked;null!=this.props.leaflet.map&&(!0!==this.props.checked||null!=t&&!1!==t?!0!==t||null!=this.props.checked&&!1!==this.props.checked||this.props.leaflet.map.removeLayer(this.layer):this.props.leaflet.map.addLayer(this.layer))}},{key:"componentWillUnmount",value:function(){this.props.removeLayerControl(this.layer)}},{key:"addLayer",value:function(){throw new Error("Must be implemented in extending class")}},{key:"removeLayer",value:function(e){this.props.removeLayer(e)}},{key:"render",value:function(){var e=this.props.children;return e?a.createElement(k,{value:this.contextValue},e):null}}]),l}(o.Component),Ee=function(e){function t(e){var o;return L(this,t),o=M(this,_(t).call(this,e)),Z(D(o),"addLayer",function(e){o.layer=e;var t=o.props,n=t.addBaseLayer,r=t.checked;n(e,t.name,r)}),o.contextValue=Oe({},e.leaflet,{layerContainer:{addLayer:o.addLayer.bind(D(o)),removeLayer:o.removeLayer.bind(D(o))}}),o}return V(t,ge),t}(),Pe=function(e){function t(e){var o;return L(this,t),o=M(this,_(t).call(this,e)),Z(D(o),"addLayer",function(e){o.layer=e;var t=o.props,n=t.addOverlay,r=t.checked;n(e,t.name,r)}),o.contextValue=Oe({},e.leaflet,{layerContainer:{addLayer:o.addLayer.bind(D(o)),removeLayer:o.removeLayer.bind(D(o))}}),o}return V(t,ge),t}(),we=E(function(e){function n(e){var t;return L(this,n),t=M(this,_(n).call(this,e)),Z(D(t),"controlProps",void 0),t.controlProps={addBaseLayer:t.addBaseLayer.bind(D(t)),addOverlay:t.addOverlay.bind(D(t)),leaflet:e.leaflet,removeLayer:t.removeLayer.bind(D(t)),removeLayerControl:t.removeLayerControl.bind(D(t))},t}return V(n,z),x(n,[{key:"createLeafletElement",value:function(e){e.children;var t=R(e,["children"]);return new i.Control.Layers(void 0,void 0,t)}},{key:"updateLeafletElement",value:function(e,t){$(_(n.prototype),"updateLeafletElement",this).call(this,e,t),t.collapsed!==e.collapsed&&(!0===t.collapsed?this.leafletElement.collapse():this.leafletElement.expand())}},{key:"componentWillUnmount",value:function(){var e=this;setTimeout(function(){$(_(n.prototype),"componentWillUnmount",e).call(e)},0)}},{key:"addBaseLayer",value:function(e,t){2<arguments.length&&void 0!==arguments[2]&&arguments[2]&&null!=this.props.leaflet.map&&this.props.leaflet.map.addLayer(e),this.leafletElement.addBaseLayer(e,t)}},{key:"addOverlay",value:function(e,t){2<arguments.length&&void 0!==arguments[2]&&arguments[2]&&null!=this.props.leaflet.map&&this.props.leaflet.map.addLayer(e),this.leafletElement.addOverlay(e,t)}},{key:"removeLayer",value:function(e){null!=this.props.leaflet.map&&this.props.leaflet.map.removeLayer(e)}},{key:"removeLayerControl",value:function(e){this.leafletElement.removeLayer(e)}},{key:"render",value:function(){var t=this,e=o.Children.map(this.props.children,function(e){return e?o.cloneElement(e,t.controlProps):null});return a.createElement(o.Fragment,null,e)}}]),n}());function je(n){for(var e=arguments.length,r=new Array(1<e?e-1:0),t=1;t<e;t++)r[t-1]=arguments[t];return Object.keys(n).reduce(function(e,t){return-1===r.indexOf(t)&&(e[t]=n[t]),e},{})}function ke(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}we.BaseLayer=Ee,we.Overlay=Pe;function Le(e){return Array.isArray(e)?[e[0],e[1]]:[e.lat,e.lon?e.lon:e.lng]}var Ce=["children","className","id","style","useFlyTo","whenReady"],xe=function(e){function n(e){var t;return L(this,n),t=M(this,_(n).call(this,e)),Z(D(t),"className",void 0),Z(D(t),"contextValue",void 0),Z(D(t),"container",void 0),Z(D(t),"viewport",{center:void 0,zoom:void 0}),Z(D(t),"_ready",!1),Z(D(t),"_updating",!1),Z(D(t),"onViewportChange",function(){var e=t.leafletElement.getCenter();t.viewport={center:e?[e.lat,e.lng]:void 0,zoom:t.leafletElement.getZoom()},t.props.onViewportChange&&!t._updating&&t.props.onViewportChange(t.viewport)}),Z(D(t),"onViewportChanged",function(){t.props.onViewportChanged&&!t._updating&&t.props.onViewportChanged(t.viewport)}),Z(D(t),"bindContainer",function(e){t.container=e}),t.className=e.className,t}return V(n,J),x(n,[{key:"createLeafletElement",value:function(e){var t=e.viewport,n=R(e,["viewport"]);return t&&(t.center&&(n.center=t.center),"number"==typeof t.zoom&&(n.zoom=t.zoom)),new i.Map(this.container,n)}},{key:"updateLeafletElement",value:function(e,t){this._updating=!0;var n=t.bounds,r=t.boundsOptions,o=t.boxZoom,l=t.center,i=t.className,a=t.doubleClickZoom,s=t.dragging,u=t.keyboard,p=t.maxBounds,c=t.scrollWheelZoom,f=t.tap,y=t.touchZoom,h=t.useFlyTo,m=t.viewport,d=t.zoom;if(ie(this.container,e.className,i),m&&m!==e.viewport){var v=m.center?m.center:l,b=null==m.zoom?d:m.zoom;!0===h?this.leafletElement.flyTo(v,b,this.getZoomPanOptions(t)):this.leafletElement.setView(v,b,this.getZoomPanOptions(t))}else l&&this.shouldUpdateCenter(l,e.center)?!0===h?this.leafletElement.flyTo(l,d,this.getZoomPanOptions(t)):this.leafletElement.setView(l,d,this.getZoomPanOptions(t)):"number"==typeof d&&d!==e.zoom&&(null==e.zoom?this.leafletElement.setView(l,d,this.getZoomPanOptions(t)):this.leafletElement.setZoom(d,this.getZoomPanOptions(t)));p&&this.shouldUpdateBounds(p,e.maxBounds)&&this.leafletElement.setMaxBounds(p),n&&(this.shouldUpdateBounds(n,e.bounds)||r!==e.boundsOptions)&&(!0===h?this.leafletElement.flyToBounds(n,this.getFitBoundsOptions(t)):this.leafletElement.fitBounds(n,this.getFitBoundsOptions(t))),o!==e.boxZoom&&(!0===o?this.leafletElement.boxZoom.enable():this.leafletElement.boxZoom.disable()),a!==e.doubleClickZoom&&(!0===a?this.leafletElement.doubleClickZoom.enable():this.leafletElement.doubleClickZoom.disable()),s!==e.dragging&&(!0===s?this.leafletElement.dragging.enable():this.leafletElement.dragging.disable()),u!==e.keyboard&&(!0===u?this.leafletElement.keyboard.enable():this.leafletElement.keyboard.disable()),c!==e.scrollWheelZoom&&(!0===c||"string"==typeof c?(this.leafletElement.options.scrollWheelZoom=c,this.leafletElement.scrollWheelZoom.enable()):this.leafletElement.scrollWheelZoom.disable()),f!==e.tap&&(!0===f?this.leafletElement.tap.enable():this.leafletElement.tap.disable()),y!==e.touchZoom&&(!0===y||"string"==typeof y?(this.leafletElement.options.touchZoom=y,this.leafletElement.touchZoom.enable()):this.leafletElement.touchZoom.disable()),this._updating=!1}},{key:"getZoomPanOptions",value:function(e){return{animate:e.animate,duration:e.duration,easeLinearity:e.easeLinearity,noMoveStart:e.noMoveStart}}},{key:"getFitBoundsOptions",value:function(e){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ke(n,!0).forEach(function(e){Z(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ke(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},this.getZoomPanOptions(e),{},e.boundsOptions)}},{key:"componentDidMount",value:function(){var e=je.apply(void 0,[this.props].concat(Ce));this.leafletElement=this.createLeafletElement(e),this.leafletElement.on("move",this.onViewportChange),this.leafletElement.on("moveend",this.onViewportChanged),null!=e.bounds&&this.leafletElement.fitBounds(e.bounds,this.getFitBoundsOptions(e)),this.contextValue={layerContainer:this.leafletElement,map:this.leafletElement},$(_(n.prototype),"componentDidMount",this).call(this),this.forceUpdate()}},{key:"componentDidUpdate",value:function(e){!1===this._ready&&(this._ready=!0,this.props.whenReady&&this.leafletElement.whenReady(this.props.whenReady)),$(_(n.prototype),"componentDidUpdate",this).call(this,e),this.updateLeafletElement(e,this.props)}},{key:"componentWillUnmount",value:function(){$(_(n.prototype),"componentWillUnmount",this).call(this),this.leafletElement.off("move",this.onViewportChange),this.leafletElement.off("moveend",this.onViewportChanged),!0===this.props.preferCanvas?(this.leafletElement._initEvents(!0),this.leafletElement._stop()):this.leafletElement.remove()}},{key:"shouldUpdateCenter",value:function(e,t){return!t||(e=Le(e),t=Le(t),e[0]!==t[0]||e[1]!==t[1])}},{key:"shouldUpdateBounds",value:function(e,t){return!t||!i.latLngBounds(e).equals(i.latLngBounds(t))}},{key:"render",value:function(){return a.createElement("div",{className:this.className,id:this.props.id,ref:this.bindContainer,style:this.props.style},this.contextValue?a.createElement(k,{value:this.contextValue},this.props.children):null)}}]),n}();function Se(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}var De=E(function(e){function t(){return L(this,t),M(this,_(t).apply(this,arguments))}return V(t,Q),x(t,[{key:"createLeafletElement",value:function(e){var t=new i.Marker(e.position,this.getOptions(e));return this.contextValue=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Se(n,!0).forEach(function(e){Z(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Se(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},e.leaflet,{popupContainer:t}),t}},{key:"updateLeafletElement",value:function(e,t){t.position!==e.position&&this.leafletElement.setLatLng(t.position),t.icon!==e.icon&&this.leafletElement.setIcon(t.icon),t.zIndexOffset!==e.zIndexOffset&&this.leafletElement.setZIndexOffset(t.zIndexOffset),t.opacity!==e.opacity&&this.leafletElement.setOpacity(t.opacity),t.draggable!==e.draggable&&(!0===t.draggable?this.leafletElement.dragging.enable():this.leafletElement.dragging.disable())}},{key:"render",value:function(){var e=this.props.children;return null==e||null==this.contextValue?null:a.createElement(k,{value:this.contextValue},e)}}]),t}());function Me(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}var _e=0,Ue=["tile","shadow","overlay","map","marker","tooltip","popup"],Ve=/-*pane/gi,Ze={position:"absolute",top:0,right:0,bottom:0,left:0},ze=E(function(e){function l(){var e,o;L(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return o=M(this,(e=_(l)).call.apply(e,[this].concat(n))),Z(D(o),"state",{name:void 0,context:void 0}),Z(D(o),"setStyle",function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:o.props,t=e.style,n=e.className,r=o.getPane(o.state.name);r&&(n&&oe(r,n),t&&Object.keys(t).forEach(function(e){r.style[e]=t[e]}))}),o}return V(l,e),x(l,[{key:"componentDidMount",value:function(){this.createPane(this.props)}},{key:"componentDidUpdate",value:function(e){if(this.state.name)if(this.props.name!==e.name)this.removePane(),this.createPane(this.props);else{if(e.className&&this.props.className!==e.className){var t=this.getPane(this.state.name);null!=t&&null!=e.className&&le(t,e.className)}this.setStyle(this.props)}}},{key:"componentWillUnmount",value:function(){this.removePane()}},{key:"createPane",value:function(e){var t=e.leaflet.map,n=e.name||"pane-".concat(++_e);null!=t&&null!=t.createPane&&(null==(function(e){return-1!==Ue.indexOf(e.replace(Ve,""))}(n)||this.getPane(n))&&t.createPane(n,this.getParentPane()),this.setState({name:n,context:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Me(n,!0).forEach(function(e){Z(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Me(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},e.leaflet,{pane:n})},this.setStyle))}},{key:"removePane",value:function(){var e=this.state.name;if(null!=e){var t=this.getPane(e);null!=t&&t.remove&&t.remove();var n=this.props.leaflet.map;null!=n&&null!=n._panes&&(n._panes=je(n._panes,e),n._paneRenderers=je(n._paneRenderers,e))}}},{key:"getParentPane",value:function(){return this.getPane(this.props.pane||this.props.leaflet.pane)}},{key:"getPane",value:function(e){if(null!=e&&null!=this.props.leaflet.map)return this.props.leaflet.map.getPane(e)}},{key:"render",value:function(){var e=this.state.context;return e?a.createElement(k,{value:e},a.createElement("div",{style:Ze},this.props.children)):null}}]),l}(o.Component)),Ie=E(function(e){function t(){return L(this,t),M(this,_(t).apply(this,arguments))}return V(t,ee),x(t,[{key:"createLeafletElement",value:function(e){return new i.Polygon(e.positions,this.getOptions(e))}},{key:"updateLeafletElement",value:function(e,t){t.positions!==e.positions&&this.leafletElement.setLatLngs(t.positions),this.setStyleIfChanged(e,t)}}]),t}()),Te=E(function(e){function t(){return L(this,t),M(this,_(t).apply(this,arguments))}return V(t,ee),x(t,[{key:"createLeafletElement",value:function(e){return new i.Polyline(e.positions,this.getOptions(e))}},{key:"updateLeafletElement",value:function(e,t){t.positions!==e.positions&&this.leafletElement.setLatLngs(t.positions),this.setStyleIfChanged(e,t)}}]),t}());function Re(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}var Be=function(e){function l(){var e,t;L(this,l);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t=M(this,(e=_(l)).call.apply(e,[this].concat(r))),Z(D(t),"onPopupOpen",function(e){e.popup===t.leafletElement&&t.onOpen()}),Z(D(t),"onPopupClose",function(e){e.popup===t.leafletElement&&t.onClose()}),Z(D(t),"onRender",function(){!1!==t.props.autoPan&&t.leafletElement.isOpen()&&(t.leafletElement._map&&t.leafletElement._map._panAnim&&(t.leafletElement._map._panAnim=void 0),t.leafletElement._adjustPan())}),t}return V(l,se),x(l,[{key:"getOptions",value:function(e){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Re(n,!0).forEach(function(e){Z(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Re(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},$(_(l.prototype),"getOptions",this).call(this,e),{autoPan:!1})}},{key:"createLeafletElement",value:function(e){var t=this.getOptions(e);return t.autoPan=!1!==e.autoPan,new i.Popup(t,e.leaflet.popupContainer)}},{key:"updateLeafletElement",value:function(e,t){t.position!==e.position&&this.leafletElement.setLatLng(t.position)}},{key:"componentDidMount",value:function(){var e=this.props.position,t=this.props.leaflet,n=t.map,r=t.popupContainer,o=this.leafletElement;null!=n&&n.on({popupopen:this.onPopupOpen,popupclose:this.onPopupClose}),r?r.bindPopup(o):(e&&o.setLatLng(e),o.openOn(n))}},{key:"componentWillUnmount",value:function(){var e=this.props.leaflet.map;null!=e&&(e.off({popupopen:this.onPopupOpen,popupclose:this.onPopupClose}),e.removeLayer(this.leafletElement)),$(_(l.prototype),"componentWillUnmount",this).call(this)}}]),l}();Z(Be,"defaultProps",{pane:"popupPane"});var Ne=E(Be),$e=E(function(e){function t(){return L(this,t),M(this,_(t).apply(this,arguments))}return V(t,ee),x(t,[{key:"createLeafletElement",value:function(e){return new i.Rectangle(e.bounds,this.getOptions(e))}},{key:"updateLeafletElement",value:function(e,t){t.bounds!==e.bounds&&this.leafletElement.setBounds(t.bounds),this.setStyleIfChanged(e,t)}}]),t}()),Ae=E(function(e){function t(){return L(this,t),M(this,_(t).apply(this,arguments))}return V(t,z),x(t,[{key:"createLeafletElement",value:function(e){return new i.Control.Scale(e)}}]),t}()),We=E(function(e){function n(e){var t;return L(this,n),t=M(this,_(n).call(this,e)),Z(D(t),"leafletElement",void 0),Z(D(t),"container",void 0),t.leafletElement=t.createLeafletElement(e),t}return V(n,K),x(n,[{key:"createLeafletElement",value:function(e){return this.container=document.createElementNS("http://www.w3.org/2000/svg","svg"),new i.SVGOverlay(this.container,e.bounds,this.getOptions(e))}},{key:"updateLeafletElement",value:function(e,t){t.bounds!==e.bounds&&this.leafletElement.setBounds(t.bounds),t.opacity!==e.opacity&&this.leafletElement.setOpacity(t.opacity),t.zIndex!==e.zIndex&&this.leafletElement.setZIndex(t.zIndex)}},{key:"componentDidMount",value:function(){$(_(n.prototype),"componentDidMount",this).call(this),this.layerContainer.addLayer(this.leafletElement)}},{key:"componentDidUpdate",value:function(e){if($(_(n.prototype),"componentDidUpdate",this).call(this,e),this.props.attribution!==e.attribution){var t=this.props.leaflet.map;null!=t&&null!=t.attributionControl&&(t.attributionControl.removeAttribution(e.attribution),t.attributionControl.addAttribution(this.props.attribution))}this.updateLeafletElement(e,this.props)}},{key:"componentWillUnmount",value:function(){$(_(n.prototype),"componentWillUnmount",this).call(this),this.layerContainer.removeLayer(this.leafletElement),this.container=null}},{key:"render",value:function(){var e=this.props.children;return null==e||null==this.container?null:t.createPortal(e,this.container)}},{key:"layerContainer",get:function(){return this.props.leaflet.layerContainer||this.props.leaflet.map}}]),n}()),Fe=E(function(e){function n(){return L(this,n),M(this,_(n).apply(this,arguments))}return V(n,ye),x(n,[{key:"createLeafletElement",value:function(e){return new i.TileLayer(e.url,this.getOptions(e))}},{key:"updateLeafletElement",value:function(e,t){$(_(n.prototype),"updateLeafletElement",this).call(this,e,t),t.url!==e.url&&this.leafletElement.setUrl(t.url)}}]),n}()),Ge=function(e){function l(){var e,t;L(this,l);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t=M(this,(e=_(l)).call.apply(e,[this].concat(r))),Z(D(t),"onTooltipOpen",function(e){e.tooltip===t.leafletElement&&t.onOpen()}),Z(D(t),"onTooltipClose",function(e){e.tooltip===t.leafletElement&&t.onClose()}),t}return V(l,se),x(l,[{key:"createLeafletElement",value:function(e){return new i.Tooltip(this.getOptions(e),e.leaflet.popupContainer)}},{key:"componentDidMount",value:function(){var e=this.props.leaflet.popupContainer;null!=e&&(e.on({tooltipopen:this.onTooltipOpen,tooltipclose:this.onTooltipClose}),e.bindTooltip(this.leafletElement))}},{key:"componentWillUnmount",value:function(){var e=this.props.leaflet.popupContainer;null!=e&&(e.off({tooltipopen:this.onTooltipOpen,tooltipclose:this.onTooltipClose}),null!=e._map&&e.unbindTooltip(this.leafletElement))}}]),l}();Z(Ge,"defaultProps",{pane:"tooltipPane"});var qe=E(Ge),Je=E(function(e){function t(){return L(this,t),M(this,_(t).apply(this,arguments))}return V(t,Q),x(t,[{key:"createLeafletElement",value:function(e){return new i.VideoOverlay(e.url,e.bounds,this.getOptions(e))}},{key:"componentDidMount",value:function(){$(_(t.prototype),"componentDidMount",this).call(this),!0===this.props.play&&this.leafletElement.getElement().play()}},{key:"updateLeafletElement",value:function(e,t){t.url!==e.url&&this.leafletElement.setUrl(t.url),t.bounds!==e.bounds&&this.leafletElement.setBounds(i.latLngBounds(t.bounds)),t.opacity!==e.opacity&&this.leafletElement.setOpacity(t.opacity),t.zIndex!==e.zIndex&&this.leafletElement.setZIndex(t.zIndex),!0!==t.play||e.play?t.play||!0!==e.play||this.leafletElement.getElement().pause():this.leafletElement.getElement().play()}}]),t}()),He=E(function(e){function p(){return L(this,p),M(this,_(p).apply(this,arguments))}return V(p,ye),x(p,[{key:"createLeafletElement",value:function(e){var t=e.url,n=R(e,["url"]),r=this.getOptions(n),o=(r.leaflet,R(r,["leaflet"]));return new i.TileLayer.WMS(t,o)}},{key:"updateLeafletElement",value:function(e,t){$(_(p.prototype),"updateLeafletElement",this).call(this,e,t);var n=e.url,r=(e.opacity,e.zIndex,R(e,["url","opacity","zIndex"])),o=this.getOptions(r),l=(o.leaflet,R(o,["leaflet"])),i=t.url,a=(t.opacity,t.zIndex,R(t,["url","opacity","zIndex"])),s=this.getOptions(a),u=(s.leaflet,R(s,["leaflet"]));i!==n&&this.leafletElement.setUrl(i),B(u,l)||this.leafletElement.setParams(u)}},{key:"getOptions",value:function(e){var n=$(_(p.prototype),"getOptions",this).call(this,e);return Object.keys(n).reduce(function(e,t){return q.test(t)||(e[t]=n[t]),e},{})}}]),p}()),Ke=E(function(e){function t(){return L(this,t),M(this,_(t).apply(this,arguments))}return V(t,z),x(t,[{key:"createLeafletElement",value:function(e){return new i.Control.Zoom(e)}}]),t}());e.AttributionControl=I,e.Circle=te,e.CircleMarker=ae,e.ControlledLayer=ge,e.DivOverlay=se,e.FeatureGroup=pe,e.GeoJSON=ce,e.GridLayer=ye,e.ImageOverlay=me,e.LayerGroup=ve,e.LayersControl=we,e.LeafletConsumer=j,e.LeafletProvider=k,e.Map=xe,e.MapComponent=K,e.MapControl=z,e.MapEvented=J,e.MapLayer=Q,e.Marker=De,e.Pane=ze,e.Path=ee,e.Polygon=Ie,e.Polyline=Te,e.Popup=Ne,e.Rectangle=$e,e.SVGOverlay=We,e.ScaleControl=Ae,e.TileLayer=Fe,e.Tooltip=qe,e.VideoOverlay=Je,e.WMSTileLayer=He,e.ZoomControl=Ke,e.useLeaflet=function(){return o.useContext(w)},e.withLeaflet=E,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -27,2 +27,3 @@ "use strict";

export { default as ScaleControl } from './ScaleControl';
export { default as SVGOverlay } from './SVGOverlay';
export { default as TileLayer } from './TileLayer';

@@ -29,0 +30,0 @@ export { default as Tooltip } from './Tooltip';

@@ -221,3 +221,3 @@ "use strict";

var zoomPanOptions = this.getZoomPanOptions(props);
return _extends({}, zoomPanOptions, props.boundsOptions);
return _extends({}, zoomPanOptions, {}, props.boundsOptions);
};

@@ -224,0 +224,0 @@

@@ -26,3 +26,7 @@ "use strict";

return new TileLayer.WMS(url, this.getOptions(params));
var _this$getOptions = this.getOptions(params),
_l = _this$getOptions.leaflet,
options = _objectWithoutPropertiesLoose(_this$getOptions, ["leaflet"]);
return new TileLayer.WMS(url, options);
};

@@ -36,9 +40,17 @@

_pz = fromProps.zIndex,
prevParams = _objectWithoutPropertiesLoose(fromProps, ["url", "opacity", "zIndex"]);
prevProps = _objectWithoutPropertiesLoose(fromProps, ["url", "opacity", "zIndex"]);
var _this$getOptions2 = this.getOptions(prevProps),
_pl = _this$getOptions2.leaflet,
prevParams = _objectWithoutPropertiesLoose(_this$getOptions2, ["leaflet"]);
var url = toProps.url,
_o = toProps.opacity,
_z = toProps.zIndex,
params = _objectWithoutPropertiesLoose(toProps, ["url", "opacity", "zIndex"]);
props = _objectWithoutPropertiesLoose(toProps, ["url", "opacity", "zIndex"]);
var _this$getOptions3 = this.getOptions(props),
_l = _this$getOptions3.leaflet,
params = _objectWithoutPropertiesLoose(_this$getOptions3, ["leaflet"]);
if (url !== prevUrl) {

@@ -45,0 +57,0 @@ this.leafletElement.setUrl(url);

@@ -8,3 +8,3 @@ "use strict";

exports.__esModule = true;
exports.ControlledLayer = exports.ZoomControl = exports.WMSTileLayer = exports.VideoOverlay = exports.Tooltip = exports.TileLayer = exports.ScaleControl = exports.Rectangle = exports.Popup = exports.Polyline = exports.Polygon = exports.Path = exports.Pane = exports.Marker = exports.MapLayer = exports.MapEvented = exports.MapControl = exports.MapComponent = exports.Map = exports.LayersControl = exports.LayerGroup = exports.ImageOverlay = exports.GridLayer = exports.GeoJSON = exports.FeatureGroup = exports.DivOverlay = exports.CircleMarker = exports.Circle = exports.AttributionControl = exports.useLeaflet = exports.withLeaflet = exports.LeafletProvider = exports.LeafletConsumer = void 0;
exports.ControlledLayer = exports.ZoomControl = exports.WMSTileLayer = exports.VideoOverlay = exports.Tooltip = exports.TileLayer = exports.SVGOverlay = exports.ScaleControl = exports.Rectangle = exports.Popup = exports.Polyline = exports.Polygon = exports.Path = exports.Pane = exports.Marker = exports.MapLayer = exports.MapEvented = exports.MapControl = exports.MapComponent = exports.Map = exports.LayersControl = exports.LayerGroup = exports.ImageOverlay = exports.GridLayer = exports.GeoJSON = exports.FeatureGroup = exports.DivOverlay = exports.CircleMarker = exports.Circle = exports.AttributionControl = exports.useLeaflet = exports.withLeaflet = exports.LeafletProvider = exports.LeafletConsumer = void 0;

@@ -111,2 +111,6 @@ var _context = require("./context");

var _SVGOverlay = _interopRequireDefault(require("./SVGOverlay"));
exports.SVGOverlay = _SVGOverlay.default;
var _TileLayer = _interopRequireDefault(require("./TileLayer"));

@@ -113,0 +117,0 @@

@@ -227,3 +227,3 @@ "use strict";

var zoomPanOptions = this.getZoomPanOptions(props);
return (0, _extends2.default)({}, zoomPanOptions, props.boundsOptions);
return (0, _extends2.default)({}, zoomPanOptions, {}, props.boundsOptions);
};

@@ -230,0 +230,0 @@

@@ -36,3 +36,8 @@ "use strict";

params = (0, _objectWithoutPropertiesLoose2.default)(props, ["url"]);
return new _leaflet.TileLayer.WMS(url, this.getOptions(params));
var _this$getOptions = this.getOptions(params),
_l = _this$getOptions.leaflet,
options = (0, _objectWithoutPropertiesLoose2.default)(_this$getOptions, ["leaflet"]);
return new _leaflet.TileLayer.WMS(url, options);
};

@@ -46,8 +51,17 @@

_pz = fromProps.zIndex,
prevParams = (0, _objectWithoutPropertiesLoose2.default)(fromProps, ["url", "opacity", "zIndex"]);
prevProps = (0, _objectWithoutPropertiesLoose2.default)(fromProps, ["url", "opacity", "zIndex"]);
var _this$getOptions2 = this.getOptions(prevProps),
_pl = _this$getOptions2.leaflet,
prevParams = (0, _objectWithoutPropertiesLoose2.default)(_this$getOptions2, ["leaflet"]);
var url = toProps.url,
_o = toProps.opacity,
_z = toProps.zIndex,
params = (0, _objectWithoutPropertiesLoose2.default)(toProps, ["url", "opacity", "zIndex"]);
props = (0, _objectWithoutPropertiesLoose2.default)(toProps, ["url", "opacity", "zIndex"]);
var _this$getOptions3 = this.getOptions(props),
_l = _this$getOptions3.leaflet,
params = (0, _objectWithoutPropertiesLoose2.default)(_this$getOptions3, ["leaflet"]);
if (url !== prevUrl) {

@@ -54,0 +68,0 @@ this.leafletElement.setUrl(url);

{
"name": "react-leaflet",
"version": "2.4.0",
"version": "2.5.0",
"description": "React components for Leaflet maps",

@@ -52,3 +52,3 @@ "main": "lib/index.js",

"dependencies": {
"@babel/runtime": "^7.4.5",
"@babel/runtime": "^7.6.3",
"fast-deep-equal": "^2.0.1",

@@ -64,45 +64,45 @@ "hoist-non-react-statics": "^3.3.0",

"devDependencies": {
"@babel/cli": "^7.4.4",
"@babel/core": "^7.4.5",
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/plugin-proposal-export-default-from": "^7.2.0",
"@babel/plugin-transform-proto-to-assign": "^7.4.4",
"@babel/plugin-transform-runtime": "^7.4.4",
"@babel/cli": "^7.6.4",
"@babel/core": "^7.6.4",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-export-default-from": "^7.5.2",
"@babel/plugin-transform-proto-to-assign": "^7.5.5",
"@babel/plugin-transform-runtime": "^7.6.2",
"@babel/plugin-transform-strict-mode": "^7.2.0",
"@babel/preset-env": "^7.4.5",
"@babel/preset-env": "^7.6.3",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.8.0",
"@babel/preset-react": "^7.6.3",
"babel-eslint": "^10.0.3",
"babel-jest": "^24.9.0",
"babel-loader": "^8.0.6",
"babel-plugin-dev-expression": "^0.2.1",
"cross-env": "^5.2.0",
"eslint": "^5.16.0",
"eslint-config-prettier": "^4.3.0",
"eslint-plugin-flowtype": "^3.9.1",
"eslint-plugin-import": "^2.17.3",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-promise": "^4.1.1",
"eslint-plugin-react": "^7.13.0",
"file-loader": "^4.0.0",
"flow-bin": "^0.100.0",
"flow-copy-source": "^2.0.6",
"flow-typed": "^2.5.2",
"jest": "^24.8.0",
"babel-plugin-dev-expression": "^0.2.2",
"cross-env": "^6.0.3",
"eslint": "^6.5.1",
"eslint-config-prettier": "^6.4.0",
"eslint-plugin-flowtype": "^4.3.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "^7.16.0",
"file-loader": "^4.2.0",
"flow-bin": "^0.109.0",
"flow-copy-source": "^2.0.8",
"flow-typed": "^2.6.1",
"jest": "^24.9.0",
"leaflet": "^1.5.1",
"prettier": "^1.18.2",
"prettier-eslint": "^8.8.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"rimraf": "^2.6.2",
"rollup": "^1.14.5",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-node-resolve": "^5.0.1",
"prettier-eslint": "^9.0.0",
"react": "^16.10.2",
"react-dom": "^16.10.2",
"rimraf": "^3.0.0",
"rollup": "^1.25.0",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-uglify": "^6.0.2",
"webpack": "^4.33.0",
"webpack-cli": "^3.3.3",
"webpack-dev-server": "^3.7.1"
"rollup-plugin-uglify": "^6.0.3",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.9",
"webpack-dev-server": "^3.8.2"
},

@@ -109,0 +109,0 @@ "jest": {

@@ -49,2 +49,3 @@ // @flow

export { default as ScaleControl } from './ScaleControl'
export { default as SVGOverlay } from './SVGOverlay'
export { default as TileLayer } from './TileLayer'

@@ -51,0 +52,0 @@ export { default as Tooltip } from './Tooltip'

@@ -95,2 +95,15 @@ // @flow

export type CrossOrigin = boolean | string
export type ImageOverlayOptions = {
opacity?: number,
alt?: string,
interactive?: boolean,
attribution?: string,
crossOrigin?: CrossOrigin,
errorOverlayUrl?: string,
zIndex?: number,
className?: string,
}
export type LeafletProps = { leaflet: LeafletContext }

@@ -115,1 +128,7 @@

export type PathProps = MapLayerProps & PathOptions
export type SVGOverlayProps = MapComponentProps &
ImageOverlayOptions & {
bounds: LatLngBounds,
children?: Node,
}

@@ -17,3 +17,4 @@ // @flow

const { url, ...params } = props
return new TileLayer.WMS(url, this.getOptions(params))
const { leaflet: _l, ...options } = this.getOptions(params)
return new TileLayer.WMS(url, options)
}

@@ -24,4 +25,6 @@

const { url: prevUrl, opacity: _po, zIndex: _pz, ...prevParams } = fromProps
const { url, opacity: _o, zIndex: _z, ...params } = toProps
const { url: prevUrl, opacity: _po, zIndex: _pz, ...prevProps } = fromProps
const { leaflet: _pl, ...prevParams } = this.getOptions(prevProps)
const { url, opacity: _o, zIndex: _z, ...props } = toProps
const { leaflet: _l, ...params } = this.getOptions(props)

@@ -28,0 +31,0 @@ if (url !== prevUrl) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc