\r\n \r\n \r\n )\r\n }\r\n}\r\n\r\nexport default Kontakt;\r\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = isArraysEqualEps;\nfunction isArraysEqualEps(arrayA, arrayB, eps) {\n if (arrayA && arrayB) {\n for (var i = 0; i !== arrayA.length; ++i) {\n if (Math.abs(arrayA[i] - arrayB[i]) > eps) {\n return false;\n }\n }\n return true;\n }\n return false;\n}","\"use strict\";\n\nexports.__esModule = true;\nvar generateHeatmap = exports.generateHeatmap = function generateHeatmap(instance, _ref) {\n var positions = _ref.positions;\n return new instance.visualization.HeatmapLayer({\n data: positions.reduce(function (acc, _ref2) {\n var lat = _ref2.lat,\n lng = _ref2.lng,\n _ref2$weight = _ref2.weight,\n weight = _ref2$weight === undefined ? 1 : _ref2$weight;\n acc.push({\n location: new instance.LatLng(lat, lng),\n weight: weight\n });\n return acc;\n }, [])\n });\n};\nvar optionsHeatmap = exports.optionsHeatmap = function optionsHeatmap(instance, _ref3) {\n var _ref3$options = _ref3.options,\n options = _ref3$options === undefined ? {} : _ref3$options;\n return Object.keys(options).map(function (option) {\n return instance.set(option, options[option]);\n });\n};","'use strict';\n\nexports.__esModule = true;\nvar BASE_URL = 'https://maps';\nvar DEFAULT_URL = BASE_URL + '.googleapis.com';\nvar API_PATH = '/maps/api/js?callback=_$_google_map_initialize_$_';\nvar $script_ = null;\nvar loadPromise_ = void 0;\nvar resolveCustomPromise_ = void 0;\nvar _customPromise = new Promise(function (resolve) {\n resolveCustomPromise_ = resolve;\n});\n\n// TODO add libraries language and other map options\n\nexports.default = function (bootstrapURLKeys, heatmapLibrary) {\n if (!$script_) {\n $script_ = require('scriptjs'); // eslint-disable-line\n }\n\n // call from outside google-map-react\n // will be as soon as loadPromise_ resolved\n if (!bootstrapURLKeys) {\n return _customPromise;\n }\n if (loadPromise_) {\n return loadPromise_;\n }\n loadPromise_ = new Promise(function (resolve, reject) {\n if (typeof window === 'undefined') {\n reject(new Error('google map cannot be loaded outside browser env'));\n return;\n }\n if (window.google && window.google.maps) {\n resolve(window.google.maps);\n return;\n }\n if (typeof window._$_google_map_initialize_$_ !== 'undefined') {\n reject(new Error('google map initialization error'));\n }\n window._$_google_map_initialize_$_ = function () {\n delete window._$_google_map_initialize_$_;\n resolve(window.google.maps);\n };\n if (process.env.NODE_ENV !== 'production') {\n if (Object.keys(bootstrapURLKeys).indexOf('callback') > -1) {\n var message = '\"callback\" key in bootstrapURLKeys is not allowed,\\n use onGoogleApiLoaded property instead';\n // eslint-disable-next-line no-console\n console.error(message);\n throw new Error(message);\n }\n }\n var params = Object.keys(bootstrapURLKeys).reduce(function (r, key) {\n return r + '&' + key + '=' + bootstrapURLKeys[key];\n }, '');\n var libraries = heatmapLibrary ? '&libraries=visualization' : '';\n $script_('' + DEFAULT_URL + API_PATH + params + libraries, function () {\n return typeof window.google === 'undefined' && reject(new Error('google map initialization error (not loaded)'));\n });\n });\n resolveCustomPromise_(loadPromise_);\n return loadPromise_;\n};","'use strict';\n\nexports.__esModule = true;\nvar _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};\nvar isEmpty = function isEmpty(val) {\n // check for empty object {}, array []\n if (val !== null && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object') {\n if (Object.keys(val).length === 0) {\n return true;\n }\n } else if (val === null || val === undefined || val === '') {\n // check for undefined, null and \"\"\n return true;\n }\n return false;\n};\nexports.default = isEmpty;","'use strict';\n\nexports.__esModule = true;\nvar _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 return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}(); /* eslint-disable class-methods-use-this */\n\nvar _pointGeometry = require('@mapbox/point-geometry');\nvar _pointGeometry2 = _interopRequireDefault(_pointGeometry);\nvar _lat_lng = require('./lat_lng');\nvar _lat_lng2 = _interopRequireDefault(_lat_lng);\nvar _wrap = require('./wrap');\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\n// A single transform, generally used for a single tile to be scaled, rotated, and zoomed.\nvar Transform = function () {\n function Transform(tileSize, minZoom, maxZoom) {\n _classCallCheck(this, Transform);\n this.tileSize = tileSize || 512; // constant\n\n this._minZoom = minZoom || 0;\n this._maxZoom = maxZoom || 52;\n this.latRange = [-85.05113, 85.05113];\n this.width = 0;\n this.height = 0;\n this.zoom = 0;\n this.center = new _lat_lng2.default(0, 0);\n this.angle = 0;\n }\n Transform.prototype.zoomScale = function zoomScale(zoom) {\n return Math.pow(2, zoom);\n };\n Transform.prototype.scaleZoom = function scaleZoom(scale) {\n return Math.log(scale) / Math.LN2;\n };\n Transform.prototype.project = function project(latlng, worldSize) {\n return new _pointGeometry2.default(this.lngX(latlng.lng, worldSize), this.latY(latlng.lat, worldSize));\n };\n Transform.prototype.unproject = function unproject(point, worldSize) {\n return new _lat_lng2.default(this.yLat(point.y, worldSize), this.xLng(point.x, worldSize));\n };\n\n // lat/lon <-> absolute pixel coords convertion\n Transform.prototype.lngX = function lngX(lon, worldSize) {\n return (180 + lon) * (worldSize || this.worldSize) / 360;\n };\n\n // latitude to absolute y coord\n\n Transform.prototype.latY = function latY(lat, worldSize) {\n var y = 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360));\n return (180 - y) * (worldSize || this.worldSize) / 360;\n };\n Transform.prototype.xLng = function xLng(x, worldSize) {\n return x * 360 / (worldSize || this.worldSize) - 180;\n };\n Transform.prototype.yLat = function yLat(y, worldSize) {\n var y2 = 180 - y * 360 / (worldSize || this.worldSize);\n return 360 / Math.PI * Math.atan(Math.exp(y2 * Math.PI / 180)) - 90;\n };\n Transform.prototype.locationPoint = function locationPoint(latlng) {\n var p = this.project(latlng);\n return this.centerPoint._sub(this.point._sub(p)._rotate(this.angle));\n };\n Transform.prototype.pointLocation = function pointLocation(p) {\n var p2 = this.centerPoint._sub(p)._rotate(-this.angle);\n return this.unproject(this.point.sub(p2));\n };\n _createClass(Transform, [{\n key: 'minZoom',\n get: function get() {\n return this._minZoom;\n },\n set: function set(zoom) {\n this._minZoom = zoom;\n this.zoom = Math.max(this.zoom, zoom);\n }\n }, {\n key: 'maxZoom',\n get: function get() {\n return this._maxZoom;\n },\n set: function set(zoom) {\n this._maxZoom = zoom;\n this.zoom = Math.min(this.zoom, zoom);\n }\n }, {\n key: 'worldSize',\n get: function get() {\n return this.tileSize * this.scale;\n }\n }, {\n key: 'centerPoint',\n get: function get() {\n return new _pointGeometry2.default(0, 0); // this.size._div(2);\n }\n }, {\n key: 'size',\n get: function get() {\n return new _pointGeometry2.default(this.width, this.height);\n }\n }, {\n key: 'bearing',\n get: function get() {\n return -this.angle / Math.PI * 180;\n },\n set: function set(bearing) {\n this.angle = -(0, _wrap.wrap)(bearing, -180, 180) * Math.PI / 180;\n }\n }, {\n key: 'zoom',\n get: function get() {\n return this._zoom;\n },\n set: function set(zoom) {\n var zoomV = Math.min(Math.max(zoom, this.minZoom), this.maxZoom);\n this._zoom = zoomV;\n this.scale = this.zoomScale(zoomV);\n this.tileZoom = Math.floor(zoomV);\n this.zoomFraction = zoomV - this.tileZoom;\n }\n }, {\n key: 'x',\n get: function get() {\n return this.lngX(this.center.lng);\n }\n }, {\n key: 'y',\n get: function get() {\n return this.latY(this.center.lat);\n }\n }, {\n key: 'point',\n get: function get() {\n return new _pointGeometry2.default(this.x, this.y);\n }\n }]);\n return Transform;\n}();\nexports.default = Transform;","'use strict';\n\nexports.__esModule = true;\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n};\nvar _pointGeometry = require('@mapbox/point-geometry');\nvar _pointGeometry2 = _interopRequireDefault(_pointGeometry);\nvar _lat_lng = require('./lib_geo/lat_lng');\nvar _lat_lng2 = _interopRequireDefault(_lat_lng);\nvar _transform = require('./lib_geo/transform');\nvar _transform2 = _interopRequireDefault(_transform);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nvar Geo = function () {\n function Geo(tileSize) {\n _classCallCheck(this, Geo);\n\n // left_top view пользует гугл\n // super();\n this.hasSize_ = false;\n this.hasView_ = false;\n this.transform_ = new _transform2.default(tileSize || 512);\n }\n Geo.prototype.setView = function setView(center, zoom, bearing) {\n this.transform_.center = _lat_lng2.default.convert(center);\n this.transform_.zoom = +zoom;\n this.transform_.bearing = +bearing;\n this.hasView_ = true;\n };\n Geo.prototype.setViewSize = function setViewSize(width, height) {\n this.transform_.width = width;\n this.transform_.height = height;\n this.hasSize_ = true;\n };\n Geo.prototype.setMapCanvasProjection = function setMapCanvasProjection(maps, mapCanvasProjection) {\n this.maps_ = maps;\n this.mapCanvasProjection_ = mapCanvasProjection;\n };\n Geo.prototype.canProject = function canProject() {\n return this.hasSize_ && this.hasView_;\n };\n Geo.prototype.hasSize = function hasSize() {\n return this.hasSize_;\n };\n\n /** Returns the pixel position relative to the map center. */\n\n Geo.prototype.fromLatLngToCenterPixel = function fromLatLngToCenterPixel(ptLatLng) {\n return this.transform_.locationPoint(_lat_lng2.default.convert(ptLatLng));\n };\n\n /**\n * Returns the pixel position relative to the map panes,\n * or relative to the map center if there are no panes.\n */\n\n Geo.prototype.fromLatLngToDivPixel = function fromLatLngToDivPixel(ptLatLng) {\n if (this.mapCanvasProjection_) {\n var latLng = new this.maps_.LatLng(ptLatLng.lat, ptLatLng.lng);\n return this.mapCanvasProjection_.fromLatLngToDivPixel(latLng);\n }\n return this.fromLatLngToCenterPixel(ptLatLng);\n };\n\n /** Returns the pixel position relative to the map top-left. */\n\n Geo.prototype.fromLatLngToContainerPixel = function fromLatLngToContainerPixel(ptLatLng) {\n if (this.mapCanvasProjection_) {\n var latLng = new this.maps_.LatLng(ptLatLng.lat, ptLatLng.lng);\n return this.mapCanvasProjection_.fromLatLngToContainerPixel(latLng);\n }\n var pt = this.fromLatLngToCenterPixel(ptLatLng);\n pt.x -= this.transform_.worldSize * Math.round(pt.x / this.transform_.worldSize);\n pt.x += this.transform_.width / 2;\n pt.y += this.transform_.height / 2;\n return pt;\n };\n\n /** Returns the LatLng for the given offset from the map top-left. */\n\n Geo.prototype.fromContainerPixelToLatLng = function fromContainerPixelToLatLng(ptXY) {\n if (this.mapCanvasProjection_) {\n var latLng = this.mapCanvasProjection_.fromContainerPixelToLatLng(ptXY);\n return {\n lat: latLng.lat(),\n lng: latLng.lng()\n };\n }\n var ptxy = _extends({}, ptXY);\n ptxy.x -= this.transform_.width / 2;\n ptxy.y -= this.transform_.height / 2;\n var ptRes = this.transform_.pointLocation(_pointGeometry2.default.convert(ptxy));\n ptRes.lng -= 360 * Math.round(ptRes.lng / 360); // convert 2 google format\n return ptRes;\n };\n Geo.prototype.getWidth = function getWidth() {\n return this.transform_.width;\n };\n Geo.prototype.getHeight = function getHeight() {\n return this.transform_.height;\n };\n Geo.prototype.getZoom = function getZoom() {\n return this.transform_.zoom;\n };\n Geo.prototype.getCenter = function getCenter() {\n var ptRes = this.transform_.pointLocation({\n x: 0,\n y: 0\n });\n return ptRes;\n };\n Geo.prototype.getBounds = function getBounds(margins, roundFactor) {\n var bndT = margins && margins[0] || 0;\n var bndR = margins && margins[1] || 0;\n var bndB = margins && margins[2] || 0;\n var bndL = margins && margins[3] || 0;\n if (this.getWidth() - bndR - bndL > 0 && this.getHeight() - bndT - bndB > 0) {\n var topLeftCorner = this.transform_.pointLocation(_pointGeometry2.default.convert({\n x: bndL - this.getWidth() / 2,\n y: bndT - this.getHeight() / 2\n }));\n var bottomRightCorner = this.transform_.pointLocation(_pointGeometry2.default.convert({\n x: this.getWidth() / 2 - bndR,\n y: this.getHeight() / 2 - bndB\n }));\n var res = [topLeftCorner.lat, topLeftCorner.lng,\n // NW\n bottomRightCorner.lat, bottomRightCorner.lng,\n // SE\n bottomRightCorner.lat, topLeftCorner.lng,\n // SW\n topLeftCorner.lat, bottomRightCorner.lng];\n if (roundFactor) {\n res = res.map(function (r) {\n return Math.round(r * roundFactor) / roundFactor;\n });\n }\n return res;\n }\n return [0, 0, 0, 0];\n };\n return Geo;\n}();\nexports.default = Geo;","'use strict';\n\nexports.__esModule = true;\nexports.default = detectBrowser;\n// http://stackoverflow.com/questions/5899783/detect-safari-chrome-ie-firefox-opera-with-user-agent\nvar detectBrowserResult_ = null;\nfunction detectBrowser() {\n if (detectBrowserResult_) {\n return detectBrowserResult_;\n }\n if (typeof navigator !== 'undefined') {\n var isExplorer = navigator.userAgent.indexOf('MSIE') > -1;\n var isFirefox = navigator.userAgent.indexOf('Firefox') > -1;\n var isOpera = navigator.userAgent.toLowerCase().indexOf('op') > -1;\n var isChrome = navigator.userAgent.indexOf('Chrome') > -1;\n var isSafari = navigator.userAgent.indexOf('Safari') > -1;\n if (isChrome && isSafari) {\n isSafari = false;\n }\n if (isChrome && isOpera) {\n isChrome = false;\n }\n detectBrowserResult_ = {\n isExplorer: isExplorer,\n isFirefox: isFirefox,\n isOpera: isOpera,\n isChrome: isChrome,\n isSafari: isSafari\n };\n return detectBrowserResult_;\n }\n detectBrowserResult_ = {\n isChrome: true,\n isExplorer: false,\n isFirefox: false,\n isOpera: false,\n isSafari: false\n };\n return detectBrowserResult_;\n}","'use strict';\n\nexports.__esModule = true;\nvar _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};\nexports.default = isPlainObject;\n// source taken from https://github.com/rackt/redux/blob/master/src/utils/isPlainObject.js\nvar fnToString = function fnToString(fn) {\n return Function.prototype.toString.call(fn);\n};\n\n/**\n * @param {any} obj The object to inspect.\n * @returns {boolean} True if the argument appears to be a plain object.\n */\nfunction isPlainObject(obj) {\n if (!obj || (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object') {\n return false;\n }\n var proto = typeof obj.constructor === 'function' ? Object.getPrototypeOf(obj) : Object.prototype;\n if (proto === null) {\n return true;\n }\n var constructor = proto.constructor;\n return typeof constructor === 'function' && constructor instanceof constructor && fnToString(constructor) === fnToString(Object);\n}","'use strict';\n\nrequire(\"core-js/modules/es.array.sort.js\");\nexports.__esModule = true;\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n};\nvar _react = require('react');\nvar _react2 = _interopRequireDefault(_react);\nvar _propTypes = require('prop-types');\nvar _propTypes2 = _interopRequireDefault(_propTypes);\nvar _omit = require('./utils/omit');\nvar _omit2 = _interopRequireDefault(_omit);\nvar _shallowEqual = require('./utils/shallowEqual');\nvar _shallowEqual2 = _interopRequireDefault(_shallowEqual);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n}\nfunction _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 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// utils\n\nvar mainStyle = {\n width: '100%',\n height: '100%',\n left: 0,\n top: 0,\n margin: 0,\n padding: 0,\n position: 'absolute'\n};\nvar style = {\n width: 0,\n height: 0,\n left: 0,\n top: 0,\n backgroundColor: 'transparent',\n position: 'absolute'\n};\nvar GoogleMapMarkers = function (_Component) {\n _inherits(GoogleMapMarkers, _Component);\n\n /* eslint-disable react/forbid-prop-types */\n function GoogleMapMarkers(props) {\n _classCallCheck(this, GoogleMapMarkers);\n var _this = _possibleConstructorReturn(this, _Component.call(this, props));\n _this._getState = function () {\n return {\n children: _this.props.dispatcher.getChildren(),\n updateCounter: _this.props.dispatcher.getUpdateCounter()\n };\n };\n _this._onChangeHandler = function () {\n if (!_this.dimensionsCache_) {\n return;\n }\n var prevChildCount = (_this.state.children || []).length;\n var state = _this._getState();\n _this.setState(state, function () {\n return (state.children || []).length !== prevChildCount && _this._onMouseChangeHandler();\n });\n };\n _this._onChildClick = function () {\n if (_this.props.onChildClick) {\n if (_this.hoverChildProps_) {\n var hoverKey = _this.hoverKey_;\n var childProps = _this.hoverChildProps_;\n // click works only on hovered item\n _this.props.onChildClick(hoverKey, childProps);\n }\n }\n };\n _this._onChildMouseDown = function () {\n if (_this.props.onChildMouseDown) {\n if (_this.hoverChildProps_) {\n var hoverKey = _this.hoverKey_;\n var childProps = _this.hoverChildProps_;\n // works only on hovered item\n _this.props.onChildMouseDown(hoverKey, childProps);\n }\n }\n };\n _this._onChildMouseEnter = function (hoverKey, childProps) {\n if (!_this.dimensionsCache_) {\n return;\n }\n if (_this.props.onChildMouseEnter) {\n _this.props.onChildMouseEnter(hoverKey, childProps);\n }\n _this.hoverChildProps_ = childProps;\n _this.hoverKey_ = hoverKey;\n _this.setState({\n hoverKey: hoverKey\n });\n };\n _this._onChildMouseLeave = function () {\n if (!_this.dimensionsCache_) {\n return;\n }\n var hoverKey = _this.hoverKey_;\n var childProps = _this.hoverChildProps_;\n if (hoverKey !== undefined && hoverKey !== null) {\n if (_this.props.onChildMouseLeave) {\n _this.props.onChildMouseLeave(hoverKey, childProps);\n }\n _this.hoverKey_ = null;\n _this.hoverChildProps_ = null;\n _this.setState({\n hoverKey: null\n });\n }\n };\n _this._onMouseAllow = function (value) {\n if (!value) {\n _this._onChildMouseLeave();\n }\n _this.allowMouse_ = value;\n };\n _this._onMouseChangeHandler = function () {\n if (_this.allowMouse_) {\n _this._onMouseChangeHandlerRaf();\n }\n };\n _this._onMouseChangeHandlerRaf = function () {\n if (!_this.dimensionsCache_) {\n return;\n }\n var mp = _this.props.dispatcher.getMousePosition();\n if (mp) {\n var distances = [];\n var hoverDistance = _this.props.getHoverDistance();\n _react2.default.Children.forEach(_this.state.children, function (child, childIndex) {\n if (!child) return;\n // layers\n if (child.props.latLng === undefined && child.props.lat === undefined && child.props.lng === undefined) {\n return;\n }\n var childKey = child.key !== undefined && child.key !== null ? child.key : childIndex;\n var dist = _this.props.distanceToMouse(_this.dimensionsCache_[childKey], mp, child.props);\n if (dist < hoverDistance) {\n distances.push({\n key: childKey,\n dist: dist,\n props: child.props\n });\n }\n });\n if (distances.length) {\n distances.sort(function (a, b) {\n return a.dist - b.dist;\n });\n var hoverKey = distances[0].key;\n var childProps = distances[0].props;\n if (_this.hoverKey_ !== hoverKey) {\n _this._onChildMouseLeave();\n _this._onChildMouseEnter(hoverKey, childProps);\n }\n } else {\n _this._onChildMouseLeave();\n }\n } else {\n _this._onChildMouseLeave();\n }\n };\n _this._getDimensions = function (key) {\n var childKey = key;\n return _this.dimensionsCache_[childKey];\n };\n _this.props.dispatcher.on('kON_CHANGE', _this._onChangeHandler);\n _this.props.dispatcher.on('kON_MOUSE_POSITION_CHANGE', _this._onMouseChangeHandler);\n _this.props.dispatcher.on('kON_CLICK', _this._onChildClick);\n _this.props.dispatcher.on('kON_MDOWN', _this._onChildMouseDown);\n _this.dimensionsCache_ = {};\n _this.hoverKey_ = null;\n _this.hoverChildProps_ = null;\n _this.allowMouse_ = true;\n _this.state = _extends({}, _this._getState(), {\n hoverKey: null\n });\n return _this;\n }\n /* eslint-enable react/forbid-prop-types */\n\n GoogleMapMarkers.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps, nextState) {\n if (this.props.experimental === true) {\n return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)((0, _omit2.default)(this.state, ['hoverKey']), (0, _omit2.default)(nextState, ['hoverKey']));\n }\n return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState);\n };\n GoogleMapMarkers.prototype.componentWillUnmount = function componentWillUnmount() {\n this.props.dispatcher.removeListener('kON_CHANGE', this._onChangeHandler);\n this.props.dispatcher.removeListener('kON_MOUSE_POSITION_CHANGE', this._onMouseChangeHandler);\n this.props.dispatcher.removeListener('kON_CLICK', this._onChildClick);\n this.props.dispatcher.removeListener('kON_MDOWN', this._onChildMouseDown);\n this.dimensionsCache_ = null;\n };\n GoogleMapMarkers.prototype.render = function render() {\n var _this2 = this;\n var mainElementStyle = this.props.style || mainStyle;\n this.dimensionsCache_ = {};\n var markers = _react2.default.Children.map(this.state.children, function (child, childIndex) {\n if (!child) return undefined;\n if (child.props.latLng === undefined && child.props.lat === undefined && child.props.lng === undefined) {\n return _react2.default.cloneElement(child, {\n $geoService: _this2.props.geoService,\n $onMouseAllow: _this2._onMouseAllow,\n $prerender: _this2.props.prerender\n });\n }\n var latLng = child.props.latLng !== undefined ? child.props.latLng : {\n lat: child.props.lat,\n lng: child.props.lng\n };\n var pt = _this2.props.insideMapPanes ? _this2.props.geoService.fromLatLngToDivPixel(latLng) : _this2.props.geoService.fromLatLngToCenterPixel(latLng);\n var stylePtPos = {\n left: pt.x,\n top: pt.y\n };\n\n // If the component has a southeast corner defined (either as a LatLng, or a separate\n // lat and lng pair), set the width and height based on the distance between the northwest\n // and the southeast corner to lock the overlay to the correct geographic bounds.\n if (child.props.seLatLng !== undefined || child.props.seLat !== undefined && child.props.seLng !== undefined) {\n var seLatLng = child.props.seLatLng !== undefined ? child.props.seLatLng : {\n lat: child.props.seLat,\n lng: child.props.seLng\n };\n var sePt = _this2.props.insideMapPanes ? _this2.props.geoService.fromLatLngToDivPixel(seLatLng) : _this2.props.geoService.fromLatLngToCenterPixel(seLatLng);\n stylePtPos.width = sePt.x - pt.x;\n stylePtPos.height = sePt.y - pt.y;\n }\n var containerPt = _this2.props.geoService.fromLatLngToContainerPixel(latLng);\n\n // to prevent rerender on child element i need to pass\n // const params $getDimensions and $dimensionKey instead of dimension object\n var childKey = child.key !== undefined && child.key !== null ? child.key : childIndex;\n _this2.dimensionsCache_[childKey] = _extends({\n x: containerPt.x,\n y: containerPt.y\n }, latLng);\n return _react2.default.createElement('div', {\n key: childKey,\n style: _extends({}, style, stylePtPos),\n className: child.props.$markerHolderClassName\n }, _react2.default.cloneElement(child, {\n $hover: childKey === _this2.state.hoverKey,\n $getDimensions: _this2._getDimensions,\n $dimensionKey: childKey,\n $geoService: _this2.props.geoService,\n $onMouseAllow: _this2._onMouseAllow,\n $prerender: _this2.props.prerender\n }));\n });\n return _react2.default.createElement('div', {\n style: mainElementStyle\n }, markers);\n };\n return GoogleMapMarkers;\n}(_react.Component);\nGoogleMapMarkers.propTypes = {\n geoService: _propTypes2.default.any,\n style: _propTypes2.default.any,\n distanceToMouse: _propTypes2.default.func,\n dispatcher: _propTypes2.default.any,\n onChildClick: _propTypes2.default.func,\n onChildMouseDown: _propTypes2.default.func,\n onChildMouseLeave: _propTypes2.default.func,\n onChildMouseEnter: _propTypes2.default.func,\n getHoverDistance: _propTypes2.default.func,\n insideMapPanes: _propTypes2.default.bool,\n prerender: _propTypes2.default.bool\n};\nGoogleMapMarkers.defaultProps = {\n insideMapPanes: false,\n prerender: false\n};\nexports.default = GoogleMapMarkers;","\"use strict\";\n\nexports.__esModule = true;\nvar log2 = Math.log2 ? Math.log2 : function (x) {\n return Math.log(x) / Math.LN2;\n};\nexports.default = log2;","'use strict';\n\nexports.__esModule = true;\nvar _wrap2 = require('./wrap');\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nvar LatLng = function () {\n function LatLng(lat, lng) {\n _classCallCheck(this, LatLng);\n if (isNaN(lat) || isNaN(lng)) {\n throw new Error('Invalid LatLng object: (' + lat + ', ' + lng + ')');\n }\n this.lat = +lat;\n this.lng = +lng;\n }\n LatLng.prototype.wrap = function wrap() {\n return new LatLng(this.lat, (0, _wrap2.wrap)(this.lng, -180, 180));\n };\n return LatLng;\n}();\nLatLng.convert = function (a) {\n if (a instanceof LatLng) {\n return a;\n }\n if (Array.isArray(a)) {\n return new LatLng(a[0], a[1]);\n }\n if ('lng' in a && 'lat' in a) {\n return new LatLng(a.lat, a.lng);\n }\n return a;\n};\nexports.default = LatLng;","/*!\n * $script.js JS loader & dependency manager\n * https://github.com/ded/script.js\n * (c) Dustin Diaz 2014 | License MIT\n */\n\n(function (name, definition) {\n if (typeof module != 'undefined' && module.exports) module.exports = definition();else if (typeof define == 'function' && define.amd) define(definition);else this[name] = definition();\n})('$script', function () {\n var doc = document,\n head = doc.getElementsByTagName('head')[0],\n s = 'string',\n f = false,\n push = 'push',\n readyState = 'readyState',\n onreadystatechange = 'onreadystatechange',\n list = {},\n ids = {},\n delay = {},\n scripts = {},\n scriptpath,\n urlArgs;\n function every(ar, fn) {\n for (var i = 0, j = ar.length; i < j; ++i) if (!fn(ar[i])) return f;\n return 1;\n }\n function each(ar, fn) {\n every(ar, function (el) {\n fn(el);\n return 1;\n });\n }\n function $script(paths, idOrDone, optDone) {\n paths = paths[push] ? paths : [paths];\n var idOrDoneIsDone = idOrDone && idOrDone.call,\n done = idOrDoneIsDone ? idOrDone : optDone,\n id = idOrDoneIsDone ? paths.join('') : idOrDone,\n queue = paths.length;\n function loopFn(item) {\n return item.call ? item() : list[item];\n }\n function callback() {\n if (! --queue) {\n list[id] = 1;\n done && done();\n for (var dset in delay) {\n every(dset.split('|'), loopFn) && !each(delay[dset], loopFn) && (delay[dset] = []);\n }\n }\n }\n setTimeout(function () {\n each(paths, function loading(path, force) {\n if (path === null) return callback();\n if (!force && !/^https?:\\/\\//.test(path) && scriptpath) {\n path = path.indexOf('.js') === -1 ? scriptpath + path + '.js' : scriptpath + path;\n }\n if (scripts[path]) {\n if (id) ids[id] = 1;\n return scripts[path] == 2 ? callback() : setTimeout(function () {\n loading(path, true);\n }, 0);\n }\n scripts[path] = 1;\n if (id) ids[id] = 1;\n create(path, callback);\n });\n }, 0);\n return $script;\n }\n function create(path, fn) {\n var el = doc.createElement('script'),\n loaded;\n el.onload = el.onerror = el[onreadystatechange] = function () {\n if (el[readyState] && !/^c|loade/.test(el[readyState]) || loaded) return;\n el.onload = el[onreadystatechange] = null;\n loaded = 1;\n scripts[path] = 2;\n fn();\n };\n el.async = 1;\n el.src = urlArgs ? path + (path.indexOf('?') === -1 ? '?' : '&') + urlArgs : path;\n head.insertBefore(el, head.lastChild);\n }\n $script.get = create;\n $script.order = function (scripts, id, done) {\n (function callback(s) {\n s = scripts.shift();\n !scripts.length ? $script(s, id, done) : $script(s, callback);\n })();\n };\n $script.path = function (p) {\n scriptpath = p;\n };\n $script.urlArgs = function (str) {\n urlArgs = str;\n };\n $script.ready = function (deps, ready, req) {\n deps = deps[push] ? deps : [deps];\n var missing = [];\n !each(deps, function (dep) {\n list[dep] || missing[push](dep);\n }) && every(deps, function (dep) {\n return list[dep];\n }) ? ready() : !function (key) {\n delay[key] = delay[key] || [];\n delay[key][push](ready);\n req && req(missing);\n }(deps.join('|'));\n return $script;\n };\n $script.done = function (idOrDone) {\n $script([null], idOrDone);\n };\n return $script;\n});","'use strict';\n\nexports.__esModule = true;\nvar _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};\nexports.default = isNumber;\nfunction isObjectLike(value) {\n return !!value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object';\n}\nvar objectToString = Object.prototype.toString;\nfunction isNumber(value) {\n var numberTag = '[object Number]';\n return typeof value === 'number' || isObjectLike(value) && objectToString.call(value) === numberTag;\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = raf;\nfunction raf(callback) {\n if (window.requestAnimationFrame) {\n return window.requestAnimationFrame(callback);\n }\n var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;\n return nativeRaf ? nativeRaf(callback) : window.setTimeout(callback, 1e3 / 60);\n}","'use strict';\n\nvar has = Object.prototype.hasOwnProperty;\n\n//\n// We store our EE objects in a plain object whose properties are event names.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// `~` to make sure that the built-in object properties are not overridden or\n// used as an attack vector.\n// We also assume that `Object.create(null)` is available when the event name\n// is an ES6 Symbol.\n//\nvar prefix = typeof Object.create !== 'function' ? '~' : false;\n\n/**\n * Representation of a single EventEmitter function.\n *\n * @param {Function} fn Event handler to be called.\n * @param {Mixed} context Context for function execution.\n * @param {Boolean} [once=false] Only emit once\n * @api private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Minimal EventEmitter interface that is molded against the Node.js\n * EventEmitter interface.\n *\n * @constructor\n * @api public\n */\nfunction EventEmitter() {/* Nothing to set */}\n\n/**\n * Hold the assigned EventEmitters by name.\n *\n * @type {Object}\n * @private\n */\nEventEmitter.prototype._events = undefined;\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @api public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var events = this._events,\n names = [],\n name;\n if (!events) return names;\n for (name in events) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n return names;\n};\n\n/**\n * Return a list of assigned event listeners.\n *\n * @param {String} event The events that should be listed.\n * @param {Boolean} exists We only need to know if there are listeners.\n * @returns {Array|Boolean}\n * @api public\n */\nEventEmitter.prototype.listeners = function listeners(event, exists) {\n var evt = prefix ? prefix + event : event,\n available = this._events && this._events[evt];\n if (exists) return !!available;\n if (!available) return [];\n if (available.fn) return [available.fn];\n for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) {\n ee[i] = available[i].fn;\n }\n return ee;\n};\n\n/**\n * Emit an event to all registered event listeners.\n *\n * @param {String} event The name of the event.\n * @returns {Boolean} Indication if we've emitted an event.\n * @api public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n if (!this._events || !this._events[evt]) return false;\n var listeners = this._events[evt],\n len = arguments.length,\n args,\n i;\n if ('function' === typeof listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n switch (len) {\n case 1:\n return listeners.fn.call(listeners.context), true;\n case 2:\n return listeners.fn.call(listeners.context, a1), true;\n case 3:\n return listeners.fn.call(listeners.context, a1, a2), true;\n case 4:\n return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5:\n return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6:\n return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n for (i = 1, args = new Array(len - 1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length,\n j;\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n switch (len) {\n case 1:\n listeners[i].fn.call(listeners[i].context);\n break;\n case 2:\n listeners[i].fn.call(listeners[i].context, a1);\n break;\n case 3:\n listeners[i].fn.call(listeners[i].context, a1, a2);\n break;\n default:\n if (!args) for (j = 1, args = new Array(len - 1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n return true;\n};\n\n/**\n * Register a new EventListener for the given event.\n *\n * @param {String} event Name of the event.\n * @param {Function} fn Callback function.\n * @param {Mixed} [context=this] The context of the function.\n * @api public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n var listener = new EE(fn, context || this),\n evt = prefix ? prefix + event : event;\n if (!this._events) this._events = prefix ? {} : Object.create(null);\n if (!this._events[evt]) this._events[evt] = listener;else {\n if (!this._events[evt].fn) this._events[evt].push(listener);else this._events[evt] = [this._events[evt], listener];\n }\n return this;\n};\n\n/**\n * Add an EventListener that's only called once.\n *\n * @param {String} event Name of the event.\n * @param {Function} fn Callback function.\n * @param {Mixed} [context=this] The context of the function.\n * @api public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n var listener = new EE(fn, context || this, true),\n evt = prefix ? prefix + event : event;\n if (!this._events) this._events = prefix ? {} : Object.create(null);\n if (!this._events[evt]) this._events[evt] = listener;else {\n if (!this._events[evt].fn) this._events[evt].push(listener);else this._events[evt] = [this._events[evt], listener];\n }\n return this;\n};\n\n/**\n * Remove event listeners.\n *\n * @param {String} event The event we want to remove.\n * @param {Function} fn The listener that we need to find.\n * @param {Mixed} context Only remove listeners matching this context.\n * @param {Boolean} once Only remove once listeners.\n * @api public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n if (!this._events || !this._events[evt]) return this;\n var listeners = this._events[evt],\n events = [];\n if (fn) {\n if (listeners.fn) {\n if (listeners.fn !== fn || once && !listeners.once || context && listeners.context !== context) {\n events.push(listeners);\n }\n } else {\n for (var i = 0, length = listeners.length; i < length; i++) {\n if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) {\n events.push(listeners[i]);\n }\n }\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) {\n this._events[evt] = events.length === 1 ? events[0] : events;\n } else {\n delete this._events[evt];\n }\n return this;\n};\n\n/**\n * Remove all listeners or only the listeners for the specified event.\n *\n * @param {String} event The event want to remove all listeners for.\n * @api public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n if (!this._events) return this;\n if (event) delete this._events[prefix ? prefix + event : event];else this._events = prefix ? {} : Object.create(null);\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// This function doesn't apply anymore.\n//\nEventEmitter.prototype.setMaxListeners = function setMaxListeners() {\n return this;\n};\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}","'use strict';\n\nexports.__esModule = true;\nvar _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};\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n};\nvar _react = require('react');\nvar _react2 = _interopRequireDefault(_react);\nvar _propTypes = require('prop-types');\nvar _propTypes2 = _interopRequireDefault(_propTypes);\nvar _reactDom = require('react-dom');\nvar _reactDom2 = _interopRequireDefault(_reactDom);\nvar _google_map_map = require('./google_map_map');\nvar _google_map_map2 = _interopRequireDefault(_google_map_map);\nvar _marker_dispatcher = require('./marker_dispatcher');\nvar _marker_dispatcher2 = _interopRequireDefault(_marker_dispatcher);\nvar _google_map_markers = require('./google_map_markers');\nvar _google_map_markers2 = _interopRequireDefault(_google_map_markers);\nvar _google_map_markers_prerender = require('./google_map_markers_prerender');\nvar _google_map_markers_prerender2 = _interopRequireDefault(_google_map_markers_prerender);\nvar _google_heatmap = require('./google_heatmap');\nvar _google_map_loader = require('./loaders/google_map_loader');\nvar _google_map_loader2 = _interopRequireDefault(_google_map_loader);\nvar _geo = require('./utils/geo');\nvar _geo2 = _interopRequireDefault(_geo);\nvar _raf = require('./utils/raf');\nvar _raf2 = _interopRequireDefault(_raf);\nvar _pick = require('./utils/pick');\nvar _pick2 = _interopRequireDefault(_pick);\nvar _omit = require('./utils/omit');\nvar _omit2 = _interopRequireDefault(_omit);\nvar _log = require('./utils/math/log2');\nvar _log2 = _interopRequireDefault(_log);\nvar _isEmpty = require('./utils/isEmpty');\nvar _isEmpty2 = _interopRequireDefault(_isEmpty);\nvar _isNumber = require('./utils/isNumber');\nvar _isNumber2 = _interopRequireDefault(_isNumber);\nvar _detect = require('./utils/detect');\nvar _detect2 = _interopRequireDefault(_detect);\nvar _shallowEqual = require('./utils/shallowEqual');\nvar _shallowEqual2 = _interopRequireDefault(_shallowEqual);\nvar _isPlainObject = require('./utils/isPlainObject');\nvar _isPlainObject2 = _interopRequireDefault(_isPlainObject);\nvar _isArraysEqualEps = require('./utils/isArraysEqualEps');\nvar _isArraysEqualEps2 = _interopRequireDefault(_isArraysEqualEps);\nvar _detectElementResize = require('./utils/detectElementResize');\nvar _detectElementResize2 = _interopRequireDefault(_detectElementResize);\nvar _passiveEvents = require('./utils/passiveEvents');\nvar _passiveEvents2 = _interopRequireDefault(_passiveEvents);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n}\nfunction _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 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} /* eslint-disable import/no-extraneous-dependencies, react/forbid-prop-types, react/no-find-dom-node, no-console */\n\n// helpers\n\n// loaders\n\n// utils\n\n// consts\nvar kEPS = 0.00001;\nvar K_GOOGLE_TILE_SIZE = 256;\n// real minZoom calculated here _getMinZoom\nvar K_IDLE_TIMEOUT = 100;\nvar K_IDLE_CLICK_TIMEOUT = 300;\nvar DEFAULT_MIN_ZOOM = 3;\n// Starting with version 3.32, the maps API calls `draw()` each frame during\n// a zoom animation.\nvar DRAW_CALLED_DURING_ANIMATION_VERSION = 32;\nvar IS_REACT_16 = _reactDom2.default.createPortal !== undefined;\nvar createPortal = IS_REACT_16 ? _reactDom2.default.createPortal : _reactDom2.default.unstable_renderSubtreeIntoContainer;\nfunction defaultOptions_() /* maps */{\n return {\n overviewMapControl: false,\n streetViewControl: false,\n rotateControl: true,\n mapTypeControl: false,\n // disable poi\n styles: [{\n featureType: 'poi',\n elementType: 'labels',\n stylers: [{\n visibility: 'off'\n }]\n }],\n minZoom: DEFAULT_MIN_ZOOM // dynamically recalculted if possible during init\n };\n}\nvar latLng2Obj = function latLng2Obj(latLng) {\n return (0, _isPlainObject2.default)(latLng) ? latLng : {\n lat: latLng[0],\n lng: latLng[1]\n };\n};\nvar _checkMinZoom = function _checkMinZoom(zoom, minZoom) {\n if (process.env.NODE_ENV !== 'production') {\n if (zoom < minZoom) {\n console.warn('GoogleMap: ' +\n // eslint-disable-line\n 'minZoom option is less than recommended ' + 'minZoom option for your map sizes.\\n' + 'overrided to value ' + minZoom);\n }\n }\n if (minZoom < zoom) {\n return zoom;\n }\n return minZoom;\n};\nvar isFullScreen = function isFullScreen() {\n return document.fullscreen || document.webkitIsFullScreen || document.mozFullScreen || document.msFullscreenElement;\n};\nvar GoogleMap = function (_Component) {\n _inherits(GoogleMap, _Component);\n\n // eslint-disable-line\n\n function GoogleMap(props) {\n _classCallCheck(this, GoogleMap);\n var _this = _possibleConstructorReturn(this, _Component.call(this, props));\n _this._getMinZoom = function () {\n if (_this.geoService_.getWidth() > 0 || _this.geoService_.getHeight() > 0) {\n var tilesPerWidth = Math.ceil(_this.geoService_.getWidth() / K_GOOGLE_TILE_SIZE) + 2;\n var tilesPerHeight = Math.ceil(_this.geoService_.getHeight() / K_GOOGLE_TILE_SIZE) + 2;\n var maxTilesPerDim = Math.max(tilesPerWidth, tilesPerHeight);\n return Math.ceil((0, _log2.default)(maxTilesPerDim));\n }\n return DEFAULT_MIN_ZOOM;\n };\n _this._computeMinZoom = function (minZoom) {\n if (!(0, _isEmpty2.default)(minZoom)) {\n return minZoom;\n }\n return _this._getMinZoom();\n };\n _this._mapDomResizeCallback = function () {\n _this.resetSizeOnIdle_ = true;\n if (_this.maps_) {\n var originalCenter = _this.props.center || _this.props.defaultCenter;\n var currentCenter = _this.map_.getCenter();\n _this.maps_.event.trigger(_this.map_, 'resize');\n _this.map_.setCenter(_this.props.resetBoundsOnResize ? originalCenter : currentCenter);\n }\n };\n _this._setLayers = function (layerTypes) {\n layerTypes.forEach(function (layerType) {\n _this.layers_[layerType] = new _this.maps_[layerType]();\n _this.layers_[layerType].setMap(_this.map_);\n });\n };\n _this._renderPortal = function () {\n return _react2.default.createElement(_google_map_markers2.default, {\n experimental: _this.props.experimental,\n onChildClick: _this._onChildClick,\n onChildMouseDown: _this._onChildMouseDown,\n onChildMouseEnter: _this._onChildMouseEnter,\n onChildMouseLeave: _this._onChildMouseLeave,\n geoService: _this.geoService_,\n insideMapPanes: true,\n distanceToMouse: _this.props.distanceToMouse,\n getHoverDistance: _this._getHoverDistance,\n dispatcher: _this.markersDispatcher_\n });\n };\n _this._initMap = function () {\n // only initialize the map once\n if (_this.initialized_) {\n return;\n }\n _this.initialized_ = true;\n var propsCenter = latLng2Obj(_this.props.center || _this.props.defaultCenter);\n _this.geoService_.setView(propsCenter, _this.props.zoom || _this.props.defaultZoom, 0);\n _this._onBoundsChanged(); // now we can calculate map bounds center etc...\n\n var bootstrapURLKeys = _extends({}, _this.props.apiKey && {\n key: _this.props.apiKey\n }, _this.props.bootstrapURLKeys);\n _this.props.googleMapLoader(bootstrapURLKeys, _this.props.heatmapLibrary).then(function (maps) {\n if (!_this.mounted_) {\n return;\n }\n var centerLatLng = _this.geoService_.getCenter();\n var propsOptions = {\n zoom: _this.props.zoom || _this.props.defaultZoom,\n center: new maps.LatLng(centerLatLng.lat, centerLatLng.lng)\n };\n\n // Start Heatmap\n if (_this.props.heatmap.positions) {\n Object.assign(_this, {\n heatmap: (0, _google_heatmap.generateHeatmap)(maps, _this.props.heatmap)\n });\n (0, _google_heatmap.optionsHeatmap)(_this.heatmap, _this.props.heatmap);\n }\n // End Heatmap\n\n // prevent to exapose full api\n // next props must be exposed (console.log(Object.keys(pick(maps, isPlainObject))))\n // \"Animation\", \"ControlPosition\", \"MapTypeControlStyle\", \"MapTypeId\",\n // \"NavigationControlStyle\", \"ScaleControlStyle\", \"StrokePosition\",\n // \"SymbolPath\", \"ZoomControlStyle\",\n // \"event\", \"DirectionsStatus\", \"DirectionsTravelMode\", \"DirectionsUnitSystem\",\n // \"DistanceMatrixStatus\",\n // \"DistanceMatrixElementStatus\", \"ElevationStatus\", \"GeocoderLocationType\",\n // \"GeocoderStatus\", \"KmlLayerStatus\",\n // \"MaxZoomStatus\", \"StreetViewStatus\", \"TransitMode\", \"TransitRoutePreference\",\n // \"TravelMode\", \"UnitSystem\"\n var mapPlainObjects = (0, _pick2.default)(maps, _isPlainObject2.default);\n var options = typeof _this.props.options === 'function' ? _this.props.options(mapPlainObjects) : _this.props.options;\n var defaultOptions = defaultOptions_(mapPlainObjects);\n var draggableOptions = !(0, _isEmpty2.default)(_this.props.draggable) && {\n draggable: _this.props.draggable\n };\n var minZoom = _this._computeMinZoom(options.minZoom);\n _this.minZoom_ = minZoom;\n var preMapOptions = _extends({}, defaultOptions, {\n minZoom: minZoom\n }, options, propsOptions);\n _this.defaultDraggableOption_ = !(0, _isEmpty2.default)(preMapOptions.draggable) ? preMapOptions.draggable : _this.defaultDraggableOption_;\n var mapOptions = _extends({}, preMapOptions, draggableOptions);\n mapOptions.minZoom = _checkMinZoom(mapOptions.minZoom, minZoom);\n var map = new maps.Map(_reactDom2.default.findDOMNode(_this.googleMapDom_), mapOptions);\n _this.map_ = map;\n _this.maps_ = maps;\n _this._setLayers(_this.props.layerTypes);\n\n // Parse `google.maps.version` to capture the major version number.\n var versionMatch = maps.version.match(/^3\\.(\\d+)\\./);\n // The major version is the first (and only) captured group.\n var mapsVersion = versionMatch && Number(versionMatch[1]);\n\n // render in overlay\n var this_ = _this;\n var overlay = Object.assign(new maps.OverlayView(), {\n onAdd: function onAdd() {\n var K_MAX_WIDTH = typeof screen !== 'undefined' ? screen.width + 'px' : '2000px';\n var K_MAX_HEIGHT = typeof screen !== 'undefined' ? screen.height + 'px' : '2000px';\n var div = document.createElement('div');\n div.style.backgroundColor = 'transparent';\n div.style.position = 'absolute';\n div.style.left = '0px';\n div.style.top = '0px';\n div.style.width = K_MAX_WIDTH; // prevents some chrome draw defects\n div.style.height = K_MAX_HEIGHT;\n if (this_.props.overlayViewDivStyle) {\n var overlayViewDivStyle = this_.props.overlayViewDivStyle;\n if ((typeof overlayViewDivStyle === 'undefined' ? 'undefined' : _typeof(overlayViewDivStyle)) === 'object') {\n Object.keys(overlayViewDivStyle).forEach(function (property) {\n div.style[property] = overlayViewDivStyle[property];\n });\n }\n }\n var panes = this.getPanes();\n panes.overlayMouseTarget.appendChild(div);\n this_.geoService_.setMapCanvasProjection(maps, overlay.getProjection());\n if (!IS_REACT_16) {\n createPortal(this_, this_._renderPortal(), div,\n // remove prerendered markers\n function () {\n return this_.setState({\n overlay: div\n });\n });\n } else {\n this_.setState({\n overlay: div\n });\n }\n },\n onRemove: function onRemove() {\n var renderedOverlay = this_.state.overlay;\n if (renderedOverlay && !IS_REACT_16) {\n _reactDom2.default.unmountComponentAtNode(renderedOverlay);\n }\n this_.setState({\n overlay: null\n });\n },\n draw: function draw() {\n this_.updateCounter_++;\n this_._onBoundsChanged(map, maps, !this_.props.debounced);\n if (!this_.googleApiLoadedCalled_) {\n this_._onGoogleApiLoaded({\n map: map,\n maps: maps,\n ref: this_.googleMapDom_\n });\n this_.googleApiLoadedCalled_ = true;\n }\n if (this_.mouse_) {\n var latLng = this_.geoService_.fromContainerPixelToLatLng(this_.mouse_);\n this_.mouse_.lat = latLng.lat;\n this_.mouse_.lng = latLng.lng;\n }\n this_._onChildMouseMove();\n if (this_.markersDispatcher_) {\n this_.markersDispatcher_.emit('kON_CHANGE');\n if (this_.fireMouseEventOnIdle_) {\n this_.markersDispatcher_.emit('kON_MOUSE_POSITION_CHANGE');\n }\n }\n }\n });\n _this.overlay_ = overlay;\n overlay.setMap(map);\n if (_this.props.heatmap.positions) {\n _this.heatmap.setMap(map);\n }\n if (_this.props.onTilesLoaded) {\n maps.event.addListener(map, 'tilesloaded', function () {\n this_._onTilesLoaded();\n });\n }\n maps.event.addListener(map, 'zoom_changed', function () {\n // recalc position at zoom start\n if (this_.geoService_.getZoom() !== map.getZoom()) {\n if (!this_.zoomAnimationInProgress_) {\n this_.zoomAnimationInProgress_ = true;\n this_._onZoomAnimationStart(map.zoom);\n }\n\n // If draw() is not called each frame during a zoom animation,\n // simulate it.\n if (mapsVersion < DRAW_CALLED_DURING_ANIMATION_VERSION) {\n var TIMEOUT_ZOOM = 300;\n if (new Date().getTime() - _this.zoomControlClickTime_ < TIMEOUT_ZOOM) {\n // there is strange Google Map Api behavior in chrome when zoom animation of map\n // is started only on second raf call, if was click on zoom control\n // or +- keys pressed, so i wait for two rafs before change state\n\n // this does not fully prevent animation jump\n // but reduce it's occurence probability\n (0, _raf2.default)(function () {\n return (0, _raf2.default)(function () {\n this_.updateCounter_++;\n this_._onBoundsChanged(map, maps);\n });\n });\n } else {\n this_.updateCounter_++;\n this_._onBoundsChanged(map, maps);\n }\n }\n }\n });\n maps.event.addListener(map, 'idle', function () {\n if (_this.resetSizeOnIdle_) {\n _this._setViewSize();\n var currMinZoom = _this._computeMinZoom(_this.props.options.minZoom);\n if (currMinZoom !== _this.minZoom_) {\n _this.minZoom_ = currMinZoom;\n map.setOptions({\n minZoom: currMinZoom\n });\n }\n _this.resetSizeOnIdle_ = false;\n }\n if (this_.zoomAnimationInProgress_) {\n this_.zoomAnimationInProgress_ = false;\n this_._onZoomAnimationEnd(map.zoom);\n }\n this_.updateCounter_++;\n this_._onBoundsChanged(map, maps);\n this_.dragTime_ = 0;\n if (this_.markersDispatcher_) {\n this_.markersDispatcher_.emit('kON_CHANGE');\n }\n });\n maps.event.addListener(map, 'mouseover', function () {\n // has advantage over div MouseLeave\n this_.mouseInMap_ = true;\n });\n\n // an alternative way to know the mouse is back within the map\n // This would not fire when clicking/interacting with google maps\n // own on-map countrols+markers. This handles an edge case for touch devices\n // + 'draggable:false' custom option. See #332 for more details.\n maps.event.addListener(map, 'click', function () {\n this_.mouseInMap_ = true;\n });\n maps.event.addListener(map, 'mouseout', function () {\n // has advantage over div MouseLeave\n this_.mouseInMap_ = false;\n this_.mouse_ = null;\n this_.markersDispatcher_.emit('kON_MOUSE_POSITION_CHANGE');\n });\n maps.event.addListener(map, 'drag', function () {\n this_.dragTime_ = new Date().getTime();\n this_._onDrag(map);\n });\n maps.event.addListener(map, 'dragend', function () {\n // 'dragend' fires on mouse release.\n // 'idle' listener waits until drag inertia ends before firing `onDragEnd`\n var idleListener = maps.event.addListener(map, 'idle', function () {\n maps.event.removeListener(idleListener);\n this_._onDragEnd(map);\n });\n });\n // user choosing satellite vs roads, etc\n maps.event.addListener(map, 'maptypeid_changed', function () {\n this_._onMapTypeIdChange(map.getMapTypeId());\n });\n }).catch(function (e) {\n // notify callback of load failure\n _this._onGoogleApiLoaded({\n map: null,\n maps: null,\n ref: _this.googleMapDom_\n });\n console.error(e); // eslint-disable-line no-console\n throw e;\n });\n };\n _this._onGoogleApiLoaded = function () {\n if (_this.props.onGoogleApiLoaded) {\n var _this$props;\n if (process.env.NODE_ENV !== 'production' && _this.props.yesIWantToUseGoogleMapApiInternals !== true) {\n console.warn('GoogleMap: ' +\n // eslint-disable-line\n 'Usage of internal api objects is dangerous ' + 'and can cause a lot of issues.\\n' + 'To hide this warning add yesIWantToUseGoogleMapApiInternals={true} ' + 'to K_RECALC_CLIENT_RECT_MS) {\n _this.boundingRect_ = e.currentTarget.getBoundingClientRect();\n }\n _this.mouseMoveTime_ = currTime;\n var mousePosX = e.clientX - _this.boundingRect_.left;\n var mousePosY = e.clientY - _this.boundingRect_.top;\n if (!_this.mouse_) {\n _this.mouse_ = {\n x: 0,\n y: 0,\n lat: 0,\n lng: 0\n };\n }\n _this.mouse_.x = mousePosX;\n _this.mouse_.y = mousePosY;\n var latLng = _this.geoService_.fromContainerPixelToLatLng(_this.mouse_);\n _this.mouse_.lat = latLng.lat;\n _this.mouse_.lng = latLng.lng;\n _this._onChildMouseMove();\n if (currTime - _this.dragTime_ < K_IDLE_TIMEOUT) {\n _this.fireMouseEventOnIdle_ = true;\n } else {\n _this.markersDispatcher_.emit('kON_MOUSE_POSITION_CHANGE');\n _this.fireMouseEventOnIdle_ = false;\n }\n };\n _this._onClick = function () {\n var _this$props12;\n return _this.props.onClick && !_this.childMouseDownArgs_ && new Date().getTime() - _this.childMouseUpTime_ > K_IDLE_CLICK_TIMEOUT && _this.dragTime_ === 0 && (_this$props12 = _this.props).onClick.apply(_this$props12, arguments);\n };\n _this._onMapClick = function (event) {\n if (_this.markersDispatcher_) {\n // support touch events and recalculate mouse position on click\n _this._onMapMouseMove(event);\n var currTime = new Date().getTime();\n if (currTime - _this.dragTime_ > K_IDLE_TIMEOUT) {\n if (_this.mouse_) {\n _this._onClick(_extends({}, _this.mouse_, {\n event: event\n }));\n }\n _this.markersDispatcher_.emit('kON_CLICK', event);\n }\n }\n };\n _this._onMapMouseDownNative = function (event) {\n if (!_this.mouseInMap_) return;\n _this._onMapMouseDown(event);\n };\n _this._onMapMouseDown = function (event) {\n if (_this.markersDispatcher_) {\n var currTime = new Date().getTime();\n if (currTime - _this.dragTime_ > K_IDLE_TIMEOUT) {\n // Hovered marker detected at mouse move could be deleted at mouse down time\n // so it will be good to force hovered marker recalculation\n _this._onMapMouseMove(event);\n _this.markersDispatcher_.emit('kON_MDOWN', event);\n }\n }\n };\n _this._onMapMouseDownCapture = function () {\n if ((0, _detect2.default)().isChrome) {\n // to fix strange zoom in chrome\n _this.zoomControlClickTime_ = new Date().getTime();\n }\n };\n _this._onKeyDownCapture = function () {\n if ((0, _detect2.default)().isChrome) {\n _this.zoomControlClickTime_ = new Date().getTime();\n }\n };\n _this._isCenterDefined = function (center) {\n return center && ((0, _isPlainObject2.default)(center) && (0, _isNumber2.default)(center.lat) && (0, _isNumber2.default)(center.lng) || center.length === 2 && (0, _isNumber2.default)(center[0]) && (0, _isNumber2.default)(center[1]));\n };\n _this._onBoundsChanged = function (map, maps, callExtBoundsChange) {\n if (map) {\n var gmC = map.getCenter();\n _this.geoService_.setView([gmC.lat(), gmC.lng()], map.getZoom(), 0);\n }\n if ((_this.props.onChange || _this.props.onBoundsChange) && _this.geoService_.canProject()) {\n var zoom = _this.geoService_.getZoom();\n var bounds = _this.geoService_.getBounds();\n var centerLatLng = _this.geoService_.getCenter();\n if (!(0, _isArraysEqualEps2.default)(bounds, _this.prevBounds_, kEPS)) {\n if (callExtBoundsChange !== false) {\n var marginBounds = _this.geoService_.getBounds(_this.props.margin);\n if (_this.props.onBoundsChange) {\n _this.props.onBoundsChange(_this.centerIsObject_ ? _extends({}, centerLatLng) : [centerLatLng.lat, centerLatLng.lng], zoom, bounds, marginBounds);\n }\n if (_this.props.onChange) {\n _this.props.onChange({\n center: _extends({}, centerLatLng),\n zoom: zoom,\n bounds: {\n nw: {\n lat: bounds[0],\n lng: bounds[1]\n },\n se: {\n lat: bounds[2],\n lng: bounds[3]\n },\n sw: {\n lat: bounds[4],\n lng: bounds[5]\n },\n ne: {\n lat: bounds[6],\n lng: bounds[7]\n }\n },\n marginBounds: {\n nw: {\n lat: marginBounds[0],\n lng: marginBounds[1]\n },\n se: {\n lat: marginBounds[2],\n lng: marginBounds[3]\n },\n sw: {\n lat: marginBounds[4],\n lng: marginBounds[5]\n },\n ne: {\n lat: marginBounds[6],\n lng: marginBounds[7]\n }\n },\n size: _this.geoService_.hasSize() ? {\n width: _this.geoService_.getWidth(),\n height: _this.geoService_.getHeight()\n } : {\n width: 0,\n height: 0\n }\n });\n }\n _this.prevBounds_ = bounds;\n }\n }\n }\n };\n _this._registerChild = function (ref) {\n _this.googleMapDom_ = ref;\n };\n _this.mounted_ = false;\n _this.initialized_ = false;\n _this.googleApiLoadedCalled_ = false;\n _this.map_ = null;\n _this.maps_ = null;\n _this.prevBounds_ = null;\n _this.heatmap = null;\n _this.layers_ = {};\n _this.mouse_ = null;\n _this.mouseMoveTime_ = 0;\n _this.boundingRect_ = null;\n _this.mouseInMap_ = true;\n _this.dragTime_ = 0;\n _this.fireMouseEventOnIdle_ = false;\n _this.updateCounter_ = 0;\n _this.markersDispatcher_ = new _marker_dispatcher2.default(_this);\n _this.geoService_ = new _geo2.default(K_GOOGLE_TILE_SIZE);\n _this.centerIsObject_ = (0, _isPlainObject2.default)(_this.props.center);\n _this.minZoom_ = DEFAULT_MIN_ZOOM;\n _this.defaultDraggableOption_ = true;\n _this.zoomControlClickTime_ = 0;\n _this.childMouseDownArgs_ = null;\n _this.childMouseUpTime_ = 0;\n _this.googleMapDom_ = null;\n if (process.env.NODE_ENV !== 'production') {\n if (_this.props.apiKey) {\n console.warn('GoogleMap: ' +\n // eslint-disable-line no-console\n 'apiKey is deprecated, use ' + 'bootstrapURLKeys={{key: YOUR_API_KEY}} instead.');\n }\n if (_this.props.onBoundsChange) {\n console.warn('GoogleMap: ' +\n // eslint-disable-line no-console\n 'onBoundsChange is deprecated, use ' + 'onChange({center, zoom, bounds, ...other}) instead.');\n }\n if ((0, _isEmpty2.default)(_this.props.center) && (0, _isEmpty2.default)(_this.props.defaultCenter)) {\n console.warn('GoogleMap: center or defaultCenter property must be defined' // eslint-disable-line no-console\n );\n }\n if ((0, _isEmpty2.default)(_this.props.zoom) && (0, _isEmpty2.default)(_this.props.defaultZoom)) {\n console.warn('GoogleMap: zoom or defaultZoom property must be defined' // eslint-disable-line no-console\n );\n }\n }\n if (_this._isCenterDefined(_this.props.center || _this.props.defaultCenter)) {\n var propsCenter = latLng2Obj(_this.props.center || _this.props.defaultCenter);\n _this.geoService_.setView(propsCenter, _this.props.zoom || _this.props.defaultZoom, 0);\n }\n _this.zoomAnimationInProgress_ = false;\n _this.state = {\n overlay: null\n };\n return _this;\n }\n GoogleMap.prototype.componentDidMount = function componentDidMount() {\n var _this2 = this;\n this.mounted_ = true;\n (0, _passiveEvents2.default)(window, 'resize', this._onWindowResize, false);\n (0, _passiveEvents2.default)(window, 'keydown', this._onKeyDownCapture, true);\n var mapDom = _reactDom2.default.findDOMNode(this.googleMapDom_);\n // gmap can't prevent map drag if mousedown event already occured\n // the only workaround I find is prevent mousedown native browser event\n\n if (mapDom) {\n (0, _passiveEvents2.default)(mapDom, 'mousedown', this._onMapMouseDownNative, true);\n }\n (0, _passiveEvents2.default)(window, 'mouseup', this._onChildMouseUp, false);\n var bootstrapURLKeys = _extends({}, this.props.apiKey && {\n key: this.props.apiKey\n }, this.props.bootstrapURLKeys);\n this.props.googleMapLoader(bootstrapURLKeys, this.props.heatmapLibrary); // we can start load immediatly\n\n setTimeout(function () {\n // to detect size\n _this2._setViewSize();\n if (_this2._isCenterDefined(_this2.props.center || _this2.props.defaultCenter)) {\n _this2._initMap();\n }\n }, 0, this);\n if (this.props.resetBoundsOnResize) {\n var that = this;\n _detectElementResize2.default.addResizeListener(mapDom, that._mapDomResizeCallback);\n }\n };\n GoogleMap.prototype.UNSAFE_componentWillReceiveProps = function UNSAFE_componentWillReceiveProps(nextProps) {\n var _this3 = this;\n if (process.env.NODE_ENV !== 'production') {\n if (!(0, _shallowEqual2.default)(this.props.defaultCenter, nextProps.defaultCenter)) {\n console.warn(\"GoogleMap: defaultCenter prop changed. You can't change default props.\");\n }\n if (!(0, _shallowEqual2.default)(this.props.defaultZoom, nextProps.defaultZoom)) {\n console.warn(\"GoogleMap: defaultZoom prop changed. You can't change default props.\");\n }\n }\n if (!this._isCenterDefined(this.props.center) && this._isCenterDefined(nextProps.center)) {\n setTimeout(function () {\n return _this3._initMap();\n }, 0);\n }\n if (this.map_) {\n var centerLatLng = this.geoService_.getCenter();\n if (this._isCenterDefined(nextProps.center)) {\n var nextPropsCenter = latLng2Obj(nextProps.center);\n var currCenter = this._isCenterDefined(this.props.center) ? latLng2Obj(this.props.center) : null;\n if (!currCenter || Math.abs(nextPropsCenter.lat - currCenter.lat) + Math.abs(nextPropsCenter.lng - currCenter.lng) > kEPS) {\n if (Math.abs(nextPropsCenter.lat - centerLatLng.lat) + Math.abs(nextPropsCenter.lng - centerLatLng.lng) > kEPS) {\n this.map_.panTo({\n lat: nextPropsCenter.lat,\n lng: nextPropsCenter.lng\n });\n }\n }\n }\n if (!(0, _isEmpty2.default)(nextProps.zoom)) {\n // if zoom chaged by user\n if (Math.abs(nextProps.zoom - this.props.zoom) > 0) {\n this.map_.setZoom(nextProps.zoom);\n }\n }\n if (!(0, _isEmpty2.default)(this.props.draggable) && (0, _isEmpty2.default)(nextProps.draggable)) {\n // reset to default\n this.map_.setOptions({\n draggable: this.defaultDraggableOption_\n });\n } else if (!(0, _shallowEqual2.default)(this.props.draggable, nextProps.draggable)) {\n // also prevent this on window 'mousedown' event to prevent map move\n this.map_.setOptions({\n draggable: nextProps.draggable\n });\n }\n\n // use shallowEqual to try avoid calling map._setOptions if only the ref changes\n if (!(0, _isEmpty2.default)(nextProps.options) && !(0, _shallowEqual2.default)(this.props.options, nextProps.options)) {\n var mapPlainObjects = (0, _pick2.default)(this.maps_, _isPlainObject2.default);\n var options = typeof nextProps.options === 'function' ? nextProps.options(mapPlainObjects) : nextProps.options;\n // remove zoom, center and draggable options as these are managed by google-maps-react\n options = (0, _omit2.default)(options, ['zoom', 'center', 'draggable']);\n if ('minZoom' in options) {\n var minZoom = this._computeMinZoom(options.minZoom);\n options.minZoom = _checkMinZoom(options.minZoom, minZoom);\n }\n this.map_.setOptions(options);\n }\n if (!(0, _shallowEqual2.default)(nextProps.layerTypes, this.props.layerTypes)) {\n Object.keys(this.layers_).forEach(function (layerKey) {\n _this3.layers_[layerKey].setMap(null);\n delete _this3.layers_[layerKey];\n });\n this._setLayers(nextProps.layerTypes);\n }\n if (this.heatmap && !(0, _shallowEqual2.default)(nextProps.heatmap.positions, this.props.heatmap.positions)) {\n this.heatmap.setData(nextProps.heatmap.positions.map(function (p) {\n return {\n location: new _this3.maps_.LatLng(p.lat, p.lng),\n weight: p.weight\n };\n }));\n }\n }\n };\n GoogleMap.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps, nextState) {\n // draggable does not affect inner components\n return !(0, _shallowEqual2.default)((0, _omit2.default)(this.props, ['draggable']), (0, _omit2.default)(nextProps, ['draggable'])) || !(0, _shallowEqual2.default)(this.state, nextState);\n };\n GoogleMap.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {\n this.markersDispatcher_.emit('kON_CHANGE');\n if (!(0, _shallowEqual2.default)(this.props.hoverDistance, prevProps.hoverDistance)) {\n this.markersDispatcher_.emit('kON_MOUSE_POSITION_CHANGE');\n }\n };\n GoogleMap.prototype.componentWillUnmount = function componentWillUnmount() {\n this.mounted_ = false;\n var mapDom = _reactDom2.default.findDOMNode(this.googleMapDom_);\n if (mapDom) {\n mapDom.removeEventListener('mousedown', this._onMapMouseDownNative, true);\n }\n window.removeEventListener('resize', this._onWindowResize);\n window.removeEventListener('keydown', this._onKeyDownCapture);\n window.removeEventListener('mouseup', this._onChildMouseUp, false);\n if (this.props.resetBoundsOnResize) {\n _detectElementResize2.default.removeResizeListener(mapDom, this._mapDomResizeCallback);\n }\n if (this.overlay_) {\n // this triggers overlay_.onRemove(), which will unmount the \n this.overlay_.setMap(null);\n }\n if (this.maps_ && this.map_ && this.props.shouldUnregisterMapOnUnmount) {\n // fix google, as otherwise listeners works even without map\n this.map_.setOptions({\n scrollwheel: false\n });\n this.maps_.event.clearInstanceListeners(this.map_);\n }\n if (this.props.shouldUnregisterMapOnUnmount) {\n this.map_ = null;\n this.maps_ = null;\n }\n this.markersDispatcher_.dispose();\n this.resetSizeOnIdle_ = false;\n if (this.props.shouldUnregisterMapOnUnmount) {\n delete this.map_;\n delete this.markersDispatcher_;\n }\n };\n // calc minZoom if map size available\n // it's better to not set minZoom less than this calculation gives\n // otherwise there is no homeomorphism between screen coordinates and map\n // (one map coordinate can have different screen coordinates)\n\n // this method works only if this.props.onChildMouseDown was called\n\n // this method works only if this.props.onChildMouseDown was called\n\n // K_IDLE_CLICK_TIMEOUT - looks like 300 is enough\n\n // gmap can't prevent map drag if mousedown event already occured\n // the only workaround I find is prevent mousedown native browser event\n\n GoogleMap.prototype.render = function render() {\n var overlay = this.state.overlay;\n var mapMarkerPrerender = !overlay ? _react2.default.createElement(_google_map_markers_prerender2.default, {\n experimental: this.props.experimental,\n onChildClick: this._onChildClick,\n onChildMouseDown: this._onChildMouseDown,\n onChildMouseEnter: this._onChildMouseEnter,\n onChildMouseLeave: this._onChildMouseLeave,\n geoService: this.geoService_,\n insideMapPanes: false,\n distanceToMouse: this.props.distanceToMouse,\n getHoverDistance: this._getHoverDistance,\n dispatcher: this.markersDispatcher_\n }) : null;\n return _react2.default.createElement('div', {\n style: this.props.style,\n onMouseMove: this._onMapMouseMove,\n onMouseDownCapture: this._onMapMouseDownCapture,\n onClick: this._onMapClick\n }, _react2.default.createElement(_google_map_map2.default, {\n registerChild: this._registerChild\n }), IS_REACT_16 && overlay && createPortal(this._renderPortal(), overlay), mapMarkerPrerender);\n };\n return GoogleMap;\n}(_react.Component);\nGoogleMap.propTypes = {\n apiKey: _propTypes2.default.string,\n bootstrapURLKeys: _propTypes2.default.any,\n defaultCenter: _propTypes2.default.oneOfType([_propTypes2.default.array, _propTypes2.default.shape({\n lat: _propTypes2.default.number,\n lng: _propTypes2.default.number\n })]),\n center: _propTypes2.default.oneOfType([_propTypes2.default.array, _propTypes2.default.shape({\n lat: _propTypes2.default.number,\n lng: _propTypes2.default.number\n })]),\n defaultZoom: _propTypes2.default.number,\n zoom: _propTypes2.default.number,\n onBoundsChange: _propTypes2.default.func,\n onChange: _propTypes2.default.func,\n onClick: _propTypes2.default.func,\n onChildClick: _propTypes2.default.func,\n onChildMouseDown: _propTypes2.default.func,\n onChildMouseUp: _propTypes2.default.func,\n onChildMouseMove: _propTypes2.default.func,\n onChildMouseEnter: _propTypes2.default.func,\n onChildMouseLeave: _propTypes2.default.func,\n onZoomAnimationStart: _propTypes2.default.func,\n onZoomAnimationEnd: _propTypes2.default.func,\n onDrag: _propTypes2.default.func,\n onDragEnd: _propTypes2.default.func,\n onMapTypeIdChange: _propTypes2.default.func,\n onTilesLoaded: _propTypes2.default.func,\n options: _propTypes2.default.any,\n distanceToMouse: _propTypes2.default.func,\n hoverDistance: _propTypes2.default.number,\n debounced: _propTypes2.default.bool,\n margin: _propTypes2.default.array,\n googleMapLoader: _propTypes2.default.any,\n onGoogleApiLoaded: _propTypes2.default.func,\n yesIWantToUseGoogleMapApiInternals: _propTypes2.default.bool,\n draggable: _propTypes2.default.bool,\n style: _propTypes2.default.any,\n resetBoundsOnResize: _propTypes2.default.bool,\n layerTypes: _propTypes2.default.arrayOf(_propTypes2.default.string),\n // ['TransitLayer', 'TrafficLayer']\n shouldUnregisterMapOnUnmount: _propTypes2.default.bool\n};\nGoogleMap.defaultProps = {\n distanceToMouse: function distanceToMouse(pt, mousePos /* , markerProps */) {\n return Math.sqrt((pt.x - mousePos.x) * (pt.x - mousePos.x) + (pt.y - mousePos.y) * (pt.y - mousePos.y));\n },\n hoverDistance: 30,\n debounced: true,\n options: defaultOptions_,\n googleMapLoader: _google_map_loader2.default,\n yesIWantToUseGoogleMapApiInternals: false,\n style: {\n width: '100%',\n height: '100%',\n margin: 0,\n padding: 0,\n position: 'relative'\n },\n layerTypes: [],\n heatmap: {},\n heatmapLibrary: false,\n shouldUnregisterMapOnUnmount: true\n};\nGoogleMap.googleMapLoader = _google_map_loader2.default;\nexports.default = GoogleMap;","'use strict';\n\nexports.__esModule = true;\nexports.default = addPassiveEventListener;\n// feature detection for passive support\n// see: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\nfunction hasPassiveSupport() {\n var passiveSupported = false;\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passiveSupported = true;\n }\n });\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n } catch (err) {\n passiveSupported = false;\n }\n return passiveSupported;\n}\nfunction addPassiveEventListener(element, eventName, func, capture) {\n element.addEventListener(eventName, func, hasPassiveSupport() ? {\n capture: capture,\n passive: true\n } : capture);\n}","'use strict';\n\nvar _passiveEvents = require('./passiveEvents');\nvar _passiveEvents2 = _interopRequireDefault(_passiveEvents);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\n// Reliable `window` and `document` detection\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\n// Check `document` and `window` in case of server-side rendering\n/* eslint-disable */\n/**\n* Detect Element Resize.\n* Forked in order to guard against unsafe 'window' and 'document' references.\n*\n* https://github.com/sdecima/javascript-detect-element-resize\n* Sebastian Decima\n*\n* version: 0.5.3\n**/\n\nvar _window;\nif (canUseDOM) {\n _window = window;\n} else if (typeof self !== 'undefined') {\n _window = self;\n} else {\n _window = undefined;\n}\nvar attachEvent = typeof document !== 'undefined' && document.attachEvent;\nvar stylesCreated = false;\nif (canUseDOM && !attachEvent) {\n var requestFrame = function () {\n var raf = _window.requestAnimationFrame || _window.mozRequestAnimationFrame || _window.webkitRequestAnimationFrame || function (fn) {\n return _window.setTimeout(fn, 20);\n };\n return function (fn) {\n return raf(fn);\n };\n }();\n var cancelFrame = function () {\n var cancel = _window.cancelAnimationFrame || _window.mozCancelAnimationFrame || _window.webkitCancelAnimationFrame || _window.clearTimeout;\n return function (id) {\n return cancel(id);\n };\n }();\n var resetTriggers = function resetTriggers(element) {\n var triggers = element.__resizeTriggers__,\n expand = triggers.firstElementChild,\n contract = triggers.lastElementChild,\n expandChild = expand.firstElementChild;\n contract.scrollLeft = contract.scrollWidth;\n contract.scrollTop = contract.scrollHeight;\n expandChild.style.width = expand.offsetWidth + 1 + 'px';\n expandChild.style.height = expand.offsetHeight + 1 + 'px';\n expand.scrollLeft = expand.scrollWidth;\n expand.scrollTop = expand.scrollHeight;\n };\n var checkTriggers = function checkTriggers(element) {\n return element.offsetWidth != element.__resizeLast__.width || element.offsetHeight != element.__resizeLast__.height;\n };\n var scrollListener = function scrollListener(e) {\n var element = this;\n resetTriggers(this);\n if (this.__resizeRAF__) cancelFrame(this.__resizeRAF__);\n this.__resizeRAF__ = requestFrame(function () {\n if (checkTriggers(element)) {\n element.__resizeLast__.width = element.offsetWidth;\n element.__resizeLast__.height = element.offsetHeight;\n element.__resizeListeners__.forEach(function (fn) {\n fn.call(element, e);\n });\n }\n });\n };\n\n /* Detect CSS Animations support to detect element display/re-attach */\n var animation = false,\n animationstring = 'animation',\n keyframeprefix = '',\n animationstartevent = 'animationstart',\n domPrefixes = 'Webkit Moz O ms'.split(' '),\n startEvents = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' '),\n pfx = '';\n if (canUseDOM) {\n var elm = document.createElement('fakeelement');\n if (elm.style.animationName !== undefined) {\n animation = true;\n }\n if (animation === false) {\n for (var i = 0; i < domPrefixes.length; i++) {\n if (elm.style[domPrefixes[i] + 'AnimationName'] !== undefined) {\n pfx = domPrefixes[i];\n animationstring = pfx + 'Animation';\n keyframeprefix = '-' + pfx.toLowerCase() + '-';\n animationstartevent = startEvents[i];\n animation = true;\n break;\n }\n }\n }\n }\n var animationName = 'resizeanim';\n var animationKeyframes = '@' + keyframeprefix + 'keyframes ' + animationName + ' { from { opacity: 0; } to { opacity: 0; } } ';\n var animationStyle = keyframeprefix + 'animation: 1ms ' + animationName + '; ';\n}\nvar createStyles = function createStyles() {\n if (!stylesCreated) {\n //opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360\n var css = (animationKeyframes ? animationKeyframes : '') + '.resize-triggers { ' + (animationStyle ? animationStyle : '') + '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%; }',\n head = document.head || document.getElementsByTagName('head')[0],\n style = document.createElement('style');\n style.type = 'text/css';\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n head.appendChild(style);\n stylesCreated = true;\n }\n};\nvar addResizeListener = function addResizeListener(element, fn) {\n if (element.parentNode === undefined) {\n var tempParentDiv = document.createElement('div');\n element.parentNode = tempParentDiv;\n }\n element = element.parentNode;\n if (attachEvent) element.attachEvent('onresize', fn);else {\n if (!element.__resizeTriggers__) {\n if (getComputedStyle(element).position == 'static') element.style.position = 'relative';\n createStyles();\n element.__resizeLast__ = {};\n element.__resizeListeners__ = [];\n (element.__resizeTriggers__ = document.createElement('div')).className = 'resize-triggers';\n element.__resizeTriggers__.innerHTML = '
' + '';\n element.appendChild(element.__resizeTriggers__);\n resetTriggers(element);\n (0, _passiveEvents2.default)(element, 'scroll', scrollListener, true);\n\n /* Listen for a css animation to detect element display/re-attach */\n animationstartevent && element.__resizeTriggers__.addEventListener(animationstartevent, function (e) {\n if (e.animationName == animationName) resetTriggers(element);\n });\n }\n element.__resizeListeners__.push(fn);\n }\n};\nvar removeResizeListener = function removeResizeListener(element, fn) {\n element = element.parentNode;\n if (attachEvent) element.detachEvent('onresize', fn);else {\n element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);\n if (!element.__resizeListeners__.length) {\n element.removeEventListener('scroll', scrollListener);\n element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);\n }\n }\n};\nmodule.exports = {\n addResizeListener: addResizeListener,\n removeResizeListener: removeResizeListener\n};","'use strict';\n\nmodule.exports = Point;\n\n/**\n * A standalone point geometry with useful accessor, comparison, and\n * modification methods.\n *\n * @class Point\n * @param {Number} x the x-coordinate. this could be longitude or screen\n * pixels, or any other sort of unit.\n * @param {Number} y the y-coordinate. this could be latitude or screen\n * pixels, or any other sort of unit.\n * @example\n * var point = new Point(-77, 38);\n */\nfunction Point(x, y) {\n this.x = x;\n this.y = y;\n}\nPoint.prototype = {\n /**\n * Clone this point, returning a new point that can be modified\n * without affecting the old one.\n * @return {Point} the clone\n */\n clone: function clone() {\n return new Point(this.x, this.y);\n },\n /**\n * Add this point's x & y coordinates to another point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n add: function add(p) {\n return this.clone()._add(p);\n },\n /**\n * Subtract this point's x & y coordinates to from point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n sub: function sub(p) {\n return this.clone()._sub(p);\n },\n /**\n * Multiply this point's x & y coordinates by point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n multByPoint: function multByPoint(p) {\n return this.clone()._multByPoint(p);\n },\n /**\n * Divide this point's x & y coordinates by point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n divByPoint: function divByPoint(p) {\n return this.clone()._divByPoint(p);\n },\n /**\n * Multiply this point's x & y coordinates by a factor,\n * yielding a new point.\n * @param {Point} k factor\n * @return {Point} output point\n */\n mult: function mult(k) {\n return this.clone()._mult(k);\n },\n /**\n * Divide this point's x & y coordinates by a factor,\n * yielding a new point.\n * @param {Point} k factor\n * @return {Point} output point\n */\n div: function div(k) {\n return this.clone()._div(k);\n },\n /**\n * Rotate this point around the 0, 0 origin by an angle a,\n * given in radians\n * @param {Number} a angle to rotate around, in radians\n * @return {Point} output point\n */\n rotate: function rotate(a) {\n return this.clone()._rotate(a);\n },\n /**\n * Rotate this point around p point by an angle a,\n * given in radians\n * @param {Number} a angle to rotate around, in radians\n * @param {Point} p Point to rotate around\n * @return {Point} output point\n */\n rotateAround: function rotateAround(a, p) {\n return this.clone()._rotateAround(a, p);\n },\n /**\n * Multiply this point by a 4x1 transformation matrix\n * @param {Array} m transformation matrix\n * @return {Point} output point\n */\n matMult: function matMult(m) {\n return this.clone()._matMult(m);\n },\n /**\n * Calculate this point but as a unit vector from 0, 0, meaning\n * that the distance from the resulting point to the 0, 0\n * coordinate will be equal to 1 and the angle from the resulting\n * point to the 0, 0 coordinate will be the same as before.\n * @return {Point} unit vector point\n */\n unit: function unit() {\n return this.clone()._unit();\n },\n /**\n * Compute a perpendicular point, where the new y coordinate\n * is the old x coordinate and the new x coordinate is the old y\n * coordinate multiplied by -1\n * @return {Point} perpendicular point\n */\n perp: function perp() {\n return this.clone()._perp();\n },\n /**\n * Return a version of this point with the x & y coordinates\n * rounded to integers.\n * @return {Point} rounded point\n */\n round: function round() {\n return this.clone()._round();\n },\n /**\n * Return the magitude of this point: this is the Euclidean\n * distance from the 0, 0 coordinate to this point's x and y\n * coordinates.\n * @return {Number} magnitude\n */\n mag: function mag() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n },\n /**\n * Judge whether this point is equal to another point, returning\n * true or false.\n * @param {Point} other the other point\n * @return {boolean} whether the points are equal\n */\n equals: function equals(other) {\n return this.x === other.x && this.y === other.y;\n },\n /**\n * Calculate the distance from this point to another point\n * @param {Point} p the other point\n * @return {Number} distance\n */\n dist: function dist(p) {\n return Math.sqrt(this.distSqr(p));\n },\n /**\n * Calculate the distance from this point to another point,\n * without the square root step. Useful if you're comparing\n * relative distances.\n * @param {Point} p the other point\n * @return {Number} distance\n */\n distSqr: function distSqr(p) {\n var dx = p.x - this.x,\n dy = p.y - this.y;\n return dx * dx + dy * dy;\n },\n /**\n * Get the angle from the 0, 0 coordinate to this point, in radians\n * coordinates.\n * @return {Number} angle\n */\n angle: function angle() {\n return Math.atan2(this.y, this.x);\n },\n /**\n * Get the angle from this point to another point, in radians\n * @param {Point} b the other point\n * @return {Number} angle\n */\n angleTo: function angleTo(b) {\n return Math.atan2(this.y - b.y, this.x - b.x);\n },\n /**\n * Get the angle between this point and another point, in radians\n * @param {Point} b the other point\n * @return {Number} angle\n */\n angleWith: function angleWith(b) {\n return this.angleWithSep(b.x, b.y);\n },\n /*\n * Find the angle of the two vectors, solving the formula for\n * the cross product a x b = |a||b|sin(θ) for θ.\n * @param {Number} x the x-coordinate\n * @param {Number} y the y-coordinate\n * @return {Number} the angle in radians\n */\n angleWithSep: function angleWithSep(x, y) {\n return Math.atan2(this.x * y - this.y * x, this.x * x + this.y * y);\n },\n _matMult: function _matMult(m) {\n var x = m[0] * this.x + m[1] * this.y,\n y = m[2] * this.x + m[3] * this.y;\n this.x = x;\n this.y = y;\n return this;\n },\n _add: function _add(p) {\n this.x += p.x;\n this.y += p.y;\n return this;\n },\n _sub: function _sub(p) {\n this.x -= p.x;\n this.y -= p.y;\n return this;\n },\n _mult: function _mult(k) {\n this.x *= k;\n this.y *= k;\n return this;\n },\n _div: function _div(k) {\n this.x /= k;\n this.y /= k;\n return this;\n },\n _multByPoint: function _multByPoint(p) {\n this.x *= p.x;\n this.y *= p.y;\n return this;\n },\n _divByPoint: function _divByPoint(p) {\n this.x /= p.x;\n this.y /= p.y;\n return this;\n },\n _unit: function _unit() {\n this._div(this.mag());\n return this;\n },\n _perp: function _perp() {\n var y = this.y;\n this.y = this.x;\n this.x = -y;\n return this;\n },\n _rotate: function _rotate(angle) {\n var cos = Math.cos(angle),\n sin = Math.sin(angle),\n x = cos * this.x - sin * this.y,\n y = sin * this.x + cos * this.y;\n this.x = x;\n this.y = y;\n return this;\n },\n _rotateAround: function _rotateAround(angle, p) {\n var cos = Math.cos(angle),\n sin = Math.sin(angle),\n x = p.x + cos * (this.x - p.x) - sin * (this.y - p.y),\n y = p.y + sin * (this.x - p.x) + cos * (this.y - p.y);\n this.x = x;\n this.y = y;\n return this;\n },\n _round: function _round() {\n this.x = Math.round(this.x);\n this.y = Math.round(this.y);\n return this;\n }\n};\n\n/**\n * Construct a point from an array if necessary, otherwise if the input\n * is already a Point, or an unknown type, return it unchanged\n * @param {Array|Point|*} a any kind of input value\n * @return {Point} constructed point, or passed-through value.\n * @example\n * // this\n * var point = Point.convert([0, 1]);\n * // is equivalent to\n * var point = new Point(0, 1);\n */\nPoint.convert = function (a) {\n if (a instanceof Point) {\n return a;\n }\n if (Array.isArray(a)) {\n return new Point(a[0], a[1]);\n }\n return a;\n};"],"sourceRoot":""}