window.scrollY&&t.paused?(t.paused=!1,setTimeout((function(){return t.start()}),t.options.scrollSpyDelay),t.options.scrollSpyOnce&&(t.once=!0)):(window.scrollY>a||s>i)&&!t.paused&&t.reset()}},i.prototype.determineDirectionAndSmartEasing=function(){var t=this.finalEndVal?this.finalEndVal:this.endVal;this.countDown=this.startVal>t;var i=t-this.startVal;if(Math.abs(i)>this.options.smartEasingThreshold&&this.options.useEasing){this.finalEndVal=t;var n=this.countDown?1:-1;this.endVal=t+n*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=t,this.finalEndVal=null;null!==this.finalEndVal?this.useEasing=!1:this.useEasing=this.options.useEasing},i.prototype.start=function(t){this.error||(this.options.onStartCallback&&this.options.onStartCallback(),t&&(this.options.onCompleteCallback=t),this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},i.prototype.pauseResume=function(){this.paused?(this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count)):cancelAnimationFrame(this.rAF),this.paused=!this.paused},i.prototype.reset=function(){cancelAnimationFrame(this.rAF),this.paused=!0,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)},i.prototype.update=function(t){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(t),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,null==this.finalEndVal&&this.resetDuration(),this.finalEndVal=null,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},i.prototype.printValue=function(t){var i;if(this.el){var n=this.formattingFn(t);if(null===(i=this.options.plugin)||void 0===i?void 0:i.render)this.options.plugin.render(this.el,n);else if(\"INPUT\"===this.el.tagName)this.el.value=n;else\"text\"===this.el.tagName||\"tspan\"===this.el.tagName?this.el.textContent=n:this.el.innerHTML=n}},i.prototype.ensureNumber=function(t){return\"number\"==typeof t&&!isNaN(t)},i.prototype.validateValue=function(t){var i=Number(t);return this.ensureNumber(i)?i:(this.error=\"[CountUp] invalid start or end value: \".concat(t),null)},i.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},i}();export{i as CountUp};\n","var QueryHandler = require('./QueryHandler');\nvar each = require('./Util').each;\n\n/**\n * Represents a single media query, manages it's state and registered handlers for this query\n *\n * @constructor\n * @param {string} query the media query string\n * @param {boolean} [isUnconditional=false] whether the media query should run regardless of whether the conditions are met. Primarily for helping older browsers deal with mobile-first design\n */\nfunction MediaQuery(query, isUnconditional) {\n this.query = query;\n this.isUnconditional = isUnconditional;\n this.handlers = [];\n this.mql = window.matchMedia(query);\n\n var self = this;\n this.listener = function(mql) {\n // Chrome passes an MediaQueryListEvent object, while other browsers pass MediaQueryList directly\n self.mql = mql.currentTarget || mql;\n self.assess();\n };\n this.mql.addListener(this.listener);\n}\n\nMediaQuery.prototype = {\n\n constuctor : MediaQuery,\n\n /**\n * add a handler for this query, triggering if already active\n *\n * @param {object} handler\n * @param {function} handler.match callback for when query is activated\n * @param {function} [handler.unmatch] callback for when query is deactivated\n * @param {function} [handler.setup] callback for immediate execution when a query handler is registered\n * @param {boolean} [handler.deferSetup=false] should the setup callback be deferred until the first time the handler is matched?\n */\n addHandler : function(handler) {\n var qh = new QueryHandler(handler);\n this.handlers.push(qh);\n\n this.matches() && qh.on();\n },\n\n /**\n * removes the given handler from the collection, and calls it's destroy methods\n *\n * @param {object || function} handler the handler to remove\n */\n removeHandler : function(handler) {\n var handlers = this.handlers;\n each(handlers, function(h, i) {\n if(h.equals(handler)) {\n h.destroy();\n return !handlers.splice(i,1); //remove from array and exit each early\n }\n });\n },\n\n /**\n * Determine whether the media query should be considered a match\n *\n * @return {Boolean} true if media query can be considered a match, false otherwise\n */\n matches : function() {\n return this.mql.matches || this.isUnconditional;\n },\n\n /**\n * Clears all handlers and unbinds events\n */\n clear : function() {\n each(this.handlers, function(handler) {\n handler.destroy();\n });\n this.mql.removeListener(this.listener);\n this.handlers.length = 0; //clear array\n },\n\n /*\n * Assesses the query, turning on all handlers if it matches, turning them off if it doesn't match\n */\n assess : function() {\n var action = this.matches() ? 'on' : 'off';\n\n each(this.handlers, function(handler) {\n handler[action]();\n });\n }\n};\n\nmodule.exports = MediaQuery;\n","var MediaQuery = require('./MediaQuery');\nvar Util = require('./Util');\nvar each = Util.each;\nvar isFunction = Util.isFunction;\nvar isArray = Util.isArray;\n\n/**\n * Allows for registration of query handlers.\n * Manages the query handler's state and is responsible for wiring up browser events\n *\n * @constructor\n */\nfunction MediaQueryDispatch () {\n if(!window.matchMedia) {\n throw new Error('matchMedia not present, legacy browsers require a polyfill');\n }\n\n this.queries = {};\n this.browserIsIncapable = !window.matchMedia('only all').matches;\n}\n\nMediaQueryDispatch.prototype = {\n\n constructor : MediaQueryDispatch,\n\n /**\n * Registers a handler for the given media query\n *\n * @param {string} q the media query\n * @param {object || Array || Function} options either a single query handler object, a function, or an array of query handlers\n * @param {function} options.match fired when query matched\n * @param {function} [options.unmatch] fired when a query is no longer matched\n * @param {function} [options.setup] fired when handler first triggered\n * @param {boolean} [options.deferSetup=false] whether setup should be run immediately or deferred until query is first matched\n * @param {boolean} [shouldDegrade=false] whether this particular media query should always run on incapable browsers\n */\n register : function(q, options, shouldDegrade) {\n var queries = this.queries,\n isUnconditional = shouldDegrade && this.browserIsIncapable;\n\n if(!queries[q]) {\n queries[q] = new MediaQuery(q, isUnconditional);\n }\n\n //normalise to object in an array\n if(isFunction(options)) {\n options = { match : options };\n }\n if(!isArray(options)) {\n options = [options];\n }\n each(options, function(handler) {\n if (isFunction(handler)) {\n handler = { match : handler };\n }\n queries[q].addHandler(handler);\n });\n\n return this;\n },\n\n /**\n * unregisters a query and all it's handlers, or a specific handler for a query\n *\n * @param {string} q the media query to target\n * @param {object || function} [handler] specific handler to unregister\n */\n unregister : function(q, handler) {\n var query = this.queries[q];\n\n if(query) {\n if(handler) {\n query.removeHandler(handler);\n }\n else {\n query.clear();\n delete this.queries[q];\n }\n }\n\n return this;\n }\n};\n\nmodule.exports = MediaQueryDispatch;\n","/**\n * Delegate to handle a media query being matched and unmatched.\n *\n * @param {object} options\n * @param {function} options.match callback for when the media query is matched\n * @param {function} [options.unmatch] callback for when the media query is unmatched\n * @param {function} [options.setup] one-time callback triggered the first time a query is matched\n * @param {boolean} [options.deferSetup=false] should the setup callback be run immediately, rather than first time query is matched?\n * @constructor\n */\nfunction QueryHandler(options) {\n this.options = options;\n !options.deferSetup && this.setup();\n}\n\nQueryHandler.prototype = {\n\n constructor : QueryHandler,\n\n /**\n * coordinates setup of the handler\n *\n * @function\n */\n setup : function() {\n if(this.options.setup) {\n this.options.setup();\n }\n this.initialised = true;\n },\n\n /**\n * coordinates setup and triggering of the handler\n *\n * @function\n */\n on : function() {\n !this.initialised && this.setup();\n this.options.match && this.options.match();\n },\n\n /**\n * coordinates the unmatch event for the handler\n *\n * @function\n */\n off : function() {\n this.options.unmatch && this.options.unmatch();\n },\n\n /**\n * called when a handler is to be destroyed.\n * delegates to the destroy or unmatch callbacks, depending on availability.\n *\n * @function\n */\n destroy : function() {\n this.options.destroy ? this.options.destroy() : this.off();\n },\n\n /**\n * determines equality by reference.\n * if object is supplied compare options, if function, compare match callback\n *\n * @function\n * @param {object || function} [target] the target for comparison\n */\n equals : function(target) {\n return this.options === target || this.options.match === target;\n }\n\n};\n\nmodule.exports = QueryHandler;\n","/**\n * Helper function for iterating over a collection\n *\n * @param collection\n * @param fn\n */\nfunction each(collection, fn) {\n var i = 0,\n length = collection.length,\n cont;\n\n for(i; i < length; i++) {\n cont = fn(collection[i], i);\n if(cont === false) {\n break; //allow early exit\n }\n }\n}\n\n/**\n * Helper function for determining whether target object is an array\n *\n * @param target the object under test\n * @return {Boolean} true if array, false otherwise\n */\nfunction isArray(target) {\n return Object.prototype.toString.apply(target) === '[object Array]';\n}\n\n/**\n * Helper function for determining whether target object is a function\n *\n * @param target the object under test\n * @return {Boolean} true if function, false otherwise\n */\nfunction isFunction(target) {\n return typeof target === 'function';\n}\n\nmodule.exports = {\n isFunction : isFunction,\n isArray : isArray,\n each : each\n};\n","var MediaQueryDispatch = require('./MediaQueryDispatch');\nmodule.exports = new MediaQueryDispatch();\n","(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(['exports', 'react', 'react-dom', './lib/ScriptCache', './lib/GoogleApi'], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports, require('react'), require('react-dom'), require('./lib/ScriptCache'), require('./lib/GoogleApi'));\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports, global.react, global.reactDom, global.ScriptCache, global.GoogleApi);\n global.GoogleApiComponent = mod.exports;\n }\n})(this, function (exports, _react, _reactDom, _ScriptCache, _GoogleApi) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.wrapper = undefined;\n\n var _react2 = _interopRequireDefault(_react);\n\n var _reactDom2 = _interopRequireDefault(_reactDom);\n\n var _GoogleApi2 = _interopRequireDefault(_GoogleApi);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n function _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n }\n\n var defaultMapConfig = {};\n\n var serialize = function serialize(obj) {\n return JSON.stringify(obj);\n };\n var isSame = function isSame(obj1, obj2) {\n return obj1 === obj2 || serialize(obj1) === serialize(obj2);\n };\n\n var defaultCreateCache = function defaultCreateCache(options) {\n options = options || {};\n var apiKey = options.apiKey;\n var libraries = options.libraries || ['places'];\n var version = options.version || '3';\n var language = options.language || 'en';\n var url = options.url;\n var client = options.client;\n var region = options.region;\n\n return (0, _ScriptCache.ScriptCache)({\n google: (0, _GoogleApi2.default)({\n apiKey: apiKey,\n language: language,\n libraries: libraries,\n version: version,\n url: url,\n client: client,\n region: region\n })\n });\n };\n\n var DefaultLoadingContainer = function DefaultLoadingContainer(props) {\n return _react2.default.createElement(\n 'div',\n null,\n 'Loading...'\n );\n };\n\n var wrapper = exports.wrapper = function wrapper(input) {\n return function (WrappedComponent) {\n var Wrapper = function (_React$Component) {\n _inherits(Wrapper, _React$Component);\n\n function Wrapper(props, context) {\n _classCallCheck(this, Wrapper);\n\n // Build options from input\n var _this = _possibleConstructorReturn(this, (Wrapper.__proto__ || Object.getPrototypeOf(Wrapper)).call(this, props, context));\n\n var options = typeof input === 'function' ? input(props) : input;\n\n // Initialize required Google scripts and other configured options\n _this.initialize(options);\n\n _this.state = {\n loaded: false,\n map: null,\n google: null,\n options: options\n };\n\n _this.mapRef = _react2.default.createRef();\n return _this;\n }\n\n _createClass(Wrapper, [{\n key: 'UNSAFE_componentWillReceiveProps',\n value: function UNSAFE_componentWillReceiveProps(props) {\n // Do not update input if it's not dynamic\n if (typeof input !== 'function') {\n return;\n }\n\n // Get options to compare\n var prevOptions = this.state.options;\n var options = typeof input === 'function' ? input(props) : input;\n\n // Ignore when options are not changed\n if (isSame(options, prevOptions)) {\n return;\n }\n\n // Initialize with new options\n this.initialize(options);\n\n // Save new options in component state,\n // and remove information about previous API handlers\n this.setState({\n options: options,\n loaded: false,\n google: null\n });\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.unregisterLoadHandler) {\n this.unregisterLoadHandler();\n }\n }\n }, {\n key: 'initialize',\n value: function initialize(options) {\n // Avoid race condition: remove previous 'load' listener\n if (this.unregisterLoadHandler) {\n this.unregisterLoadHandler();\n this.unregisterLoadHandler = null;\n }\n\n // Load cache factory\n var createCache = options.createCache || defaultCreateCache;\n\n // Build script\n this.scriptCache = createCache(options);\n this.unregisterLoadHandler = this.scriptCache.google.onLoad(this.onLoad.bind(this));\n\n // Store information about loading container\n this.LoadingContainer = options.LoadingContainer || DefaultLoadingContainer;\n }\n }, {\n key: 'onLoad',\n value: function onLoad(err, tag) {\n this._gapi = window.google;\n\n this.setState({ loaded: true, google: this._gapi });\n }\n }, {\n key: 'render',\n value: function render() {\n var LoadingContainer = this.LoadingContainer;\n\n if (!this.state.loaded) {\n return _react2.default.createElement(LoadingContainer, null);\n }\n\n var props = Object.assign({}, this.props, {\n loaded: this.state.loaded,\n google: window.google\n });\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(WrappedComponent, props),\n _react2.default.createElement('div', { ref: this.mapRef })\n );\n }\n }]);\n\n return Wrapper;\n }(_react2.default.Component);\n\n return Wrapper;\n };\n };\n\n exports.default = wrapper;\n});","(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(['exports', 'react', 'prop-types', '../lib/arePathsEqual', '../lib/String'], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports, require('react'), require('prop-types'), require('../lib/arePathsEqual'), require('../lib/String'));\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports, global.react, global.propTypes, global.arePathsEqual, global.String);\n global.Circle = mod.exports;\n }\n})(this, function (exports, _react, _propTypes, _arePathsEqual, _String) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.Circle = undefined;\n\n var _react2 = _interopRequireDefault(_react);\n\n var _propTypes2 = _interopRequireDefault(_propTypes);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n var _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n function _objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n function _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n }\n\n var evtNames = ['click', 'mouseout', 'mouseover'];\n\n var wrappedPromise = function wrappedPromise() {\n var wrappedPromise = {},\n promise = new Promise(function (resolve, reject) {\n wrappedPromise.resolve = resolve;\n wrappedPromise.reject = reject;\n });\n wrappedPromise.then = promise.then.bind(promise);\n wrappedPromise.catch = promise.catch.bind(promise);\n wrappedPromise.promise = promise;\n\n return wrappedPromise;\n };\n\n var Circle = exports.Circle = function (_React$Component) {\n _inherits(Circle, _React$Component);\n\n function Circle() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Circle);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Circle.__proto__ || Object.getPrototypeOf(Circle)).call.apply(_ref, [this].concat(args))), _this), _this.centerChanged = function (newCenter) {\n var _this$props$center = _this.props.center,\n lat = _this$props$center.lat,\n lng = _this$props$center.lng;\n\n return lat !== newCenter.lat || lng !== newCenter.lng;\n }, _this.propsChanged = function (newProps) {\n if (_this.centerChanged(newProps.center)) return true;\n\n return Object.keys(Circle.propTypes).some(function (key) {\n return _this.props[key] !== newProps[key];\n });\n }, _this.destroyCircle = function () {\n if (_this.circle) {\n _this.circle.setMap(null);\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Circle, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.circlePromise = wrappedPromise();\n this.renderCircle();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n var _props = this.props,\n path = _props.path,\n map = _props.map;\n\n\n if (this.propsChanged(prevProps) || map !== prevProps.map || !(0, _arePathsEqual.arePathsEqual)(path, prevProps.path)) {\n this.destroyCircle();\n this.renderCircle();\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.destroyCircle();\n }\n }, {\n key: 'renderCircle',\n value: function renderCircle() {\n var _this2 = this;\n\n var _props2 = this.props,\n map = _props2.map,\n google = _props2.google,\n center = _props2.center,\n radius = _props2.radius,\n strokeColor = _props2.strokeColor,\n strokeOpacity = _props2.strokeOpacity,\n strokeWeight = _props2.strokeWeight,\n fillColor = _props2.fillColor,\n fillOpacity = _props2.fillOpacity,\n draggable = _props2.draggable,\n visible = _props2.visible,\n props = _objectWithoutProperties(_props2, ['map', 'google', 'center', 'radius', 'strokeColor', 'strokeOpacity', 'strokeWeight', 'fillColor', 'fillOpacity', 'draggable', 'visible']);\n\n if (!google) {\n return null;\n }\n\n var params = _extends({}, props, {\n map: map,\n center: center,\n radius: radius,\n draggable: draggable,\n visible: visible,\n options: {\n strokeColor: strokeColor,\n strokeOpacity: strokeOpacity,\n strokeWeight: strokeWeight,\n fillColor: fillColor,\n fillOpacity: fillOpacity\n }\n });\n\n this.circle = new google.maps.Circle(params);\n\n evtNames.forEach(function (e) {\n _this2.circle.addListener(e, _this2.handleEvent(e));\n });\n\n this.circlePromise.resolve(this.circle);\n }\n }, {\n key: 'getCircle',\n value: function getCircle() {\n return this.circlePromise;\n }\n }, {\n key: 'handleEvent',\n value: function handleEvent(evt) {\n var _this3 = this;\n\n return function (e) {\n var evtName = 'on' + (0, _String.camelize)(evt);\n if (_this3.props[evtName]) {\n _this3.props[evtName](_this3.props, _this3.circle, e);\n }\n };\n }\n }, {\n key: 'render',\n value: function render() {\n return null;\n }\n }]);\n\n return Circle;\n }(_react2.default.Component);\n\n Circle.propTypes = {\n center: _propTypes2.default.object,\n radius: _propTypes2.default.number,\n strokeColor: _propTypes2.default.string,\n strokeOpacity: _propTypes2.default.number,\n strokeWeight: _propTypes2.default.number,\n fillColor: _propTypes2.default.string,\n fillOpacity: _propTypes2.default.number,\n draggable: _propTypes2.default.bool,\n visible: _propTypes2.default.bool\n };\n\n evtNames.forEach(function (e) {\n return Circle.propTypes[e] = _propTypes2.default.func;\n });\n\n Circle.defaultProps = {\n name: 'Circle'\n };\n\n exports.default = Circle;\n});","(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(['exports', 'react', 'prop-types', '../lib/String'], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports, require('react'), require('prop-types'), require('../lib/String'));\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports, global.react, global.propTypes, global.String);\n global.HeatMap = mod.exports;\n }\n})(this, function (exports, _react, _propTypes, _String) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.HeatMap = undefined;\n\n var _react2 = _interopRequireDefault(_react);\n\n var _propTypes2 = _interopRequireDefault(_propTypes);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n var _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n function _objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n function _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n }\n\n var evtNames = ['click', 'mouseover', 'recenter'];\n\n var wrappedPromise = function wrappedPromise() {\n var wrappedPromise = {},\n promise = new Promise(function (resolve, reject) {\n wrappedPromise.resolve = resolve;\n wrappedPromise.reject = reject;\n });\n wrappedPromise.then = promise.then.bind(promise);\n wrappedPromise.catch = promise.catch.bind(promise);\n wrappedPromise.promise = promise;\n\n return wrappedPromise;\n };\n\n var HeatMap = exports.HeatMap = function (_React$Component) {\n _inherits(HeatMap, _React$Component);\n\n function HeatMap() {\n _classCallCheck(this, HeatMap);\n\n return _possibleConstructorReturn(this, (HeatMap.__proto__ || Object.getPrototypeOf(HeatMap)).apply(this, arguments));\n }\n\n _createClass(HeatMap, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.heatMapPromise = wrappedPromise();\n this.renderHeatMap();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n if (this.props.map !== prevProps.map || this.props.position !== prevProps.position) {\n if (this.heatMap) {\n this.heatMap.setMap(null);\n this.renderHeatMap();\n }\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.heatMap) {\n this.heatMap.setMap(null);\n }\n }\n }, {\n key: 'renderHeatMap',\n value: function renderHeatMap() {\n var _this2 = this;\n\n var _props = this.props,\n map = _props.map,\n google = _props.google,\n positions = _props.positions,\n mapCenter = _props.mapCenter,\n icon = _props.icon,\n gradient = _props.gradient,\n _props$radius = _props.radius,\n radius = _props$radius === undefined ? 20 : _props$radius,\n _props$opacity = _props.opacity,\n opacity = _props$opacity === undefined ? 0.2 : _props$opacity,\n props = _objectWithoutProperties(_props, ['map', 'google', 'positions', 'mapCenter', 'icon', 'gradient', 'radius', 'opacity']);\n\n if (!google) {\n return null;\n }\n\n var data = positions.map(function (pos) {\n return { location: new google.maps.LatLng(pos.lat, pos.lng), weight: pos.weight };\n });\n\n var pref = _extends({\n map: map,\n gradient: gradient,\n radius: radius,\n opacity: opacity,\n data: data\n }, props);\n\n this.heatMap = new google.maps.visualization.HeatmapLayer(pref);\n\n this.heatMap.set('radius', radius === undefined ? 20 : radius);\n\n this.heatMap.set('opacity', opacity === undefined ? 0.2 : opacity);\n\n evtNames.forEach(function (e) {\n _this2.heatMap.addListener(e, _this2.handleEvent(e));\n });\n\n this.heatMapPromise.resolve(this.heatMap);\n }\n }, {\n key: 'getHeatMap',\n value: function getHeatMap() {\n return this.heatMapPromise;\n }\n }, {\n key: 'handleEvent',\n value: function handleEvent(evt) {\n var _this3 = this;\n\n return function (e) {\n var evtName = 'on' + (0, _String.camelize)(evt);\n if (_this3.props[evtName]) {\n _this3.props[evtName](_this3.props, _this3.heatMap, e);\n }\n };\n }\n }, {\n key: 'render',\n value: function render() {\n return null;\n }\n }]);\n\n return HeatMap;\n }(_react2.default.Component);\n\n HeatMap.propTypes = {\n position: _propTypes2.default.object,\n map: _propTypes2.default.object,\n icon: _propTypes2.default.string\n };\n\n evtNames.forEach(function (e) {\n return HeatMap.propTypes[e] = _propTypes2.default.func;\n });\n\n HeatMap.defaultProps = {\n name: 'HeatMap'\n };\n\n exports.default = HeatMap;\n});","(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(['exports', 'react', 'prop-types', 'react-dom', 'react-dom/server'], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports, require('react'), require('prop-types'), require('react-dom'), require('react-dom/server'));\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports, global.react, global.propTypes, global.reactDom, global.server);\n global.InfoWindow = mod.exports;\n }\n})(this, function (exports, _react, _propTypes, _reactDom, _server) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.InfoWindow = undefined;\n\n var _react2 = _interopRequireDefault(_react);\n\n var _propTypes2 = _interopRequireDefault(_propTypes);\n\n var _reactDom2 = _interopRequireDefault(_reactDom);\n\n var _server2 = _interopRequireDefault(_server);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n var _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n function _objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n function _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n }\n\n var InfoWindow = exports.InfoWindow = function (_React$Component) {\n _inherits(InfoWindow, _React$Component);\n\n function InfoWindow() {\n _classCallCheck(this, InfoWindow);\n\n return _possibleConstructorReturn(this, (InfoWindow.__proto__ || Object.getPrototypeOf(InfoWindow)).apply(this, arguments));\n }\n\n _createClass(InfoWindow, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.renderInfoWindow();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n var _props = this.props,\n google = _props.google,\n map = _props.map;\n\n\n if (!google || !map) {\n return;\n }\n\n if (map !== prevProps.map) {\n this.renderInfoWindow();\n }\n\n if (this.props.position !== prevProps.position) {\n this.updatePosition();\n }\n\n if (this.props.children !== prevProps.children) {\n this.updateContent();\n }\n\n if (this.props.visible !== prevProps.visible || this.props.marker !== prevProps.marker || this.props.position !== prevProps.position) {\n this.props.visible ? this.openWindow() : this.closeWindow();\n }\n }\n }, {\n key: 'renderInfoWindow',\n value: function renderInfoWindow() {\n var _props2 = this.props,\n map = _props2.map,\n google = _props2.google,\n mapCenter = _props2.mapCenter,\n props = _objectWithoutProperties(_props2, ['map', 'google', 'mapCenter']);\n\n if (!google || !google.maps) {\n return;\n }\n\n var iw = this.infowindow = new google.maps.InfoWindow(_extends({\n content: ''\n }, props));\n\n google.maps.event.addListener(iw, 'closeclick', this.onClose.bind(this));\n google.maps.event.addListener(iw, 'domready', this.onOpen.bind(this));\n }\n }, {\n key: 'onOpen',\n value: function onOpen() {\n if (this.props.onOpen) {\n this.props.onOpen();\n }\n }\n }, {\n key: 'onClose',\n value: function onClose() {\n if (this.props.onClose) {\n this.props.onClose();\n }\n }\n }, {\n key: 'openWindow',\n value: function openWindow() {\n this.infowindow.open(this.props.map, this.props.marker);\n }\n }, {\n key: 'updatePosition',\n value: function updatePosition() {\n var pos = this.props.position;\n if (!(pos instanceof google.maps.LatLng)) {\n pos = pos && new google.maps.LatLng(pos.lat, pos.lng);\n }\n this.infowindow.setPosition(pos);\n }\n }, {\n key: 'updateContent',\n value: function updateContent() {\n var content = this.renderChildren();\n this.infowindow.setContent(content);\n }\n }, {\n key: 'closeWindow',\n value: function closeWindow() {\n this.infowindow.close();\n }\n }, {\n key: 'renderChildren',\n value: function renderChildren() {\n var children = this.props.children;\n\n return _server2.default.renderToString(children);\n }\n }, {\n key: 'render',\n value: function render() {\n return null;\n }\n }]);\n\n return InfoWindow;\n }(_react2.default.Component);\n\n InfoWindow.propTypes = {\n children: _propTypes2.default.element.isRequired,\n map: _propTypes2.default.object,\n marker: _propTypes2.default.object,\n position: _propTypes2.default.object,\n visible: _propTypes2.default.bool,\n\n // callbacks\n onClose: _propTypes2.default.func,\n onOpen: _propTypes2.default.func\n };\n\n InfoWindow.defaultProps = {\n visible: false\n };\n\n exports.default = InfoWindow;\n});","(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(['exports', 'react', 'prop-types', '../lib/String'], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports, require('react'), require('prop-types'), require('../lib/String'));\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports, global.react, global.propTypes, global.String);\n global.Marker = mod.exports;\n }\n})(this, function (exports, _react, _propTypes, _String) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.Marker = undefined;\n\n var _react2 = _interopRequireDefault(_react);\n\n var _propTypes2 = _interopRequireDefault(_propTypes);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n var _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n function _objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n function _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n }\n\n var evtNames = ['click', 'dblclick', 'dragend', 'mousedown', 'mouseout', 'mouseover', 'mouseup', 'recenter'];\n\n var wrappedPromise = function wrappedPromise() {\n var wrappedPromise = {},\n promise = new Promise(function (resolve, reject) {\n wrappedPromise.resolve = resolve;\n wrappedPromise.reject = reject;\n });\n wrappedPromise.then = promise.then.bind(promise);\n wrappedPromise.catch = promise.catch.bind(promise);\n wrappedPromise.promise = promise;\n\n return wrappedPromise;\n };\n\n var Marker = exports.Marker = function (_React$Component) {\n _inherits(Marker, _React$Component);\n\n function Marker() {\n _classCallCheck(this, Marker);\n\n return _possibleConstructorReturn(this, (Marker.__proto__ || Object.getPrototypeOf(Marker)).apply(this, arguments));\n }\n\n _createClass(Marker, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.markerPromise = wrappedPromise();\n this.renderMarker();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n if (this.props.map !== prevProps.map || this.props.position !== prevProps.position || this.props.icon !== prevProps.icon) {\n if (this.marker) {\n this.marker.setMap(null);\n }\n this.renderMarker();\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.marker) {\n this.marker.setMap(null);\n }\n }\n }, {\n key: 'renderMarker',\n value: function renderMarker() {\n var _this2 = this;\n\n var _props = this.props,\n map = _props.map,\n google = _props.google,\n position = _props.position,\n mapCenter = _props.mapCenter,\n icon = _props.icon,\n label = _props.label,\n draggable = _props.draggable,\n title = _props.title,\n props = _objectWithoutProperties(_props, ['map', 'google', 'position', 'mapCenter', 'icon', 'label', 'draggable', 'title']);\n\n if (!google) {\n return null;\n }\n\n var pos = position || mapCenter;\n if (!(pos instanceof google.maps.LatLng)) {\n pos = new google.maps.LatLng(pos.lat, pos.lng);\n }\n\n var pref = _extends({\n map: map,\n position: pos,\n icon: icon,\n label: label,\n title: title,\n draggable: draggable\n }, props);\n this.marker = new google.maps.Marker(pref);\n\n evtNames.forEach(function (e) {\n _this2.marker.addListener(e, _this2.handleEvent(e));\n });\n\n this.markerPromise.resolve(this.marker);\n }\n }, {\n key: 'getMarker',\n value: function getMarker() {\n return this.markerPromise;\n }\n }, {\n key: 'handleEvent',\n value: function handleEvent(evt) {\n var _this3 = this;\n\n return function (e) {\n var evtName = 'on' + (0, _String.camelize)(evt);\n if (_this3.props[evtName]) {\n _this3.props[evtName](_this3.props, _this3.marker, e);\n }\n };\n }\n }, {\n key: 'render',\n value: function render() {\n return null;\n }\n }]);\n\n return Marker;\n }(_react2.default.Component);\n\n Marker.propTypes = {\n position: _propTypes2.default.object,\n map: _propTypes2.default.object\n };\n\n evtNames.forEach(function (e) {\n return Marker.propTypes[e] = _propTypes2.default.func;\n });\n\n Marker.defaultProps = {\n name: 'Marker'\n };\n\n exports.default = Marker;\n});","(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(['exports', 'react', 'prop-types', '../lib/arePathsEqual', '../lib/String'], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports, require('react'), require('prop-types'), require('../lib/arePathsEqual'), require('../lib/String'));\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports, global.react, global.propTypes, global.arePathsEqual, global.String);\n global.Polygon = mod.exports;\n }\n})(this, function (exports, _react, _propTypes, _arePathsEqual, _String) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.Polygon = undefined;\n\n var _react2 = _interopRequireDefault(_react);\n\n var _propTypes2 = _interopRequireDefault(_propTypes);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n var _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n function _objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n function _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n }\n\n var evtNames = ['click', 'mouseout', 'mouseover'];\n\n var wrappedPromise = function wrappedPromise() {\n var wrappedPromise = {},\n promise = new Promise(function (resolve, reject) {\n wrappedPromise.resolve = resolve;\n wrappedPromise.reject = reject;\n });\n wrappedPromise.then = promise.then.bind(promise);\n wrappedPromise.catch = promise.catch.bind(promise);\n wrappedPromise.promise = promise;\n\n return wrappedPromise;\n };\n\n var Polygon = exports.Polygon = function (_React$Component) {\n _inherits(Polygon, _React$Component);\n\n function Polygon() {\n _classCallCheck(this, Polygon);\n\n return _possibleConstructorReturn(this, (Polygon.__proto__ || Object.getPrototypeOf(Polygon)).apply(this, arguments));\n }\n\n _createClass(Polygon, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.polygonPromise = wrappedPromise();\n this.renderPolygon();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n if (this.props.map !== prevProps.map || !(0, _arePathsEqual.arePathsEqual)(this.props.paths, prevProps.paths)) {\n if (this.polygon) {\n this.polygon.setMap(null);\n }\n this.renderPolygon();\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.polygon) {\n this.polygon.setMap(null);\n }\n }\n }, {\n key: 'renderPolygon',\n value: function renderPolygon() {\n var _this2 = this;\n\n var _props = this.props,\n map = _props.map,\n google = _props.google,\n paths = _props.paths,\n strokeColor = _props.strokeColor,\n strokeOpacity = _props.strokeOpacity,\n strokeWeight = _props.strokeWeight,\n fillColor = _props.fillColor,\n fillOpacity = _props.fillOpacity,\n props = _objectWithoutProperties(_props, ['map', 'google', 'paths', 'strokeColor', 'strokeOpacity', 'strokeWeight', 'fillColor', 'fillOpacity']);\n\n if (!google) {\n return null;\n }\n\n var params = _extends({\n map: map,\n paths: paths,\n strokeColor: strokeColor,\n strokeOpacity: strokeOpacity,\n strokeWeight: strokeWeight,\n fillColor: fillColor,\n fillOpacity: fillOpacity\n }, props);\n\n this.polygon = new google.maps.Polygon(params);\n\n evtNames.forEach(function (e) {\n _this2.polygon.addListener(e, _this2.handleEvent(e));\n });\n\n this.polygonPromise.resolve(this.polygon);\n }\n }, {\n key: 'getPolygon',\n value: function getPolygon() {\n return this.polygonPromise;\n }\n }, {\n key: 'handleEvent',\n value: function handleEvent(evt) {\n var _this3 = this;\n\n return function (e) {\n var evtName = 'on' + (0, _String.camelize)(evt);\n if (_this3.props[evtName]) {\n _this3.props[evtName](_this3.props, _this3.polygon, e);\n }\n };\n }\n }, {\n key: 'render',\n value: function render() {\n return null;\n }\n }]);\n\n return Polygon;\n }(_react2.default.Component);\n\n Polygon.propTypes = {\n paths: _propTypes2.default.array,\n strokeColor: _propTypes2.default.string,\n strokeOpacity: _propTypes2.default.number,\n strokeWeight: _propTypes2.default.number,\n fillColor: _propTypes2.default.string,\n fillOpacity: _propTypes2.default.number\n };\n\n evtNames.forEach(function (e) {\n return Polygon.propTypes[e] = _propTypes2.default.func;\n });\n\n Polygon.defaultProps = {\n name: 'Polygon'\n };\n\n exports.default = Polygon;\n});","(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(['exports', 'react', 'prop-types', '../lib/arePathsEqual', '../lib/String'], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports, require('react'), require('prop-types'), require('../lib/arePathsEqual'), require('../lib/String'));\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports, global.react, global.propTypes, global.arePathsEqual, global.String);\n global.Polyline = mod.exports;\n }\n})(this, function (exports, _react, _propTypes, _arePathsEqual, _String) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.Polyline = undefined;\n\n var _react2 = _interopRequireDefault(_react);\n\n var _propTypes2 = _interopRequireDefault(_propTypes);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n var _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n function _objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n function _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n }\n\n var evtNames = ['click', 'mouseout', 'mouseover'];\n\n var wrappedPromise = function wrappedPromise() {\n var wrappedPromise = {},\n promise = new Promise(function (resolve, reject) {\n wrappedPromise.resolve = resolve;\n wrappedPromise.reject = reject;\n });\n wrappedPromise.then = promise.then.bind(promise);\n wrappedPromise.catch = promise.catch.bind(promise);\n wrappedPromise.promise = promise;\n\n return wrappedPromise;\n };\n\n var Polyline = exports.Polyline = function (_React$Component) {\n _inherits(Polyline, _React$Component);\n\n function Polyline() {\n _classCallCheck(this, Polyline);\n\n return _possibleConstructorReturn(this, (Polyline.__proto__ || Object.getPrototypeOf(Polyline)).apply(this, arguments));\n }\n\n _createClass(Polyline, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.polylinePromise = wrappedPromise();\n this.renderPolyline();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n if (this.props.map !== prevProps.map || !(0, _arePathsEqual.arePathsEqual)(this.props.path, prevProps.path)) {\n if (this.polyline) {\n this.polyline.setMap(null);\n }\n this.renderPolyline();\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.polyline) {\n this.polyline.setMap(null);\n }\n }\n }, {\n key: 'renderPolyline',\n value: function renderPolyline() {\n var _this2 = this;\n\n var _props = this.props,\n map = _props.map,\n google = _props.google,\n path = _props.path,\n strokeColor = _props.strokeColor,\n strokeOpacity = _props.strokeOpacity,\n strokeWeight = _props.strokeWeight,\n props = _objectWithoutProperties(_props, ['map', 'google', 'path', 'strokeColor', 'strokeOpacity', 'strokeWeight']);\n\n if (!google) {\n return null;\n }\n\n var params = _extends({\n map: map,\n path: path,\n strokeColor: strokeColor,\n strokeOpacity: strokeOpacity,\n strokeWeight: strokeWeight\n }, props);\n\n this.polyline = new google.maps.Polyline(params);\n\n evtNames.forEach(function (e) {\n _this2.polyline.addListener(e, _this2.handleEvent(e));\n });\n\n this.polylinePromise.resolve(this.polyline);\n }\n }, {\n key: 'getPolyline',\n value: function getPolyline() {\n return this.polylinePromise;\n }\n }, {\n key: 'handleEvent',\n value: function handleEvent(evt) {\n var _this3 = this;\n\n return function (e) {\n var evtName = 'on' + (0, _String.camelize)(evt);\n if (_this3.props[evtName]) {\n _this3.props[evtName](_this3.props, _this3.polyline, e);\n }\n };\n }\n }, {\n key: 'render',\n value: function render() {\n return null;\n }\n }]);\n\n return Polyline;\n }(_react2.default.Component);\n\n Polyline.propTypes = {\n path: _propTypes2.default.array,\n strokeColor: _propTypes2.default.string,\n strokeOpacity: _propTypes2.default.number,\n strokeWeight: _propTypes2.default.number\n };\n\n evtNames.forEach(function (e) {\n return Polyline.propTypes[e] = _propTypes2.default.func;\n });\n\n Polyline.defaultProps = {\n name: 'Polyline'\n };\n\n exports.default = Polyline;\n});","(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(['exports', 'react', 'prop-types', '../lib/areBoundsEqual', '../lib/String'], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports, require('react'), require('prop-types'), require('../lib/areBoundsEqual'), require('../lib/String'));\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports, global.react, global.propTypes, global.areBoundsEqual, global.String);\n global.Rectangle = mod.exports;\n }\n})(this, function (exports, _react, _propTypes, _areBoundsEqual, _String) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.Rectangle = undefined;\n\n var _react2 = _interopRequireDefault(_react);\n\n var _propTypes2 = _interopRequireDefault(_propTypes);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n var _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n function _objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n function _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n }\n\n var evtNames = ['click', 'mouseout', 'mouseover'];\n\n var wrappedPromise = function wrappedPromise() {\n var wrappedPromise = {},\n promise = new Promise(function (resolve, reject) {\n wrappedPromise.resolve = resolve;\n wrappedPromise.reject = reject;\n });\n wrappedPromise.then = promise.then.bind(promise);\n wrappedPromise.catch = promise.catch.bind(promise);\n wrappedPromise.promise = promise;\n\n return wrappedPromise;\n };\n\n var Rectangle = exports.Rectangle = function (_React$Component) {\n _inherits(Rectangle, _React$Component);\n\n function Rectangle() {\n _classCallCheck(this, Rectangle);\n\n return _possibleConstructorReturn(this, (Rectangle.__proto__ || Object.getPrototypeOf(Rectangle)).apply(this, arguments));\n }\n\n _createClass(Rectangle, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.rectanglePromise = wrappedPromise();\n this.renderRectangle();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n if (this.props.map !== prevProps.map || !(0, _areBoundsEqual.areBoundsEqual)(this.props.bounds, prevProps.bounds)) {\n if (this.rectangle) {\n this.rectangle.setMap(null);\n }\n this.renderRectangle();\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.rectangle) {\n this.rectangle.setMap(null);\n }\n }\n }, {\n key: 'renderRectangle',\n value: function renderRectangle() {\n var _this2 = this;\n\n var _props = this.props,\n map = _props.map,\n google = _props.google,\n bounds = _props.bounds,\n strokeColor = _props.strokeColor,\n strokeOpacity = _props.strokeOpacity,\n strokeWeight = _props.strokeWeight,\n fillColor = _props.fillColor,\n fillOpacity = _props.fillOpacity,\n props = _objectWithoutProperties(_props, ['map', 'google', 'bounds', 'strokeColor', 'strokeOpacity', 'strokeWeight', 'fillColor', 'fillOpacity']);\n\n if (!google) {\n return null;\n }\n\n var params = _extends({\n map: map,\n bounds: bounds,\n strokeColor: strokeColor,\n strokeOpacity: strokeOpacity,\n strokeWeight: strokeWeight,\n fillColor: fillColor,\n fillOpacity: fillOpacity\n }, props);\n\n this.rectangle = new google.maps.Rectangle(params);\n\n evtNames.forEach(function (e) {\n _this2.rectangle.addListener(e, _this2.handleEvent(e));\n });\n\n this.rectanglePromise.resolve(this.rectangle);\n }\n }, {\n key: 'getRectangle',\n value: function getRectangle() {\n return this.rectanglePromise;\n }\n }, {\n key: 'handleEvent',\n value: function handleEvent(evt) {\n var _this3 = this;\n\n return function (e) {\n var evtName = 'on' + (0, _String.camelize)(evt);\n if (_this3.props[evtName]) {\n _this3.props[evtName](_this3.props, _this3.rectangle, e);\n }\n };\n }\n }, {\n key: 'render',\n value: function render() {\n console.log('hii, ', this.props.bounds);\n return null;\n }\n }]);\n\n return Rectangle;\n }(_react2.default.Component);\n\n Rectangle.propTypes = {\n bounds: _propTypes2.default.object,\n strokeColor: _propTypes2.default.string,\n strokeOpacity: _propTypes2.default.number,\n strokeWeight: _propTypes2.default.number,\n fillColor: _propTypes2.default.string,\n fillOpacity: _propTypes2.default.number\n };\n\n evtNames.forEach(function (e) {\n return Rectangle.propTypes[e] = _propTypes2.default.func;\n });\n\n Rectangle.defaultProps = {\n name: 'Rectangle'\n };\n\n exports.default = Rectangle;\n});","(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(['exports', './GoogleApiComponent', './components/Marker', './components/InfoWindow', './components/HeatMap', './components/Polygon', './components/Polyline', './components/Circle', './components/Rectangle', 'react', 'prop-types', 'react-dom', './lib/String', './lib/cancelablePromise'], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports, require('./GoogleApiComponent'), require('./components/Marker'), require('./components/InfoWindow'), require('./components/HeatMap'), require('./components/Polygon'), require('./components/Polyline'), require('./components/Circle'), require('./components/Rectangle'), require('react'), require('prop-types'), require('react-dom'), require('./lib/String'), require('./lib/cancelablePromise'));\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports, global.GoogleApiComponent, global.Marker, global.InfoWindow, global.HeatMap, global.Polygon, global.Polyline, global.Circle, global.Rectangle, global.react, global.propTypes, global.reactDom, global.String, global.cancelablePromise);\n global.index = mod.exports;\n }\n})(this, function (exports, _GoogleApiComponent, _Marker, _InfoWindow, _HeatMap, _Polygon, _Polyline, _Circle, _Rectangle, _react, _propTypes, _reactDom, _String, _cancelablePromise) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.Map = exports.Rectangle = exports.Circle = exports.Polyline = exports.Polygon = exports.HeatMap = exports.InfoWindow = exports.Marker = exports.GoogleApiWrapper = undefined;\n Object.defineProperty(exports, 'GoogleApiWrapper', {\n enumerable: true,\n get: function () {\n return _GoogleApiComponent.wrapper;\n }\n });\n Object.defineProperty(exports, 'Marker', {\n enumerable: true,\n get: function () {\n return _Marker.Marker;\n }\n });\n Object.defineProperty(exports, 'InfoWindow', {\n enumerable: true,\n get: function () {\n return _InfoWindow.InfoWindow;\n }\n });\n Object.defineProperty(exports, 'HeatMap', {\n enumerable: true,\n get: function () {\n return _HeatMap.HeatMap;\n }\n });\n Object.defineProperty(exports, 'Polygon', {\n enumerable: true,\n get: function () {\n return _Polygon.Polygon;\n }\n });\n Object.defineProperty(exports, 'Polyline', {\n enumerable: true,\n get: function () {\n return _Polyline.Polyline;\n }\n });\n Object.defineProperty(exports, 'Circle', {\n enumerable: true,\n get: function () {\n return _Circle.Circle;\n }\n });\n Object.defineProperty(exports, 'Rectangle', {\n enumerable: true,\n get: function () {\n return _Rectangle.Rectangle;\n }\n });\n\n var _react2 = _interopRequireDefault(_react);\n\n var _propTypes2 = _interopRequireDefault(_propTypes);\n\n var _reactDom2 = _interopRequireDefault(_reactDom);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n function _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n }\n\n var mapStyles = {\n container: {\n position: 'absolute',\n width: '100%',\n height: '100%'\n },\n map: {\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: 0,\n top: 0\n }\n };\n\n var evtNames = ['ready', 'click', 'dragend', 'recenter', 'bounds_changed', 'center_changed', 'dblclick', 'dragstart', 'heading_change', 'idle', 'maptypeid_changed', 'mousemove', 'mouseout', 'mouseover', 'projection_changed', 'resize', 'rightclick', 'tilesloaded', 'tilt_changed', 'zoom_changed'];\n\n var Map = exports.Map = function (_React$Component) {\n _inherits(Map, _React$Component);\n\n function Map(props) {\n _classCallCheck(this, Map);\n\n var _this = _possibleConstructorReturn(this, (Map.__proto__ || Object.getPrototypeOf(Map)).call(this, props));\n\n if (!props.hasOwnProperty('google')) {\n throw new Error('You must include a `google` prop');\n }\n\n _this.listeners = {};\n _this.state = {\n currentLocation: {\n lat: _this.props.initialCenter.lat,\n lng: _this.props.initialCenter.lng\n }\n };\n\n _this.mapRef = _react2.default.createRef();\n return _this;\n }\n\n _createClass(Map, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _this2 = this;\n\n if (this.props.centerAroundCurrentLocation) {\n if (navigator && navigator.geolocation) {\n this.geoPromise = (0, _cancelablePromise.makeCancelable)(new Promise(function (resolve, reject) {\n navigator.geolocation.getCurrentPosition(resolve, reject);\n }));\n\n this.geoPromise.promise.then(function (pos) {\n var coords = pos.coords;\n _this2.setState({\n currentLocation: {\n lat: coords.latitude,\n lng: coords.longitude\n }\n });\n }).catch(function (e) {\n return e;\n });\n }\n }\n this.loadMap();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps, prevState) {\n if (prevProps.google !== this.props.google) {\n this.loadMap();\n }\n if (this.props.visible !== prevProps.visible) {\n this.restyleMap();\n }\n if (this.props.zoom !== prevProps.zoom) {\n this.map.setZoom(this.props.zoom);\n }\n if (this.props.center !== prevProps.center) {\n this.setState({\n currentLocation: this.props.center\n });\n }\n if (prevState.currentLocation !== this.state.currentLocation) {\n this.recenterMap();\n }\n if (this.props.bounds && this.props.bounds !== prevProps.bounds) {\n this.map.fitBounds(this.props.bounds);\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n var _this3 = this;\n\n var google = this.props.google;\n\n if (this.geoPromise) {\n this.geoPromise.cancel();\n }\n Object.keys(this.listeners).forEach(function (e) {\n google.maps.event.removeListener(_this3.listeners[e]);\n });\n }\n }, {\n key: 'loadMap',\n value: function loadMap() {\n var _this4 = this;\n\n if (this.props && this.props.google) {\n var google = this.props.google;\n\n var maps = google.maps;\n\n var mapRef = this.mapRef.current;\n var node = _reactDom2.default.findDOMNode(mapRef);\n var curr = this.state.currentLocation;\n var center = new maps.LatLng(curr.lat, curr.lng);\n\n var mapTypeIds = this.props.google.maps.MapTypeId || {};\n var mapTypeFromProps = String(this.props.mapType).toUpperCase();\n\n var mapConfig = Object.assign({}, {\n mapTypeId: mapTypeIds[mapTypeFromProps],\n center: center,\n zoom: this.props.zoom,\n maxZoom: this.props.maxZoom,\n minZoom: this.props.minZoom,\n clickableIcons: !!this.props.clickableIcons,\n disableDefaultUI: this.props.disableDefaultUI,\n zoomControl: this.props.zoomControl,\n zoomControlOptions: this.props.zoomControlOptions,\n mapTypeControl: this.props.mapTypeControl,\n mapTypeControlOptions: this.props.mapTypeControlOptions,\n scaleControl: this.props.scaleControl,\n streetViewControl: this.props.streetViewControl,\n streetViewControlOptions: this.props.streetViewControlOptions,\n panControl: this.props.panControl,\n rotateControl: this.props.rotateControl,\n fullscreenControl: this.props.fullscreenControl,\n scrollwheel: this.props.scrollwheel,\n draggable: this.props.draggable,\n draggableCursor: this.props.draggableCursor,\n keyboardShortcuts: this.props.keyboardShortcuts,\n disableDoubleClickZoom: this.props.disableDoubleClickZoom,\n noClear: this.props.noClear,\n styles: this.props.styles,\n gestureHandling: this.props.gestureHandling\n });\n\n Object.keys(mapConfig).forEach(function (key) {\n // Allow to configure mapConfig with 'false'\n if (mapConfig[key] === null) {\n delete mapConfig[key];\n }\n });\n\n this.map = new maps.Map(node, mapConfig);\n\n evtNames.forEach(function (e) {\n _this4.listeners[e] = _this4.map.addListener(e, _this4.handleEvent(e));\n });\n maps.event.trigger(this.map, 'ready');\n this.forceUpdate();\n }\n }\n }, {\n key: 'handleEvent',\n value: function handleEvent(evtName) {\n var _this5 = this;\n\n var timeout = void 0;\n var handlerName = 'on' + (0, _String.camelize)(evtName);\n\n return function (e) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n timeout = setTimeout(function () {\n if (_this5.props[handlerName]) {\n _this5.props[handlerName](_this5.props, _this5.map, e);\n }\n }, 0);\n };\n }\n }, {\n key: 'recenterMap',\n value: function recenterMap() {\n var map = this.map;\n\n var google = this.props.google;\n\n\n if (!google) return;\n var maps = google.maps;\n\n if (map) {\n var center = this.state.currentLocation;\n if (!(center instanceof google.maps.LatLng)) {\n center = new google.maps.LatLng(center.lat, center.lng);\n }\n // map.panTo(center)\n map.setCenter(center);\n maps.event.trigger(map, 'recenter');\n }\n }\n }, {\n key: 'restyleMap',\n value: function restyleMap() {\n if (this.map) {\n var google = this.props.google;\n\n google.maps.event.trigger(this.map, 'resize');\n }\n }\n }, {\n key: 'renderChildren',\n value: function renderChildren() {\n var _this6 = this;\n\n var children = this.props.children;\n\n\n if (!children) return;\n\n return _react2.default.Children.map(children, function (c) {\n if (!c) return;\n return _react2.default.cloneElement(c, {\n map: _this6.map,\n google: _this6.props.google,\n mapCenter: _this6.state.currentLocation\n });\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var style = Object.assign({}, mapStyles.map, this.props.style, {\n display: this.props.visible ? 'inherit' : 'none'\n });\n\n var containerStyles = Object.assign({}, mapStyles.container, this.props.containerStyle);\n\n return _react2.default.createElement(\n 'div',\n { style: containerStyles, className: this.props.className },\n _react2.default.createElement(\n 'div',\n { style: style, ref: this.mapRef },\n 'Loading map...'\n ),\n this.renderChildren()\n );\n }\n }]);\n\n return Map;\n }(_react2.default.Component);\n\n Map.propTypes = {\n google: _propTypes2.default.object,\n zoom: _propTypes2.default.number,\n centerAroundCurrentLocation: _propTypes2.default.bool,\n center: _propTypes2.default.object,\n initialCenter: _propTypes2.default.object,\n className: _propTypes2.default.string,\n style: _propTypes2.default.object,\n containerStyle: _propTypes2.default.object,\n visible: _propTypes2.default.bool,\n mapType: _propTypes2.default.string,\n maxZoom: _propTypes2.default.number,\n minZoom: _propTypes2.default.number,\n clickableIcons: _propTypes2.default.bool,\n disableDefaultUI: _propTypes2.default.bool,\n zoomControl: _propTypes2.default.bool,\n zoomControlOptions: _propTypes2.default.object,\n mapTypeControl: _propTypes2.default.bool,\n mapTypeControlOptions: _propTypes2.default.bool,\n scaleControl: _propTypes2.default.bool,\n streetViewControl: _propTypes2.default.bool,\n streetViewControlOptions: _propTypes2.default.object,\n panControl: _propTypes2.default.bool,\n rotateControl: _propTypes2.default.bool,\n fullscreenControl: _propTypes2.default.bool,\n scrollwheel: _propTypes2.default.bool,\n draggable: _propTypes2.default.bool,\n draggableCursor: _propTypes2.default.string,\n keyboardShortcuts: _propTypes2.default.bool,\n disableDoubleClickZoom: _propTypes2.default.bool,\n noClear: _propTypes2.default.bool,\n styles: _propTypes2.default.array,\n gestureHandling: _propTypes2.default.string,\n bounds: _propTypes2.default.object\n };\n\n evtNames.forEach(function (e) {\n return Map.propTypes[(0, _String.camelize)(e)] = _propTypes2.default.func;\n });\n\n Map.defaultProps = {\n zoom: 14,\n initialCenter: {\n lat: 37.774929,\n lng: -122.419416\n },\n center: {},\n centerAroundCurrentLocation: false,\n style: {},\n containerStyle: {},\n visible: true\n };\n\n exports.default = Map;\n});","(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(['exports'], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.GoogleApi = mod.exports;\n }\n})(this, function (exports) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n var GoogleApi = exports.GoogleApi = function GoogleApi(opts) {\n opts = opts || {};\n\n if (!opts.hasOwnProperty('apiKey')) {\n throw new Error('You must pass an apiKey to use GoogleApi');\n }\n\n var apiKey = opts.apiKey;\n var libraries = opts.libraries || ['places'];\n var client = opts.client;\n var URL = opts.url || 'https://maps.googleapis.com/maps/api/js';\n\n var googleVersion = opts.version || '3.31';\n\n var script = null;\n var google = typeof window !== 'undefined' && window.google || null;\n var loading = false;\n var channel = null;\n var language = opts.language;\n var region = opts.region || null;\n\n var onLoadEvents = [];\n\n var url = function url() {\n var url = URL;\n var params = {\n key: apiKey,\n callback: 'CALLBACK_NAME',\n libraries: libraries.join(','),\n client: client,\n v: googleVersion,\n channel: channel,\n language: language,\n region: region,\n onerror: 'ERROR_FUNCTION'\n };\n\n var paramStr = Object.keys(params).filter(function (k) {\n return !!params[k];\n }).map(function (k) {\n return k + '=' + params[k];\n }).join('&');\n\n return url + '?' + paramStr;\n };\n\n return url();\n };\n\n exports.default = GoogleApi;\n});","(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(['exports', './windowOrGlobal'], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports, require('./windowOrGlobal'));\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports, global.windowOrGlobal);\n global.ScriptCache = mod.exports;\n }\n})(this, function (exports, window) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n var counter = 0;\n var scriptMap = typeof window !== 'undefined' && window._scriptMap || new Map();\n var ScriptCache = exports.ScriptCache = function (global) {\n global._scriptMap = global._scriptMap || scriptMap;\n return function ScriptCache(scripts) {\n var Cache = {};\n\n Cache._onLoad = function (key) {\n return function (cb) {\n var registered = true;\n\n function unregister() {\n registered = false;\n }\n\n var stored = scriptMap.get(key);\n\n if (stored) {\n stored.promise.then(function () {\n if (registered) {\n stored.error ? cb(stored.error) : cb(null, stored);\n }\n\n return stored;\n }).catch(function (error) {\n return cb(error);\n });\n } else {\n // TODO:\n }\n\n return unregister;\n };\n };\n\n Cache._scriptTag = function (key, src) {\n if (!scriptMap.has(key)) {\n // Server side rendering environments don't always have access to the `document` global.\n // In these cases, we're not going to be able to return a script tag, so just return null.\n if (typeof document === 'undefined') return null;\n\n var tag = document.createElement('script');\n var promise = new Promise(function (resolve, reject) {\n var body = document.getElementsByTagName('body')[0];\n\n tag.type = 'text/javascript';\n tag.async = false; // Load in order\n\n var cbName = 'loaderCB' + counter++ + Date.now();\n var cb = void 0;\n\n var handleResult = function handleResult(state) {\n return function (evt) {\n var stored = scriptMap.get(key);\n if (state === 'loaded') {\n stored.resolved = true;\n resolve(src);\n // stored.handlers.forEach(h => h.call(null, stored))\n // stored.handlers = []\n } else if (state === 'error') {\n stored.errored = true;\n // stored.handlers.forEach(h => h.call(null, stored))\n // stored.handlers = [];\n reject(evt);\n }\n stored.loaded = true;\n\n cleanup();\n };\n };\n\n var cleanup = function cleanup() {\n if (global[cbName] && typeof global[cbName] === 'function') {\n global[cbName] = null;\n delete global[cbName];\n }\n };\n\n tag.onload = handleResult('loaded');\n tag.onerror = handleResult('error');\n tag.onreadystatechange = function () {\n handleResult(tag.readyState);\n };\n\n // Pick off callback, if there is one\n if (src.match(/callback=CALLBACK_NAME/)) {\n src = src.replace(/(callback=)[^\\&]+/, '$1' + cbName);\n cb = window[cbName] = tag.onload;\n } else {\n tag.addEventListener('load', tag.onload);\n }\n tag.addEventListener('error', tag.onerror);\n\n tag.src = src;\n body.appendChild(tag);\n\n return tag;\n });\n var initialState = {\n loaded: false,\n error: false,\n promise: promise,\n tag: tag\n };\n scriptMap.set(key, initialState);\n }\n return scriptMap.get(key).tag;\n };\n\n // let scriptTags = document.querySelectorAll('script')\n //\n // NodeList.prototype.filter = Array.prototype.filter;\n // NodeList.prototype.map = Array.prototype.map;\n // const initialScripts = scriptTags\n // .filter(s => !!s.src)\n // .map(s => s.src.split('?')[0])\n // .reduce((memo, script) => {\n // memo[script] = script;\n // return memo;\n // }, {});\n\n Object.keys(scripts).forEach(function (key) {\n var script = scripts[key];\n\n var tag = window._scriptMap.has(key) ? window._scriptMap.get(key).tag : Cache._scriptTag(key, script);\n\n Cache[key] = {\n tag: tag,\n onLoad: Cache._onLoad(key)\n };\n });\n\n return Cache;\n };\n }(window);\n\n exports.default = ScriptCache;\n});","(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(['exports'], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.String = mod.exports;\n }\n})(this, function (exports) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n var camelize = exports.camelize = function camelize(str) {\n return str.split('_').map(function (word) {\n return word.charAt(0).toUpperCase() + word.slice(1);\n }).join('');\n };\n});","(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(['exports'], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.areBoundsEqual = mod.exports;\n }\n})(this, function (exports) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n\n /**\n * Compares two bound objects.\n */\n\n var areBoundsEqual = exports.areBoundsEqual = function areBoundsEqual(boundA, boundB) {\n if (boundA === boundB) {\n return true;\n }\n if (!(boundA instanceof Object) || !(boundB instanceof Object)) {\n return false;\n }\n if (Object.keys(boundA).length !== Object.keys(boundB).length) {\n return false;\n }\n if (!areValidBounds(boundA) || !areValidBounds(boundB)) {\n return false;\n }\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = Object.keys(boundA)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key = _step.value;\n\n if (boundA[key] !== boundB[key]) {\n return false;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return true;\n };\n\n /**\n * Helper that checks whether an array consists of objects\n * with lat and lng properties\n * @param {object} elem the element to check\n * @returns {boolean} whether or not it's valid\n */\n var areValidBounds = function areValidBounds(elem) {\n return elem !== null && (typeof elem === 'undefined' ? 'undefined' : _typeof(elem)) === 'object' && elem.hasOwnProperty('north') && elem.hasOwnProperty('south') && elem.hasOwnProperty('east') && elem.hasOwnProperty('west');\n };\n});","(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(['exports'], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.arePathsEqual = mod.exports;\n }\n})(this, function (exports) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n\n /**\n * Compares two path arrays of LatLng objects.\n */\n\n var arePathsEqual = exports.arePathsEqual = function arePathsEqual(pathA, pathB) {\n if (pathA === pathB) {\n return true;\n }\n if (!Array.isArray(pathA) || !Array.isArray(pathB)) {\n return false;\n }\n if (pathA.length !== pathB.length) {\n return false;\n }\n for (var i = 0; i < pathA.length; ++i) {\n if (pathA[i] === pathB[i]) {\n continue;\n }\n if (!isValidLatLng(pathA[i]) || !isValidLatLng(pathB[i])) {\n return false;\n }\n if (pathB[i].lat !== pathA[i].lat || pathB[i].lng !== pathA[i].lng) {\n return false;\n }\n }\n return true;\n };\n\n /**\n * Helper that checks whether an array consists of objects\n * with lat and lng properties\n * @param {object} elem the element to check\n * @returns {boolean} whether or not it's valid\n */\n var isValidLatLng = function isValidLatLng(elem) {\n return elem !== null && (typeof elem === 'undefined' ? 'undefined' : _typeof(elem)) === 'object' && elem.hasOwnProperty('lat') && elem.hasOwnProperty('lng');\n };\n});","(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([\"exports\"], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.cancelablePromise = mod.exports;\n }\n})(this, function (exports) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n // https://facebook.github.io/react/blog/2015/12/16/ismounted-antipattern.html\n\n var makeCancelable = exports.makeCancelable = function makeCancelable(promise) {\n var hasCanceled_ = false;\n\n var wrappedPromise = new Promise(function (resolve, reject) {\n promise.then(function (val) {\n return hasCanceled_ ? reject({ isCanceled: true }) : resolve(val);\n });\n promise.catch(function (error) {\n return hasCanceled_ ? reject({ isCanceled: true }) : reject(error);\n });\n });\n\n return {\n promise: wrappedPromise,\n cancel: function cancel() {\n hasCanceled_ = true;\n }\n };\n };\n});","(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(['module'], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(module);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod);\n global.windowOrGlobal = mod.exports;\n }\n})(this, function (module) {\n 'use strict';\n\n var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n\n module.exports = (typeof self === 'undefined' ? 'undefined' : _typeof(self)) === 'object' && self.self === self && self || (typeof global === 'undefined' ? 'undefined' : _typeof(global)) === 'object' && global.global === global && global || undefined;\n});","var camel2hyphen = require('string-convert/camel2hyphen');\n\nvar isDimension = function (feature) {\n var re = /[height|width]$/;\n return re.test(feature);\n};\n\nvar obj2mq = function (obj) {\n var mq = '';\n var features = Object.keys(obj);\n features.forEach(function (feature, index) {\n var value = obj[feature];\n feature = camel2hyphen(feature);\n // Add px to dimension features\n if (isDimension(feature) && typeof value === 'number') {\n value = value + 'px';\n }\n if (value === true) {\n mq += feature;\n } else if (value === false) {\n mq += 'not ' + feature;\n } else {\n mq += '(' + feature + ': ' + value + ')';\n }\n if (index < features.length-1) {\n mq += ' and '\n }\n });\n return mq;\n};\n\nvar json2mq = function (query) {\n var mq = '';\n if (typeof query === 'string') {\n return query;\n }\n // Handling array of media queries\n if (query instanceof Array) {\n query.forEach(function (q, index) {\n mq += obj2mq(q);\n if (index < query.length-1) {\n mq += ', '\n }\n });\n return mq;\n }\n // Handling single media query\n return obj2mq(query);\n};\n\nmodule.exports = json2mq;","/**\n * lodash (Custom Build)