UNPKG

49.5 kBJavaScriptView Raw
1!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.GoogleMapReact=t(require("react"),require("react-dom")):e.GoogleMapReact=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var r=n(11),i=o(r);e.exports=i.default},function(t,n){t.exports=e},function(e,t){"use strict";function n(e,t){this.x=e,this.y=t}e.exports=n,n.prototype={clone:function(){return new n(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,n=e.y-this.y;return t*t+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,n=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=n,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),n=Math.sin(e),o=t*this.x-n*this.y,r=n*this.x+t*this.y;return this.x=o,this.y=r,this},_rotateAround:function(e,t){var n=Math.cos(e),o=Math.sin(e),r=t.x+n*(this.x-t.x)-o*(this.y-t.y),i=t.y+o*(this.x-t.x)+n*(this.y-t.y);return this.x=r,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(e){return e instanceof n?e:Array.isArray(e)?new n(e[0],e[1]):e}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=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},u=n(1),l=o(u),p=n(9),c=o(p),f=n(6),d=o(f),h=n(8),_=o(h),m={width:"100%",height:"100%",left:0,top:0,margin:0,padding:0,position:"absolute"},g={width:0,height:0,left:0,top:0,backgroundColor:"transparent",position:"absolute"},v=function(e){function t(n){r(this,t);var o=i(this,e.call(this,n));return o._getState=function(){return{children:o.props.dispatcher.getChildren(),updateCounter:o.props.dispatcher.getUpdateCounter()}},o._onChangeHandler=function(){if(o.dimensionsCache_){var e=(o.state.children||[]).length,t=o._getState();o.setState(t,function(){return(t.children||[]).length!==e&&o._onMouseChangeHandler()})}},o._onChildClick=function(){if(o.props.onChildClick&&o.hoverChildProps_){var e=o.hoverKey_,t=o.hoverChildProps_;o.props.onChildClick(e,t)}},o._onChildMouseDown=function(){if(o.props.onChildMouseDown&&o.hoverChildProps_){var e=o.hoverKey_,t=o.hoverChildProps_;o.props.onChildMouseDown(e,t)}},o._onChildMouseEnter=function(e,t){o.dimensionsCache_&&(o.props.onChildMouseEnter&&o.props.onChildMouseEnter(e,t),o.hoverChildProps_=t,o.hoverKey_=e,o.setState({hoverKey:e}))},o._onChildMouseLeave=function(){if(o.dimensionsCache_){var e=o.hoverKey_,t=o.hoverChildProps_;void 0!==e&&null!==e&&(o.props.onChildMouseLeave&&o.props.onChildMouseLeave(e,t),o.hoverKey_=null,o.hoverChildProps_=null,o.setState({hoverKey:null}))}},o._onMouseAllow=function(e){e||o._onChildMouseLeave(),o.allowMouse_=e},o._onMouseChangeHandler=function(){o.allowMouse_&&o._onMouseChangeHandlerRaf()},o._onMouseChangeHandlerRaf=function(){if(o.dimensionsCache_){var e=o.props.dispatcher.getMousePosition();if(e){var t=[],n=o.props.getHoverDistance();if(l.default.Children.forEach(o.state.children,function(r,i){if(r&&(void 0!==r.props.latLng||void 0!==r.props.lat||void 0!==r.props.lng)){var s=void 0!==r.key&&null!==r.key?r.key:i,a=o.props.distanceToMouse(o.dimensionsCache_[s],e,r.props);a<n&&t.push({key:s,dist:a,props:r.props})}}),t.length){t.sort(function(e,t){return e.dist-t.dist});var r=t[0].key,i=t[0].props;o.hoverKey_!==r&&(o._onChildMouseLeave(),o._onChildMouseEnter(r,i))}else o._onChildMouseLeave()}else o._onChildMouseLeave()}},o._getDimensions=function(e){var t=e;return o.dimensionsCache_[t]},o.props.dispatcher.on("kON_CHANGE",o._onChangeHandler),o.props.dispatcher.on("kON_MOUSE_POSITION_CHANGE",o._onMouseChangeHandler),o.props.dispatcher.on("kON_CLICK",o._onChildClick),o.props.dispatcher.on("kON_MDOWN",o._onChildMouseDown),o.dimensionsCache_={},o.hoverKey_=null,o.hoverChildProps_=null,o.allowMouse_=!0,o.state=a({},o._getState(),{hoverKey:null}),o}return s(t,e),t.prototype.shouldComponentUpdate=function(e,t){return this.props.experimental===!0?!(0,_.default)(this.props,e)||!(0,_.default)((0,d.default)(this.state,["hoverKey"]),(0,d.default)(t,["hoverKey"])):!(0,_.default)(this.props,e)||!(0,_.default)(this.state,t)},t.prototype.componentWillUnmount=function(){this.props.dispatcher.removeListener("kON_CHANGE",this._onChangeHandler),this.props.dispatcher.removeListener("kON_MOUSE_POSITION_CHANGE",this._onMouseChangeHandler),this.props.dispatcher.removeListener("kON_CLICK",this._onChildClick),this.props.dispatcher.removeListener("kON_MDOWN",this._onChildMouseDown),this.dimensionsCache_=null},t.prototype.render=function(){var e=this,t=this.props.style||m;this.dimensionsCache_={};var n=l.default.Children.map(this.state.children,function(t,n){if(t){if(void 0===t.props.latLng&&void 0===t.props.lat&&void 0===t.props.lng)return l.default.cloneElement(t,{$geoService:e.props.geoService,$onMouseAllow:e._onMouseAllow,$prerender:e.props.prerender});var o=void 0!==t.props.latLng?t.props.latLng:{lat:t.props.lat,lng:t.props.lng},r=e.props.insideMapPanes?e.props.geoService.fromLatLngToDivPixel(o):e.props.geoService.fromLatLngToCenterPixel(o),i={left:r.x,top:r.y};if(void 0!==t.props.seLatLng||void 0!==t.props.seLat&&void 0!==t.props.seLng){var s=void 0!==t.props.seLatLng?t.props.seLatLng:{lat:t.props.seLat,lng:t.props.seLng},u=e.props.insideMapPanes?e.props.geoService.fromLatLngToDivPixel(s):e.props.geoService.fromLatLngToCenterPixel(s);i.width=u.x-r.x,i.height=u.y-r.y}var p=e.props.geoService.fromLatLngToContainerPixel(o),c=void 0!==t.key&&null!==t.key?t.key:n;return e.dimensionsCache_[c]=a({x:p.x,y:p.y},o),l.default.createElement("div",{key:c,style:a({},g,i),className:t.props.$markerHolderClassName},l.default.cloneElement(t,{$hover:c===e.state.hoverKey,$getDimensions:e._getDimensions,$dimensionKey:c,$geoService:e.props.geoService,$onMouseAllow:e._onMouseAllow,$prerender:e.props.prerender}))}});return l.default.createElement("div",{style:t},n)},t}(u.Component);v.propTypes={geoService:c.default.any,style:c.default.any,distanceToMouse:c.default.func,dispatcher:c.default.any,onChildClick:c.default.func,onChildMouseDown:c.default.func,onChildMouseLeave:c.default.func,onChildMouseEnter:c.default.func,getHoverDistance:c.default.func,insideMapPanes:c.default.bool,prerender:c.default.bool},v.defaultProps={insideMapPanes:!1,prerender:!1},t.default=v},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=n(5),i=function(){function e(t,n){if(o(this,e),isNaN(t)||isNaN(n))throw new Error("Invalid LatLng object: ("+t+", "+n+")");this.lat=+t,this.lng=+n}return e.prototype.wrap=function(){return new e(this.lat,(0,r.wrap)(this.lng,-180,180))},e}();i.convert=function(e){return e instanceof i?e:Array.isArray(e)?new i(e[0],e[1]):"lng"in e&&"lat"in e?new i(e.lat,e.lng):e},t.default=i},function(e,t){"use strict";function n(e,t,n){var o=n-t;return e===n?e:((e-t)%o+o)%o+t}t.__esModule=!0,t.wrap=n},function(e,t){"use strict";function n(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}t.__esModule=!0;var o=function(e,t){for(var o=n(e,[]),r=0;r<t.length;r++){var i=t[r];i in o&&delete o[i]}return o};t.default=o},function(e,t){"use strict";function n(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){e=!1}return e}function o(e,t,o,r){e.addEventListener(t,o,n()?{capture:r,passive:!0}:r)}t.__esModule=!0,t.default=o},function(e,t){"use strict";function n(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function o(e,t){if(n(e,t))return!0;if("object"!==("undefined"==typeof e?"undefined":r(e))||null===e||"object"!==("undefined"==typeof t?"undefined":r(t))||null===t)return!1;var o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;for(var a=0;a<o.length;a++)if(!i.call(t,o[a])||!n(e[o[a]],t[o[a]]))return!1;return!0}var r="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},i=Object.prototype.hasOwnProperty;e.exports=o},function(e,t,n){e.exports=n(28)()},function(e,t){"use strict";t.__esModule=!0;t.generateHeatmap=function(e,t){var n=t.positions;return new e.visualization.HeatmapLayer({data:n.reduce(function(t,n){var o=n.lat,r=n.lng,i=n.weight,s=void 0===i?1:i;return t.push({location:new e.LatLng(o,r),weight:s}),t},[])})},t.optionsHeatmap=function(e,t){var n=t.options,o=void 0===n?{}:n;return Object.keys(o).map(function(t){return e.set(t,o[t])})}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(){return{overviewMapControl:!1,streetViewControl:!1,rotateControl:!0,mapTypeControl:!1,styles:[{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]}],minZoom:oe}}t.__esModule=!0;var u="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},l=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},p=n(1),c=o(p),f=n(9),d=o(f),h=n(31),_=o(h),m=n(12),g=o(m),v=n(15),y=o(v),M=n(3),C=o(M),w=n(13),b=o(w),L=n(10),x=n(14),O=o(x),S=n(18),T=o(S),z=n(26),D=o(z),k=n(25),E=o(k),P=n(6),A=o(P),j=n(24),N=o(j),I=n(20),Z=o(I),H=n(21),R=o(H),U=n(16),B=o(U),W=n(8),K=o(W),F=n(22),G=o(F),$=n(19),q=o($),V=n(17),Y=o(V),X=n(7),J=o(X),Q=1e-5,ee=256,te=100,ne=300,oe=3,re=32,ie=void 0!==_.default.createPortal,se=ie?_.default.createPortal:_.default.unstable_renderSubtreeIntoContainer,ae=function(e){return(0,G.default)(e)?e:{lat:e[0],lng:e[1]}},ue=function(e,t){return t<e?e:t},le=function(){return document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement},pe=function(e){function t(n){r(this,t);var o=i(this,e.call(this,n));if(o._getMinZoom=function(){if(o.geoService_.getWidth()>0||o.geoService_.getHeight()>0){var e=Math.ceil(o.geoService_.getWidth()/ee)+2,t=Math.ceil(o.geoService_.getHeight()/ee)+2,n=Math.max(e,t);return Math.ceil((0,N.default)(n))}return oe},o._computeMinZoom=function(e){return(0,Z.default)(e)?o._getMinZoom():e},o._mapDomResizeCallback=function(){if(o.resetSizeOnIdle_=!0,o.maps_){var e=o.props.center||o.props.defaultCenter,t=o.map_.getCenter();o.maps_.event.trigger(o.map_,"resize"),o.map_.setCenter(o.props.resetBoundsOnResize?e:t)}},o._setLayers=function(e){e.forEach(function(e){o.layers_[e]=new o.maps_[e],o.layers_[e].setMap(o.map_)})},o._renderPortal=function(){return c.default.createElement(C.default,{experimental:o.props.experimental,onChildClick:o._onChildClick,onChildMouseDown:o._onChildMouseDown,onChildMouseEnter:o._onChildMouseEnter,onChildMouseLeave:o._onChildMouseLeave,geoService:o.geoService_,insideMapPanes:!0,distanceToMouse:o.props.distanceToMouse,getHoverDistance:o._getHoverDistance,dispatcher:o.markersDispatcher_})},o._initMap=function(){if(!o.initialized_){o.initialized_=!0;var e=ae(o.props.center||o.props.defaultCenter);o.geoService_.setView(e,o.props.zoom||o.props.defaultZoom,0),o._onBoundsChanged();var t=l({},o.props.apiKey&&{key:o.props.apiKey},o.props.bootstrapURLKeys);o.props.googleMapLoader(t,o.props.heatmapLibrary).then(function(e){if(o.mounted_){var t=o.geoService_.getCenter(),n={zoom:o.props.zoom||o.props.defaultZoom,center:new e.LatLng(t.lat,t.lng)};o.props.heatmap.positions&&(Object.assign(o,{heatmap:(0,L.generateHeatmap)(e,o.props.heatmap)}),(0,L.optionsHeatmap)(o.heatmap,o.props.heatmap));var r=(0,E.default)(e,G.default),i="function"==typeof o.props.options?o.props.options(r):o.props.options,s=a(r),p=!(0,Z.default)(o.props.draggable)&&{draggable:o.props.draggable},c=o._computeMinZoom(i.minZoom);o.minZoom_=c;var f=l({},s,{minZoom:c},i,n);o.defaultDraggableOption_=(0,Z.default)(f.draggable)?o.defaultDraggableOption_:f.draggable;var d=l({},f,p);d.minZoom=ue(d.minZoom,c);var h=new e.Map(_.default.findDOMNode(o.googleMapDom_),d);o.map_=h,o.maps_=e,o._setLayers(o.props.layerTypes);var m=e.version.match(/^3\.(\d+)\./),g=m&&Number(m[1]),v=o,y=Object.assign(new e.OverlayView,{onAdd:function(){var t="undefined"!=typeof screen?screen.width+"px":"2000px",n="undefined"!=typeof screen?screen.height+"px":"2000px",o=document.createElement("div");if(o.style.backgroundColor="transparent",o.style.position="absolute",o.style.left="0px",o.style.top="0px",o.style.width=t,o.style.height=n,v.props.overlayViewDivStyle){var r=v.props.overlayViewDivStyle;"object"===("undefined"==typeof r?"undefined":u(r))&&Object.keys(r).forEach(function(e){o.style[e]=r[e]})}var i=this.getPanes();i.overlayMouseTarget.appendChild(o),v.geoService_.setMapCanvasProjection(e,y.getProjection()),ie?v.setState({overlay:o}):se(v,v._renderPortal(),o,function(){return v.setState({overlay:o})})},onRemove:function(){var e=v.state.overlay;e&&!ie&&_.default.unmountComponentAtNode(e),v.setState({overlay:null})},draw:function(){if(v.updateCounter_++,v._onBoundsChanged(h,e,!v.props.debounced),v.googleApiLoadedCalled_||(v._onGoogleApiLoaded({map:h,maps:e,ref:v.googleMapDom_}),v.googleApiLoadedCalled_=!0),v.mouse_){var t=v.geoService_.fromContainerPixelToLatLng(v.mouse_);v.mouse_.lat=t.lat,v.mouse_.lng=t.lng}v._onChildMouseMove(),v.markersDispatcher_&&(v.markersDispatcher_.emit("kON_CHANGE"),v.fireMouseEventOnIdle_&&v.markersDispatcher_.emit("kON_MOUSE_POSITION_CHANGE"))}});o.overlay_=y,y.setMap(h),o.props.heatmap.positions&&o.heatmap.setMap(h),o.props.onTilesLoaded&&e.event.addListener(h,"tilesloaded",function(){v._onTilesLoaded()}),e.event.addListener(h,"zoom_changed",function(){if(v.geoService_.getZoom()!==h.getZoom()&&(v.zoomAnimationInProgress_||(v.zoomAnimationInProgress_=!0,v._onZoomAnimationStart(h.zoom)),g<re)){var t=300;(new Date).getTime()-o.zoomControlClickTime_<t?(0,D.default)(function(){return(0,D.default)(function(){v.updateCounter_++,v._onBoundsChanged(h,e)})}):(v.updateCounter_++,v._onBoundsChanged(h,e))}}),e.event.addListener(h,"idle",function(){if(o.resetSizeOnIdle_){o._setViewSize();var t=o._computeMinZoom(o.props.options.minZoom);t!==o.minZoom_&&(o.minZoom_=t,h.setOptions({minZoom:t})),o.resetSizeOnIdle_=!1}v.zoomAnimationInProgress_&&(v.zoomAnimationInProgress_=!1,v._onZoomAnimationEnd(h.zoom)),v.updateCounter_++,v._onBoundsChanged(h,e),v.dragTime_=0,v.markersDispatcher_&&v.markersDispatcher_.emit("kON_CHANGE")}),e.event.addListener(h,"mouseover",function(){v.mouseInMap_=!0}),e.event.addListener(h,"click",function(){v.mouseInMap_=!0}),e.event.addListener(h,"mouseout",function(){v.mouseInMap_=!1,v.mouse_=null,v.markersDispatcher_.emit("kON_MOUSE_POSITION_CHANGE")}),e.event.addListener(h,"drag",function(){v.dragTime_=(new Date).getTime(),v._onDrag(h)}),e.event.addListener(h,"dragend",function(){var t=e.event.addListener(h,"idle",function(){e.event.removeListener(t),v._onDragEnd(h)})}),e.event.addListener(h,"maptypeid_changed",function(){v._onMapTypeIdChange(h.getMapTypeId())})}}).catch(function(e){throw o._onGoogleApiLoaded({map:null,maps:null,ref:o.googleMapDom_}),console.error(e),e})}},o._onGoogleApiLoaded=function(){if(o.props.onGoogleApiLoaded){var e;(e=o.props).onGoogleApiLoaded.apply(e,arguments)}},o._getHoverDistance=function(){return o.props.hoverDistance},o._onDrag=function(){var e;return o.props.onDrag&&(e=o.props).onDrag.apply(e,arguments)},o._onDragEnd=function(){var e;return o.props.onDragEnd&&(e=o.props).onDragEnd.apply(e,arguments)},o._onMapTypeIdChange=function(){var e;return o.props.onMapTypeIdChange&&(e=o.props).onMapTypeIdChange.apply(e,arguments)},o._onZoomAnimationStart=function(){var e;return o.props.onZoomAnimationStart&&(e=o.props).onZoomAnimationStart.apply(e,arguments)},o._onZoomAnimationEnd=function(){var e;return o.props.onZoomAnimationEnd&&(e=o.props).onZoomAnimationEnd.apply(e,arguments)},o._onTilesLoaded=function(){return o.props.onTilesLoaded&&o.props.onTilesLoaded()},o._onChildClick=function(){if(o.props.onChildClick){var e;return(e=o.props).onChildClick.apply(e,arguments)}},o._onChildMouseDown=function(e,t){o.childMouseDownArgs_=[e,t],o.props.onChildMouseDown&&o.props.onChildMouseDown(e,t,l({},o.mouse_))},o._onChildMouseUp=function(){if(o.childMouseDownArgs_){if(o.props.onChildMouseUp){var e;(e=o.props).onChildMouseUp.apply(e,o.childMouseDownArgs_.concat([l({},o.mouse_)]))}o.childMouseDownArgs_=null,o.childMouseUpTime_=(new Date).getTime()}},o._onChildMouseMove=function(){if(o.childMouseDownArgs_&&o.props.onChildMouseMove){var e;(e=o.props).onChildMouseMove.apply(e,o.childMouseDownArgs_.concat([l({},o.mouse_)]))}},o._onChildMouseEnter=function(){if(o.props.onChildMouseEnter){var e;return(e=o.props).onChildMouseEnter.apply(e,arguments)}},o._onChildMouseLeave=function(){if(o.props.onChildMouseLeave){var e;return(e=o.props).onChildMouseLeave.apply(e,arguments)}},o._setViewSize=function(){if(o.mounted_){if(le())o.geoService_.setViewSize(window.innerWidth,window.innerHeight);else{var e=_.default.findDOMNode(o.googleMapDom_);o.geoService_.setViewSize(e.clientWidth,e.clientHeight)}o._onBoundsChanged()}},o._onWindowResize=function(){o.resetSizeOnIdle_=!0},o._onMapMouseMove=function(e){if(o.mouseInMap_){var t=(new Date).getTime(),n=50;t-o.mouseMoveTime_>n&&(o.boundingRect_=e.currentTarget.getBoundingClientRect()),o.mouseMoveTime_=t;var r=e.clientX-o.boundingRect_.left,i=e.clientY-o.boundingRect_.top;o.mouse_||(o.mouse_={x:0,y:0,lat:0,lng:0}),o.mouse_.x=r,o.mouse_.y=i;var s=o.geoService_.fromContainerPixelToLatLng(o.mouse_);o.mouse_.lat=s.lat,o.mouse_.lng=s.lng,o._onChildMouseMove(),t-o.dragTime_<te?o.fireMouseEventOnIdle_=!0:(o.markersDispatcher_.emit("kON_MOUSE_POSITION_CHANGE"),o.fireMouseEventOnIdle_=!1)}},o._onClick=function(){var e;return o.props.onClick&&!o.childMouseDownArgs_&&(new Date).getTime()-o.childMouseUpTime_>ne&&0===o.dragTime_&&(e=o.props).onClick.apply(e,arguments)},o._onMapClick=function(e){if(o.markersDispatcher_){o._onMapMouseMove(e);var t=(new Date).getTime();t-o.dragTime_>te&&(o.mouse_&&o._onClick(l({},o.mouse_,{event:e})),o.markersDispatcher_.emit("kON_CLICK",e))}},o._onMapMouseDownNative=function(e){o.mouseInMap_&&o._onMapMouseDown(e)},o._onMapMouseDown=function(e){if(o.markersDispatcher_){var t=(new Date).getTime();t-o.dragTime_>te&&(o._onMapMouseMove(e),o.markersDispatcher_.emit("kON_MDOWN",e))}},o._onMapMouseDownCapture=function(){(0,B.default)().isChrome&&(o.zoomControlClickTime_=(new Date).getTime())},o._onKeyDownCapture=function(){(0,B.default)().isChrome&&(o.zoomControlClickTime_=(new Date).getTime())},o._isCenterDefined=function(e){return e&&((0,G.default)(e)&&(0,R.default)(e.lat)&&(0,R.default)(e.lng)||2===e.length&&(0,R.default)(e[0])&&(0,R.default)(e[1]))},o._onBoundsChanged=function(e,t,n){if(e){var r=e.getCenter();o.geoService_.setView([r.lat(),r.lng()],e.getZoom(),0)}if((o.props.onChange||o.props.onBoundsChange)&&o.geoService_.canProject()){var i=o.geoService_.getZoom(),s=o.geoService_.getBounds(),a=o.geoService_.getCenter();if(!(0,q.default)(s,o.prevBounds_,Q)&&n!==!1){var u=o.geoService_.getBounds(o.props.margin);o.props.onBoundsChange&&o.props.onBoundsChange(o.centerIsObject_?l({},a):[a.lat,a.lng],i,s,u),o.props.onChange&&o.props.onChange({center:l({},a),zoom:i,bounds:{nw:{lat:s[0],lng:s[1]},se:{lat:s[2],lng:s[3]},sw:{lat:s[4],lng:s[5]},ne:{lat:s[6],lng:s[7]}},marginBounds:{nw:{lat:u[0],lng:u[1]},se:{lat:u[2],lng:u[3]},sw:{lat:u[4],lng:u[5]},ne:{lat:u[6],lng:u[7]}},size:o.geoService_.hasSize()?{width:o.geoService_.getWidth(),height:o.geoService_.getHeight()}:{width:0,height:0}}),o.prevBounds_=s}}},o._registerChild=function(e){o.googleMapDom_=e},o.mounted_=!1,o.initialized_=!1,o.googleApiLoadedCalled_=!1,o.map_=null,o.maps_=null,o.prevBounds_=null,o.heatmap=null,o.layers_={},o.mouse_=null,o.mouseMoveTime_=0,o.boundingRect_=null,o.mouseInMap_=!0,o.dragTime_=0,o.fireMouseEventOnIdle_=!1,o.updateCounter_=0,o.markersDispatcher_=new y.default(o),o.geoService_=new T.default(ee),o.centerIsObject_=(0,G.default)(o.props.center),o.minZoom_=oe,o.defaultDraggableOption_=!0,o.zoomControlClickTime_=0,o.childMouseDownArgs_=null,o.childMouseUpTime_=0,o.googleMapDom_=null,o._isCenterDefined(o.props.center||o.props.defaultCenter)){var s=ae(o.props.center||o.props.defaultCenter);o.geoService_.setView(s,o.props.zoom||o.props.defaultZoom,0)}return o.zoomAnimationInProgress_=!1,o.state={overlay:null},o}return s(t,e),t.prototype.componentDidMount=function(){var e=this;this.mounted_=!0,(0,J.default)(window,"resize",this._onWindowResize,!1),(0,J.default)(window,"keydown",this._onKeyDownCapture,!0);var t=_.default.findDOMNode(this.googleMapDom_);t&&(0,J.default)(t,"mousedown",this._onMapMouseDownNative,!0),(0,J.default)(window,"mouseup",this._onChildMouseUp,!1);var n=l({},this.props.apiKey&&{key:this.props.apiKey},this.props.bootstrapURLKeys);if(this.props.googleMapLoader(n,this.props.heatmapLibrary),setTimeout(function(){e._setViewSize(),e._isCenterDefined(e.props.center||e.props.defaultCenter)&&e._initMap()},0,this),this.props.resetBoundsOnResize){var o=this;Y.default.addResizeListener(t,o._mapDomResizeCallback)}},t.prototype.UNSAFE_componentWillReceiveProps=function(e){var t=this;if(!this._isCenterDefined(this.props.center)&&this._isCenterDefined(e.center)&&setTimeout(function(){return t._initMap()},0),this.map_){var n=this.geoService_.getCenter();if(this._isCenterDefined(e.center)){var o=ae(e.center),r=this._isCenterDefined(this.props.center)?ae(this.props.center):null;(!r||Math.abs(o.lat-r.lat)+Math.abs(o.lng-r.lng)>Q)&&Math.abs(o.lat-n.lat)+Math.abs(o.lng-n.lng)>Q&&this.map_.panTo({lat:o.lat,lng:o.lng})}if((0,Z.default)(e.zoom)||Math.abs(e.zoom-this.props.zoom)>0&&this.map_.setZoom(e.zoom),!(0,Z.default)(this.props.draggable)&&(0,Z.default)(e.draggable)?this.map_.setOptions({draggable:this.defaultDraggableOption_}):(0,K.default)(this.props.draggable,e.draggable)||this.map_.setOptions({draggable:e.draggable}),!(0,Z.default)(e.options)&&!(0,K.default)(this.props.options,e.options)){var i=(0,E.default)(this.maps_,G.default),s="function"==typeof e.options?e.options(i):e.options;if(s=(0,A.default)(s,["zoom","center","draggable"]),"minZoom"in s){var a=this._computeMinZoom(s.minZoom);s.minZoom=ue(s.minZoom,a)}this.map_.setOptions(s)}(0,K.default)(e.layerTypes,this.props.layerTypes)||(Object.keys(this.layers_).forEach(function(e){t.layers_[e].setMap(null),delete t.layers_[e]}),this._setLayers(e.layerTypes)),this.heatmap&&!(0,K.default)(e.heatmap.positions,this.props.heatmap.positions)&&this.heatmap.setData(e.heatmap.positions.map(function(e){return{location:new t.maps_.LatLng(e.lat,e.lng),weight:e.weight}}))}},t.prototype.shouldComponentUpdate=function(e,t){return!(0,K.default)((0,A.default)(this.props,["draggable"]),(0,A.default)(e,["draggable"]))||!(0,K.default)(this.state,t)},t.prototype.componentDidUpdate=function(e){this.markersDispatcher_.emit("kON_CHANGE"),(0,K.default)(this.props.hoverDistance,e.hoverDistance)||this.markersDispatcher_.emit("kON_MOUSE_POSITION_CHANGE")},t.prototype.componentWillUnmount=function(){this.mounted_=!1;var e=_.default.findDOMNode(this.googleMapDom_);e&&e.removeEventListener("mousedown",this._onMapMouseDownNative,!0),window.removeEventListener("resize",this._onWindowResize),window.removeEventListener("keydown",this._onKeyDownCapture),window.removeEventListener("mouseup",this._onChildMouseUp,!1),this.props.resetBoundsOnResize&&Y.default.removeResizeListener(e,this._mapDomResizeCallback),this.overlay_&&this.overlay_.setMap(null),this.maps_&&this.map_&&this.props.shouldUnregisterMapOnUnmount&&(this.map_.setOptions({scrollwheel:!1}),this.maps_.event.clearInstanceListeners(this.map_)),this.props.shouldUnregisterMapOnUnmount&&(this.map_=null,this.maps_=null),this.markersDispatcher_.dispose(),this.resetSizeOnIdle_=!1,this.props.shouldUnregisterMapOnUnmount&&(delete this.map_,delete this.markersDispatcher_)},t.prototype.render=function(){var e=this.state.overlay,t=e?null:c.default.createElement(b.default,{experimental:this.props.experimental,onChildClick:this._onChildClick,onChildMouseDown:this._onChildMouseDown,onChildMouseEnter:this._onChildMouseEnter,onChildMouseLeave:this._onChildMouseLeave,geoService:this.geoService_,insideMapPanes:!1,distanceToMouse:this.props.distanceToMouse,getHoverDistance:this._getHoverDistance,dispatcher:this.markersDispatcher_});return c.default.createElement("div",{style:this.props.style,onMouseMove:this._onMapMouseMove,onMouseDownCapture:this._onMapMouseDownCapture,onClick:this._onMapClick},c.default.createElement(g.default,{registerChild:this._registerChild}),ie&&e&&se(this._renderPortal(),e),t)},t}(p.Component);pe.propTypes={apiKey:d.default.string,bootstrapURLKeys:d.default.any,defaultCenter:d.default.oneOfType([d.default.array,d.default.shape({lat:d.default.number,lng:d.default.number})]),center:d.default.oneOfType([d.default.array,d.default.shape({lat:d.default.number,lng:d.default.number})]),defaultZoom:d.default.number,zoom:d.default.number,onBoundsChange:d.default.func,onChange:d.default.func,onClick:d.default.func,onChildClick:d.default.func,onChildMouseDown:d.default.func,onChildMouseUp:d.default.func,onChildMouseMove:d.default.func,onChildMouseEnter:d.default.func,onChildMouseLeave:d.default.func,onZoomAnimationStart:d.default.func,onZoomAnimationEnd:d.default.func,onDrag:d.default.func,onDragEnd:d.default.func,onMapTypeIdChange:d.default.func,onTilesLoaded:d.default.func,options:d.default.any,distanceToMouse:d.default.func,hoverDistance:d.default.number,debounced:d.default.bool,margin:d.default.array,googleMapLoader:d.default.any,onGoogleApiLoaded:d.default.func,yesIWantToUseGoogleMapApiInternals:d.default.bool,draggable:d.default.bool,style:d.default.any,resetBoundsOnResize:d.default.bool,layerTypes:d.default.arrayOf(d.default.string),shouldUnregisterMapOnUnmount:d.default.bool},pe.defaultProps={distanceToMouse:function(e,t){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))},hoverDistance:30,debounced:!0,options:a,googleMapLoader:O.default,yesIWantToUseGoogleMapApiInternals:!1,style:{width:"100%",height:"100%",margin:0,padding:0,position:"relative"},layerTypes:[],heatmap:{},heatmapLibrary:!1,shouldUnregisterMapOnUnmount:!0},pe.googleMapLoader=O.default,t.default=pe},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(1),u=o(a),l={width:"100%",height:"100%",left:0,top:0,margin:0,padding:0,position:"absolute"},p=function(e){function t(){return r(this,t),i(this,e.apply(this,arguments))}return s(t,e),t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.render=function(){var e=this.props.registerChild;return u.default.createElement("div",{ref:e,style:l})},t}(a.Component);t.default=p},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=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.default=function(e){return s.default.createElement("div",{style:l},s.default.createElement(u.default,r({},e,{prerender:!0})))};var i=n(1),s=o(i),a=n(3),u=o(a),l={width:"50%",height:"50%",left:"50%",top:"50%",margin:0,padding:0,position:"absolute"}},function(e,t,n){"use strict";t.__esModule=!0;var o="https://maps",r=o+".googleapis.com",i="/maps/api/js?callback=_$_google_map_initialize_$_",s=null,a=void 0,u=void 0,l=new Promise(function(e){u=e});t.default=function(e,t){return s||(s=n(30)),e?a?a:(a=new Promise(function(n,o){if("undefined"==typeof window)return void o(new Error("google map cannot be loaded outside browser env"));if(window.google&&window.google.maps)return void n(window.google.maps);"undefined"!=typeof window._$_google_map_initialize_$_&&o(new Error("google map initialization error")),window._$_google_map_initialize_$_=function(){delete window._$_google_map_initialize_$_,n(window.google.maps)};var a=Object.keys(e).reduce(function(t,n){return t+"&"+n+"="+e[n]},""),u=t?"&libraries=visualization":"";s(""+r+i+a+u,function(){return"undefined"==typeof window.google&&o(new Error("google map initialization error (not loaded)"))})}),u(a),a):l}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");
2}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(27),u=o(a),l=function(e){function t(n){r(this,t);var o=i(this,e.call(this));return o.gmapInstance=n,o}return s(t,e),t.prototype.getChildren=function(){return this.gmapInstance.props.children},t.prototype.getMousePosition=function(){return this.gmapInstance.mouse_},t.prototype.getUpdateCounter=function(){return this.gmapInstance.updateCounter_},t.prototype.dispose=function(){this.gmapInstance=null,this.removeAllListeners()},t}(u.default);t.default=l},function(e,t){"use strict";function n(){if(o)return o;if("undefined"!=typeof navigator){var e=navigator.userAgent.indexOf("MSIE")>-1,t=navigator.userAgent.indexOf("Firefox")>-1,n=navigator.userAgent.toLowerCase().indexOf("op")>-1,r=navigator.userAgent.indexOf("Chrome")>-1,i=navigator.userAgent.indexOf("Safari")>-1;return r&&i&&(i=!1),r&&n&&(r=!1),o={isExplorer:e,isFirefox:t,isOpera:n,isChrome:r,isSafari:i}}return o={isChrome:!0,isExplorer:!1,isFirefox:!1,isOpera:!1,isSafari:!1}}t.__esModule=!0,t.default=n;var o=null},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var r,i=n(7),s=o(i),a=!("undefined"==typeof window||!window.document||!window.document.createElement);r=a?window:"undefined"!=typeof self?self:void 0;var u="undefined"!=typeof document&&document.attachEvent,l=!1;if(a&&!u){var p=function(){var e=r.requestAnimationFrame||r.mozRequestAnimationFrame||r.webkitRequestAnimationFrame||function(e){return r.setTimeout(e,20)};return function(t){return e(t)}}(),c=function(){var e=r.cancelAnimationFrame||r.mozCancelAnimationFrame||r.webkitCancelAnimationFrame||r.clearTimeout;return function(t){return e(t)}}(),f=function(e){var t=e.__resizeTriggers__,n=t.firstElementChild,o=t.lastElementChild,r=n.firstElementChild;o.scrollLeft=o.scrollWidth,o.scrollTop=o.scrollHeight,r.style.width=n.offsetWidth+1+"px",r.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},d=function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height},h=function(e){var t=this;f(this),this.__resizeRAF__&&c(this.__resizeRAF__),this.__resizeRAF__=p(function(){d(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach(function(n){n.call(t,e)}))})},_=!1,m="animation",g="",v="animationstart",y="Webkit Moz O ms".split(" "),M="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),C="";if(a){var w=document.createElement("fakeelement");if(void 0!==w.style.animationName&&(_=!0),_===!1)for(var b=0;b<y.length;b++)if(void 0!==w.style[y[b]+"AnimationName"]){C=y[b],m=C+"Animation",g="-"+C.toLowerCase()+"-",v=M[b],_=!0;break}}var L="resizeanim",x="@"+g+"keyframes "+L+" { from { opacity: 0; } to { opacity: 0; } } ",O=g+"animation: 1ms "+L+"; "}var S=function(){if(!l){var e=(x?x:"")+".resize-triggers { "+(O?O:"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n),l=!0}},T=function(e,t){if(void 0===e.parentNode){var n=document.createElement("div");e.parentNode=n}e=e.parentNode,u?e.attachEvent("onresize",t):(e.__resizeTriggers__||("static"==getComputedStyle(e).position&&(e.style.position="relative"),S(),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=document.createElement("div")).className="resize-triggers",e.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',e.appendChild(e.__resizeTriggers__),f(e),(0,s.default)(e,"scroll",h,!0),v&&e.__resizeTriggers__.addEventListener(v,function(t){t.animationName==L&&f(e)})),e.__resizeListeners__.push(t))},z=function(e,t){e=e.parentNode,u?e.detachEvent("onresize",t):(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.removeEventListener("scroll",h),e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)))};e.exports={addResizeListener:T,removeResizeListener:z}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=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},s=n(2),a=o(s),u=n(4),l=o(u),p=n(23),c=o(p),f=function(){function e(t){r(this,e),this.hasSize_=!1,this.hasView_=!1,this.transform_=new c.default(t||512)}return e.prototype.setView=function(e,t,n){this.transform_.center=l.default.convert(e),this.transform_.zoom=+t,this.transform_.bearing=+n,this.hasView_=!0},e.prototype.setViewSize=function(e,t){this.transform_.width=e,this.transform_.height=t,this.hasSize_=!0},e.prototype.setMapCanvasProjection=function(e,t){this.maps_=e,this.mapCanvasProjection_=t},e.prototype.canProject=function(){return this.hasSize_&&this.hasView_},e.prototype.hasSize=function(){return this.hasSize_},e.prototype.fromLatLngToCenterPixel=function(e){return this.transform_.locationPoint(l.default.convert(e))},e.prototype.fromLatLngToDivPixel=function(e){if(this.mapCanvasProjection_){var t=new this.maps_.LatLng(e.lat,e.lng);return this.mapCanvasProjection_.fromLatLngToDivPixel(t)}return this.fromLatLngToCenterPixel(e)},e.prototype.fromLatLngToContainerPixel=function(e){if(this.mapCanvasProjection_){var t=new this.maps_.LatLng(e.lat,e.lng);return this.mapCanvasProjection_.fromLatLngToContainerPixel(t)}var n=this.fromLatLngToCenterPixel(e);return n.x-=this.transform_.worldSize*Math.round(n.x/this.transform_.worldSize),n.x+=this.transform_.width/2,n.y+=this.transform_.height/2,n},e.prototype.fromContainerPixelToLatLng=function(e){if(this.mapCanvasProjection_){var t=this.mapCanvasProjection_.fromContainerPixelToLatLng(e);return{lat:t.lat(),lng:t.lng()}}var n=i({},e);n.x-=this.transform_.width/2,n.y-=this.transform_.height/2;var o=this.transform_.pointLocation(a.default.convert(n));return o.lng-=360*Math.round(o.lng/360),o},e.prototype.getWidth=function(){return this.transform_.width},e.prototype.getHeight=function(){return this.transform_.height},e.prototype.getZoom=function(){return this.transform_.zoom},e.prototype.getCenter=function(){var e=this.transform_.pointLocation({x:0,y:0});return e},e.prototype.getBounds=function(e,t){var n=e&&e[0]||0,o=e&&e[1]||0,r=e&&e[2]||0,i=e&&e[3]||0;if(this.getWidth()-o-i>0&&this.getHeight()-n-r>0){var s=this.transform_.pointLocation(a.default.convert({x:i-this.getWidth()/2,y:n-this.getHeight()/2})),u=this.transform_.pointLocation(a.default.convert({x:this.getWidth()/2-o,y:this.getHeight()/2-r})),l=[s.lat,s.lng,u.lat,u.lng,u.lat,s.lng,s.lat,u.lng];return t&&(l=l.map(function(e){return Math.round(e*t)/t})),l}return[0,0,0,0]},e}();t.default=f},function(e,t){"use strict";function n(e,t,n){if(e&&t){for(var o=0;o!==e.length;++o)if(Math.abs(e[o]-t[o])>n)return!1;return!0}return!1}t.__esModule=!0,t.default=n},function(e,t){"use strict";t.__esModule=!0;var 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},o=function(e){if(null!==e&&"object"===("undefined"==typeof e?"undefined":n(e))){if(0===Object.keys(e).length)return!0}else if(null===e||void 0===e||""===e)return!0;return!1};t.default=o},function(e,t){"use strict";function n(e){return!!e&&"object"===("undefined"==typeof e?"undefined":r(e))}function o(e){var t="[object Number]";return"number"==typeof e||n(e)&&i.call(e)===t}t.__esModule=!0;var r="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};t.default=o;var i=Object.prototype.toString},function(e,t){"use strict";function n(e){if(!e||"object"!==("undefined"==typeof e?"undefined":o(e)))return!1;var t="function"==typeof e.constructor?Object.getPrototypeOf(e):Object.prototype;if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&r(n)===r(Object)}t.__esModule=!0;var o="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};t.default=n;var r=function(e){return Function.prototype.toString.call(e)}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(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)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=n(2),a=o(s),u=n(4),l=o(u),p=n(5),c=function(){function e(t,n,o){r(this,e),this.tileSize=t||512,this._minZoom=n||0,this._maxZoom=o||52,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this.zoom=0,this.center=new l.default(0,0),this.angle=0}return e.prototype.zoomScale=function(e){return Math.pow(2,e)},e.prototype.scaleZoom=function(e){return Math.log(e)/Math.LN2},e.prototype.project=function(e,t){return new a.default(this.lngX(e.lng,t),this.latY(e.lat,t))},e.prototype.unproject=function(e,t){return new l.default(this.yLat(e.y,t),this.xLng(e.x,t))},e.prototype.lngX=function(e,t){return(180+e)*(t||this.worldSize)/360},e.prototype.latY=function(e,t){var n=180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360));return(180-n)*(t||this.worldSize)/360},e.prototype.xLng=function(e,t){return 360*e/(t||this.worldSize)-180},e.prototype.yLat=function(e,t){var n=180-360*e/(t||this.worldSize);return 360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90},e.prototype.locationPoint=function(e){var t=this.project(e);return this.centerPoint._sub(this.point._sub(t)._rotate(this.angle))},e.prototype.pointLocation=function(e){var t=this.centerPoint._sub(e)._rotate(-this.angle);return this.unproject(this.point.sub(t))},i(e,[{key:"minZoom",get:function(){return this._minZoom},set:function(e){this._minZoom=e,this.zoom=Math.max(this.zoom,e)}},{key:"maxZoom",get:function(){return this._maxZoom},set:function(e){this._maxZoom=e,this.zoom=Math.min(this.zoom,e)}},{key:"worldSize",get:function(){return this.tileSize*this.scale}},{key:"centerPoint",get:function(){return new a.default(0,0)}},{key:"size",get:function(){return new a.default(this.width,this.height)}},{key:"bearing",get:function(){return-this.angle/Math.PI*180},set:function(e){this.angle=-(0,p.wrap)(e,-180,180)*Math.PI/180}},{key:"zoom",get:function(){return this._zoom},set:function(e){var t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom}},{key:"x",get:function(){return this.lngX(this.center.lng)}},{key:"y",get:function(){return this.latY(this.center.lat)}},{key:"point",get:function(){return new a.default(this.x,this.y)}}]),e}();t.default=c},function(e,t){"use strict";t.__esModule=!0;var n=Math.log2?Math.log2:function(e){return Math.log(e)/Math.LN2};t.default=n},function(e,t){"use strict";function n(e,t){return Object.keys(e).reduce(function(n,o){return t(e[o])&&(n[o]=e[o]),n},{})}t.__esModule=!0,t.default=n},function(e,t){"use strict";function n(e){if(window.requestAnimationFrame)return window.requestAnimationFrame(e);var t=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return t?t(e):window.setTimeout(e,1e3/60)}t.__esModule=!0,t.default=n},function(e,t,n){"use strict";function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function r(){}var i=Object.prototype.hasOwnProperty,s="function"!=typeof Object.create&&"~";r.prototype._events=void 0,r.prototype.eventNames=function(){var e,t=this._events,n=[];if(!t)return n;for(e in t)i.call(t,e)&&n.push(s?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},r.prototype.listeners=function(e,t){var n=s?s+e:e,o=this._events&&this._events[n];if(t)return!!o;if(!o)return[];if(o.fn)return[o.fn];for(var r=0,i=o.length,a=new Array(i);r<i;r++)a[r]=o[r].fn;return a},r.prototype.emit=function(e,t,n,o,r,i){var a=s?s+e:e;if(!this._events||!this._events[a])return!1;var u,l,p=this._events[a],c=arguments.length;if("function"==typeof p.fn){switch(p.once&&this.removeListener(e,p.fn,void 0,!0),c){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,t),!0;case 3:return p.fn.call(p.context,t,n),!0;case 4:return p.fn.call(p.context,t,n,o),!0;case 5:return p.fn.call(p.context,t,n,o,r),!0;case 6:return p.fn.call(p.context,t,n,o,r,i),!0}for(l=1,u=new Array(c-1);l<c;l++)u[l-1]=arguments[l];p.fn.apply(p.context,u)}else{var f,d=p.length;for(l=0;l<d;l++)switch(p[l].once&&this.removeListener(e,p[l].fn,void 0,!0),c){case 1:p[l].fn.call(p[l].context);break;case 2:p[l].fn.call(p[l].context,t);break;case 3:p[l].fn.call(p[l].context,t,n);break;default:if(!u)for(f=1,u=new Array(c-1);f<c;f++)u[f-1]=arguments[f];p[l].fn.apply(p[l].context,u)}}return!0},r.prototype.on=function(e,t,n){var r=new o(t,n||this),i=s?s+e:e;return this._events||(this._events=s?{}:Object.create(null)),this._events[i]?this._events[i].fn?this._events[i]=[this._events[i],r]:this._events[i].push(r):this._events[i]=r,this},r.prototype.once=function(e,t,n){var r=new o(t,n||this,!0),i=s?s+e:e;return this._events||(this._events=s?{}:Object.create(null)),this._events[i]?this._events[i].fn?this._events[i]=[this._events[i],r]:this._events[i].push(r):this._events[i]=r,this},r.prototype.removeListener=function(e,t,n,o){var r=s?s+e:e;if(!this._events||!this._events[r])return this;var i=this._events[r],a=[];if(t)if(i.fn)(i.fn!==t||o&&!i.once||n&&i.context!==n)&&a.push(i);else for(var u=0,l=i.length;u<l;u++)(i[u].fn!==t||o&&!i[u].once||n&&i[u].context!==n)&&a.push(i[u]);return a.length?this._events[r]=1===a.length?a[0]:a:delete this._events[r],this},r.prototype.removeAllListeners=function(e){return this._events?(e?delete this._events[s?s+e:e]:this._events=s?{}:Object.create(null),this):this},r.prototype.off=r.prototype.removeListener,r.prototype.addListener=r.prototype.on,r.prototype.setMaxListeners=function(){return this},r.prefixed=s,e.exports=r},function(e,t,n){"use strict";function o(){}var r=n(29);e.exports=function(){function e(e,t,n,o,i,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=n},function(e,t,n){var o,r;/*!
3 * $script.js JS loader & dependency manager
4 * https://github.com/ded/script.js
5 * (c) Dustin Diaz 2014 | License MIT
6 */
7!function(i,s){"undefined"!=typeof e&&e.exports?e.exports=s():(o=s,r="function"==typeof o?o.call(t,n,t,e):o,!(void 0!==r&&(e.exports=r)))}("$script",function(){function e(e,t){for(var n=0,o=e.length;n<o;++n)if(!t(e[n]))return u;return 1}function t(t,n){e(t,function(e){return!n(e)})}function n(i,s,a){function u(e){return e.call?e():f[e]}function p(){if(!--v){f[g]=1,m&&m();for(var n in h)e(n.split("|"),u)&&!t(h[n],u)&&(h[n]=[])}}i=i[l]?i:[i];var c=s&&s.call,m=c?s:a,g=c?i.join(""):s,v=i.length;return setTimeout(function(){t(i,function e(t,n){return null===t?p():(n||/^https?:\/\//.test(t)||!r||(t=t.indexOf(".js")===-1?r+t+".js":r+t),_[t]?(g&&(d[g]=1),2==_[t]?p():setTimeout(function(){e(t,!0)},0)):(_[t]=1,g&&(d[g]=1),void o(t,p)))})},0),n}function o(e,t){var n,o=s.createElement("script");o.onload=o.onerror=o[c]=function(){o[p]&&!/^c|loade/.test(o[p])||n||(o.onload=o[c]=null,n=1,_[e]=2,t())},o.async=1,o.src=i?e+(e.indexOf("?")===-1?"?":"&")+i:e,a.insertBefore(o,a.lastChild)}var r,i,s=document,a=s.getElementsByTagName("head")[0],u=!1,l="push",p="readyState",c="onreadystatechange",f={},d={},h={},_={};return n.get=o,n.order=function(e,t,o){!function r(i){i=e.shift(),e.length?n(i,r):n(i,t,o)}()},n.path=function(e){r=e},n.urlArgs=function(e){i=e},n.ready=function(o,r,i){o=o[l]?o:[o];var s=[];return!t(o,function(e){f[e]||s[l](e)})&&e(o,function(e){return f[e]})?r():!function(e){h[e]=h[e]||[],h[e][l](r),i&&i(s)}(o.join("|")),n},n.done=function(e){n([null],e)},n})},function(e,n){e.exports=t}])});
\No newline at end of file